数据库新增和测温数据
parent
4a8178e10a
commit
e4a7c18a8a
File diff suppressed because it is too large
Load Diff
@ -1,22 +1,22 @@
|
||||
//
|
||||
//package com.shxy.xyhkcamera.alarm;
|
||||
//
|
||||
//import com.shxy.xyhkcamera.HCNetSDK;
|
||||
//import com.sun.jna.Pointer;
|
||||
//
|
||||
//
|
||||
//
|
||||
//public class FMSGCallBack_V31 implements HCNetSDK.FMSGCallBack_V31 {
|
||||
// //报警信息回调函数
|
||||
// public boolean invoke(int lCommand, HCNetSDK.NET_DVR_ALARMER pAlarmer, Pointer pAlarmInfo, int dwBufLen, Pointer pUser) {
|
||||
// AlarmDataParse.alarmDataHandle(lCommand, pAlarmer, pAlarmInfo, dwBufLen, pUser);
|
||||
// return true;
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
package com.shxy.xyhkcamera.alarm;
|
||||
|
||||
import com.shxy.xyhkcamera.hk.HCNetSDK;
|
||||
import com.sun.jna.Pointer;
|
||||
|
||||
|
||||
|
||||
public class FMSGCallBack_V31 implements HCNetSDK.FMSGCallBack_V31 {
|
||||
//报警信息回调函数
|
||||
public boolean invoke(int lCommand, HCNetSDK.NET_DVR_ALARMER pAlarmer, Pointer pAlarmInfo, int dwBufLen, Pointer pUser) {
|
||||
AlarmDataParse.alarmDataHandle(lCommand, pAlarmer, pAlarmInfo, dwBufLen, pUser);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
//package com.shxy.xyhkcamera.configure;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.annotation.DbType;
|
||||
//import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
|
||||
//import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
//import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
//
|
||||
//@Configuration
|
||||
//@EnableTransactionManagement
|
||||
//public class MybatisPlusConfig {
|
||||
//
|
||||
// @Bean
|
||||
// public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
// MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
// PaginationInnerInterceptor pii = new PaginationInnerInterceptor();
|
||||
// pii.setDbType(DbType.MYSQL);
|
||||
// pii.setMaxLimit(500L);
|
||||
// interceptor.addInnerInterceptor(pii);
|
||||
// return interceptor;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
//
|
@ -1,18 +0,0 @@
|
||||
package com.shxy.xyhkcamera.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 红外区域测温数据表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/data-eaif-hentity")
|
||||
public class DataEaifHController {
|
||||
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package com.shxy.xyhkcamera.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/modev-eaif-entity")
|
||||
public class ModevEaifController {
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.shxy.xyhkcamera.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 监测设备表
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("modev")
|
||||
public class ModevEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@TableField("modevtid")
|
||||
private Integer modevtid;
|
||||
|
||||
@TableField("address")
|
||||
private Integer address;
|
||||
|
||||
@TableField("frequency")
|
||||
private Integer frequency;
|
||||
|
||||
@TableField("portname")
|
||||
private String portname;
|
||||
|
||||
@TableField("zsbid")
|
||||
private Integer zsbid;
|
||||
|
||||
@TableField("iedid")
|
||||
private Integer iedid;
|
||||
|
||||
@TableField("equipmentmodel")
|
||||
private String equipmentmodel;
|
||||
|
||||
@TableField("manufacture")
|
||||
private String manufacture;
|
||||
|
||||
@TableField("factoryint")
|
||||
private String factoryint;
|
||||
|
||||
@TableField("manufacturedate")
|
||||
private LocalDate manufacturedate;
|
||||
|
||||
@TableField("rundate")
|
||||
private LocalDate rundate;
|
||||
|
||||
@TableField("location")
|
||||
private String location;
|
||||
|
||||
@TableField("note")
|
||||
private String note;
|
||||
|
||||
@TableField("znxjdevid")
|
||||
private String znxjdevid;
|
||||
|
||||
@TableField("ip")
|
||||
private String ip;
|
||||
|
||||
@TableField("username")
|
||||
private String username;
|
||||
|
||||
@TableField("pwd")
|
||||
private String pwd;
|
||||
|
||||
@TableField("port")
|
||||
private String port;
|
||||
|
||||
@TableField("nPresetId")
|
||||
private Integer nPresetId;
|
||||
|
||||
@TableField("nRuleId")
|
||||
private Integer nRuleId;
|
||||
|
||||
@TableField("nMeterType")
|
||||
private Integer nMeterType;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.shxy.xyhkcamera;
|
||||
package com.shxy.xyhkcamera.hk;
|
||||
|
||||
|
||||
import com.sun.jna.*;
|
@ -1,4 +1,4 @@
|
||||
package com.shxy.xyhkcamera;
|
||||
package com.shxy.xyhkcamera.hk;
|
||||
|
||||
import com.sun.jna.Platform;
|
||||
import lombok.extern.slf4j.Slf4j;
|
@ -1,14 +0,0 @@
|
||||
package com.shxy.xyhkcamera.impl;
|
||||
|
||||
import com.shxy.xyhkcamera.service.TempMeasureService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TempMeasureServiceImpl implements TempMeasureService {
|
||||
@Override
|
||||
public void measure() {
|
||||
// hcNetSdkUtil.createSDKInstance();
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.shxy.xyhkcamera.mapper;
|
||||
|
||||
import com.shxy.xyhkcamera.entity.ModevEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 监测设备表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
public interface ModevMapper extends BaseMapper<ModevEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.shxy.xyhkcamera.mapper.ModevMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
package com.shxy.xyhkcamera.service;
|
||||
|
||||
import com.shxy.xyhkcamera.entity.ModevEntity;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 监测设备表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
public interface ModevService extends IService<ModevEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.shxy.xyhkcamera.service.impl;
|
||||
|
||||
import com.shxy.xyhkcamera.entity.ModevEntity;
|
||||
import com.shxy.xyhkcamera.mapper.ModevMapper;
|
||||
import com.shxy.xyhkcamera.service.ModevService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 监测设备表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@Service
|
||||
public class ModevServiceImp extends ServiceImpl<ModevMapper, ModevEntity> implements ModevService {
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.shxy.xyhkcamera.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.shxy.xyhkcamera.entity.ModevEaifEntity;
|
||||
import com.shxy.xyhkcamera.entity.ModevEntity;
|
||||
import com.shxy.xyhkcamera.service.ModevEaifService;
|
||||
import com.shxy.xyhkcamera.service.ModevService;
|
||||
import com.shxy.xyhkcamera.service.TempMeasureService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Wrapper;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TempMeasureServiceImpl implements TempMeasureService {
|
||||
@Autowired
|
||||
ModevServiceImp modevService;
|
||||
|
||||
@Override
|
||||
public void measure() {
|
||||
// hcNetSdkUtil.createSDKInstance();
|
||||
// List<ModevEntity> list = modevService.list(Wrappers.lambdaQuery(ModevEntity.class).eq(ModevEntity::getModevtid, 9));
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
package com.shxy.xyhkcamera.test;
|
||||
|
||||
|
||||
import com.sun.jna.ptr.IntByReference;
|
||||
|
||||
/**
|
||||
* \if ENGLISH_LANG
|
||||
* Capture Picture Interface
|
||||
* contains:local、remote、timer and stop capture picture
|
||||
* \else
|
||||
* 抓图接口实现
|
||||
* 包含: 本地、远程、定时和停止抓图
|
||||
* \endif
|
||||
*/
|
||||
public class CapturePictureModule {
|
||||
/**
|
||||
* \if ENGLISH_LANG
|
||||
* Remote Capture Picture
|
||||
* \else
|
||||
* 远程抓图
|
||||
* \endif
|
||||
*/
|
||||
public static boolean remoteCapturePicture(int chn) {
|
||||
return snapPicture(chn, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* \if ENGLISH_LANG
|
||||
* Timer Capture Picture
|
||||
* \else
|
||||
* 定时抓图
|
||||
* \endif
|
||||
*/
|
||||
public static boolean timerCapturePicture(int chn) {
|
||||
return snapPicture(chn, 1, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* \if ENGLISH_LANG
|
||||
* Stop Timer Capture Picture
|
||||
* \else
|
||||
* 停止定时抓图
|
||||
* \endif
|
||||
*/
|
||||
public static boolean stopCapturePicture(int chn) {
|
||||
return snapPicture(chn, -1, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* \if ENGLISH_LANG
|
||||
* Capture Picture (except local capture picture, others all call this interface)
|
||||
* \else
|
||||
* 抓图 (除本地抓图外, 其他全部调用此接口)
|
||||
* \endif
|
||||
*/
|
||||
private static boolean snapPicture(int chn, int mode, int interval) {
|
||||
// send caputre picture command to device
|
||||
NetSDKLib.SNAP_PARAMS stuSnapParams = new NetSDKLib.SNAP_PARAMS();
|
||||
stuSnapParams.Channel = chn; // channel
|
||||
stuSnapParams.mode = mode; // capture picture mode
|
||||
stuSnapParams.Quality = 3; // picture quality
|
||||
stuSnapParams.InterSnap = interval; // timer capture picture time interval
|
||||
stuSnapParams.CmdSerial = 0; // request serial
|
||||
|
||||
IntByReference reserved = new IntByReference(0);
|
||||
if (!INetSDK.netsdk.CLIENT_SnapPictureEx(INetSDK.m_hLoginHandle, stuSnapParams, reserved)) {
|
||||
System.err.printf("CLIENT_SnapPictureEx Failed!" + INetSDK.netsdk.CLIENT_GetLastError());
|
||||
return false;
|
||||
} else {
|
||||
System.out.println("CLIENT_SnapPictureEx success");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* \if ENGLISH_LANG
|
||||
* Set Capture Picture Callback
|
||||
* \else
|
||||
* 设置抓图回调函数
|
||||
* \endif
|
||||
*/
|
||||
public static void setSnapRevCallBack(NetSDKLib.fSnapRev cbSnapReceive){
|
||||
INetSDK.netsdk.CLIENT_SetSnapRevCallBack(cbSnapReceive, null);
|
||||
}
|
||||
}
|
@ -1,576 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
||||
<NonVisualComponents>
|
||||
<Container class="javax.swing.JFrame" name="jFrame1">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="400" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
</Container>
|
||||
<Container class="javax.swing.JFrame" name="jFrame2">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="400" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
</Container>
|
||||
<Component class="javax.swing.ButtonGroup" name="TypeGroup">
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="3"/>
|
||||
<Property name="title" type="java.lang.String" value="ClientDemo"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="宋体" size="10" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSplitPaneHorizontal" alignment="0" pref="16050" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSplitPaneHorizontal" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JSplitPane" name="jSplitPaneHorizontal">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="dividerLocation" type="int" value="155"/>
|
||||
<Property name="dividerSize" type="int" value="2"/>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanelUserInfo">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder>
|
||||
<Color PropertyName="highlight" blue="ff" green="ff" red="cc" type="rgb"/>
|
||||
</EtchetBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[500, 878]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="left"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabelIPAddress1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
|
||||
<Component id="jTextFieldPwd" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jButtonRealPlay" min="-2" pref="87" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jButtonLogin" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabelPortNumber1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
|
||||
<Component id="jTextFieldPortNumber" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPaneTree" alignment="0" max="32767" attributes="1"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabelPortNumber4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
|
||||
<Component id="nPresetIdTxt" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
|
||||
<Component id="jLabelPortNumber2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLabelPortNumber3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="26" pref="26" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="nRuleId" max="32767" attributes="0"/>
|
||||
<Component id="nMeterType1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="jButton2" alignment="0" min="-2" pref="87" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabelIPAddress" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelPortNumber" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jTextFieldIPAddress" max="32767" attributes="0"/>
|
||||
<Component id="jTextFieldUser" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace pref="20" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabelIPAddress" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTextFieldIPAddress" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabelPortNumber" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTextFieldUser" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="9" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabelIPAddress1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTextFieldPwd" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabelPortNumber1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTextFieldPortNumber" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jButtonLogin" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButtonRealPlay" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="nPresetIdTxt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelPortNumber4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabelPortNumber3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="nMeterType1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="nRuleId" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelPortNumber2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButton2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPaneTree" min="-2" pref="167" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="349" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jButtonRealPlay">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="预览"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonRealPlayActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButtonLogin">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="退出预览"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonLoginActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelIPAddress">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="IP地址:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextFieldUser">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="admin"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextFieldIPAddress">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="192.168.1.108"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelPortNumber">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="用户名:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPaneTree">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTree" name="jTreeDevice">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.tree.TreeModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="this.initialTreeModel()" type="code"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="jButton2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="获取温度"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextFieldPortNumber">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="37777"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelPortNumber1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="端口:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelIPAddress1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="密码:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextFieldPwd">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="admin12345"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldPwdActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelPortNumber2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="规则编号:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="nRuleId">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="0"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelPortNumber3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="测温项类型:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelPortNumber4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="预置点编号:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="nPresetIdTxt">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="0"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="nMeterType1">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="1">
|
||||
<StringItem index="0" value="请选择类型"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JSplitPane" name="jSplitPaneVertical">
|
||||
<Properties>
|
||||
<Property name="dividerLocation" type="int" value="579"/>
|
||||
<Property name="dividerSize" type="int" value="2"/>
|
||||
<Property name="orientation" type="int" value="0"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="right"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanelRealplayArea">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
|
||||
<LineBorder>
|
||||
<Color PropertyName="color" blue="66" green="ff" red="99" type="rgb"/>
|
||||
</LineBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="top"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
|
||||
<Component id="Realplay" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="15366" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
|
||||
<Component id="Realplay" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="49" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="java.awt.Panel" name="Realplay">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[500, 500]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="RealplayMousePressed"/>
|
||||
</Events>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="500" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="500" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jLabel1"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="right"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Container class="java.awt.Panel" name="panel1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="right"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="fTemperStdTxt" min="-2" pref="118" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="fTemperMidTxt" min="-2" pref="118" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="fTemperMinTxt" min="-2" pref="118" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="fTemperMaxTxt" min="-2" pref="118" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="fTemperAverTxt" min="-2" pref="118" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="nTemperUnitTxt" min="-2" pref="118" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="15659" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="59" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="nTemperUnitTxt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="fTemperAverTxt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="fTemperMaxTxt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="fTemperMinTxt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="fTemperMidTxt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="fTemperStdTxt" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="52" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="测温单位:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="nTemperUnitTxt">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="平均温度:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="fTemperAverTxt">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="中间值:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="fTemperMidTxt">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="fTemperMinTxt">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="最小温度:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel7">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="最高温度:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="fTemperMaxTxt">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="fTemperStdTxt">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel8">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="标准方差值:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
File diff suppressed because it is too large
Load Diff
@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="400" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
</Form>
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.shxy.xyhkcamera.test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LENOVO
|
||||
*/
|
||||
public class Login extends javax.swing.JPanel {
|
||||
|
||||
/**
|
||||
* Creates new form Login
|
||||
*/
|
||||
public Login() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 400, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 300, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
@ -1,124 +0,0 @@
|
||||
package com.shxy.xyhkcamera.test;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.CharBuffer;
|
||||
|
||||
import com.sun.jna.Memory;
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Pointer;
|
||||
|
||||
|
||||
/** Provides a temporary allocation of an immutable C string
|
||||
* (<code>const char*</code> or <code>const wchar_t*</code>) for use when
|
||||
* converting a Java String into a native memory function argument.
|
||||
*
|
||||
* @author Todd Fast, todd.fast@sun.com
|
||||
* @author twall@users.sf.net
|
||||
*/
|
||||
public class NativeString implements CharSequence, Comparable<Object> {
|
||||
|
||||
private Pointer pointer;
|
||||
private boolean wide;
|
||||
|
||||
/** Create a native string (NUL-terminated array of <code>char</code>).<p>
|
||||
* If the system property <code>jna.encoding</code> is set, its value will
|
||||
* be used to encode the native string. If not set or if the encoding
|
||||
* is unavailable, the default platform encoding will be used.
|
||||
*/
|
||||
public NativeString(String string) {
|
||||
this(string, false);
|
||||
}
|
||||
|
||||
/** Create a native string as a NUL-terminated array of <code>wchar_t</code>
|
||||
* (if <code>wide</code> is true) or <code>char</code>.<p>
|
||||
* If the system property <code>jna.encoding</code> is set, its value will
|
||||
* be used to encode the native <code>char</code>string.
|
||||
* If not set or if the encoding is unavailable, the default platform
|
||||
* encoding will be used.
|
||||
*
|
||||
* @param string value to write to native memory
|
||||
* @param wide whether to store the String as <code>wchar_t</code>
|
||||
*/
|
||||
public NativeString(String string, boolean wide) {
|
||||
if (string == null) {
|
||||
throw new NullPointerException("String must not be null");
|
||||
}
|
||||
// Allocate the memory to hold the string. Note, we have to
|
||||
// make this 1 element longer in order to accommodate the terminating
|
||||
// NUL (which is generated in Pointer.setString()).
|
||||
this.wide = wide;
|
||||
if (wide) {
|
||||
int len = (string.length() + 1 ) * Native.WCHAR_SIZE;
|
||||
pointer = new Memory(len);
|
||||
pointer.setString(0, string, true);
|
||||
}
|
||||
else {
|
||||
byte[] data = getBytes(string);
|
||||
pointer = new Memory(data.length + 1);
|
||||
pointer.write(0, data, 0, data.length);
|
||||
pointer.setByte(data.length, (byte)0);
|
||||
}
|
||||
}
|
||||
|
||||
static byte[] getBytes(String s) {
|
||||
try {
|
||||
return getBytes(s, System.getProperty("jna.encoding"));
|
||||
}
|
||||
catch (UnsupportedEncodingException e) {
|
||||
return s.getBytes();
|
||||
}
|
||||
}
|
||||
|
||||
/** Return a byte array corresponding to the given String, using the given
|
||||
encoding.
|
||||
*/
|
||||
static byte[] getBytes(String s, String encoding) throws UnsupportedEncodingException {
|
||||
if (encoding != null) {
|
||||
return s.getBytes(encoding);
|
||||
}
|
||||
return s.getBytes();
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return toString().hashCode();
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
|
||||
if (other instanceof CharSequence) {
|
||||
return compareTo(other) == 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String s = wide ? "const wchar_t*" : "const char*";
|
||||
s += "(" + pointer.getString(0, wide) + ")";
|
||||
return s;
|
||||
}
|
||||
|
||||
public Pointer getPointer() {
|
||||
return pointer;
|
||||
}
|
||||
|
||||
public char charAt(int index) {
|
||||
return toString().charAt(index);
|
||||
}
|
||||
|
||||
public int length() {
|
||||
return toString().length();
|
||||
}
|
||||
|
||||
public CharSequence subSequence(int start, int end) {
|
||||
return CharBuffer.wrap(toString()).subSequence(start, end);
|
||||
}
|
||||
|
||||
public int compareTo(Object other) {
|
||||
|
||||
if (other == null)
|
||||
return 1;
|
||||
|
||||
return toString().compareTo(other.toString());
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,724 +0,0 @@
|
||||
package com.shxy.xyhkcamera.test;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
|
||||
public final class Res {
|
||||
|
||||
private ResourceBundle bundle;
|
||||
|
||||
private Res() {
|
||||
switchLanguage(LanguageType.Chinese);
|
||||
}
|
||||
|
||||
private static class StringBundleHolder {
|
||||
private static Res instance = new Res();
|
||||
}
|
||||
|
||||
public static Res string() {
|
||||
return StringBundleHolder.instance;
|
||||
}
|
||||
|
||||
public static enum LanguageType {
|
||||
English,
|
||||
Chinese
|
||||
}
|
||||
|
||||
public ResourceBundle getBundle() {
|
||||
return bundle;
|
||||
}
|
||||
|
||||
/**
|
||||
* \if ENGLISH_LANG
|
||||
* Switch between Chinese and English
|
||||
* \else
|
||||
* 中英文切换
|
||||
* \endif
|
||||
*/
|
||||
public void switchLanguage(LanguageType type) {
|
||||
switch(type) {
|
||||
case Chinese:
|
||||
bundle = ResourceBundle.getBundle("res", new Locale("zh", "CN"));
|
||||
break;
|
||||
case English:
|
||||
bundle = ResourceBundle.getBundle("res", new Locale("en", "US"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public String getSwitchLanguage() {
|
||||
return bundle.getString("SWITCH_LANGUAGE");
|
||||
}
|
||||
|
||||
public String getRealplay() {
|
||||
return bundle.getString("REALPLAY");
|
||||
}
|
||||
|
||||
public String getDownloadRecord() {
|
||||
return bundle.getString("DOWNLOAD_RECORD");
|
||||
}
|
||||
|
||||
public String getITSEvent() {
|
||||
return bundle.getString("ITS_EVENT");
|
||||
}
|
||||
|
||||
public String getOnline() {
|
||||
return bundle.getString("ONLINE");
|
||||
}
|
||||
|
||||
public String getDisConnectReconnecting() {
|
||||
return bundle.getString("DISCONNECT_RECONNECTING");
|
||||
}
|
||||
|
||||
public String getDisconnectLoginAgain() {
|
||||
return bundle.getString("DISCONNECT_LOGIN_AGAIN");
|
||||
}
|
||||
public String getPromptMessage() {
|
||||
return bundle.getString("PROMPT_MESSAGE");
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return bundle.getString("ERROR_MESSAGE");
|
||||
}
|
||||
|
||||
public String getReconnectSucceed() {
|
||||
return bundle.getString("RECONNECT_SUCCEED");
|
||||
}
|
||||
|
||||
public String getSucceed() {
|
||||
return bundle.getString("SUCCEED");
|
||||
}
|
||||
|
||||
public String getFailed() {
|
||||
return bundle.getString("Failed");
|
||||
}
|
||||
|
||||
public String getYear() {
|
||||
return bundle.getString("YEAR");
|
||||
}
|
||||
|
||||
public String getMonth() {
|
||||
return bundle.getString("MONTH");
|
||||
}
|
||||
|
||||
public String getDay() {
|
||||
return bundle.getString("DAY");
|
||||
}
|
||||
|
||||
public String getHour() {
|
||||
return bundle.getString("HOUR");
|
||||
}
|
||||
|
||||
public String getMinute() {
|
||||
return bundle.getString("MINUTE");
|
||||
}
|
||||
|
||||
public String getSecond() {
|
||||
return bundle.getString("SECOND");
|
||||
}
|
||||
|
||||
public String getSunday() {
|
||||
return bundle.getString("SUNDAY");
|
||||
}
|
||||
|
||||
public String getMonday() {
|
||||
return bundle.getString("MONDAY");
|
||||
}
|
||||
|
||||
public String getTuesday() {
|
||||
return bundle.getString("TUESDAY");
|
||||
}
|
||||
|
||||
public String getWednesday() {
|
||||
return bundle.getString("WEDNESDAY");
|
||||
}
|
||||
|
||||
public String getThursday() {
|
||||
return bundle.getString("THURSDAY");
|
||||
}
|
||||
|
||||
public String getFriday() {
|
||||
return bundle.getString("FRIDAY");
|
||||
}
|
||||
|
||||
public String getSaturday() {
|
||||
return bundle.getString("SATURDAY");
|
||||
}
|
||||
|
||||
public String[] getWeek() {
|
||||
String[] weekdays = {getSunday(),
|
||||
getMonday(),
|
||||
getTuesday(),
|
||||
getWednesday(),
|
||||
getThursday(),
|
||||
getFriday(),
|
||||
getSaturday()
|
||||
};
|
||||
|
||||
return weekdays;
|
||||
}
|
||||
|
||||
public String getConfirm() {
|
||||
return bundle.getString("CONFIRM");
|
||||
}
|
||||
|
||||
public String getCancel() {
|
||||
return bundle.getString("CANCEL");
|
||||
}
|
||||
|
||||
public String getDateChooser() {
|
||||
return bundle.getString("DATE_CHOOSER");
|
||||
}
|
||||
|
||||
public String getFunctionList() {
|
||||
return bundle.getString("FUNCTIONLIST");
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录设备设备错误状态
|
||||
*/
|
||||
public String getErrorCode(int err) {
|
||||
String msg = "";
|
||||
switch(err) {
|
||||
case NetSDKLib.NET_INVALID_HANDLE:
|
||||
msg = bundle.getString("NET_INVALID_HANDLE");
|
||||
break;
|
||||
case NetSDKLib.NET_USER_FLASEPWD_TRYTIME:
|
||||
msg = bundle.getString("NET_USER_FLASEPWD_TRYTIME");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_PASSWORD:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_PASSWORD");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_USER:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_USER");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_TIMEOUT:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_TIMEOUT");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_RELOGGIN:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_RELOGGIN");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_LOCKED:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_LOCKED");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_BLACKLIST:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_BLACKLIST");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_BUSY:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_BUSY");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_CONNECT:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_CONNECT");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_NETWORK:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_NETWORK");
|
||||
break;
|
||||
case NetSDKLib.NET_NO_RECORD_FOUND:
|
||||
msg = bundle.getString("NET_NO_RECORD_FOUND");
|
||||
break;
|
||||
case NetSDKLib.NET_OPEN_FILE_ERROR:
|
||||
msg = bundle.getString("NET_OPEN_FILE_ERROR");
|
||||
break;
|
||||
case NetSDKLib.NET_ERROR:
|
||||
msg = bundle.getString("NET_ERROR");
|
||||
break;
|
||||
case NetSDKLib.NET_RETURN_DATA_ERROR:
|
||||
msg = bundle.getString("NET_RETURN_DATA_ERROR");
|
||||
break;
|
||||
case NetSDKLib.NET_LOGIN_ERROR_USER_OR_PASSOWRD:
|
||||
msg = bundle.getString("NET_LOGIN_ERROR_USER_OR_PASSOWRD");
|
||||
break;
|
||||
default:
|
||||
msg = bundle.getString("NET_ERROR");
|
||||
break;
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
public String getLogin() {
|
||||
return bundle.getString("LOGIN");
|
||||
}
|
||||
|
||||
public String getLogout() {
|
||||
return bundle.getString("LOGOUT");
|
||||
}
|
||||
|
||||
public String getDeviceIp() {
|
||||
return bundle.getString("DEVICE_IP");
|
||||
}
|
||||
|
||||
public String getPort() {
|
||||
return bundle.getString("DEVICE_PORT");
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return bundle.getString("USERNAME");
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return bundle.getString("PASSWORD");
|
||||
}
|
||||
|
||||
|
||||
public String getLoginFailed() {
|
||||
return bundle.getString("LOGIN_FAILED");
|
||||
}
|
||||
|
||||
public String getInputDeviceIP() {
|
||||
return bundle.getString("PLEASE_INPUT_DEVICE_IP");
|
||||
}
|
||||
|
||||
public String getInputDevicePort() {
|
||||
return bundle.getString("PLEASE_INPUT_DEVICE_PORT");
|
||||
}
|
||||
|
||||
public String getInputUsername() {
|
||||
return bundle.getString("PLEASE_INPUT_DEVICE_USERNAME");
|
||||
}
|
||||
|
||||
public String getInputPassword() {
|
||||
return bundle.getString("PLEASE_INPUT_DEVICE_PASSWORD");
|
||||
}
|
||||
|
||||
public String getStartRealPlay() {
|
||||
return bundle.getString("START_REALPLAY");
|
||||
}
|
||||
|
||||
public String getStopRealPlay() {
|
||||
return bundle.getString("STOP_REALPLAY");
|
||||
}
|
||||
|
||||
public String getChannel() {
|
||||
return bundle.getString("CHANNEL");
|
||||
}
|
||||
|
||||
public String getStreamType() {
|
||||
return bundle.getString("STREAM_TYPE");
|
||||
}
|
||||
|
||||
public String getMasterAndSub() {
|
||||
return bundle.getString("MASTER_AND_SUB_STREAM");
|
||||
}
|
||||
|
||||
public String getMasterStream() {
|
||||
return bundle.getString("MASTER_STREAM");
|
||||
}
|
||||
|
||||
public String getSubStream() {
|
||||
return bundle.getString("SUB_STREAM");
|
||||
}
|
||||
|
||||
public String getSnap() {
|
||||
return bundle.getString("SNAP");
|
||||
}
|
||||
|
||||
public String getSnapPicture() {
|
||||
return bundle.getString("SNAP_PICTURE");
|
||||
}
|
||||
|
||||
public String getPTZControl() {
|
||||
return bundle.getString("PTZ_CONTROL");
|
||||
}
|
||||
|
||||
public String getLeftUp() {
|
||||
return bundle.getString("LEFT_UP");
|
||||
}
|
||||
|
||||
public String getUp() {
|
||||
return bundle.getString("UP");
|
||||
}
|
||||
|
||||
public String getRightUp() {
|
||||
return bundle.getString("RIGHT_UP");
|
||||
}
|
||||
|
||||
public String getLeft() {
|
||||
return bundle.getString("LEFT");
|
||||
}
|
||||
|
||||
public String getRight() {
|
||||
return bundle.getString("RIGHT");
|
||||
}
|
||||
|
||||
public String getLeftDown() {
|
||||
return bundle.getString("LEFT_DOWN");
|
||||
}
|
||||
|
||||
public String getDown() {
|
||||
return bundle.getString("DOWN");
|
||||
}
|
||||
|
||||
public String getRightDown() {
|
||||
return bundle.getString("RIGHT_DOWN");
|
||||
}
|
||||
|
||||
public String getSpeed() {
|
||||
return bundle.getString("SPEED");
|
||||
}
|
||||
|
||||
public String getZoomAdd() {
|
||||
return bundle.getString("ZOOM_ADD");
|
||||
}
|
||||
|
||||
public String getZoomDec() {
|
||||
return bundle.getString("ZOOM_DEC");
|
||||
}
|
||||
|
||||
public String getFocusAdd() {
|
||||
return bundle.getString("FOCUS_ADD");
|
||||
}
|
||||
|
||||
public String getFocusDec() {
|
||||
return bundle.getString("FOCUS_DEC");
|
||||
}
|
||||
|
||||
public String getIrisAdd() {
|
||||
return bundle.getString("IRIS_ADD");
|
||||
}
|
||||
|
||||
public String getIrisDec() {
|
||||
return bundle.getString("IRIS_DEC");
|
||||
}
|
||||
|
||||
public String getIndex() {
|
||||
return bundle.getString("INDEX");
|
||||
}
|
||||
|
||||
public String getEventPicture() {
|
||||
return bundle.getString("EVENT_PICTURE");
|
||||
}
|
||||
|
||||
public String getPlatePicture() {
|
||||
return bundle.getString("PLATE_PICTURE");
|
||||
}
|
||||
|
||||
public String getEventName() {
|
||||
return bundle.getString("EVENT_NAME");
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return bundle.getString("LICENSE_PLATE");
|
||||
}
|
||||
|
||||
public String getEventTime() {
|
||||
return bundle.getString("EVENT_TIME");
|
||||
}
|
||||
|
||||
public String getPlateType() {
|
||||
return bundle.getString("PLATE_TYPE");
|
||||
}
|
||||
|
||||
public String getPlateColor() {
|
||||
return bundle.getString("PLATE_COLOR");
|
||||
}
|
||||
|
||||
public String getVehicleColor() {
|
||||
return bundle.getString("VEHICLE_COLOR");
|
||||
}
|
||||
|
||||
public String getVehicleType() {
|
||||
return bundle.getString("VEHICLE_TYPE");
|
||||
}
|
||||
|
||||
public String getVehicleSize() {
|
||||
return bundle.getString("VEHICLE_SIZE");
|
||||
}
|
||||
|
||||
public String getFileCount() {
|
||||
return bundle.getString("FILE_COUNT");
|
||||
}
|
||||
|
||||
public String getFileIndex() {
|
||||
return bundle.getString("FILE_INDEX");
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return bundle.getString("GROUP_ID");
|
||||
}
|
||||
|
||||
public String getIllegalPlace() {
|
||||
return bundle.getString("ILLEGAL_PLACE");
|
||||
}
|
||||
|
||||
public String getLaneNumber() {
|
||||
return bundle.getString("LANE_NUMBER");
|
||||
}
|
||||
|
||||
public String getEventInfo() {
|
||||
return bundle.getString("EVENT_INFO");
|
||||
}
|
||||
|
||||
public String getNoPlate() {
|
||||
return bundle.getString("NO_PLATENUMBER");
|
||||
}
|
||||
|
||||
public String[] getTrafficTableName() {
|
||||
String[] name = {getIndex(),
|
||||
getEventName(),
|
||||
getLicensePlate(),
|
||||
getEventTime(),
|
||||
getPlateType(),
|
||||
getPlateColor(),
|
||||
getVehicleColor(),
|
||||
getVehicleType(),
|
||||
getVehicleSize(),
|
||||
getFileCount(),
|
||||
getFileIndex(),
|
||||
getGroupId(),
|
||||
getIllegalPlace(),
|
||||
getLaneNumber()};
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getOperate() {
|
||||
return bundle.getString("OPERATE");
|
||||
}
|
||||
|
||||
public String getAttach() {
|
||||
return bundle.getString("ATTACH");
|
||||
}
|
||||
|
||||
public String getDetach() {
|
||||
return bundle.getString("DETACH");
|
||||
}
|
||||
|
||||
public String getOpenStrobe() {
|
||||
return bundle.getString("OPEN_STROBE");
|
||||
}
|
||||
|
||||
public String getCloseStrobe() {
|
||||
return bundle.getString("CLOSE_STROBE");
|
||||
}
|
||||
|
||||
public String getOpenStrobeFailed() {
|
||||
return bundle.getString("OPEN_STROBE_FAILED");
|
||||
}
|
||||
|
||||
public String getManualCapture() {
|
||||
return bundle.getString("MANUAL_CAPTURE");
|
||||
}
|
||||
|
||||
public String getManualCaptureSucceed() {
|
||||
return bundle.getString("MANUALSNAP_SUCCEED");
|
||||
}
|
||||
|
||||
public String getManualCaptureFailed() {
|
||||
return bundle.getString("MANUALSNAP_FAILED");
|
||||
}
|
||||
|
||||
/*
|
||||
* 车辆大小对照表
|
||||
*/
|
||||
public String getTrafficSize(int nVehicleSize) {
|
||||
String vehicleClass = "";
|
||||
for(int i = 0; i < 5; i++) {
|
||||
if( ((byte)nVehicleSize & (1 << i)) > 0 ) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
vehicleClass = bundle.getString("LIGHT_DUTY");
|
||||
break;
|
||||
case 1:
|
||||
vehicleClass = bundle.getString("MEDIUM");
|
||||
break;
|
||||
case 2:
|
||||
vehicleClass = bundle.getString("OVER_SIZE");
|
||||
break;
|
||||
case 3:
|
||||
vehicleClass = bundle.getString("MINI_SIZE");
|
||||
break;
|
||||
case 4:
|
||||
vehicleClass = bundle.getString("LARGE_SIZE");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return vehicleClass;
|
||||
}
|
||||
|
||||
/*
|
||||
* 获取事件名称
|
||||
*/
|
||||
public String getEventName(int type) {
|
||||
String name = "";
|
||||
switch (type) {
|
||||
case NetSDKLib.EVENT_IVS_TRAFFICJUNCTION: ///< 交通路口事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFICJUNCTION");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_RUNREDLIGHT: ///< 闯红灯事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_RUNREDLIGHT");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_OVERLINE: ///< 压车道线事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_OVERLINE");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_RETROGRADE: ///< 逆行事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_RETROGRADE");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_TURNLEFT: ///< 违章左转
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_TURNLEFT");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_TURNRIGHT: ///< 违章右转
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_TURNRIGHT");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_UTURN: ///< 违章掉头
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_UTURN");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_OVERSPEED: ///< 超速
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_OVERSPEED");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_UNDERSPEED: ///< 低速
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_UNDERSPEED");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_PARKING: ///< 违章停车
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_PARKING");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_WRONGROUTE: ///< 不按车道行驶
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_WRONGROUTE");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_CROSSLANE: ///< 违章变道
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_CROSSLANE");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_OVERYELLOWLINE: ///< 压黄线
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_OVERYELLOWLINE");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_YELLOWPLATEINLANE: ///< 黄牌车占道事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_YELLOWPLATEINLANE");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_PEDESTRAINPRIORITY: ///< 斑马线行人优先事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_PEDESTRAINPRIORITY");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_MANUALSNAP: ///< 交通手动抓拍事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_MANUALSNAP");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_VEHICLEINROUTE: ///< 有车占道事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_VEHICLEINROUTE");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_VEHICLEINBUSROUTE: ///< 占用公交车道事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_VEHICLEINBUSROUTE");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_BACKING: ///< 违章倒车事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_BACKING");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_PARKINGSPACEPARKING: ///< 车位有车事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_PARKINGSPACEPARKING");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_PARKINGSPACENOPARKING: ///< 车位无车事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_PARKINGSPACENOPARKING");
|
||||
break;
|
||||
case NetSDKLib.EVENT_IVS_TRAFFIC_WITHOUT_SAFEBELT: ///< 交通未系安全带事件
|
||||
name = bundle.getString("EVENT_IVS_TRAFFIC_WITHOUT_SAFEBELT");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getRecordType() {
|
||||
return bundle.getString("RECORD_TYPE");
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return bundle.getString("START_TIME");
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return bundle.getString("END_TIME");
|
||||
}
|
||||
|
||||
public String[] getDownloadTableName() {
|
||||
String[] name = {getIndex(),
|
||||
getChannel(),
|
||||
getRecordType(),
|
||||
getStartTime(),
|
||||
getEndTime()};
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getDownloadByFile() {
|
||||
return bundle.getString("DOWNLOAD_RECORD_BYFILE");
|
||||
}
|
||||
|
||||
public String getQuery() {
|
||||
return bundle.getString("QUERY");
|
||||
}
|
||||
|
||||
public String getDownload() {
|
||||
return bundle.getString("DOWNLOAD");
|
||||
}
|
||||
|
||||
public String getStopDownload() {
|
||||
return bundle.getString("STOP_DOWNLOAD");
|
||||
}
|
||||
|
||||
public String getDownloadByTime() {
|
||||
return bundle.getString("DOWNLOAD_RECORD_BYTIME");
|
||||
}
|
||||
|
||||
public String getSelectTimeAgain() {
|
||||
return bundle.getString("PLEASE_SELECT_TIME_AGAIN");
|
||||
}
|
||||
|
||||
public String getSelectRowWithData() {
|
||||
return bundle.getString("PLEASE_FIRST_SELECT_ROW_WITH_DATA");
|
||||
}
|
||||
|
||||
public String getQueryRecord() {
|
||||
return bundle.getString("PLEASE_FIRST_QUERY_RECORD");
|
||||
}
|
||||
|
||||
public String getDownloadCompleted() {
|
||||
return bundle.getString("DOWNLOAD_COMPLETED");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取录像类型
|
||||
*/
|
||||
public String getRecordTypeStr(int nRecordFileType) {
|
||||
String recordTypeStr = "";
|
||||
switch(nRecordFileType) {
|
||||
case 0:
|
||||
recordTypeStr = bundle.getString("GENERAL_RECORD");
|
||||
break;
|
||||
case 1:
|
||||
recordTypeStr = bundle.getString("ALARM_RECORD");
|
||||
break;
|
||||
case 2:
|
||||
recordTypeStr = bundle.getString("MOTION_DETECTION");
|
||||
break;
|
||||
case 3:
|
||||
recordTypeStr = bundle.getString("CARD_NUMBER_RECORD");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return recordTypeStr;
|
||||
}
|
||||
|
||||
public int getRecordTypeInt(String recordFileStr) {
|
||||
int recordType = -1;
|
||||
if(recordFileStr.equals(bundle.getString("GENERAL_RECORD"))) {
|
||||
recordType = 0;
|
||||
} else if(recordFileStr.equals(bundle.getString("ALARM_RECORD"))) {
|
||||
recordType = 1;
|
||||
} else if(recordFileStr.equals(bundle.getString("MOTION_DETECTION"))) {
|
||||
recordType = 2;
|
||||
} else if(recordFileStr.equals(bundle.getString("CARD_NUMBER_RECORD"))) {
|
||||
recordType = 3;
|
||||
}
|
||||
|
||||
return recordType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,75 +0,0 @@
|
||||
package com.shxy.xyhkcamera.test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
||||
public class SavePath {
|
||||
private SavePath() {}
|
||||
|
||||
private static class SavePathHolder {
|
||||
private static SavePath instance = new SavePath();
|
||||
}
|
||||
|
||||
public static SavePath getSavePath() {
|
||||
return SavePathHolder.instance;
|
||||
}
|
||||
|
||||
String s_captureSavePath = "./Capture/" + ToolKits.getDate() + "/"; // 抓拍图片保存路径
|
||||
String s_imageSavePath = "./Image/" + ToolKits.getDate() + "/"; // 图片保存路径
|
||||
String s_recordFileSavePath = "./RecordFile/" + ToolKits.getDate() + "/"; // 录像保存路径
|
||||
|
||||
/*
|
||||
* 设置抓图保存路径
|
||||
*/
|
||||
public String getSaveSnapPath() {
|
||||
File path1 = new File("./Capture/");
|
||||
if (!path1.exists()) {
|
||||
path1.mkdir();
|
||||
}
|
||||
|
||||
File path2 = new File(s_captureSavePath);
|
||||
if (!path2.exists()) {
|
||||
path2.mkdir();
|
||||
}
|
||||
|
||||
String strFileName = s_captureSavePath + ToolKits.getDate() + ".jpg";
|
||||
|
||||
return strFileName;
|
||||
}
|
||||
|
||||
/*
|
||||
* 设置智能交通图片保存路径
|
||||
*/
|
||||
public String getSaveTrafficImagePath() {
|
||||
File path1 = new File("./Image/");
|
||||
if (!path1.exists()) {
|
||||
path1.mkdir();
|
||||
}
|
||||
|
||||
File path = new File(s_imageSavePath);
|
||||
if (!path.exists()) {
|
||||
path.mkdir();
|
||||
}
|
||||
|
||||
return s_imageSavePath;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 设置录像保存路径
|
||||
*/
|
||||
public String getSaveRecordFilePath() {
|
||||
File path1 = new File("./RecordFile/");
|
||||
if (!path1.exists()) {
|
||||
path1.mkdir();
|
||||
}
|
||||
|
||||
File path2 = new File(s_recordFileSavePath);
|
||||
if (!path2.exists()) {
|
||||
path2.mkdir();
|
||||
}
|
||||
String SavedFileName = s_recordFileSavePath + ToolKits.getDate() + ".dav"; // 默认保存路径
|
||||
return SavedFileName;
|
||||
}
|
||||
|
||||
}
|
@ -1,194 +0,0 @@
|
||||
package com.shxy.xyhkcamera.test;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.Structure;
|
||||
|
||||
public class ToolKits {
|
||||
/***************************************************************************************************
|
||||
* 工具方法 *
|
||||
***************************************************************************************************/
|
||||
public static void GetPointerData(Pointer pNativeData, Structure pJavaStu) {
|
||||
GetPointerDataToStruct(pNativeData, 0, pJavaStu);
|
||||
}
|
||||
|
||||
public static void GetPointerDataToStruct(Pointer pNativeData, long OffsetOfpNativeData, Structure pJavaStu) {
|
||||
pJavaStu.write();
|
||||
Pointer pJavaMem = pJavaStu.getPointer();
|
||||
pJavaMem.write(0, pNativeData.getByteArray(OffsetOfpNativeData, pJavaStu.size()), 0, pJavaStu.size());
|
||||
pJavaStu.read();
|
||||
}
|
||||
|
||||
public static void GetPointerDataToStructArr(Pointer pNativeData, Structure[] pJavaStuArr) {
|
||||
long offset = 0;
|
||||
for (int i = 0; i < pJavaStuArr.length; ++i) {
|
||||
GetPointerDataToStruct(pNativeData, offset, pJavaStuArr[i]);
|
||||
offset += pJavaStuArr[i].size();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将结构体数组拷贝到内存
|
||||
*
|
||||
* @param pNativeData
|
||||
* @param pJavaStuArr
|
||||
*/
|
||||
public static void SetStructArrToPointerData(Structure[] pJavaStuArr, Pointer pNativeData) {
|
||||
long offset = 0;
|
||||
for (int i = 0; i < pJavaStuArr.length; ++i) {
|
||||
SetStructDataToPointer(pJavaStuArr[i], pNativeData, offset);
|
||||
offset += pJavaStuArr[i].size();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetStructDataToPointer(Structure pJavaStu, Pointer pNativeData, long OffsetOfpNativeData) {
|
||||
pJavaStu.write();
|
||||
Pointer pJavaMem = pJavaStu.getPointer();
|
||||
pNativeData.write(OffsetOfpNativeData, pJavaMem.getByteArray(0, pJavaStu.size()), 0, pJavaStu.size());
|
||||
}
|
||||
|
||||
public static void savePicture(byte[] pBuf, String sDstFile) {
|
||||
try {
|
||||
FileOutputStream fos = new FileOutputStream(sDstFile);
|
||||
fos.write(pBuf);
|
||||
fos.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void savePicture(byte[] pBuf, int dwBufOffset, int dwBufSize, String sDstFile) {
|
||||
try {
|
||||
FileOutputStream fos = new FileOutputStream(sDstFile);
|
||||
fos.write(pBuf, dwBufOffset, dwBufSize);
|
||||
fos.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void savePicture(Pointer pBuf, int dwBufSize, String sDstFile) {
|
||||
try {
|
||||
FileOutputStream fos = new FileOutputStream(sDstFile);
|
||||
fos.write(pBuf.getByteArray(0, dwBufSize), 0, dwBufSize);
|
||||
fos.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void savePicture(Pointer pBuf, int dwBufOffset, int dwBufSize, String sDstFile) {
|
||||
try {
|
||||
FileOutputStream fos = new FileOutputStream(sDstFile);
|
||||
fos.write(pBuf.getByteArray(dwBufOffset, dwBufSize), 0, dwBufSize);
|
||||
fos.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
// 将Pointer值转为byte[]
|
||||
public static String GetPointerDataToByteArr(Pointer pointer) {
|
||||
String str = "";
|
||||
if (pointer == null) {
|
||||
return str;
|
||||
}
|
||||
|
||||
int length = 0;
|
||||
byte[] bufferPlace = new byte[1];
|
||||
|
||||
for (int i = 0; i < 2048; i++) {
|
||||
pointer.read(i, bufferPlace, 0, 1);
|
||||
if (bufferPlace[0] == '\0') {
|
||||
length = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (length > 0) {
|
||||
byte[] buffer = new byte[length];
|
||||
pointer.read(0, buffer, 0, length);
|
||||
try {
|
||||
str = new String(buffer, "GBK").trim();
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// 获取当前时间
|
||||
public static String getDate() {
|
||||
SimpleDateFormat simpleDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String date = simpleDate.format(new java.util.Date()).replace(" ", "_").replace(":", "-");
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
// 限制JTextField 长度,以及内容
|
||||
public static void limitTextFieldLength(final JTextField jTextField, final int size) {
|
||||
jTextField.addKeyListener(new KeyListener() {
|
||||
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
String number = "0123456789" + (char) 8;
|
||||
if (number.indexOf(e.getKeyChar()) < 0 || jTextField.getText().trim().length() >= size) {
|
||||
e.consume();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyReleased(KeyEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyPressed(KeyEvent e) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取当前窗口
|
||||
public static JFrame getFrame(ActionEvent e) {
|
||||
JButton btn = (JButton) e.getSource();
|
||||
JFrame frame = (JFrame) btn.getRootPane().getParent();
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
// 获取操作平台信息
|
||||
public static String getLoadLibrary(String library) {
|
||||
String path = "";
|
||||
String os = System.getProperty("os.name");
|
||||
if (os.toLowerCase().startsWith("win")) {
|
||||
path = "./libs/";
|
||||
} else if (os.toLowerCase().startsWith("linux")) {
|
||||
path = "";
|
||||
}
|
||||
|
||||
return (path + library);
|
||||
}
|
||||
|
||||
public static String getOsName() {
|
||||
String osName = "";
|
||||
String os = System.getProperty("os.name");
|
||||
if (os.toLowerCase().startsWith("win")) {
|
||||
osName = "win";
|
||||
} else if (os.toLowerCase().startsWith("linux")) {
|
||||
osName = "linux";
|
||||
}
|
||||
|
||||
return osName;
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.shxy.xyhkcamera.test;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
import com.sun.jna.Platform;
|
||||
|
||||
public class Utils {
|
||||
public Utils() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 读取当前目录下的路径配置文件
|
||||
public static String readConfigProperties(String key) {
|
||||
Properties properties = new Properties();
|
||||
String rootPath = System.getProperty("user.dir").replace("\\", "/"); // 获取当前目录
|
||||
FileInputStream inputStream = null;
|
||||
try {
|
||||
inputStream = new FileInputStream(rootPath + "/config.properties");
|
||||
properties.load(inputStream);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return properties.getProperty(key);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.shxy.xyhkcamera.utils;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @create 2022-01-19-16:40
|
||||
*/
|
||||
public class osSelect {
|
||||
|
||||
public static boolean isLinux() {
|
||||
return System.getProperty("os.name").toLowerCase().contains("linux");
|
||||
}
|
||||
|
||||
public static boolean isWindows() {
|
||||
return System.getProperty("os.name").toLowerCase().contains("windows");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue