From 06eff2094e17b8ed3452e44a6d77b729a7621919 Mon Sep 17 00:00:00 2001 From: qin <a@163.com> Date: 星期四, 06 三月 2025 14:08:28 +0800 Subject: [PATCH] 智能盒子迁移.net core --- WinFrmUI/IBox.WinFrmUI/Model/Global.cs | 13 WinFrmUI/IBox.WinFrmUI/ViewModel/dModbus.cs | 131 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/RunStatus.cs | 30 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/DataStatus.cs | 94 WinFrmUI/IBox.WinFrmUI/Model/DataGridMonitorViewModel.cs | 44 WinFrmUI/IBox.WinFrmUI/Model/SimuViewModel.cs | 40 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.resx | 120 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.Designer.cs | 320 WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/GetBySignalIDOfDayRangeModel.cs | 15 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.resx | 120 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDataStatus.cs | 41 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.Designer.cs | 194 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.cs | 378 + WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/GetAlarmByDayModel.cs | 9 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.Designer.cs | 188 WinFrmUI/IBox.WinFrmUI/Model/TemplateStoreViewModel.cs | 7 WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.resx | 120 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.Designer.cs | 434 + WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/ConstParas.cs | 18 WinFrmUI/IBox.WinFrmUI/Model/SystemInfoViewModel.cs | 22 WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.Designer.cs | 543 + WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDeleteOps.cs | 18 WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorStepRecord.cs | 31 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.Designer.cs | 901 ++ WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.cs | 57 WinFrmUI/IBox.WinFrmUI/Model/PumpRunStatusViewModel.cs | 25 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.cs | 39 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/SignalType.cs | 302 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/DataType.cs | 44 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.resx | 120 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.resx | 120 WinFrmUI/IBox.WinFrmUI/Model/CalcUnitViewModel.cs | 17 WinFrmUI/IBox.WinFrmUI/ViewModel/09-station-monitor-list/dto/StationMonitorListGroupMobileDto.cs | 40 WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorHistoryQuery.cs | 9 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.resx | 120 WinFrmUI/IBox.WinFrmUI/Model/GetCalcValueModel.cs | 19 WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPointExSignalList.cs | 40 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/Flags.cs | 31 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.resx | 120 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.cs | 267 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.resx | 147 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.cs | 706 + WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eSourceType.cs | 35 WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorValueAlarmRecord.cs | 108 WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.cs | 28 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.cs | 376 + WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.cs | 35 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDockingMode.cs | 40 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.resx | 120 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.Designer.cs | 635 + WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/Formula.cs | 242 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.resx | 120 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eCronType.cs | 41 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.resx | 123 WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/Signal.cs | 178 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.Designer.cs | 619 + WinFrmUI/IBox.WinFrmUI/Model/CalcValue.cs | 53 WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPoint_Signal_SignalType.cs | 38 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.Designer.cs | 134 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.cs | 35 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.cs | 35 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.cs | 385 + WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj.user | 63 WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.cs | 136 WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRealStepRecord.cs | 12 WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRecord.cs | 67 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.resx | 120 WinFrmUI/IBox.WinFrmUI/Model/IBoxProtocolViewModel.cs | 63 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.resx | 166 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.resx | 126 WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.cs | 65 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.Designer.cs | 134 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.Designer.cs | 134 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eFormatType.cs | 46 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.cs | 584 + WinFrmUI/IBox.WinFrmUI/Model/CalcResultViewModel.cs | 22 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.resx | 120 WinFrmUI/IBox.WinFrmUI/ViewModel/09-station-monitor-list/dto/StationMonitorListItemMobileDto.cs | 73 WinFrmUI/IBox.WinFrmUI/BluetoothHelper.cs | 385 + WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.resx | 120 WinFrmUI/IBox.WinFrmUI/Model/PumpEnergyViewModel.cs | 16 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.resx | 123 WinFrmUI/IBox.WinFrmUI/IBoxForm.Designer.cs | 603 + WinFrmUI/IBox.WinFrmUI/Model/BuildModel.cs | 938 ++ WinFrmUI/IBox.WinFrmUI/Model/mathclass.cs | 255 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eAlarmSource.cs | 23 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.cs | 306 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.cs | 231 WinFrmUI/IBox.WinFrmUI/Model/WaterUtensilModel.cs | 19 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.Designer.cs | 627 + WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.cs | 245 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.cs | 212 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eAlarmType.cs | 31 WinFrmUI/IBox.WinFrmUI/Untity/FilterKalman.cs | 105 WinFrmUI/IBox.WinFrmUI/Model/IBoxLogViewModel.cs | 31 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eMeasureType.cs | 22 WinFrmUI/IBox.WinFrmUI/Model/TimeValue.cs | 37 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.cs | 55 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.Designer.cs | 190 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.Designer.cs | 380 + WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/Signal_SignalType.cs | 37 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.resx | 147 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.resx | 120 WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj | 19 WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.Designer.cs | 174 WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPointGroup.cs | 105 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.Designer.cs | 400 + WinFrmUI/IBox.WinFrmUI/Model/IBoxConfigViewModel.cs | 125 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.cs | 39 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.Designer.cs | 651 + WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.Designer.cs | 167 WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.Designer.cs | 262 WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPoint.cs | 134 WinFrmUI/IBox.WinFrmUI/Model/IBoxFilterConfigViewModel.cs | 41 Desktop/IBox.Desktop/MainForm.cs | 3 WinFrmUI/IBox.WinFrmUI/IBoxForm.resx | 745 ++ WinFrmUI/IBox.WinFrmUI/IBoxForm.cs | 706 + WinFrmUI/IBox.WinFrmUI/Model/PostViewModel.cs | 13 WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/MemoryCacheKey.cs | 26 WinFrmUI/IBox.WinFrmUI/Model/IBoxFilterViewModel.cs | 19 WinFrmUI/IBox.WinFrmUI/ViewModel/GeneralViewModel.cs | 14 WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.resx | 120 WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRealRecord.cs | 60 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.Designer.cs | 953 ++ WinFrmUI/IBox.WinFrmUI/Model/WaterPumpCalcViewModel.cs | 15 125 files changed, 21,412 insertions(+), 2 deletions(-) diff --git a/Desktop/IBox.Desktop/MainForm.cs b/Desktop/IBox.Desktop/MainForm.cs index 70944c2..e7948f2 100644 --- a/Desktop/IBox.Desktop/MainForm.cs +++ b/Desktop/IBox.Desktop/MainForm.cs @@ -6,6 +6,7 @@ using DevExpress.XtraBars.Ribbon; using DevExpress.XtraEditors; using DevExpress.XtraTab; +using IBox.WinFrmUI; using System.IO; using Yw.WinFrmUI; using Yw.WinFrmUI.Page; @@ -628,7 +629,7 @@ { if (!IsExistPage(guid, true)) { - var page = new DocumentPage(); + var page = new IBoxForm(); page.PageGuid = guid; page.PageTitle.Caption = caption; page.PageTitle.HeaderSvgImage = svg; diff --git a/WinFrmUI/IBox.WinFrmUI/BluetoothHelper.cs b/WinFrmUI/IBox.WinFrmUI/BluetoothHelper.cs new file mode 100644 index 0000000..75f7a72 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/BluetoothHelper.cs @@ -0,0 +1,385 @@ +锘縰sing DevExpress.XtraBars.Docking2010.Views.Widget; +using InTheHand.Net; +using InTheHand.Net.Bluetooth; +using InTheHand.Net.Sockets; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public class BluetoothHelper + { + #region 鍗曚緥 + + private static BluetoothHelper _Instance; + private static readonly object locker = new object(); + + public static BluetoothHelper GetInstance() + { + if (_Instance == null) + { + lock (locker) + { + // 濡傛灉绫荤殑瀹炰緥涓嶅瓨鍦ㄥ垯鍒涘缓锛屽惁鍒欑洿鎺ヨ繑鍥� + if (_Instance == null) + { + _Instance = new BluetoothHelper(); + } + } + } + return _Instance; + } + int _length = 1; + #endregion 鍗曚緥 + + #region 淇℃伅鐘舵�� + + /// <summary> + /// 淇℃伅鐘舵�� + /// </summary> + /// <param name="srMessage"> 鎺ユ敹銆佸彂閫佷俊鎭�佹湰鍦颁俊鎭� </param> + /// <param name="content"> 淇℃伅鍐呭 </param> + public delegate void ShowMessReturn(string content); + + public event ShowMessReturn SMR; + + public void OnSysMessage(string content) + { + if (SMR != null) SMR(content); + } + + #endregion 淇℃伅鐘舵�� + + #region 灞炴�у畾涔� + + private const int BUFLEN = 1024; // 鏁版嵁鎺ユ敹缂撳啿鍖哄ぇ灏� + private bool IsRun = false; + private BluetoothAddress bthAddr = null; + private BluetoothClient myClient = null; + private List<BluetoothClient> LstClient = new List<BluetoothClient>(); + private BluetoothListener blthListener = null; + private Thread listenThread = null;//鐩戝惉绾跨▼ + + private List<BluetoothDeviceInfo> LstBluetooth = null; + + #endregion 灞炴�у畾涔� + + #region 澶勭悊鏂规硶 + + public BluetoothHelper() + { + var radio = BluetoothRadio.Default;//鑾峰彇褰撳墠PC鐨勮摑鐗欓�傞厤鍣� + IsRun = (null != radio); + if (!IsRun) OnSysMessage("鏃犲彲鐢ㄨ摑鐗�"); + } + + ~BluetoothHelper() + { + if (null != blthListener) blthListener.Stop(); + if (null != LstClient) + { + foreach (var itm in LstClient) + { + if (null != itm) + itm.Close(); + } + } + IsRun = false; + } + + /// <summary> + /// 鎼滅储钃濈墮 + /// </summary> + public List<BluetoothDeviceInfo> SearchBluetooth() + { + LstBluetooth = new List<BluetoothDeviceInfo>(); //鎼滅储鍒扮殑钃濈墮鐨勯泦鍚� + if (!IsRun) OnSysMessage("鏃犲彲鐢ㄨ摑鐗�"); + else + { + BluetoothClient client = new BluetoothClient(); + BluetoothRadio radio = BluetoothRadio.Default; //鑾峰彇钃濈墮閫傞厤鍣� + radio.Mode = RadioMode.Connectable; + var devices = client.DiscoverDevices();//鎼滅储钃濈墮 10绉掗挓 + LstBluetooth.AddRange(devices); + //OnSysMessage("鎼滅储钃濈墮瀹屾垚"); + } + + return LstBluetooth; + } + + /// <summary> + /// 杩炴帴钃濈墮锛岃摑鐗欏悕绉� + /// </summary> + /// <param name="bluetoothName"></param> + public void SetBluetoothByName(string bluetoothName) + { + try + { + if (null == LstBluetooth) return; + var curBluetooth = LstBluetooth.Find(o => o.DeviceName == bluetoothName); + if (null != curBluetooth) bthAddr = curBluetooth.DeviceAddress; + NewConnect(); + } + catch (Exception ex) + { + OnSysMessage("error:" + ex.ToString()); + } + } + + /// <summary> + /// 杩炴帴钃濈墮锛岃摑鐗欏湴鍧�锛堝崄鍏繘鍒跺瓧绗︿覆锛� + /// </summary> + /// <param name="hexAddr"></param> + public void SetBluetooth(string hexAddr) + { + try + { + var byTmp = HexToByte(hexAddr); + Array.Reverse(byTmp);// 鍙嶈浆鏁扮粍 + SetBluetooth(byTmp); + } + catch (Exception ex) + { + OnSysMessage("error:" + ex.ToString()); + } + } + + /// <summary> + /// 杩炴帴钃濈墮锛岃摑鐗欏湴鍧� + /// </summary> + /// <param name="addr"></param> + public void SetBluetooth(byte[] addr) + { + try + { + bthAddr = new BluetoothAddress(addr); + NewConnect(); + } + catch (Exception ex) + { + OnSysMessage("error:" + ex.ToString()); + } + } + + /// <summary> + /// 杩炴帴钃濈墮锛岃摑鐗欏湴鍧� + /// </summary> + /// <param name="laddr"></param> + public void SetBluetooth(long laddr) + { + try + { + bthAddr = new BluetoothAddress(laddr); + NewConnect(); + } + catch (Exception ex) + { + OnSysMessage("error:" + ex.ToString()); + } + } + + /// <summary> + /// 杩炴帴钃濈墮 + /// </summary> + private void NewConnect() + { + if (!IsRun) OnSysMessage("鏃犲彲鐢ㄨ摑鐗�"); + else if (null != bthAddr) + { + var mGUID = BluetoothService.Handsfree; + + if (null != myClient) myClient.Close(); + myClient = new BluetoothClient(); + //myClient.Connect(bthAddr,mGUID); + var be = new BluetoothEndPoint(bthAddr, BluetoothService.SerialPort); + myClient.Connect(be); + + ReceiveDataThread(myClient, false); + //OnSysMessage("鍙戣捣杩炴帴"); + } + } + + /// <summary> + /// 鍙戦�佹暟鎹紝鏂囨湰 + /// </summary> + /// <param name="sData"></param> + public void SendData(string sData) + { + if (!string.IsNullOrEmpty(sData) && (sData.Contains("getbase") || sData.Contains("alarm"))) + _length = 1; + else + _length = 100; + var byTmp = Encoding.UTF8.GetBytes(sData); + SendData(byTmp); + } + + /// <summary> + /// 鍙戦�佹暟鎹紝byte + /// </summary> + /// <param name="sData"></param> + public void SendData(byte[] sData) + { + try + { + if (!IsRun) OnSysMessage("鏃犲彲鐢ㄨ摑鐗�"); + else if (null == sData || sData.Length < 1) OnSysMessage("鍙戦�佹暟鎹笉鑳戒负绌�"); + else + { + var sendCnt = 0; + if (null != LstClient && LstClient.Count > 0) + { + foreach (var itm in LstClient) + { + if (null != itm && itm.Connected) + { + var bls = itm.GetStream(); + bls.Write(sData, 0, sData.Length); + bls.Flush(); + sendCnt++; + } + } + } + + if (sendCnt < 1 && (null == myClient || !myClient.Connected)) NewConnect(); // 閲嶈繛鏈哄埗 + if (null != myClient && myClient.Connected) + { + var bls = myClient.GetStream(); + bls.Write(sData, 0, sData.Length); + bls.Flush(); + sendCnt++; + } + + //OnSysMessage(string.Format("杩炴帴{0}鍙戦�亄1}涓瓧鑺�", sendCnt, sData.Length)); + } + } + catch (Exception ex) + { + OnSysMessage("error:" + ex.ToString()); + } + } + + /// <summary> + /// 鐩戝惉钃濈墮杩炴帴璇锋眰 + /// </summary> + public void ListenerData() + { + //OnSysMessage("钃濈墮鍚姩鐩戝惉:" + IsRun); + if (null != listenThread) listenThread.Abort(); + listenThread = new Thread(new ThreadStart(() => + { + if (IsRun) + { + var mGUID = BluetoothService.Handsfree; + blthListener = new BluetoothListener(mGUID); + blthListener.Start(); + + while (IsRun) + { + var newClient = blthListener.AcceptBluetoothClient(); + //OnSysMessage("钃濈墮閾炬帴锛�" + newClient.RemoteMachineName); + ReceiveDataThread(newClient); + } + } + })); + listenThread.IsBackground = true; + listenThread.Start(); + } + + /// <summary> + /// 钃濈墮鏁版嵁鎺ユ敹绾跨▼ + /// </summary> + /// <param name="client"></param> + /// <param name="isInList"></param> + private void ReceiveDataThread(BluetoothClient client, bool isInList = true) + { + lock (LstClient) { if (isInList) LstClient.Add(client); } + var th = new Thread(new ThreadStart(() => + { + ReceiveData(client); + lock (LstClient) LstClient.Remove(client); + })); + th.IsBackground = true; + th.Start(); + } + + public void Close() + { + if (myClient != null && myClient.Connected) + { + myClient.Close(); + myClient.Dispose(); + myClient = null; + } + } + + /// <summary> + /// 鏁版嵁鎺ユ敹 + /// </summary> + /// <param name="client"></param> + private void ReceiveData(BluetoothClient client) + { + try + { + var sl = new List<string>(); + var st = new byte[0]; + + while (client != null && client.Connected) + { + var peerStream = client.GetStream(); + byte[] buffer = new byte[1]; + peerStream.Read(buffer, 0, 1); + st = st.Concat(buffer).ToArray(); + var receive = Encoding.UTF8.GetString(st).ToString(); + if (receive.Contains("[&end&]")) + { + var c = Encoding.UTF8.GetString(st).ToString(); + st = new byte[0]; + OnSysMessage(c); + } + } + } + catch (Exception ex) + { + // OnSysMessage("error:" + ex.ToString()); + } + } + + #endregion 澶勭悊鏂规硶 + + #region 杈呭姪鏂规硶 + + /// <summary> + /// 鍗佸叚杩涘埗杞琤yte[],鏃犲垎鍓茬 + /// </summary> + public byte[] HexToByte(string strHex) + { + byte[] byTmp = new byte[0]; + if (string.IsNullOrEmpty(strHex) || (strHex.Length % 2) > 0) return byTmp; + + try + { + var len = strHex.Length / 2; + byTmp = new byte[len]; + for (int i = 0; i < len; i++) + { + var phex = strHex.Substring(2 * i, 2); + byTmp[i] = Convert.ToByte(phex, 16); + } + } + catch (Exception ex) + { + byTmp = new byte[0]; + OnSysMessage("error:" + ex.ToString()); + } + return byTmp; + } + + #endregion 杈呭姪鏂规硶 + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.Designer.cs new file mode 100644 index 0000000..ffe9ba4 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.Designer.cs @@ -0,0 +1,320 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormControll + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage(); + this.splitContainerControl2 = new DevExpress.XtraEditors.SplitContainerControl(); + this.treeListCtrl1 = new ISupply.WinFrmUI.Basic.TreeListCtrl(); + this.curveExpressChart1 = new ISupply.WinFrmUI.Chart.CurveExpressChart(); + this.dataLayoutControl2 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit(); + this.splitContainerControl1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).BeginInit(); + this.splitContainerControl1.Panel2.SuspendLayout(); + this.splitContainerControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.xtraTabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit(); + this.xtraTabPage2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl2.Panel1)).BeginInit(); + this.splitContainerControl2.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl2.Panel2)).BeginInit(); + this.splitContainerControl2.Panel2.SuspendLayout(); + this.splitContainerControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).BeginInit(); + this.dataLayoutControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.splitContainerControl1); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(717, 554); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // splitContainerControl1 + // + this.splitContainerControl1.Horizontal = false; + this.splitContainerControl1.Location = new System.Drawing.Point(12, 12); + this.splitContainerControl1.Name = "splitContainerControl1"; + // + // splitContainerControl1.Panel1 + // + this.splitContainerControl1.Panel1.Controls.Add(this.xtraTabControl1); + this.splitContainerControl1.Panel1.Text = "Panel1"; + // + // splitContainerControl1.Panel2 + // + this.splitContainerControl1.Panel2.Controls.Add(this.dataLayoutControl2); + this.splitContainerControl1.Panel2.Text = "Panel2"; + this.splitContainerControl1.Size = new System.Drawing.Size(693, 530); + this.splitContainerControl1.SplitterPosition = 459; + this.splitContainerControl1.TabIndex = 4; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 0); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl1.Size = new System.Drawing.Size(693, 459); + this.xtraTabControl1.TabIndex = 0; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1, + this.xtraTabPage2}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.chart1); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(691, 433); + this.xtraTabPage1.Text = "绯荤粺鏇茬嚎"; + // + // chart1 + // + chartArea1.Name = "ChartArea1"; + this.chart1.ChartAreas.Add(chartArea1); + this.chart1.Dock = System.Windows.Forms.DockStyle.Fill; + legend1.Name = "Legend1"; + this.chart1.Legends.Add(legend1); + this.chart1.Location = new System.Drawing.Point(0, 0); + this.chart1.Name = "chart1"; + series1.ChartArea = "ChartArea1"; + series1.Legend = "Legend1"; + series1.Name = "Series1"; + this.chart1.Series.Add(series1); + this.chart1.Size = new System.Drawing.Size(461, 289); + this.chart1.TabIndex = 0; + this.chart1.Text = "chart1"; + // + // xtraTabPage2 + // + this.xtraTabPage2.Controls.Add(this.splitContainerControl2); + this.xtraTabPage2.Name = "xtraTabPage2"; + this.xtraTabPage2.Size = new System.Drawing.Size(691, 433); + this.xtraTabPage2.Text = "娉垫洸绾�"; + // + // splitContainerControl2 + // + this.splitContainerControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainerControl2.Location = new System.Drawing.Point(0, 0); + this.splitContainerControl2.Name = "splitContainerControl2"; + // + // splitContainerControl2.Panel1 + // + this.splitContainerControl2.Panel1.Controls.Add(this.treeListCtrl1); + this.splitContainerControl2.Panel1.Text = "Panel1"; + // + // splitContainerControl2.Panel2 + // + this.splitContainerControl2.Panel2.Controls.Add(this.curveExpressChart1); + this.splitContainerControl2.Panel2.Text = "Panel2"; + this.splitContainerControl2.Size = new System.Drawing.Size(691, 433); + this.splitContainerControl2.SplitterPosition = 222; + this.splitContainerControl2.TabIndex = 0; + // + // treeListCtrl1 + // + this.treeListCtrl1.Appearance.BackColor = System.Drawing.SystemColors.Control; + this.treeListCtrl1.Appearance.Options.UseBackColor = true; + this.treeListCtrl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeListCtrl1.Location = new System.Drawing.Point(0, 0); + this.treeListCtrl1.Name = "treeListCtrl1"; + this.treeListCtrl1.Size = new System.Drawing.Size(222, 433); + this.treeListCtrl1.TabIndex = 0; + // + // curveExpressChart1 + // + this.curveExpressChart1.DefinePointVisible = false; + this.curveExpressChart1.Dock = System.Windows.Forms.DockStyle.Fill; + this.curveExpressChart1.LineVisible = false; + this.curveExpressChart1.Location = new System.Drawing.Point(0, 0); + this.curveExpressChart1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.curveExpressChart1.Name = "curveExpressChart1"; + this.curveExpressChart1.Size = new System.Drawing.Size(459, 433); + this.curveExpressChart1.TabIndex = 1; + // + // dataLayoutControl2 + // + this.dataLayoutControl2.Controls.Add(this.simpleButton1); + this.dataLayoutControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl2.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl2.Name = "dataLayoutControl2"; + this.dataLayoutControl2.Root = this.layoutControlGroup1; + this.dataLayoutControl2.Size = new System.Drawing.Size(693, 61); + this.dataLayoutControl2.TabIndex = 0; + this.dataLayoutControl2.Text = "dataLayoutControl2"; + // + // simpleButton1 + // + this.simpleButton1.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.simpleButton1.Appearance.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold); + this.simpleButton1.Appearance.Options.UseBackColor = true; + this.simpleButton1.Appearance.Options.UseFont = true; + this.simpleButton1.Location = new System.Drawing.Point(476, 12); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(205, 22); + this.simpleButton1.StyleController = this.dataLayoutControl2; + this.simpleButton1.TabIndex = 1; + this.simpleButton1.Text = "鏁版嵁涓嬪彂"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // layoutControlGroup1 + // + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.GroupBordersVisible = false; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem3, + this.emptySpaceItem2}); + this.layoutControlGroup1.Name = "layoutControlGroup1"; + this.layoutControlGroup1.Size = new System.Drawing.Size(693, 61); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.simpleButton1; + this.layoutControlItem3.Location = new System.Drawing.Point(464, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(209, 41); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(0, 0); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(464, 41); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(717, 554); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.splitContainerControl1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(697, 534); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // EboxFormControll + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "EboxFormControll"; + this.Size = new System.Drawing.Size(717, 554); + this.Load += new System.EventHandler(this.EboxFormControll_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit(); + this.splitContainerControl1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).EndInit(); + this.splitContainerControl1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit(); + this.splitContainerControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.xtraTabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit(); + this.xtraTabPage2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl2.Panel1)).EndInit(); + this.splitContainerControl2.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl2.Panel2)).EndInit(); + this.splitContainerControl2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl2)).EndInit(); + this.splitContainerControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).EndInit(); + this.dataLayoutControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraTab.XtraTabControl xtraTabControl1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage2; + private DevExpress.XtraEditors.SplitContainerControl splitContainerControl2; + private Chart.CurveExpressChart curveExpressChart1; + private ISupply.WinFrmUI.Basic.TreeListCtrl treeListCtrl1; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private System.Windows.Forms.DataVisualization.Charting.Chart chart1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.cs new file mode 100644 index 0000000..ddca6a9 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.cs @@ -0,0 +1,378 @@ +锘縰sing PBS.Model; +using System.Data; +using System.IO; +using Yw; +using Yw.WinFrmUI; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormControll : DocumentPage + { + + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string datadownloadCode = "datadownload"; + + private void EboxFormControll_Load(object sender, EventArgs e) + { + //BluetoothHelper.GetInstance().SMR -= null; + //BluetoothHelper.GetInstance().SMR += new BluetoothHelper.ShowMessReturn(GetReceive); + //BluetoothHelper.GetInstance().ListenerData(); + } + + public void GetReceive(string msg) + { + if (!this.IsHandleCreated || this.IsDisposed || string.IsNullOrEmpty(msg)) return; + if (msg.StartsWith("error:") && msg.Contains("鐩爣涓绘満鍧忎簡")) + { + MessageBoxHelper.ShowWarning(" c钃濈墮璁惧杩炴帴澶辫触锛岃閲嶈瘯!"); return; + } + if (!string.IsNullOrEmpty(msg) && msg.Contains(startCode)) + { + var order = msg.Replace(endCode, "").Replace(startCode, "").Trim(); + SetOrder(order); + } + else MessageBoxHelper.ShowWarning(" c钃濈墮璁惧杩炴帴澶辫触"); + } + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + + private void SetOrder(string order) + { + var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries); + if (smsg.Length < 2) + { + return; + } + + switch (smsg[0].Trim()) + { + case "datadownload": + //WaitFrmHelper.HideWaitForm(); + break; + } + } + private Model.Facilities _facilities = null; + private BLL.EquipmentEChartMapping _bll = new BLL.EquipmentEChartMapping(); + private BLL.EChart _bllEChart = new BLL.EChart(); + private BLL.Equipment _bllEquipment = new BLL.Equipment(); + private Model.Kit _kit = null; + private BLL.EquipmentTypeEChartMapping _equipmentTypeEChartMappingBLL = new BLL.EquipmentTypeEChartMapping(); + public IBoxFormControll(Facility facilities) + { + this.PageTitle.Caption = "鏅鸿兘鎺у埗"; + _facilities = facilities; + InitializeComponent(); + this.treeListCtrl1.FocusedChangedEvent += EquipmentTreeListCtrl1_FocusedChangedEvent; + InitDataSource(); + } + private string filePath = "Data\\AnalyData_{0}.json"; + private void InitDataSource() + { + var f = new BLL.Facilities().GetByID(this._facilities.ID); + if (f != null) + { + var kid = long.Parse(f.CompletePlant); + var kit = new BLL.Kit().GetByID(kid); + _kit = kit; + this.treeListCtrl1.SetBindingData(kid); + } + this._SelectedBuild = new Basic.Build() + { + factoryName = f.Name, + 绯荤粺鏈�澶ф祦閲� = f.WaterHeight, + Type = 浜屼緵鍒嗗尯Type.鍔犲帇渚涙按, + ID = f.ID.ToString(), + 鐢ㄦ埛鍘嬪姏闇�姹� = int.Parse(f.WaterPressure.ToString()), + 灞傛暟 = double.Parse(f.Floor.ToString()), + 灞傞珮 = double.Parse(f.FloorHeight.ToString()), + 姣忓眰鎴锋暟 = double.Parse(f.FloorHouseHolds.ToString()) + }; + ShowChart(); + } + + private void ShowChart() + { + var file = string.Format(filePath, _facilities.ID.ToString()); + var path = Path.Combine(Directory.GetCurrentDirectory(), file); + if (!File.Exists(path)) + { + MessageBoxHelper.ShowInfo("璇峰厛杩涜绯荤粺鏇茬嚎鎿嶄綔!"); + return; + } + else + { + SetResult(path); + } + } + + private void SetResult(string path) + { + var content = new Eventech.Common.FileHelper().ReadFile(path); + var result = JsonHelper.Json2Object<List<Result>>(content); + AddPoints(result); + ShowPressPoints(); + } + private List<Result> _res; + private Build _SelectedBuild; + public void AddPoints(List<Result> res) + { + _res = res; + List<PointF> nums = res.Select(o => new PointF((float)o.Demand, (float)o.ObjFunctionValue)).ToList(); + var chartDatas = nums.Select(p => new PointF(p.X, p.Y + _SelectedBuild.鐢ㄦ埛鍘嬪姏闇�姹� + (float)_facilities.MaxHeight)).ToList(); + if (chartDatas == null || chartDatas.Count == 0) return; + + // 璁$畻澶氶」寮忓湪鐐� x 澶勭殑鍙栧�� + // 璁$畻鎷熷悎鏇茬嚎涓婄殑鐐� + var curve = new CurveFitHelper(chartDatas, 2); + //List<PointF> fitPoints = curve.GetFitCurve(100); + List<List<PointF>> confidencePoints = curve.GetConfidenceCurve(100); + + //_SelectedPump.娴侀噺鍘嬮檷骞冲潎.Data = fitPoints; + //_SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.Data = chartDatas; + _SelectedBuild.Datasets.Clear(); + _SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.Data = chartDatas; + _SelectedBuild.娴侀噺鍘嬮檷涓嬮檺.Data = confidencePoints[0]; + _SelectedBuild.娴侀噺鍘嬮檷涓婇檺.Data = confidencePoints[1]; + } + public void ShowPressPoints() + { + this.chart1.ChartAreas.Clear(); + this.chart1.ChartAreas.Add(new ChartArea()); + chart1.Series.Clear(); + chart1.Series.Add("鏁版嵁"); + chart1.Series.Add("骞冲潎"); + chart1.Series["骞冲潎"].ChartType = SeriesChartType.Line; + chart1.Series["骞冲潎"].BorderWidth = 2; + chart1.Series.Add("涓婇檺"); + chart1.Series["涓婇檺"].ChartType = SeriesChartType.Line; + chart1.Series["涓婇檺"].BorderWidth = 2; + chart1.Series.Add("涓嬮檺"); + chart1.Series["涓嬮檺"].ChartType = SeriesChartType.Line; + chart1.Series["涓嬮檺"].BorderWidth = 2; + chart1.Series.Add("娉靛嚭鍙i潤鍘嬬嚎"); + chart1.Series["娉靛嚭鍙i潤鍘嬬嚎"].ChartType = SeriesChartType.Line; + chart1.Series["娉靛嚭鍙i潤鍘嬬嚎"].BorderWidth = 2; + chart1.Series["娉靛嚭鍙i潤鍘嬬嚎"].Color = Color.Green; + + chart1.Series.Add("鏈�楂樻ゼ灞傛爣楂�"); + chart1.Series["鏈�楂樻ゼ灞傛爣楂�"].ChartType = SeriesChartType.Line; + chart1.Series["鏈�楂樻ゼ灞傛爣楂�"].BorderWidth = 2; + chart1.Series["鏈�楂樻ゼ灞傛爣楂�"].Color = Color.Yellow; + if (chart1.ChartAreas.Count > 0) + { + chart1.ChartAreas[0].AxisY.Enabled = AxisEnabled.True; + //chart1.ChartAreas[0].AxisY2.Enabled = AxisEnabled.True; + chart1.ChartAreas[0].AxisX.Enabled = AxisEnabled.True; + chart1.ChartAreas[0].AxisX.LabelStyle.Format = "0"; + chart1.ChartAreas[0].AxisY.LabelStyle.Format = "0"; + chart1.ChartAreas[0].AxisX.Title = "绯荤粺娴侀噺(m鲁/h)"; + chart1.ChartAreas[0].AxisY.Title = "娉靛悗鍘嬪姏(m)"; + chart1.ChartAreas[0].AxisY2.Enabled = AxisEnabled.False; + } + //chart1.ChartAreas[0].AxisX.Minimum = double.NaN; + + //chart1.ChartAreas[0].AxisY.Minimum = double.NaN; + var nums = _SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.Data; + if (nums.Count == 0) return; + _SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.CurveFit(); + var fitPoints = _SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.FittedCurve; + _SelectedBuild.娴侀噺鍘嬮檷涓嬮檺.CurveFit(); + _SelectedBuild.娴侀噺鍘嬮檷涓婇檺.CurveFit(); + List<List<PointF>> confidencePoints = new List<List<PointF>>() { _SelectedBuild.娴侀噺鍘嬮檷涓嬮檺.FittedCurve, _SelectedBuild.娴侀噺鍘嬮檷涓婇檺.FittedCurve }; + var chartDatas = nums.ToList(); + double yMin = double.MaxValue; + double yMax = double.MinValue; + float xMin = float.MaxValue; + float xMax = float.MinValue; + if (nums == null || nums.Count == 0) return; + this.chart1.Series[0].ChartType = SeriesChartType.Point; + //double x = double.Parse(textBox_current_TotalDemand.Text); + float x_Avg = 0; + float x_Sum = 0; + nums.ForEach(y => + { + this.chart1.Series["鏁版嵁"].Points.AddXY(y.X, y.Y); + x_Sum += (y.X); + if (yMin > y.Y) yMin = y.Y; + if (yMax < y.Y) yMax = y.Y; + if (xMin > y.X) xMin = y.X; + if (xMax < y.X) xMax = y.X; + }); + x_Avg = x_Sum / nums.Count; + + var dataPoints = this.chart1.Series[0].Points; + + // 璁$畻澶氶」寮忓湪鐐� x 澶勭殑鍙栧�� + // 璁$畻鎷熷悎鏇茬嚎涓婄殑鐐� + var waterpress = _SelectedBuild.娴侀噺鍘嬮檷涓嬮檺.FittedCurve.Select((d) => { return new PointF(d.X, (float)_facilities.MaxHeight + _SelectedBuild.鐢ㄦ埛鍘嬪姏闇�姹�); }).ToList(); + + var maxheight = _SelectedBuild.娴侀噺鍘嬮檷涓嬮檺.FittedCurve.Select((d) => { return new PointF(d.X, (float)_facilities.MaxHeight); }).ToList(); + AddSeries(chart1.Series["骞冲潎"], fitPoints); + AddSeries(chart1.Series["涓嬮檺"], confidencePoints[0]); + AddSeries(chart1.Series["涓婇檺"], confidencePoints[1]); + AddSeries(chart1.Series["娉靛嚭鍙i潤鍘嬬嚎"], waterpress); + AddSeries(chart1.Series["鏈�楂樻ゼ灞傛爣楂�"], maxheight); + if (yMin > 0 && yMin < 10) + { + this.chart1.ChartAreas[0].AxisY.Minimum = 0; + this.chart1.ChartAreas[0].AxisY.Maximum = Math.Ceiling((yMax * 1.2) / 10) * 10; + this.chart1.ChartAreas[0].AxisY.Interval = (chart1.ChartAreas[0].AxisY.Maximum - chart1.ChartAreas[0].AxisY.Minimum) / 4; + } + else + { + this.chart1.ChartAreas[0].AxisY.Minimum = Math.Floor((yMin * 0.8) / 10) * 10; + this.chart1.ChartAreas[0].AxisY.Maximum = Math.Ceiling((yMax * 1.2) / 10) * 10; + chart1.ChartAreas[0].AxisX.IsLabelAutoFit = true; + //this.chart1.ChartAreas[0].AxisX.Minimum = double.NaN; + //this.chart1.ChartAreas[0].AxisX.Maximum = double.NaN; + this.chart1.ChartAreas[0].AxisY.Interval = (chart1.ChartAreas[0].AxisY.Maximum - chart1.ChartAreas[0].AxisY.Minimum) / 4; + } + if (xMin > 0 && xMin < 10) + { + this.chart1.ChartAreas[0].AxisX.Minimum = 0; + this.chart1.ChartAreas[0].AxisX.Maximum = Math.Ceiling(xMax); + } + else + { + this.chart1.ChartAreas[0].AxisX.Minimum = Math.Floor((xMin * 0.8) / 10) * 10; + this.chart1.ChartAreas[0].AxisX.Maximum = Math.Ceiling(xMax * 1.2); + } + } + + private void AddSeries(System.Windows.Forms.DataVisualization.Charting.Series serie, List<PointF> points) + { + if (points == null) return; + serie.Points.Clear(); + foreach (var point in points) + { + serie.Points.AddXY(point.X, point.Y); + } + } + private void EquipmentTreeListCtrl1_FocusedChangedEvent(string objType, object obj) + { + this.curveExpressChart1.InitialChartData(); + if (obj != null && objType == ISupply.ObjectType.Kit) + { + _kit = obj as Model.Kit; + var equipmentList = _bllEquipment.GetByKitIDAndCatalog(_kit.ID, ISupply.Equipment.Pump); + if (equipmentList != null && equipmentList.Any()) + { + var mappings = new List<Model.EquipmentEChartMapping>(); + foreach (var equipment in equipmentList) + { + var mapping = _bll.GetWorkingByEquipmentID(equipment.ID); + if (mapping != null) + { + mappings.Add(mapping); + } + } + if (mappings.Any()) + { + var curveInfoList = new List<Model.PumpCurveInfo>(); + foreach (var mapping in mappings) + { + var chart = _bllEChart.GetPumpCurveInfoByID(mapping.EChartID); + if (chart != null && chart.CurveInfoModel != null) + { + curveInfoList.Add(chart.CurveInfoModel); + } + } + + if (curveInfoList != null && curveInfoList.Any()) + { + var theConnectCurve = new Curve.ParallelConnectionHelper(); + for (int i = 0; i < curveInfoList.Count; i++) + { + var chart = curveInfoList[i]; + var QH = chart.CurveQH; + var QP = chart.CurveQP; + var QE = Curve.PumpCalculateHelper.CalculateE(QH, QP); + theConnectCurve.AddCurve(QH, QP); + } + var bol = theConnectCurve.CalculateParallel(out List<ISupply.Curve.CurvePoint> ConnectCurveQH, + out List<ISupply.Curve.CurvePoint> ConnectCurveQE, + out List<ISupply.Curve.CurvePoint> ConnectCurveQP); + if (bol) + { + var curveExpressQH = ISupply.Curve.FitHelper.BuildCurveExpress(ConnectCurveQH); + var curveExpressQE = ISupply.Curve.FitHelper.BuildCurveExpress(ConnectCurveQE); + var curveExpressQP = ISupply.Curve.FitHelper.BuildCurveExpress(ConnectCurveQP); + this.curveExpressChart1.SetBindingData(curveExpressQH, + curveExpressQE, + curveExpressQP); + } + } + } + } + } + else if (obj != null && objType == ISupply.ObjectType.Equipment) + { + var equ = obj as Model.Equipment; + var _equipmentChartMappingEx = _equipmentTypeEChartMappingBLL.GetExByEquipmentTypeID(equ.TypeID); + + SetBindingData(_equipmentChartMappingEx); + } + } + + private void SendDownloadData() + { + var model = new IBoxControllViewModel(); + model.facilities = _facilities; + model.kit = _kit; + model.娴侀噺鍘嬮檷涓嬮檺 = _SelectedBuild.娴侀噺鍘嬮檷涓嬮檺.FittedCurve; + model.娴侀噺鍘嬮檷涓婇檺 = _SelectedBuild.娴侀噺鍘嬮檷涓婇檺.FittedCurve; + model.娴侀噺鍘嬮檷鏇茬嚎 = _SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.FittedCurve; + + if (!_SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.IsFitted) + _SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.CurveFit(); + model.coefficients = _SelectedBuild.娴侀噺鍘嬮檷涓婇檺.coefficients; + //model.IsControll = checkEdit1.Checked; + var equipmentList = _bllEquipment.GetByKitIDAndCatalog(_kit.ID, ISupply.Equipment.Pump); + if (equipmentList != null && equipmentList.Any()) + { + foreach (var item in equipmentList) + { + var _equipmentChartMappingEx = _equipmentTypeEChartMappingBLL.GetExByEquipmentTypeID(item.TypeID); + _equipmentChartMappingEx.EquipmentId = item.ID; + _equipmentChartMappingEx.EquipmentOtherName = item.Name; + _equipmentChartMappingEx.RatedParas = item.RatedParas; + model.equations.Add(_equipmentChartMappingEx); + } + } + //FileHelper.Write("d:\\EboxData.txt", JsonHelper.Object2Json(model)); + Thread.Sleep(500); + SendText(startCode + datadownloadCode + paramCode + JsonHelper.Object2Json(model) + endCode); + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + //WaitFrmHelper.ShowWaitForm(); + SendDownloadData(); + MessageBoxHelper.ShowInfo("鏁版嵁涓嬪彂鎴愬姛!"); + //MessageBoxHelper.ShowInfo("鏁版嵁涓嬪彂鎴愬姛!"); + } + + + + private void SetBindingData(Model.EquipmentTypeEChartMappingEx model) + { + this.curveExpressChart1.InitialChartData(); + var curveInfo = model?.CurveInfo; + var coordParas = model?.CoordParas; + if (curveInfo != null) + { + var coordinateParas = ISupply.Curve.CurveCoordinate.ToModel(coordParas); + this.curveExpressChart1.SetBindingData(curveInfo.CurveQH, + curveInfo.CurveQE, + curveInfo.CurveQP, + coordinateParas); + } + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.Designer.cs new file mode 100644 index 0000000..8b89a35 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.Designer.cs @@ -0,0 +1,651 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormDataFilter + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + DevExpress.XtraCharts.XYDiagram xyDiagram1 = new DevExpress.XtraCharts.XYDiagram(); + DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.LineSeriesView lineSeriesView1 = new DevExpress.XtraCharts.LineSeriesView(); + DevExpress.XtraCharts.Series series2 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.LineSeriesView lineSeriesView2 = new DevExpress.XtraCharts.LineSeriesView(); + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.groupControl3 = new DevExpress.XtraEditors.GroupControl(); + this.dataLayoutControl3 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton(); + this.checkEditIsControlInput = new DevExpress.XtraEditors.CheckEdit(); + this.textEditControlInputValue = new DevExpress.XtraEditors.TextEdit(); + this.textEditRValue = new DevExpress.XtraEditors.TextEdit(); + this.textEditQValue = new DevExpress.XtraEditors.TextEdit(); + this.textEditAValue = new DevExpress.XtraEditors.TextEdit(); + this.textEditHValue = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem20 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem21 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem24 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.groupControl2 = new DevExpress.XtraEditors.GroupControl(); + this.chartControl1 = new DevExpress.XtraCharts.ChartControl(); + this.groupControl1 = new DevExpress.XtraEditors.GroupControl(); + this.dataLayoutControl2 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.checkEditIsPress = new DevExpress.XtraEditors.CheckEdit(); + this.checkEditIsFlow = new DevExpress.XtraEditors.CheckEdit(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + this.checkEditIsControlInput1 = new DevExpress.XtraEditors.CheckEdit(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.groupControl3)).BeginInit(); + this.groupControl3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl3)).BeginInit(); + this.dataLayoutControl3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsControlInput.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditControlInputValue.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditRValue.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditQValue.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditAValue.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditHValue.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem24)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.groupControl2)).BeginInit(); + this.groupControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.groupControl1)).BeginInit(); + this.groupControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).BeginInit(); + this.dataLayoutControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.imageComboBoxEdit1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsPress.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsFlow.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsControlInput1.Properties)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.groupControl3); + this.dataLayoutControl1.Controls.Add(this.groupControl2); + this.dataLayoutControl1.Controls.Add(this.groupControl1); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(1005, 850); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // groupControl3 + // + this.groupControl3.Controls.Add(this.dataLayoutControl3); + this.groupControl3.Location = new System.Drawing.Point(12, 70); + this.groupControl3.Name = "groupControl3"; + this.groupControl3.ShowCaption = false; + this.groupControl3.Size = new System.Drawing.Size(981, 100); + this.groupControl3.TabIndex = 6; + this.groupControl3.Text = "groupControl3"; + // + // dataLayoutControl3 + // + this.dataLayoutControl3.Controls.Add(this.simpleButton2); + this.dataLayoutControl3.Controls.Add(this.simpleButton4); + this.dataLayoutControl3.Controls.Add(this.checkEditIsControlInput); + this.dataLayoutControl3.Controls.Add(this.textEditControlInputValue); + this.dataLayoutControl3.Controls.Add(this.textEditRValue); + this.dataLayoutControl3.Controls.Add(this.textEditQValue); + this.dataLayoutControl3.Controls.Add(this.textEditAValue); + this.dataLayoutControl3.Controls.Add(this.textEditHValue); + this.dataLayoutControl3.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl3.Location = new System.Drawing.Point(2, 2); + this.dataLayoutControl3.Name = "dataLayoutControl3"; + this.dataLayoutControl3.Root = this.layoutControlGroup2; + this.dataLayoutControl3.Size = new System.Drawing.Size(977, 96); + this.dataLayoutControl3.TabIndex = 0; + this.dataLayoutControl3.Text = "dataLayoutControl3"; + // + // simpleButton2 + // + this.simpleButton2.Location = new System.Drawing.Point(430, 36); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(258, 22); + this.simpleButton2.StyleController = this.dataLayoutControl3; + this.simpleButton2.TabIndex = 15; + this.simpleButton2.Text = "淇"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click_1); + // + // simpleButton4 + // + this.simpleButton4.Location = new System.Drawing.Point(692, 36); + this.simpleButton4.Name = "simpleButton4"; + this.simpleButton4.Size = new System.Drawing.Size(273, 22); + this.simpleButton4.StyleController = this.dataLayoutControl3; + this.simpleButton4.TabIndex = 14; + this.simpleButton4.Text = "閰嶇疆涓嬪彂"; + this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click); + // + // checkEditIsControlInput + // + this.checkEditIsControlInput.Location = new System.Drawing.Point(12, 12); + this.checkEditIsControlInput.Name = "checkEditIsControlInput"; + this.checkEditIsControlInput.Properties.Caption = "鏄惁鎺у埗杈撳叆"; + this.checkEditIsControlInput.Size = new System.Drawing.Size(201, 20); + this.checkEditIsControlInput.StyleController = this.dataLayoutControl3; + this.checkEditIsControlInput.TabIndex = 13; + // + // textEditControlInputValue + // + this.textEditControlInputValue.EditValue = "0.2"; + this.textEditControlInputValue.Location = new System.Drawing.Point(289, 12); + this.textEditControlInputValue.Name = "textEditControlInputValue"; + this.textEditControlInputValue.Size = new System.Drawing.Size(137, 20); + this.textEditControlInputValue.StyleController = this.dataLayoutControl3; + this.textEditControlInputValue.TabIndex = 6; + // + // textEditRValue + // + this.textEditRValue.EditValue = "0.008"; + this.textEditRValue.Location = new System.Drawing.Point(502, 12); + this.textEditRValue.Name = "textEditRValue"; + this.textEditRValue.Size = new System.Drawing.Size(157, 20); + this.textEditRValue.StyleController = this.dataLayoutControl3; + this.textEditRValue.TabIndex = 7; + // + // textEditQValue + // + this.textEditQValue.EditValue = "0.1"; + this.textEditQValue.Location = new System.Drawing.Point(735, 12); + this.textEditQValue.Name = "textEditQValue"; + this.textEditQValue.Size = new System.Drawing.Size(230, 20); + this.textEditQValue.StyleController = this.dataLayoutControl3; + this.textEditQValue.TabIndex = 8; + // + // textEditAValue + // + this.textEditAValue.EditValue = "1"; + this.textEditAValue.Location = new System.Drawing.Point(84, 36); + this.textEditAValue.Name = "textEditAValue"; + this.textEditAValue.Size = new System.Drawing.Size(129, 20); + this.textEditAValue.StyleController = this.dataLayoutControl3; + this.textEditAValue.TabIndex = 9; + // + // textEditHValue + // + this.textEditHValue.EditValue = "1"; + this.textEditHValue.Location = new System.Drawing.Point(289, 36); + this.textEditHValue.Name = "textEditHValue"; + this.textEditHValue.Size = new System.Drawing.Size(137, 20); + this.textEditHValue.StyleController = this.dataLayoutControl3; + this.textEditHValue.TabIndex = 10; + // + // layoutControlGroup2 + // + this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup2.GroupBordersVisible = false; + this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem17, + this.layoutControlItem18, + this.layoutControlItem19, + this.layoutControlItem20, + this.layoutControlItem21, + this.layoutControlItem24, + this.layoutControlItem3, + this.layoutControlItem8}); + this.layoutControlGroup2.Name = "layoutControlGroup2"; + this.layoutControlGroup2.Size = new System.Drawing.Size(977, 96); + this.layoutControlGroup2.TextVisible = false; + // + // layoutControlItem17 + // + this.layoutControlItem17.Control = this.textEditControlInputValue; + this.layoutControlItem17.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem17.CustomizationFormText = "鎺у埗鍚戦噺锛�"; + this.layoutControlItem17.Location = new System.Drawing.Point(205, 0); + this.layoutControlItem17.Name = "layoutControlItem17"; + this.layoutControlItem17.Size = new System.Drawing.Size(213, 24); + this.layoutControlItem17.Text = "鎺у埗鍚戦噺锛�"; + this.layoutControlItem17.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem18 + // + this.layoutControlItem18.Control = this.textEditRValue; + this.layoutControlItem18.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem18.CustomizationFormText = "娴嬮噺鍣0锛�"; + this.layoutControlItem18.Location = new System.Drawing.Point(418, 0); + this.layoutControlItem18.Name = "layoutControlItem18"; + this.layoutControlItem18.Size = new System.Drawing.Size(233, 24); + this.layoutControlItem18.Text = "娴嬮噺鍣0锛�"; + this.layoutControlItem18.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem19 + // + this.layoutControlItem19.Control = this.textEditQValue; + this.layoutControlItem19.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem19.CustomizationFormText = "杩囩▼鍣0锛�"; + this.layoutControlItem19.Location = new System.Drawing.Point(651, 0); + this.layoutControlItem19.Name = "layoutControlItem19"; + this.layoutControlItem19.Size = new System.Drawing.Size(306, 24); + this.layoutControlItem19.Text = "杩囩▼鍣0锛�"; + this.layoutControlItem19.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem20 + // + this.layoutControlItem20.Control = this.textEditAValue; + this.layoutControlItem20.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem20.CustomizationFormText = "鐘舵�佽浆绉伙細"; + this.layoutControlItem20.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem20.Name = "layoutControlItem20"; + this.layoutControlItem20.Size = new System.Drawing.Size(205, 52); + this.layoutControlItem20.Text = "鐘舵�佽浆绉伙細"; + this.layoutControlItem20.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem21 + // + this.layoutControlItem21.Control = this.textEditHValue; + this.layoutControlItem21.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem21.CustomizationFormText = "鐘舵�佽娴嬶細"; + this.layoutControlItem21.Location = new System.Drawing.Point(205, 24); + this.layoutControlItem21.Name = "layoutControlItem21"; + this.layoutControlItem21.Size = new System.Drawing.Size(213, 52); + this.layoutControlItem21.Text = "鐘舵�佽娴嬶細"; + this.layoutControlItem21.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem24 + // + this.layoutControlItem24.Control = this.checkEditIsControlInput; + this.layoutControlItem24.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem24.Name = "layoutControlItem24"; + this.layoutControlItem24.Size = new System.Drawing.Size(205, 24); + this.layoutControlItem24.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem24.TextVisible = false; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.simpleButton4; + this.layoutControlItem3.Location = new System.Drawing.Point(680, 24); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(277, 52); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.simpleButton2; + this.layoutControlItem8.Location = new System.Drawing.Point(418, 24); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(262, 52); + this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem8.TextVisible = false; + // + // groupControl2 + // + this.groupControl2.Controls.Add(this.chartControl1); + this.groupControl2.Location = new System.Drawing.Point(12, 174); + this.groupControl2.Name = "groupControl2"; + this.groupControl2.ShowCaption = false; + this.groupControl2.Size = new System.Drawing.Size(981, 664); + this.groupControl2.TabIndex = 5; + this.groupControl2.Text = "鏁版嵁棰勮"; + // + // chartControl1 + // + xyDiagram1.AxisX.VisibleInPanesSerializable = "-1"; + xyDiagram1.AxisY.VisibleInPanesSerializable = "-1"; + this.chartControl1.Diagram = xyDiagram1; + this.chartControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.chartControl1.Location = new System.Drawing.Point(2, 2); + this.chartControl1.Name = "chartControl1"; + series1.Name = "鍘熷鍊�"; + series1.View = lineSeriesView1; + series2.Name = "淇鍚庣殑鍊�"; + series2.View = lineSeriesView2; + this.chartControl1.SeriesSerializable = new DevExpress.XtraCharts.Series[] { + series1, + series2}; + this.chartControl1.Size = new System.Drawing.Size(977, 660); + this.chartControl1.TabIndex = 0; + // + // groupControl1 + // + this.groupControl1.Controls.Add(this.dataLayoutControl2); + this.groupControl1.Location = new System.Drawing.Point(12, 12); + this.groupControl1.Name = "groupControl1"; + this.groupControl1.ShowCaption = false; + this.groupControl1.Size = new System.Drawing.Size(981, 54); + this.groupControl1.TabIndex = 4; + this.groupControl1.Text = "閰嶇疆"; + // + // dataLayoutControl2 + // + this.dataLayoutControl2.Controls.Add(this.simpleButton3); + this.dataLayoutControl2.Controls.Add(this.simpleButton1); + this.dataLayoutControl2.Controls.Add(this.imageComboBoxEdit1); + this.dataLayoutControl2.Controls.Add(this.checkEditIsPress); + this.dataLayoutControl2.Controls.Add(this.checkEditIsFlow); + this.dataLayoutControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl2.Location = new System.Drawing.Point(2, 2); + this.dataLayoutControl2.Name = "dataLayoutControl2"; + this.dataLayoutControl2.Root = this.layoutControlGroup1; + this.dataLayoutControl2.Size = new System.Drawing.Size(977, 50); + this.dataLayoutControl2.TabIndex = 5; + this.dataLayoutControl2.Text = "dataLayoutControl2"; + // + // simpleButton3 + // + this.simpleButton3.Location = new System.Drawing.Point(819, 12); + this.simpleButton3.Name = "simpleButton3"; + this.simpleButton3.Size = new System.Drawing.Size(146, 22); + this.simpleButton3.StyleController = this.dataLayoutControl2; + this.simpleButton3.TabIndex = 14; + this.simpleButton3.Text = "娓呯┖"; + this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click); + // + // simpleButton1 + // + this.simpleButton1.Location = new System.Drawing.Point(661, 12); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(154, 22); + this.simpleButton1.StyleController = this.dataLayoutControl2; + this.simpleButton1.TabIndex = 4; + this.simpleButton1.Text = "瀵煎叆鏁版嵁"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // imageComboBoxEdit1 + // + this.imageComboBoxEdit1.Location = new System.Drawing.Point(504, 12); + this.imageComboBoxEdit1.Name = "imageComboBoxEdit1"; + this.imageComboBoxEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.imageComboBoxEdit1.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { + new DevExpress.XtraEditors.Controls.ImageComboBoxItem("娴侀噺", "Flow", -1)}); + this.imageComboBoxEdit1.Size = new System.Drawing.Size(153, 20); + this.imageComboBoxEdit1.StyleController = this.dataLayoutControl2; + this.imageComboBoxEdit1.TabIndex = 2; + this.imageComboBoxEdit1.SelectedIndexChanged += new System.EventHandler(this.imageComboBoxEdit1_SelectedIndexChanged); + // + // checkEditIsPress + // + this.checkEditIsPress.Location = new System.Drawing.Point(217, 12); + this.checkEditIsPress.Name = "checkEditIsPress"; + this.checkEditIsPress.Properties.Caption = "鍚敤鍘嬪姏澶勭悊"; + this.checkEditIsPress.Size = new System.Drawing.Size(211, 20); + this.checkEditIsPress.StyleController = this.dataLayoutControl2; + this.checkEditIsPress.TabIndex = 1; + // + // checkEditIsFlow + // + this.checkEditIsFlow.Location = new System.Drawing.Point(12, 12); + this.checkEditIsFlow.Name = "checkEditIsFlow"; + this.checkEditIsFlow.Properties.Caption = "鍚敤娴侀噺澶勭悊"; + this.checkEditIsFlow.Size = new System.Drawing.Size(201, 20); + this.checkEditIsFlow.StyleController = this.dataLayoutControl2; + this.checkEditIsFlow.TabIndex = 0; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.GroupBordersVisible = false; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem4, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem9}); + this.layoutControlGroup1.Name = "Root"; + this.layoutControlGroup1.Size = new System.Drawing.Size(977, 50); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.checkEditIsFlow; + this.layoutControlItem4.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(205, 30); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.checkEditIsPress; + this.layoutControlItem5.Location = new System.Drawing.Point(205, 0); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(215, 30); + this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem5.TextVisible = false; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.imageComboBoxEdit1; + this.layoutControlItem6.Location = new System.Drawing.Point(420, 0); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(229, 30); + this.layoutControlItem6.Text = "澶勭悊鐩爣锛�"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.simpleButton1; + this.layoutControlItem7.Location = new System.Drawing.Point(649, 0); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(158, 30); + this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem7.TextVisible = false; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.simpleButton3; + this.layoutControlItem9.Location = new System.Drawing.Point(807, 0); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(150, 30); + this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem9.TextVisible = false; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem2, + this.layoutControlItem16}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(1005, 850); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.groupControl1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(985, 58); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.groupControl2; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 162); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(985, 668); + this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem2.TextVisible = false; + // + // layoutControlItem16 + // + this.layoutControlItem16.Control = this.groupControl3; + this.layoutControlItem16.Location = new System.Drawing.Point(0, 58); + this.layoutControlItem16.Name = "layoutControlItem16"; + this.layoutControlItem16.Size = new System.Drawing.Size(985, 104); + this.layoutControlItem16.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem16.TextVisible = false; + // + // checkEditIsControlInput1 + // + this.checkEditIsControlInput1.Location = new System.Drawing.Point(12, 36); + this.checkEditIsControlInput1.Name = "checkEditIsControlInput1"; + this.checkEditIsControlInput1.Properties.Caption = "鏄惁鎺у埗杈撳叆"; + this.checkEditIsControlInput1.Size = new System.Drawing.Size(184, 20); + this.checkEditIsControlInput1.TabIndex = 5; + // + // EboxFormDataFilter + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "EboxFormDataFilter"; + this.Size = new System.Drawing.Size(1005, 850); + this.Load += new System.EventHandler(this.EboxFormDataFilter_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.groupControl3)).EndInit(); + this.groupControl3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl3)).EndInit(); + this.dataLayoutControl3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsControlInput.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditControlInputValue.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditRValue.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditQValue.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditAValue.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditHValue.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem24)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.groupControl2)).EndInit(); + this.groupControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.groupControl1)).EndInit(); + this.groupControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).EndInit(); + this.dataLayoutControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.imageComboBoxEdit1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsPress.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsFlow.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsControlInput1.Properties)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.GroupControl groupControl1; + private DevExpress.XtraEditors.GroupControl groupControl2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.CheckEdit checkEditIsFlow; + private DevExpress.XtraEditors.CheckEdit checkEditIsPress; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraCharts.ChartControl chartControl1; + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraEditors.GroupControl groupControl3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl3; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; + private DevExpress.XtraEditors.CheckEdit checkEditIsControlInput; + private DevExpress.XtraEditors.TextEdit textEditControlInputValue; + private DevExpress.XtraEditors.TextEdit textEditRValue; + private DevExpress.XtraEditors.TextEdit textEditQValue; + private DevExpress.XtraEditors.TextEdit textEditAValue; + private DevExpress.XtraEditors.TextEdit textEditHValue; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem19; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem20; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem21; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem24; + private DevExpress.XtraEditors.CheckEdit checkEditIsControlInput1; + private DevExpress.XtraEditors.SimpleButton simpleButton3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraEditors.SimpleButton simpleButton4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.cs new file mode 100644 index 0000000..029eb9f --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.cs @@ -0,0 +1,306 @@ +锘縰sing DevExpress.XtraCharts; +using DevExpress.XtraEditors; +using System.IO; +using System.Text; +using Yw; +using Yw.WinFrmUI; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormDataFilter : DocumentPage + { + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getfilterCode = "getfilter"; + private string savefilterCode = "savefilter"; + public IBoxFormDataFilter() + { + InitializeComponent(); + imageComboBoxEdit1.EditValue = "Flow"; + InitChart(); + } + + + private void SetOrder(string order) + { + var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries); + if (smsg.Length < 2) + { + return; + } + + switch (smsg[0].Trim()) + { + case "datadownload": + //WaitFrmHelper.HideWaitForm(); + break; + } + } + + private void EboxFormDataFilter_Load(object sender, EventArgs e) + { + SendText(startCode + getfilterCode + paramCode + endCode); + } + + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + + public void BindData(IBoxFilterViewModel model, bool isBlue) + { + this.model = model; + checkEditIsFlow.Checked = model.IsFlowFilter; + checkEditIsPress.Checked = model.IsPressFilter ; + imageComboBoxEdit1_SelectedIndexChanged(null, null); + } + private Series _seriesOld, _seriesNew; + List<TimeValue> timeValuesOld_csv = new List<TimeValue>(); + List<TimeValue> timeValuesNew_csv = new List<TimeValue>(); + FilterKalman filterKalman = null; + + private void InitChart() + { + _seriesOld = this.chartControl1.GetSeriesByName("鍘熷鍊�"); + _seriesOld.CrosshairLabelPattern = " {A} 鍘熷鍊�: {V:N1}"; + _seriesNew = this.chartControl1.GetSeriesByName("淇鍚庣殑鍊�"); + _seriesNew.CrosshairLabelPattern = " {A} 淇鍚庣殑鍊�:{V:N1}"; + this.chartControl1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseWheel); + + ((XYDiagram)this.chartControl1.Diagram).AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Second; + } + + private void chart1_MouseWheel(object sender, MouseEventArgs e) + { + var ori_chart = sender as ChartControl; + XYDiagram diag = (XYDiagram)ori_chart.Diagram; + diag.ZoomingOptions.UseMouseWheel = true; + diag.ZoomingOptions.ZoomInMouseAction.ModifierKeys = ChartModifierKeys.None; + diag.EnableAxisXZooming = true; + diag.EnableAxisXScrolling = true; + + } + + private void ClearChart() + { + this.chartControl1.BeginInit(); + + timeValuesOld_csv = new List<TimeValue>(); + timeValuesNew_csv = new List<TimeValue>(); + //this.chartControl1.Visible = false; + _seriesNew.Points.Clear(); + _seriesOld.Points.Clear(); + _seriesNew.Visible = false; + _seriesOld.Visible = false; + this.chartControl1.EndInit(); + } + + private void simpleButton3_Click(object sender, EventArgs e) + { + ClearChart(); + } + + private void SetValue() + { + var uv = imageComboBoxEdit1.EditValue.ToString(); + if (uv.Equals("Flow")) + { + model.FlowFilterConfig = new IBoxFilterConfigViewModel() + { + IsControlInput = checkEditIsControlInput.Checked, + RValue = double.Parse(textEditRValue.Text), + QValue = double.Parse(textEditQValue.Text), + AValue = double.Parse(textEditAValue.Text), + HValue = double.Parse(textEditHValue.Text), + ControlInputValue = double.Parse(textEditControlInputValue.Text) + }; + } + if (uv.Equals("Press")) + { + model.PressFilterConfig = new IBoxFilterConfigViewModel() + { + IsControlInput = checkEditIsControlInput.Checked, + RValue = double.Parse(textEditRValue.Text), + QValue = double.Parse(textEditQValue.Text), + AValue = double.Parse(textEditAValue.Text), + HValue = double.Parse(textEditHValue.Text), + ControlInputValue = double.Parse(textEditControlInputValue.Text) + }; + } + } + private void simpleButton2_Click_1(object sender, EventArgs e) + { + var isControlInput = checkEditIsControlInput.Checked; + var RValue = double.Parse(textEditRValue.Text); + var QValue = double.Parse(textEditQValue.Text); + var AValue = double.Parse(textEditAValue.Text); + var HValue = double.Parse(textEditHValue.Text); + + + SetValue(); + + var controlInputValue = double.Parse(textEditControlInputValue.Text); + if (isControlInput) + { + filterKalman = new FilterKalman(RValue, QValue, AValue, 1, HValue); + } + else filterKalman = new FilterKalman(RValue, QValue); + this.chartControl1.BeginInit(); + timeValuesNew_csv = new List<TimeValue>(); + timeValuesOld_csv.ForEach(x => + { + if (isControlInput) + timeValuesNew_csv.Add(new TimeValue() { Time = x.Time, Value = filterKalman.filter(x.Value, controlInputValue) }); + else timeValuesNew_csv.Add(new TimeValue() { Time = x.Time, Value = filterKalman.filter(x.Value) }); + }); + timeValuesNew_csv.ForEach(x => + _seriesNew.Points.Add(new SeriesPoint(x.Time, x.Value)) + ); + //_seriesNew.BindToData(timeValuesNew_csv, "Time", "Value"); + this.chartControl1.EndInit(); + } + IBoxFilterViewModel model = new IBoxFilterViewModel(); + private void simpleButton4_Click(object sender, EventArgs e) + { + + model.IsFlowFilter = checkEditIsFlow.Checked; + model.IsPressFilter = checkEditIsPress.Checked; + SetValue(); + //var uv= imageComboBoxEdit1.EditValue.ToString(); + //if (model.IsFlowFilter) + //{ + // model.FlowFilterConfig = new EboxFilterConfigViewModel() + // { + // IsControlInput = checkEditIsControlInput.Checked, + // RValue = double.Parse(textEditRValue.Text), + // QValue = double.Parse(textEditQValue.Text), + // AValue = double.Parse(textEditAValue.Text), + // HValue = double.Parse(textEditHValue.Text), + // ControlInputValue = double.Parse(textEditControlInputValue.Text) + // }; + //} + //if (model.IsPressFilter) + //{ + // model.PressFilterConfig = new EboxFilterConfigViewModel() + // { + // IsControlInput = checkEditIsControlInput.Checked, + // RValue = double.Parse(textEditRValue.Text), + // QValue = double.Parse(textEditQValue.Text), + // AValue = double.Parse(textEditAValue.Text), + // HValue = double.Parse(textEditHValue.Text), + // ControlInputValue = double.Parse(textEditControlInputValue.Text) + // }; + //} + + SendText(startCode + savefilterCode + paramCode + JsonHelper.Object2Json(model) + endCode); + MessageBoxHelper.ShowInfo("淇濆瓨鎴愬姛"); + } + + private void imageComboBoxEdit1_SelectedIndexChanged(object sender, EventArgs e) + { + var uv = imageComboBoxEdit1.EditValue.ToString(); + if (model != null) + { + switch (uv) + { + case "Flow": + if (model.FlowFilterConfig != null) + { + textEditRValue.Text = model.FlowFilterConfig.RValue.ToString(); + textEditQValue.Text = model.FlowFilterConfig.QValue.ToString(); + textEditAValue.Text = model.FlowFilterConfig.AValue.ToString(); + textEditHValue.Text = model.FlowFilterConfig.HValue.ToString(); + textEditControlInputValue.Text = model.FlowFilterConfig.ControlInputValue.ToString(); + checkEditIsControlInput.Checked = model.FlowFilterConfig.IsControlInput; + } + break; + case "Press": + if (model.PressFilterConfig != null) + { + textEditRValue.Text = model.PressFilterConfig.RValue.ToString(); + textEditQValue.Text = model.PressFilterConfig.QValue.ToString(); + textEditAValue.Text = model.PressFilterConfig.AValue.ToString(); + textEditHValue.Text = model.PressFilterConfig.HValue.ToString(); + textEditControlInputValue.Text = model.PressFilterConfig.ControlInputValue.ToString(); + checkEditIsControlInput.Checked = model.PressFilterConfig.IsControlInput; + } + break; + } + } + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + #region Load + ClearChart(); + + var dlg = new OpenFileDialog(); + dlg.Filter = "Excel鏂囦欢(*.xls;*.xlsx;*.csv)|*.xls;*.xlsx;*.csv|鎵�鏈夋枃浠秥*.*"; + dlg.ValidateNames = true; + dlg.CheckPathExists = true; + dlg.CheckFileExists = true; + if (dlg.ShowDialog() != DialogResult.OK) + return; + WaitFormHelper.ShowWaitForm("姝e湪鍒嗘瀽..."); + var filePath = dlg.FileName; + var extension = Path.GetExtension(filePath); + + switch (extension) + { + case ".csv": + { + using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read)) + using (var sr = new StreamReader(fs, Encoding.UTF8)) + { + sr.ReadLine(); + var strLine = string.Empty; + while (!string.IsNullOrEmpty(strLine = sr.ReadLine())) + { + var strList = strLine.Split(','); + if (strList.Length < 2) + return; + if (!DateTime.TryParse(strList[0], out DateTime time)) + continue; + if (!double.TryParse(strList[1], out double value)) + continue; + if (value <= 0) + continue; + var timeValue = new TimeValue(time, value); + timeValuesOld_csv.Add(timeValue); + + } + } + } + break; + default: + { + WaitFormHelper.HideWaitForm(); + XtraMessageBox.Show("鏆備笉鏀寔璇ユ牸寮�!"); + return; + } + break; + } + WaitFormHelper.HideWaitForm(); + #endregion + + if (timeValuesOld_csv.Count < 1) + { + XtraMessageBox.Show("鏃犳暟鎹�!"); + return; + } + this.chartControl1.BeginInit(); + timeValuesOld_csv.ForEach(x => + { + _seriesOld.Points.Add(new SeriesPoint(x.Time, x.Value)); + }); + //_seriesOld.BindToData(timeValuesOld_csv, "Time", "Value"); + _seriesNew.Visible = true; + _seriesOld.Visible = true; + + this.chartControl1.EndInit(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormDataFilter.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.Designer.cs new file mode 100644 index 0000000..f5c0224 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.Designer.cs @@ -0,0 +1,619 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormEnergyAnalysis + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + DevExpress.XtraCharts.XYDiagram xyDiagram1 = new DevExpress.XtraCharts.XYDiagram(); + DevExpress.XtraCharts.SecondaryAxisY secondaryAxisY1 = new DevExpress.XtraCharts.SecondaryAxisY(); + DevExpress.XtraCharts.SecondaryAxisY secondaryAxisY2 = new DevExpress.XtraCharts.SecondaryAxisY(); + DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.SideBySideBarSeriesView sideBySideBarSeriesView1 = new DevExpress.XtraCharts.SideBySideBarSeriesView(); + DevExpress.XtraCharts.Series series2 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.SideBySideBarSeriesView sideBySideBarSeriesView2 = new DevExpress.XtraCharts.SideBySideBarSeriesView(); + DevExpress.XtraCharts.Series series3 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.LineSeriesView lineSeriesView1 = new DevExpress.XtraCharts.LineSeriesView(); + this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl(); + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.simpleButton5 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton6 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton(); + this.gridControl4 = new DevExpress.XtraGrid.GridControl(); + this.pumpEnergyViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.gridView4 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.colDate = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colSupply = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colElectricity = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colEneryOfWater = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.dateEditEndDate = new DevExpress.XtraEditors.DateEdit(); + this.dateEditStartDate = new DevExpress.XtraEditors.DateEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.dataLayoutControl2 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.chartControl1 = new DevExpress.XtraCharts.ChartControl(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit(); + this.splitContainerControl1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).BeginInit(); + this.splitContainerControl1.Panel2.SuspendLayout(); + this.splitContainerControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpEnergyViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).BeginInit(); + this.dataLayoutControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(secondaryAxisY1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(secondaryAxisY2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + this.SuspendLayout(); + // + // splitContainerControl1 + // + this.splitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainerControl1.Horizontal = false; + this.splitContainerControl1.Location = new System.Drawing.Point(0, 0); + this.splitContainerControl1.Name = "splitContainerControl1"; + // + // splitContainerControl1.Panel1 + // + this.splitContainerControl1.Panel1.Controls.Add(this.dataLayoutControl1); + this.splitContainerControl1.Panel1.Text = "Panel1"; + // + // splitContainerControl1.Panel2 + // + this.splitContainerControl1.Panel2.Controls.Add(this.dataLayoutControl2); + this.splitContainerControl1.Panel2.Text = "Panel2"; + this.splitContainerControl1.Size = new System.Drawing.Size(1033, 802); + this.splitContainerControl1.SplitterPosition = 213; + this.splitContainerControl1.TabIndex = 0; + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.simpleButton5); + this.dataLayoutControl1.Controls.Add(this.simpleButton6); + this.dataLayoutControl1.Controls.Add(this.simpleButton4); + this.dataLayoutControl1.Controls.Add(this.simpleButton3); + this.dataLayoutControl1.Controls.Add(this.gridControl4); + this.dataLayoutControl1.Controls.Add(this.simpleButton2); + this.dataLayoutControl1.Controls.Add(this.simpleButton1); + this.dataLayoutControl1.Controls.Add(this.dateEditEndDate); + this.dataLayoutControl1.Controls.Add(this.dateEditStartDate); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(1033, 213); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // simpleButton5 + // + this.simpleButton5.Location = new System.Drawing.Point(950, 12); + this.simpleButton5.Name = "simpleButton5"; + this.simpleButton5.Size = new System.Drawing.Size(71, 22); + this.simpleButton5.StyleController = this.dataLayoutControl1; + this.simpleButton5.TabIndex = 13; + this.simpleButton5.Text = "鏍¢獙"; + this.simpleButton5.Click += new System.EventHandler(this.simpleButton5_Click); + // + // simpleButton6 + // + this.simpleButton6.Location = new System.Drawing.Point(138, 12); + this.simpleButton6.Name = "simpleButton6"; + this.simpleButton6.Size = new System.Drawing.Size(85, 22); + this.simpleButton6.StyleController = this.dataLayoutControl1; + this.simpleButton6.TabIndex = 12; + this.simpleButton6.Text = "鍓嶅崐涓湀"; + this.simpleButton6.Click += new System.EventHandler(this.simpleButton6_Click); + // + // simpleButton4 + // + this.simpleButton4.Location = new System.Drawing.Point(79, 12); + this.simpleButton4.Name = "simpleButton4"; + this.simpleButton4.Size = new System.Drawing.Size(55, 22); + this.simpleButton4.StyleController = this.dataLayoutControl1; + this.simpleButton4.TabIndex = 10; + this.simpleButton4.Text = "鍓嶄竴涓湀"; + this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click); + // + // simpleButton3 + // + this.simpleButton3.Location = new System.Drawing.Point(12, 12); + this.simpleButton3.Name = "simpleButton3"; + this.simpleButton3.Size = new System.Drawing.Size(63, 22); + this.simpleButton3.StyleController = this.dataLayoutControl1; + this.simpleButton3.TabIndex = 9; + this.simpleButton3.Text = "鍓嶄笁涓湀"; + this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click); + // + // gridControl4 + // + this.gridControl4.DataSource = this.pumpEnergyViewModelBindingSource; + this.gridControl4.Location = new System.Drawing.Point(12, 38); + this.gridControl4.MainView = this.gridView4; + this.gridControl4.Name = "gridControl4"; + this.gridControl4.Size = new System.Drawing.Size(1009, 163); + this.gridControl4.TabIndex = 8; + this.gridControl4.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView4}); + // + // pumpEnergyViewModelBindingSource + // + this.pumpEnergyViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.PumpEnergyViewModel); + // + // gridView4 + // + this.gridView4.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colDate, + this.colSupply, + this.colElectricity, + this.colEneryOfWater, + this.gridColumn1}); + this.gridView4.GridControl = this.gridControl4; + this.gridView4.Name = "gridView4"; + this.gridView4.OptionsBehavior.Editable = false; + this.gridView4.OptionsView.ShowGroupPanel = false; + this.gridView4.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView4_CustomColumnDisplayText); + // + // colDate + // + this.colDate.AppearanceCell.Options.UseTextOptions = true; + this.colDate.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colDate.AppearanceHeader.Options.UseTextOptions = true; + this.colDate.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colDate.Caption = "鏃ユ湡"; + this.colDate.FieldName = "Day"; + this.colDate.MaxWidth = 150; + this.colDate.Name = "colDate"; + this.colDate.Visible = true; + this.colDate.VisibleIndex = 0; + this.colDate.Width = 150; + // + // colSupply + // + this.colSupply.AppearanceCell.Options.UseTextOptions = true; + this.colSupply.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colSupply.AppearanceHeader.Options.UseTextOptions = true; + this.colSupply.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colSupply.Caption = "鐢ㄦ按閲�(m鲁)"; + this.colSupply.FieldName = "Supply"; + this.colSupply.MaxWidth = 250; + this.colSupply.Name = "colSupply"; + this.colSupply.Visible = true; + this.colSupply.VisibleIndex = 1; + this.colSupply.Width = 250; + // + // colElectricity + // + this.colElectricity.AppearanceCell.Options.UseTextOptions = true; + this.colElectricity.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colElectricity.AppearanceHeader.Options.UseTextOptions = true; + this.colElectricity.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colElectricity.Caption = "鐢ㄧ數閲�(kW路h)"; + this.colElectricity.FieldName = "Electricity"; + this.colElectricity.MaxWidth = 250; + this.colElectricity.Name = "colElectricity"; + this.colElectricity.Visible = true; + this.colElectricity.VisibleIndex = 2; + this.colElectricity.Width = 250; + // + // colEneryOfWater + // + this.colEneryOfWater.AppearanceCell.Options.UseTextOptions = true; + this.colEneryOfWater.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colEneryOfWater.AppearanceHeader.Options.UseTextOptions = true; + this.colEneryOfWater.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colEneryOfWater.Caption = "鍗冨惃姘磋兘鑰�(kW路h/km鲁)"; + this.colEneryOfWater.FieldName = "EnergyOfWater"; + this.colEneryOfWater.MaxWidth = 250; + this.colEneryOfWater.Name = "colEneryOfWater"; + this.colEneryOfWater.Visible = true; + this.colEneryOfWater.VisibleIndex = 3; + this.colEneryOfWater.Width = 250; + // + // gridColumn1 + // + this.gridColumn1.AppearanceCell.Options.UseTextOptions = true; + this.gridColumn1.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.gridColumn1.AppearanceHeader.Options.UseTextOptions = true; + this.gridColumn1.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.gridColumn1.Caption = "璇存槑"; + this.gridColumn1.Name = "gridColumn1"; + this.gridColumn1.Visible = true; + this.gridColumn1.VisibleIndex = 4; + this.gridColumn1.Width = 84; + // + // simpleButton2 + // + this.simpleButton2.Location = new System.Drawing.Point(875, 12); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(71, 22); + this.simpleButton2.StyleController = this.dataLayoutControl1; + this.simpleButton2.TabIndex = 7; + this.simpleButton2.Text = "瀵煎嚭"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // simpleButton1 + // + this.simpleButton1.Location = new System.Drawing.Point(790, 12); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(81, 22); + this.simpleButton1.StyleController = this.dataLayoutControl1; + this.simpleButton1.TabIndex = 6; + this.simpleButton1.Text = "鏌ヨ"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // dateEditEndDate + // + this.dateEditEndDate.EditValue = null; + this.dateEditEndDate.Location = new System.Drawing.Point(490, 12); + this.dateEditEndDate.Name = "dateEditEndDate"; + this.dateEditEndDate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditEndDate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditEndDate.Size = new System.Drawing.Size(145, 20); + this.dateEditEndDate.StyleController = this.dataLayoutControl1; + this.dateEditEndDate.TabIndex = 5; + // + // dateEditStartDate + // + this.dateEditStartDate.EditValue = null; + this.dateEditStartDate.Location = new System.Drawing.Point(287, 12); + this.dateEditStartDate.Name = "dateEditStartDate"; + this.dateEditStartDate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditStartDate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditStartDate.Size = new System.Drawing.Size(139, 20); + this.dateEditStartDate.StyleController = this.dataLayoutControl1; + this.dateEditStartDate.TabIndex = 4; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem2, + this.layoutControlItem3, + this.layoutControlItem4, + this.emptySpaceItem2, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem9, + this.layoutControlItem10}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(1033, 213); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.dateEditStartDate; + this.layoutControlItem1.Location = new System.Drawing.Point(215, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(203, 26); + this.layoutControlItem1.Text = "寮�濮嬫棩鏈�"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.dateEditEndDate; + this.layoutControlItem2.Location = new System.Drawing.Point(418, 0); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(209, 26); + this.layoutControlItem2.Text = "缁撴潫鏃ユ湡"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.simpleButton1; + this.layoutControlItem3.Location = new System.Drawing.Point(778, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(85, 26); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.simpleButton2; + this.layoutControlItem4.Location = new System.Drawing.Point(863, 0); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(75, 26); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(627, 0); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(151, 26); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.gridControl4; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 26); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(1013, 167); + this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem5.TextVisible = false; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.simpleButton3; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(67, 26); + this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem6.TextVisible = false; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.simpleButton4; + this.layoutControlItem7.Location = new System.Drawing.Point(67, 0); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(59, 26); + this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem7.TextVisible = false; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.simpleButton6; + this.layoutControlItem9.Location = new System.Drawing.Point(126, 0); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(89, 26); + this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem9.TextVisible = false; + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.simpleButton5; + this.layoutControlItem10.Location = new System.Drawing.Point(938, 0); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(75, 26); + this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem10.TextVisible = false; + // + // dataLayoutControl2 + // + this.dataLayoutControl2.Controls.Add(this.chartControl1); + this.dataLayoutControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl2.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl2.Name = "dataLayoutControl2"; + this.dataLayoutControl2.Root = this.layoutControlGroup1; + this.dataLayoutControl2.Size = new System.Drawing.Size(1033, 579); + this.dataLayoutControl2.TabIndex = 0; + this.dataLayoutControl2.Text = "dataLayoutControl2"; + // + // chartControl1 + // + xyDiagram1.AxisX.Title.Text = ""; + xyDiagram1.AxisX.VisibleInPanesSerializable = "-1"; + xyDiagram1.AxisY.Color = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(73)))), ((int)(((byte)(125))))); + xyDiagram1.AxisY.Title.Text = "鐢ㄦ按閲�"; + xyDiagram1.AxisY.Title.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(73)))), ((int)(((byte)(125))))); + xyDiagram1.AxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.Default; + xyDiagram1.AxisY.VisibleInPanesSerializable = "-1"; + secondaryAxisY1.AxisID = 0; + secondaryAxisY1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(146)))), ((int)(((byte)(60))))); + secondaryAxisY1.Name = "axisYQds"; + secondaryAxisY1.Title.Text = "鍗冨惃姘磋兘鑰�"; + secondaryAxisY1.Title.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(146)))), ((int)(((byte)(60))))); + secondaryAxisY1.Title.Visibility = DevExpress.Utils.DefaultBoolean.True; + secondaryAxisY1.VisibleInPanesSerializable = "-1"; + secondaryAxisY2.Alignment = DevExpress.XtraCharts.AxisAlignment.Near; + secondaryAxisY2.AxisID = 1; + secondaryAxisY2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(149)))), ((int)(((byte)(55)))), ((int)(((byte)(52))))); + secondaryAxisY2.Name = "axisYYdl"; + secondaryAxisY2.Title.Text = "鐢ㄧ數閲�"; + secondaryAxisY2.Title.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(149)))), ((int)(((byte)(55)))), ((int)(((byte)(52))))); + secondaryAxisY2.Title.Visibility = DevExpress.Utils.DefaultBoolean.True; + secondaryAxisY2.VisibleInPanesSerializable = "-1"; + xyDiagram1.SecondaryAxesY.AddRange(new DevExpress.XtraCharts.SecondaryAxisY[] { + secondaryAxisY1, + secondaryAxisY2}); + this.chartControl1.Diagram = xyDiagram1; + this.chartControl1.Legend.Margins.Bottom = 20; + this.chartControl1.Legend.Margins.Left = 20; + this.chartControl1.Legend.Margins.Right = 20; + this.chartControl1.Legend.Margins.Top = 20; + this.chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; + this.chartControl1.Location = new System.Drawing.Point(12, 12); + this.chartControl1.Name = "chartControl1"; + series1.Name = "SeriesYdl"; + sideBySideBarSeriesView1.AxisYName = "axisYYdl"; + sideBySideBarSeriesView1.Border.Color = System.Drawing.Color.FromArgb(((int)(((byte)(149)))), ((int)(((byte)(55)))), ((int)(((byte)(52))))); + sideBySideBarSeriesView1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(149)))), ((int)(((byte)(55)))), ((int)(((byte)(52))))); + series1.View = sideBySideBarSeriesView1; + series2.Name = "SeriesYsl"; + sideBySideBarSeriesView2.Border.Color = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(73)))), ((int)(((byte)(125))))); + sideBySideBarSeriesView2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(73)))), ((int)(((byte)(125))))); + series2.View = sideBySideBarSeriesView2; + series3.Name = "SeriesQds"; + lineSeriesView1.AxisYName = "axisYQds"; + lineSeriesView1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(146)))), ((int)(((byte)(60))))); + series3.View = lineSeriesView1; + this.chartControl1.SeriesSerializable = new DevExpress.XtraCharts.Series[] { + series1, + series2, + series3}; + this.chartControl1.Size = new System.Drawing.Size(1009, 555); + this.chartControl1.TabIndex = 4; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.GroupBordersVisible = false; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem8}); + this.layoutControlGroup1.Name = "layoutControlGroup1"; + this.layoutControlGroup1.Size = new System.Drawing.Size(1033, 579); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.chartControl1; + this.layoutControlItem8.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(1013, 559); + this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem8.TextVisible = false; + // + // EboxFormEnergyAnalysis + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.splitContainerControl1); + this.Name = "EboxFormEnergyAnalysis"; + this.Size = new System.Drawing.Size(1033, 802); + this.Load += new System.EventHandler(this.EboxFormEnergyAnalysis_Load); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit(); + this.splitContainerControl1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).EndInit(); + this.splitContainerControl1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit(); + this.splitContainerControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpEnergyViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).EndInit(); + this.dataLayoutControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(secondaryAxisY1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(secondaryAxisY2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1; + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraEditors.DateEdit dateEditEndDate; + private DevExpress.XtraEditors.DateEdit dateEditStartDate; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + private DevExpress.XtraGrid.GridControl gridControl4; + private DevExpress.XtraGrid.Views.Grid.GridView gridView4; + private DevExpress.XtraGrid.Columns.GridColumn colDate; + private DevExpress.XtraGrid.Columns.GridColumn colSupply; + private DevExpress.XtraGrid.Columns.GridColumn colElectricity; + private DevExpress.XtraGrid.Columns.GridColumn colEneryOfWater; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraEditors.SimpleButton simpleButton6; + private DevExpress.XtraEditors.SimpleButton simpleButton4; + private DevExpress.XtraEditors.SimpleButton simpleButton3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private System.Windows.Forms.BindingSource pumpEnergyViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl2; + private DevExpress.XtraCharts.ChartControl chartControl1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraEditors.SimpleButton simpleButton5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.cs new file mode 100644 index 0000000..4f4f2b2 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.cs @@ -0,0 +1,231 @@ +锘縰sing DevExpress.XtraCharts; +using DevExpress.XtraEditors; +using NPOI.HSSF.UserModel; +using NPOI.SS.UserModel; +using System.IO; +using Yw; +using Yw.WinFrmUI; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormEnergyAnalysis : DocumentPage + { + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getenergyanalyCode = "getenergyanaly";//鑾峰彇鑳借�楀垎鏋愭暟鎹� + private string analydayCode = "analyday";//鏍¢獙鑳借�楀垎鏋� + + public IBoxFormEnergyAnalysis() + { + this.PageTitle.Caption = "鑳借�楀垎鏋�"; + InitializeComponent(); + + _series_ysl.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True; + _series_ydl.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True; + _series_qds.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True; + + ((SideBySideBarSeriesLabel)_series_ysl.Label).Position = BarSeriesLabelPosition.Top; + ((SideBySideBarSeriesLabel)_series_ydl.Label).Position = BarSeriesLabelPosition.Top; + + _series_ysl.CrosshairLabelPattern = "鐢ㄦ按閲�:{V:N2} m鲁"; + _series_ydl.CrosshairLabelPattern = "鐢ㄧ數閲�:{V:N2} kW路h"; + _series_qds.CrosshairLabelPattern = "鍗冨惃姘磋兘鑰�:{V:N2} kW路h/km鲁"; + } + + private void InitDate() + { + this.dateEditStartDate.Text = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"); + this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); + } + + List<PumpEnergyViewModel> _models; + public void BindData(List<PumpEnergyViewModel> models) + { + _models = models; + this.pumpEnergyViewModelBindingSource.DataSource = models; + this.gridView4.RefreshData(); + SetChart(models); + } + + // private XYDiagram _diagram_xy { get { return this.chartControl1.Diagram as XYDiagram; } } + private Series _series_ysl { get { return this.chartControl1.Series[1]; } } + private Series _series_ydl { get { return this.chartControl1.Series[0]; } } + private Series _series_qds { get { return this.chartControl1.Series[2]; } } + + private void SetChart(List<PumpEnergyViewModel> models) + { + this.chartControl1.BeginInit(); + + _series_ysl.Points.Clear(); + _series_ydl.Points.Clear(); + _series_qds.Points.Clear(); + foreach (var item in models) + { + _series_ysl.Points.Add(new SeriesPoint(item.Day, item.Supply)); + _series_ydl.Points.Add(new SeriesPoint(item.Day, item.Electricity)); + _series_qds.Points.Add(new SeriesPoint(item.Day, item.EnergyOfWater)); + } + + + this.chartControl1.EndInit(); + } + + private void EboxFormEnergyAnalysis_Load(object sender, EventArgs e) + { + InitDate(); + Search(); + } + + private void Search() + { + var m = new GetCalcValueModel() + { + StartDate = DateTime.Parse(this.dateEditStartDate.EditValue.ToString()), + EndDate = DateTime.Parse(this.dateEditEndDate.EditValue.ToString()), + }; + + SendText(startCode + getenergyanalyCode + paramCode + JsonHelper.Object2Json(m) + endCode); + } + + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + /// <summary> + /// 鏌ヨ + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton1_Click(object sender, EventArgs e) + { + Search(); + } + + /// <summary> + /// 瀵煎嚭 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton2_Click(object sender, EventArgs e) + { + ExportXLS(); + } + + public void ExportXLS() + { + try + { + if (_models == null || _models.Count == 0) + { + XtraMessageBox.Show("娌℃湁鍙鍑虹殑鏁版嵁!"); + return; + } + + var dlg = new SaveFileDialog(); + dlg.Filter = "EXCEL 鏂囦欢(*.xls)|*.xls"; + if (dlg.ShowDialog() != DialogResult.OK) + return; + + HSSFWorkbook theBook = new HSSFWorkbook(); + var theSheet1 = theBook.CreateSheet("Sheet1"); + + IRow rowTile = theSheet1.CreateRow(0); + rowTile.CreateCell(0).SetCellValue("鏃ユ湡"); + rowTile.CreateCell(1).SetCellValue("鐢ㄦ按閲�(m鲁)"); + rowTile.CreateCell(2).SetCellValue("鐢ㄧ數閲�(kW路h)"); + rowTile.CreateCell(3).SetCellValue("鍗冨惃姘磋兘鑰�(kW路h/km鲁)"); + + + for (int rowIndex = 1; rowIndex <= _models.Count; rowIndex++) + { + int col = 0; + IRow row = theSheet1.CreateRow(rowIndex); + var celValue = _models[rowIndex - 1].Day; + var dt = DateTime.Parse(celValue); + row.CreateCell(col).SetCellValue(celValue + " " + dt.ToString("dddd")); + col++; + row.CreateCell(col).SetCellValue((double)_models[rowIndex - 1].Supply); + col++; + row.CreateCell(col).SetCellValue((double)_models[rowIndex - 1].Electricity); + col++; + row.CreateCell(col).SetCellValue((double)_models[rowIndex - 1].EnergyOfWater); + col++; + } + + //寮哄埗Excel鍦ㄦ墦寮�鏃堕噸鏂拌绠楁墍鏈夊叕寮� + theSheet1.ForceFormulaRecalculation = true; + using (FileStream fs = File.OpenWrite(dlg.FileName)) + { + theBook.Write(fs); + } + XtraMessageBox.Show("瀵煎嚭鎴愬姛"); + + } + catch (Exception ex) + { + XtraMessageBox.Show(ex.ToString()); + } + } + + /// <summary> + /// 鍓嶄笁涓湀 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton3_Click(object sender, EventArgs e) + { + this.dateEditStartDate.Text = DateTime.Now.AddMonths(-30).ToString("yyyy-MM-dd"); + this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); + Search(); + } + + /// <summary> + /// 鍓嶄竴涓湀 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton4_Click(object sender, EventArgs e) + { + this.dateEditStartDate.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd"); + this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); + Search(); + } + + /// <summary> + /// 鍓嶅崐涓湀 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton6_Click(object sender, EventArgs e) + { + this.dateEditStartDate.Text = DateTime.Now.AddDays(-15).ToString("yyyy-MM-dd"); + this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); + Search(); + } + + private void simpleButton5_Click(object sender, EventArgs e) + { + var dlg = new AnalyDayForm(); + if (dlg.ShowDialog() == DialogResult.OK) + { + var dt = dlg.CurrDateTime; + SendText(startCode + analydayCode + paramCode + dt + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + } + } + + private void gridView4_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) + { + if (e.Column.FieldName == "Day") + { + var celValue = e.Value.ToString(); + var dt = DateTime.Parse(celValue); + e.DisplayText = celValue + " " + dt.ToString("dddd"); + } + } + } + +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.resx new file mode 100644 index 0000000..e837ff8 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.resx @@ -0,0 +1,126 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="pumpEnergyViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>25</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.Designer.cs new file mode 100644 index 0000000..66fdf32 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.Designer.cs @@ -0,0 +1,434 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormLog + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.dataLayoutControl2 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.dateEditEndDate = new DevExpress.XtraEditors.DateEdit(); + this.dateEditStartDate = new DevExpress.XtraEditors.DateEdit(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.eboxLogViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.colEventTime = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colLogEvent = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colLogResult = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colLogContent = new DevExpress.XtraGrid.Columns.GridColumn(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).BeginInit(); + this.dataLayoutControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxLogViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageComboBoxEdit1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageComboBoxEdit2.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.dataLayoutControl2); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(1144, 753); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // dataLayoutControl2 + // + this.dataLayoutControl2.Controls.Add(this.dateEditEndDate); + this.dataLayoutControl2.Controls.Add(this.dateEditStartDate); + this.dataLayoutControl2.Controls.Add(this.gridControl1); + this.dataLayoutControl2.Controls.Add(this.simpleButton2); + this.dataLayoutControl2.Controls.Add(this.simpleButton1); + this.dataLayoutControl2.Controls.Add(this.imageComboBoxEdit1); + this.dataLayoutControl2.Controls.Add(this.imageComboBoxEdit2); + this.dataLayoutControl2.Location = new System.Drawing.Point(12, 12); + this.dataLayoutControl2.Name = "dataLayoutControl2"; + this.dataLayoutControl2.Root = this.layoutControlGroup1; + this.dataLayoutControl2.Size = new System.Drawing.Size(1120, 729); + this.dataLayoutControl2.TabIndex = 4; + this.dataLayoutControl2.Text = "dataLayoutControl2"; + // + // dateEditEndDate + // + this.dateEditEndDate.EditValue = null; + this.dateEditEndDate.Location = new System.Drawing.Point(255, 12); + this.dateEditEndDate.Name = "dateEditEndDate"; + this.dateEditEndDate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditEndDate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditEndDate.Size = new System.Drawing.Size(121, 20); + this.dateEditEndDate.StyleController = this.dataLayoutControl2; + this.dateEditEndDate.TabIndex = 8; + // + // dateEditStartDate + // + this.dateEditStartDate.EditValue = null; + this.dateEditStartDate.Location = new System.Drawing.Point(72, 12); + this.dateEditStartDate.Name = "dateEditStartDate"; + this.dateEditStartDate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditStartDate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditStartDate.Size = new System.Drawing.Size(119, 20); + this.dateEditStartDate.StyleController = this.dataLayoutControl2; + this.dateEditStartDate.TabIndex = 7; + // + // gridControl1 + // + this.gridControl1.DataSource = this.eboxLogViewModelBindingSource; + this.gridControl1.Location = new System.Drawing.Point(12, 38); + this.gridControl1.MainView = this.gridView1; + this.gridControl1.Name = "gridControl1"; + this.gridControl1.Size = new System.Drawing.Size(1096, 669); + this.gridControl1.TabIndex = 6; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // eboxLogViewModelBindingSource + // + this.eboxLogViewModelBindingSource.DataSource = typeof(IBoxLogViewModel); + // + // gridView1 + // + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colEventTime, + this.colLogEvent, + this.colLogResult, + this.colLogContent}); + this.gridView1.GridControl = this.gridControl1; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsBehavior.Editable = false; + this.gridView1.OptionsView.ShowGroupPanel = false; + this.gridView1.CustomDrawCell += new DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventHandler(this.gridView1_CustomDrawCell); + this.gridView1.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView1_CustomColumnDisplayText); + // + // colEventTime + // + this.colEventTime.Caption = "鏃堕棿"; + this.colEventTime.FieldName = "EventTime"; + this.colEventTime.MaxWidth = 200; + this.colEventTime.Name = "colEventTime"; + this.colEventTime.Visible = true; + this.colEventTime.VisibleIndex = 0; + this.colEventTime.Width = 200; + // + // colLogEvent + // + this.colLogEvent.Caption = "浜嬩欢鍚嶇О"; + this.colLogEvent.FieldName = "LogEvent"; + this.colLogEvent.MaxWidth = 100; + this.colLogEvent.Name = "colLogEvent"; + this.colLogEvent.Visible = true; + this.colLogEvent.VisibleIndex = 1; + this.colLogEvent.Width = 100; + // + // colLogResult + // + this.colLogResult.Caption = "浜嬩欢缁撴灉"; + this.colLogResult.FieldName = "LogResult"; + this.colLogResult.MinWidth = 150; + this.colLogResult.Name = "colLogResult"; + this.colLogResult.Visible = true; + this.colLogResult.VisibleIndex = 2; + this.colLogResult.Width = 150; + // + // colLogContent + // + this.colLogContent.Caption = "鍐呭"; + this.colLogContent.FieldName = "LogContent"; + this.colLogContent.Name = "colLogContent"; + this.colLogContent.Visible = true; + this.colLogContent.VisibleIndex = 3; + this.colLogContent.Width = 621; + // + // simpleButton2 + // + this.simpleButton2.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.simpleButton2.Appearance.Options.UseBackColor = true; + this.simpleButton2.Location = new System.Drawing.Point(1004, 12); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(104, 22); + this.simpleButton2.StyleController = this.dataLayoutControl2; + this.simpleButton2.TabIndex = 5; + this.simpleButton2.Text = "娓呯┖"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // simpleButton1 + // + this.simpleButton1.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.simpleButton1.Appearance.Options.UseBackColor = true; + this.simpleButton1.Location = new System.Drawing.Point(912, 12); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(88, 22); + this.simpleButton1.StyleController = this.dataLayoutControl2; + this.simpleButton1.TabIndex = 4; + this.simpleButton1.Text = "鏌ヨ"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // imageComboBoxEdit1 + // + this.imageComboBoxEdit1.Location = new System.Drawing.Point(440, 12); + this.imageComboBoxEdit1.Name = "imageComboBoxEdit1"; + this.imageComboBoxEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.imageComboBoxEdit1.Size = new System.Drawing.Size(116, 20); + this.imageComboBoxEdit1.StyleController = this.dataLayoutControl2; + this.imageComboBoxEdit1.TabIndex = 9; + // + // imageComboBoxEdit2 + // + this.imageComboBoxEdit2.Location = new System.Drawing.Point(620, 12); + this.imageComboBoxEdit2.Name = "imageComboBoxEdit2"; + this.imageComboBoxEdit2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.imageComboBoxEdit2.Size = new System.Drawing.Size(142, 20); + this.imageComboBoxEdit2.StyleController = this.dataLayoutControl2; + this.imageComboBoxEdit2.TabIndex = 10; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.GroupBordersVisible = false; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem2, + this.emptySpaceItem1, + this.layoutControlItem3, + this.layoutControlItem4, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem8, + this.emptySpaceItem2}); + this.layoutControlGroup1.Name = "layoutControlGroup1"; + this.layoutControlGroup1.Size = new System.Drawing.Size(1120, 729); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.simpleButton1; + this.layoutControlItem2.Location = new System.Drawing.Point(900, 0); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(92, 26); + this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem2.TextVisible = false; + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 699); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(1100, 10); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.simpleButton2; + this.layoutControlItem3.Location = new System.Drawing.Point(992, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(108, 26); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.gridControl1; + this.layoutControlItem4.Location = new System.Drawing.Point(0, 26); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(1100, 673); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.dateEditStartDate; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(183, 26); + this.layoutControlItem5.Text = "寮�濮嬫棩鏈�"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.dateEditEndDate; + this.layoutControlItem6.Location = new System.Drawing.Point(183, 0); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(185, 26); + this.layoutControlItem6.Text = "缁撴潫鏃ユ湡"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.imageComboBoxEdit1; + this.layoutControlItem7.Location = new System.Drawing.Point(368, 0); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(180, 26); + this.layoutControlItem7.Text = "浜嬩欢鍚嶇О"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.imageComboBoxEdit2; + this.layoutControlItem8.Location = new System.Drawing.Point(548, 0); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(206, 26); + this.layoutControlItem8.Text = "浜嬩欢缁撴灉"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(48, 14); + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(1144, 753); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.dataLayoutControl2; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(1124, 733); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(754, 0); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(146, 26); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // EboxFormLog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "EboxFormLog"; + this.Size = new System.Drawing.Size(1144, 753); + this.Load += new System.EventHandler(this.EboxFormLog_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).EndInit(); + this.dataLayoutControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxLogViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageComboBoxEdit1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageComboBoxEdit2.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private System.Windows.Forms.BindingSource eboxLogViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colLogEvent; + private DevExpress.XtraGrid.Columns.GridColumn colLogResult; + private DevExpress.XtraGrid.Columns.GridColumn colEventTime; + private DevExpress.XtraGrid.Columns.GridColumn colLogContent; + private DevExpress.XtraEditors.DateEdit dateEditEndDate; + private DevExpress.XtraEditors.DateEdit dateEditStartDate; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.cs new file mode 100644 index 0000000..dd2086f --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.cs @@ -0,0 +1,245 @@ +锘縰sing Yw; +using Yw.WinFrmUI; + + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormLog : DocumentPage + { + + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getlogCode = "getlog"; + private string clearlogCode = "clearlog"; + public IBoxFormLog() + { + this.PageTitle.Caption = "鏃ュ織绠$悊"; + InitializeComponent(); + } + + private void EboxFormLog_Load(object sender, EventArgs e) + { + //BluetoothHelper.GetInstance().SMR -= null; + //BluetoothHelper.GetInstance().SMR += new BluetoothHelper.ShowMessReturn(GetReceive); + //BluetoothHelper.GetInstance().ListenerData(); + this.dateEditStartDate.EditValue = DateTime.Now.ToString("yyyy-MM-dd"); + this.dateEditEndDate.EditValue = DateTime.Now.ToString("yyyy-MM-dd"); + SetData(); + var m = new GetCalcValueModel() + { + StartDate = DateTime.Parse(this.dateEditStartDate.EditValue.ToString()), + EndDate = DateTime.Parse(this.dateEditEndDate.EditValue.ToString()), + LogEvent = "", + LogResult = "" + }; + + SendText(startCode + getlogCode + paramCode + JsonHelper.Object2Json(m) + endCode); + } + + private void SetData() + { + var dic = GetDic(); + imageComboBoxEdit1.Properties.Items.Add("鍏ㄩ儴", "", -1); + foreach (var item in dic) + { + imageComboBoxEdit1.Properties.Items.Add(item.Value, item.Key, -1); + } + + imageComboBoxEdit2.Properties.Items.Add("鍏ㄩ儴", "", -1); + imageComboBoxEdit2.Properties.Items.Add("鎴愬姛", "success", -1); + imageComboBoxEdit2.Properties.Items.Add("鎻愮ず", "info", -1); + imageComboBoxEdit2.Properties.Items.Add("澶辫触", "fail", -1); + imageComboBoxEdit2.Properties.Items.Add("寮傚父", "error", -1); + + imageComboBoxEdit1.SelectedIndex = 0; + imageComboBoxEdit2.SelectedIndex = 0; + + } + + public void GetReceive(string msg) + { + if (!this.IsHandleCreated || this.IsDisposed || string.IsNullOrEmpty(msg)) return; + if (msg.StartsWith("error:") && msg.Contains("鐩爣涓绘満鍧忎簡")) + { + MessageBoxHelper.ShowWarning("l 钃濈墮璁惧杩炴帴澶辫触锛岃閲嶈瘯!"); return; + } + if (!string.IsNullOrEmpty(msg) && msg.Contains(startCode)) + { + var order = msg.Replace(endCode, "").Replace(startCode, "").Trim(); + SetOrder(order); + } + else MessageBoxHelper.ShowWarning("l 钃濈墮璁惧杩炴帴澶辫触"); + } + + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + + private void SetOrder(string order) + { + var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries); + if (smsg.Length < 2) + { + return; + } + + switch (smsg[0].Trim()) + { + case "getlog": + var getloglist = JsonHelper.Json2Object<List<IBoxLogViewModel>>(smsg[1].Trim()); + BindData(getloglist); + break; + } + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + //鏌ヨ + //SendText(startCode + getlogCode + paramCode + endCode); + //this.dateEditStartDate.EditValue = DateTime.Now.ToString("yyyy-MM-dd"); + //this.dateEditEndDate.EditValue = DateTime.Now.ToString("yyyy-MM-dd"); + var m = new GetCalcValueModel() + { + StartDate = DateTime.Parse(this.dateEditStartDate.EditValue.ToString()), + EndDate = DateTime.Parse(this.dateEditEndDate.EditValue.ToString()), + LogResult = imageComboBoxEdit2.EditValue?.ToString(), + LogEvent = imageComboBoxEdit1.EditValue?.ToString() + }; + + SendText(startCode + getlogCode + paramCode + JsonHelper.Object2Json(m) + endCode); + } + + private void simpleButton2_Click(object sender, EventArgs e) + { + //娓呯┖ + this.Invoke(new Action(() => + { + eboxLogViewModelBindingSource.DataSource = null; + this.gridView1.RefreshData(); + })); + SendText(startCode + clearlogCode + paramCode + endCode); + } + + private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) + { + + if (e.Column.FieldName == "LogResult") + { + var celValue = e.CellValue.ToString(); + var celNewValue = "鎴愬姛"; + switch (celValue) + { + case "info": + celNewValue = "鎻愮ず"; + e.Appearance.ForeColor = Color.Blue; + break; + case "fail": + celNewValue = "澶辫触"; + e.Appearance.ForeColor = Color.Coral; + break; + case "error": + celNewValue = "寮傚父"; + e.Appearance.ForeColor = Color.Red; + break; + default: + celNewValue = "鎴愬姛"; + e.Appearance.ForeColor = Color.Green; + break; + } + e.CellValue = celNewValue; + } + } + + private Dictionary<string, string> GetDic() + { + + return new Dictionary<string, string> + { + //{ "heartbeat", "蹇冭烦" }, + //{ "getbase", "鑾峰彇鍩虹淇℃伅" }, + //{ "getrules", "鑾峰彇瑙勫垯淇℃伅" }, + //{ "saverules", "淇濆瓨瑙勫垯淇℃伅" }, + //{ "getprotocol", "鑾峰彇鍗忚閰嶇疆" }, + //{ "saveprotocol", "淇濆瓨鍗忚閰嶇疆" }, + //{ "getalarmbysignalid", "鑾峰彇鍗曚釜淇″彿鎶ヨ淇℃伅" }, + //{ "getalarmbyday", "鎸夊ぉ鏌ヨ鎶ヨ淇℃伅" }, + //{ "getbysignalidofdayrange", "鏍规嵁鏃ユ湡鑼冨洿鏌ヨ鎶ヨ淇℃伅" }, + //{ "getrealrecord", "鏌ヨ瀹炴椂鏁版嵁" }, + //{ "datadownload", "鏁版嵁涓嬪彂" }, + //{ "gethistoryrecord", "鏌ヨ鍗曚釜淇″彿鍘嗗彶鏁版嵁" }, + //{ "getlog", "鑾峰彇鏃ュ織" }, + //{ "clearlog", "娓呯┖鏃ュ織" }, + //{ "getparams", "鑾峰彇鍙傛暟閰嶇疆" }, + //{ "saveparams", "淇濆瓨鍙傛暟閰嶇疆" }, + { "controll", "鏅鸿兘鎺у埗" }, + { "postdata", "鏁版嵁鎺ㄩ��" }, + { "default", "甯歌" }, + { "datadocking", "鏁版嵁閲囬泦" }, + //{ "getcalvalue", "鑾峰彇鏅鸿兘鎺у埗鏁版嵁" }, + //{ "execcalvalue", "鎵ц鏅鸿兘鎺у埗" } + }; + } + private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) + { + if (e.Column.FieldName == "LogEvent") + { + var celValue = e.Value.ToString(); + var celNewValue = ""; + // 鍒涘缓涓�涓瓧鍏革紝閿负瀛楃涓诧紝鍊间负瀛楃涓� + + var commandDescriptions = GetDic(); + string key = celValue; + string value; + if (commandDescriptions.TryGetValue(key, out value)) + { + celNewValue = value; + } + + e.DisplayText = celNewValue; + } + if (e.Column.FieldName == "LogResult") + { + var celValue = e.Value.ToString(); + var celNewValue = "鎴愬姛"; + switch (celValue) + { + case "info": + celNewValue = "鎻愮ず"; + break; + case "fail": + celNewValue = "澶辫触"; + break; + case "error": + celNewValue = "寮傚父"; + break; + default: + celNewValue = "鎴愬姛"; + break; + } + e.DisplayText = celNewValue; + } + + } + + public void BindData(List<IBoxLogViewModel> eboxLogs, bool isBlue = true) + { + if (isBlue) + { + this.Invoke(new Action(() => + { + eboxLogViewModelBindingSource.DataSource = eboxLogs; + this.gridView1.RefreshData(); + })); + } + else + { + eboxLogViewModelBindingSource.DataSource = eboxLogs; + this.gridView1.RefreshData(); + } + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.resx new file mode 100644 index 0000000..3160eff --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormLog.resx @@ -0,0 +1,123 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="eboxLogViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.Designer.cs new file mode 100644 index 0000000..87daf8d --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.Designer.cs @@ -0,0 +1,635 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormMonitor + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + DevExpress.XtraCharts.XYDiagram xyDiagram3 = new DevExpress.XtraCharts.XYDiagram(); + DevExpress.XtraCharts.Series series5 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.LineSeriesView lineSeriesView3 = new DevExpress.XtraCharts.LineSeriesView(); + DevExpress.XtraCharts.Series series6 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.PointSeriesView pointSeriesView3 = new DevExpress.XtraCharts.PointSeriesView(); + this.dataGridMonitorViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.eboxFormBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.eboxFormBindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.colGroupName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colMonitorName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colDataValue = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colUnitName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colDataTime = new DevExpress.XtraGrid.Columns.GridColumn(); + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.dateEdit2 = new DevExpress.XtraEditors.DateEdit(); + this.dateEdit1 = new DevExpress.XtraEditors.DateEdit(); + this.chartControl1 = new DevExpress.XtraCharts.ChartControl(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.pumpRunStatusViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.pumpEnergyViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.monitorValueAlarmRecordBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.xtraTabbedMdiManager1 = new DevExpress.XtraTabbedMdi.XtraTabbedMdiManager(this.components); + this.simpleButton5 = new DevExpress.XtraEditors.SimpleButton(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridMonitorViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxFormBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxFormBindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit(); + this.splitContainerControl1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).BeginInit(); + this.splitContainerControl1.Panel2.SuspendLayout(); + this.splitContainerControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit2.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit2.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(xyDiagram3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(pointSeriesView3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpRunStatusViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpEnergyViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.monitorValueAlarmRecordBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabbedMdiManager1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + this.SuspendLayout(); + // + // dataGridMonitorViewModelBindingSource + // + this.dataGridMonitorViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.DataGridMonitorViewModel); + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.splitContainerControl1); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(0, 0); + this.layoutControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(984, 336, 812, 500); + this.layoutControl1.Root = this.Root; + this.layoutControl1.Size = new System.Drawing.Size(808, 676); + this.layoutControl1.TabIndex = 1; + this.layoutControl1.Text = "layoutControl1"; + // + // splitContainerControl1 + // + this.splitContainerControl1.Horizontal = false; + this.splitContainerControl1.Location = new System.Drawing.Point(12, 12); + this.splitContainerControl1.Name = "splitContainerControl1"; + // + // splitContainerControl1.Panel1 + // + this.splitContainerControl1.Panel1.Controls.Add(this.gridControl1); + this.splitContainerControl1.Panel1.Text = "Panel1"; + // + // splitContainerControl1.Panel2 + // + this.splitContainerControl1.Panel2.Controls.Add(this.dataLayoutControl1); + this.splitContainerControl1.Panel2.Text = "Panel2"; + this.splitContainerControl1.Size = new System.Drawing.Size(784, 652); + this.splitContainerControl1.SplitterPosition = 286; + this.splitContainerControl1.TabIndex = 4; + // + // gridControl1 + // + this.gridControl1.DataSource = this.bindingSource1; + this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridControl1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gridControl1.Location = new System.Drawing.Point(0, 0); + this.gridControl1.MainView = this.gridView1; + this.gridControl1.Name = "gridControl1"; + this.gridControl1.Size = new System.Drawing.Size(784, 286); + this.gridControl1.TabIndex = 2; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // gridView1 + // + this.gridView1.Appearance.FocusedRow.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.gridView1.Appearance.FocusedRow.Options.UseBackColor = true; + this.gridView1.Appearance.SelectedRow.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.gridView1.Appearance.SelectedRow.Options.UseBackColor = true; + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colGroupName, + this.colMonitorName, + this.colDataValue, + this.colUnitName, + this.colDataTime}); + this.gridView1.DetailHeight = 327; + this.gridView1.GridControl = this.gridControl1; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsView.AllowCellMerge = true; + this.gridView1.RowClick += new DevExpress.XtraGrid.Views.Grid.RowClickEventHandler(this.gridView1_RowClick); + this.gridView1.RowCellClick += new DevExpress.XtraGrid.Views.Grid.RowCellClickEventHandler(this.gridView1_RowCellClick); + this.gridView1.DoubleClick += new System.EventHandler(this.gridView1_DoubleClick); + // + // colGroupName + // + this.colGroupName.Caption = "鏈虹粍鍚嶇О"; + this.colGroupName.FieldName = "GroupName"; + this.colGroupName.MinWidth = 22; + this.colGroupName.Name = "colGroupName"; + this.colGroupName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; + this.colGroupName.Visible = true; + this.colGroupName.VisibleIndex = 0; + this.colGroupName.Width = 114; + // + // colMonitorName + // + this.colMonitorName.Caption = "娴嬬偣鍚嶇О"; + this.colMonitorName.FieldName = "MonitorName"; + this.colMonitorName.MinWidth = 22; + this.colMonitorName.Name = "colMonitorName"; + this.colMonitorName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colMonitorName.Visible = true; + this.colMonitorName.VisibleIndex = 1; + this.colMonitorName.Width = 175; + // + // colDataValue + // + this.colDataValue.AppearanceCell.ForeColor = System.Drawing.Color.Blue; + this.colDataValue.AppearanceCell.Options.UseForeColor = true; + this.colDataValue.Caption = "鏁版嵁鍊�"; + this.colDataValue.FieldName = "DataValue"; + this.colDataValue.MinWidth = 22; + this.colDataValue.Name = "colDataValue"; + this.colDataValue.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colDataValue.Visible = true; + this.colDataValue.VisibleIndex = 3; + this.colDataValue.Width = 162; + // + // colUnitName + // + this.colUnitName.Caption = "鍗曚綅"; + this.colUnitName.FieldName = "UnitName"; + this.colUnitName.MinWidth = 22; + this.colUnitName.Name = "colUnitName"; + this.colUnitName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colUnitName.Visible = true; + this.colUnitName.VisibleIndex = 2; + this.colUnitName.Width = 162; + // + // colDataTime + // + this.colDataTime.Caption = "鏁版嵁鏃堕棿"; + this.colDataTime.FieldName = "DataTime"; + this.colDataTime.MinWidth = 22; + this.colDataTime.Name = "colDataTime"; + this.colDataTime.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colDataTime.Visible = true; + this.colDataTime.VisibleIndex = 4; + this.colDataTime.Width = 182; + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.simpleButton5); + this.dataLayoutControl1.Controls.Add(this.simpleButton4); + this.dataLayoutControl1.Controls.Add(this.simpleButton3); + this.dataLayoutControl1.Controls.Add(this.simpleButton1); + this.dataLayoutControl1.Controls.Add(this.simpleButton2); + this.dataLayoutControl1.Controls.Add(this.dateEdit2); + this.dataLayoutControl1.Controls.Add(this.dateEdit1); + this.dataLayoutControl1.Controls.Add(this.chartControl1); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1232, 375, 650, 400); + this.dataLayoutControl1.Root = this.layoutControlGroup1; + this.dataLayoutControl1.Size = new System.Drawing.Size(784, 356); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // simpleButton4 + // + this.simpleButton4.Location = new System.Drawing.Point(178, 12); + this.simpleButton4.Name = "simpleButton4"; + this.simpleButton4.Size = new System.Drawing.Size(76, 22); + this.simpleButton4.StyleController = this.dataLayoutControl1; + this.simpleButton4.TabIndex = 17; + this.simpleButton4.Text = "鍓嶄笁澶�"; + this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click); + // + // simpleButton3 + // + this.simpleButton3.Location = new System.Drawing.Point(92, 12); + this.simpleButton3.Name = "simpleButton3"; + this.simpleButton3.Size = new System.Drawing.Size(82, 22); + this.simpleButton3.StyleController = this.dataLayoutControl1; + this.simpleButton3.TabIndex = 16; + this.simpleButton3.Text = "涓嬩竴澶�"; + this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click); + // + // simpleButton1 + // + this.simpleButton1.Location = new System.Drawing.Point(582, 12); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(101, 22); + this.simpleButton1.StyleController = this.dataLayoutControl1; + this.simpleButton1.TabIndex = 15; + this.simpleButton1.Text = "鏌ヨ"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // simpleButton2 + // + this.simpleButton2.Location = new System.Drawing.Point(12, 12); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(76, 22); + this.simpleButton2.StyleController = this.dataLayoutControl1; + this.simpleButton2.TabIndex = 14; + this.simpleButton2.Text = "涓婁竴澶�"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // dateEdit2 + // + this.dateEdit2.EditValue = null; + this.dateEdit2.Location = new System.Drawing.Point(493, 12); + this.dateEdit2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.dateEdit2.Name = "dateEdit2"; + this.dateEdit2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEdit2.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEdit2.Size = new System.Drawing.Size(85, 20); + this.dateEdit2.StyleController = this.dataLayoutControl1; + this.dateEdit2.TabIndex = 13; + // + // dateEdit1 + // + this.dateEdit1.EditValue = null; + this.dateEdit1.Location = new System.Drawing.Point(330, 12); + this.dateEdit1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.dateEdit1.Name = "dateEdit1"; + this.dateEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEdit1.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEdit1.Size = new System.Drawing.Size(87, 20); + this.dateEdit1.StyleController = this.dataLayoutControl1; + this.dateEdit1.TabIndex = 12; + // + // chartControl1 + // + xyDiagram3.AxisX.DateTimeScaleOptions.ScaleMode = DevExpress.XtraCharts.ScaleMode.Continuous; + xyDiagram3.AxisX.TimeSpanScaleOptions.ScaleMode = DevExpress.XtraCharts.ScaleMode.Continuous; + xyDiagram3.AxisX.VisibleInPanesSerializable = "-1"; + xyDiagram3.AxisY.VisibleInPanesSerializable = "-1"; + this.chartControl1.Diagram = xyDiagram3; + this.chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; + this.chartControl1.Location = new System.Drawing.Point(12, 38); + this.chartControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.chartControl1.Name = "chartControl1"; + series5.Name = "SeriesDataValue"; + lineSeriesView3.LineStyle.Thickness = 1; + series5.View = lineSeriesView3; + series6.LegendTextPattern = "鍊�:{V}"; + series6.Name = "SeriesAlarm"; + pointSeriesView3.PointMarkerOptions.Size = 7; + series6.View = pointSeriesView3; + this.chartControl1.SeriesSerializable = new DevExpress.XtraCharts.Series[] { + series5, + series6}; + this.chartControl1.Size = new System.Drawing.Size(760, 306); + this.chartControl1.TabIndex = 4; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.GroupBordersVisible = false; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem2, + this.layoutControlItem8, + this.layoutControlItem7, + this.layoutControlItem9, + this.layoutControlItem10, + this.layoutControlItem11, + this.layoutControlItem12, + this.layoutControlItem3}); + this.layoutControlGroup1.Name = "Root"; + this.layoutControlGroup1.Size = new System.Drawing.Size(784, 356); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.chartControl1; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 26); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(764, 310); + this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem2.TextVisible = false; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.dateEdit1; + this.layoutControlItem8.Location = new System.Drawing.Point(246, 0); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(163, 26); + this.layoutControlItem8.Text = "寮�濮嬫棩鏈燂細"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.dateEdit2; + this.layoutControlItem7.Location = new System.Drawing.Point(409, 0); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(161, 26); + this.layoutControlItem7.Text = "缁撴潫鏃ユ湡"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.simpleButton2; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(80, 26); + this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem9.TextVisible = false; + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.simpleButton1; + this.layoutControlItem10.Location = new System.Drawing.Point(570, 0); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(105, 26); + this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem10.TextVisible = false; + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.simpleButton3; + this.layoutControlItem11.Location = new System.Drawing.Point(80, 0); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(86, 26); + this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem11.TextVisible = false; + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.simpleButton4; + this.layoutControlItem12.Location = new System.Drawing.Point(166, 0); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(80, 26); + this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem12.TextVisible = false; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(808, 676); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.splitContainerControl1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(788, 656); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // pumpRunStatusViewModelBindingSource + // + this.pumpRunStatusViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.PumpRunStatusViewModel); + // + // pumpEnergyViewModelBindingSource + // + this.pumpEnergyViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.PumpEnergyViewModel); + // + // monitorValueAlarmRecordBindingSource + // + this.monitorValueAlarmRecordBindingSource.DataSource = typeof(IBox.WinFrmUI.MonitorValueAlarmRecord); + // + // xtraTabbedMdiManager1 + // + this.xtraTabbedMdiManager1.MdiParent = null; + // + // simpleButton5 + // + this.simpleButton5.Location = new System.Drawing.Point(687, 12); + this.simpleButton5.Name = "simpleButton5"; + this.simpleButton5.Size = new System.Drawing.Size(85, 22); + this.simpleButton5.StyleController = this.dataLayoutControl1; + this.simpleButton5.TabIndex = 18; + this.simpleButton5.Text = "瀵煎嚭"; + this.simpleButton5.Click += new System.EventHandler(this.simpleButton5_Click); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.simpleButton5; + this.layoutControlItem3.Location = new System.Drawing.Point(675, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(89, 26); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // EboxFormMonitor + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.layoutControl1); + this.Name = "EboxFormMonitor"; + this.Size = new System.Drawing.Size(808, 676); + this.Load += new System.EventHandler(this.EboxForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridMonitorViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxFormBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxFormBindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit(); + this.splitContainerControl1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).EndInit(); + this.splitContainerControl1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit(); + this.splitContainerControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit2.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit2.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(xyDiagram3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(pointSeriesView3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpRunStatusViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpEnergyViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.monitorValueAlarmRecordBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabbedMdiManager1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.BindingSource eboxFormBindingSource; + private System.Windows.Forms.DataGridViewTextBoxColumn acceptButtonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn autoScrollDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn autoSizeDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn autoSizeModeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn autoValidateDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn backColorDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn formBorderStyleDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn cancelButtonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn controlBoxDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn helpButtonDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewImageColumn iconDataGridViewImageColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn isMdiContainerDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn keyPreviewDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn locationDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn maximumSizeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn mainMenuStripDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn minimumSizeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn maximizeBoxDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn minimizeBoxDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn opacityDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn rightToLeftLayoutDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn showInTaskbarDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn showIconDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn sizeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn sizeGripStyleDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn startPositionDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn textDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn topMostDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn transparencyKeyDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn windowStateDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn autoScrollMarginDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn autoScrollMinSizeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn accessibleDescriptionDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn accessibleNameDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn accessibleRoleDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn allowDropDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn anchorDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewImageColumn backgroundImageDataGridViewImageColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn backgroundImageLayoutDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn causesValidationDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn contextMenuStripDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn cursorDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn dataBindingsDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn dockDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn enabledDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn fontDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn foreColorDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn rightToLeftDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn tagDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn useWaitCursorDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn visibleDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn paddingDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn imeModeDataGridViewTextBoxColumn; + private System.Windows.Forms.BindingSource eboxFormBindingSource1; + private System.Windows.Forms.BindingSource dataGridMonitorViewModelBindingSource; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.BindingSource monitorValueAlarmRecordBindingSource; + private System.Windows.Forms.BindingSource pumpRunStatusViewModelBindingSource; + private DevExpress.XtraTabbedMdi.XtraTabbedMdiManager xtraTabbedMdiManager1; + private System.Windows.Forms.BindingSource pumpEnergyViewModelBindingSource; + private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraGrid.Columns.GridColumn colGroupName; + private DevExpress.XtraGrid.Columns.GridColumn colMonitorName; + private DevExpress.XtraGrid.Columns.GridColumn colDataValue; + private DevExpress.XtraGrid.Columns.GridColumn colUnitName; + private DevExpress.XtraGrid.Columns.GridColumn colDataTime; + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraCharts.ChartControl chartControl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.DateEdit dateEdit2; + private DevExpress.XtraEditors.DateEdit dateEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraEditors.SimpleButton simpleButton4; + private DevExpress.XtraEditors.SimpleButton simpleButton3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraEditors.SimpleButton simpleButton5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.cs new file mode 100644 index 0000000..e3e530d --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.cs @@ -0,0 +1,584 @@ +锘縰sing DevExpress.XtraCharts; +using DevExpress.XtraEditors; +using NPOI.HSSF.UserModel; +using NPOI.SS.UserModel; +using System.Data; +using System.IO; +using Yw; +using Yw.WinFrmUI; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormMonitor : DocumentPage + { + + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getbaseCode = "getbase"; + private string getrealrecordCode = "getrealrecord"; + private string gethistoryrecordCode = "gethistoryrecord"; + private string getalarmbydayCode = "getalarmbyday"; + private string getbysignalidofdayrangeCode = "getbysignalidofdayrange"; + + //Stopwatch sw = new Stopwatch(); + //string swstr=string.Empty; + private List<MonitorValueAlarmRecord> monitorValueAlarmRecords = new List<MonitorValueAlarmRecord>(); + + private List<DataGridMonitorViewModel> dataGridMonitorViewModels = new List<DataGridMonitorViewModel>(); + private List<PumpRunStatusViewModel> pumpRunStatusModels = new List<PumpRunStatusViewModel>(); + private List<PumpEnergyViewModel> pumpEnergyViewModels = new List<PumpEnergyViewModel>(); + + public IBoxFormMonitor() + { + this.PageTitle.Caption = "瀹炴椂鐩戞祴"; + InitializeComponent(); + this.gridView1.SetNormalView(); + + this.dateEdit1.Text = DateTime.Now.ToString("yyyy-MM-dd"); + this.dateEdit2.Text = DateTime.Now.ToString("yyyy-MM-dd"); + + _points.View.Color = Color.Red; + _points.CrosshairEnabled = DevExpress.Utils.DefaultBoolean.False; + _points.ShowInLegend = false; + _line.ShowInLegend = true; + + + // _line.LegendTextPattern = ""; + } + + //private void WebMessageReceived(object sender, CoreWebView2WebMessageReceivedEventArgs e) + //{ + // var j = JsonHelper.Json2Object<FixationReceivedViewModel>(e.WebMessageAsJson); + // var oper = new + // { + // oper = "setToken", + // dataValue = "" + // }; + // switch (j.Oper) + // { + // case "loadCompleted": + // break; + // } + //} + + private void TestData() + { + #region 娴嬭瘯鏁版嵁 + + this.pumpRunStatusModels = new List<PumpRunStatusViewModel>(); + this.pumpRunStatusModels.Add(new PumpRunStatusViewModel() + { + ID = 1, + Name = "1#鏈虹粍", + BootTimes = 50, + ContinutRunTime = 1000, + DateTime = DateTime.Now, + RunStatus = 1, + TotalRunTime = 1000, + }); + this.pumpRunStatusModels.Add(new PumpRunStatusViewModel() + { + ID = 2, + Name = "2#鏈虹粍", + BootTimes = 100, + ContinutRunTime = 1300, + DateTime = DateTime.Now, + RunStatus = 0, + TotalRunTime = 1800, + }); + this.pumpRunStatusModels.Add(new PumpRunStatusViewModel() + { + ID = 3, + Name = "3#鏈虹粍", + BootTimes = 400, + ContinutRunTime = 1500, + DateTime = DateTime.Now, + RunStatus = 1, + TotalRunTime = 2000, + }); + this.pumpRunStatusModels.Add(new PumpRunStatusViewModel() + { + ID = 4, + Name = "4#鏈虹粍", + BootTimes = 100, + ContinutRunTime = 800, + DateTime = DateTime.Now, + RunStatus = 0, + TotalRunTime = 1300, + }); + this.Invoke(new Action(() => + { + this.pumpRunStatusViewModelBindingSource.DataSource = this.pumpRunStatusModels; + })); + + pumpEnergyViewModels = new List<PumpEnergyViewModel>(); + pumpEnergyViewModels.Add(new PumpEnergyViewModel() + { + Day = "2024-4-14", + Electricity = 4172, + Supply = 50510, + EnergyOfWater = (decimal)82.04 + }); + + pumpEnergyViewModels.Add(new PumpEnergyViewModel() + { + Day = "2024-4-15", + Electricity = 3308, + Supply = 32530, + EnergyOfWater = (decimal)80.14 + }); + + pumpEnergyViewModels.Add(new PumpEnergyViewModel() + { + Day = "2024-4-16", + Electricity = 3378, + Supply = 42630, + EnergyOfWater = (decimal)73.34 + }); + + pumpEnergyViewModels.Add(new PumpEnergyViewModel() + { + Day = "2024-4-17", + Electricity = 4178, + Supply = 51530, + EnergyOfWater = (decimal)81.34 + }); + + this.Invoke(new Action(() => + { + this.pumpEnergyViewModelBindingSource.DataSource = pumpEnergyViewModels; + })); + + #endregion 娴嬭瘯鏁版嵁 + } + + private void EboxForm_Load(object sender, EventArgs e) + { + //BluetoothHelper.GetInstance().SMR -= null; + //BluetoothHelper.GetInstance().SMR += new BluetoothHelper.ShowMessReturn(GetReceive); + //BluetoothHelper.GetInstance().ListenerData(); + Thread.Sleep(500); + SendText(startCode + getbaseCode + paramCode + endCode); + _diagram.EnableAxisXScrolling = true; + _diagram.EnableAxisYScrolling = true; + _diagram.EnableAxisXZooming = true; + _diagram.EnableAxisYZooming = true; + //SetTimer(); + + } + + public void GetReceive(string msg) + { + if (!this.IsHandleCreated || this.IsDisposed || string.IsNullOrEmpty(msg)) return; + if (msg.StartsWith("error:") && msg.Contains("鐩爣涓绘満鍧忎簡")) + { + MessageBoxHelper.ShowError("m 钃濈墮璁惧杩炴帴澶辫触锛岃閲嶈瘯!"); return; + } + if (!string.IsNullOrEmpty(msg) && msg.Contains(startCode)) + { + var order = msg.Replace(endCode, "").Replace(startCode, "").Trim(); + SetOrder(order); + } + else MessageBoxHelper.ShowError("m 钃濈墮璁惧杩炴帴澶辫触!"); + } + + private void SetOrder(string order) + { + var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries); + if (smsg.Length < 2) + { + _diagram.DefaultPane.Visibility = ChartElementVisibility.Hidden; + return; + } + _diagram.DefaultPane.Visibility = ChartElementVisibility.Visible; + + switch (smsg[0].Trim()) + { + case "getbase": + var getbaselist = JsonHelper.Json2Object<List<StationMonitorListGroupMobileDto>>(smsg[1].Trim()); + BindGrid(getbaselist); + WaitFormHelper.HideWaitForm(); + break; + + case "gethistoryrecord": + var b = smsg[1].Trim(); + var gethistoryrecordlist = new List<MonitorRecord>(); + + if (!string.IsNullOrEmpty(b)) + { + var c = b.Split('|'); + foreach (var item in c) + { + var m = new MonitorRecord().FromString(item); + gethistoryrecordlist.Add(m); + } + } + //SetChartData(gethistoryrecordlist); + break; + + case "getalarmbyday": + //var getalarmbydaylist = JsonHelper.Json2Object<List<MonitorValueAlarmRecord>>(smsg[1].Trim()); + //monitorValueAlarmRecords = getalarmbydaylist; + //this.bindingSource1.DataSource = dataGridMonitorViewModels; + var l = smsg[1].Trim(); + SetAlarmByDay(l); + //this.gridView2.RefreshData(); + break; + + case "getbysignalidofdayrange": + var getbysignalidofdayrangelist = JsonHelper.Json2Object<List<MonitorValueAlarmRecord>>(smsg[1].Trim()); + break; + + case "getrealrecord": + var getrealrecordlist = JsonHelper.Json2Object<List<MonitorRealRecord>>(smsg[1].Trim()); + SetRealRecord(getrealrecordlist); + break; + } + } + + public void SetAlarmByDay(string l, bool isBlue = true) + { + var getalarmbydaylist = new List<MonitorValueAlarmRecord>(); + + if (!string.IsNullOrEmpty(l)) + { + var c = l.Split('|'); + foreach (var item in c) + { + var ml = new MonitorValueAlarmRecord().FromString(item); + getalarmbydaylist.Add(ml); + } + monitorValueAlarmRecords = getalarmbydaylist; + } + if (isBlue) + { + this.Invoke(new Action(() => + { + this.monitorValueAlarmRecordBindingSource.DataSource = monitorValueAlarmRecords; + })); + } + else + { + this.monitorValueAlarmRecordBindingSource.DataSource = monitorValueAlarmRecords; + } + } + + public void SetRealRecord(List<MonitorRealRecord> getrealrecordlist, bool isBlue = true) + { + foreach (var item in dataGridMonitorViewModels) + { + var mf = getrealrecordlist.FirstOrDefault(bc => bc.SignalID == item.SignalID); + if (mf != null) + { + item.DataValue = mf.DataValue; + item.DataTime = mf.DataTime.ToString("yyyy-MM-dd HH:mm:ss"); + //item.DataStatus =mf.DataStatus!=null && mf.DataStatus.Contains("2") ? eDataStatus.Warn : eDataStatus.Normal; + } + } + if (isBlue) + { + this.Invoke(new Action(() => + { + this.bindingSource1.DataSource = dataGridMonitorViewModels; + this.gridView1.RefreshData(); + })); + } + else + { + this.bindingSource1.DataSource = dataGridMonitorViewModels; + this.gridView1.RefreshData(); + } + } + private List<DataGridMonitorViewModel> dataList = null; + + public void BindGrid(List<StationMonitorListGroupMobileDto> list, bool isBlue = true) + { + dataList = new List<DataGridMonitorViewModel>(); + foreach (var item in list) + { + foreach (var ml in item.MonitorList) + { + dataList.Add(new DataGridMonitorViewModel() + { + DataTime = !ml.DataTime.HasValue ? "-" : ml.DataTime?.ToString("yyyy-MM-dd HH:mm:ss"), + DataValue = string.IsNullOrEmpty(ml.DataValue) ? "-" : ml.DataValue, + GroupID = item.ID, + GroupName = item.Name, + MonitorName = ml.Name, + SignalID = ml.SignalID, + UnitName = ml.UnitName, + DataStatus = ml.DataStatus, + }); + } + } + if (isBlue) + { + this.Invoke(new Action(() => + { + dataGridMonitorViewModels = dataList; + this.bindingSource1.DataSource = dataGridMonitorViewModels; + })); + } + else + { + + dataGridMonitorViewModels = dataList; + this.bindingSource1.DataSource = dataGridMonitorViewModels; + this.gridView1.RefreshData(); + + } + //var am = new GetAlarmByDayModel() { Day = DateTime.Now }; + //SendText(startCode + getalarmbydayCode + paramCode + JsonHelper.Object2Json(am) + endCode); + //WaitFrmHelper.HideWaitForm(); + } + + private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) + { + currModel = this.gridView1.GetFocusedRow() as DataGridMonitorViewModel; + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + if (currModel == null) + { + MessageBoxHelper.ShowWarning("璇峰厛閫変腑鐩戞祴鏁版嵁!"); + return; + } + GetHistoryData(); + //WaitFrmHelper.ShowWaitForm(); + } + + private void simpleButton2_Click(object sender, EventArgs e) + { + this.dateEdit1.Text = this.dateEdit2.Text = DateTime.Parse(this.dateEdit1.Text).AddDays(-1).ToString("yyyy-MM-dd"); + GetHistoryData(); + } + + private void simpleButton3_Click(object sender, EventArgs e) + { + this.dateEdit1.Text = this.dateEdit2.Text = DateTime.Parse(this.dateEdit1.Text).AddDays(1).ToString("yyyy-MM-dd"); + + GetHistoryData(); + } + + private void simpleButton4_Click(object sender, EventArgs e) + { + this.dateEdit1.Text = DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd"); + this.dateEdit2.Text = DateTime.Now.ToString("yyyy-MM-dd"); + GetHistoryData(); + } + + private Series _line + { + get + { + var s = this.chartControl1.GetSeriesByName("SeriesDataValue"); + return s; + } + } + + private Series _points + { + get + { + var s = this.chartControl1.GetSeriesByName("SeriesAlarm"); + return s; + } + } + + private XYDiagram _diagram + { get { return this.chartControl1.Diagram as XYDiagram; } } + + List<MonitorRecord> _realList = null; + public void SetChartData(List<MonitorRecord> list, bool isBlue) + { + _realList = list; + if (isBlue) + { + this.Invoke(new Action(() => + { + this.chartControl1.BeginInit(); + + var maxY = list.Max(x => x.DataValue); + var minY = list.Min(x => x.DataValue); + + _line.BindToData(list, "DataTime", "DataValue"); + + var alarmList = list.Where(d => d.DataStatus != null && d.DataStatus.Contains("2")).ToList(); + _points.BindToData(alarmList, "DataTime", "DataValue"); + + _diagram.AxisY.VisualRange.SetMinMaxValues(minY, maxY); + _diagram.AxisY.WholeRange.SetMinMaxValues(minY, maxY); + this.chartControl1.EndInit(); + })); + } + else + { + this.chartControl1.BeginInit(); + + var maxY = list.Max(x => string.IsNullOrEmpty(x.DataValue) ? 0 : double.Parse(x.DataValue)); + var minY = list.Min(x => string.IsNullOrEmpty(x.DataValue) ? 0 : double.Parse(x.DataValue)); + + _line.BindToData(list, "DataTime", "DataValue"); + + var alarmList = list.Where(d => d.DataStatus != null && d.DataStatus.Contains("2")).ToList(); + _points.BindToData(alarmList, "DataTime", "DataValue"); + + _diagram.AxisY.VisualRange.SetMinMaxValues(minY, maxY); + _diagram.AxisY.WholeRange.SetMinMaxValues(minY, maxY); + this.chartControl1.EndInit(); + } + } + + private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) + { + currModel = this.gridView1.GetFocusedRow() as DataGridMonitorViewModel; + } + + private DataGridMonitorViewModel currModel = null; + + private void gridView1_DoubleClick(object sender, EventArgs e) + { + //WaitFrmHelper.ShowWaitForm(); + var r = this.gridView1.GetFocusedRow() as DataGridMonitorViewModel; + currModel = r; + //sw.Restart(); + GetHistoryData(); + } + + private void GetHistoryData() + { + var m = new MonitorHistoryQuery() + { + SignalID = currModel.SignalID, + StartTime = dateEdit1.Text,//.Equals(DateTime.Now.ToString("yyyy-MM-dd")) ? DateTime.Now.AddMinutes(-20).ToString("yyyy-MM-dd HH:mm:ss") : dateEdit1.Text, + EndTime = dateEdit2.Text//.Equals(DateTime.Now.ToString("yyyy-MM-dd")) ? DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") : dateEdit2.Text, + }; + SendText(startCode + gethistoryrecordCode + paramCode + JsonHelper.Object2Json(m) + endCode); + } + + private void GetAlarmRange() + { + var m = new GetBySignalIDOfDayRangeModel() + { + SignalID = currModel.SignalID, + StartDay = DateTime.Parse(dateEdit1.Text), + EndDay = DateTime.Parse(dateEdit1.Text), + }; + + SendText(startCode + getbysignalidofdayrangeCode + paramCode + JsonHelper.Object2Json(m) + endCode); + } + + private void checkBox1_CheckedChanged(object sender, EventArgs e) + { + SetTimer(); + } + + private void SetTimer() + { + if (dataList == null) + { + return; + } + timer1.Interval = 5000; + timer1.Enabled = true; + timer1.Tick += new EventHandler(GetRealData); + } + + private void GetRealData(object sender, EventArgs e) + { + SendText(startCode + getrealrecordCode + paramCode + endCode); + } + + private void comboBox1_SelectedValueChanged(object sender, EventArgs e) + { + SetTimer(); + } + + private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) + { + if (e.Column.FieldName.Equals("DataValue")) + { + var b = gridView1.GetRow(e.RowHandle) as DataGridMonitorViewModel; + if (b.DataStatus == eDataStatus.Warn) + e.Appearance.ForeColor = Color.Red; + } + } + + private void button2_Click(object sender, EventArgs e) + { + BluetoothHelper.GetInstance().Close(); + } + + private void tabbedControlGroup1_SelectedPageChanged(object sender, DevExpress.XtraLayout.LayoutTabPageChangedEventArgs e) + { + //MessageBox.Show(tabbedControlGroup1.SelectedTabPage.Tag.ToString()); + } + + private void gridControl2_Click(object sender, EventArgs e) + { + } + + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + + private void simpleButton5_Click(object sender, EventArgs e) + { + ExportXLS(); + } + + public void ExportXLS() + { + try + { + if (_realList == null || _realList.Count == 0) + { + XtraMessageBox.Show("娌℃湁鍙鍑虹殑鏁版嵁!"); + return; + } + + var dlg = new SaveFileDialog(); + dlg.Filter = "EXCEL 鏂囦欢(*.xls)|*.xls"; + if (dlg.ShowDialog() != DialogResult.OK) + return; + + HSSFWorkbook theBook = new HSSFWorkbook(); + var theSheet1 = theBook.CreateSheet("Sheet1"); + + IRow rowTile = theSheet1.CreateRow(0); + rowTile.CreateCell(0).SetCellValue("鏃堕棿"); + rowTile.CreateCell(1).SetCellValue(currModel.MonitorName + "(" + currModel.UnitName + ")"); + + + for (int rowIndex = 1; rowIndex <= _realList.Count; rowIndex++) + { + int col = 0; + IRow row = theSheet1.CreateRow(rowIndex); + + row.CreateCell(col).SetCellValue(_realList[rowIndex - 1].DataTime.ToString("yyyy/MM/dd HH:mm:00")); + col++; + row.CreateCell(col).SetCellValue(_realList[rowIndex - 1].DataValue); + col++; + } + + //寮哄埗Excel鍦ㄦ墦寮�鏃堕噸鏂拌绠楁墍鏈夊叕寮� + theSheet1.ForceFormulaRecalculation = true; + using (FileStream fs = File.OpenWrite(dlg.FileName)) + { + theBook.Write(fs); + } + XtraMessageBox.Show("瀵煎嚭鎴愬姛"); + + } + catch (Exception ex) + { + XtraMessageBox.Show(ex.ToString()); + } + } + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.resx new file mode 100644 index 0000000..449464d --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormMonitor.resx @@ -0,0 +1,147 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="dataGridMonitorViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>508, 17</value> + </metadata> + <metadata name="eboxFormBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="eboxFormBindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>258, 17</value> + </metadata> + <metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>880, 17</value> + </metadata> + <metadata name="pumpRunStatusViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>418, 58</value> + </metadata> + <metadata name="pumpEnergyViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>918, 58</value> + </metadata> + <metadata name="monitorValueAlarmRecordBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>125, 58</value> + </metadata> + <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 58</value> + </metadata> + <metadata name="xtraTabbedMdiManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>713, 58</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.Designer.cs new file mode 100644 index 0000000..7dec3ed --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.Designer.cs @@ -0,0 +1,380 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormOverview + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl(); + //this.webView21 = new Microsoft.Web.WebView2.WinForms.WebView2(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.gridControl3 = new DevExpress.XtraGrid.GridControl(); + this.pumpRunStatusViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.gridView3 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.colName1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colRunStatus = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colBootTimes = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colContinutRunTime = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colTotalRunTime = new DevExpress.XtraGrid.Columns.GridColumn(); + this.pumpEnergyViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.xtraTabbedMdiManager1 = new DevExpress.XtraTabbedMdi.XtraTabbedMdiManager(this.components); + this.dataGridMonitorViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.eboxFormBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.eboxFormBindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.monitorValueAlarmRecordBindingSource = new System.Windows.Forms.BindingSource(this.components); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit(); + this.splitContainerControl1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).BeginInit(); + this.splitContainerControl1.Panel2.SuspendLayout(); + this.splitContainerControl1.SuspendLayout(); + //((System.ComponentModel.ISupportInitialize)(this.webView21)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.xtraTabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpRunStatusViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpEnergyViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabbedMdiManager1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridMonitorViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxFormBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxFormBindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.monitorValueAlarmRecordBindingSource)).BeginInit(); + this.SuspendLayout(); + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.splitContainerControl1); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(0, 0); + this.layoutControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(984, 336, 812, 500); + this.layoutControl1.Root = this.Root; + this.layoutControl1.Size = new System.Drawing.Size(860, 418); + this.layoutControl1.TabIndex = 1; + this.layoutControl1.Text = "layoutControl1"; + // + // splitContainerControl1 + // + this.splitContainerControl1.IsSplitterFixed = true; + this.splitContainerControl1.Location = new System.Drawing.Point(12, 12); + this.splitContainerControl1.Name = "splitContainerControl1"; + // + // splitContainerControl1.Panel1 + // + //this.splitContainerControl1.Panel1.Controls.Add(this.webView21); + //this.splitContainerControl1.Panel1.Text = "Panel1"; + // + // splitContainerControl1.Panel2 + // + this.splitContainerControl1.Panel2.Controls.Add(this.xtraTabControl1); + this.splitContainerControl1.Panel2.Text = "Panel2"; + this.splitContainerControl1.Size = new System.Drawing.Size(836, 394); + this.splitContainerControl1.SplitterPosition = 550; + this.splitContainerControl1.TabIndex = 4; + // + // webView21 + // + //this.webView21.AllowExternalDrop = true; + //this.webView21.CreationProperties = null; + //this.webView21.DefaultBackgroundColor = System.Drawing.Color.White; + //this.webView21.Dock = System.Windows.Forms.DockStyle.Fill; + //this.webView21.Location = new System.Drawing.Point(0, 0); + //this.webView21.Name = "webView21"; + //this.webView21.Size = new System.Drawing.Size(550, 394); + //this.webView21.TabIndex = 1; + //this.webView21.ZoomFactor = 1D; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 0); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl1.Size = new System.Drawing.Size(276, 394); + this.xtraTabControl1.TabIndex = 1; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.gridControl3); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(274, 368); + this.xtraTabPage1.Text = "杩愯鐘舵��"; + // + // gridControl3 + // + this.gridControl3.DataSource = this.pumpRunStatusViewModelBindingSource; + this.gridControl3.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridControl3.Location = new System.Drawing.Point(0, 0); + this.gridControl3.MainView = this.gridView3; + this.gridControl3.Name = "gridControl3"; + this.gridControl3.Size = new System.Drawing.Size(183, 245); + this.gridControl3.TabIndex = 1; + this.gridControl3.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView3}); + // + // pumpRunStatusViewModelBindingSource + // + this.pumpRunStatusViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.PumpRunStatusViewModel); + // + // gridView3 + // + this.gridView3.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colName1, + this.colRunStatus, + this.colBootTimes, + this.colContinutRunTime, + this.colTotalRunTime}); + this.gridView3.GridControl = this.gridControl3; + this.gridView3.Name = "gridView3"; + this.gridView3.OptionsBehavior.AlignGroupSummaryInGroupRow = DevExpress.Utils.DefaultBoolean.False; + this.gridView3.OptionsBehavior.AllowFixedGroups = DevExpress.Utils.DefaultBoolean.False; + this.gridView3.OptionsBehavior.Editable = false; + this.gridView3.OptionsCustomization.AllowColumnResizing = false; + this.gridView3.OptionsCustomization.AllowFilter = false; + this.gridView3.OptionsCustomization.AllowGroup = false; + this.gridView3.OptionsCustomization.AllowMergedGrouping = DevExpress.Utils.DefaultBoolean.False; + this.gridView3.OptionsCustomization.AllowQuickHideColumns = false; + this.gridView3.OptionsFilter.AllowFilterEditor = false; + this.gridView3.OptionsFilter.AllowMRUFilterList = false; + this.gridView3.OptionsFilter.ShowInHeaderSearchResults = DevExpress.XtraGrid.Views.Grid.ShowInHeaderSearchResultsMode.None; + this.gridView3.OptionsFind.AllowFindPanel = false; + this.gridView3.OptionsMenu.ShowGroupSortSummaryItems = false; + this.gridView3.OptionsView.ShowGroupExpandCollapseButtons = false; + this.gridView3.OptionsView.ShowGroupPanel = false; + this.gridView3.CustomDrawCell += new DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventHandler(this.gridView3_CustomDrawCell); + // + // colName1 + // + this.colName1.Caption = "娉电粍"; + this.colName1.FieldName = "Name"; + this.colName1.Name = "colName1"; + this.colName1.Visible = true; + this.colName1.VisibleIndex = 0; + this.colName1.Width = 136; + // + // colRunStatus + // + this.colRunStatus.Caption = "杩愯鐘舵��"; + this.colRunStatus.FieldName = "RunStatus"; + this.colRunStatus.Name = "colRunStatus"; + this.colRunStatus.Visible = true; + this.colRunStatus.VisibleIndex = 1; + this.colRunStatus.Width = 115; + // + // colBootTimes + // + this.colBootTimes.Caption = "寮�鏈烘鏁�"; + this.colBootTimes.FieldName = "BootTimes"; + this.colBootTimes.Name = "colBootTimes"; + this.colBootTimes.Visible = true; + this.colBootTimes.VisibleIndex = 2; + this.colBootTimes.Width = 127; + // + // colContinutRunTime + // + this.colContinutRunTime.Caption = "褰撳墠鐘舵�佽繍琛屾椂闀�"; + this.colContinutRunTime.FieldName = "ContinutRunTime"; + this.colContinutRunTime.Name = "colContinutRunTime"; + this.colContinutRunTime.Visible = true; + this.colContinutRunTime.VisibleIndex = 3; + this.colContinutRunTime.Width = 204; + // + // colTotalRunTime + // + this.colTotalRunTime.Caption = "鎬昏繍琛屾椂闀�"; + this.colTotalRunTime.FieldName = "TotalRunTime"; + this.colTotalRunTime.Name = "colTotalRunTime"; + this.colTotalRunTime.Visible = true; + this.colTotalRunTime.VisibleIndex = 4; + this.colTotalRunTime.Width = 211; + // + // pumpEnergyViewModelBindingSource + // + this.pumpEnergyViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.PumpEnergyViewModel); + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(860, 418); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.splitContainerControl1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(840, 398); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // xtraTabbedMdiManager1 + // + this.xtraTabbedMdiManager1.MdiParent = null; + // + // dataGridMonitorViewModelBindingSource + // + this.dataGridMonitorViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.DataGridMonitorViewModel); + // + // monitorValueAlarmRecordBindingSource + // + this.monitorValueAlarmRecordBindingSource.DataSource = typeof(IBox.WinFrmUI.MonitorValueAlarmRecord); + // + // EboxFormOverview + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.layoutControl1); + this.Name = "EboxFormOverview"; + this.Size = new System.Drawing.Size(860, 418); + this.Load += new System.EventHandler(this.EboxForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit(); + this.splitContainerControl1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).EndInit(); + this.splitContainerControl1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit(); + this.splitContainerControl1.ResumeLayout(false); + //((System.ComponentModel.ISupportInitialize)(this.webView21)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.xtraTabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpRunStatusViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpEnergyViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabbedMdiManager1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridMonitorViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxFormBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.eboxFormBindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.monitorValueAlarmRecordBindingSource)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.BindingSource eboxFormBindingSource; + private System.Windows.Forms.DataGridViewTextBoxColumn acceptButtonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn autoScrollDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn autoSizeDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn autoSizeModeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn autoValidateDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn backColorDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn formBorderStyleDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn cancelButtonDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn controlBoxDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn helpButtonDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewImageColumn iconDataGridViewImageColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn isMdiContainerDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn keyPreviewDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn locationDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn maximumSizeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn mainMenuStripDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn minimumSizeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn maximizeBoxDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn minimizeBoxDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn opacityDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn rightToLeftLayoutDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn showInTaskbarDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn showIconDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn sizeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn sizeGripStyleDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn startPositionDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn textDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn topMostDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn transparencyKeyDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn windowStateDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn autoScrollMarginDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn autoScrollMinSizeDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn accessibleDescriptionDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn accessibleNameDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn accessibleRoleDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn allowDropDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn anchorDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewImageColumn backgroundImageDataGridViewImageColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn backgroundImageLayoutDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn causesValidationDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn contextMenuStripDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn cursorDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn dataBindingsDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn dockDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn enabledDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn fontDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn foreColorDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn rightToLeftDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn tagDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn useWaitCursorDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn visibleDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn paddingDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn imeModeDataGridViewTextBoxColumn; + private System.Windows.Forms.BindingSource eboxFormBindingSource1; + private System.Windows.Forms.BindingSource dataGridMonitorViewModelBindingSource; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.BindingSource monitorValueAlarmRecordBindingSource; + private System.Windows.Forms.BindingSource pumpRunStatusViewModelBindingSource; + private DevExpress.XtraTabbedMdi.XtraTabbedMdiManager xtraTabbedMdiManager1; + private System.Windows.Forms.BindingSource pumpEnergyViewModelBindingSource; + private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + //private Microsoft.Web.WebView2.WinForms.WebView2 webView21; + private DevExpress.XtraTab.XtraTabControl xtraTabControl1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage1; + private DevExpress.XtraGrid.GridControl gridControl3; + private DevExpress.XtraGrid.Views.Grid.GridView gridView3; + private DevExpress.XtraGrid.Columns.GridColumn colName1; + private DevExpress.XtraGrid.Columns.GridColumn colRunStatus; + private DevExpress.XtraGrid.Columns.GridColumn colBootTimes; + private DevExpress.XtraGrid.Columns.GridColumn colContinutRunTime; + private DevExpress.XtraGrid.Columns.GridColumn colTotalRunTime; + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.cs new file mode 100644 index 0000000..7bbb531 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.cs @@ -0,0 +1,385 @@ +锘縰sing System.Data; +using Yw; +using Yw.WinFrmUI; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormOverview : DocumentPage + { + + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getbaseCode = "getbase"; + private string getrealrecordCode = "getrealrecord"; + private string gethistoryrecordCode = "gethistoryrecord"; + private string getalarmbydayCode = "getalarmbyday"; + private string getbysignalidofdayrangeCode = "getbysignalidofdayrange"; + + //Stopwatch sw = new Stopwatch(); + //string swstr=string.Empty; + private List<MonitorValueAlarmRecord> monitorValueAlarmRecords = new List<MonitorValueAlarmRecord>(); + + private List<DataGridMonitorViewModel> dataGridMonitorViewModels = new List<DataGridMonitorViewModel>(); + private List<PumpRunStatusViewModel> pumpRunStatusModels = new List<PumpRunStatusViewModel>(); + private List<PumpEnergyViewModel> pumpEnergyViewModels = new List<PumpEnergyViewModel>(); + + public IBoxFormOverview() + { + this.PageTitle.Caption = "娉电粍鎬昏"; + InitializeComponent(); + //this.webView21.Source = new Uri(AppDomain.CurrentDomain.BaseDirectory + "/web/html/bim.html"); + //this.webView21.WebMessageReceived += WebMessageReceived; + + // _line.LegendTextPattern = ""; + } + + //private void WebMessageReceived(object sender, CoreWebView2WebMessageReceivedEventArgs e) + //{ + // var j = JsonHelper.Json2Object<FixationReceivedViewModel>(e.WebMessageAsJson); + // var oper = new + // { + // oper = "setToken", + // dataValue = "" + // }; + // switch (j.Oper) + // { + // case "loadCompleted": + // InitWebItem(); + // break; + // } + //} + + public void TestData(bool isBlue) + { + #region 娴嬭瘯鏁版嵁 + + this.pumpRunStatusModels = new List<PumpRunStatusViewModel>(); + this.pumpRunStatusModels.Add(new PumpRunStatusViewModel() + { + ID = 1, + Name = "1#鏈虹粍", + BootTimes = 50, + ContinutRunTime = 1000, + DateTime = DateTime.Now, + RunStatus = 1, + TotalRunTime = 1000, + }); + this.pumpRunStatusModels.Add(new PumpRunStatusViewModel() + { + ID = 2, + Name = "2#鏈虹粍", + BootTimes = 100, + ContinutRunTime = 1300, + DateTime = DateTime.Now, + RunStatus = 0, + TotalRunTime = 1800, + }); + this.pumpRunStatusModels.Add(new PumpRunStatusViewModel() + { + ID = 3, + Name = "3#鏈虹粍", + BootTimes = 400, + ContinutRunTime = 1500, + DateTime = DateTime.Now, + RunStatus = 1, + TotalRunTime = 2000, + }); + this.pumpRunStatusModels.Add(new PumpRunStatusViewModel() + { + ID = 4, + Name = "4#鏈虹粍", + BootTimes = 100, + ContinutRunTime = 800, + DateTime = DateTime.Now, + RunStatus = 0, + TotalRunTime = 1300, + }); + + if (isBlue) { + this.Invoke(new Action(() => + { + this.pumpRunStatusViewModelBindingSource.DataSource = this.pumpRunStatusModels; + this.gridView3.RefreshData(); + })); + } + else + { + this.pumpRunStatusViewModelBindingSource.DataSource = this.pumpRunStatusModels; + this.gridView3.RefreshData(); + } + + pumpEnergyViewModels = new List<PumpEnergyViewModel>(); + pumpEnergyViewModels.Add(new PumpEnergyViewModel() + { + Day = "2024-4-14", + Electricity = 4172, + Supply = 50510, + EnergyOfWater = (decimal)82.04 + }); + + pumpEnergyViewModels.Add(new PumpEnergyViewModel() + { + Day = "2024-4-15", + Electricity = 3308, + Supply = 32530, + EnergyOfWater = (decimal)80.14 + }); + + pumpEnergyViewModels.Add(new PumpEnergyViewModel() + { + Day = "2024-4-16", + Electricity = 3378, + Supply = 42630, + EnergyOfWater = (decimal)73.34 + }); + + pumpEnergyViewModels.Add(new PumpEnergyViewModel() + { + Day = "2024-4-17", + Electricity = 4178, + Supply = 51530, + EnergyOfWater = (decimal)81.34 + }); + + if (isBlue) { + this.Invoke(new Action(() => + { + this.pumpEnergyViewModelBindingSource.DataSource = pumpEnergyViewModels; + })); + } + else + { + this.pumpEnergyViewModelBindingSource.DataSource = pumpEnergyViewModels; + } + + #endregion 娴嬭瘯鏁版嵁 + } + + private void InitWebItem() + { + //var bimAppKey = "GPg7TMfOJxF10QHm2PirACyI21nv0qJX"; + //var bimAppSecret = "lakJejzxiKbsuBM7Pn0P0czfeYvXTnWW"; + //var setting = new BLL.BaseConfig().GetAll(); + //var settingC = setting.Where(c => c.Code == "BaseGrade").FirstOrDefault(); + //var calcSetting = float.Parse(string.IsNullOrEmpty(settingC.Value) ? "0" : settingC.Value); + //var ratioConfig = new BLL.RatioConfig().GetAll(); + //var bimfaceClient = BimfaceClient.GetClient(bimAppKey, bimAppSecret); + //var token = bimfaceClient.GetViewToken(2023011525093568); + + //webView21.CoreWebView2.PostWebMessageAsJson(JsonHelper.Object2Json(new + //{ + // oper = "setToken", + // token = token, + //})); + } + + private void EboxForm_Load(object sender, EventArgs e) + { + //BluetoothHelper.GetInstance().SMR -= null; + //BluetoothHelper.GetInstance().SMR += new BluetoothHelper.ShowMessReturn(GetReceive); + //BluetoothHelper.GetInstance().ListenerData(); + Thread.Sleep(500); + SendText(startCode + getbaseCode + paramCode + endCode); + + } + + public void GetReceive(string msg) + { + if (!this.IsHandleCreated || this.IsDisposed || string.IsNullOrEmpty(msg)) return; + if (msg.StartsWith("error:") && msg.Contains("鐩爣涓绘満鍧忎簡")) + { + MessageBoxHelper.ShowWarning("o 钃濈墮璁惧杩炴帴澶辫触锛岃閲嶈瘯!"); return; + } + if (!string.IsNullOrEmpty(msg) && msg.Contains(startCode)) + { + var order = msg.Replace(endCode, "").Replace(startCode, "").Trim(); + SetOrder(order); + } + else MessageBoxHelper.ShowWarning("o 钃濈墮璁惧杩炴帴澶辫触"); + } + + private void SetOrder(string order) + { + var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries); + if (smsg.Length < 2) + { + return; + } + + switch (smsg[0].Trim()) + { + case "getbase": + var getbaselist = JsonHelper.Json2Object<List<StationMonitorListGroupMobileDto>>(smsg[1].Trim()); + BindGrid(getbaselist); + WaitFormHelper.HideWaitForm(); + var am = new GetAlarmByDayModel() { Day = DateTime.Now }; + SendText(startCode + getalarmbydayCode + paramCode + JsonHelper.Object2Json(am) + endCode); + //TestData(); + break; + + case "gethistoryrecord": + var gethistoryrecordlist = new List<MonitorRecord>(); + var b = smsg[1].Trim(); + if (!string.IsNullOrEmpty(b)) + { + var c = b.Split('|'); + foreach (var item in c) + { + var m = new MonitorRecord().FromString(item); + gethistoryrecordlist.Add(m); + } + } + break; + + case "getalarmbyday": + //var getalarmbydaylist = JsonHelper.Json2Object<List<MonitorValueAlarmRecord>>(smsg[1].Trim()); + //monitorValueAlarmRecords = getalarmbydaylist; + //this.bindingSource1.DataSource = dataGridMonitorViewModels; + var getalarmbydaylist = new List<MonitorValueAlarmRecord>(); + var l = smsg[1].Trim(); + if (!string.IsNullOrEmpty(l)) + { + var c = l.Split('|'); + foreach (var item in c) + { + var ml = new MonitorValueAlarmRecord().FromString(item); + getalarmbydaylist.Add(ml); + } + monitorValueAlarmRecords = getalarmbydaylist; + } + this.Invoke(new Action(() => + { + this.monitorValueAlarmRecordBindingSource.DataSource = monitorValueAlarmRecords; + })); + //this.gridView2.RefreshData(); + break; + + case "getbysignalidofdayrange": + var getbysignalidofdayrangelist = JsonHelper.Json2Object<List<MonitorValueAlarmRecord>>(smsg[1].Trim()); + break; + } + } + + private List<DataGridMonitorViewModel> dataList = null; + + public async Task<int> BindGrid(List<StationMonitorListGroupMobileDto> list, bool isBlue = true) + { + dataList = new List<DataGridMonitorViewModel>(); + foreach (var item in list) + { + foreach (var ml in item.MonitorList) + { + dataList.Add(new DataGridMonitorViewModel() + { + DataTime = !ml.DataTime.HasValue ? "-" : ml.DataTime?.ToString("yyyy-MM-dd HH:mm:ss"), + DataValue = string.IsNullOrEmpty(ml.DataValue) ? "-" : ml.DataValue, + GroupID = item.ID, + GroupName = item.Name, + MonitorName = ml.Name, + SignalID = ml.SignalID, + UnitName = ml.UnitName, + DataStatus = ml.DataStatus, + }); + } + } + + if (isBlue) + { + this.Invoke(new Action(() => + { + dataGridMonitorViewModels = dataList; + this.bindingSource1.DataSource = dataGridMonitorViewModels; + //webView21.CoreWebView2.PostWebMessageAsJson(JsonHelper.Object2Json(new + //{ + // oper = "realData", + // list = JsonHelper.Object2Json(dataList), + //})); + })); + } + else + { + dataGridMonitorViewModels = dataList; + this.bindingSource1.DataSource = dataGridMonitorViewModels; + //await webView21.EnsureCoreWebView2Async(); + //webView21.CoreWebView2.PostWebMessageAsJson(JsonHelper.Object2Json(new + //{ + // oper = "realData", + // list = JsonHelper.Object2Json(dataList), + //})); + } + + return 0; + //WaitFrmHelper.HideWaitForm(); + } + + private void GetRealData(object sender, EventArgs e) + { + SendText(startCode + getrealrecordCode + paramCode + endCode); + } + + private void button2_Click(object sender, EventArgs e) + { + BluetoothHelper.GetInstance().Close(); + } + + private void tabbedControlGroup1_SelectedPageChanged(object sender, DevExpress.XtraLayout.LayoutTabPageChangedEventArgs e) + { + //MessageBox.Show(tabbedControlGroup1.SelectedTabPage.Tag.ToString()); + } + + private void gridControl2_Click(object sender, EventArgs e) + { + } + + private void gridView3_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) + { + var b = gridView3.GetRow(e.RowHandle) as PumpRunStatusViewModel; + + if (e.Column.FieldName.Equals("ContinutRunTime")) + { + e.DisplayText = ConvertToText(b.ContinutRunTime); + } + if (e.Column.FieldName.Equals("TotalRunTime")) + { + e.DisplayText = ConvertToText(b.TotalRunTime); + } + if (e.Column.FieldName.Equals("RunStatus")) + { + var s = "鍏虫満"; + e.Appearance.ForeColor = Color.LightSlateGray; + switch (b.RunStatus) + { + case 1: + s = "寮�鏈�"; + e.Appearance.ForeColor = Color.Green; + break; + } + e.DisplayText = s; + } + } + + private string ConvertToText(long? minite) + { + if (!minite.HasValue) + return ""; + long minites = minite.Value; + long days = minites / 60 / 24; + long hours = 0; + if (days > 0) + hours = (minites - (days * 1440)) / 60; + else hours = minites / 60; + long minitesLeft = minites % 60; + if (days > 0) + return $"{days}澶﹞hours}灏忔椂{minitesLeft}鍒嗛挓"; + else return $"{hours}灏忔椂{minitesLeft}鍒嗛挓"; + } + + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.resx new file mode 100644 index 0000000..0416fcb --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormOverview.resx @@ -0,0 +1,147 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="pumpRunStatusViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>419, 59</value> + </metadata> + <metadata name="pumpEnergyViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>918, 59</value> + </metadata> + <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 59</value> + </metadata> + <metadata name="xtraTabbedMdiManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>713, 59</value> + </metadata> + <metadata name="dataGridMonitorViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>509, 17</value> + </metadata> + <metadata name="eboxFormBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="eboxFormBindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>258, 17</value> + </metadata> + <metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>881, 17</value> + </metadata> + <metadata name="monitorValueAlarmRecordBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>125, 59</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.Designer.cs new file mode 100644 index 0000000..906e6a9 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.Designer.cs @@ -0,0 +1,901 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormParams + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.simpleButton6 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton5 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.textEditDelay = new DevExpress.XtraEditors.TextEdit(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.checkEditIsPostData = new DevExpress.XtraEditors.CheckEdit(); + this.textEditControllFrequency = new DevExpress.XtraEditors.TextEdit(); + this.checkEditIsControll = new DevExpress.XtraEditors.CheckEdit(); + this.textEditPostTime = new DevExpress.XtraEditors.TextEdit(); + this.textEditIP = new DevExpress.XtraEditors.TextEdit(); + this.textEditUser = new DevExpress.XtraEditors.TextEdit(); + this.textEditPassword = new DevExpress.XtraEditors.TextEdit(); + this.textEditTopic = new DevExpress.XtraEditors.TextEdit(); + this.textEditPostCount = new DevExpress.XtraEditors.TextEdit(); + this.checkEditIsDataDocking = new DevExpress.XtraEditors.CheckEdit(); + this.checkEditIsAnaly = new DevExpress.XtraEditors.CheckEdit(); + this.textEditPort = new DevExpress.XtraEditors.TextEdit(); + this.textEditControlType = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.textEditDataDockingFrequency = new DevExpress.XtraEditors.TextEdit(); + this.checkEditIsWrite = new DevExpress.XtraEditors.CheckEdit(); + this.textEditControlCoefficient = new DevExpress.XtraEditors.TextEdit(); + this.checkEditIsNoFlowControl = new DevExpress.XtraEditors.CheckEdit(); + this.textEditMinFlow = new DevExpress.XtraEditors.TextEdit(); + this.textEditMinFlowPumpHz = new DevExpress.XtraEditors.TextEdit(); + this.textEditWaterLevel = new DevExpress.XtraEditors.TextEdit(); + this.textEdit1 = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem20 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem21 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem22 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem24 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem23 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem25 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem26 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem28 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem29 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEditDelay.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsPostData.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditControllFrequency.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsControll.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPostTime.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditUser.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPassword.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditTopic.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPostCount.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsDataDocking.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsAnaly.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditControlType.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditDataDockingFrequency.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsWrite.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditControlCoefficient.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsNoFlowControl.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditMinFlow.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditMinFlowPumpHz.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditWaterLevel.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem24)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem23)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem25)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem26)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem27)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem28)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem29)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.simpleButton6); + this.dataLayoutControl1.Controls.Add(this.simpleButton5); + this.dataLayoutControl1.Controls.Add(this.simpleButton4); + this.dataLayoutControl1.Controls.Add(this.simpleButton3); + this.dataLayoutControl1.Controls.Add(this.simpleButton2); + this.dataLayoutControl1.Controls.Add(this.textEditDelay); + this.dataLayoutControl1.Controls.Add(this.simpleButton1); + this.dataLayoutControl1.Controls.Add(this.checkEditIsPostData); + this.dataLayoutControl1.Controls.Add(this.textEditControllFrequency); + this.dataLayoutControl1.Controls.Add(this.checkEditIsControll); + this.dataLayoutControl1.Controls.Add(this.textEditPostTime); + this.dataLayoutControl1.Controls.Add(this.textEditIP); + this.dataLayoutControl1.Controls.Add(this.textEditUser); + this.dataLayoutControl1.Controls.Add(this.textEditPassword); + this.dataLayoutControl1.Controls.Add(this.textEditTopic); + this.dataLayoutControl1.Controls.Add(this.textEditPostCount); + this.dataLayoutControl1.Controls.Add(this.checkEditIsDataDocking); + this.dataLayoutControl1.Controls.Add(this.checkEditIsAnaly); + this.dataLayoutControl1.Controls.Add(this.textEditPort); + this.dataLayoutControl1.Controls.Add(this.textEditControlType); + this.dataLayoutControl1.Controls.Add(this.textEditDataDockingFrequency); + this.dataLayoutControl1.Controls.Add(this.checkEditIsWrite); + this.dataLayoutControl1.Controls.Add(this.textEditControlCoefficient); + this.dataLayoutControl1.Controls.Add(this.checkEditIsNoFlowControl); + this.dataLayoutControl1.Controls.Add(this.textEditMinFlow); + this.dataLayoutControl1.Controls.Add(this.textEditMinFlowPumpHz); + this.dataLayoutControl1.Controls.Add(this.textEditWaterLevel); + this.dataLayoutControl1.Controls.Add(this.textEdit1); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(2650, 720, 650, 400); + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(1458, 1077); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // simpleButton6 + // + this.simpleButton6.Location = new System.Drawing.Point(373, 1043); + this.simpleButton6.Name = "simpleButton6"; + this.simpleButton6.Size = new System.Drawing.Size(85, 22); + this.simpleButton6.StyleController = this.dataLayoutControl1; + this.simpleButton6.TabIndex = 29; + this.simpleButton6.Text = "娓呯悊鏁版嵁"; + this.simpleButton6.Click += new System.EventHandler(this.simpleButton6_Click); + // + // simpleButton5 + // + this.simpleButton5.Location = new System.Drawing.Point(279, 1043); + this.simpleButton5.Name = "simpleButton5"; + this.simpleButton5.Size = new System.Drawing.Size(90, 22); + this.simpleButton5.StyleController = this.dataLayoutControl1; + this.simpleButton5.TabIndex = 26; + this.simpleButton5.Text = "閲嶅惎閫氫俊鏈嶅姟"; + this.simpleButton5.Click += new System.EventHandler(this.simpleButton5_Click); + // + // simpleButton4 + // + this.simpleButton4.Location = new System.Drawing.Point(190, 1043); + this.simpleButton4.Name = "simpleButton4"; + this.simpleButton4.Size = new System.Drawing.Size(85, 22); + this.simpleButton4.StyleController = this.dataLayoutControl1; + this.simpleButton4.TabIndex = 25; + this.simpleButton4.Text = "閲嶅惎鍒嗘瀽鏈嶅姟"; + this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click); + // + // simpleButton3 + // + this.simpleButton3.Location = new System.Drawing.Point(101, 1043); + this.simpleButton3.Name = "simpleButton3"; + this.simpleButton3.Size = new System.Drawing.Size(85, 22); + this.simpleButton3.StyleController = this.dataLayoutControl1; + this.simpleButton3.TabIndex = 24; + this.simpleButton3.Text = "閲嶅惎鎺ㄩ�佹湇鍔�"; + this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click); + // + // simpleButton2 + // + this.simpleButton2.Location = new System.Drawing.Point(12, 1043); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(85, 22); + this.simpleButton2.StyleController = this.dataLayoutControl1; + this.simpleButton2.TabIndex = 23; + this.simpleButton2.Text = "閲嶅惎閲囬泦鏈嶅姟"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // textEditDelay + // + this.textEditDelay.Location = new System.Drawing.Point(832, 228); + this.textEditDelay.Name = "textEditDelay"; + this.textEditDelay.Size = new System.Drawing.Size(614, 20); + this.textEditDelay.StyleController = this.dataLayoutControl1; + this.textEditDelay.TabIndex = 19; + // + // simpleButton1 + // + this.simpleButton1.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.simpleButton1.Appearance.Options.UseBackColor = true; + this.simpleButton1.Location = new System.Drawing.Point(1196, 1043); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(250, 22); + this.simpleButton1.StyleController = this.dataLayoutControl1; + this.simpleButton1.TabIndex = 7; + this.simpleButton1.Text = "淇濆瓨"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // checkEditIsPostData + // + this.checkEditIsPostData.Location = new System.Drawing.Point(12, 84); + this.checkEditIsPostData.Name = "checkEditIsPostData"; + this.checkEditIsPostData.Properties.Caption = "鍚敤鏁版嵁鎺ㄩ��"; + this.checkEditIsPostData.Size = new System.Drawing.Size(659, 20); + this.checkEditIsPostData.StyleController = this.dataLayoutControl1; + this.checkEditIsPostData.TabIndex = 6; + // + // textEditControllFrequency + // + this.textEditControllFrequency.Location = new System.Drawing.Point(832, 12); + this.textEditControllFrequency.Name = "textEditControllFrequency"; + this.textEditControllFrequency.Size = new System.Drawing.Size(614, 20); + this.textEditControllFrequency.StyleController = this.dataLayoutControl1; + this.textEditControllFrequency.TabIndex = 5; + // + // checkEditIsControll + // + this.checkEditIsControll.Location = new System.Drawing.Point(12, 60); + this.checkEditIsControll.Name = "checkEditIsControll"; + this.checkEditIsControll.Properties.Caption = "鍚敤鏅鸿兘鎺у埗"; + this.checkEditIsControll.Size = new System.Drawing.Size(659, 20); + this.checkEditIsControll.StyleController = this.dataLayoutControl1; + this.checkEditIsControll.TabIndex = 4; + // + // textEditPostTime + // + this.textEditPostTime.Location = new System.Drawing.Point(832, 156); + this.textEditPostTime.Name = "textEditPostTime"; + this.textEditPostTime.Size = new System.Drawing.Size(614, 20); + this.textEditPostTime.StyleController = this.dataLayoutControl1; + this.textEditPostTime.TabIndex = 8; + // + // textEditIP + // + this.textEditIP.Location = new System.Drawing.Point(169, 180); + this.textEditIP.Name = "textEditIP"; + this.textEditIP.Size = new System.Drawing.Size(502, 20); + this.textEditIP.StyleController = this.dataLayoutControl1; + this.textEditIP.TabIndex = 9; + // + // textEditUser + // + this.textEditUser.Location = new System.Drawing.Point(169, 204); + this.textEditUser.Name = "textEditUser"; + this.textEditUser.Size = new System.Drawing.Size(502, 20); + this.textEditUser.StyleController = this.dataLayoutControl1; + this.textEditUser.TabIndex = 10; + // + // textEditPassword + // + this.textEditPassword.Location = new System.Drawing.Point(832, 204); + this.textEditPassword.Name = "textEditPassword"; + this.textEditPassword.Properties.UseSystemPasswordChar = true; + this.textEditPassword.Size = new System.Drawing.Size(614, 20); + this.textEditPassword.StyleController = this.dataLayoutControl1; + this.textEditPassword.TabIndex = 11; + // + // textEditTopic + // + this.textEditTopic.Location = new System.Drawing.Point(169, 228); + this.textEditTopic.Name = "textEditTopic"; + this.textEditTopic.Size = new System.Drawing.Size(502, 20); + this.textEditTopic.StyleController = this.dataLayoutControl1; + this.textEditTopic.TabIndex = 12; + // + // textEditPostCount + // + this.textEditPostCount.Location = new System.Drawing.Point(169, 156); + this.textEditPostCount.Name = "textEditPostCount"; + this.textEditPostCount.Size = new System.Drawing.Size(502, 20); + this.textEditPostCount.StyleController = this.dataLayoutControl1; + this.textEditPostCount.TabIndex = 13; + // + // checkEditIsDataDocking + // + this.checkEditIsDataDocking.Location = new System.Drawing.Point(12, 12); + this.checkEditIsDataDocking.Name = "checkEditIsDataDocking"; + this.checkEditIsDataDocking.Properties.Caption = "鍚敤鏁版嵁閲囬泦"; + this.checkEditIsDataDocking.Size = new System.Drawing.Size(659, 20); + this.checkEditIsDataDocking.StyleController = this.dataLayoutControl1; + this.checkEditIsDataDocking.TabIndex = 15; + // + // checkEditIsAnaly + // + this.checkEditIsAnaly.Location = new System.Drawing.Point(12, 36); + this.checkEditIsAnaly.Name = "checkEditIsAnaly"; + this.checkEditIsAnaly.Properties.Caption = "鍚敤鏁版嵁鍒嗘瀽"; + this.checkEditIsAnaly.Size = new System.Drawing.Size(659, 20); + this.checkEditIsAnaly.StyleController = this.dataLayoutControl1; + this.checkEditIsAnaly.TabIndex = 16; + // + // textEditPort + // + this.textEditPort.Location = new System.Drawing.Point(832, 180); + this.textEditPort.Name = "textEditPort"; + this.textEditPort.Size = new System.Drawing.Size(614, 20); + this.textEditPort.StyleController = this.dataLayoutControl1; + this.textEditPort.TabIndex = 17; + // + // textEditControlType + // + this.textEditControlType.Location = new System.Drawing.Point(832, 36); + this.textEditControlType.Name = "textEditControlType"; + this.textEditControlType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEditControlType.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { + new DevExpress.XtraEditors.Controls.ImageComboBoxItem("璁惧畾鍘嬪姏鎺у埗", "1", -1), + new DevExpress.XtraEditors.Controls.ImageComboBoxItem("璁惧畾寮�娉垫柟妗堟帶鍒�", "2", -1)}); + this.textEditControlType.Size = new System.Drawing.Size(614, 20); + this.textEditControlType.StyleController = this.dataLayoutControl1; + this.textEditControlType.TabIndex = 18; + // + // textEditDataDockingFrequency + // + this.textEditDataDockingFrequency.Location = new System.Drawing.Point(832, 108); + this.textEditDataDockingFrequency.Name = "textEditDataDockingFrequency"; + this.textEditDataDockingFrequency.Size = new System.Drawing.Size(614, 20); + this.textEditDataDockingFrequency.StyleController = this.dataLayoutControl1; + this.textEditDataDockingFrequency.TabIndex = 20; + // + // checkEditIsWrite + // + this.checkEditIsWrite.Location = new System.Drawing.Point(12, 108); + this.checkEditIsWrite.Name = "checkEditIsWrite"; + this.checkEditIsWrite.Properties.Caption = "鏄惁鎺у埗PLC"; + this.checkEditIsWrite.Size = new System.Drawing.Size(659, 20); + this.checkEditIsWrite.StyleController = this.dataLayoutControl1; + this.checkEditIsWrite.TabIndex = 21; + // + // textEditControlCoefficient + // + this.textEditControlCoefficient.Location = new System.Drawing.Point(832, 132); + this.textEditControlCoefficient.Name = "textEditControlCoefficient"; + this.textEditControlCoefficient.Size = new System.Drawing.Size(614, 20); + this.textEditControlCoefficient.StyleController = this.dataLayoutControl1; + this.textEditControlCoefficient.TabIndex = 27; + // + // checkEditIsNoFlowControl + // + this.checkEditIsNoFlowControl.Location = new System.Drawing.Point(12, 132); + this.checkEditIsNoFlowControl.Name = "checkEditIsNoFlowControl"; + this.checkEditIsNoFlowControl.Properties.Caption = "鏃犳祦閲忚鎺у埗"; + this.checkEditIsNoFlowControl.Size = new System.Drawing.Size(659, 20); + this.checkEditIsNoFlowControl.StyleController = this.dataLayoutControl1; + this.checkEditIsNoFlowControl.TabIndex = 28; + // + // textEditMinFlow + // + this.textEditMinFlow.Location = new System.Drawing.Point(832, 84); + this.textEditMinFlow.Name = "textEditMinFlow"; + this.textEditMinFlow.Size = new System.Drawing.Size(614, 20); + this.textEditMinFlow.StyleController = this.dataLayoutControl1; + this.textEditMinFlow.TabIndex = 30; + // + // textEditMinFlowPumpHz + // + this.textEditMinFlowPumpHz.Location = new System.Drawing.Point(169, 252); + this.textEditMinFlowPumpHz.Name = "textEditMinFlowPumpHz"; + this.textEditMinFlowPumpHz.Size = new System.Drawing.Size(502, 20); + this.textEditMinFlowPumpHz.StyleController = this.dataLayoutControl1; + this.textEditMinFlowPumpHz.TabIndex = 31; + this.textEditMinFlowPumpHz.ToolTip = "绯荤粺姣忓ぉ浼氳嚜鍔ㄦ洿鏂帮紝缁撳悎鏈�灏忔祦閲忎笂闄愰榾鍊�"; + // + // textEditWaterLevel + // + this.textEditWaterLevel.Location = new System.Drawing.Point(832, 252); + this.textEditWaterLevel.Name = "textEditWaterLevel"; + this.textEditWaterLevel.Size = new System.Drawing.Size(614, 20); + this.textEditWaterLevel.StyleController = this.dataLayoutControl1; + this.textEditWaterLevel.TabIndex = 32; + // + // textEdit1 + // + this.textEdit1.Location = new System.Drawing.Point(832, 60); + this.textEdit1.Name = "textEdit1"; + this.textEdit1.Size = new System.Drawing.Size(614, 20); + this.textEdit1.StyleController = this.dataLayoutControl1; + this.textEdit1.TabIndex = 33; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.emptySpaceItem1, + this.layoutControlItem2, + this.layoutControlItem3, + this.layoutControlItem4, + this.emptySpaceItem2, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem10, + this.emptySpaceItem3, + this.layoutControlItem12, + this.layoutControlItem9, + this.layoutControlItem14, + this.layoutControlItem7, + this.layoutControlItem8, + this.layoutControlItem11, + this.layoutControlItem19, + this.layoutControlItem20, + this.layoutControlItem21, + this.layoutControlItem22, + this.layoutControlItem24, + this.layoutControlItem23, + this.layoutControlItem17, + this.layoutControlItem16, + this.layoutControlItem25, + this.layoutControlItem27, + this.layoutControlItem28, + this.layoutControlItem13, + this.layoutControlItem29, + this.layoutControlItem15, + this.layoutControlItem26}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(1458, 1077); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.checkEditIsControll; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 264); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(663, 767); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.textEditControllFrequency; + this.layoutControlItem2.CustomizationFormText = "鏅鸿兘鎺у埗棰戠巼锛堢锛夛細"; + this.layoutControlItem2.Location = new System.Drawing.Point(663, 0); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem2.Text = "鏅鸿兘鎺у埗棰戠巼锛堢锛夛細"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.checkEditIsPostData; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.simpleButton1; + this.layoutControlItem4.Location = new System.Drawing.Point(1184, 1031); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(254, 26); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(450, 1031); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(734, 26); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.textEditPostTime; + this.layoutControlItem5.Location = new System.Drawing.Point(663, 144); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem5.Text = "鎺ㄩ�侀鐜囷紙鍒嗛挓锛夛細"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.textEditIP; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 168); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem6.Text = "MQTT鏈嶅姟鍣↖P鍦板潃锛�"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.textEditPostCount; + this.layoutControlItem10.Location = new System.Drawing.Point(0, 144); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem10.Text = "姣忔鎺ㄩ�佹暟閲忥細"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(145, 14); + // + // emptySpaceItem3 + // + this.emptySpaceItem3.AllowHotTrack = false; + this.emptySpaceItem3.Location = new System.Drawing.Point(663, 264); + this.emptySpaceItem3.Name = "emptySpaceItem3"; + this.emptySpaceItem3.Size = new System.Drawing.Size(775, 767); + this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.checkEditIsDataDocking; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem12.TextVisible = false; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.textEditTopic; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 216); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem9.Text = "MQTT涓婚锛圱opic锛夛細"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem14 + // + this.layoutControlItem14.Control = this.textEditPort; + this.layoutControlItem14.Location = new System.Drawing.Point(663, 168); + this.layoutControlItem14.Name = "layoutControlItem14"; + this.layoutControlItem14.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem14.Text = "MQTT绔彛锛�"; + this.layoutControlItem14.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.textEditUser; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 192); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem7.Text = "MQTT璐﹀彿锛�"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.textEditPassword; + this.layoutControlItem8.Location = new System.Drawing.Point(663, 192); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem8.Text = "MQTT瀵嗙爜锛�"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.textEditDelay; + this.layoutControlItem11.Location = new System.Drawing.Point(663, 216); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem11.Text = "寤惰繜鑾峰彇鏁版嵁锛堢锛夛細"; + this.layoutControlItem11.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem19 + // + this.layoutControlItem19.Control = this.simpleButton2; + this.layoutControlItem19.Location = new System.Drawing.Point(0, 1031); + this.layoutControlItem19.Name = "layoutControlItem19"; + this.layoutControlItem19.Size = new System.Drawing.Size(89, 26); + this.layoutControlItem19.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem19.TextVisible = false; + // + // layoutControlItem20 + // + this.layoutControlItem20.Control = this.simpleButton3; + this.layoutControlItem20.Location = new System.Drawing.Point(89, 1031); + this.layoutControlItem20.Name = "layoutControlItem20"; + this.layoutControlItem20.Size = new System.Drawing.Size(89, 26); + this.layoutControlItem20.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem20.TextVisible = false; + // + // layoutControlItem21 + // + this.layoutControlItem21.Control = this.simpleButton4; + this.layoutControlItem21.Location = new System.Drawing.Point(178, 1031); + this.layoutControlItem21.Name = "layoutControlItem21"; + this.layoutControlItem21.Size = new System.Drawing.Size(89, 26); + this.layoutControlItem21.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem21.TextVisible = false; + // + // layoutControlItem22 + // + this.layoutControlItem22.Control = this.simpleButton5; + this.layoutControlItem22.Location = new System.Drawing.Point(267, 1031); + this.layoutControlItem22.Name = "layoutControlItem22"; + this.layoutControlItem22.Size = new System.Drawing.Size(94, 26); + this.layoutControlItem22.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem22.TextVisible = false; + // + // layoutControlItem24 + // + this.layoutControlItem24.Control = this.checkEditIsNoFlowControl; + this.layoutControlItem24.Location = new System.Drawing.Point(0, 120); + this.layoutControlItem24.Name = "layoutControlItem24"; + this.layoutControlItem24.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem24.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem24.TextVisible = false; + // + // layoutControlItem23 + // + this.layoutControlItem23.Control = this.textEditControlCoefficient; + this.layoutControlItem23.Location = new System.Drawing.Point(663, 120); + this.layoutControlItem23.Name = "layoutControlItem23"; + this.layoutControlItem23.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem23.Text = "鎺у埗绯绘暟"; + this.layoutControlItem23.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem17 + // + this.layoutControlItem17.Control = this.checkEditIsWrite; + this.layoutControlItem17.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem17.Name = "layoutControlItem17"; + this.layoutControlItem17.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem17.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem17.TextVisible = false; + // + // layoutControlItem16 + // + this.layoutControlItem16.Control = this.textEditDataDockingFrequency; + this.layoutControlItem16.Location = new System.Drawing.Point(663, 96); + this.layoutControlItem16.Name = "layoutControlItem16"; + this.layoutControlItem16.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem16.Text = "鏁版嵁閲囬泦棰戠巼锛堢锛夛細"; + this.layoutControlItem16.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem25 + // + this.layoutControlItem25.Control = this.simpleButton6; + this.layoutControlItem25.Location = new System.Drawing.Point(361, 1031); + this.layoutControlItem25.Name = "layoutControlItem25"; + this.layoutControlItem25.Size = new System.Drawing.Size(89, 26); + this.layoutControlItem25.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem25.TextVisible = false; + // + // layoutControlItem26 + // + this.layoutControlItem26.Control = this.textEditMinFlow; + this.layoutControlItem26.Location = new System.Drawing.Point(663, 72); + this.layoutControlItem26.Name = "layoutControlItem26"; + this.layoutControlItem26.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem26.Text = "鏈�灏忔祦閲忎笂闄愰榾鍊硷細"; + this.layoutControlItem26.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem27 + // + this.layoutControlItem27.Control = this.textEditMinFlowPumpHz; + this.layoutControlItem27.Location = new System.Drawing.Point(0, 240); + this.layoutControlItem27.Name = "layoutControlItem27"; + this.layoutControlItem27.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem27.Text = "鍘嗗彶灏忔祦閲忔车棰戠巼锛圚z锛夛細"; + this.layoutControlItem27.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem28 + // + this.layoutControlItem28.Control = this.textEditWaterLevel; + this.layoutControlItem28.Location = new System.Drawing.Point(663, 240); + this.layoutControlItem28.Name = "layoutControlItem28"; + this.layoutControlItem28.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem28.Text = "鍥哄畾姘翠綅锛坢锛夛細"; + this.layoutControlItem28.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem13 + // + this.layoutControlItem13.Control = this.checkEditIsAnaly; + this.layoutControlItem13.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem13.Name = "layoutControlItem13"; + this.layoutControlItem13.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem13.TextVisible = false; + // + // layoutControlItem29 + // + this.layoutControlItem29.Control = this.textEdit1; + this.layoutControlItem29.Location = new System.Drawing.Point(663, 48); + this.layoutControlItem29.Name = "layoutControlItem29"; + this.layoutControlItem29.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem29.Text = "鍘嬪姏鎺у埗闃堝�硷紙m锛夛細"; + this.layoutControlItem29.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem15 + // + this.layoutControlItem15.Control = this.textEditControlType; + this.layoutControlItem15.Location = new System.Drawing.Point(663, 24); + this.layoutControlItem15.Name = "layoutControlItem15"; + this.layoutControlItem15.Size = new System.Drawing.Size(775, 24); + this.layoutControlItem15.Text = "鏅鸿兘鎺у埗妯″紡锛�"; + this.layoutControlItem15.TextSize = new System.Drawing.Size(145, 14); + // + // layoutControlItem18 + // + this.layoutControlItem18.Location = new System.Drawing.Point(0, 264); + this.layoutControlItem18.Name = "layoutControlItem18"; + this.layoutControlItem18.Size = new System.Drawing.Size(663, 24); + this.layoutControlItem18.Text = "娉靛垏鎹㈤棿闅旓紙灏忔椂锛夛細"; + this.layoutControlItem18.TextSize = new System.Drawing.Size(145, 14); + // + // EboxFormParams + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "EboxFormParams"; + this.Size = new System.Drawing.Size(1458, 1077); + this.Load += new System.EventHandler(this.EboxFormParams_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEditDelay.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsPostData.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditControllFrequency.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsControll.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPostTime.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditUser.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPassword.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditTopic.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPostCount.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsDataDocking.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsAnaly.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditControlType.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditDataDockingFrequency.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsWrite.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditControlCoefficient.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.checkEditIsNoFlowControl.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditMinFlow.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditMinFlowPumpHz.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditWaterLevel.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem20)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem24)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem23)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem25)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem26)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem27)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem28)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem29)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.CheckEdit checkEditIsPostData; + private DevExpress.XtraEditors.TextEdit textEditControllFrequency; + private DevExpress.XtraEditors.CheckEdit checkEditIsControll; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.TextEdit textEditPostTime; + private DevExpress.XtraEditors.TextEdit textEditIP; + private DevExpress.XtraEditors.TextEdit textEditUser; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraEditors.TextEdit textEditPassword; + private DevExpress.XtraEditors.TextEdit textEditTopic; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraEditors.TextEdit textEditPostCount; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraEditors.CheckEdit checkEditIsDataDocking; + private DevExpress.XtraEditors.CheckEdit checkEditIsAnaly; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3; + private DevExpress.XtraEditors.TextEdit textEditPort; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + private DevExpress.XtraEditors.ImageComboBoxEdit textEditControlType; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraEditors.TextEdit textEditDelay; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraEditors.TextEdit textEditDataDockingFrequency; + private DevExpress.XtraEditors.CheckEdit checkEditIsWrite; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17; + private DevExpress.XtraEditors.SimpleButton simpleButton5; + private DevExpress.XtraEditors.SimpleButton simpleButton4; + private DevExpress.XtraEditors.SimpleButton simpleButton3; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem19; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem20; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem21; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem22; + private DevExpress.XtraEditors.TextEdit textEditControlCoefficient; + private DevExpress.XtraEditors.CheckEdit checkEditIsNoFlowControl; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem24; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem23; + private DevExpress.XtraEditors.SimpleButton simpleButton6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem25; + private DevExpress.XtraEditors.TextEdit textEditMinFlow; + private DevExpress.XtraEditors.TextEdit textEditMinFlowPumpHz; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem26; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; + private DevExpress.XtraEditors.TextEdit textEditWaterLevel; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem28; + private DevExpress.XtraEditors.TextEdit textEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem29; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.cs new file mode 100644 index 0000000..7f1b079 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.cs @@ -0,0 +1,212 @@ +锘縰sing DevExpress.XtraEditors.Controls; +using Yw; +using Yw.WinFrmUI; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormParams : DocumentPage + { + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getparamsCode = "getparams"; + private string saveparamsCode = "saveparams"; + private string restartserviceCode = "restartservice";//閲嶅惎鏈嶅姟 + private string clearupdataCode = "clearupdata"; + + private void EboxFormParams_Load(object sender, EventArgs e) + { + //BluetoothHelper.GetInstance().SMR -= null; + //BluetoothHelper.GetInstance().SMR += new BluetoothHelper.ShowMessReturn(GetReceive); + //BluetoothHelper.GetInstance().ListenerData(); + Thread.Sleep(500); + SendText(startCode + getparamsCode + paramCode + endCode); + } + + public IBoxFormParams() + { + this.PageTitle.Caption = "鍙傛暟閰嶇疆"; + InitializeComponent(); + + WaitFormHelper.ShowWaitForm(); + } + + public void GetReceive(string msg) + { + if (!this.IsHandleCreated || this.IsDisposed || string.IsNullOrEmpty(msg)) return; + if (msg.StartsWith("error:") && msg.Contains("鐩爣涓绘満鍧忎簡")) + { + MessageBoxHelper.ShowWarning("p 钃濈墮璁惧杩炴帴澶辫触锛岃閲嶈瘯!"); return; + } + if (!string.IsNullOrEmpty(msg) && msg.Contains(startCode)) + { + var order = msg.Replace(endCode, "").Replace(startCode, "").Trim(); + SetOrder(order); + } + else MessageBoxHelper.ShowWarning("p 钃濈墮璁惧杩炴帴澶辫触"); + } + + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + //淇濆瓨鍙傛暟 + var model = new IBoxConfigViewModel() + { + ControllFrequency = (int.Parse(textEditControllFrequency.Text) * 1000).ToString(), + IsAnaly = checkEditIsAnaly.Checked.ToString(), + IsControll = checkEditIsControll.Checked.ToString(), + IsDataDocking = checkEditIsDataDocking.Checked.ToString(), + IsPostData = checkEditIsPostData.Checked.ToString(), + PostCount = textEditPostCount.Text, + PostTime = (int.Parse(textEditPostTime.Text) * 60 * 1000).ToString(), + ControlType = ((ImageComboBoxItem)textEditControlType.SelectedItem).Value.ToString(), + DelayGetRealData = textEditDelay.Text, + IsWrite = checkEditIsWrite.Checked.ToString(), + DataDockingFrequency = (int.Parse(textEditDataDockingFrequency.Text) * 1000).ToString(), + IsNoFlowControl = checkEditIsNoFlowControl.Checked.ToString(), + ControlCoefficient = textEditControlCoefficient.Text, + MinFlow = textEditMinFlow.Text, + MinFlowPumpHz = textEditMinFlowPumpHz.Text, + //PumpChangeHours = textEditPumpChangeHours.Text, + WaterLevel = textEditWaterLevel.Text, + PressYu = textEdit1.Text, + PostDataConfig = new MqttViewModel() + { + IP = textEditIP.Text, + Password = textEditPassword.Text, + Topic = textEditTopic.Text, + User = textEditUser.Text, + Port = textEditPort.Text, + } + }; + SendText(startCode + saveparamsCode + paramCode + JsonHelper.Object2Json(model) + endCode); + MessageBoxHelper.ShowInfo("淇濆瓨鎴愬姛"); + } + + private void SetOrder(string order) + { + var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries); + if (smsg.Length < 2) + { + return; + } + + switch (smsg[0].Trim()) + { + case "getparams": + var model = JsonHelper.Json2Object<IBoxConfigViewModel>(smsg[1].Trim()); + BindData(model); + break; + case "saveparams": + break; + } + } + + public void BindData(IBoxConfigViewModel model, bool isBlue = true) + { + if (model != null) + { + if (isBlue) + { + this.Invoke(new Action(() => + { + textEditControllFrequency.Text = (int.Parse(model.ControllFrequency) / 1000).ToString(); ; + checkEditIsAnaly.Checked = model.IsAnaly == "True" ? true : false; + checkEditIsControll.Checked = model.IsControll == "True" ? true : false; + checkEditIsDataDocking.Checked = model.IsDataDocking == "True" ? true : false; + checkEditIsPostData.Checked = model.IsPostData == "True" ? true : false; + textEditPostCount.Text = model.PostCount; + textEditPostTime.Text = (int.Parse(model.PostTime) / 60 / 1000).ToString(); + //textEditPostLastTime.Text = model.PostLastTime; + textEditControlType.SelectedIndex = model.ControlType == "1" ? 0 : 1; + textEditIP.Text = model.PostDataConfig.IP; + textEditPassword.Text = model.PostDataConfig.Password; + textEditTopic.Text = model.PostDataConfig.Topic; + textEditUser.Text = model.PostDataConfig.User; + textEditPort.Text = model.PostDataConfig.Port; + textEditDelay.Text = model.DelayGetRealData; + checkEditIsNoFlowControl.Checked = model.IsNoFlowControl == "True" ? true : false; + textEditControlCoefficient.Text = model.ControlCoefficient; + textEditDataDockingFrequency.Text = (int.Parse(model.DataDockingFrequency) / 1000).ToString(); + checkEditIsWrite.Checked = model.IsWrite == "True" ? true : false; + textEditMinFlow.Text = model.MinFlow; + textEditMinFlowPumpHz.Text = model.MinFlowPumpHz; + textEditWaterLevel.Text = model.WaterLevel; + //textEditPumpChangeHours.Text = model.PumpChangeHours; + textEdit1.Text = model.PressYu; + })); + } + else + { + textEditControllFrequency.Text = (int.Parse(model.ControllFrequency) / 1000).ToString(); + checkEditIsAnaly.Checked = model.IsAnaly == "True" ? true : false; + checkEditIsControll.Checked = model.IsControll == "True" ? true : false; + checkEditIsDataDocking.Checked = model.IsDataDocking == "True" ? true : false; + checkEditIsPostData.Checked = model.IsPostData == "True" ? true : false; + textEditPostCount.Text = model.PostCount; + //textEditPumpChangeHours.Text = model.InitUseWater; + textEditPostTime.Text = (int.Parse(model.PostTime) / 60 / 1000).ToString(); + checkEditIsNoFlowControl.Checked = model.IsNoFlowControl == "True" ? true : false; + textEditControlCoefficient.Text = model.ControlCoefficient; + //textEditPostLastTime.Text = model.PostLastTime; + textEditControlType.SelectedIndex = model.ControlType == "1" ? 0 : 1; + textEditIP.Text = model.PostDataConfig.IP; + textEditPassword.Text = model.PostDataConfig.Password; + textEditTopic.Text = model.PostDataConfig.Topic; + textEditUser.Text = model.PostDataConfig.User; + textEditPort.Text = model.PostDataConfig.Port; + textEditDelay.Text = model.DelayGetRealData; + textEditDataDockingFrequency.Text = (int.Parse(model.DataDockingFrequency) / 1000).ToString(); + checkEditIsWrite.Checked = model.IsWrite == "True" ? true : false; + textEditMinFlow.Text = model.MinFlow; + textEditMinFlowPumpHz.Text = model.MinFlowPumpHz; + textEditWaterLevel.Text = model.WaterLevel; + //textEditPumpChangeHours.Text = model.PumpChangeHours; + textEdit1.Text = model.PressYu; + } + } + WaitFormHelper.HideWaitForm(); + } + + private void simpleButton5_Click(object sender, EventArgs e) + { + //閲嶅惎閫氳鏈嶅姟 + SendText(startCode + restartserviceCode + paramCode + "WebServer" + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + } + + private void simpleButton4_Click(object sender, EventArgs e) + { + //閲嶅惎鍒嗘瀽鏈嶅姟 + SendText(startCode + restartserviceCode + paramCode + "AnalyConsole" + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + } + + private void simpleButton3_Click(object sender, EventArgs e) + { + //閲嶅惎鎺ㄩ�佹湇鍔� + SendText(startCode + restartserviceCode + paramCode + "PostDataConsole" + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + } + + private void simpleButton2_Click(object sender, EventArgs e) + { + //閲嶅惎閲囬泦鏈嶅姟 + SendText(startCode + restartserviceCode + paramCode + "DataDockingConsole" + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + } + + private void simpleButton6_Click(object sender, EventArgs e) + { + //娓呯悊鏁版嵁 + SendText(startCode + clearupdataCode + paramCode + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormParams.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.Designer.cs new file mode 100644 index 0000000..08616ad --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.Designer.cs @@ -0,0 +1,188 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormProtocol + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.panelControl1 = new DevExpress.XtraEditors.PanelControl(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.imageComboBoxEditType = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageComboBoxEditType.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.panelControl1); + this.dataLayoutControl1.Controls.Add(this.simpleButton1); + this.dataLayoutControl1.Controls.Add(this.imageComboBoxEditType); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(970, 805); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // panelControl1 + // + this.panelControl1.Location = new System.Drawing.Point(12, 36); + this.panelControl1.Name = "panelControl1"; + this.panelControl1.Size = new System.Drawing.Size(946, 121); + this.panelControl1.TabIndex = 16; + // + // simpleButton1 + // + this.simpleButton1.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.simpleButton1.Appearance.Options.UseBackColor = true; + this.simpleButton1.Location = new System.Drawing.Point(685, 161); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(273, 22); + this.simpleButton1.StyleController = this.dataLayoutControl1; + this.simpleButton1.TabIndex = 8; + this.simpleButton1.Text = "淇濆瓨"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem2, + this.layoutControlItem4, + this.emptySpaceItem2, + this.emptySpaceItem3, + this.layoutControlItem12}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(970, 805); + this.Root.TextVisible = false; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.simpleButton1; + this.layoutControlItem4.Location = new System.Drawing.Point(673, 149); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(277, 26); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(0, 175); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(950, 610); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // emptySpaceItem3 + // + this.emptySpaceItem3.AllowHotTrack = false; + this.emptySpaceItem3.Location = new System.Drawing.Point(0, 149); + this.emptySpaceItem3.Name = "emptySpaceItem3"; + this.emptySpaceItem3.Size = new System.Drawing.Size(673, 26); + this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.panelControl1; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(950, 125); + this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem12.TextVisible = false; + // + // imageComboBoxEditType + // + this.imageComboBoxEditType.Location = new System.Drawing.Point(84, 12); + this.imageComboBoxEditType.Name = "imageComboBoxEditType"; + this.imageComboBoxEditType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.imageComboBoxEditType.Size = new System.Drawing.Size(874, 20); + this.imageComboBoxEditType.StyleController = this.dataLayoutControl1; + this.imageComboBoxEditType.TabIndex = 5; + this.imageComboBoxEditType.SelectedValueChanged += new System.EventHandler(this.imageComboBoxEdit1_SelectedValueChanged); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.imageComboBoxEditType; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(950, 24); + this.layoutControlItem2.Text = "鍗忚绫诲瀷锛�"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(60, 14); + // + // EboxFormProtocol + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "EboxFormProtocol"; + this.Size = new System.Drawing.Size(970, 805); + this.Load += new System.EventHandler(this.EboxFormProtocol_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageComboBoxEditType.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEditType; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3; + private DevExpress.XtraEditors.PanelControl panelControl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.cs new file mode 100644 index 0000000..115d47f --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.cs @@ -0,0 +1,267 @@ +锘�//using CodeProvider; +using DevExpress.Utils.Extensions; +using DevExpress.XtraEditors.Controls; +using System.Data; +using Yw; +using Yw.WinFrmUI; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormProtocol : DocumentPage + { + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getprotocolCode = "getprotocol"; + private string saveprotocolCode = "saveprotocol"; + public IBoxFormProtocol() + { + this.PageTitle.Caption = "鍗忚閰嶇疆"; + InitializeComponent(); + SetData(); + + } + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + + + public void GetReceive(string msg) + { + if (!this.IsHandleCreated || this.IsDisposed || string.IsNullOrEmpty(msg)) return; + if (msg.StartsWith("error:") && msg.Contains("鐩爣涓绘満鍧忎簡")) + { + MessageBoxHelper.ShowError("pr 钃濈墮璁惧杩炴帴澶辫触锛岃閲嶈瘯!"); return; + } + if (!string.IsNullOrEmpty(msg) && msg.Contains(startCode)) + { + var order = msg.Replace(endCode, "").Replace(startCode, "").Trim(); + SetOrder(order); + } + else MessageBoxHelper.ShowError("pr 钃濈墮璁惧杩炴帴澶辫触!"); + } + private void simpleButton1_Click(object sender, EventArgs e) + { + SendText(startCode + saveprotocolCode + paramCode + JsonHelper.Object2Json(GetData()) + endCode); + MessageBoxHelper.ShowInfo("鏁版嵁淇濆瓨鎴愬姛!"); + } + + private void SetData() + { + + var control = new ProtocolModbus(); + control.Dock = DockStyle.Fill; + AddControl(control); + + var protocolTypes = new dModbus().ProtocolType(); + protocolTypes.ForEach((p) => + { + imageComboBoxEditType.Properties.Items.Add(p.Key, p.Value, -1); + }); + + imageComboBoxEditType.SelectItemByDescription("ModbusRTU"); + } + + private void imageComboBoxEdit1_SelectedValueChanged(object sender, EventArgs e) + { + var cbItem = imageComboBoxEditType.SelectedItem as ImageComboBoxItem; + var v = cbItem.Value as string; + ChangeType(v, null); + } + + private IBoxProtocolViewModel GetData() + { + IBoxProtocolViewModel model = new IBoxProtocolViewModel(); + var cbItem = imageComboBoxEditType.SelectedItem as ImageComboBoxItem; + var v = cbItem.Value as string; + switch (v) + { + case "ModbusRTU": + case "ModbusAscii": + { + model = protocolModbus.GetData(); + break; + } + case "ModbusTcp": + { + model = protocolModbusTcp.GetData(); + break; + } + case "S7200": + case "S7200Smart": + case "S7300": + case "S7400": + case "S71200": + case "S71500": + { + model = protocolXMZ.GetData(); + break; + } + case "MCQna3E": + case "MCA1E": + { + model = protocolSL.GetData(); + break; + } + case "Fins": + { + model = protocolOML.GetData(); + break; + } + case "CIP": + { + model = protocolLKWE.GetData(); + break; + } + } + model.ProtocolType = v; + + return model; + } + + private ProtocolModbus protocolModbus; + private ProtocolModbusTcp protocolModbusTcp; + private ProtocolXMZ protocolXMZ; + private ProtocolSL protocolSL; + private ProtocolOML protocolOML; + private ProtocolLKWE protocolLKWE; + + private void ChangeType(string v, IBoxProtocolViewModel model) + { + switch (v) + { + case "ModbusRTU": + case "ModbusAscii": + { + protocolModbus = new ProtocolModbus(); + protocolModbus.Dock = DockStyle.Fill; + if (model != null) + protocolModbus.SetData(model); + AddControl(protocolModbus); + break; + } + case "ModbusTcp": + { + protocolModbusTcp = new ProtocolModbusTcp(); + protocolModbusTcp.Dock = DockStyle.Fill; + if (model != null) + protocolModbusTcp.SetData(model); + AddControl(protocolModbusTcp); + break; + } + case "S7200": + case "S7200Smart": + case "S7300": + case "S7400": + case "S71200": + case "S71500": + { + protocolXMZ = new ProtocolXMZ(); + protocolXMZ.Dock = DockStyle.Fill; + if (model != null) + protocolXMZ.SetData(model); + AddControl(protocolXMZ); + break; + } + case "MCQna3E": + case "MCA1E": + { + protocolSL = new ProtocolSL(); + protocolSL.Dock = DockStyle.Fill; + if (model != null) + protocolSL.SetData(model); + AddControl(protocolSL); + break; + } + case "Fins": + { + protocolOML = new ProtocolOML(); + protocolOML.Dock = DockStyle.Fill; + if (model != null) + protocolOML.SetData(model); + AddControl(protocolOML); + break; + } + case "CIP": + { + protocolLKWE = new ProtocolLKWE(); + protocolLKWE.Dock = DockStyle.Fill; + if (model != null) + protocolLKWE.SetData(model); + AddControl(protocolLKWE); + break; + } + } + } + + private void AddControl(Control control) + { + if (panelControl1.Controls.Count > 0) + { + panelControl1.Controls.RemoveAt(0); + } + panelControl1.Controls.Add(control); + } + + private void EboxFormProtocol_Load(object sender, EventArgs e) + { + Thread.Sleep(500); + SendText(startCode + getprotocolCode + paramCode + endCode); + //BluetoothHelper.GetInstance().SMR -= null; + //BluetoothHelper.GetInstance().SMR += new BluetoothHelper.ShowMessReturn(GetReceive); + } + + private void SetOrder(string order) + { + var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries); + if (smsg.Length < 2) + { + return; + } + + switch (smsg[0].Trim()) + { + case "getprotocol": + var model = JsonHelper.Json2Object<IBoxProtocolViewModel>(smsg[1].Trim()); + BindData(model); + break; + } + } + + public void BindData(IBoxProtocolViewModel model, bool isBlue = true) + { + if (model == null) + { + model = new IBoxProtocolViewModel() + { + ProtocolType = "ModbusRTU", + BaudRate = 9600, + dataBits = 8, + parity = System.IO.Ports.Parity.None, + StationNumber = 1, + stopBits = System.IO.Ports.StopBits.One + }; + } + if (isBlue) { + this.Invoke(new Action(() => + { + var protocols = new dModbus().ProtocolType(); + var des = protocols.FirstOrDefault(x => x.Value == model.ProtocolType).Key; + imageComboBoxEditType.SelectItemByDescription(des); + ChangeType(model.ProtocolType, model); + })); + } + else + { + var protocols = new dModbus().ProtocolType(); + var des = protocols.FirstOrDefault(x => x.Value == model.ProtocolType).Key; + imageComboBoxEditType.SelectItemByDescription(des); + ChangeType(model.ProtocolType, model); + } + + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormProtocol.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.Designer.cs new file mode 100644 index 0000000..e013cdd --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.Designer.cs @@ -0,0 +1,627 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormRule + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.simpleButton7 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton6 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton5 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.dataGridMonitorViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.colGroupName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colMonitorName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colUnitName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colIsEnable = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemCheckEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit(); + this.colBusAddress = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemTextEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + this.colBusType = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemImageComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox(); + this.colOperator = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemImageComboBox2 = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox(); + this.colOperands = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemTextEdit2 = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + this.colAccuracy = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemTextEdit3 = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + this.colAdcType = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemImageComboBox3 = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox(); + this.colUpperRange = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemTextEdit4 = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + this.colLowerRange = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemTextEdit5 = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.simpleButton8 = new DevExpress.XtraEditors.SimpleButton(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridMonitorViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckEdit1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.simpleButton8); + this.dataLayoutControl1.Controls.Add(this.simpleButton7); + this.dataLayoutControl1.Controls.Add(this.simpleButton6); + this.dataLayoutControl1.Controls.Add(this.simpleButton5); + this.dataLayoutControl1.Controls.Add(this.simpleButton4); + this.dataLayoutControl1.Controls.Add(this.simpleButton3); + this.dataLayoutControl1.Controls.Add(this.simpleButton2); + this.dataLayoutControl1.Controls.Add(this.simpleButton1); + this.dataLayoutControl1.Controls.Add(this.gridControl1); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(1346, 639); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // simpleButton7 + // + this.simpleButton7.Location = new System.Drawing.Point(259, 605); + this.simpleButton7.Name = "simpleButton7"; + this.simpleButton7.Size = new System.Drawing.Size(106, 22); + this.simpleButton7.StyleController = this.dataLayoutControl1; + this.simpleButton7.TabIndex = 11; + this.simpleButton7.Text = "鍒犻櫎鏈虹粍"; + this.simpleButton7.Click += new System.EventHandler(this.simpleButton7_Click); + // + // simpleButton6 + // + this.simpleButton6.Location = new System.Drawing.Point(130, 605); + this.simpleButton6.Name = "simpleButton6"; + this.simpleButton6.Size = new System.Drawing.Size(125, 22); + this.simpleButton6.StyleController = this.dataLayoutControl1; + this.simpleButton6.TabIndex = 10; + this.simpleButton6.Text = "缂栬緫鏈虹粍"; + this.simpleButton6.Click += new System.EventHandler(this.simpleButton6_Click); + // + // simpleButton5 + // + this.simpleButton5.Location = new System.Drawing.Point(575, 605); + this.simpleButton5.Name = "simpleButton5"; + this.simpleButton5.Size = new System.Drawing.Size(91, 22); + this.simpleButton5.StyleController = this.dataLayoutControl1; + this.simpleButton5.TabIndex = 9; + this.simpleButton5.Text = "鍒犻櫎娴嬬偣"; + this.simpleButton5.Click += new System.EventHandler(this.simpleButton5_Click); + // + // simpleButton4 + // + this.simpleButton4.Location = new System.Drawing.Point(473, 605); + this.simpleButton4.Name = "simpleButton4"; + this.simpleButton4.Size = new System.Drawing.Size(98, 22); + this.simpleButton4.StyleController = this.dataLayoutControl1; + this.simpleButton4.TabIndex = 8; + this.simpleButton4.Text = "淇敼娴嬬偣"; + this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click); + // + // simpleButton3 + // + this.simpleButton3.Location = new System.Drawing.Point(369, 605); + this.simpleButton3.Name = "simpleButton3"; + this.simpleButton3.Size = new System.Drawing.Size(100, 22); + this.simpleButton3.StyleController = this.dataLayoutControl1; + this.simpleButton3.TabIndex = 7; + this.simpleButton3.Text = "鏂板娴嬬偣"; + this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click); + // + // simpleButton2 + // + this.simpleButton2.Location = new System.Drawing.Point(12, 605); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(114, 22); + this.simpleButton2.StyleController = this.dataLayoutControl1; + this.simpleButton2.TabIndex = 6; + this.simpleButton2.Text = "鏂板鏈虹粍"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // simpleButton1 + // + this.simpleButton1.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.simpleButton1.Appearance.Options.UseBackColor = true; + this.simpleButton1.Location = new System.Drawing.Point(1140, 605); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(94, 22); + this.simpleButton1.StyleController = this.dataLayoutControl1; + this.simpleButton1.TabIndex = 5; + this.simpleButton1.Text = "淇濆瓨"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // gridControl1 + // + this.gridControl1.DataSource = this.dataGridMonitorViewModelBindingSource; + this.gridControl1.Location = new System.Drawing.Point(12, 12); + this.gridControl1.MainView = this.gridView1; + this.gridControl1.Name = "gridControl1"; + this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { + this.repositoryItemCheckEdit1, + this.repositoryItemTextEdit1, + this.repositoryItemImageComboBox1, + this.repositoryItemImageComboBox2, + this.repositoryItemTextEdit2, + this.repositoryItemTextEdit3, + this.repositoryItemImageComboBox3, + this.repositoryItemTextEdit4, + this.repositoryItemTextEdit5}); + this.gridControl1.Size = new System.Drawing.Size(1322, 589); + this.gridControl1.TabIndex = 4; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // dataGridMonitorViewModelBindingSource + // + this.dataGridMonitorViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.DataGridMonitorViewModel); + // + // gridView1 + // + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colGroupName, + this.colMonitorName, + this.colUnitName, + this.colIsEnable, + this.colBusAddress, + this.colBusType, + this.colOperator, + this.colOperands, + this.colAccuracy, + this.colAdcType, + this.colUpperRange, + this.colLowerRange}); + this.gridView1.GridControl = this.gridControl1; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsBehavior.AllowFixedGroups = DevExpress.Utils.DefaultBoolean.False; + this.gridView1.OptionsCustomization.AllowGroup = false; + this.gridView1.OptionsMenu.EnableGroupPanelMenu = false; + this.gridView1.OptionsView.AllowCellMerge = true; + this.gridView1.OptionsView.ShowGroupPanel = false; + // + // colGroupName + // + this.colGroupName.Caption = "鏈虹粍鍚嶇О"; + this.colGroupName.FieldName = "GroupName"; + this.colGroupName.Name = "colGroupName"; + this.colGroupName.OptionsColumn.AllowEdit = false; + this.colGroupName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; + this.colGroupName.Visible = true; + this.colGroupName.VisibleIndex = 0; + this.colGroupName.Width = 87; + // + // colMonitorName + // + this.colMonitorName.Caption = "娴嬬偣鍚嶇О"; + this.colMonitorName.FieldName = "MonitorName"; + this.colMonitorName.Name = "colMonitorName"; + this.colMonitorName.OptionsColumn.AllowEdit = false; + this.colMonitorName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colMonitorName.Visible = true; + this.colMonitorName.VisibleIndex = 1; + this.colMonitorName.Width = 95; + // + // colUnitName + // + this.colUnitName.Caption = "鍗曚綅"; + this.colUnitName.FieldName = "UnitName"; + this.colUnitName.Name = "colUnitName"; + this.colUnitName.OptionsColumn.AllowEdit = false; + this.colUnitName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colUnitName.Visible = true; + this.colUnitName.VisibleIndex = 2; + this.colUnitName.Width = 59; + // + // colIsEnable + // + this.colIsEnable.Caption = "鍚敤"; + this.colIsEnable.ColumnEdit = this.repositoryItemCheckEdit1; + this.colIsEnable.FieldName = "IsEnable"; + this.colIsEnable.Name = "colIsEnable"; + this.colIsEnable.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colIsEnable.Visible = true; + this.colIsEnable.VisibleIndex = 3; + this.colIsEnable.Width = 50; + // + // repositoryItemCheckEdit1 + // + this.repositoryItemCheckEdit1.AutoHeight = false; + this.repositoryItemCheckEdit1.Name = "repositoryItemCheckEdit1"; + // + // colBusAddress + // + this.colBusAddress.Caption = "鍦板潃"; + this.colBusAddress.ColumnEdit = this.repositoryItemTextEdit1; + this.colBusAddress.FieldName = "BusAddress"; + this.colBusAddress.Name = "colBusAddress"; + this.colBusAddress.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colBusAddress.Visible = true; + this.colBusAddress.VisibleIndex = 4; + this.colBusAddress.Width = 86; + // + // repositoryItemTextEdit1 + // + this.repositoryItemTextEdit1.AutoHeight = false; + this.repositoryItemTextEdit1.Name = "repositoryItemTextEdit1"; + // + // colBusType + // + this.colBusType.Caption = "鏁版嵁绫诲瀷"; + this.colBusType.ColumnEdit = this.repositoryItemImageComboBox1; + this.colBusType.FieldName = "BusType"; + this.colBusType.Name = "colBusType"; + this.colBusType.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colBusType.Visible = true; + this.colBusType.VisibleIndex = 5; + this.colBusType.Width = 82; + // + // repositoryItemImageComboBox1 + // + this.repositoryItemImageComboBox1.AutoHeight = false; + this.repositoryItemImageComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemImageComboBox1.Name = "repositoryItemImageComboBox1"; + // + // colOperator + // + this.colOperator.Caption = "杩愮畻绗�"; + this.colOperator.ColumnEdit = this.repositoryItemImageComboBox2; + this.colOperator.FieldName = "Operator"; + this.colOperator.Name = "colOperator"; + this.colOperator.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colOperator.Visible = true; + this.colOperator.VisibleIndex = 6; + this.colOperator.Width = 66; + // + // repositoryItemImageComboBox2 + // + this.repositoryItemImageComboBox2.AutoHeight = false; + this.repositoryItemImageComboBox2.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemImageComboBox2.Name = "repositoryItemImageComboBox2"; + // + // colOperands + // + this.colOperands.Caption = "杩愮畻鍊�"; + this.colOperands.ColumnEdit = this.repositoryItemTextEdit2; + this.colOperands.FieldName = "Operands"; + this.colOperands.Name = "colOperands"; + this.colOperands.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colOperands.Visible = true; + this.colOperands.VisibleIndex = 7; + this.colOperands.Width = 99; + // + // repositoryItemTextEdit2 + // + this.repositoryItemTextEdit2.AutoHeight = false; + this.repositoryItemTextEdit2.Name = "repositoryItemTextEdit2"; + // + // colAccuracy + // + this.colAccuracy.Caption = "绮惧害"; + this.colAccuracy.ColumnEdit = this.repositoryItemTextEdit3; + this.colAccuracy.FieldName = "Accuracy"; + this.colAccuracy.Name = "colAccuracy"; + this.colAccuracy.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colAccuracy.Visible = true; + this.colAccuracy.VisibleIndex = 8; + this.colAccuracy.Width = 66; + // + // repositoryItemTextEdit3 + // + this.repositoryItemTextEdit3.AutoHeight = false; + this.repositoryItemTextEdit3.Name = "repositoryItemTextEdit3"; + // + // colAdcType + // + this.colAdcType.Caption = "Adc绫诲瀷"; + this.colAdcType.ColumnEdit = this.repositoryItemImageComboBox3; + this.colAdcType.FieldName = "AdcType"; + this.colAdcType.Name = "colAdcType"; + this.colAdcType.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colAdcType.Visible = true; + this.colAdcType.VisibleIndex = 9; + this.colAdcType.Width = 100; + // + // repositoryItemImageComboBox3 + // + this.repositoryItemImageComboBox3.AutoHeight = false; + this.repositoryItemImageComboBox3.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemImageComboBox3.Name = "repositoryItemImageComboBox3"; + // + // colUpperRange + // + this.colUpperRange.Caption = "涓婇噺绋�"; + this.colUpperRange.ColumnEdit = this.repositoryItemTextEdit4; + this.colUpperRange.FieldName = "UpperRange"; + this.colUpperRange.Name = "colUpperRange"; + this.colUpperRange.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colUpperRange.Visible = true; + this.colUpperRange.VisibleIndex = 10; + this.colUpperRange.Width = 100; + // + // repositoryItemTextEdit4 + // + this.repositoryItemTextEdit4.AutoHeight = false; + this.repositoryItemTextEdit4.Name = "repositoryItemTextEdit4"; + // + // colLowerRange + // + this.colLowerRange.Caption = "涓嬮噺绋�"; + this.colLowerRange.ColumnEdit = this.repositoryItemTextEdit5; + this.colLowerRange.FieldName = "LowerRange"; + this.colLowerRange.Name = "colLowerRange"; + this.colLowerRange.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colLowerRange.Visible = true; + this.colLowerRange.VisibleIndex = 11; + this.colLowerRange.Width = 100; + // + // repositoryItemTextEdit5 + // + this.repositoryItemTextEdit5.AutoHeight = false; + this.repositoryItemTextEdit5.Name = "repositoryItemTextEdit5"; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem2, + this.emptySpaceItem1, + this.layoutControlItem3, + this.layoutControlItem4, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem8, + this.layoutControlItem9}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(1346, 639); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.gridControl1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(1326, 593); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.simpleButton1; + this.layoutControlItem2.Location = new System.Drawing.Point(1128, 593); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(98, 26); + this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem2.TextVisible = false; + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(658, 593); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(470, 26); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.simpleButton2; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 593); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(118, 26); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.simpleButton3; + this.layoutControlItem4.Location = new System.Drawing.Point(357, 593); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(104, 26); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.simpleButton4; + this.layoutControlItem5.Location = new System.Drawing.Point(461, 593); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(102, 26); + this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem5.TextVisible = false; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.simpleButton5; + this.layoutControlItem6.Location = new System.Drawing.Point(563, 593); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(95, 26); + this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem6.TextVisible = false; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.simpleButton6; + this.layoutControlItem7.Location = new System.Drawing.Point(118, 593); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(129, 26); + this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem7.TextVisible = false; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.simpleButton7; + this.layoutControlItem8.Location = new System.Drawing.Point(247, 593); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(110, 26); + this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem8.TextVisible = false; + // + // simpleButton8 + // + this.simpleButton8.Location = new System.Drawing.Point(1238, 605); + this.simpleButton8.Name = "simpleButton8"; + this.simpleButton8.Size = new System.Drawing.Size(96, 22); + this.simpleButton8.StyleController = this.dataLayoutControl1; + this.simpleButton8.TabIndex = 12; + this.simpleButton8.Text = "瀵煎嚭"; + this.simpleButton8.Click += new System.EventHandler(this.simpleButton8_Click); + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.simpleButton8; + this.layoutControlItem9.Location = new System.Drawing.Point(1226, 593); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(100, 26); + this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem9.TextVisible = false; + // + // EboxFormRule + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "EboxFormRule"; + this.Size = new System.Drawing.Size(1346, 639); + this.Load += new System.EventHandler(this.EboxFormRule_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridMonitorViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckEdit1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private System.Windows.Forms.BindingSource dataGridMonitorViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colGroupName; + private DevExpress.XtraGrid.Columns.GridColumn colMonitorName; + private DevExpress.XtraGrid.Columns.GridColumn colUnitName; + private DevExpress.XtraGrid.Columns.GridColumn colIsEnable; + private DevExpress.XtraGrid.Columns.GridColumn colBusAddress; + private DevExpress.XtraGrid.Columns.GridColumn colBusType; + private DevExpress.XtraGrid.Columns.GridColumn colOperator; + private DevExpress.XtraGrid.Columns.GridColumn colOperands; + private DevExpress.XtraGrid.Columns.GridColumn colAccuracy; + private DevExpress.XtraGrid.Columns.GridColumn colAdcType; + private DevExpress.XtraGrid.Columns.GridColumn colUpperRange; + private DevExpress.XtraGrid.Columns.GridColumn colLowerRange; + private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit repositoryItemCheckEdit1; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEdit1; + private DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox repositoryItemImageComboBox1; + private DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox repositoryItemImageComboBox2; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEdit2; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEdit3; + private DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox repositoryItemImageComboBox3; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEdit4; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEdit5; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.SimpleButton simpleButton5; + private DevExpress.XtraEditors.SimpleButton simpleButton4; + private DevExpress.XtraEditors.SimpleButton simpleButton3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraEditors.SimpleButton simpleButton7; + private DevExpress.XtraEditors.SimpleButton simpleButton6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraEditors.SimpleButton simpleButton8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.cs new file mode 100644 index 0000000..710df09 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.cs @@ -0,0 +1,376 @@ +锘縰sing DevExpress.XtraEditors; +using NPOI.HSSF.UserModel; +using NPOI.SS.UserModel; +using NPOI.SS.Util; +using PBS.Model; +using System.IO; +using Yw; +using Yw.WinFrmUI; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormRule : DocumentPage + { + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getrulesCode = "getrules"; + private string saverulesCode = "saverules"; + private string addsignalCode = "addsignal"; + private string deletesignalCode = "deletesignal"; + private string addMonitorgroupCode = "addmonitorgroup"; + private string deletemonitorgroupCode = "deletemonitorgroup"; + Facility _facilities; + + public IBoxFormRule(Facility facilities = null) + { + this.PageTitle.Caption = "瑙勫垯閰嶇疆"; + if (facilities == null) + { + facilities = new Facility() + { + ID = 1, + Name = "涓存椂璁炬柦" + }; + } + _facilities = facilities; + InitializeComponent(); + SetDataType(); + WaitFormHelper.ShowWaitForm(); + + } + + private List<IBox.WinFrmUI.GeneralViewModel> signalTypes; + private List<IBox.WinFrmUI.MonitorPointGroup> monitorPoints; + + private void SetDataType() + { + var dics = new dModbus().ModbusDataType(); + foreach (var d in dics) + { + repositoryItemImageComboBox1.Items.Add(d.Value, d.Key, -1); + } + + var adcDics = new dModbus().AdcType(); + foreach (var adc in adcDics) + { + repositoryItemImageComboBox3.Items.Add(adc.Value, adc.Key, -1); + } + + var operDics = new dModbus().OperType(); + foreach (var oper in operDics) + { + repositoryItemImageComboBox2.Items.Add(oper.Value, oper.Key, -1); + } + } + + public void SetSignalType(List<IBox.WinFrmUI.GeneralViewModel> list) + { + this.signalTypes = list; + } + + public void SetMonitorPoint(List<IBox.WinFrmUI.MonitorPointGroup> list) + { + this.monitorPoints = list; + } + + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + + private void EboxFormRule_Load(object sender, EventArgs e) + { + Thread.Sleep(500); + SendText(startCode + getrulesCode + paramCode + endCode); + //BluetoothHelper.GetInstance().SMR -= null; + //BluetoothHelper.GetInstance().SMR += new BluetoothHelper.ShowMessReturn(GetReceive); + } + + public void GetReceive(string msg) + { + if (!this.IsHandleCreated || this.IsDisposed || string.IsNullOrEmpty(msg)) return; + if (msg.StartsWith("error:") && msg.Contains("鐩爣涓绘満鍧忎簡")) + { + MessageBoxHelper.ShowError("r 钃濈墮璁惧杩炴帴澶辫触锛岃閲嶈瘯!"); return; + } + if (!string.IsNullOrEmpty(msg) && msg.Contains(startCode)) + { + var order = msg.Replace(endCode, "").Replace(startCode, "").Trim(); + SetOrder(order); + } + else MessageBoxHelper.ShowError("r 钃濈墮璁惧杩炴帴澶辫触!"); + } + private List<DataGridMonitorViewModel> dataList = null; + private List<StationMonitorListGroupMobileDto> stationMonitorLists; + private List<DataGridMonitorViewModel> dataGridMonitorViewModels = new List<DataGridMonitorViewModel>(); + public void BindGrid(List<StationMonitorListGroupMobileDto> list, bool isBlue = true) + { + stationMonitorLists = list; + + dataList = new List<DataGridMonitorViewModel>(); + foreach (var item in list) + { + foreach (var ml in item.MonitorList) + { + dataList.Add(new DataGridMonitorViewModel() + { + GroupID = item.ID, + GroupName = item.Name, + MonitorName = ml.Name, + SignalID = ml.SignalID, + UnitName = ml.UnitName, + BusAddress = ml.BusAddress, + BusType = ml.BusType, + IsEnable = ml.IsEnable, + Operator = ml.Operator, + Operands = ml.Operands, + Accuracy = ml.Accuracy, + AdcType = ml.AdcType, + UpperRange = ml.UpperRange, + LowerRange = ml.LowerRange, + Flags = ml.Flags, + SignalName = ml.Name, + Description = ml.Description, + SignalTypeID = ml.SignalTypeID, + + }); + } + } + if (isBlue) + { + this.Invoke(new Action(() => + { + dataGridMonitorViewModels = dataList; + this.dataGridMonitorViewModelBindingSource.DataSource = dataGridMonitorViewModels; + })); + } + else + { + dataGridMonitorViewModels = dataList; + this.dataGridMonitorViewModelBindingSource.DataSource = dataGridMonitorViewModels; + } + WaitFormHelper.HideWaitForm(); + } + + public void SetOrder(string order) + { + var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries); + if (smsg.Length < 2) + { + return; + } + + switch (smsg[0].Trim()) + { + case "getrules": + var getbaselist = JsonHelper.Json2Object<List<StationMonitorListGroupMobileDto>>(smsg[1].Trim()); + stationMonitorLists = getbaselist; + BindGrid(getbaselist); + break; + } + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + stationMonitorLists.ForEach(list => + { + list.MonitorList.ForEach(monitor => + { + var s = dataGridMonitorViewModels.FirstOrDefault(d => d.SignalID == monitor.SignalID); + if (s != null) + { + monitor.BusAddress = s.BusAddress; + monitor.BusType = s.BusType; + monitor.IsEnable = s.IsEnable; + monitor.Operator = s.Operator; + monitor.Operands = s.Operands; + monitor.Accuracy = s.Accuracy; + monitor.AdcType = s.AdcType; + monitor.UpperRange = s.UpperRange; + monitor.LowerRange = s.LowerRange; + } + }); + }); + SendText(startCode + saverulesCode + paramCode + JsonHelper.Object2Json(stationMonitorLists) + endCode); + MessageBoxHelper.ShowInfo("鏁版嵁淇濆瓨鎴愬姛!"); + } + + private void simpleButton5_Click(object sender, EventArgs e) + { + //鍒犻櫎娴嬬偣 + var m = this.gridView1.GetRow(this.gridView1.FocusedRowHandle) as DataGridMonitorViewModel; + if (MessageBox.Show("纭鍒犻櫎娴嬬偣 " + m.SignalName + " 鍚�?", "鎻愮ず", MessageBoxButtons.OKCancel) == DialogResult.OK) + { + var md = new GeneralViewModel() { ID = m.SignalID }; + SendText(startCode + deletesignalCode + paramCode + JsonHelper.Object2Json(md) + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + SendText(startCode + getrulesCode + paramCode + endCode); + } + } + + private void simpleButton4_Click(object sender, EventArgs e) + { + //淇敼娴嬬偣 + var m = this.gridView1.GetRow(this.gridView1.FocusedRowHandle) as DataGridMonitorViewModel; + var s = new Signal() + { + BusAddress = m.BusAddress, + Accuracy = m.Accuracy, + AdcType = m.AdcType, + BusType = m.BusType, + Description = m.Description, + Flags = m.Flags?.Split(',').ToList(), + IsEnable = m.IsEnable, + GroupID = m.GroupID, + ID = m.SignalID, + LowerRange = m.LowerRange, + MonitorPointID = m.MonitorID, + Name = m.SignalName, + Operands = m.Operands, + Operator = m.Operator.Value, + SignalTypeID = m.SignalTypeID, + UpperRange = m.UpperRange, + }; + var dlg = new SignalEditForm(this.signalTypes, this.monitorPoints, s); + if (dlg.ShowDialog(this) == DialogResult.OK) + { + var signal = dlg.signal; + SendText(startCode + addsignalCode + paramCode + JsonHelper.Object2Json(signal) + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + SendText(startCode + getrulesCode + paramCode + endCode); + } + } + + private void simpleButton3_Click(object sender, EventArgs e) + { + //鏂板娴嬬偣 + var m = this.gridView1.GetRow(this.gridView1.FocusedRowHandle) as DataGridMonitorViewModel; + var dlg = new SignalEditForm(this.signalTypes, this.monitorPoints, null); + if (dlg.ShowDialog(this) == DialogResult.OK) + { + var signal = dlg.signal; + SendText(startCode + addsignalCode + paramCode + JsonHelper.Object2Json(signal) + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + SendText(startCode + getrulesCode + paramCode + endCode); + } + } + + private void simpleButton7_Click(object sender, EventArgs e) + { + //鍒犻櫎鏈虹粍 + var m = this.gridView1.GetRow(this.gridView1.FocusedRowHandle) as DataGridMonitorViewModel; + if (MessageBox.Show("鍒犻櫎鏈虹粍浼氬悓鏃跺垹闄ゆ満缁勭粦瀹氱殑鎵�鏈夋祴鐐癸紝纭鍒犻櫎鏈虹粍 " + m.GroupName + " 鍚�?", "鎻愮ず", MessageBoxButtons.OKCancel) == DialogResult.OK) + { + var md = new GeneralViewModel() { ID = m.GroupID }; + SendText(startCode + deletemonitorgroupCode + paramCode + JsonHelper.Object2Json(md) + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + SendText(startCode + getrulesCode + paramCode + endCode); + } + } + + private void simpleButton6_Click(object sender, EventArgs e) + { + //缂栬緫鏈虹粍 + var m = this.gridView1.GetRow(this.gridView1.FocusedRowHandle) as DataGridMonitorViewModel; + + var g = new IBox.WinFrmUI.MonitorPointGroup() + { + ID = m.GroupID, + Name = m.GroupName + }; + var dlg = new MonitorGroupEditForm(g); + if (dlg.ShowDialog() == DialogResult.OK) + { + var group = dlg.group; + SendText(startCode + addMonitorgroupCode + paramCode + JsonHelper.Object2Json(group) + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + SendText(startCode + getrulesCode + paramCode + endCode); + } + } + + private void simpleButton2_Click(object sender, EventArgs e) + { + //鏂板鏈虹粍 + var dlg = new MonitorGroupEditForm(null); + if (dlg.ShowDialog() == DialogResult.OK) + { + var group = dlg.group; + SendText(startCode + addMonitorgroupCode + paramCode + JsonHelper.Object2Json(group) + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + SendText(startCode + getrulesCode + paramCode + endCode); + } + } + + /// <summary> + /// 瀵煎嚭 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton8_Click(object sender, EventArgs e) + { + ExportXLS(); + } + + public void ExportXLS() + { + try + { + if (dataGridMonitorViewModels == null || dataGridMonitorViewModels.Count == 0) + { + XtraMessageBox.Show("娌℃湁鍙鍑虹殑鏁版嵁!"); + return; + } + + var dlg = new SaveFileDialog(); + dlg.Filter = "EXCEL 鏂囦欢(*.xls)|*.xls"; + if (dlg.ShowDialog() != DialogResult.OK) + return; + + HSSFWorkbook theBook = new HSSFWorkbook(); + var theSheet1 = theBook.CreateSheet("Sheet1"); + IRow rowHead = theSheet1.CreateRow(0); + rowHead.CreateCell(0).SetCellValue(_facilities.ID + "," + _facilities.Name); + CellRangeAddress region = new CellRangeAddress(0, 0, 0, 3); + theSheet1.AddMergedRegion(region); + + IRow rowTile = theSheet1.CreateRow(1); + rowTile.CreateCell(0).SetCellValue("鏈虹粍ID"); + rowTile.CreateCell(1).SetCellValue("鏈虹粍鍚嶇О"); + rowTile.CreateCell(2).SetCellValue("娴嬬偣ID"); + rowTile.CreateCell(3).SetCellValue("娴嬬偣鍚嶇О"); + + + for (int rowIndex = 2; rowIndex <= dataGridMonitorViewModels.Count + 1; rowIndex++) + { + int col = 0; + IRow row = theSheet1.CreateRow(rowIndex); + + row.CreateCell(col).SetCellValue(dataGridMonitorViewModels[rowIndex - 2].GroupID.ToString()); + col++; + row.CreateCell(col).SetCellValue(dataGridMonitorViewModels[rowIndex - 2].GroupName); + col++; + row.CreateCell(col).SetCellValue(dataGridMonitorViewModels[rowIndex - 2].SignalID.ToString()); + col++; + row.CreateCell(col).SetCellValue(dataGridMonitorViewModels[rowIndex - 2].SignalName); + col++; + } + + //寮哄埗Excel鍦ㄦ墦寮�鏃堕噸鏂拌绠楁墍鏈夊叕寮� + theSheet1.ForceFormulaRecalculation = true; + using (FileStream fs = File.OpenWrite(dlg.FileName)) + { + theBook.Write(fs); + } + XtraMessageBox.Show("瀵煎嚭鎴愬姛"); + + } + catch (Exception ex) + { + XtraMessageBox.Show(ex.ToString()); + } + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.resx new file mode 100644 index 0000000..6fc74e4 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.resx @@ -0,0 +1,123 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="dataGridMonitorViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.Designer.cs new file mode 100644 index 0000000..286c027 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.Designer.cs @@ -0,0 +1,953 @@ +锘縰sing DevExpress.XtraGrid.Views.Grid; + +namespace IBox.WinFrmUI +{ + partial class IBoxFormScheme + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + DevExpress.XtraGrid.GridLevelNode gridLevelNode1 = new DevExpress.XtraGrid.GridLevelNode(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(IBoxFormScheme)); + this.dockManager1 = new DevExpress.XtraBars.Docking.DockManager(this.components); + this.sidePanelInfo = new DevExpress.XtraEditors.SidePanel(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.gridControl3 = new DevExpress.XtraGrid.GridControl(); + this.dataGridMonitorViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.colGroupName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colMonitorName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colDataValue = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colUnitName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colDataTime = new DevExpress.XtraGrid.Columns.GridColumn(); + this.ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); + this.barEditItemStartDate = new DevExpress.XtraBars.BarEditItem(); + this.repositoryItemDateEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemDateEdit(); + this.barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); + this.barEditItemEnd = new DevExpress.XtraBars.BarEditItem(); + this.repositoryItemDateEdit2 = new DevExpress.XtraEditors.Repository.RepositoryItemDateEdit(); + this.barButtonItem2 = new DevExpress.XtraBars.BarButtonItem(); + this.ribbonPage = new DevExpress.XtraBars.Ribbon.RibbonPage(); + this.PageGroup = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + this.repositoryItemDateTimeOffsetEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemDateTimeOffsetEdit(); + this.multiCurveExpressChart1 = new ISupply.WinFrmUI.Chart.SimuMultiCurveExpressChart(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.colID = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colHZ = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colEff = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colPower = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colFlow = new DevExpress.XtraGrid.Columns.GridColumn(); + this.txtPower = new DevExpress.XtraEditors.TextEdit(); + this.txtPumpP = new DevExpress.XtraEditors.TextEdit(); + this.txtTerminalP = new DevExpress.XtraEditors.TextEdit(); + this.txtTime = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlGroup6 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.sidePanelChart = new DevExpress.XtraEditors.SidePanel(); + this.gridControl2 = new DevExpress.XtraGrid.GridControl(); + this.calcValueViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.gridView3 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.colTime = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colTargetFlow = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colTargetHead = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colTotalFlow = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colTotalPower = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colCompareTotalPower = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colTotalEff = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colTotalHead = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colCalcHead = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colTotalEnergy = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colCarbonEmission = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colEnergyEfficient = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colEnergyEfficiencyRatio = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colControlType = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colStatus = new DevExpress.XtraGrid.Columns.GridColumn(); + this.dateEdit1 = new DevExpress.XtraEditors.DateTimeOffsetEdit(); + ((System.ComponentModel.ISupportInitialize)(this.dockManager1)).BeginInit(); + this.sidePanelInfo.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridMonitorViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateEdit1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateEdit1.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateEdit2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateEdit2.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateTimeOffsetEdit1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtPower.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtPumpP.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtTerminalP.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtTime.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + this.sidePanelChart.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.calcValueViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties)).BeginInit(); + this.SuspendLayout(); + // + // dockManager1 + // + this.dockManager1.Form = this; + this.dockManager1.Style = DevExpress.XtraBars.Docking2010.Views.DockingViewStyle.Light; + this.dockManager1.TopZIndexControls.AddRange(new string[] { + "DevExpress.XtraBars.BarDockControl", + "DevExpress.XtraBars.StandaloneBarDockControl", + "System.Windows.Forms.MenuStrip", + "System.Windows.Forms.StatusStrip", + "System.Windows.Forms.StatusBar", + "DevExpress.XtraBars.Ribbon.RibbonStatusBar", + "DevExpress.XtraBars.Ribbon.RibbonControl", + "DevExpress.XtraBars.Navigation.OfficeNavigationBar", + "DevExpress.XtraBars.Navigation.TileNavPane", + "DevExpress.XtraBars.TabFormControl", + "DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl", + "DevExpress.XtraBars.ToolbarForm.ToolbarFormControl"}); + // + // sidePanelInfo + // + this.sidePanelInfo.Controls.Add(this.layoutControl1); + this.sidePanelInfo.Dock = System.Windows.Forms.DockStyle.Right; + this.sidePanelInfo.Location = new System.Drawing.Point(1005, 52); + this.sidePanelInfo.Name = "sidePanelInfo"; + this.sidePanelInfo.Size = new System.Drawing.Size(380, 750); + this.sidePanelInfo.TabIndex = 0; + this.sidePanelInfo.Text = "sidePanel1"; + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.gridControl3); + this.layoutControl1.Controls.Add(this.multiCurveExpressChart1); + this.layoutControl1.Controls.Add(this.gridControl1); + this.layoutControl1.Controls.Add(this.txtPower); + this.layoutControl1.Controls.Add(this.txtPumpP); + this.layoutControl1.Controls.Add(this.txtTerminalP); + this.layoutControl1.Controls.Add(this.txtTime); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(1, 0); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(570, 386, 650, 400); + this.layoutControl1.Root = this.Root; + this.layoutControl1.Size = new System.Drawing.Size(379, 750); + this.layoutControl1.TabIndex = 0; + this.layoutControl1.Text = "layoutControl1"; + // + // gridControl3 + // + this.gridControl3.DataSource = this.dataGridMonitorViewModelBindingSource; + gridLevelNode1.RelationName = "Level1"; + this.gridControl3.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] { + gridLevelNode1}); + this.gridControl3.Location = new System.Drawing.Point(2, 268); + this.gridControl3.MainView = this.gridView2; + this.gridControl3.Margin = new System.Windows.Forms.Padding(0); + this.gridControl3.MenuManager = this.ribbonControl1; + this.gridControl3.Name = "gridControl3"; + this.gridControl3.Size = new System.Drawing.Size(375, 254); + this.gridControl3.TabIndex = 19; + this.gridControl3.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView2}); + // + // dataGridMonitorViewModelBindingSource + // + this.dataGridMonitorViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.DataGridMonitorViewModel); + // + // gridView2 + // + this.gridView2.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colGroupName, + this.colMonitorName, + this.colDataValue, + this.colUnitName, + this.colDataTime}); + this.gridView2.GridControl = this.gridControl3; + this.gridView2.Name = "gridView2"; + this.gridView2.OptionsBehavior.Editable = false; + this.gridView2.OptionsView.AllowCellMerge = true; + this.gridView2.OptionsView.ShowGroupPanel = false; + // + // colGroupName + // + this.colGroupName.Caption = "鏈虹粍鍚嶇О"; + this.colGroupName.FieldName = "GroupName"; + this.colGroupName.Name = "colGroupName"; + this.colGroupName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; + this.colGroupName.Visible = true; + this.colGroupName.VisibleIndex = 0; + this.colGroupName.Width = 60; + // + // colMonitorName + // + this.colMonitorName.Caption = "娴嬬偣鍚嶇О"; + this.colMonitorName.FieldName = "MonitorName"; + this.colMonitorName.Name = "colMonitorName"; + this.colMonitorName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colMonitorName.Visible = true; + this.colMonitorName.VisibleIndex = 1; + this.colMonitorName.Width = 72; + // + // colDataValue + // + this.colDataValue.Caption = "鏁版嵁鍊�"; + this.colDataValue.FieldName = "DataValue"; + this.colDataValue.Name = "colDataValue"; + this.colDataValue.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colDataValue.Visible = true; + this.colDataValue.VisibleIndex = 3; + this.colDataValue.Width = 60; + // + // colUnitName + // + this.colUnitName.Caption = "鍗曚綅"; + this.colUnitName.FieldName = "UnitName"; + this.colUnitName.MinWidth = 50; + this.colUnitName.Name = "colUnitName"; + this.colUnitName.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colUnitName.Visible = true; + this.colUnitName.VisibleIndex = 2; + this.colUnitName.Width = 50; + // + // colDataTime + // + this.colDataTime.Caption = "鏁版嵁鏃堕棿"; + this.colDataTime.DisplayFormat.FormatString = "HH:mm:ss"; + this.colDataTime.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.colDataTime.FieldName = "DataTime"; + this.colDataTime.Name = "colDataTime"; + this.colDataTime.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colDataTime.Visible = true; + this.colDataTime.VisibleIndex = 4; + this.colDataTime.Width = 108; + // + // ribbonControl1 + // + this.ribbonControl1.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.False; + this.ribbonControl1.ExpandCollapseItem.Id = 0; + this.ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; + this.ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { + this.ribbonControl1.ExpandCollapseItem, + this.ribbonControl1.SearchEditItem, + this.barEditItemStartDate, + this.barButtonItem1, + this.barEditItemEnd, + this.barButtonItem2}); + this.ribbonControl1.Location = new System.Drawing.Point(0, 0); + this.ribbonControl1.MaxItemId = 28; + this.ribbonControl1.Name = "ribbonControl1"; + this.ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { + this.ribbonPage}); + this.ribbonControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { + this.repositoryItemDateTimeOffsetEdit1, + this.repositoryItemDateEdit1, + this.repositoryItemDateEdit2}); + this.ribbonControl1.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonControlStyle.TabletOffice; + this.ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; + this.ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; + this.ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; + this.ribbonControl1.Size = new System.Drawing.Size(1385, 52); + this.ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; + // + // barEditItemStartDate + // + this.barEditItemStartDate.Caption = "寮�濮嬫棩鏈燂細"; + this.barEditItemStartDate.Edit = this.repositoryItemDateEdit1; + this.barEditItemStartDate.EditWidth = 100; + this.barEditItemStartDate.Id = 24; + this.barEditItemStartDate.Name = "barEditItemStartDate"; + this.barEditItemStartDate.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barEditItemStartDate_ItemClick); + // + // repositoryItemDateEdit1 + // + this.repositoryItemDateEdit1.AutoHeight = false; + this.repositoryItemDateEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemDateEdit1.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemDateEdit1.Name = "repositoryItemDateEdit1"; + this.repositoryItemDateEdit1.TodayDate = new System.DateTime(2024, 7, 10, 13, 1, 50, 0); + // + // barButtonItem1 + // + this.barButtonItem1.Caption = "鏌ヨ"; + this.barButtonItem1.Id = 25; + this.barButtonItem1.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem1.ImageOptions.SvgImage"))); + this.barButtonItem1.Name = "barButtonItem1"; + this.barButtonItem1.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem1_ItemClick_1); + // + // barEditItemEnd + // + this.barEditItemEnd.Caption = "缁撴潫鏃ユ湡锛�"; + this.barEditItemEnd.Edit = this.repositoryItemDateEdit2; + this.barEditItemEnd.EditWidth = 100; + this.barEditItemEnd.Id = 26; + this.barEditItemEnd.Name = "barEditItemEnd"; + // + // repositoryItemDateEdit2 + // + this.repositoryItemDateEdit2.AutoHeight = false; + this.repositoryItemDateEdit2.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemDateEdit2.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemDateEdit2.Name = "repositoryItemDateEdit2"; + // + // barButtonItem2 + // + this.barButtonItem2.Caption = "娓呯┖"; + this.barButtonItem2.Id = 27; + this.barButtonItem2.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem2.ImageOptions.SvgImage"))); + this.barButtonItem2.Name = "barButtonItem2"; + this.barButtonItem2.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem2_ItemClick); + // + // ribbonPage + // + this.ribbonPage.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { + this.PageGroup}); + this.ribbonPage.Name = "ribbonPage"; + this.ribbonPage.Text = "Page"; + // + // PageGroup + // + this.PageGroup.ItemLinks.Add(this.barEditItemStartDate); + this.PageGroup.ItemLinks.Add(this.barEditItemEnd); + this.PageGroup.ItemLinks.Add(this.barButtonItem1); + this.PageGroup.ItemLinks.Add(this.barButtonItem2); + this.PageGroup.Name = "PageGroup"; + this.PageGroup.Text = "PageGroup"; + // + // repositoryItemDateTimeOffsetEdit1 + // + this.repositoryItemDateTimeOffsetEdit1.AutoHeight = false; + this.repositoryItemDateTimeOffsetEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemDateTimeOffsetEdit1.Name = "repositoryItemDateTimeOffsetEdit1"; + // + // multiCurveExpressChart1 + // + this.multiCurveExpressChart1.CurveNameVisible = false; + this.multiCurveExpressChart1.LineVisible = false; + this.multiCurveExpressChart1.Location = new System.Drawing.Point(0, 546); + this.multiCurveExpressChart1.Margin = new System.Windows.Forms.Padding(1); + this.multiCurveExpressChart1.Name = "multiCurveExpressChart1"; + this.multiCurveExpressChart1.Size = new System.Drawing.Size(379, 204); + this.multiCurveExpressChart1.TabIndex = 17; + // + // gridControl1 + // + this.gridControl1.Location = new System.Drawing.Point(0, 96); + this.gridControl1.MainView = this.gridView1; + this.gridControl1.Name = "gridControl1"; + this.gridControl1.Size = new System.Drawing.Size(379, 148); + this.gridControl1.TabIndex = 16; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + this.gridControl1.Click += new System.EventHandler(this.r_Click); + // + // gridView1 + // + this.gridView1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colID, + this.colHZ, + this.colEff, + this.colPower, + this.colFlow}); + this.gridView1.GridControl = this.gridControl1; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsView.ShowGroupPanel = false; + // + // colID + // + this.colID.Caption = "娉�"; + this.colID.FieldName = "Name"; + this.colID.Name = "colID"; + this.colID.Visible = true; + this.colID.VisibleIndex = 0; + // + // colHZ + // + this.colHZ.Caption = "棰戠巼(hz)"; + this.colHZ.FieldName = "HZ"; + this.colHZ.Name = "colHZ"; + this.colHZ.Visible = true; + this.colHZ.VisibleIndex = 1; + // + // colEff + // + this.colEff.Caption = "鏁堢巼(%)"; + this.colEff.FieldName = "Eff"; + this.colEff.Name = "colEff"; + this.colEff.Visible = true; + this.colEff.VisibleIndex = 3; + // + // colPower + // + this.colPower.Caption = "鍔熺巼(kW)"; + this.colPower.FieldName = "Power"; + this.colPower.Name = "colPower"; + this.colPower.Visible = true; + this.colPower.VisibleIndex = 2; + // + // colFlow + // + this.colFlow.Caption = "娴侀噺(m鲁/h)"; + this.colFlow.FieldName = "Flow"; + this.colFlow.Name = "colFlow"; + this.colFlow.Visible = true; + this.colFlow.VisibleIndex = 4; + // + // txtPower + // + this.txtPower.Location = new System.Drawing.Point(286, 26); + this.txtPower.Name = "txtPower"; + this.txtPower.Properties.ReadOnly = true; + this.txtPower.Size = new System.Drawing.Size(89, 20); + this.txtPower.StyleController = this.layoutControl1; + this.txtPower.TabIndex = 7; + // + // txtPumpP + // + this.txtPumpP.Location = new System.Drawing.Point(99, 50); + this.txtPumpP.Name = "txtPumpP"; + this.txtPumpP.Properties.ReadOnly = true; + this.txtPumpP.Size = new System.Drawing.Size(88, 20); + this.txtPumpP.StyleController = this.layoutControl1; + this.txtPumpP.TabIndex = 9; + // + // txtTerminalP + // + this.txtTerminalP.Location = new System.Drawing.Point(286, 50); + this.txtTerminalP.Name = "txtTerminalP"; + this.txtTerminalP.Properties.ReadOnly = true; + this.txtTerminalP.Size = new System.Drawing.Size(89, 20); + this.txtTerminalP.StyleController = this.layoutControl1; + this.txtTerminalP.TabIndex = 10; + // + // txtTime + // + this.txtTime.Location = new System.Drawing.Point(99, 26); + this.txtTime.Name = "txtTime"; + this.txtTime.Properties.DisplayFormat.FormatString = "d"; + this.txtTime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtTime.Properties.EditFormat.FormatString = "d"; + this.txtTime.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtTime.Properties.ReadOnly = true; + this.txtTime.Size = new System.Drawing.Size(88, 20); + this.txtTime.StyleController = this.layoutControl1; + this.txtTime.TabIndex = 12; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlGroup2, + this.layoutControlGroup5, + this.layoutControlGroup4}); + this.Root.Name = "Root"; + this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.Root.Size = new System.Drawing.Size(379, 750); + this.Root.TextVisible = false; + // + // layoutControlGroup2 + // + this.layoutControlGroup2.AppearanceGroup.FontSizeDelta = 2; + this.layoutControlGroup2.AppearanceGroup.Options.UseFont = true; + this.layoutControlGroup2.AppearanceGroup.Options.UseTextOptions = true; + this.layoutControlGroup2.AppearanceGroup.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.layoutControlGroup2.ExpandButtonVisible = true; + this.layoutControlGroup2.GroupStyle = DevExpress.Utils.GroupStyle.Title; + this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem9, + this.layoutControlItem6, + this.layoutControlItem4, + this.layoutControlItem7}); + this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0); + this.layoutControlGroup2.Name = "layoutControlGroup2"; + this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2); + this.layoutControlGroup2.Size = new System.Drawing.Size(379, 74); + this.layoutControlGroup2.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.layoutControlGroup2.Text = "鏃跺埢鏁版嵁"; + // + // layoutControlItem9 + // + this.layoutControlItem9.AppearanceItemCaption.FontSizeDelta = 1; + this.layoutControlItem9.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem9.AppearanceItemCaption.Options.UseTextOptions = true; + this.layoutControlItem9.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + this.layoutControlItem9.Control = this.txtTime; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(187, 24); + this.layoutControlItem9.Text = "鏃跺埢:"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(83, 17); + // + // layoutControlItem6 + // + this.layoutControlItem6.AppearanceItemCaption.FontSizeDelta = 1; + this.layoutControlItem6.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem6.AppearanceItemCaption.Options.UseTextOptions = true; + this.layoutControlItem6.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + this.layoutControlItem6.Control = this.txtPumpP; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(187, 24); + this.layoutControlItem6.Text = "娉靛悗鍘嬪姏(m):"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(83, 17); + // + // layoutControlItem4 + // + this.layoutControlItem4.AppearanceItemCaption.FontSizeDelta = 1; + this.layoutControlItem4.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem4.AppearanceItemCaption.Options.UseTextOptions = true; + this.layoutControlItem4.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + this.layoutControlItem4.Control = this.txtPower; + this.layoutControlItem4.Location = new System.Drawing.Point(187, 0); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(188, 24); + this.layoutControlItem4.Text = "鍔熺巼(kW):"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(83, 17); + // + // layoutControlItem7 + // + this.layoutControlItem7.AppearanceItemCaption.FontSizeDelta = 1; + this.layoutControlItem7.AppearanceItemCaption.Options.UseFont = true; + this.layoutControlItem7.AppearanceItemCaption.Options.UseTextOptions = true; + this.layoutControlItem7.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + this.layoutControlItem7.Control = this.txtTerminalP; + this.layoutControlItem7.Location = new System.Drawing.Point(187, 24); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(188, 24); + this.layoutControlItem7.Text = "鐢ㄦ埛鍘嬪姏(m):"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(83, 17); + // + // layoutControlGroup5 + // + this.layoutControlGroup5.AppearanceGroup.FontSizeDelta = 2; + this.layoutControlGroup5.AppearanceGroup.Options.UseFont = true; + this.layoutControlGroup5.AppearanceGroup.Options.UseTextOptions = true; + this.layoutControlGroup5.AppearanceGroup.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.layoutControlGroup5.ExpandButtonVisible = true; + this.layoutControlGroup5.GroupStyle = DevExpress.Utils.GroupStyle.Title; + this.layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem5}); + this.layoutControlGroup5.Location = new System.Drawing.Point(0, 524); + this.layoutControlGroup5.Name = "layoutControlGroup5"; + this.layoutControlGroup5.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.layoutControlGroup5.Size = new System.Drawing.Size(379, 226); + this.layoutControlGroup5.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.layoutControlGroup5.Text = "鐗规�ф洸绾�"; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.multiCurveExpressChart1; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.layoutControlItem5.Size = new System.Drawing.Size(379, 204); + this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem5.TextVisible = false; + // + // layoutControlGroup4 + // + this.layoutControlGroup4.AppearanceGroup.FontSizeDelta = 2; + this.layoutControlGroup4.AppearanceGroup.Options.UseFont = true; + this.layoutControlGroup4.AppearanceGroup.Options.UseTextOptions = true; + this.layoutControlGroup4.AppearanceGroup.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.layoutControlGroup4.ExpandButtonVisible = true; + this.layoutControlGroup4.GroupStyle = DevExpress.Utils.GroupStyle.Title; + this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem13, + this.layoutControlGroup6}); + this.layoutControlGroup4.Location = new System.Drawing.Point(0, 74); + this.layoutControlGroup4.Name = "layoutControlGroup4"; + this.layoutControlGroup4.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.layoutControlGroup4.Size = new System.Drawing.Size(379, 450); + this.layoutControlGroup4.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.layoutControlGroup4.Text = "寮�娉垫柟妗�"; + // + // layoutControlItem13 + // + this.layoutControlItem13.Control = this.gridControl1; + this.layoutControlItem13.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem13.Name = "layoutControlItem13"; + this.layoutControlItem13.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.layoutControlItem13.Size = new System.Drawing.Size(379, 148); + this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem13.TextVisible = false; + // + // layoutControlGroup6 + // + this.layoutControlGroup6.CustomizationFormText = "鐩戞祴鏁版嵁"; + this.layoutControlGroup6.ExpandButtonVisible = true; + this.layoutControlGroup6.GroupStyle = DevExpress.Utils.GroupStyle.Title; + this.layoutControlGroup6.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem12}); + this.layoutControlGroup6.Location = new System.Drawing.Point(0, 148); + this.layoutControlGroup6.Name = "layoutControlGroup6"; + this.layoutControlGroup6.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.layoutControlGroup6.Size = new System.Drawing.Size(379, 280); + this.layoutControlGroup6.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.layoutControlGroup6.Text = "鐩戞祴鏁版嵁"; + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.gridControl3; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(379, 258); + this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem12.TextVisible = false; + // + // sidePanelChart + // + this.sidePanelChart.Controls.Add(this.gridControl2); + this.sidePanelChart.Dock = System.Windows.Forms.DockStyle.Fill; + this.sidePanelChart.Location = new System.Drawing.Point(0, 52); + this.sidePanelChart.Name = "sidePanelChart"; + this.sidePanelChart.Size = new System.Drawing.Size(1005, 750); + this.sidePanelChart.TabIndex = 6; + this.sidePanelChart.Text = "sidePanel3"; + // + // gridControl2 + // + this.gridControl2.DataSource = this.calcValueViewModelBindingSource; + this.gridControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridControl2.Location = new System.Drawing.Point(0, 0); + this.gridControl2.MainView = this.gridView3; + this.gridControl2.MenuManager = this.ribbonControl1; + this.gridControl2.Name = "gridControl2"; + this.gridControl2.Size = new System.Drawing.Size(1005, 750); + this.gridControl2.TabIndex = 0; + this.gridControl2.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView3}); + // + // calcValueViewModelBindingSource + // + this.calcValueViewModelBindingSource.DataSource = typeof(IBox.WinFrmUI.SimulationDrillPage.CalcValueViewModel); + // + // gridView3 + // + this.gridView3.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colTime, + this.colTargetFlow, + this.colTargetHead, + this.colTotalFlow, + this.colTotalPower, + this.colCompareTotalPower, + this.colTotalEff, + this.colTotalHead, + this.colCalcHead, + this.colTotalEnergy, + this.colCarbonEmission, + this.colEnergyEfficient, + this.colEnergyEfficiencyRatio, + this.colControlType, + this.colStatus}); + this.gridView3.GridControl = this.gridControl2; + this.gridView3.Name = "gridView3"; + this.gridView3.OptionsBehavior.Editable = false; + this.gridView3.OptionsDetail.EnableMasterViewMode = false; + this.gridView3.OptionsView.ShowGroupPanel = false; + this.gridView3.CustomDrawCell += new DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventHandler(this.gridView3_CustomDrawCell); + this.gridView3.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(this.gridView3_FocusedRowChanged); + this.gridView3.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView3_CustomColumnDisplayText); + // + // colTime + // + this.colTime.Caption = "鏃堕棿"; + this.colTime.DisplayFormat.FormatString = "s"; + this.colTime.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.colTime.FieldName = "Time"; + this.colTime.Name = "colTime"; + this.colTime.OptionsColumn.AllowEdit = false; + this.colTime.OptionsColumn.AllowGroup = DevExpress.Utils.DefaultBoolean.False; + this.colTime.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.colTime.OptionsColumn.ShowInCustomizationForm = false; + this.colTime.OptionsColumn.ShowInExpressionEditor = false; + this.colTime.Visible = true; + this.colTime.VisibleIndex = 0; + // + // colTargetFlow + // + this.colTargetFlow.Caption = "鐩爣娴侀噺(m鲁/h)"; + this.colTargetFlow.FieldName = "TargetFlow"; + this.colTargetFlow.Name = "colTargetFlow"; + this.colTargetFlow.Visible = true; + this.colTargetFlow.VisibleIndex = 1; + // + // colTargetHead + // + this.colTargetHead.Caption = "鐩爣鎵▼(m)"; + this.colTargetHead.DisplayFormat.FormatString = "{0:N2}"; + this.colTargetHead.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; + this.colTargetHead.FieldName = "TargetHead"; + this.colTargetHead.Name = "colTargetHead"; + this.colTargetHead.Visible = true; + this.colTargetHead.VisibleIndex = 2; + // + // colTotalFlow + // + this.colTotalFlow.FieldName = "TotalFlow"; + this.colTotalFlow.Name = "colTotalFlow"; + // + // colTotalPower + // + this.colTotalPower.Caption = "鍔熺巼(kW)"; + this.colTotalPower.FieldName = "TotalPower"; + this.colTotalPower.Name = "colTotalPower"; + this.colTotalPower.Visible = true; + this.colTotalPower.VisibleIndex = 3; + // + // colCompareTotalPower + // + this.colCompareTotalPower.FieldName = "CompareTotalPower"; + this.colCompareTotalPower.Name = "colCompareTotalPower"; + // + // colTotalEff + // + this.colTotalEff.FieldName = "TotalEff"; + this.colTotalEff.Name = "colTotalEff"; + // + // colTotalHead + // + this.colTotalHead.Caption = "娉靛悗鍘嬪姏(m)"; + this.colTotalHead.FieldName = "TotalHead"; + this.colTotalHead.Name = "colTotalHead"; + this.colTotalHead.Visible = true; + this.colTotalHead.VisibleIndex = 4; + // + // colCalcHead + // + this.colCalcHead.Caption = "鐢ㄦ埛鍘嬪姏(m)"; + this.colCalcHead.FieldName = "CalcHead"; + this.colCalcHead.Name = "colCalcHead"; + this.colCalcHead.Visible = true; + this.colCalcHead.VisibleIndex = 5; + // + // colTotalEnergy + // + this.colTotalEnergy.FieldName = "TotalEnergy"; + this.colTotalEnergy.Name = "colTotalEnergy"; + // + // colCarbonEmission + // + this.colCarbonEmission.FieldName = "CarbonEmission"; + this.colCarbonEmission.Name = "colCarbonEmission"; + // + // colEnergyEfficient + // + this.colEnergyEfficient.FieldName = "EnergyEfficient"; + this.colEnergyEfficient.Name = "colEnergyEfficient"; + // + // colEnergyEfficiencyRatio + // + this.colEnergyEfficiencyRatio.FieldName = "EnergyEfficiencyRatio"; + this.colEnergyEfficiencyRatio.Name = "colEnergyEfficiencyRatio"; + // + // colControlType + // + this.colControlType.Caption = "鎺у埗绫诲瀷"; + this.colControlType.FieldName = "ControlType"; + this.colControlType.Name = "colControlType"; + this.colControlType.Visible = true; + this.colControlType.VisibleIndex = 7; + // + // colStatus + // + this.colStatus.Caption = "鐘舵��"; + this.colStatus.FieldName = "Status"; + this.colStatus.Name = "colStatus"; + this.colStatus.Visible = true; + this.colStatus.VisibleIndex = 6; + // + // dateEdit1 + // + this.dateEdit1.EditValue = null; + this.dateEdit1.Location = new System.Drawing.Point(693, 31); + this.dateEdit1.MenuManager = this.ribbonControl1; + this.dateEdit1.Name = "dateEdit1"; + this.dateEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEdit1.Properties.DisplayFormat.FormatString = "d"; + this.dateEdit1.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.dateEdit1.Properties.EditFormat.FormatString = "d"; + this.dateEdit1.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.dateEdit1.Properties.EditValueChangedFiringMode = DevExpress.XtraEditors.Controls.EditValueChangedFiringMode.Default; + this.dateEdit1.Properties.Mask.EditMask = "d"; + this.dateEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime; + this.dateEdit1.Size = new System.Drawing.Size(100, 20); + this.dateEdit1.TabIndex = 8; + // + // EboxFormScheme + // + this.Appearance.BackColor = System.Drawing.SystemColors.Control; + this.Appearance.Options.UseBackColor = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.sidePanelChart); + this.Controls.Add(this.sidePanelInfo); + this.Controls.Add(this.ribbonControl1); + this.Controls.Add(this.dateEdit1); + this.Name = "EboxFormScheme"; + this.Size = new System.Drawing.Size(1385, 802); + this.Load += new System.EventHandler(this.EboxFormScheme_Load); + ((System.ComponentModel.ISupportInitialize)(this.dockManager1)).EndInit(); + this.sidePanelInfo.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridMonitorViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateEdit1.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateEdit1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateEdit2.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateEdit2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemDateTimeOffsetEdit1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtPower.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtPumpP.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtTerminalP.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtTime.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + this.sidePanelChart.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.calcValueViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private DevExpress.XtraBars.Docking.DockManager dockManager1; + private DevExpress.XtraEditors.SidePanel sidePanelInfo; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; + private DevExpress.XtraEditors.TextEdit txtPower; + private DevExpress.XtraEditors.TextEdit txtPumpP; + private DevExpress.XtraEditors.TextEdit txtTerminalP; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraEditors.SidePanel sidePanelChart; + private DevExpress.XtraGrid.GridControl gridControl1; + private GridView gridView1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; + private DevExpress.XtraGrid.Columns.GridColumn colID; + private DevExpress.XtraGrid.Columns.GridColumn colHZ; + private DevExpress.XtraEditors.TextEdit txtTime; + private Chart.SimuMultiCurveExpressChart multiCurveExpressChart1; + private DevExpress.XtraGrid.Columns.GridColumn colEff; + private DevExpress.XtraGrid.Columns.GridColumn colPower; + private DevExpress.XtraGrid.Columns.GridColumn colFlow; + private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1; + private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup PageGroup; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup6; + private DevExpress.XtraGrid.GridControl gridControl3; + private GridView gridView2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraEditors.DateTimeOffsetEdit dateEdit1; + private DevExpress.XtraBars.BarEditItem barEditItemStartDate; + private DevExpress.XtraEditors.Repository.RepositoryItemDateEdit repositoryItemDateEdit1; + private DevExpress.XtraBars.BarButtonItem barButtonItem1; + private DevExpress.XtraEditors.Repository.RepositoryItemDateTimeOffsetEdit repositoryItemDateTimeOffsetEdit1; + private DevExpress.XtraBars.BarEditItem barEditItemEnd; + private DevExpress.XtraEditors.Repository.RepositoryItemDateEdit repositoryItemDateEdit2; + private DevExpress.XtraGrid.GridControl gridControl2; + private GridView gridView3; + private System.Windows.Forms.BindingSource calcValueViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colTime; + private DevExpress.XtraGrid.Columns.GridColumn colTargetFlow; + private DevExpress.XtraGrid.Columns.GridColumn colTargetHead; + private DevExpress.XtraGrid.Columns.GridColumn colTotalFlow; + private DevExpress.XtraGrid.Columns.GridColumn colTotalPower; + private DevExpress.XtraGrid.Columns.GridColumn colCompareTotalPower; + private DevExpress.XtraGrid.Columns.GridColumn colTotalEff; + private DevExpress.XtraGrid.Columns.GridColumn colTotalHead; + private DevExpress.XtraGrid.Columns.GridColumn colCalcHead; + private DevExpress.XtraGrid.Columns.GridColumn colTotalEnergy; + private DevExpress.XtraGrid.Columns.GridColumn colCarbonEmission; + private DevExpress.XtraGrid.Columns.GridColumn colEnergyEfficient; + private DevExpress.XtraGrid.Columns.GridColumn colEnergyEfficiencyRatio; + private DevExpress.XtraGrid.Columns.GridColumn colStatus; + private System.Windows.Forms.BindingSource dataGridMonitorViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colGroupName; + private DevExpress.XtraGrid.Columns.GridColumn colMonitorName; + private DevExpress.XtraGrid.Columns.GridColumn colUnitName; + private DevExpress.XtraGrid.Columns.GridColumn colDataValue; + private DevExpress.XtraGrid.Columns.GridColumn colDataTime; + private DevExpress.XtraGrid.Columns.GridColumn colControlType; + private DevExpress.XtraBars.BarButtonItem barButtonItem2; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.cs new file mode 100644 index 0000000..dc72946 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.cs @@ -0,0 +1,706 @@ +锘縰sing DevExpress.XtraCharts; +using System.Data; +using Yw.WinFrmUI; +using Yw; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormScheme : DocumentPage + { + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getcalvalueCode = "getcalvalue"; + private string cleardataCode = "cleardata"; + public IBoxFormScheme(SimuViewModel simuCalcViewModel) + { + _currentBuild = simuCalcViewModel.CurrentBuild; + + _facilities = simuCalcViewModel.Facilities; + + this.PageTitle.Caption = "璋冨害鏂规"; + InitializeComponent(); + //InitialChart(); + + InitialDataSource(); + + + + //this.chartControl.CrosshairEnabled = DefaultBoolean.True; + //this.chartControl.RuntimeHitTesting = true; + //this.chartControl.MouseDown += this.chartControl_MouseDown; + //this.chartControl.AnimationStartMode = ChartAnimationMode.OnLoad; + this.gridView1.SetNormalView(); + this.gridView3.SetNormalView(); + this.gridView3.OptionsDetail.EnableMasterViewMode = false; + this.gridView1.OptionsView.ShowIndicator = false; + + + + + } + private List<List<string>> _pumpCombine = null;//娉佃皟搴︾粍鍚� + public event EventHandler<string> SendData; + private List<SimuPumpViewModel> _simuPumps = null;//璋冨害娉靛垪琛� + private Model.Facilities _facilities = null;//璁炬柦 + private double _sysMaxQ, _constantP;//绯荤粺鏈�澶ф祦閲�/鎭掑帇鍊� + private Build _currentBuild = null;//褰撳墠寤虹瓚鐗� + #region Chart Variable + + private XYDiagram _xyDiagram = null; + private GanttDiagram _ganttDiagram = null; + + private XYDiagramPane _paneP, _panePE, _paneRun; + + private AxisX _axisX; + private AxisY _axisYP; + + private SecondaryAxisY _axisYQ, _axisYPower, _axisYE, _axisYRun; + + private void r_Click(object sender, EventArgs e) + { + + } + + private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + barButtonItem1.Enabled = false; + //barBtnCalc.Enabled = true; + } + + private void barBtnCalc_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + barButtonItem1.Enabled = true; + //barBtnCalc.Enabled = false; + } + + private void EboxFormScheme_Load(object sender, EventArgs e) + { + this.barEditItemStartDate.EditValue = DateTime.Now.ToString("yyyy-MM-dd"); + this.barEditItemEnd.EditValue = DateTime.Now.ToString("yyyy-MM-dd"); + var m = new GetCalcValueModel() + { + StartDate = DateTime.Parse(this.barEditItemStartDate.EditValue.ToString()), + EndDate = DateTime.Parse(this.barEditItemEnd.EditValue.ToString()), + }; + Thread.Sleep(500); + + SendText(startCode + getcalvalueCode + paramCode + JsonHelper.Object2Json(m) + endCode); + + } + + private void barButtonItem1_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var m = new GetCalcValueModel() + { + StartDate = DateTime.Parse(barEditItemStartDate.EditValue.ToString()), + EndDate = DateTime.Parse(barEditItemEnd.EditValue.ToString()), + }; + + SendText(startCode + getcalvalueCode + paramCode + JsonHelper.Object2Json(m) + endCode); + } + + private void SendText(string content) + { + WaitFrmHelper.ShowWaitForm(); + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + private ConstantLine _lineTime, _lineP, _ganttLine; + + private Series _seriesUsageQ, _seriesRangeAreaQ, + _seriesRangeArea, _seriesAvgP, _seriesCalcP, _seriesRealP, + _seriesPower, _seriesE; + + private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SendText(startCode + cleardataCode + paramCode + endCode); + Thread.Sleep(100); + var m = new GetCalcValueModel() + { + StartDate = DateTime.Parse(this.barEditItemStartDate.EditValue.ToString()), + EndDate = DateTime.Parse(this.barEditItemEnd.EditValue.ToString()), + }; + SendText(startCode + getcalvalueCode + paramCode + JsonHelper.Object2Json(m) + endCode); + } + + private void barEditItemStartDate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + + } + + private void gridView3_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) + { + if (e.Column.FieldName == "ControlType") + { + var celValue = e.Value.ToString(); + var celNewValue = "璁惧畾鍘嬪姏"; + switch (celValue) + { + case "2": + celNewValue = "寮�娉垫柟妗�"; + break; + } + + e.DisplayText = celNewValue; + } + } + + private void gridView3_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) + { + var cv = this.gridView3.GetFocusedRow() as CalcValueViewModel; + + //var cv = SimuCalc(v.TargetFlow, v.TargetHead, double.Parse(_facilities.ConstantP.ToString()), _facilities.WaterPressure, v.Time); + if (cv != null) + { + SetCurveChart(cv.TotalFlow, cv.TargetHead, cv.TotalPower, cv.TotalEff, cv.Pumps); + SetPanelInfo(cv); + SetRealDataView(cv); + } + } + + private void SetRealDataView(CalcValueViewModel calcValueViewModel) + { + var dataList = new List<DataGridMonitorViewModel>(); + if (!string.IsNullOrEmpty(calcValueViewModel.RealDataJson)) + { + var realList = JsonHelper.Json2Object<List<MonitorRecord>>(calcValueViewModel.RealDataJson); + foreach (var item in _stations) + { + foreach (var ml in item.MonitorList) + { + var dt = realList.FirstOrDefault(x => x.SignalID == ml.SignalID); + dataList.Add(new DataGridMonitorViewModel() + { + DataTime = dt == null ? "-" : dt.DataTime.ToString("yyyy-MM-dd HH:mm:ss"), + DataValue = dt == null ? "-" : dt.DataValue, + GroupID = item.ID, + GroupName = item.Name, + MonitorName = ml.Name, + SignalID = ml.SignalID, + UnitName = ml.UnitName, + DataStatus = ml.DataStatus, + }); + } + } + } + dataGridMonitorViewModelBindingSource.DataSource = dataList; + this.gridView2.RefreshData(); + } + + private bool InterValueBuild(Build build, DateTime dt, out double usageQ, out double avgP) + { + usageQ = avgP = 0; + + var timeOA = DateTime.Parse("1900-1-1").Add(dt.TimeOfDay).ToOADate(); + for (int i = 0; i < build.鐢ㄦ按瓒嬪娍鏇茬嚎.Data.Count - 1; i++) + { + if (build.鐢ㄦ按瓒嬪娍鏇茬嚎.Data[i].X <= timeOA && timeOA <= build.鐢ㄦ按瓒嬪娍鏇茬嚎.Data[i + 1].X)//鎵惧埌 + { + usageQ = (float)(build.鐢ㄦ按瓒嬪娍鏇茬嚎.Data[i].Y + (build.鐢ㄦ按瓒嬪娍鏇茬嚎.Data[i + 1].Y - build.鐢ㄦ按瓒嬪娍鏇茬嚎.Data[i].Y) * (timeOA - build.鐢ㄦ按瓒嬪娍鏇茬嚎.Data[i].X) / (build.鐢ㄦ按瓒嬪娍鏇茬嚎.Data[i + 1].X - build.鐢ㄦ按瓒嬪娍鏇茬嚎.Data[i].X)); + break; + } + } + + if (usageQ <= 0) + { + return false; + } + //maxP = build.娴侀噺鍘嬮檷涓婇檺.Evaluate(usageQ); + //minP = build.娴侀噺鍘嬮檷涓嬮檺.Evaluate(usageQ); + avgP = build.娴侀噺鍘嬮檷鏇茬嚎.Evaluate(usageQ); + return true; + } + private CalcValueViewModel SimuCalc + (double flow, double press, double constantP, double endP, DateTime dateTime) + { + _pumpCombine = new List<List<string>>(); + var viewModel = _facilities; + if (viewModel != null) + { + _simuPumps = new List<SimuPumpViewModel>(); + if (!long.TryParse(_facilities.CompletePlant, out long kitId)) + return null; + var kit = new BLL.Kit().GetByID(kitId); + if (kit == null) + return null; + if (kit.UseCount < 1) + return null; + var equipmentList = new BLL.Equipment().GetByKitIDAndCatalog(kitId, ISupply.Equipment.Pump); + if (equipmentList == null || !equipmentList.Any()) + return null; + if (kit.UseCount > equipmentList.Count) + return null; + var useList = equipmentList.Take(kit.UseCount); + + var bllEChartMapping = new BLL.EquipmentEChartMapping(); + var bllEChart = new BLL.EChart(); + foreach (var item in useList) + { + var mapping = bllEChartMapping.GetWorkingByEquipmentID(item.ID); + if (mapping == null) + continue; + var chart = bllEChartMapping.GetExByID(mapping.ID); + if (chart == null) + continue; + var curveInfo = chart.CurveInfo; + + var pump = Model.Pump.ToModel(item.RatedParas); + var simuPumpVm = new SimuPumpViewModel(); + simuPumpVm.ID = item.ID; + simuPumpVm.Name = item.Name; + simuPumpVm.Code = item.Name; + simuPumpVm.Qr = pump.Qr; + simuPumpVm.Hr = pump.Hr; + simuPumpVm.Nr = pump.Nr; + simuPumpVm.Pr = pump.Pr; + simuPumpVm.Er = pump.Er; + simuPumpVm.Ic = pump.Ic; + simuPumpVm.Oc = pump.Oc; + simuPumpVm.IOd = pump.IOd; + simuPumpVm.Ie = pump.Ie; + simuPumpVm.Oe = pump.Oe; + simuPumpVm.IsBp = pump.IsBp; + simuPumpVm.IsSxp = pump.IsSxp; + simuPumpVm.CurveQH = curveInfo.CurveQH; + simuPumpVm.CurveQE = curveInfo.CurveQE; + simuPumpVm.CurveQP = curveInfo.CurveQP; + _simuPumps.Add(simuPumpVm); + } + var pumps = _simuPumps.Select(x => x.Name + x.ID).ToList(); + _pumpCombine = new List<List<string>>() { pumps }; + } + + var complexRequestPras = new RequestParasComplex() + { + StationID = 1, + PressValueType = RequestParasComplex.ePressValueType.鎵▼, + SchemeSortType = eAnaSchemeSortType.鍔熺巼, + InletPipePara = new List<InletPipePara>() { new InletPipePara(0) } + }; + var calcValues = new List<CalcValueViewModel>(); + complexRequestPras.OutletPipePara = new List<OutletPipePara>(); + complexRequestPras.OutletPipePara.Add(new OutletPipePara() + { + TargetFlow = flow, + TargetPress = press + }); + + var calcHelper = new Calculator_OptAna_General(); + //if (currentTime.Hour >= 12 && currentTime.Hour % 12 == 0) + // combinIndex = 1; + var combin = _pumpCombine[0]; + var combinRunStatus = new MachineRunPara(); + combinRunStatus.MachineRunFilter = new List<MachineRunFilter>(); + for (int j = 0; j < _simuPumps.Count; j++) + { + var pump = _simuPumps[j]; + //var runStatus = combin.Exists(x => x == pump.Name) ? 1 : 0; + var machineRunFilter = new MachineRunFilter() + { + MachineID = pump.ID, + RunStatus = 1, + Percentage = 1, + IsFrequency = true + }; + combinRunStatus.MachineRunFilter.Add(machineRunFilter); + //combinRunStatus.RunPumpCount = 2; + } + double energy_calc = 0; + double carbon_emission = 0; + var calcValue = new CalcValueViewModel(); + //calcValue.Time = currentTime; + calcValue.TargetFlow = flow; + calcValue.TargetHead = press; + calcValue.Time = dateTime; + calcValues.Add(calcValue); + + //璋冨害 + var schemes = calcHelper.CalcSchemes(_simuPumps, complexRequestPras, null, combinRunStatus, out string errorInfo); + if (schemes == null || !schemes.Any()) + { + calcValue.CalcSuccess = false; + return calcValue; + //continue; + } + var scheme = schemes[0]; + calcValue.CalcSuccess = true; + calcValue.TotalPower = scheme.TotalWrkP; + calcValue.TotalEff = scheme.TotalWrkE; + calcValue.TotalHead = scheme.TotalWrkH; + calcValue.TotalFlow = scheme.TotalWrkQ; + calcValue.CalcHead = scheme.TotalWrkH - press + endP; + if (scheme.Items != null && scheme.Items.Any()) + { + calcValue.Pumps = new List<PumpViewModel>(); + foreach (var item in scheme.Items) + { + var pump = new PumpViewModel(); + pump.ID = item.PumpID; + pump.Name = item.MachineName; + pump.HZ = item.Frequence; + pump.Power = item.WorkPointP; + pump.Eff = item.WorkPointE; + pump.Head = item.WorkPointH; + pump.Flow = item.WorkPointQ; + pump.CurveInfoQH = item.CurveInfoQH; + pump.CurveInfoQP = item.CurveInfoQP; + calcValue.Pumps.Add(pump); + } + } + + return calcValue; + } + + private void gridView3_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) + { + if (e.Column.FieldName == "Status") + { + var celValue = e.CellValue.ToString(); + switch (celValue) + { + case "澶辫触": + e.Appearance.ForeColor = Color.Blue; + break; + default: + e.Appearance.ForeColor = Color.Green; + break; + } + } + } + #endregion + private List<StationMonitorListGroupMobileDto> _stations; + /// <summary> + /// 澶勭悊瀹炴椂鏁版嵁 + /// </summary> + /// <param name="records"></param> + public void BindData(List<CalcValue> records, List<StationMonitorListGroupMobileDto> stations, bool isBlue = true) + { + _stations = stations; + + if (isBlue) + { + this.Invoke(new Action(() => + { + this.calcValueViewModelBindingSource.DataSource = null; + this.gridView3.RefreshData(); + + var ls = new List<CalcValueViewModel>(); + foreach (var item in records) + { + if (!string.IsNullOrEmpty(item.JsonBody)) + { + var m = JsonHelper.Json2Object<CalcValueViewModel>(item.JsonBody); + m.RealDataJson = item.RealDataJson; + ls.Add(m); + } + } + _calcValues = ls; + this.calcValueViewModelBindingSource.DataSource = _calcValues; + this.gridView3.RefreshData(); + + + //var list = records.Select(c => c.JsonBody); + //if (list.Any()) + //{ + // var str = string.Join(",", list); + // str = "[" + str + "]"; + // _calcValues = JsonHelper.Json2Object<List<CalcValueViewModel>>(str); + + // this.calcValueViewModelBindingSource.DataSource = _calcValues; + // this.gridView3.RefreshData(); + + + + + //if (_calcValues.Any()) + //{ + // var _takeIndex = 0; + // _calcValues.ForEach(c => + // { + // var calcValue = c; + // if (calcValue.CalcSuccess) + // { + // CalcValueViewModel lastCalcValue = null; + // if (_takeIndex > 0) + // { + // lastCalcValue = _calcValues[_takeIndex - 1]; + // } + + // var time = calcValue.Time; + // var power = calcValue.TotalPower; + // var eff = calcValue.TotalEff; + // var calcP = calcValue.CalcHead; + // var avgP = calcValue.TargetHead; + // this.chartControl.BeginInit(); + + // _seriesRangeArea.Points.Add(new SeriesPoint(time, new double[] { avgP, double.Parse(_facilities.ConstantP.ToString()) })); + // _seriesAvgP.Points.Add(new SeriesPoint(time, avgP)); + // _seriesCalcP.Points.Add(new SeriesPoint(time, calcP)); + + // _seriesPower.Points.Add(new SeriesPoint(time, power)); + // _seriesE.Points.Add(new SeriesPoint(time, eff)); + // for (int i = 1; i < _simuPumps.Count + 1; i++) + // { + // var pump = _simuPumps[i - 1]; + // var series = this.chartControl.GetSeriesByName(pump.ID.ToString()); + // if (series == null) + // continue; + // var run = calcValue.Pumps.Exists(x => x.ID == pump.ID); + // if (!run && lastCalcValue != null && lastCalcValue.Pumps != null) + // { + // run = lastCalcValue.Pumps.Exists(x => x.ID == pump.ID); + // } + // var seriesPoint = new SeriesPoint(time, i); + // seriesPoint.IsEmpty = !run; + // seriesPoint.Color = !run ? Color.Gray : Color.RoyalBlue; + // series.Points.Add(seriesPoint); + // } + // _lineTime.AxisValue = time.ToString("yyyy-MM-dd HH:mm:ss"); + // _lineTime.Title.Text = time.ToString("yyyy-MM-dd HH:mm:ss"); + // this.chartControl.EndInit(); + + // SetPanelInfo(calcValue); + // SetCurveChart(calcValue.TotalFlow, calcValue.TargetHead, calcValue.TotalPower, calcValue.TotalEff, calcValue.Pumps); + // SetEnergyInfo(calcValue); + // } + // _takeIndex++; + // }); + //} + + //} + })); + } + else + { + this.calcValueViewModelBindingSource.DataSource = null; + this.gridView3.RefreshData(); + //var list = records.Select(c => c.JsonBody); + //if (list.Any()) + //{ + // var str = string.Join(",", list); + // str = "[" + str + "]"; + // _calcValues = JsonHelper.Json2Object<List<CalcValueViewModel>>(str); + // //_calcValues = records; + // this.calcValueViewModelBindingSource.DataSource = _calcValues; + // this.gridView3.RefreshData(); + //} + var ls = new List<CalcValueViewModel>(); + foreach (var item in records) + { + if (!string.IsNullOrEmpty(item.JsonBody)) + { + var m = JsonHelper.Json2Object<CalcValueViewModel>(item.JsonBody); + m.RealDataJson = item.RealDataJson; + m.ControlType= item.ControlType; + ls.Add(m); + } + + } + _calcValues = ls; + this.calcValueViewModelBindingSource.DataSource = _calcValues; + this.gridView3.RefreshData(); + } + WaitFrmHelper.HideWaitForm(); + } + /// <summary> + /// 鍒濆鍖栨暟鎹� + /// </summary> + public void InitialDataSource() + { + //_lineP.AxisValue =_facilities.ConstantP; + if (_facilities == null) + return; + + _simuPumps = new List<SimuPumpViewModel>(); + if (!long.TryParse(_facilities.CompletePlant, out long kitId)) + return; + var kit = new BLL.Kit().GetByID(kitId); + if (kit == null) + return; + if (kit.UseCount < 1) + return; + var equipmentList = new BLL.Equipment().GetByKitIDAndCatalog(kitId, ISupply.Equipment.Pump); + if (equipmentList == null || !equipmentList.Any()) + return; + if (kit.UseCount > equipmentList.Count) + return; + var useList = equipmentList.Take(kit.UseCount); + var bllEChartMapping = new BLL.EquipmentEChartMapping(); + var bllEChart = new BLL.EChart(); + foreach (var item in useList) + { + var mapping = bllEChartMapping.GetWorkingByEquipmentID(item.ID); + if (mapping == null) + continue; + var chart = bllEChartMapping.GetExByID(mapping.ID); + if (chart == null) + continue; + var curveInfo = chart.CurveInfo; + + var pump = Model.Pump.ToModel(item.RatedParas); + var simuPumpVm = new SimuPumpViewModel(); + simuPumpVm.ID = item.ID; + simuPumpVm.Name = item.Name; + simuPumpVm.Code = item.NO; + simuPumpVm.Qr = pump.Qr; + simuPumpVm.Hr = pump.Hr; + simuPumpVm.Nr = pump.Nr; + simuPumpVm.Pr = pump.Pr; + simuPumpVm.Er = pump.Er; + simuPumpVm.Ic = pump.Ic; + simuPumpVm.Oc = pump.Oc; + simuPumpVm.IOd = pump.IOd; + simuPumpVm.Ie = pump.Ie; + simuPumpVm.Oe = pump.Oe; + simuPumpVm.IsBp = pump.IsBp; + simuPumpVm.IsSxp = pump.IsSxp; + simuPumpVm.CurveQH = curveInfo.CurveQH; + simuPumpVm.CurveQE = curveInfo.CurveQE; + simuPumpVm.CurveQP = curveInfo.CurveQP; + _simuPumps.Add(simuPumpVm); + } + + + if (!_simuPumps.Any()) + return; + //InitialPumpRunSeries(_simuPumps); + var pumps = _simuPumps.Select(x => x.Name + x.ID).ToList(); + _pumpCombine = new List<List<string>>() { pumps }; + } + + + /// <summary> + /// 鍒濆鍖栧浘琛� + /// </summary> + + #region SetView + + + private List<Color> ColorArray = new List<Color>() + { Color.Red, + Color.Blue, Color.Green, Color.DodgerBlue, + Color.Fuchsia,Color.MidnightBlue,Color.Maroon, + Color.Aquamarine, Color.Bisque ,Color.BurlyWood }; + /// <summary> + /// 璁剧疆鍥捐〃淇℃伅 + /// </summary> + public void SetCurveChart(double workQ, double workH, double workP, double workE, List<PumpViewModel> currentPumps) + { + this.multiCurveExpressChart1.DeleteCurve(); + if (currentPumps == null || !currentPumps.Any()) + return; + + if (currentPumps.Count == 1) + { + var currentPump = currentPumps[0]; + ISupply.Curve.CurveExpress QH = currentPump.CurveInfoQH, QP = currentPump.CurveInfoQP; + + var QE = Curve.PumpCalculateHelper.CalculateE(QH, QP); + this.multiCurveExpressChart1.AddCurve(-1, currentPump.Name, + currentPump.Flow, currentPump.Head, currentPump.Power, currentPump.Eff, currentPump.HZ, + QH, QE, QP, System.Drawing.Color.Black); + + this.multiCurveExpressChart1.CalcWorkPointByQ(workQ); + return; + } + + var theConnectCurve = new Curve.ParallelConnectionHelper(); + for (int i = 0; i < currentPumps.Count; i++) + { + var currentPump = currentPumps[i]; + var QH = currentPump.CurveInfoQH; + var QP = currentPump.CurveInfoQP; + var QE = Curve.PumpCalculateHelper.CalculateE(QH, QP); + + + theConnectCurve.AddCurve(QH, QP); + this.multiCurveExpressChart1.AddCurve(currentPump.ID, + currentPump.Name, + currentPump.Flow, currentPump.Head, currentPump.Power, currentPump.Eff, + currentPump.HZ, + QH, + QE, + QP, + ColorArray[i]); + } + + + var bol = theConnectCurve.CalculateParallel(out List<ISupply.Curve.CurvePoint> ConnectCurveQH, + out List<ISupply.Curve.CurvePoint> ConnectCurveQE, + out List<ISupply.Curve.CurvePoint> ConnectCurveQP); + if (!bol) + { + return; + } + + var curveExpressQH = ISupply.Curve.FitHelper.BuildCurveExpress(ConnectCurveQH); + var curveExpressQE = ISupply.Curve.FitHelper.BuildCurveExpress(ConnectCurveQE); + var curveExpressQP = ISupply.Curve.FitHelper.BuildCurveExpress(ConnectCurveQP); + this.multiCurveExpressChart1.AddCurve(-1, "骞惰仈鏇茬嚎", + workQ, workH, workP, workE, + null, + curveExpressQH, curveExpressQE, curveExpressQP, System.Drawing.Color.Black); + // this.multiCurveExpressChart1.LineVisible = true; + this.multiCurveExpressChart1.CalcWorkPointByQ(workQ); + } + + /// <summary> + /// 璁剧疆闈㈡澘淇℃伅 + /// </summary> + private void SetPanelInfo(CalcValueViewModel calcValue) + { + this.gridControl1.DataSource = calcValue.Pumps; + this.gridControl1.RefreshDataSource(); + + this.txtTime.EditValue = calcValue.Time.ToString("T"); + this.txtPower.EditValue = Math.Round(calcValue.TotalPower, 2); + this.txtPumpP.EditValue = Math.Round(calcValue.TotalHead, 2); + + this.txtTerminalP.EditValue = Math.Round(calcValue.CalcHead, 2); + } + + private void SetEnergyInfo(CalcValueViewModel calcValue) + { + //this.txtTotalEnergy.EditValue = calcValue.TotalEnergy; + //this.txtEnergyEfficient.EditValue = calcValue.EnergyEfficient; + //this.txtCarbonEmission.EditValue = Math.Round(calcValue.CarbonEmission, 4); + //this.txtEnergyEfficiencyRatio.EditValue = calcValue.EnergyEfficiencyRatio; + + } + private List<CalcValueViewModel> _calcValues = null;//璁$畻鍊� + //鍥捐〃 榧犳爣鐐瑰嚮浜嬩欢 + private void chartControl_MouseDown(object sender, MouseEventArgs e) + { + ////return; + //if (e.Button != MouseButtons.Left) + // return; + //var hitInfo = this.chartControl.CalcHitInfo(e.Location); + //if (hitInfo.InChart) + //{ + // var diagramCoordinates = _xyDiagram.PointToDiagram(e.Location); + // var axisValue = diagramCoordinates.GetAxisValue(_axisX); + // if (axisValue == null) + // return; + // var dt = axisValue.DateTimeValue; + // //if (dt > (DateTime)_lineTime.AxisValue) + // // return; + // var cv = _calcValues?.Find(x => x.Time == dt); + // //if (cv == null) + // //{ + // // var bol = InterValueBuild(_currentBuild, dt, out double targetFlow, out double targetHead); + // // if (!bol) + // // return; + // // cv = SimuCalc(dt, _simuPumps, targetFlow, targetHead, _constantP); + // // if (cv == null) + // // return; + // //} + + // SetCurveChart(cv.TotalFlow, cv.TargetHead, cv.TotalPower, cv.TotalEff, cv.Pumps); + // SetPanelInfo(cv); + //} + } + + #endregion + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.resx new file mode 100644 index 0000000..69fe594 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormScheme.resx @@ -0,0 +1,166 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="calcValueViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>161, 17</value> + </metadata> + <assembly alias="DevExpress.Data.v22.2" name="DevExpress.Data.v22.2, Version=22.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="barButtonItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANoCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ilpvb20iPg0KICAgIDxwYXRoIGQ9Ik0yNy43LDI1LjNM + MjAuNSwxOGMxLTEuNCwxLjUtMy4yLDEuNS01YzAtNS00LTktOS05cy05LDQtOSw5YzAsNSw0LDksOSw5 + YzEuOSwwLDMuNi0wLjYsNS0xLjVsNy4zLDcuMyAgIGMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsMS4yLTEu + MkMyOC4xLDI2LjIsMjguMSwyNS42LDI3LjcsMjUuM3ogTTYsMTNjMC0zLjksMy4xLTcsNy03czcsMy4x + LDcsN2MwLDMuOS0zLjEsNy03LDdTNiwxNi45LDYsMTN6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4N + Cjwvc3ZnPgs= +</value> + </data> + <data name="barButtonItem2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAPoBAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iQ2xlYXJIZWFkZXJBbmRGb290ZXIiIHN0eWxlPSJlbmFibGUtYmFja2dy + b3VuZDpuZXcgMCAwIDMyIDMyIj4NCiAgPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5SZWR7ZmlsbDoj + RDExQzFDO30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTI3LDRINUM0LjUsNCw0LDQuNSw0LDV2MjJjMCww + LjUsMC41LDEsMSwxaDIyYzAuNSwwLDEtMC41LDEtMVY1QzI4LDQuNSwyNy41LDQsMjcsNHogTTIyLDIw + bC0yLDJsLTQtNGwtNCw0ICBsLTItMmw0LTRsLTQtNGwyLTJsNCw0bDQtNGwyLDJsLTQsNEwyMiwyMHoi + IGNsYXNzPSJSZWQiIC8+DQo8L3N2Zz4L +</value> + </data> + <metadata name="dataGridMonitorViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>419, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.Designer.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.Designer.cs new file mode 100644 index 0000000..2697816 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.Designer.cs @@ -0,0 +1,400 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxFormSystemInfo + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.textEdit9 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit8 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit7 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit6 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit5 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit4 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit3 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit2 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit1 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit10 = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.textEdit11 = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit9.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit8.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit7.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit6.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit5.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit4.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit3.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit10.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit11.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.textEdit9); + this.dataLayoutControl1.Controls.Add(this.textEdit8); + this.dataLayoutControl1.Controls.Add(this.textEdit7); + this.dataLayoutControl1.Controls.Add(this.textEdit6); + this.dataLayoutControl1.Controls.Add(this.textEdit5); + this.dataLayoutControl1.Controls.Add(this.textEdit4); + this.dataLayoutControl1.Controls.Add(this.textEdit3); + this.dataLayoutControl1.Controls.Add(this.textEdit2); + this.dataLayoutControl1.Controls.Add(this.textEdit1); + this.dataLayoutControl1.Controls.Add(this.textEdit10); + this.dataLayoutControl1.Controls.Add(this.textEdit11); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(1038, 796); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // textEdit9 + // + this.textEdit9.Location = new System.Drawing.Point(156, 108); + this.textEdit9.Name = "textEdit9"; + this.textEdit9.Size = new System.Drawing.Size(361, 20); + this.textEdit9.StyleController = this.dataLayoutControl1; + this.textEdit9.TabIndex = 12; + // + // textEdit8 + // + this.textEdit8.Location = new System.Drawing.Point(665, 84); + this.textEdit8.Name = "textEdit8"; + this.textEdit8.Size = new System.Drawing.Size(361, 20); + this.textEdit8.StyleController = this.dataLayoutControl1; + this.textEdit8.TabIndex = 11; + // + // textEdit7 + // + this.textEdit7.Location = new System.Drawing.Point(156, 84); + this.textEdit7.Name = "textEdit7"; + this.textEdit7.Size = new System.Drawing.Size(361, 20); + this.textEdit7.StyleController = this.dataLayoutControl1; + this.textEdit7.TabIndex = 10; + // + // textEdit6 + // + this.textEdit6.Location = new System.Drawing.Point(665, 60); + this.textEdit6.Name = "textEdit6"; + this.textEdit6.Size = new System.Drawing.Size(361, 20); + this.textEdit6.StyleController = this.dataLayoutControl1; + this.textEdit6.TabIndex = 9; + // + // textEdit5 + // + this.textEdit5.Location = new System.Drawing.Point(156, 60); + this.textEdit5.Name = "textEdit5"; + this.textEdit5.Size = new System.Drawing.Size(361, 20); + this.textEdit5.StyleController = this.dataLayoutControl1; + this.textEdit5.TabIndex = 8; + // + // textEdit4 + // + this.textEdit4.Location = new System.Drawing.Point(665, 36); + this.textEdit4.Name = "textEdit4"; + this.textEdit4.Size = new System.Drawing.Size(361, 20); + this.textEdit4.StyleController = this.dataLayoutControl1; + this.textEdit4.TabIndex = 7; + // + // textEdit3 + // + this.textEdit3.Location = new System.Drawing.Point(156, 36); + this.textEdit3.Name = "textEdit3"; + this.textEdit3.Size = new System.Drawing.Size(361, 20); + this.textEdit3.StyleController = this.dataLayoutControl1; + this.textEdit3.TabIndex = 6; + // + // textEdit2 + // + this.textEdit2.Location = new System.Drawing.Point(665, 12); + this.textEdit2.Name = "textEdit2"; + this.textEdit2.Size = new System.Drawing.Size(361, 20); + this.textEdit2.StyleController = this.dataLayoutControl1; + this.textEdit2.TabIndex = 5; + // + // textEdit1 + // + this.textEdit1.Location = new System.Drawing.Point(156, 12); + this.textEdit1.Name = "textEdit1"; + this.textEdit1.Size = new System.Drawing.Size(361, 20); + this.textEdit1.StyleController = this.dataLayoutControl1; + this.textEdit1.TabIndex = 4; + // + // textEdit10 + // + this.textEdit10.Location = new System.Drawing.Point(665, 108); + this.textEdit10.Name = "textEdit10"; + this.textEdit10.Size = new System.Drawing.Size(361, 20); + this.textEdit10.StyleController = this.dataLayoutControl1; + this.textEdit10.TabIndex = 13; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.emptySpaceItem1, + this.layoutControlItem1, + this.layoutControlItem2, + this.layoutControlItem3, + this.layoutControlItem4, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem8, + this.layoutControlItem9, + this.emptySpaceItem2, + this.layoutControlItem10, + this.layoutControlItem11}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(1038, 796); + this.Root.TextVisible = false; + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 144); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(1018, 632); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.textEdit1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem1.Text = "Lan1绔彛IP鍦板潃锛�"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(132, 14); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.textEdit2; + this.layoutControlItem2.Location = new System.Drawing.Point(509, 0); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem2.Text = "鏃犵嚎IP鍦板潃锛�"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(132, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.textEdit3; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem3.Text = "鎿嶄綔绯荤粺鐗堟湰锛�"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(132, 14); + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.textEdit4; + this.layoutControlItem4.Location = new System.Drawing.Point(509, 24); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem4.Text = "纭欢鎬昏繍琛屾椂闂达細"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(132, 14); + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.textEdit5; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem5.Text = "鏈嶅姟鎬诲崰鐢ㄧ鐩樼┖闂达細"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(132, 14); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.textEdit6; + this.layoutControlItem6.Location = new System.Drawing.Point(509, 48); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem6.Text = "鏁版嵁搴撳ぇ灏忥細"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(132, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.textEdit7; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem7.Text = "閲囬泦鏈嶅姟鍗犵敤纾佺洏绌洪棿锛�"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(132, 14); + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.textEdit8; + this.layoutControlItem8.Location = new System.Drawing.Point(509, 72); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem8.Text = "鎺ㄩ�佸崰鐢ㄧ鐩樼┖闂达細"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(132, 14); + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.textEdit9; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem9.Text = "閫氳鏈嶅姟鍗犵敤纾佺洏绌洪棿锛�"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(132, 14); + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(509, 120); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(509, 24); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.textEdit10; + this.layoutControlItem10.Location = new System.Drawing.Point(509, 96); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem10.Text = "褰撳墠鏃堕棿锛�"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(132, 14); + // + // textEdit11 + // + this.textEdit11.Location = new System.Drawing.Point(156, 132); + this.textEdit11.Name = "textEdit11"; + this.textEdit11.Size = new System.Drawing.Size(361, 20); + this.textEdit11.StyleController = this.dataLayoutControl1; + this.textEdit11.TabIndex = 14; + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.textEdit11; + this.layoutControlItem11.Location = new System.Drawing.Point(0, 120); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(509, 24); + this.layoutControlItem11.Text = "鍐呭瓨浣跨敤锛�"; + this.layoutControlItem11.TextSize = new System.Drawing.Size(132, 14); + // + // EboxFormSystemInfo + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "EboxFormSystemInfo"; + this.Size = new System.Drawing.Size(1038, 796); + this.Load += new System.EventHandler(this.EboxFormSystemInfo_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEdit9.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit8.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit7.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit6.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit5.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit4.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit3.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit10.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit11.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraEditors.TextEdit textEdit2; + private DevExpress.XtraEditors.TextEdit textEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.TextEdit textEdit9; + private DevExpress.XtraEditors.TextEdit textEdit8; + private DevExpress.XtraEditors.TextEdit textEdit7; + private DevExpress.XtraEditors.TextEdit textEdit6; + private DevExpress.XtraEditors.TextEdit textEdit5; + private DevExpress.XtraEditors.TextEdit textEdit4; + private DevExpress.XtraEditors.TextEdit textEdit3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + private DevExpress.XtraEditors.TextEdit textEdit10; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraEditors.TextEdit textEdit11; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.cs new file mode 100644 index 0000000..ddc214d --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.cs @@ -0,0 +1,57 @@ +锘縰sing System.Data; +using Yw.WinFrmUI; + +namespace IBox.WinFrmUI +{ + public partial class IBoxFormSystemInfo : DocumentPage + { + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getstoreCode = "getstore"; + public IBoxFormSystemInfo() + { + this.PageTitle.Caption = "璁惧淇℃伅"; + InitializeComponent(); + } + + private void EboxFormSystemInfo_Load(object sender, EventArgs e) + { + Thread.Sleep(500); + SendText(startCode + getstoreCode + paramCode + endCode); + } + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + + public void BindData(SystemInfoViewModel model, bool isBlue) + { + textEdit1.Text = model.Lan0IpAddress.Replace("\n", ""); + textEdit2.Text = model.Wlan0IpAddress.Replace("\n", ""); + textEdit3.Text = model.SystemVersion; + textEdit4.Text = model.TotalRunTime; + textEdit10.Text = model.CurrentTime.Replace(";",""); + var dic = GetDuDic(model.Du); + textEdit5.Text = GetDuString(dic, "/usr/ebox"); + textEdit6.Text = GetDuString(dic, "/usr/ebox/Data"); + textEdit7.Text = GetDuString(dic, "/usr/ebox/DataDockingConsole"); + textEdit8.Text = GetDuString(dic, "/usr/ebox/PostDataConsole"); + textEdit9.Text = GetDuString(dic, "/usr/ebox/WebServer"); + textEdit11.Text = model.MemUse; + } + + private Dictionary<string, string> GetDuDic(string du) + { + //8.2M:/usr/ebox/Data; 鐢熸垚Dictionary<string,string> + return du.Substring(0,du.Length - 1).Split(';').Select(c => c.Split(':')).ToDictionary(b => b[1], b => b[0]); + } + + private string GetDuString(Dictionary<string, string> du, string type) + { + return du[type]; + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.resx b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormSystemInfo.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj b/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj index cd857eb..b60fa90 100644 --- a/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj +++ b/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj @@ -19,11 +19,28 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> + <Compile Remove="Form\IBoxFormControll.cs" /> + <Compile Remove="Form\IBoxFormControll.Designer.cs" /> + <Compile Remove="Form\IBoxFormScheme.cs" /> + <Compile Remove="Form\IBoxFormScheme.Designer.cs" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Remove="Form\IBoxFormControll.resx" /> + <EmbeddedResource Remove="Form\IBoxFormScheme.resx" /> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> + <PackageReference Include="InTheHand.Net.Bluetooth" Version="4.1.44" /> + <PackageReference Include="NPOI" Version="2.7.1" /> + <PackageReference Include="Yw.Untity.Core" Version="3.0.6" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\..\Service\PBS.Service\PBS.Service.csproj" /> <ProjectReference Include="..\Yw.WinFrmUI.Core\Yw.WinFrmUI.Core.csproj" /> + <ProjectReference Include="..\Yw.WinFrmUI.Hydro.Q3d.Core\Yw.WinFrmUI.Hydro.Q3d.Core.csproj" /> </ItemGroup> </Project> diff --git a/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj.user b/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj.user new file mode 100644 index 0000000..d6a6f3b --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj.user @@ -0,0 +1,63 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> + <ItemGroup> + <Compile Update="Form\IBoxFormDataFilter.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="Form\IBoxFormEnergyAnalysis.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="Form\IBoxFormLog.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="Form\IBoxFormMonitor.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="Form\IBoxFormOverview.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="Form\IBoxFormParams.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="Form\IBoxFormProtocol.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="Form\IBoxFormRule.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="Form\IBoxFormSystemInfo.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="IBoxForm.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="MonitorSignalForm\AnalyDayForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="MonitorSignalForm\MonitorGroupEditForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="MonitorSignalForm\SignalEditForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="_UserControls\ProtocolLKWE.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="_UserControls\ProtocolModbus.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="_UserControls\ProtocolModbusTcp.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="_UserControls\ProtocolOML.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="_UserControls\ProtocolSL.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="_UserControls\ProtocolXMZ.cs"> + <SubType>UserControl</SubType> + </Compile> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/IBoxForm.Designer.cs b/WinFrmUI/IBox.WinFrmUI/IBoxForm.Designer.cs new file mode 100644 index 0000000..9cf10dd --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/IBoxForm.Designer.cs @@ -0,0 +1,603 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class IBoxForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(IBoxForm)); + this.ribbon = new DevExpress.XtraBars.Ribbon.RibbonControl(); + this.barButtonItemNoConnect = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItemClose = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItemConnected = new DevExpress.XtraBars.BarButtonItem(); + this.barBtnBlue = new DevExpress.XtraBars.BarEditItem(); + this.repCmbBlue = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); + this.barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem2 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem3 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem4 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem5 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem6 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem7 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem8 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem9 = new DevExpress.XtraBars.BarButtonItem(); + this.barEditItem2 = new DevExpress.XtraBars.BarEditItem(); + this.repositoryItemImageComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox(); + this.barButtonItem10 = new DevExpress.XtraBars.BarButtonItem(); + this.barEditItem3 = new DevExpress.XtraBars.BarEditItem(); + this.repositoryItemTextEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + this.barButtonItem11 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem12 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem13 = new DevExpress.XtraBars.BarButtonItem(); + this.barButtonItem14 = new DevExpress.XtraBars.BarButtonItem(); + this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); + this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + this.ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + this.ribbonPageGroup3 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + this.repositoryItemComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); + this.repositoryItemComboBox2 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); + this.barEditItem1 = new DevExpress.XtraBars.BarEditItem(); + this.xtraTabbedMdiManager1 = new DevExpress.XtraTabbedMdi.XtraTabbedMdiManager(this.components); + this.dockManager1 = new DevExpress.XtraBars.Docking.DockManager(this.components); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage3 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage4 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage5 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage6 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage7 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage8 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage9 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage10 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage11 = new DevExpress.XtraTab.XtraTabPage(); + ((System.ComponentModel.ISupportInitialize)(this.ribbon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repCmbBlue)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabbedMdiManager1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dockManager1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.SuspendLayout(); + // + // ribbon + // + this.ribbon.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.True; + this.ribbon.EmptyAreaImageOptions.ImagePadding = new System.Windows.Forms.Padding(43, 47, 43, 47); + this.ribbon.ExpandCollapseItem.Id = 0; + this.ribbon.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; + this.ribbon.Items.AddRange(new DevExpress.XtraBars.BarItem[] { + this.ribbon.ExpandCollapseItem, + this.ribbon.SearchEditItem, + this.barButtonItemNoConnect, + this.barButtonItemClose, + this.barButtonItemConnected, + this.barBtnBlue, + this.barButtonItem1, + this.barButtonItem2, + this.barButtonItem3, + this.barButtonItem4, + this.barButtonItem5, + this.barButtonItem6, + this.barButtonItem7, + this.barButtonItem8, + this.barButtonItem9, + this.barEditItem2, + this.barButtonItem10, + this.barEditItem3, + this.barButtonItem11, + this.barButtonItem12, + this.barButtonItem13, + this.barButtonItem14}); + this.ribbon.Location = new System.Drawing.Point(0, 0); + this.ribbon.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.ribbon.MaxItemId = 68; + this.ribbon.Name = "ribbon"; + this.ribbon.OptionsMenuMinWidth = 471; + this.ribbon.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { + this.ribbonPage1}); + this.ribbon.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { + this.repositoryItemComboBox1, + this.repCmbBlue, + this.repositoryItemImageComboBox1, + this.repositoryItemComboBox2, + this.repositoryItemTextEdit1}); + this.ribbon.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; + this.ribbon.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; + this.ribbon.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; + this.ribbon.Size = new System.Drawing.Size(1392, 128); + this.ribbon.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; + // + // barButtonItemNoConnect + // + this.barButtonItemNoConnect.Caption = "鎼滅储"; + this.barButtonItemNoConnect.Id = 28; + this.barButtonItemNoConnect.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barButtonItemNoConnect.ImageOptions.Image"))); + this.barButtonItemNoConnect.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barButtonItemNoConnect.ImageOptions.LargeImage"))); + this.barButtonItemNoConnect.Name = "barButtonItemNoConnect"; + this.barButtonItemNoConnect.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem1_ItemClick_1); + // + // barButtonItemClose + // + this.barButtonItemClose.Caption = "鏂紑杩炴帴"; + this.barButtonItemClose.Enabled = false; + this.barButtonItemClose.Id = 29; + this.barButtonItemClose.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItemClose.ImageOptions.SvgImage"))); + this.barButtonItemClose.Name = "barButtonItemClose"; + this.barButtonItemClose.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItemClose_ItemClick); + // + // barButtonItemConnected + // + this.barButtonItemConnected.Caption = "杩炴帴"; + this.barButtonItemConnected.Id = 38; + this.barButtonItemConnected.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItemConnected.ImageOptions.SvgImage"))); + this.barButtonItemConnected.Name = "barButtonItemConnected"; + this.barButtonItemConnected.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem3_ItemClick); + // + // barBtnBlue + // + this.barBtnBlue.Edit = this.repCmbBlue; + this.barBtnBlue.EditHeight = 35; + this.barBtnBlue.EditWidth = 110; + this.barBtnBlue.Id = 41; + this.barBtnBlue.Name = "barBtnBlue"; + // + // repCmbBlue + // + this.repCmbBlue.AutoHeight = false; + this.repCmbBlue.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repCmbBlue.Name = "repCmbBlue"; + // + // barButtonItem1 + // + this.barButtonItem1.Caption = "娉电粍鎬昏"; + this.barButtonItem1.Id = 50; + this.barButtonItem1.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem1.ImageOptions.SvgImage"))); + this.barButtonItem1.Name = "barButtonItem1"; + // + // barButtonItem2 + // + this.barButtonItem2.Caption = "瀹炴椂鐩戞祴"; + this.barButtonItem2.Enabled = false; + this.barButtonItem2.Id = 51; + this.barButtonItem2.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem2.ImageOptions.SvgImage"))); + this.barButtonItem2.Name = "barButtonItem2"; + this.barButtonItem2.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem2_ItemClick); + // + // barButtonItem3 + // + this.barButtonItem3.Caption = "鍙傛暟閰嶇疆"; + this.barButtonItem3.Enabled = false; + this.barButtonItem3.Id = 52; + this.barButtonItem3.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem3.ImageOptions.SvgImage"))); + this.barButtonItem3.Name = "barButtonItem3"; + this.barButtonItem3.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem3_ItemClick_1); + // + // barButtonItem4 + // + this.barButtonItem4.Caption = "鏃ュ織鏌ヨ"; + this.barButtonItem4.Enabled = false; + this.barButtonItem4.Id = 53; + this.barButtonItem4.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem4.ImageOptions.SvgImage"))); + this.barButtonItem4.Name = "barButtonItem4"; + this.barButtonItem4.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem4_ItemClick); + // + // barButtonItem5 + // + this.barButtonItem5.Caption = "鏁版嵁涓嬪彂"; + this.barButtonItem5.Enabled = false; + this.barButtonItem5.Id = 54; + this.barButtonItem5.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem5.ImageOptions.SvgImage"))); + this.barButtonItem5.Name = "barButtonItem5"; + this.barButtonItem5.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem5_ItemClick); + // + // barButtonItem6 + // + this.barButtonItem6.Caption = "娉电粍鎬昏"; + this.barButtonItem6.Enabled = false; + this.barButtonItem6.Id = 55; + this.barButtonItem6.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem6.ImageOptions.SvgImage"))); + this.barButtonItem6.Name = "barButtonItem6"; + this.barButtonItem6.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; + this.barButtonItem6.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem6_ItemClick); + // + // barButtonItem7 + // + this.barButtonItem7.Caption = "鍗忚閰嶇疆"; + this.barButtonItem7.Enabled = false; + this.barButtonItem7.Id = 56; + this.barButtonItem7.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem7.ImageOptions.SvgImage"))); + this.barButtonItem7.Name = "barButtonItem7"; + this.barButtonItem7.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem7_ItemClick); + // + // barButtonItem8 + // + this.barButtonItem8.Caption = "鐩戞祴閰嶇疆"; + this.barButtonItem8.Enabled = false; + this.barButtonItem8.Id = 57; + this.barButtonItem8.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem8.ImageOptions.SvgImage"))); + this.barButtonItem8.Name = "barButtonItem8"; + this.barButtonItem8.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem8_ItemClick); + // + // barButtonItem9 + // + this.barButtonItem9.Caption = "鏅烘帶鏁版嵁"; + this.barButtonItem9.Enabled = false; + this.barButtonItem9.Id = 58; + this.barButtonItem9.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barButtonItem9.ImageOptions.Image"))); + this.barButtonItem9.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barButtonItem9.ImageOptions.LargeImage"))); + this.barButtonItem9.Name = "barButtonItem9"; + this.barButtonItem9.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; + this.barButtonItem9.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem9_ItemClick); + // + // barEditItem2 + // + this.barEditItem2.Caption = "杩炴帴绫诲瀷锛�"; + this.barEditItem2.Edit = this.repositoryItemImageComboBox1; + this.barEditItem2.EditValue = "1"; + this.barEditItem2.EditWidth = 100; + this.barEditItem2.Id = 59; + this.barEditItem2.Name = "barEditItem2"; + this.barEditItem2.EditValueChanged += new System.EventHandler(this.barEditItem2_EditValueChanged); + // + // repositoryItemImageComboBox1 + // + this.repositoryItemImageComboBox1.AutoHeight = false; + this.repositoryItemImageComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemImageComboBox1.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { + new DevExpress.XtraEditors.Controls.ImageComboBoxItem("钃濈墮杩炴帴", "1", -1), + new DevExpress.XtraEditors.Controls.ImageComboBoxItem("缃戠粶杩炴帴", "2", -1)}); + this.repositoryItemImageComboBox1.Name = "repositoryItemImageComboBox1"; + // + // barButtonItem10 + // + this.barButtonItem10.Caption = "杩炴帴"; + this.barButtonItem10.Id = 61; + this.barButtonItem10.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem10.ImageOptions.SvgImage"))); + this.barButtonItem10.Name = "barButtonItem10"; + this.barButtonItem10.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; + this.barButtonItem10.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem10_ItemClick); + // + // barEditItem3 + // + this.barEditItem3.Caption = "IP鍦板潃锛�"; + this.barEditItem3.Edit = this.repositoryItemTextEdit1; + this.barEditItem3.EditValue = "192.168.12.104"; + this.barEditItem3.EditWidth = 150; + this.barEditItem3.Id = 62; + this.barEditItem3.Name = "barEditItem3"; + this.barEditItem3.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; + // + // repositoryItemTextEdit1 + // + this.repositoryItemTextEdit1.AutoHeight = false; + this.repositoryItemTextEdit1.Name = "repositoryItemTextEdit1"; + // + // barButtonItem11 + // + this.barButtonItem11.Caption = "鏈嶅姟鍗囩骇"; + this.barButtonItem11.Enabled = false; + this.barButtonItem11.Id = 63; + this.barButtonItem11.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barButtonItem11.ImageOptions.Image"))); + this.barButtonItem11.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barButtonItem11.ImageOptions.LargeImage"))); + this.barButtonItem11.Name = "barButtonItem11"; + this.barButtonItem11.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem11_ItemClick); + // + // barButtonItem12 + // + this.barButtonItem12.Caption = "鍩虹淇℃伅"; + this.barButtonItem12.Enabled = false; + this.barButtonItem12.Id = 64; + this.barButtonItem12.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barButtonItem12.ImageOptions.Image"))); + this.barButtonItem12.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barButtonItem12.ImageOptions.LargeImage"))); + this.barButtonItem12.Name = "barButtonItem12"; + this.barButtonItem12.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem12_ItemClick); + // + // barButtonItem13 + // + this.barButtonItem13.Caption = "鏁版嵁澶勭悊"; + this.barButtonItem13.Enabled = false; + this.barButtonItem13.Id = 66; + this.barButtonItem13.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barButtonItem13.ImageOptions.SvgImage"))); + this.barButtonItem13.Name = "barButtonItem13"; + this.barButtonItem13.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem13_ItemClick); + // + // barButtonItem14 + // + this.barButtonItem14.Caption = "鑳借�楀垎鏋�"; + this.barButtonItem14.Enabled = false; + this.barButtonItem14.Id = 67; + this.barButtonItem14.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barButtonItem14.ImageOptions.Image"))); + this.barButtonItem14.ImageOptions.LargeImage = ((System.Drawing.Image)(resources.GetObject("barButtonItem14.ImageOptions.LargeImage"))); + this.barButtonItem14.Name = "barButtonItem14"; + this.barButtonItem14.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem14_ItemClick); + // + // ribbonPage1 + // + this.ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { + this.ribbonPageGroup1, + this.ribbonPageGroup2, + this.ribbonPageGroup3}); + this.ribbonPage1.Name = "ribbonPage1"; + this.ribbonPage1.Text = "ribbonPage1"; + // + // ribbonPageGroup1 + // + this.ribbonPageGroup1.ItemLinks.Add(this.barEditItem2); + this.ribbonPageGroup1.ItemLinks.Add(this.barEditItem3); + this.ribbonPageGroup1.ItemLinks.Add(this.barBtnBlue); + this.ribbonPageGroup1.ItemLinks.Add(this.barButtonItemNoConnect); + this.ribbonPageGroup1.ItemLinks.Add(this.barButtonItemConnected); + this.ribbonPageGroup1.ItemLinks.Add(this.barButtonItemClose); + this.ribbonPageGroup1.ItemLinks.Add(this.barButtonItem10); + this.ribbonPageGroup1.ItemsLayout = DevExpress.XtraBars.Ribbon.RibbonPageGroupItemsLayout.OneRow; + this.ribbonPageGroup1.Name = "ribbonPageGroup1"; + this.ribbonPageGroup1.Text = "杩炴帴璁剧疆"; + // + // ribbonPageGroup2 + // + this.ribbonPageGroup2.ItemLinks.Add(this.barButtonItem2); + this.ribbonPageGroup2.ItemLinks.Add(this.barButtonItem6); + this.ribbonPageGroup2.ItemLinks.Add(this.barButtonItem14); + this.ribbonPageGroup2.Name = "ribbonPageGroup2"; + this.ribbonPageGroup2.Text = "鐩戞祴鍒嗘瀽"; + // + // ribbonPageGroup3 + // + this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem7); + this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem8); + this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem13); + this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem3); + this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem9); + this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem5); + this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem11); + this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem12); + this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem4); + this.ribbonPageGroup3.Name = "ribbonPageGroup3"; + this.ribbonPageGroup3.Text = "鏁版嵁绠$悊"; + // + // repositoryItemComboBox1 + // + this.repositoryItemComboBox1.AutoHeight = false; + this.repositoryItemComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemComboBox1.Name = "repositoryItemComboBox1"; + // + // repositoryItemComboBox2 + // + this.repositoryItemComboBox2.AutoHeight = false; + this.repositoryItemComboBox2.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemComboBox2.Name = "repositoryItemComboBox2"; + // + // barEditItem1 + // + this.barEditItem1.Edit = this.repositoryItemComboBox1; + this.barEditItem1.EditHeight = 40; + this.barEditItem1.EditWidth = 110; + this.barEditItem1.Id = 27; + this.barEditItem1.Name = "barEditItem1"; + // + // xtraTabbedMdiManager1 + // + this.xtraTabbedMdiManager1.MdiParent = null; + // + // dockManager1 + // + this.dockManager1.Form = this; + this.dockManager1.TopZIndexControls.AddRange(new string[] { + "DevExpress.XtraBars.BarDockControl", + "DevExpress.XtraBars.StandaloneBarDockControl", + "System.Windows.Forms.MenuStrip", + "System.Windows.Forms.StatusStrip", + "System.Windows.Forms.StatusBar", + "DevExpress.XtraBars.Ribbon.RibbonStatusBar", + "DevExpress.XtraBars.Ribbon.RibbonControl", + "DevExpress.XtraBars.Navigation.OfficeNavigationBar", + "DevExpress.XtraBars.Navigation.TileNavPane", + "DevExpress.XtraBars.TabFormControl", + "DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl", + "DevExpress.XtraBars.ToolbarForm.ToolbarFormControl"}); + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 128); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl1.Size = new System.Drawing.Size(1392, 873); + this.xtraTabControl1.TabIndex = 10; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1, + this.xtraTabPage2, + this.xtraTabPage3, + this.xtraTabPage4, + this.xtraTabPage5, + this.xtraTabPage6, + this.xtraTabPage7, + this.xtraTabPage8, + this.xtraTabPage9, + this.xtraTabPage10, + this.xtraTabPage11}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.PageVisible = false; + this.xtraTabPage1.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage1.Text = "瀹炴椂鐩戞祴"; + // + // xtraTabPage2 + // + this.xtraTabPage2.Name = "xtraTabPage2"; + this.xtraTabPage2.PageVisible = false; + this.xtraTabPage2.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage2.Text = "娉电珯鎬昏"; + // + // xtraTabPage3 + // + this.xtraTabPage3.Name = "xtraTabPage3"; + this.xtraTabPage3.PageVisible = false; + this.xtraTabPage3.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage3.Text = "鍗忚閰嶇疆"; + // + // xtraTabPage4 + // + this.xtraTabPage4.Name = "xtraTabPage4"; + this.xtraTabPage4.PageVisible = false; + this.xtraTabPage4.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage4.Text = "鐩戞祴閰嶇疆"; + // + // xtraTabPage5 + // + this.xtraTabPage5.Name = "xtraTabPage5"; + this.xtraTabPage5.PageVisible = false; + this.xtraTabPage5.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage5.Text = "鍙傛暟閰嶇疆"; + // + // xtraTabPage6 + // + this.xtraTabPage6.Name = "xtraTabPage6"; + this.xtraTabPage6.PageVisible = false; + this.xtraTabPage6.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage6.Text = "璋冨害鏂规"; + // + // xtraTabPage7 + // + this.xtraTabPage7.Name = "xtraTabPage7"; + this.xtraTabPage7.PageVisible = false; + this.xtraTabPage7.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage7.Text = "鏁版嵁涓嬪彂"; + // + // xtraTabPage8 + // + this.xtraTabPage8.Name = "xtraTabPage8"; + this.xtraTabPage8.PageVisible = false; + this.xtraTabPage8.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage8.Text = "鏃ュ織绠$悊"; + // + // xtraTabPage9 + // + this.xtraTabPage9.Name = "xtraTabPage9"; + this.xtraTabPage9.PageVisible = false; + this.xtraTabPage9.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage9.Text = "鍩虹淇℃伅"; + // + // xtraTabPage10 + // + this.xtraTabPage10.Name = "xtraTabPage10"; + this.xtraTabPage10.PageVisible = false; + this.xtraTabPage10.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage10.Text = "鏁版嵁澶勭悊"; + // + // xtraTabPage11 + // + this.xtraTabPage11.Name = "xtraTabPage11"; + this.xtraTabPage11.PageVisible = false; + this.xtraTabPage11.Size = new System.Drawing.Size(1390, 847); + this.xtraTabPage11.Text = "鑳借�楀垎鏋�"; + // + // EboxForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.Controls.Add(this.xtraTabControl1); + this.Controls.Add(this.ribbon); + this.DoubleBuffered = true; + this.Name = "EboxForm"; + this.Size = new System.Drawing.Size(1392, 1001); + this.Load += new System.EventHandler(this.IBoxForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.ribbon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repCmbBlue)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemImageComboBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabbedMdiManager1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dockManager1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private DevExpress.XtraBars.Ribbon.RibbonControl ribbon; + private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup2; + private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repositoryItemComboBox1; + private DevExpress.XtraBars.BarButtonItem barButtonItemNoConnect; + private DevExpress.XtraBars.BarButtonItem barButtonItemClose; + private DevExpress.XtraBars.BarEditItem barEditItem1; + private DevExpress.XtraBars.BarButtonItem barButtonItemConnected; + private DevExpress.XtraBars.BarEditItem barBtnBlue; + private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repCmbBlue; + private DevExpress.XtraTabbedMdi.XtraTabbedMdiManager xtraTabbedMdiManager1; + private DevExpress.XtraBars.BarButtonItem barButtonItem1; + private DevExpress.XtraBars.BarButtonItem barButtonItem2; + private DevExpress.XtraBars.BarButtonItem barButtonItem3; + private DevExpress.XtraBars.BarButtonItem barButtonItem4; + private DevExpress.XtraBars.BarButtonItem barButtonItem5; + private DevExpress.XtraBars.BarButtonItem barButtonItem6; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup3; + private DevExpress.XtraBars.BarButtonItem barButtonItem7; + private DevExpress.XtraBars.BarButtonItem barButtonItem8; + private DevExpress.XtraBars.BarButtonItem barButtonItem9; + private DevExpress.XtraBars.BarEditItem barEditItem2; + private DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox repositoryItemImageComboBox1; + private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repositoryItemComboBox2; + private DevExpress.XtraBars.BarButtonItem barButtonItem10; + private DevExpress.XtraBars.BarEditItem barEditItem3; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEdit1; + private DevExpress.XtraBars.Docking.DockManager dockManager1; + private DevExpress.XtraTab.XtraTabControl xtraTabControl1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage2; + private DevExpress.XtraTab.XtraTabPage xtraTabPage3; + private DevExpress.XtraTab.XtraTabPage xtraTabPage4; + private DevExpress.XtraTab.XtraTabPage xtraTabPage5; + private DevExpress.XtraTab.XtraTabPage xtraTabPage6; + private DevExpress.XtraTab.XtraTabPage xtraTabPage7; + private DevExpress.XtraTab.XtraTabPage xtraTabPage8; + private DevExpress.XtraBars.BarButtonItem barButtonItem11; + private DevExpress.XtraBars.BarButtonItem barButtonItem12; + private DevExpress.XtraTab.XtraTabPage xtraTabPage9; + private DevExpress.XtraTab.XtraTabPage xtraTabPage10; + private DevExpress.XtraBars.BarButtonItem barButtonItem13; + private DevExpress.XtraBars.BarButtonItem barButtonItem14; + private DevExpress.XtraTab.XtraTabPage xtraTabPage11; + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/IBoxForm.cs b/WinFrmUI/IBox.WinFrmUI/IBoxForm.cs new file mode 100644 index 0000000..afaf251 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/IBoxForm.cs @@ -0,0 +1,706 @@ +锘縰sing DevExpress.Utils.Extensions; +using DevExpress.XtraBars; +using InTheHand.Net; +using InTheHand.Net.Bluetooth; +using InTheHand.Net.Sockets; +using System.Data; +using System.IO; +using System.Net.Http; +using System.Text; +using Yw.WinFrmUI; +using Yw; +using PBS.Model; + +namespace IBox.WinFrmUI +{ + public partial class IBoxForm : DocumentPage + { + private Facility _facilities; + private BluetoothRadio radio = null;//钃濈墮閫傞厤鍣� + private string sendFileName = null;//鍙戦�佹枃浠跺悕 + private BluetoothAddress sendAddress = null;//鍙戦�佺洰鐨勫湴鍧� + //private ObexListener listener = null;//鐩戝惉鍣� + private Thread listenThread, sendThread;//鍙戦��/鎺ユ敹绾跨▼ + private BluetoothClient myClient = null; + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getbaseCode = "getbase"; + private string getrealrecordCode = "getrealrecord"; + private string gethistoryrecordCode = "gethistoryrecord"; + private string getalarmbydayCode = "getalarmbyday"; + private string getbysignalidofdayrangeCode = "getbysignalidofdayrange"; + private string getmonitorCode = "getmonitor"; + private string getsignaltypeCode = "getsignaltype"; + private string getMonitorgroupCode = "getmonitorgroup"; + private BluetoothDeviceInfo curLanYa = null; + private List<BluetoothDeviceInfo> LstBluetooth = null; + + //Stopwatch sw = new Stopwatch(); + //string swstr=string.Empty; + private List<MonitorValueAlarmRecord> monitorValueAlarmRecords = null; + + private List<DataGridMonitorViewModel> dataGridMonitorViewModels = null; + private List<PumpRunStatusViewModel> pumpRunStatusModels = null; + private List<PumpEnergyViewModel> pumpEnergyViewModels = null; + + /// <summary> + /// 鎼滅储 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void barButtonItem1_ItemClick_1(object sender, ItemClickEventArgs e) + { + //this.repCmbBlue.Items.Add(); + //this.barBtnBlue.EditValue; + + WaitFormHelper.ShowWaitForm(this); + repCmbBlue.Items.Clear(); + LstBluetooth = BluetoothHelper.GetInstance().SearchBluetooth(); + if (null == LstBluetooth || LstBluetooth.Count < 1) return; + + foreach (var itm in LstBluetooth) + repCmbBlue.Items.Add(itm.DeviceName); + var f = LstBluetooth.FirstOrDefault(b => b.DeviceName.Contains("ebox")); + if (f != null) + { + this.barBtnBlue.EditValue = f.DeviceName; + barButtonItem3.Enabled = true; + } + WaitFormHelper.HideWaitForm(this); + } + + /// <summary> + /// 杩炴帴 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void barButtonItem3_ItemClick(object sender, ItemClickEventArgs e) + { + WaitFormHelper.ShowWaitForm(); + var f = LstBluetooth.First(b => b.DeviceName.Contains(this.barBtnBlue.EditValue.ToString())); + if (f != null) + { + BluetoothHelper.GetInstance().SetBluetoothByName(f.DeviceName); + BluetoothHelper.GetInstance().ListenerData(); + ConnectedEve(); + Thread.Sleep(500); + WaitFormHelper.HideWaitForm(this); + } + } + + private void ConnectedEve() + { + barButtonItem2.Enabled = barButtonItem3.Enabled = barButtonItem14.Enabled = barButtonItem11.Enabled = barButtonItem12.Enabled = barButtonItem4.Enabled = barButtonItem5.Enabled = barButtonItem6.Enabled = barButtonItem7.Enabled = barButtonItem8.Enabled = barButtonItem9.Enabled = barButtonItem13.Enabled = true; + barButtonItemConnected.Enabled = false; + barButtonItemClose.Enabled = true; + } + + private void ClosedEve() + { + barButtonItem2.Enabled = barButtonItem3.Enabled = barButtonItem14.Enabled = barButtonItem11.Enabled = barButtonItem12.Enabled = barButtonItem4.Enabled = barButtonItem5.Enabled = barButtonItem6.Enabled = barButtonItem7.Enabled = barButtonItem8.Enabled = barButtonItem9.Enabled = barButtonItem13.Enabled = false; + barButtonItemConnected.Enabled = true; + barButtonItemClose.Enabled = false; + } + + /// <summary> + /// 鏂紑 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void barButtonItemClose_ItemClick(object sender, ItemClickEventArgs e) + { + BluetoothHelper.GetInstance().Close(); + ClosedEve(); + } + + private void AddControl(DocumentPage page) + { + //if (dockPanel1.Controls.Count > 0) + //{ + // dockPanel1.Controls.RemoveAt(0); + //} + //dockPanel1.Controls.Add(page); + //WaitFormHelper.HideWaitForm(); + } + + private void InitControl() + { + IBoxFormOverview = new IBoxFormOverview(); + IBoxFormOverview.Dock = DockStyle.Fill; + IBoxFormOverview.SendData += SendText; + xtraTabPage2.Controls.Add(IBoxFormOverview); + + IBoxFormMonitor = new IBoxFormMonitor(); + IBoxFormMonitor.Dock = DockStyle.Fill; + IBoxFormMonitor.SendData += SendText; + xtraTabPage1.Controls.Add(IBoxFormMonitor); + + //IBoxFormControll = new IBoxFormControll(_facilities); + //IBoxFormControll.Dock = DockStyle.Fill; + //IBoxFormControll.SendData += SendText; + //xtraTabPage7.Controls.Add(IBoxFormControll); + + IBoxFormParams = new IBoxFormParams(); + IBoxFormParams.Dock = DockStyle.Fill; + IBoxFormParams.SendData += SendText; + xtraTabPage5.Controls.Add(IBoxFormParams); + + IBoxFormLog = new IBoxFormLog(); + IBoxFormLog.Dock = DockStyle.Fill; + IBoxFormLog.SendData += SendText; + xtraTabPage8.Controls.Add(IBoxFormLog); + + IBoxFormProtocol = new IBoxFormProtocol(); + IBoxFormProtocol.Dock = DockStyle.Fill; + IBoxFormProtocol.SendData += SendText; + xtraTabPage3.Controls.Add(IBoxFormProtocol); + + IBoxFormRule = new IBoxFormRule(_facilities); + IBoxFormRule.Dock = DockStyle.Fill; + IBoxFormRule.SendData += SendText; + xtraTabPage4.Controls.Add(IBoxFormRule); + + _SelectedBuild = new Build() + { + factoryName = _facilities.Name, + 绯荤粺鏈�澶ф祦閲� = _facilities.MaxWaterDemand.Value, + Type = 浜屼緵鍒嗗尯Type.鍔犲帇渚涙按, + ID = _facilities.ID.ToString(), + 鐢ㄦ埛鍘嬪姏闇�姹� = int.Parse(_facilities.TerminalPressure.ToString()), + 灞傛暟 = double.Parse(_facilities.Floor.ToString()), + 灞傞珮 = double.Parse(_facilities.FloorHeight.ToString()), + 姣忓眰鎴锋暟 = double.Parse(_facilities.Households.ToString()) + }; + //ShowChart(); + var simuCalcViewModel = new SimuViewModel(); + simuCalcViewModel.CurrentBuild = _SelectedBuild; + simuCalcViewModel.Facilities = _facilities; + //IBoxFormScheme = new IBoxFormScheme(simuCalcViewModel); + //IBoxFormScheme.Dock = DockStyle.Fill; + //IBoxFormScheme.SendData += SendText; + //xtraTabPage6.Controls.Add(IBoxFormScheme); + + } + + private void barButtonItem6_ItemClick(object sender, ItemClickEventArgs e) + { + //IBoxFormMonitor = null; + //IBoxFormOverview = new IBoxFormOverview(); + //IBoxFormOverview.Dock = DockStyle.Fill; + //IBoxFormOverview.SendData += SendText; + //AddControl(IBoxFormOverview); + HideAll(); + IBoxFormOverview = new IBoxFormOverview(); + IBoxFormOverview.Dock = DockStyle.Fill; + IBoxFormOverview.SendData += SendText; + xtraTabPage2.Controls.Add(IBoxFormOverview); + xtraTabPage2.PageVisible = true; + + + } + + private void HideAll() + { + xtraTabControl1.TabPages.ForEach(b => + { + if (b.Controls.Count > 0) + { + b.Controls.RemoveAt(0); + } + b.PageVisible = false; + }); + } + + private void barButtonItem2_ItemClick(object sender, ItemClickEventArgs e) + { + //IBoxFormOverview = null; + //IBoxFormMonitor = new IBoxFormMonitor(); + //IBoxFormMonitor.Dock = DockStyle.Fill; + //IBoxFormMonitor.SendData += SendText; + //AddControl(IBoxFormMonitor); + HideAll(); + IBoxFormMonitor = new IBoxFormMonitor(); + IBoxFormMonitor.Dock = DockStyle.Fill; + IBoxFormMonitor.SendData += SendText; + xtraTabPage1.Controls.Add(IBoxFormMonitor); + xtraTabPage1.PageVisible = true; + + + } + + private void barButtonItem5_ItemClick(object sender, ItemClickEventArgs e) + { + //IBoxFormControll = new IBoxFormControll(_facilities); + //IBoxFormControll.Dock = DockStyle.Fill; + //IBoxFormControll.SendData += SendText; + //AddControl(IBoxFormControll); + HideAll(); + //IBoxFormControll = new IBoxFormControll(_facilities); + //IBoxFormControll.Dock = DockStyle.Fill; + //IBoxFormControll.SendData += SendText; + //xtraTabPage7.Controls.Add(IBoxFormControll); + xtraTabPage7.PageVisible = true; + + + } + + private void barButtonItem3_ItemClick_1(object sender, ItemClickEventArgs e) + { + //IBoxFormParams = new IBoxFormParams(); + //IBoxFormParams.Dock = DockStyle.Fill; + //IBoxFormParams.SendData += SendText; + //AddControl(IBoxFormParams); + + HideAll(); + IBoxFormParams = new IBoxFormParams(); + IBoxFormParams.Dock = DockStyle.Fill; + IBoxFormParams.SendData += SendText; + xtraTabPage5.Controls.Add(IBoxFormParams); + xtraTabPage5.PageVisible = true; + + } + + private void barButtonItem4_ItemClick(object sender, ItemClickEventArgs e) + { + //IBoxFormLog = new IBoxFormLog(); + //IBoxFormLog.Dock = DockStyle.Fill; + //IBoxFormLog.SendData += SendText; + //AddControl(IBoxFormLog); + + HideAll(); + IBoxFormLog = new IBoxFormLog(); + IBoxFormLog.Dock = DockStyle.Fill; + IBoxFormLog.SendData += SendText; + xtraTabPage8.Controls.Add(IBoxFormLog); + xtraTabPage8.PageVisible = true; + + } + + private void barButtonItem7_ItemClick(object sender, ItemClickEventArgs e) + { + //IBoxFormProtocol = new IBoxFormProtocol(); + //IBoxFormProtocol.Dock = DockStyle.Fill; + //IBoxFormProtocol.SendData += SendText; + //AddControl(IBoxFormProtocol); + + HideAll(); + IBoxFormProtocol = new IBoxFormProtocol(); + IBoxFormProtocol.Dock = DockStyle.Fill; + IBoxFormProtocol.SendData += SendText; + xtraTabPage3.Controls.Add(IBoxFormProtocol); + xtraTabPage3.PageVisible = true; + + } + + private void barButtonItem8_ItemClick(object sender, ItemClickEventArgs e) + { + //IBoxFormRule = new IBoxFormRule(); + //IBoxFormRule.Dock = DockStyle.Fill; + //IBoxFormRule.SendData += SendText; + //AddControl(IBoxFormRule); + + HideAll(); + IBoxFormRule = new IBoxFormRule(_facilities); + IBoxFormRule.Dock = DockStyle.Fill; + IBoxFormRule.SendData += SendText; + xtraTabPage4.Controls.Add(IBoxFormRule); + xtraTabPage4.PageVisible = true; + + } + + IBoxFormOverview IBoxFormOverview; + IBoxFormMonitor IBoxFormMonitor; + //IBoxFormControll IBoxFormControll; + IBoxFormParams IBoxFormParams; + IBoxFormLog IBoxFormLog; + IBoxFormProtocol IBoxFormProtocol; + IBoxFormRule IBoxFormRule; + //IBoxFormScheme IBoxFormScheme; + IBoxFormSystemInfo IBoxFormSystemInfo; + IBoxFormDataFilter IBoxFormDataFilter; + IBoxFormEnergyAnalysis IBoxFormEnergyAnalysis; + + private void IBoxForm_Load(object sender, EventArgs e) + { + BluetoothHelper.GetInstance().SMR += new BluetoothHelper.ShowMessReturn(GetReceive); + barEditItem2.EditValue = "2"; + //InitControl(); + } + + public void GetReceive(string msg) + { + if (!this.IsHandleCreated || this.IsDisposed || string.IsNullOrEmpty(msg)) return; + if (msg.StartsWith("error:") && msg.Contains("鐩爣涓绘満鍧忎簡")) + { + WaitFormHelper.HideWaitForm(); + MessageBoxHelper.ShowError("钃濈墮璁惧杩炴帴澶辫触锛岃閲嶈瘯!"); return; + } + if (!string.IsNullOrEmpty(msg) && msg.Contains(startCode)) + { + var order = msg.Replace(endCode, "").Replace(startCode, "").Trim(); + SetOrder(order); + } + else + { + WaitFormHelper.HideWaitForm(); + //MessageBoxHelper.ShowError("钃濈墮璁惧杩炴帴澶辫触"); + } + } + private List<StationMonitorListGroupMobileDto> stationMonitors; + private void SetOrder(string order) + { + var smsg = order.Split(new string[] { paramCode }, StringSplitOptions.RemoveEmptyEntries); + if (smsg.Length < 2) + { + return; + } + + switch (smsg[0].Trim()) + { + case "getlog": + var getloglist = JsonHelper.Json2Object<List<IBoxLogViewModel>>(smsg[1].Trim()); + IBoxFormLog.BindData(getloglist, ConnectType == 1 ? true : false); + break; + case "getbase": + var getbaselist = JsonHelper.Json2Object<List<StationMonitorListGroupMobileDto>>(smsg[1].Trim()); + if (IBoxFormOverview != null) + { + IBoxFormOverview.BindGrid(getbaselist, ConnectType == 1 ? true : false); + IBoxFormOverview.TestData(ConnectType == 1 ? true : false); + } + stationMonitors = getbaselist; + //else + if (IBoxFormMonitor != null) + IBoxFormMonitor.BindGrid(getbaselist, ConnectType == 1 ? true : false); + WaitFormHelper.HideWaitForm(); + break; + + case "gethistoryrecord": + var b = smsg[1].Trim(); + var gethistoryrecordlist = new List<MonitorRecord>(); + + if (!string.IsNullOrEmpty(b)) + { + var c = b.Split('|'); + foreach (var item in c) + { + var m = new MonitorRecord().FromString(item); + gethistoryrecordlist.Add(m); + } + } + IBoxFormMonitor.SetChartData(gethistoryrecordlist, ConnectType == 1 ? true : false); + break; + + case "getalarmbyday": + var l = smsg[1].Trim(); + IBoxFormMonitor.SetAlarmByDay(l, ConnectType == 1 ? true : false); + break; + + case "getbysignalidofdayrange": + var getbysignalidofdayrangelist = JsonHelper.Json2Object<List<MonitorValueAlarmRecord>>(smsg[1].Trim()); + break; + + case "getrealrecord": + var getrealrecordlist = JsonHelper.Json2Object<List<MonitorRealRecord>>(smsg[1].Trim()); + if (IBoxFormMonitor != null) + IBoxFormMonitor.SetRealRecord(getrealrecordlist, ConnectType == 1 ? true : false); + break; + case "getparams": + var model = JsonHelper.Json2Object<IBoxConfigViewModel>(smsg[1].Trim()); + IBoxFormParams.BindData(model, ConnectType == 1 ? true : false); + break; + case "getprotocol": + { + var pmodel = JsonHelper.Json2Object<IBoxProtocolViewModel>(smsg[1].Trim()); + IBoxFormProtocol.BindData(pmodel, ConnectType == 1 ? true : false); + break; + } + case "getrules": + { + var rgetbaselist = JsonHelper.Json2Object<List<StationMonitorListGroupMobileDto>>(smsg[1].Trim()); + IBoxFormRule.BindGrid(rgetbaselist, ConnectType == 1 ? true : false); + SendText(null, startCode + getsignaltypeCode + paramCode + endCode); + break; + } + case "getcalvalue": + { + var getcalvaluelist = JsonHelper.Json2Object<List<CalcValue>>(smsg[1].Trim()); + //IBoxFormScheme.BindData(getcalvaluelist, stationMonitors, ConnectType == 1 ? true : false); + break; + } + case "getstore": + { + var pmodel = JsonHelper.Json2Object<SystemInfoViewModel>(smsg[1].Trim()); + IBoxFormSystemInfo.BindData(pmodel, ConnectType == 1 ? true : false); + break; + } + case "getfilter": + { + var pmodel = JsonHelper.Json2Object<IBoxFilterViewModel>(smsg[1].Trim()); + IBoxFormDataFilter.BindData(pmodel, ConnectType == 1 ? true : false); + break; + } + case "getsignaltype": + { + var list = JsonHelper.Json2Object<List<IBox.WinFrmUI.GeneralViewModel>>(smsg[1].Trim()); + IBoxFormRule.SetSignalType(list); + SendText(null, startCode + getMonitorgroupCode + paramCode + endCode); + break; + } + case "getmonitorgroup": + { + var list = JsonHelper.Json2Object<List<IBox.WinFrmUI.MonitorPointGroup>>(smsg[1].Trim()); + IBoxFormRule.SetMonitorPoint(list); + break; + } + case "getenergyanaly": + { + var list = JsonHelper.Json2Object<List<PumpEnergyViewModel>>(smsg[1].Trim()); + IBoxFormEnergyAnalysis.BindData(list); + break; + } + } + } + public Build _SelectedBuild; + private List<CalcResultViewModel> _res; + private string filePath = "Data\\AnalyData_{0}.json"; + //private void ShowChart() + //{ + // var file = string.Format(filePath, _facilities.ID.ToString()); + // var path = Path.Combine(Directory.GetCurrentDirectory(), file); + // if (!File.Exists(path)) + // { + // MessageBoxHelper.ShowInfo("璇峰厛杩涜绯荤粺鏇茬嚎鎿嶄綔!"); + // return; + // } + // else + // { + // SetResult(path); + // } + //} + //private void SetResult(string path) + //{ + // var content = new Eventech.Common.FileHelper().ReadFile(path); + // var result = JsonHelper.Json2Object<List<CalcResultViewModel>>(content); + // AddPoints(result); + //} + //public void AddPoints(List<CalcResultViewModel> res) + //{ + // _res = res; + // List<PointF> nums = res.Select(o => new PointF((float)o.Demand, (float)o.ObjFunctionValue)).ToList(); + // var chartDatas = nums.Select(p => new PointF(p.X, p.Y + _SelectedBuild.鐢ㄦ埛鍘嬪姏闇�姹�)).ToList(); + // if (chartDatas == null || chartDatas.Count == 0) return; + + // // 璁$畻澶氶」寮忓湪鐐� x 澶勭殑鍙栧�� + // // 璁$畻鎷熷悎鏇茬嚎涓婄殑鐐� + // var curve = new CurveFitHelper(chartDatas, 2); + // //List<PointF> fitPoints = curve.GetFitCurve(100); + // List<List<PointF>> confidencePoints = curve.GetConfidenceCurve(100); + + // //_SelectedPump.娴侀噺鍘嬮檷骞冲潎.Data = fitPoints; + // //_SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.Data = chartDatas; + // _SelectedBuild.Datasets.Clear(); + // _SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.Data = chartDatas; + // _SelectedBuild.娴侀噺鍘嬮檷涓嬮檺.Data = confidencePoints[0]; + // _SelectedBuild.娴侀噺鍘嬮檷涓婇檺.Data = confidencePoints[1]; + //} + private void barButtonItem9_ItemClick(object sender, ItemClickEventArgs e) + { + + HideAll(); + _SelectedBuild = new Build() + { + factoryName = _facilities.Name, + 绯荤粺鏈�澶ф祦閲� = _facilities.MaxWaterDemand.Value, + Type = 浜屼緵鍒嗗尯Type.鍔犲帇渚涙按, + ID = _facilities.ID.ToString(), + 鐢ㄦ埛鍘嬪姏闇�姹� = int.Parse(_facilities.TerminalPressure.ToString()), + 灞傛暟 = double.Parse(_facilities.Floor.ToString()), + 灞傞珮 = double.Parse(_facilities.FloorHeight.ToString()), + 姣忓眰鎴锋暟 = double.Parse(_facilities.Households.ToString()) + }; + //ShowChart(); + var simuCalcViewModel = new SimuViewModel(); + simuCalcViewModel.CurrentBuild = _SelectedBuild; + simuCalcViewModel.Facilities = _facilities; + //IBoxFormScheme = new IBoxFormScheme(simuCalcViewModel); + //IBoxFormScheme.Dock = DockStyle.Fill; + //IBoxFormScheme.SendData += SendText; + //xtraTabPage6.Controls.Add(IBoxFormScheme); + //xtraTabPage6.PageVisible = true; + + + } + private int ConnectType = 1;//1:钃濈墮杩炴帴锛�2:缃戠粶杩炴帴 + private string HttpGet(string content) + { + Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + var param = System.Web.HttpUtility.UrlEncode(content, System.Text.Encoding.UTF8); + var url = IP + ":8011/datahave/GetData?msg="; + var result = Yw.Untity.HttpRequestHelper.Get(url + param); + return result; + } + + private string HttpPost(string content) + { + var param = content;// System.Web.HttpUtility.UrlEncode(content, System.Text.Encoding.GetEncoding("GB2312")); + var url = IP + ":8011/datahave/PostData"; + var m = new PostViewModel() { msg = param }; + var datastr = JsonHelper.Object2Json(m); + var result = Yw.Untity.HttpRequestHelper.Post(url, datastr); + return result; + } + + private List<string> splitCode = new List<string>() { "saverules", "saveprotocol", "datadownload", "saveparams", "addmonitorgroup", "addsignal" }; + + private void SendText(object sender, string content) + { + switch (ConnectType) + { + case 1: + BluetoothHelper.GetInstance().SendData(content); + break; + case 2: + var result = ""; + if (!splitCode.Any(s => content.Contains(s))) + { + result = HttpGet(content); + } + else + { + result = HttpPost(content); + } + SetOrder(result); + break; + } + } + private string IP; + private void barButtonItem10_ItemClick(object sender, ItemClickEventArgs e) + { + if (barEditItem2.EditValue.ToString() == "2") + { + IP = "http://" + barEditItem3.EditValue.ToString(); + var param = IP + ":8011/ping"; + var result = Yw.Untity.HttpRequestHelper.Get(param); + if (result == "true") + { + SendText(null, startCode + getbaseCode + paramCode + endCode); + ConnectedEve(); + + MessageBoxHelper.ShowSuccess("杩炴帴鎴愬姛!"); + } + else + { + ClosedEve(); + MessageBoxHelper.ShowError(result); + } + } + } + + private void barEditItem2_EditValueChanged(object sender, EventArgs e) + { + switch (barEditItem2.EditValue.ToString()) + { + case "1": + ConnectType = 1; + barButtonItem10.Visibility = barEditItem3.Visibility = BarItemVisibility.Never; + barBtnBlue.Visibility = barButtonItemNoConnect.Visibility = barButtonItemConnected.Visibility = barButtonItemClose.Visibility = BarItemVisibility.Always; + break; + case "2": + ConnectType = 2; + barButtonItem10.Visibility = barEditItem3.Visibility = BarItemVisibility.Always; + barBtnBlue.Visibility = barButtonItemNoConnect.Visibility = barButtonItemConnected.Visibility = barButtonItemClose.Visibility = BarItemVisibility.Never; + break; + } + } + + private async void barButtonItem11_ItemClick(object sender, ItemClickEventArgs e) + { + var dlg = new OpenFileDialog() + { + Filter = "鍘嬬缉鏂囦欢.rar|*.rar", + Title = "璇烽�夋嫨瑕佹洿鏂扮殑鏈嶅姟鏂囦欢" + }; + + IP = "http://" + barEditItem3.EditValue.ToString(); + var param = IP + ":8010/OTA/Post"; + + if (dlg.ShowDialog() == DialogResult.OK) + { + var st = dlg.OpenFile(); + using (var client = new HttpClient()) + { + using (var content = new MultipartFormDataContent()) + { + var streamContent = new StreamContent(st); + var fileContent = new ByteArrayContent(await streamContent.ReadAsByteArrayAsync()); + fileContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("multipart/form-data"); + + content.Add(fileContent, "file", dlg.FileName); + + var response = await client.PostAsync(param, content); + response.EnsureSuccessStatusCode(); + + var result = await response.Content.ReadAsStringAsync(); + if (!string.IsNullOrEmpty(result) && result == "OK") + { + MessageBoxHelper.ShowSuccess("鏈嶅姟涓婁紶鍗囩骇鎴愬姛!"); + } + else + MessageBoxHelper.ShowError(result); + } + } + } + } + + private void barButtonItem12_ItemClick(object sender, ItemClickEventArgs e) + { + HideAll(); + IBoxFormSystemInfo = new IBoxFormSystemInfo(); + IBoxFormSystemInfo.Dock = DockStyle.Fill; + IBoxFormSystemInfo.SendData += SendText; + xtraTabPage9.Controls.Add(IBoxFormSystemInfo); + xtraTabPage9.PageVisible = true; + } + + private void barButtonItem13_ItemClick(object sender, ItemClickEventArgs e) + { + HideAll(); + IBoxFormDataFilter = new IBoxFormDataFilter(); + IBoxFormDataFilter.Dock = DockStyle.Fill; + IBoxFormDataFilter.SendData += SendText; + xtraTabPage10.Controls.Add(IBoxFormDataFilter); + xtraTabPage10.PageVisible = true; + } + + private void barButtonItem14_ItemClick(object sender, ItemClickEventArgs e) + { + HideAll(); + IBoxFormEnergyAnalysis = new IBoxFormEnergyAnalysis(); + + IBoxFormEnergyAnalysis.Dock = DockStyle.Fill; + IBoxFormEnergyAnalysis.SendData += SendText; + xtraTabPage11.Controls.Add(IBoxFormEnergyAnalysis); + xtraTabPage11.PageVisible = true; + } + + public IBoxForm(Facility facilities = null) + { + InitializeComponent(); + this.PageTitle.Caption = "鏅鸿兘鐩掑瓙"; + if (facilities != null) + { + _facilities = facilities; + } + radio = BluetoothRadio.Default;//鑾峰彇褰撳墠PC鐨勮摑鐗欓�傞厤鍣� + CheckForIllegalCrossThreadCalls = false;//涓嶆鏌ヨ法绾跨▼璋冪敤 + //this.gridView1.SetNormalView(); + + if (radio == null)//妫�鏌ヨ鐢佃剳钃濈墮鏄惁鍙敤 + { + MessageBoxHelper.ShowInfo("杩欎釜鐢佃剳钃濈墮涓嶅彲鐢紒"); + } + } + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/IBoxForm.resx b/WinFrmUI/IBox.WinFrmUI/IBoxForm.resx new file mode 100644 index 0000000..0c3848b --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/IBoxForm.resx @@ -0,0 +1,745 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="barButtonItemNoConnect.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAUdEVYdFRpdGxlAExvb2t1cDtTZWFyY2g7cPLoQgAA + AuBJREFUOE+Nk2tIU1EAx30/E+tjEAR9KOhDXwLLHkgPKKSgaJmJSWm+FWuVZmr5Ah+br/UyGIjhdL7m + 1Ot8oPNZU0Q3w83m1MpHpulc07Y55v6dO3SZEXThx/lw7u/HOefeYwPAZvOxJdjtwP4f0HO2FnczYJtP + jXYWNI2hgFKgoJHQoEA+Ia9eDrZQAZZQjty6UQtZNbIuOrQ9YMcSjkIsnYXZbIbJtIF1owk6gxGrPw3Q + aPVY0uiwsLyG+SUt0ipHaMlhe8A+lS9FJKf3v3hUMkhLjtsDDk/eDkG6qIOMoFg2QKVex6Rah8kVHcaX + 9ZAv6cmcnryjR9wbCS05/RF4wB3AwNc11I+tgPowj4SX7QhKrkRgEh8Pi1pQT7ZXr1BDpPqBcE4fLTlv + DzhGPu+FZHYVVQPTCEiswPM6Kd590uI9gSMYAoNZCl7PBEQf1QjKEf8dCGZ3oWdKg1g2hULBMEaWTPhu + NGNMs4G+OSMKawZxN70awpEF+KW10pJLW+ppa8ApMKsd4nE1Lkdz0TG1hm8GM+b0ZihJQDRlQP/0Ks7e + 5kAwNIcrySJacm1K9LYGnK+ntaFZvogLYa/RqtJimKxAvmJCy+d1UCQg+bIKn8B88MkWfRMoS6CO6fU7 + QFf5g/Pk0CqQXtaPWpUB5Qo9asjYOWMEm98PRkg6SruVCMnuoCW3qqij1oCLbzyFV90zyBVILUvN4PWj + VamBeEIDFl+Cc7dy0FAUAS47hXyhTlryKAs+Yg24nr8vxDNqCpmNE+R3leEaswSnAvJw8iYLvv6PUf70 + BoyjHMi4d5DJjKGlvQQ7a8AnVoD4WhVieGNIEiiRTSlR2EIQ0XdiBCnR4WjPuARIMzD8wg9pFw8UE89t + K+DkHcoTn4iohjfheFgVjoVXwYuMXqGVYCQ3Iy6/DREMf7QmnwEk91B89SAt7t4K0NfTmeBO2LUDj008 + CfsY+925UYc8EXx4D1mBjfsvyDJTeKZdoPkAAAAASUVORK5CYII= +</value> + </data> + <data name="barButtonItemNoConnect.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAUdEVYdFRpdGxlAExvb2t1cDtTZWFyY2g7cPLoQgAA + CVpJREFUWEe1lwlQVdcZx7WNTRuNiVlMNU3bmOlknLZjpyaaoKJGFBAVUHFDlEX2RRBCAEU2QQTZFBRU + JBrhIetjeYCAPBAUHsj+eOzw3lNAZN9cUPn3OxdwQ+q0056Z33z3njv3/P/nO8s9dwaAGaxoW/hwUJk5 + wa/+D0y2zRVO+2UDVNjDXxO/IX47we/ewntvYfZEZG3NIiaNvGqACqt8R2O/o/JuU6/be8y9sZth5o0T + CdUc3vFVHMcZcVXwiquEV2wlPIljMRUcHlcr4B5dDjcGrwyuUWVwIY5cFpVa+iWpkgYz8UYDzNm7u0yP + d65VM0e+SIy+4Yf/Eb1DD6alsrULhy+JOkmDZY1pvdHAe7tMvaCobICzF5NQVi9FWZ0c5ROxVEJR0orS + Oil3XUrXJTXjFL8EuxdVNUMkJiiyuqp6GRwu3mJi7xNsmKcYYJWzdxofg63beRjaBnDoHfSFb3IdvPgS + eCVK4DlJggTHEmoIivE18JjAnRHHEBPVcGPEiuEdVwGr4BwmNpd4hwm+ycAcLSN3XObnIzwhDxficxES + nYWm/lHU9j7mkPSMU9P9GOIJqromuP+QeIQKihUUyymWdY5zra4Hxv7XmdgHxPQGth9wwxkStfaM4DBz + CUNR+wPcuDvCkXfnBbmTyEcgpChkUTaMHPkwrstGCBYJ6TCK2kZgGXyDiX1ITGvg/a36Ljh1JR2WrueJ + CzA+HIKb9LKQGswhgRwWJxunhhnZRJZ0CFmtFFuHkPk6LYPIJ1O2Ydwc+LcG5mrqOsM/IhVmzmEcB+xP + 4cad8YazWlhj41ybIKN5EBlNA8R4TCfSGl/EtMZBpDUMIJcM2oTeZGLziDcaYJUfqOs4wedcEoycQmBM + 6NkFIId69kJgEOnU8PWWAeRLB1EoG0SxfAAiWT+KiAJpP3Jb+pHZ1I+kuj4k1/Ujub4fWWTUKiSfiX1E + sL3gzQa27HWE55l4GNgHcehYn+ReTqVeMAQN/bgpGyIx6tltGXjXxAiPK0HwpXxciC1BZFoVkgqbkN/c + g7xmMiDpRWJNLzLoPYvxOfAxMa2BDzftsYdbAA+6h/yx38Yfuy2O08sD4NdSY0RBK/Veco8Ti0mtQIu8 + B6NPnlIz4CK7Z/XnroqQViZHTmM34qu6kUwmzIJyXzHAldcMzFPdYYtDrmHYa+mDvVY+2EH7QiqlMVbc + DWFTH7LFHQjjFaK0+g7u943A+0ohNv8UizWWkVCzj4FPVBFXX1QuRWC4EEnFLbhWex9RtzthHCBkYp8Q + z7fj1w18pKJ1CBaOp6GucwQ7TbywjZYlSyGfDLDenIspRl1TJ0SSdk44IO42ymU96H38FLfE7fAlA6ye + Pa+U3MWx4DTwS+W4WtoBw5PZTOxTgjMg8FR5xQCr/Hj91oMw/TEQajvtobbbAeraToip6oKgphtxNxrB + z6ymff8x1B3icKuhE0NjwOCzMfQ/eYaukVE03+3DNeq1plM8uvsfIOxyLk5FFyCxrA16JzKZ2PwJrZkb + th6dakBJwwJGtn5Q3WEHVS07KKlb4VJxB9LFnQiLLaYx7kaooAbBSeXPxftGn6H7wRN0DDyEuLkLddIe + BF4thuelm6iokeGQBw/xxTLs90pnYp8R7HM/U0nTZYqBT37YbAaDgyegss0GygS7D7/VhiTqgd+FXDx8 + NAqz4Dw0dQ1h4OkYl/r71PM26m1DWz99qO7Rx6sTt6rboOWcCGl7H/ZbnUUMrYy9HoJpDbAJwQx8ukbN + GLrmntigeZBjjZopzhfcRXyJHMeDs/BsbAx7TmThHg1DD4l3UpT3jHDiopp23KpqQ2F1O2WiG5toUrZ1 + DUNL3xe8/HrsdklmYguIaQ3MV1Q1hI6xB5Q0LCn9llBUNcaZG3LEUgrdAtPw4OEoTE7n4TotMSkJt1Am + Klu6kVdxB0KabIwCMiEsl0PHPRmS5vvQ2HcckTfqscOZz8QWEm80wCo/W6Wsjz0Grli32ZzSb45VyoYI + FsrBK5TCPSQdkoYObg54/lKELDKVUdjKkT4RWV1BZRuCE8pwglZEUmYFdpn645KwHtuPcAY+n9Caqall + P9WAwno9aOkexVo1M44VGwwQlCNDRL4UflfyERKRQyecR9juloKo7FpkFLUgpaCJg13nlMqQmNcIM78M + mg+dsHA4DxvvKIRmS7DVMYGJ/YF4l2nGmP1zioHff//DPmzTccTqjSYcCuv1EZAtQ1B2C37OrYfZ4Sso + ENWjhCbbNtdkyoQIscIGEpYjPrcBftElMDqZAQFlIyK2AOs1naDvEIqInFqYeHOT8LmBKMMlUwwsWL5G + G+q0HSuqGnF8t04XJzOlcEttRHheC4ISRNhjEoSE1CJ00BzwiiyBoX82mUmBRZAQvtG3aQV04GSoACpa + RxEVlw0T69Mwd7sC1zBuI/ozwc6FM3/R/fsUAwuXKe7Gpp12WEljz1hOGfHJbIVrShM8BI24mNsEX14B + 1PefgLltGK7ni1FNa7+6uZdLeSS/CDqmAVBUs4Pd0XAkpBXRjiiDmd1Z6NmcZmKLCe5c+PPev71igKXl + 829W7sJGLRtu7BnL1ujgeEYznPkNOMKvh1tSPUKvN+BMehWsvHjQ0PfGChU7rFAmKG7Z5wmjwxegbRUI + pS1H4B96jUzcJqMi5LqthbPKIn/SYbshNwyvG1i4VGEHVGj9r1DShwLxraI2jqU1wSmhgaiHU3wdHOPo + gJpSi6A0Cc5miBGcWo5TKWU4nVKOEEEFfPnlCBZUwsAxHOs0XKC5/SA6E7Ux1l+IXE8VeKguOkZa7GQ0 + 6/UhmL9kuWb3atoL2PJTWKeHZavJgKAJjgkkzInXwSG2lsP+qpjDNroatlFVsOVRpOtDvEp48GtwJqOG + TlXnkWL8NSShG9GbY82ZyHRWgvv6L38kvTkvG2Bfw7lfLVbUXbJMo/sfy7diCWOZJlaaXCWiscI4GgrE + 90Y8fGcYjeWGUQQPyw5E4VuDcb4hlupHYqleFDbbJcDCR4DDltYQWP113ITQGsOyDARv/ksX6c2bNMAK + M8F2Q3ZuZ/s1Wy5/nIY/vQU2078kFhFfE0vsFL8I5BsvRkWQMqTxBxC48asWqp9igP0dscMpGw42JyZ/ + UP9bJn9e2b/AAodVX/wUtHFRl5/qolaL5Qs1qW72ywYmCzPyv2SyU8wQM8JOROxYNmfGjBmz/gXswGAr + R+ZN0wAAAABJRU5ErkJggg== +</value> + </data> + <assembly alias="DevExpress.Data.v22.2" name="DevExpress.Data.v22.2, Version=22.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="barButtonItemClose.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHwEAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iQ2xlYXJfSHlwZXJsaW5rcyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5k + Om5ldyAwIDAgMzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6Izcy + NzI3Mjt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cjwvc3R5bGU+DQogIDxwYXRoIGQ9Ik0xNi44LDE4YzEu + MywxLjksMS4xLDQuNi0wLjYsNi4zbC00LjIsNC4yYy0yLDItNS4xLDItNy4xLDBsLTEuNC0xLjRjLTIt + Mi0yLTUuMSwwLTcuMSAgbDQuMi00LjJjMS43LTEuNyw0LjMtMS45LDYuMy0wLjZsLTEuNSwxLjVjLTEu + MS0wLjUtMi41LTAuMy0zLjQsMC42bC00LjIsNC4yYy0xLjIsMS4yLTEuMiwzLjEsMCw0LjJsMS40LDEu + NCAgYzEuMiwxLjIsMy4xLDEuMiw0LjIsMGw0LjItNC4yYzAuOS0wLjksMS4xLTIuMywwLjYtMy40TDE2 + LjgsMTh6IE0yOC41LDQuOWwtMS40LTEuNGMtMi0yLTUuMS0yLTcuMSwwbC00LjIsNC4yICBjLTEuNywx + LjctMS45LDQuMy0wLjYsNi4zbDEuNS0xLjVjLTAuNS0xLjEtMC4zLTIuNSwwLjYtMy40bDQuMi00LjJj + MS4yLTEuMiwzLjEtMS4yLDQuMiwwbDEuNCwxLjRjMS4yLDEuMiwxLjIsMy4xLDAsNC4ybC00LjIsNC4y + ICBjLTAuOSwwLjktMi4zLDEuMS0zLjQsMC42TDE4LDE2LjhjMS45LDEuMyw0LjYsMS4xLDYuMy0wLjZs + NC4yLTQuMkMzMC41LDEwLDMwLjUsNi44LDI4LjUsNC45eiBNMjEuNywxMS43YzAuNC0wLjQsMC40LTEs + MC0xLjRsMCwwICBjLTAuNC0wLjQtMS0wLjQtMS40LDBsLTEwLDEwYy0wLjQsMC40LTAuNCwxLDAsMS40 + bDAsMGMwLjQsMC40LDEsMC40LDEuNCwwTDIxLjcsMTEuN3oiIGlkPSJIeXBlcmxpbmsiIGNsYXNzPSJC + bGFjayIgLz4NCiAgPHBvbHlnb24gcG9pbnRzPSIzMiwyMiAzMCwyMCAyNiwyNCAyMiwyMCAyMCwyMiAy + NCwyNiAyMCwzMCAyMiwzMiAyNiwyOCAzMCwzMiAzMiwzMCAyOCwyNiAiIGNsYXNzPSJSZWQiIC8+DQo8 + L3N2Zz4L +</value> + </data> + <data name="barButtonItemConnected.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAMADAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzczNzM3NDt9Cgku + WWVsbG93e2ZpbGw6I0ZDQjAxQjt9CgkuR3JlZW57ZmlsbDojMTI5QzQ5O30KCS5CbHVle2ZpbGw6IzM4 + N0NCNzt9CgkuUmVke2ZpbGw6I0QwMjEyNzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tk + aXNwbGF5Om5vbmU7ZmlsbDojNzM3Mzc0O30KPC9zdHlsZT4NCiAgPGc+DQogICAgPHBhdGggZD0iTTE0 + LDE2SDZ2OEg0VjE0aDEwVjE2eiBNMjQsNnY4aC04djJoMTBWNkgyNHoiIGNsYXNzPSJCbGFjayIgLz4N + CiAgPC9nPg0KICA8cGF0aCBkPSJNNywyMkgzYy0wLjUsMC0xLDAuNS0xLDF2NGMwLDAuNSwwLjUsMSwx + LDFoNGMwLjUsMCwxLTAuNSwxLTF2LTRDOCwyMi41LDcuNSwyMiw3LDIyeiBNNiwyNkg0di0yaDJWMjZ6 + ICAgTTE3LDEyaC00Yy0wLjUsMC0xLDAuNS0xLDF2NGMwLDAuNSwwLjUsMSwxLDFoNGMwLjUsMCwxLTAu + NSwxLTF2LTRDMTgsMTIuNSwxNy41LDEyLDE3LDEyeiBNMTYsMTZoLTJ2LTJoMlYxNnogTTI3LDJoLTQg + IGMtMC41LDAtMSwwLjUtMSwxdjRjMCwwLjUsMC41LDEsMSwxaDRjMC41LDAsMS0wLjUsMS0xVjNDMjgs + Mi41LDI3LjUsMiwyNywyeiBNMjYsNmgtMlY0aDJWNnoiIGNsYXNzPSJCbHVlIiAvPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barButtonItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAGUCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iQ2VudGVyZWRfT3ZlcmxheV9UaXRsZSIgc3R5bGU9ImVuYWJsZS1iYWNr + Z3JvdW5kOm5ldyAwIDAgMzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7Zmls + bDojMTE3N0Q3O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLnN0MHtvcGFjaXR5OjAuNTt9Cjwvc3R5 + bGU+DQogIDxwb2x5Z29uIHBvaW50cz0iNCwyOCA0LDIgMiwyIDIsMzAgMzAsMzAgMzAsMjggIiBjbGFz + cz0iQmxhY2siIC8+DQogIDxnIGNsYXNzPSJzdDAiPg0KICAgIDxwYXRoIGQ9Ik0xMiwyNkg2VjE2aDZW + MjZ6IE0yMCw4aC02djE4aDZWOHogTTI4LDhoLTZ2MThoNlY4eiIgY2xhc3M9IkJsYWNrIiAvPg0KICA8 + L2c+DQogIDxyZWN0IHg9IjYiIHk9IjIiIHdpZHRoPSIyMiIgaGVpZ2h0PSI2IiBjbGFzcz0iQmx1ZSIg + Lz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barButtonItem2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAK0DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs + YWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMy + Mzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iTW9udGhWaWV3 + Ij4NCiAgICA8cGF0aCBkPSJNMCw1djI0YzAsMC42LDAuNCwxLDEsMWgyOGMwLjYsMCwxLTAuNCwxLTFW + NWMwLTAuNi0wLjQtMS0xLTFIMUMwLjQsNCwwLDQuNCwwLDV6IE0yOCwyOEgyVjhoMjZWMjh6IiBjbGFz + cz0iQmxhY2siIC8+DQogICAgPHBhdGggZD0iTTIwLDIwaC00di00aDRWMjB6IE0xNCwxNmgtNHY0aDRW + MTZ6IE0xNCwxMGgtNHY0aDRWMTB6IE0yMCwxMGgtNHY0aDRWMTB6IE0yNiwxMGgtNHY0aDRWMTB6IE0y + MCwyMmgtNHY0aDQgICBWMjJ6IE0xNCwyMmgtNHY0aDRWMjJ6IE04LDIySDR2NGg0VjIyeiBNOCwxNkg0 + djRoNFYxNnogTTI2LDE2aC00djRoNFYxNnoiIGNsYXNzPSJCbHVlIiAvPg0KICAgIDxnIGNsYXNzPSJz + dDAiPg0KICAgICAgPHBhdGggZD0iTTI2LDIyaC00djRoNFYyMnogTTgsMTBINHY0aDRWMTB6IiBjbGFz + cz0iQmxhY2siIC8+DQogICAgPC9nPg0KICA8L2c+DQo8L3N2Zz4L +</value> + </data> + <data name="barButtonItem3.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJYEAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3 + RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh + Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm + aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iUGFyYW1ldGVycyI+DQogICAgPHBhdGggZD0i + TTE0LDI2SDZWNGgxOHYxMmMwLjcsMC4yLDEuNCwwLjUsMiwwLjhWM2MwLTAuNi0wLjQtMS0xLTFINUM0 + LjQsMiw0LDIuNCw0LDN2MjRjMCwwLjYsMC40LDEsMSwxaDkuOCAgIEMxNC41LDI3LjQsMTQuMiwyNi43 + LDE0LDI2eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxwYXRoIGQ9Ik0zMCwyNXYtMmwtMi4yLTAuNGMt + MC4yLTAuNi0wLjQtMS4zLTAuOC0xLjhsMS4zLTEuOGwtMS40LTEuNGwtMS44LDEuM2MtMC41LTAuMy0x + LjItMC42LTEuOC0wLjdMMjMsMTZoLTIgICBsLTAuNCwyLjJjLTAuNiwwLjItMS4zLDAuNC0xLjgsMC43 + TDE3LDE3LjZMMTUuNiwxOWwxLjMsMS44Yy0wLjMsMC41LTAuNiwxLjItMC44LDEuOEwxNCwyM3YybDIu + MiwwLjRjMC4yLDAuNiwwLjQsMS4zLDAuOCwxLjggICBMMTUuNywyOWwxLjQsMS40bDEuOC0xLjNjMC41 + LDAuMywxLjIsMC42LDEuOCwwLjdMMjEsMzJoMmwwLjQtMi4yYzAuNi0wLjIsMS4zLTAuNCwxLjgtMC43 + bDEuOCwxLjNsMS40LTEuNGwtMS4zLTEuOCAgIGMwLjMtMC41LDAuNi0xLjIsMC44LTEuOEwzMCwyNXog + TTIyLDI2Yy0xLjEsMC0yLTAuOS0yLTJzMC45LTIsMi0yczIsMC45LDIsMlMyMy4xLDI2LDIyLDI2eiIg + Y2xhc3M9IkJsdWUiIC8+DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barButtonItem4.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAFcFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iSG9yaXpvbnRhbF9BeGlzX0xvZ19TY2FsZSIgc3R5bGU9ImVuYWJsZS1i + YWNrZ3JvdW5kOm5ldyAwIDAgMzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNr + e2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLnN0MHtvcGFjaXR5OjAuNTt9Cjwv + c3R5bGU+DQogIDxnIGNsYXNzPSJzdDAiPg0KICAgIDxyZWN0IHg9IjQiIHk9IjIiIHdpZHRoPSIyIiBo + ZWlnaHQ9IjI2IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4NCiAgPHBhdGggZD0iTTE0LjYsMTBIMTBW + MmgxLjd2Ni41aDIuOVYxMHogTTE4LjYsMTBjLTEuMSwwLTItMC40LTIuNy0xLjFjLTAuNy0wLjctMS0x + LjctMS0yLjhjMC0xLjIsMC40LTIuMiwxLjEtMyAgQzE2LjYsMi40LDE3LjYsMiwxOC43LDJjMS4xLDAs + MiwwLjQsMi43LDEuMXMxLDEuNywxLDIuOWMwLDEuMi0wLjQsMi4yLTEuMSwyLjlTMTkuNywxMCwxOC42 + LDEweiBNMTguNywzLjVjLTAuNiwwLTEuMSwwLjItMS40LDAuNyAgYy0wLjQsMC41LTAuNSwxLjEtMC41 + LDEuOGMwLDAuOCwwLjIsMS40LDAuNSwxLjhjMC40LDAuNCwwLjgsMC43LDEuNCwwLjdjMC42LDAsMS4x + LTAuMiwxLjQtMC43czAuNS0xLDAuNS0xLjggIGMwLTAuOC0wLjItMS40LTAuNS0xLjlDMTkuNywzLjcs + MTkuMywzLjUsMTguNywzLjV6IE0zMCw5LjNjLTAuOCwwLjQtMS43LDAuNy0yLjgsMC43QzI2LDEwLDI1 + LDkuNywyNC4zLDlzLTEuMS0xLjYtMS4xLTIuOCAgYzAtMS4yLDAuNC0yLjIsMS4yLTNTMjYuMiwyLDI3 + LjUsMmMwLjgsMCwxLjUsMC4xLDIuMiwwLjNWNGMtMC42LTAuMy0xLjMtMC41LTIuMi0wLjVjLTAuNyww + LTEuMywwLjItMS44LDAuN0MyNS4zLDQuNiwyNSw1LjMsMjUsNiAgYzAsMC44LDAuMiwxLjQsMC42LDEu + OHMxLDAuNywxLjYsMC43YzAuNCwwLDAuNy0wLjEsMS0wLjJWNi44aC0xLjVWNS41SDMwVjkuM3oiIGNs + YXNzPSJCbHVlIiAvPg0KICA8cG9seWdvbiBwb2ludHM9IjQsMjYgNCwyOCA2LDI4IDYsMzAgOCwzMCA4 + LDI4IDEwLDI4IDEwLDMwIDEyLDMwIDEyLDI4IDE0LDI4IDE0LDMwIDE2LDMwIDE2LDI4IDE4LDI4IDE4 + LDMwIDIwLDMwICAgMjAsMjggMjIsMjggMjIsMzAgMjQsMzAgMjQsMjggMjYsMjggMjYsMzAgMjgsMzAg + MjgsMjggMzAsMjggMzAsMjYgIiBjbGFzcz0iQmxhY2siIC8+DQo8L3N2Zz4L +</value> + </data> + <data name="barButtonItem5.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAAsGAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzczNzM3NDt9Cgku + WWVsbG93e2ZpbGw6I0ZDQjAxQjt9CgkuR3JlZW57ZmlsbDojMTI5QzQ5O30KCS5CbHVle2ZpbGw6IzM4 + N0NCNzt9CgkuUmVke2ZpbGw6I0QwMjEyNzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tk + aXNwbGF5Om5vbmU7ZmlsbDojNzM3Mzc0O30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTI5LDBoLTRjLTAu + NSwwLTEsMC40LTEsMXY0YzAsMC42LDAuNSwxLDEsMWg0YzAuNSwwLDEtMC40LDEtMVYxQzMwLDAuNCwy + OS41LDAsMjksMHogTTI4LDRoLTJWMmgyVjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPHBhdGggZD0iTTIx + LDBoLTRjLTAuNSwwLTEsMC40LTEsMXY0YzAsMC42LDAuNSwxLDEsMWg0YzAuNSwwLDEtMC40LDEtMVYx + QzIyLDAuNCwyMS41LDAsMjEsMHogTTIwLDRoLTJWMmgyVjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPHBh + dGggZD0iTTEzLDBIOUM4LjUsMCw4LDAuNCw4LDF2NGMwLDAuNiwwLjUsMSwxLDFoNGMwLjUsMCwxLTAu + NCwxLTFWMUMxNCwwLjQsMTMuNSwwLDEzLDB6IE0xMiw0aC0yVjJoMlY0eiIgY2xhc3M9IkJsdWUiIC8+ + DQogIDxwYXRoIGQ9Ik0xMywxMkg5Yy0wLjUsMC0xLDAuNC0xLDF2NGMwLDAuNiwwLjUsMSwxLDFoNGMw + LjUsMCwxLTAuNCwxLTF2LTRDMTQsMTIuNCwxMy41LDEyLDEzLDEyeiBNMTIsMTZoLTJ2LTJoMlYxNnog + ICIgY2xhc3M9IkJsdWUiIC8+DQogIDxwYXRoIGQ9Ik0yNSwxMmgtNGMtMC41LDAtMSwwLjQtMSwxdjRj + MCwwLjYsMC41LDEsMSwxaDRjMC41LDAsMS0wLjQsMS0xdi00QzI2LDEyLjQsMjUuNSwxMiwyNSwxMnog + TTI0LDE2aC0ydi0yaDJWMTYgIHoiIGNsYXNzPSJCbHVlIiAvPg0KICA8cGF0aCBkPSJNMTksMjRoLTRj + LTAuNSwwLTEsMC40LTEsMXY0YzAsMC42LDAuNSwxLDEsMWg0YzAuNSwwLDEtMC40LDEtMXYtNEMyMCwy + NC40LDE5LjUsMjQsMTksMjR6IE0xOCwyOGgtMnYtMmgyVjI4ICB6IiBjbGFzcz0iQmx1ZSIgLz4NCiAg + PHBvbHlnb24gcG9pbnRzPSIzLDEgMCw0IDIsNCAyLDMwIDQsMzAgNCw0IDYsNCAiIGNsYXNzPSJCbGFj + ayIgLz4NCiAgPGcgY2xhc3M9InN0MCI+DQogICAgPHBhdGggZD0iTTEyLDEyaC0yVjZoMlYxMnogTTIy + LDIwSDEydi0yaC0ydjRoNnYyaDJ2LTJoNnYtNGgtMlYyMHogTTI2LDZ2MmgtNlY2aC0ydjRoNHYyaDJ2 + LTJoNFY2SDI2eiIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQo8L3N2Zz4L +</value> + </data> + <data name="barButtonItem6.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAGUCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iQ2VudGVyZWRfT3ZlcmxheV9UaXRsZSIgc3R5bGU9ImVuYWJsZS1iYWNr + Z3JvdW5kOm5ldyAwIDAgMzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7Zmls + bDojMTE3N0Q3O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLnN0MHtvcGFjaXR5OjAuNTt9Cjwvc3R5 + bGU+DQogIDxwb2x5Z29uIHBvaW50cz0iNCwyOCA0LDIgMiwyIDIsMzAgMzAsMzAgMzAsMjggIiBjbGFz + cz0iQmxhY2siIC8+DQogIDxnIGNsYXNzPSJzdDAiPg0KICAgIDxwYXRoIGQ9Ik0xMiwyNkg2VjE2aDZW + MjZ6IE0yMCw4aC02djE4aDZWOHogTTI4LDhoLTZ2MThoNlY4eiIgY2xhc3M9IkJsYWNrIiAvPg0KICA8 + L2c+DQogIDxyZWN0IHg9IjYiIHk9IjIiIHdpZHRoPSIyMiIgaGVpZ2h0PSI2IiBjbGFzcz0iQmx1ZSIg + Lz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barButtonItem7.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAAoFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cgku + WWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLlJlZHtmaWxsOiNEMTFD + MUM7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7Zmls + bDojNzI3MjcyO30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuNzU7fQo8L3N0eWxl + Pg0KICA8ZyBpZD0iUHJvZHVjdFNwZWNpZmljYXRpb25zU3VtbWFyeSI+DQogICAgPHBhdGggZD0iTTE2 + LDJWMWMwLTAuNi0wLjQtMS0xLTFoLTRjLTAuNiwwLTEsMC40LTEsMXYxSDh2NGgxMFYySDE2eiIgY2xh + c3M9IkJsYWNrIiAvPg0KICAgIDxwYXRoIGQ9Ik0yMSwxNC4xYy0wLjMsMC0wLjctMC4xLTEtMC4xVjJo + M2MwLjYsMCwxLDAuNCwxLDF2MTIuMWMtMC42LTAuMy0xLjItMC42LTEuOC0wLjhjMCwwLTAuMSwwLTAu + MSwwICAgYy0wLjMtMC4xLTAuNS0wLjEtMC44LTAuMkMyMS4xLDE0LjEsMjEuMSwxNC4xLDIxLDE0LjF6 + IE0xMiwyMkg2VjJIM0MyLjQsMiwyLDIuNCwyLDN2MjJjMCwwLjYsMC40LDEsMSwxaDEwLjEgICBDMTIu + NCwyNC44LDEyLDIzLjUsMTIsMjJ6IiBjbGFzcz0iWWVsbG93IiAvPg0KICAgIDxwYXRoIGQ9Ik0yOS41 + LDI4LjlsLTQuMS00LjFDMjUuOCwyMy45LDI2LDIzLDI2LDIyYzAtMy4zLTIuNy02LTYtNmMtMSwwLTEu + OSwwLjItMi43LDAuN2w0LjIsNC4yICAgYzAuNywwLjcsMC43LDEuOSwwLDIuNnMtMS45LDAuNy0yLjYs + MGwtNC4yLTQuMkMxNC4yLDIwLjEsMTQsMjEsMTQsMjJjMCwzLjMsMi43LDYsNiw2YzEsMCwxLjktMC4y + LDIuNy0wLjdsNC4xLDQuMSAgIGMwLjcsMC43LDEuOSwwLjcsMi42LDBDMzAuMiwzMC44LDMwLjIsMjku + NiwyOS41LDI4Ljl6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgICA8ZyBjbGFzcz0ic3QyIj4NCiAgICAgIDxw + YXRoIGQ9Ik0xNiwxMmgtNnYtMmg2VjEyeiBNMTYsMTRoLTZ2Mmg2VjE0eiIgY2xhc3M9IkJsYWNrIiAv + Pg0KICAgIDwvZz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barButtonItem8.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHICAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iUnVsZXJWZXJ0aWNhbCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5l + dyAwIDAgMzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzcyNzI3 + Mjt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9Cjwvc3R5bGU+DQogIDxwYXRoIGQ9Ik0yMSwzMEg5Yy0w + LjYsMC0xLTAuNS0xLTFWMWMwLTAuNiwwLjQtMSwxLTFoMTJjMC41LDAsMSwwLjQsMSwxdjI4QzIyLDI5 + LjUsMjEuNSwzMCwyMSwzMHoiIGNsYXNzPSJZZWxsb3ciIC8+DQogIDxwYXRoIGQ9Ik0yMiw0aC02VjJo + NlY0eiBNMTgsOGg0VjZoLTRWOHogTTE2LDEyaDZ2LTJoLTZWMTJ6IE0xOCwxNmg0di0yaC00VjE2eiBN + MTYsMjBoNnYtMmgtNlYyMHogTTE4LDI0aDR2LTJoLTQgIFYyNHogTTE2LDI4aDZ2LTJoLTZWMjh6IiBj + bGFzcz0iQmxhY2siIC8+DQo8L3N2Zz4L +</value> + </data> + <data name="barButtonItem9.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAATdEVYdFRpdGxlAFNvcnQ7U29ydGluZzvWAzLKAAAC + xklEQVQ4T22Sa0iTYRTH37KmpaLMvHRx06lbKpVdIAkLSkOcr9Iou1BfIon6tK0PRp+MIMnQvC5LcUrZ + zbSk6GLZ3JqGNZkGCrYMRSMtMiSd25z27zzvbEH5wI/znOc557e95325cr3JWFnfAUZFHcOMcoqMMr35 + L7VmlBJXqtuNHMf5AOAYHLt0u+cFZokXnUPe3O3+hdaOIeH8D8XVJurilnsFJTWv4XTNYcY5B4drHlUN + 3XDQnuUMHeWevVs4v1xlZAKRV1B03YSGlj4qtEB3k9G9gAWVNzzoFiKjoNLABL5eQeHVds8vzrhhJ67d + 6sa0w03MYooor3+LaTqfIli8UPqKCfy8gosVBkFgpya7Yw76xl56JPZ3XSR0ou/DGD2ap5mdd1mHmSCA + 8Kw2jQL9+lx05qd4+WJ9BnXBHii16yjuFvLRN40wP9XhQJ4c21WhqdTqk6mN5LjW03GY/XwHTluxgOns + Dti/9YIu8cNpgVIjwc9xK0YGDTh1aSdsY09w6Fzi+Ma9ITIm4R4fl8E1XCs0O4g2dTKmvvYgUyPF4KSe + RFKM2ow4U5QBc38N+ibK8Px9Pni17F1E7MoQ7naOpL35iBTNh6VoOijB/RwJBl7epcYo2CZrSBSFwoJc + JKnEtI+GYeSkcJe0T4yE9OA8NgY/gg0lkAgiVhHRPBX3T5SA18rY0OKJBF4jw6NP+2k2wtlqYoXwKryv + hL6w1BOSPFbIa2OE4kyKvDYOu45Gnuc1sWgZzBbuqDaY18Rx/wqWBoaJwrapwq0PurR4+DELzV1qbFVF + 9ASIRXJeK0eTLYMEclYspvifgK1laxL841OOrf1eZ0kDixHr/RPpPJTXKnBvII0ECkGQpVEsKlhCiGTb + g9I3Z4dPxiQHKyn3JQI2KUM7tqjCsUEZ1slyXkOjWUTAliAh2HBZZLkPwQYtXoiUc9xvGHI82GLBhXIA + AAAASUVORK5CYII= +</value> + </data> + <data name="barButtonItem9.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m + dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAATdEVYdFRpdGxlAFNvcnQ7U29ydGluZzvWAzLKAAAI + c0lEQVRYR8WWCVBUVxaG0SRq3MYYgZgRUascIyARESFj1FBo1BGMhkTjbiJx1KCCO+KCohHihoIgIChE + ZVUEN0QIKs2OokbWsKmobA0CDd2A1j/n3O6GNoXOODVVc6u+Pve+9/r+/z13eU8LwP8VrYN+NwRUumjQ + 9X+A6MvtWDwFZenUwAHfRL7HD79DvEd0I7q/hh5vAffzLsFmROnUABUhvt393JR9XnFZ7t4JcPeOhxtz + TMk+wXWqXxf1n72ud+DJxAn2auDqcTVr467TU6lvNsEabzTQjTqrKH4oRUvrSxUvBAqqB0dmiWuKFmq3 + UFTV5URwRCbkCmW9HUUb8oursOvw1Urqm7MhsvA6A3yzx14aSWsbd64WYXGuv0BQZKZKXFOEYxuCIjJE + vZlEm/8UXQ7HskJPgqf3jQbedz0SqzTwGpFmagtE50qBJiIoPIMiteXKdpNG3HHwCiv0Jt5ogG/23OUR + K9KsFm4mYU4lC50iERYVQnyNOheC8hc4GUYGRF2JrFkF1bf9cokV+qg03mig185DV3A5IU+IvQIJKOvp + VGcySDT93xOaBmf3mP/YQO/tBy6L9CvTR5FHo+IkGRB1MbLW9lE2NrUikMQaRV3ZbmxuRQNHYsvP0azQ + l+Cd8NoiDDhTujj9TSwgRDqEeETKNnfchvqmFhJpwfPGFgSEpFBUoF5GbYLF+R4/s2nPBTbQj+DzRWzF + zgob6OO0L0bMPY+AESNU1QMpncqOW4WQMNlEog1NSMsqxvMGGRpkzWSOTSnICD1H5pz3iQx8SLyv0unU + BN/ou2XvBbHAlELqSFBnAWyAonrUDTI5vKJXYKPfZ+14Rq0Qhmrr5SITtQ0Kyk4S/m49aPQ6H4vH36wZ + OZx0RCbWeVtoOQrMWV/Mz182up7Hpes59Ke0dk6EpHbUz3I9Ff5nkpGa9Qc2+FqgTp6j4gHW+1ggJbMQ + vr8mw+90CkKjbyM69jZW7jeNufUgAKsPmV0mnV4qvS4OnuO01np2GOi3fvc5sfA4xfU0Wk4jj4RHzOIc + 66gtfd6MaulzkHuU1V1A2kMXlFJ0PGaOqpo6VNXK6Bk50YjjZ/3gFWWHEmkUfGJWYLGz8RLSEtNh72Gm + ZX/YjPWVBhx3Rop5ZyFN6gg2wJGpIQMstNbLHKXS80gr20nxHNYcNUdFlRQVNY2Q1snw6MljOB23Qf6T + GKQ/dEXhs0twPDKhwniC7iDS4xdb11UHOwx8sHZ7OC24NtQ1kBCjEqylReVPKeU5ratX0AibUFEpxeoj + 41AsjUBq2Q6K4bA/PA7PnlWTiXpUVtciMGYPolPd8fvTY0gu3Ya7TzwRQ+2lLibBpKfemmJR8sLov9o5 + TGwxFq9l6pULqZZEeU6lFPlapVSGiooakHsUVYchhTovqg6luTZD+dNKYS79ngS7TtqipCYKkpKtgis5 + y5H5yAO7A21fzrAbYU2a7e8INvBhkpMhkneYCSTquI0ZC4nzWCSpuOFkivsXPLDiFzMUVp2hzp0pnsZy + t7EoSLuGwvRYOB21QXZxKFJLd+Nm0SZE3VuM0Du2iLy3ELfyPPHDLrM8ncG9PyZdngphYMCNDSPRVpOA + 1ifhaCkPQ6sglOqheOC/EC2PQ6F4GAJZyRlUlibBbu9Y5FcGI6l4C8UgLNtjirI/7iDkohtOXdkszGWX + HyWDLjibOZuMOONGEWWj1BW+F+1h62DkRrr8ohIGtBMcPkEricgLPSAv0CD/MCRbx6Mp7yAac/ZDmu2G + xzkX8b2rKXIrAsQIcypO0NyOQcH9W5hm9zdYLhmML5boYdEOE/xWtBnBGTZIKNyIhdtMMHGBHiYw8/Va + Bw7vraM2MODayuFQPDoLOQkxzbkH0ZR7ADISTdz0GWTlCagpjkN57kXkpYVi8Y4xtMB8EZdvjzvlR7Bo + uwnuZcQhNztRcDf9GuY7myCuwAEn06bhWv5azNsymk/GkQSnn49oMQViF0QvHVbxJH4nFKW/QlES3I68 + +BQyDsxF3SMJfnAxF6NYQB0z8YXrEZQ+A9fzHTFvqwnmOY0WLNxqisykS5i7+VNcyf0JAalTcDl3FeZs + /JQNDCY49Txw8aXEPz33Tx+44Nx8/eqo+fo4z8wbgvPf6SNy7mCEzxmMjJN74OI0C3tOLERBdQgKqkIQ + m7cagWlf4iqJ5NFCzCVcab3s3vsjJJfC277dYIyYnB/hl2KJ6N+XwdbRmA2ozwHegmIb8g9ngY9JfnHo + Eh+pGKiCU6b/7ntdTSy+/mtRQMJ8BGVY40SKFfyZZCsEpk+Df/y3sJg9qKxbj3c+p+fNZjsY4/z9xfCR + TMQ52gGz1ox6xcBX9kYUOpxwJjgt/Dn9Z/gPfIQOGGrSb9bMVQYvI7IXwFdiSXyB45JJCLk9B1+vNXo5 + dMwHi+k5Fhk+c/UohN/9Dl63xiMsey5sfjJiA3qEMGC90pBCR1EbeR1skP+oM2qybvAm74k4lf4PeCd9 + TtMwFVv8JsHISjeC7nPGeIENIQGcvW2LozctcCZrNmasMGQD+gR/KXeZ/k8y0NlnkiYahU3wydWrr3Z3 + A/Ov9J75xFvDWzIBvr9ZY9zMQdV9BnTnIfEnGE/nkOnLDRGcaQOPRDMxZdOozdcJYWCqncFbGeDCJnia + +g8z7b+SDhMx+m/WGWGoaX8Hus5riKeMp0v/SzsDsTYOJZqK56YsM3jFwOTv/zsD4jOe+HjkRN2rm/3M + 8ckk3ZvU5nnn6+qp0iMB+KdOhl+qlcBqqTDA21AYsFpCR0JnoppoFqPJvDHap6KP9pBepoaWuk91hvUe + x23VdXWWtEdM0JEYWH4ENSPG6yTTdT79+H4Xy0VvaUCjsIh66/KCa//SUcFG+G2nTfCiG6aKLN7+FtTS + 0tL6FxudlmdoalhCAAAAAElFTkSuQmCC +</value> + </data> + <data name="barButtonItem10.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIYFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzczNzM3NDt9Cgku + WWVsbG93e2ZpbGw6I0ZDQjAxQjt9CgkuR3JlZW57ZmlsbDojMTI5QzQ5O30KCS5CbHVle2ZpbGw6IzM4 + N0NCNzt9CgkuUmVke2ZpbGw6I0QwMjEyNzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tk + aXNwbGF5Om5vbmU7ZmlsbDojNzM3Mzc0O30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTQsMjZIMlY2aDJW + MjZ6IE0yOCw2djhoLTR2MTJoMlYxNmg0VjZIMjh6IE0xOCw2djEzYzAsMC42LTAuNCwxLTEsMWgwYy0w + LjYsMC0xLTAuNC0xLTF2LTZjMC0xLjctMS4zLTMtMy0zICBoMGMtMS43LDAtMywxLjMtMywzdjEzaDJW + MTNjMC0wLjYsMC40LTEsMS0xaDBjMC42LDAsMSwwLjQsMSwxdjZjMCwxLjcsMS4zLDMsMywzaDBjMS43 + LDAsMy0xLjMsMy0zVjZIMTh6IiBjbGFzcz0iQmxhY2siIC8+DQogIDxwYXRoIGQ9Ik01LDJIMUMwLjUs + MiwwLDIuNSwwLDN2NGMwLDAuNSwwLjUsMSwxLDFoNGMwLjUsMCwxLTAuNSwxLTFWM0M2LDIuNSw1LjUs + Miw1LDJ6IE00LDZIMlY0aDJWNnogTTIxLDJoLTQgIGMtMC41LDAtMSwwLjUtMSwxdjRjMCwwLjUsMC41 + LDEsMSwxaDRjMC41LDAsMS0wLjUsMS0xVjNDMjIsMi41LDIxLjUsMiwyMSwyeiBNMjAsNmgtMlY0aDJW + NnogTTMxLDJoLTRjLTAuNSwwLTEsMC41LTEsMXY0ICBjMCwwLjUsMC41LDEsMSwxaDRjMC41LDAsMS0w + LjUsMS0xVjNDMzIsMi41LDMxLjUsMiwzMSwyeiBNMzAsNmgtMlY0aDJWNnogTTI3LDI0aC00Yy0wLjUs + MC0xLDAuNS0xLDF2NGMwLDAuNSwwLjUsMSwxLDFoNCAgYzAuNSwwLDEtMC41LDEtMXYtNEMyOCwyNC41 + LDI3LjUsMjQsMjcsMjR6IE0yNiwyOGgtMnYtMmgyVjI4eiBNMTMsMjRIOWMtMC41LDAtMSwwLjUtMSwx + djRjMCwwLjUsMC41LDEsMSwxaDRjMC41LDAsMS0wLjUsMS0xdi00ICBDMTQsMjQuNSwxMy41LDI0LDEz + LDI0eiBNMTIsMjhoLTJ2LTJoMlYyOHogTTUsMjRIMWMtMC41LDAtMSwwLjUtMSwxdjRjMCwwLjUsMC41 + LDEsMSwxaDRjMC41LDAsMS0wLjUsMS0xdi00QzYsMjQuNSw1LjUsMjQsNSwyNHogICBNNCwyOEgydi0y + aDJWMjh6IiBjbGFzcz0iQmx1ZSIgLz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barButtonItem11.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABV0RVh0VGl0 + bGUAUHVibGlzaDtVcGxvYWQ7vRo+wQAAA0xJREFUOE+NkmtQjFEYx18ll0Qm3VzGbZkdY3zRjDGmsmVT + WkmjMCRUk7JNFzWYXZrKZlW6GEO1KqUmtLpIpNow276xy9q0UdtFJSlUHzKUpfk777Y0fPLM/OacOef5 + /+Y97zlULq2iAFCkTMSF2zZmV3tVJN0MGrhQ0QJxefOHJKm6IliU4ED2TUvkYiqP9JM9Q8aYo2bsDIwx + 94/jJ1yU7tYre1Kg6W3EqH4SfV/0KKFrEH99j/7iLW4i22HJHKZfJNX8JZi591R4jrC4CrebUjE60YrO + QS0+jv/EEKF9oBmyN5dR+NgPx8UcCek3O1OknBb4RLDcAs66I00mg6LjJdTdNFoHdHg7pjfQOfoNyp4W + 5D8Jh/Dadrj673EnEpNpQRSrTFzKw6kCIdRD42j+NA7t5wloh6eQtz0lR7oPeX8kcmW+4BxwKSeCWX8E + bsHrB1PLvXEiNwG13WNo7P8K+j2h/xvkvZ9RpiiFTFOLx7pMPGwRITaZP0oE5oSpcjoYqD+UeAzCSgWu + KodxTzeG+x1juNkkQ15NNqqb1egcHkexLA0FNfFoaKqbJDELjyjrKYFnROFQmOQ5jhdqEV//AemKT8hX + jyBNmokG3Tlo+2hUKYoQf8MNEelOkEgl30lsAZdvNSVY67y1yis8AH6iqzh8RYXI2x0QPHgPfnYmapT3 + oO6qQkzWFvQNy9H1sR77BBt+sB3nrSNRE4Ng5WZb7037VyI01Q9e0UfgLTwPv2Q5rtV1QP6qC9GXXPGi + qwTtI/l4NhAH2as0uATZqO3Zsy1JfAbjsGBxlpZyjq5F5KUd8BWchY/oEejXg4iThJL7DwH9Lg513Xzc + bQtAsWYnku/wsGmfZRHJzmIEpuZWc+1WOS7LYbt6TO4WVCIwoxGq9kHwou3hGW2HXScXQ/SIRf7RavBO + 2IMXZQfPSDvmGc6lDp45zUiY81hYrV7vyeIKGtg7RCN1dBtKH6i+p2SV9fBOL0K2aguED5fDPdyWCS5h + +gmm1BoPEbXCOYjMDecxIywgMHdkaxyXusdYIYN2QGz1YnBDbRjBQpdjNmQg9ftF/QtT3DBDk7lz2MJG + lxBbMDgGWCvImgUn+D8ExjIlMJ+7yMh84xopivoFgGMSVvyHHV4AAAAASUVORK5CYII= +</value> + </data> + <data name="barButtonItem11.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABV0RVh0VGl0 + bGUAUHVibGlzaDtVcGxvYWQ7vRo+wQAACu5JREFUWEeNlwtcjmcfxy9z2Jxm48WY2MjezdjLHLaclrN1 + UHSiUtFhJfVEOnlS6emg0tOBklRWKpRU6qmQHNuSDjrTSkjUekSlIey3639T45137/6fz/dz3c91Xd2/ + 3/W/TndMS5zK1rqdYIYSGTPxSWLr3W2YkasaM3FfxUw9NZmFz2q2OVDEnKNTGY8+/wvXQ4XM5ccCZhPs + x6wCdjKbsHPMKjiPme8+zTbsyhHeTzo9AUCAaYvTmIpLMjP08mLiGHN2qiyA1bfFs5sPk1hjRwr17RF5 + h9OX0+8tUD21E31yK0KY4wExW+d9nGm6pTN1rqHqcpytdX+LgdWOIcwq0JxFn3JkxY3B7GKDEzt7YzP1 + 6RHua7Zl3qCkHAeNQxlOUa4RhiX2e+2bPA/L4H3sapMkqbjELb4gepP/dk0VnW+G8P5kSDDietCO6UkO + Mw3XdKa2nWfaI4NXv4xeA2qblrLcSi92ptaBZVRtYCdrLahdGPHcZePf25emaR17Wrc5o8gMBQ1uuNF2 + COVNcYjO24oLd9qRU9eKA2dz4bTPEO6R+s1Rmdqb53ynMJD/PWWlz87YzWytZxRTJwNvy4Cq5VJ2tHgt + Sy5Zy05UGlGbMOqdEcqT9mdqlCX/tB6FTU6obpfg7uPjaH1Uha6nD/Hi9xd4+uJ3yJ88Q1VbF07dbEbM + +Sz4xOvj4Emd8h2hiz/j7+nPeWdXojVb5xnwdgMqlkvYoUJNllSiS/Uk3s9j/3dKYWkqzZlXzVHyqxjV + DwLw6Fk9up934enzJ+h+8RzPuDjR/Qr5426cbmhDSKYrMko2ISZnTYtnxOL5/H2CCb2dUqbH10NP9Br4 + 3nwJiy1YRXXCyK29Zk6UJi1tzSwzRUGTA0p/dcej7gYu8hBdTx6gq/sJHj9/8SbPXuA3jvy3bhwtLUNY + lg3yam3gFqkiV9ZbNJm/l0z00eFroSd6Daw0W0y/hTmfpzJ2qCRuQXlivi7ONdjgp0Z73GpP5wLNXKiF + l3Lc72xFZ/fzP3n6HB0Cz9DOp+PyrduIyLZHarEd7MIkMJKkVkyasewD/n5hTZAYRa8Bva1L6Tc19Hfa + N0ssTVuGnOtmOFO/CRdv2UHeVYaW9no0ttbhjryOP7ei7fGzN7jPR06jb+16iprGcuTXB8HrqASBp6/B + TJoLbedEN/7+dzm0O4ToNSAKWkS/+85V/Wi4y4HZLQmXtSGr2YBTtRZIvmKFursVuClvQVPHE9zl3Ovk + PHqC5s6n/Jl4WU/tt9seov5eOUIzrOGXcRhOkSawCQ8Bn3u54mzVkVyHtqiQhV4Dryr6m3t/sd4zQQnJ + pXpIr1iPuEsbITnqj7ImOerkXai/34WGtt9w88FfofobfCdQv9LbdyA9eQZu8R7IKvXC/qyt0LRdgQV6 + c024DmXhLwYoLe9a+H+e6J+6EIlXtJBydR22RRgj6GwdZNXNqLjbgarmDlS3EJ2o+ZV49KrsFOqoveJe + u9B/V6YMIWm2yCi3RFqxFd8RZrDfvegI1xn0Su+NoIqBZr6Tqx0iVsLCXw+bgwxgt2c9/E9fR+j5Opyv + k6Pw9gMUEY0PUHznYS9FjQ9xhdcV3moT+lF/54NiJF+251nURthJFbgdUsIq23G1XGcohxbjG0EVgzVF + M9p1d3rDOOQcbGMLIT5eBomsGrtOcRPn6pBVdU8QuFAvx8VX0DNB9VlVzUI/31PXcCAzFHnVwZCV7ERK + /nY4RX2NZRajOrjOMA6tgzeCDAzRsP0W7rEmMPR2h3nEJWyJL4Jrajk8uQnvnGvw40Yi8xuQVHIHssp7 + yOapzuTl0ZJGoZ6MSrJrsOfsdaRfPIbgdF3sTlmD7MIweMarYoHRhzThtB376Xt8ynTFn5C2EGRg6Hem + 4g5RiDrMfLVhGHgCP0Tmwy6hGM7HrsItvRKemdWCgFdWNXxOXoMPN0V48zpJVo3Q7i2r4qfgLYSneSIy + eyPHDHtTrZCQ441FxuM6uc5wTr/O7l+YlvME0hbipQGLg7VajiawDV4NXa8IGAafhcX+fNjw6dh2pBTO + KWVwTavAjvQKuGdUweNEJS8r+e9KuPI6F240Ib8e8WcvYsePi/mdUYyWzp+wPVoZ+5L84OBn1Mx1BAMd + T6uZpoMCaQtBi3CwknHEMZUtvjwDatDa4QJt35MwCEiAsY8IG/22YFNkKrYkFsP+SAkckq/CIekqtnHs + uTm7hCJIsyqRdLEaDhGaKGtIQXOXDHXt4Siqj4J14HKI/V2LuM4ITr8HT8qZ+tZxpC0EGXjvay1f0yXW + CVB1joCGswt0XHRgGbAGQSf0ECrThyhUFxsCA2ER9TMsowtgFVMglBYH8rEt7jKOnK+Bx0FnHD23Ay1d + uai5L0WF3Bu1DyIQn2sPfZflBVxnFGcAaaqIPubFyxAOohGfzhmrZBJ9X12cjqWOKVjtaAC/49/DN20+ + AjIWYt8ZDYhjtKC/czP0A+Khz6dIPygPhkFnEJVTjqCkRLjHqPFT8iyqWoNQfE+MIoHtuN4WDYewpS/m + 6oxcw7Xoo6Xvis1jSZuxr9ftp0LYCTO0/L0Wb0qApjgcJpIVcPzxK2w7OBWOsdPgFPcVJMnz4JGgAlOf + VdB298Zqnxz4Hi1E5Il8WPgtQM3dVC4eikuNdgL5VN4W8ectKLq5B1qOivcUpg6m2/E9DmW+D5uuF8FL + IQsDhoyaPGaW/r7rqxyjYOShBouQSfghVBGWexRhtZeYDNuIKdgeO4dPz2KIpB6IyrgAKz89ZBR440qT + H2S1G5D9iwlO3zDjmPMvJhNkXDPAiRpjJJ4XQdl0dDbXorUgTAX7Sjecl4IBysKg8bMNZs4y2H9f18UT + G3wXwtB3nMB6XwVeKrwsfRQg2jsTh09J4RZuCe9YHRQ1SZFUro24khU4VLIS8aV/Qr/jSpYjs8YMLvtX + YLb2CAeuRYdSfzZNO5yZSPP4s2CCTqkhisq2qjP1w1u17C1gLZ0PfcnHfGeM4ozGGtdRAiHJIoQk2sPM + 6xtcuR2GzGq+30tWIbFUA4evaiKqcBGiLisLz4mlmrxNHfHFapBV2ULHecrjz5Xfp6+lgYIB0+BzAq+Z + GPrxdJ0507UDaxYZ68PMZy4spRNhQEbEo6DuMBwB8fZYL56FVXYToC7i2I2Hmmg8DNwUEVP4PfZcmisQ + U7gShu6ToSoaJ7SrUX/qazO+jOsMFgxY7Dkv8MpAj4nBAwYNH/PvpeZu01Z+Jl9gNAxaDqOxwVsBVgFK + /HRLxbHcbBySXUJkSj6C4nIh3n3ksa6LIo5VGGF33nQE5M1A+KWFWLtdkY7hLznjOWM4tB1pCgYIBizD + LvbCo8cErQm6v4cNHDZIYcKcdzdOVn4/6Ysl46qnLp8u/492MKZphcqnakprPleVHJugZG79wYgxSmu2 + TeKp1oFXzpfwOvklpHnfcOOCATp76Takd9ICpEG+Ixh4GzzIBG0V6kjbhvYvHaXk/iMObWQazWgOrep/ + cT7REE1E1M+qcMv4DG6Zk/m9MR2adhPJAB199J6eAfbwf6OnI2WEzNAXLo2gZyQE1dE/Ix+pWn+KPReU + 4S77gjMF7llToGotGCCzwhdRVu0mtuKHP2/Dfxqvu/5vKFNk4sO5hiN/nm8yCvNMRmKeMYeX3+qPpLml + LAmf58obx7JFpq+O4p5vs3/K34Rwp3Bommh66LqjRUdKJE4Zoj5vxttE/o6/idczQakmMwQ9Ux21UZ/X + grE/AKH/djUsnEiBAAAAAElFTkSuQmCC +</value> + </data> + <data name="barButtonItem12.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACl0RVh0VGl0 + bGUAU2VuZDtCYWNrO0FycmFuZ2U7T3JkZXI7QmVoaW5kO1RleHRP0ZB1AAACwklEQVQ4T43SW0jTUQDH + 8aNplpkmQVEvvRT0Uu89FKKYEVgRlS9eKWc1U7Gm8zKna6YzdUrpSp3TVipOTaymecnNoRs4zdKCLnjp + 4qXUvG5uCb/O+auh+dLgw/n/x+98n/5ErtTp8ko7IGeUjB65JXrkFDM6ZBe1UzpkKlr0hBAnAGQ9wob/ + 88soaKFr4kIfNwZkijZ6Alb7Miy2ZVhtvzmWpY3S8ppYYPvaxTVEeq+ZnsAiHd0tMyNLZYastJuTqezG + gsWOeasdouznLOC6dnENSc1tpCcwT4dzzKIdsxzbXzP0PT6jngXcRI/fkORHfSSxvI8klL0mJFHWwAVm + Fuy4/cAEicKENIURqYVdEN/vwvS8jRObVsMCHpSDsLSHxCl7iKDYTIggvY4LTM3Z/rGEydkVP2eWcENU + hci8tvcxBZ3Jx/zDt7JQdKGJkBixhguwUVKeAYlyAxLkHRDm6BFPTfyyYmLaiqvCJ9CaB5Fd+w78fIPh + 6IkLLixC+EmVXICN2HicnszY1Ipx7rTg8q1yaLqHYPo2D5mmHyHSxhQa2EJ4cWouMEpHo5MUvcCZtOL7 + OqExKjzUf4K69wdqescRJGkeoQFnEsgvNITFliEsVsWNQmNKEbIqOFqJoKgVPFEF8l99RmHXGIqMYwgQ + ae00sI0iOyhPavc6+y4JqyfE1T1If9YPacMA7mg/QNY6jKzWrxDXf8RZwdMvdOey4aNgAiXN9H/idF5Q + nRmR3wnpyxFImkaQ1jgCsXYYKS+GEJqlgy9PJaU7502Bi0laFnA4cMRnl39sjTEwsx1R6gHE1Q+CX/4W + AZJW+F6rMHrsPeTOdpsC5wQN5MzNehZx9Nx/eKf3lRLxyeuV/X6RGvhEqAeOBytS3fccZJcdvSOqyKbA + 6eg6ciqqlvhF1rCIA8U+GlfKbfVk745evEriFV5J/gCx15fGwujYhQAAAABJRU5ErkJggg== +</value> + </data> + <data name="barButtonItem12.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACl0RVh0VGl0 + bGUAU2VuZDtCYWNrO0FycmFuZ2U7T3JkZXI7QmVoaW5kO1RleHRP0ZB1AAAINUlEQVRYR6WWC1CU1xXH + QRGfEJNojRYnKoyabgU6TDvFEtkmTpIZ06adJJ1J1RrfGJUIiA9EREGIiDwVEJCHyMtWHgpUeQiCoMHR + tI2PFFggvFmeC7LsAuu/59xvl6Bdq5Pemd+cy/J995z/Offc+5k8M0z/TyY98/f4AGAUwzC8PJkwM8IU + I5g/w9Rn4GcMARl1zvAQzsMTK0ojkysRwSQRiTcRziRUIGyccoSdK0coE1+OkLgbOCUoEzY49gZOxpYJ + jkdeK6N1ObCXCsCMnT15Aj1PJlgJnTF0/82YHv/IQl59OsFZMOqc4cEBmLNCdjQypiPGMDKqg1YwNo5m + hCyhGRkV82EDWgOjgjGdDkfDrvLqswguq1HnDA+OcGoIpZRVjTtlZ3qn4w4NjuhvdqSmuVpvhzRkNSPC + jpIIn1P5vLoF8VIBTAumunEAksMxRGVUE3dwJq1az9c4bSBVIvLCbUQQkSm3EJFyG4+HRzA4PCqy6H0y + j1e3JHgTG3XO8OAApgedLRU15JSyImXPEPF43HYa6GYG0UG2Y4Jt7xrEoHoEA0MjIosHAi/z6q8QLwyA + UzTjRNR1sXlESimNkamkTKgjlUQ4qQw/z1QhLPkWQZa6JZQISZQYoABUQ1rKoA77AnJ49VeJlwpgVuDp + EqrdE6oh13HkKXUdpI4VthlQ/kCrcgCtnZLtf6wV8D7x8LvEq79G8Hlg1DnDgwOwOB5ZJGo3yHUkJaFJ + VZI6VikU3sSphJsI1nMyvkIQFMeUIyi2HH2DWvQSas0Y3Hz/xqvPIV4YAKfI8lh4oWg9TiPXUVInKWvp + fJrmDkJvmybQO6BFz4CGMjgGV5+LvPpcgg+j/zk4gNnct9x6KnLOaRxXSO15gtQF0UnH9sTZG/iKCIwp + Q2C0REBUKQKiS9Gt0ggG1aPY6Z2ByWZT5pubz5gqk8norPGVvBkZHMCrR0Kuig5g532EUKlX9r2e8Xn7 + DzS2q/B9mwqNbQPo6h9GV5+GMjiKHQfTMX2m5Zuvz19s8dZbK82WOKye5ODgYNo4oDVpUGlNavo0knca + XKPXfYILxObhNPZSGllhAKsjjjOk0p85Uwq/M9clTl/HscgSwdGIEij7htHZOyyyuH3/BewOKXjgHlUW + 4xKY5bDU3nm6TCY3WySXmyoogNp+reSdBgcwxzsoX7RfDwXAaRQKSRXTKBRKNLQS9Fs9W4JtfYtk2XlH + r1pkcatnCgqqv0NmZQP8M/+lcTtT5mNjt8piiYOTuZWV46Sa3qczMNfrRB6dZKPoUlEaKZWszk+vzqDw + aEQxfMOLcURQhCNhRGgRfIjDREfPMNopAO6EzR7JSLv1EFVNPbivfIzYwjq4R1eVOn247SfLfvEbc2lf + SIN36Tw+ubj9OI1KqqNQNk4/FC2MSqKZbT/qmhkV6pqkeVuPWtCj0mKTWxISyr7FlYedKKrvx70ONaIK + /o0vQktibVY4Wy6yl/PeE0FwAG/sC8gV7cdp7KQghDrCoM4npFBw+NQ1eLMlvGl+KJj+Jti2dqsF3f0a + bNiTgOjifyD7fgfya/uQV9uPyqYBHIiv1n3iFuO8fLmc9oRMXNX89bLA0z9H1I5ryLRTIO2siBZs6x6W + 1Im5RGv3EFq7yHY9bVvIKimAv7gmIOLaPVz8pg05j3qRrSf+ugKf++Ul2Ni+/Yqt7XvipuQArDz8ssVJ + 1k51FE4mOmQH5LBNOJVood9b9A4NtllJc6VaZHDd7ngEX6lG6t02/PV+NzK+7UZcdSfib7dgY0ChwtrO + ea6Dw2pxSnIJFrgfyxKbR7QhdQF3g6EjBKSK4T7vIivtFalcUvtp9F0gsW5nHAJzqhFT2YToW+0IvtGK + oLJWhFW0Yv2xokFrW6f5Mtn74pQU58Bmj4SKL7wy4HIgnUijPk7D1n0XsM3zArZ4nsfmvSnY7J6MTcRG + 2mAb9iRiw5eJItXrXc9hPSlm1Wt3xWHtzlis9UjC3vS78Ltaj4CSJgQUNwuOFzXhM5+ramtb+U8pAM6+ + 9D1A8MWxkFisZ8kErA2YmU1ZOtPyNYc/up1r3R5VBJfYUqIELjHF2BpdjC2Ey9ky7EmphlfOQxz5ewOO + Fjbi6LVGHCG8cmrw8f7cBirBAiqByAC3AgfBmZimhwMyysyZsy3mLbB+4+O9qemucbfhlfsIB3OI7Ec4 + QOzP+k7MvS7XwDuvDj759fAuaKR5Aw4Ru2LvYM2u8+nLVzjNpU0o9oBhcCAvZOHChZNtfr5y5nufB72/ + wb9I531FgcMF9Tic3wBv4tCVekKBQ5cVFEQ9DhIHmFwFPLPq8MmhAp3Tp76/X24vtxRtaOyOfh76YWpv + L5+yfIXznI/c0tM2hVTgIDllJ/tzJfblMAqBR7YC7tl0ChKfBZRi9daEDHp3Aa3B9Tc16uh5GAZHvtTO + cYbtyk8Xrfkys3LdVzfgfqkG7lnkjFS66dlzScI1swZ/8r+Od7clfy371R+W0bsWtAafAT8uABqmVo6O + dMU6zaILxuqdTTGnfueRq10fWoUdKQ/gerEWuzNrsT35Af4cXIkPXLNG3l4XEUHPLqF3LOldrj2X9Pmf + SsYwjIx/9rAxpat1Ml2xM+iqnffrjw5+8NuNsWnvbL9Qt9rlIt7dkQn5lvOKVRtiMn65Zu+H9Ay1nXwW + vSPugPN3u3iNHxdA6jfdJqn3xAKm9JExiT42ptJHh+XP7FbNW2bn/ObSFatsGJovpt/m0/9m0zPT6FmR + 9qQ7ShNGDGOOnsdzBqXS15Rrym1Ft9w0mcyRLhrH6Tyn3/jqJce+hk6aMExM/gMoVWI0KHRwewAAAABJ + RU5ErkJggg== +</value> + </data> + <data name="barButtonItem13.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANwCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iQ3JlYXRlX1N0YWNrZWRfTGluZV9DaGFydF9Ob19NYXJrZXJzIiBzdHls + ZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2Nz + cyI+CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJLlJlZHtmaWxs + OiNEMTFDMUM7fQo8L3N0eWxlPg0KICA8cG9seWdvbiBwb2ludHM9IjEuOSw1LjkgMi44LDQuMSAxNC4z + LDkuOSAyNy44LDIuMiAyOC44LDMuOSAxNC4zLDEyLjIgMS45LDUuOSAiIGNsYXNzPSJSZWQiIC8+DQog + IDxwYXRoIGQ9Ik0yLDE2bDAuNi0xLjlMMTQuMywxOEwyOCwxNC4xbDAuNSwxLjlsLTE0LjMsNC4xTDIs + MTZMMiwxNnogTTIsMTZMMiwxNkwyLDE2TDIsMTZMMiwxNnoiIGNsYXNzPSJZZWxsb3ciIC8+DQogIDxw + YXRoIGQ9Ik0yLDI4LjFMMi42LDMwbDExLjctMy45TDI4LDMwbDAuNS0xLjlMMTQuMywyNEwyLDI4LjFM + MiwyOC4xeiBNMiwyOC4xTDIsMjguMUwyLDI4LjFMMiwyOC4xTDIsMjguMXoiIGNsYXNzPSJCbHVlIiAv + Pg0KPC9zdmc+Cw== +</value> + </data> + <data name="barButtonItem14.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABh0RVh0VGl0 + bGUAU3RhY2tlZDtCYXI7Q2hhcnQ7dQY7tgAAArFJREFUOE9lkslPU1EUxt+/4cKNIWGhCQujQSXRaEw0 + RhLBSBQZg4piZSrBMrRQEBWoRcAQR1CMMTIXQkGgLXOYExcEF0ZcKYi0vA5v6Gs/7zulgHHxe/ee+873 + 3ZN7Dtf4fmmEgYZWlUWi/l2YBTx9G6KuRWUe5uZ5PHkzR5hez45wVU1TCAIh2Gdn/Y/gNkCACKK8fhxc + 5bNJOhREBT7Rz1DgpdVPq5fi0JlH2CXAXAx1Y+AqGifIYCeZ/QxDyb4QzRM/YLSs4NXod7h9MhRmoDc7 + wKllqOWEnOVtQns1kd/m1otpOFYlxFZ8ZrEERQmg2GQHpzePUTludktYoO4fW5ZxxTyO+60L4L0SkthF + D208zhb3wuWRITMDXbUNXKnJQeXwXhlbe0isn4Tlq4AzpVYSxFePoGTAhZj8drjcEmR/AIWPhsEV1drh + V4IkUhNdHom4VDMaEhT0wMkES881EFfbYSuLwyYvQZIVFFQN7RqUdq3gQt0MNC1LZDBZkwzPYg0sOafJ + YLEpC8K3Dxgqif3XQC1DYuXENsxSyTEGG0sQMfYgAfyUHh2ZJ7CxJWKu4QZ8yy9h1Z7DhkugNucaB8Fp + mYsoB+AwXob3SyPabh4jgcMYjy17Hj5lROM3E0yfj4bbVIS+wxFYZ7GXdSm7zAour3IQgqRgPu4k+OpC + DMccYgIRMxePw12rw8DRSBKMnooCb9Kh4+B+rDt91DGNoR9cbvkADdG0JgPWI5GYuJ1GgvHMVPREHYA9 + Iwlrmz4MpVzFx4h9GExKoJhnD55V0gcu22ClwVlzCvRjL782BYa67vLzj4qXHvpOMTO4q++nwVHnIAzN + ArtBJdxWgnXD6RapK+pDZ+p6waUXdFvTtd1I03YhlZGS34mUvE4k53YQ13Pad0jMDtOGa/dU2qx/AVui + SyXG5BY5AAAAAElFTkSuQmCC +</value> + </data> + <data name="barButtonItem14.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABh0RVh0VGl0 + bGUAU3RhY2tlZDtCYXI7Q2hhcnQ7dQY7tgAACBtJREFUWEe9l3lQlecVxmnMZram/b/ttM3YxJpYExNj + rI1tTVo1i9bRNIiJGwqKCtEIyCKgCIRFdhUEFREFZZNFEqiACAoKDIIgi4pbqUW5wN0vy9NzzvfdJRnr + jP2jzPzmvN933nue513u+16c1L8niAmPwZP/I0+pcJvr/IhweiIjr7Eys6AZj+IIk/8Q8jg2IYPJ++8c + zrXSKKTnNFSpJpwmpJ+4hP/33/6sCyBtng2nJ9NyFAMWyxjMllEVa5ujI0re5NCH2yZqm8xqjuKjGB8f + x97M82zgaTGQmn0R42TAUeBhiIhEBXn/g+LGh0SjeUR95jiCMTKQ7Ggg5VgDuYJalEeijEZgMcdIBaw5 + pbiKSRFhgcL6W0j+thPJpR1ILGlHXFE7smuuS85oGhUDSRl1bOAZNvDU/qx6xcAPitvbyntrAauoQY0s + bqD3/GygPkkkfFNjJkzoFcwIP9lCfUagZwNj40g4XGs3sO/oBTHAhUxSjIWUqECFv/dsR2/FaI+xRVfQ + 2mdAQduA0PJPPUKON8PAfQg2EHeoxm6A14MNsHseha0oIUJqcY4iqhb6Phbo1HZkfiua7uhwouWBcOm2 + Dv6ZF5U+BgtGyUBs+lk28CwbeDrpSJ3sTNvIuJDJ4lDcDovoqJAiqPSRdwZGEQjNacaFXi2ymu4L53uH + sS39gvTXWg2kVdsNJGbUysbgYixuF1DaCiPQipAFOeduIKbwCqLy2xCe24rQEy04WNElxZnAo40oa9cg + saoPCdV9KL2igWdKnXyW8yOj44hJrWIDE9nAM/G0HrwujqKPMhBJwj0PTOh2wO/IJZuBc+HOMN0qh6F1 + HwyX98LUW4bKoMXQ6i0YFgNjiEpxMBCXrhiQKWQxjg5oaXq19N4qEJrTgqa7emTT+ubwGt/RY2t6veSG + SaR65xKYruVD3xQFXWMkjN25KPf7RHIMG4jcd8ZuIDbtrKyLVUCgjrbIH1SLczsgqwkNt/U43tyPY0T9 + LS02pdRKfog4E7gIxs7j0F4Mg65hNwxXs/DttnmSYywjY4jY+w828BwbeDbmQLXNgNXlw+APc/Q+3IC6 + m1ocpQ2W2diPc7Th1iWdxZBO6VO+/SMY2zOgvRAM7fkgGK4cROmWDzBIecZMBsKTKuwGomk9RmljOIqI + W7XgMEcr9MwbqrSDNln1XaIPJdRetadSEdBaSGwu9K0p0NYFQFvrD0PLPpzymC05MUCnbVhiORt4ng1M + jNpfKTvTKhKf1wrPpFp4Jqok1CLuZKt8eEhnpin+BKY7pTSyvTC0JdOGK0bF9gXQUI5hMX3jHgxVemG4 + 0hP6i9HIWzsDGjLAsIHQ+O/sBsKSymVdlA5mbIyrwemeYZzutuMRWwPNMAkQ5b7zaJNlQ9ccIZh6slC2 + 7UMMUG5gyIwCt/cwVOWHgaIV0BR+SUZ8kLvmbckNDJvk+A7aU8YGXhADoQnfiStFwAL36Gqk0/rG0veY + OXDpPtyiqkSA+5ze8mfaWOnQNuwkQmBoP4ASzzk2gSNz/oo73wTg+lerhNvhfsh4/0M8GDJRHxMddqPY + EV1qM/DcLpoOxYAJGurgGlGJCBIOKOpFQOENhFfcxeqIM4oAUbzpD9C3xGK4ZiuGCF1zNAo3zCIBs4gc + mj0XNwM3o2fdUvS4LcXNAA8cnPUnyTF84AVEiYEXxUBIbBldt2PKFJKJ2igXGLuO0kESTwcJcfUQTft8 + m4EC95kYOuuDgeKVxAoMVX9Na/yOIjBoQvp7f0Svjzt6XP9GLMYN73VIe/d93B80EooB/6gSm4Hng9kA + /Qbg6eEiZ3ctha4lAdr6IOjqA6FtjqFpnyvFOZ9Kxa5vX4+OtUuFayS2961ZNoHUd2bjxtbV6Fq9CN2r + F9IyrETK9N+jX2NEP/Xhe8MvoshuYEfMadkYVoHKoEUyrdrz/hiu84X2UhhKNs+R4sx+Ktbl4YK2ZQvQ + 5rIAneuXIWHqu2Kgn/NvzsK1TV+ga8Wn6PryU/R4LMe+aTPxbzZAvw/4ZPULFwMvsYEXAmlD8MZQBIyo + 8P8Yg9Xe0JS5EWuhqfDCqY2zpTiPIomK8cjbPp+HVud56FizBHumTFdGSALJU2egx90ZnV98RHyMbrfP + kPzGDDHA8IHnG3bKbsA/skSuYTbARVJnzsEN3/U0iuW4tnE5rnu7IfZ1FuC8CbFT3kb7ioW4/NlfhCs0 + yshXf2cTSCQzXa5LcJVnh+hasxgJk6dL7h7BB53PbjHwYzbwol9ksWwMFudOybSe3Rtd0LlqEbEQ3e5/ + xzeTptoEokisbdl8XF7ygdDmPB9hv55COYMIxL/2Jk3/QnTQ7FxlaCniXp0muXvUh09T79ACBwMRxXLd + WgWy13ggZvJbJDRNhMNeeR0ZLq5SgPOZy10R/soUEv0tQn81GaG/fA2HnVdLce5zyHklgn/xG4QQQT+f + hOCfTULa5ytwb8CIfw0oBr7eJQZeFgPbw0/JNWwVYKxta1GFh7U5GqSwDfXZKuj4jtHQkb51Z77NwEu8 + Hrwz7cXVwmoRidaiHNWcUtBBxOFdn9rue0A45LjN98XWkDz7DHjvLrTd9zboWW5EBwYlmima5VJiBlXk + IqJ7xHoh2eB3Ap2yxAC1Byh+FWw3MHGTf1b1lpB8bCFXCrnUIRde1Mkr+CS8gogdJ+G54wQ2M4FEQA42 + BeZgI0XGwz9bwe84NmxnjmEDtddTFHyPwZ3xyRJWeR6oIW25Dflfc/5pxN9J3pUMO3scfvIY/JTgz5C4 + 04T/AAiw+KLVc/IaAAAAAElFTkSuQmCC +</value> + </data> + <metadata name="xtraTabbedMdiManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>222, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Model/BuildModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/BuildModel.cs new file mode 100644 index 0000000..1698223 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/BuildModel.cs @@ -0,0 +1,938 @@ +锘縰sing MathNet.Numerics; +using MathNet.Numerics.LinearAlgebra.Double; // 寮曞叆 Math.NET Numerics 搴撹繘琛屽椤瑰紡鎷熷悎 +using Newtonsoft.Json; +using System.ComponentModel; +using System.Data; +using System.IO; +using System.Text; + +namespace IBox.WinFrmUI +{ + public enum BuildingType + { + 浣忓畢1, + 浣忓畢2, + 浣忓畢3, + 鍟嗙敤1, + 鍟嗙敤2, + 鍟嗙敤3 + } + public enum 浜屼緵鍒嗗尯Type + { + 鍔犲帇渚涙按, + 灞嬮《姘寸, + 甯傛斂鐩翠緵 + } + [Serializable] + public class BuildDataset + { + public BuildDataset(string name) + { + Name = name; + } + public BuildDataset() + { + + } + public void Clear() + { + if (this.Data != null) + { + Data.Clear(); + } + this.IsFitted = false; + } + public string Name { get; set; } + private List<PointF> _Data = new List<PointF>(); + public List<PointF> Data + { + get + { + return _Data; + } + set + { + _Data = value; + IsFitted = false; + } + } //= new List<PointF>(); + + public int degree { get; set; } = 2; + + public List<double> ForumParams = null; + + [JsonIgnore] + [NonSerialized] + public DenseVector coefficients = null; // 瀛樺偍澶氶」寮忕郴鏁� + + public double ErrNum { get { return -1; } } + + private int stepNum { get { return 100; } } + + private double step { get { return (range_X.Max - range_X.Min) / stepNum; } } + /// <summary> + /// 涓嶉渶瑕佽鍙� + /// </summary> + public string Legend + { + get + { + return "Legend1"; + } + } + + //public AxisType axisType + //{ + // get + // { + + + // return AxisType.Primary; + + + // } + //} + + public void CurveFit(Range rangeX = null) + { + + if (!HasData) + { + IsFitted = false; + return; + } + if (rangeX != null) range_X = rangeX; + coefficients = Fit.Polynomial(Data.Select(p => (double)p.X).ToArray(), Data.Select(p => (double)p.Y).ToArray(), degree); + + if (range_X == null) + { + range_X = new Range(9999999, -9999999); + Data.ForEach(p => + { + if (range_X.Min > p.X) range_X.Min = p.X; + if (range_X.Max < p.X) range_X.Max = p.X; + }); + } + + IsFitted = true; + + } + + + public double Evaluate(double x) + + { + if (!IsFitted) return ErrNum; + // 璁$畻澶氶」寮忓湪鐐� x 澶勭殑鍙栧�� + double y = 0; + for (int i = 0; i < coefficients.Count; i++) + { + y += coefficients[i] * Math.Pow(x, i); + } + return y; + } + + public double Evaluate_Solve(double y) + { + if (!IsFitted) return ErrNum; + if (degree == 2) // 澶氶」寮忔鏁� + { + if (!is_Yvalue_validate(y)) return ErrNum; + + double a = coefficients[degree]; // 浜屾椤圭郴鏁� + double b = coefficients[degree - 1]; // 涓�娆¢」绯绘暟 + double c = coefficients[0] - y; // 甯告暟椤圭郴鏁板噺鍘荤粰瀹氱殑 y 鍊� + + // 姹傝В浜屾鏂圭▼ ax^2 + bx + c = 0 + double delta = b * b - 4 * a * c; + + double x1 = (-b + Math.Sqrt(delta)) / (2 * a); + double x2 = (-b - Math.Sqrt(delta)) / (2 * a); + + // 鍙栦袱涓В涓鍚堝疄闄呮儏鍐电殑閭d釜锛堝彲浠ユ牴鎹叿浣撳簲鐢ㄥ満鏅潵纭畾锛� + double x = (x2 >= x1) ? x2 : x1; + return x; + } + else + { + return ErrNum; + } + } + + + public double YMax + { + get + { + if (!IsFitted) return ErrNum; + double a = coefficients[degree]; + double b = coefficients[degree - 1]; + double c = coefficients[0]; + double delta = b * b - 4 * a * c; + double minExtremePoint = -b / (2 * a); // 璁$畻瀵煎嚱鏁扮殑闆剁偣 + double maxValue = 0; + if (a < 0) + + maxValue = -delta / (4 * a) + c; + else + maxValue = a * minExtremePoint * minExtremePoint + b * minExtremePoint + c; // 璁$畻鏈�灏忓�� + return maxValue; + } + } + public double YdataMax + { + get + { + double max = -99999; + foreach (var p in Data) + { + if (max < p.Y) max = p.Y; + } + return max; + } + } + public bool is_Yvalue_validate(double y) + { + if (!IsFitted) return false; + double a = coefficients[degree]; + if (a < 0) + + return y <= YMax; + else + return y >= YMax; + } + + /// <summary> + /// X鏄剧ず鐨勮寖鍥� + /// </summary> + public Range range_X; + + + /// <summary> + /// Y鏄剧ず鐨勮寖鍥� + /// </summary> + public Range range_Y; + + public bool HasData { get { return Data.Count >= 3; } } + + [JsonIgnore] + [NonSerialized] + public bool IsFitted = false; + + + + [JsonIgnore] + [NonSerialized] + private List<PointF> _FittedCurve = null; + + + public List<PointF> FittedCurve + { + get + { + if (_FittedCurve == null && range_X != null && coefficients != null) + { + /* var curvehelper = new CurveFitHelper(Data, degree); + coefficients = curvehelper.coefficients; + return curvehelper.GetFitCurve(stepNum);*/ + + + List<PointF> doubles = new List<PointF>(); + for (double x = range_X.Min; x <= range_X.Max; x += step) + { + double y = Evaluate(x); + if (y == double.NaN) + y = 0; + //chart.Series[1].Points.AddXY(x, y); + doubles.Add(new PointF((float)x, (float)y)); + } + _FittedCurve = doubles; + return doubles; + + + + } + + return _FittedCurve; + + } + set + { + _FittedCurve = value; + } + + } + public List<PointF> FittedCurvebyRange(Range range) + { + List<PointF> doubles = new List<PointF>(); + + if (range == null) + { + range = new Range(); + range.Min = range_X.Min; + range.Max = range_X.Max; + } + var step = (range.Max - range.Min) / stepNum; + for (double x = range.Min; x <= range.Max; x += step) + { + double y = Evaluate(x); + //chart.Series[1].Points.AddXY(x, y); + doubles.Add(new PointF((float)x, (float)y)); + } + return doubles; + } + } + [Serializable] + public class Range + { + public Range() + { + + } + public Range(double Min, double Max) + { + this.Min = Min; + this.Max = Max; + } + public double Max; + public double Min; + public double Len { get { return Max - Min; } } + + public static Range Union(Range a, Range b) + { + if (a == null) return b; + if (b == null) return a; + + return new Range(a.Min < b.Min ? a.Min : b.Min, a.Max > b.Max ? a.Max : b.Max); + } + public bool isValid + { + get + { + return Min < Max; + } + } + } + + public class UDemand + { + public string Name { get; set; } + public Range Range { get; set; } + + public string picUrl { get; set; } + } + + + [Serializable] + public class Build + { + public Build() + { + Datasets = new Dictionary<string, BuildDataset>() { + {"娴侀噺鍘嬮檷鏇茬嚎",new BuildDataset("娴侀噺鍘嬮檷鏇茬嚎") }, + {"娴侀噺鍘嬮檷涓婇檺",new BuildDataset("娴侀噺鍘嬮檷涓婇檺") }, + {"娴侀噺鍘嬮檷涓嬮檺",new BuildDataset("娴侀噺鍘嬮檷涓嬮檺") }, + {"娴侀噺鍘嬮檷骞冲潎",new BuildDataset("娴侀噺鍘嬮檷骞冲潎") }, + }; + } + public string ID { get; set; } + [Category("1銆佸熀鏈俊鎭�")] + [Description("鍚嶇О")] + [DisplayName("鍚嶇О")] + [Browsable(true)] + public string Name { get; set; } + [Category("1銆佸熀鏈俊鎭�")] + [Description("浜屼緵渚涙按鐨勭被鍨�")] + [DisplayName("浜屼緵绫诲瀷")] + [Browsable(true)] + public 浜屼緵鍒嗗尯Type Type { get; set; } + [Browsable(false)] + + public Dictionary<string, BuildDataset> Datasets { get; set; } + + [NonSerialized] + [JsonIgnore] + public Munity factory = null; + + public string factoryName = ""; + [Category("2銆佽绠楀弬鏁�")] + [Description("妤煎眰楂樺害")] + [DisplayName("宄板�兼祦閲�(L/s)")] + [Browsable(false)] + public double MaxDemand { get; set; } = 15; + [Category("1銆佸熀鏈俊鎭�")] + [Description("妤煎眰楂樺害")] + [DisplayName("姣忓眰楂樺害")] + [Browsable(false)] + public double 灞傞珮 { get; set; } = 3.5; + + [Category("2銆佽绠楀弬鏁�")] + [Description("鏈�涓嶅埄鐐�")] + [DisplayName("鐢ㄦ埛鍘嬪姏闇�姹�(m)")] + [Browsable(true)] + public int 鐢ㄦ埛鍘嬪姏闇�姹� { get; set; } = 8; + + [Category("1銆佸熀鏈俊鎭�")] + [Description("妤煎眰鏁伴噺")] + [DisplayName("妤煎眰鏁�")] + [Browsable(false)] + public double 灞傛暟 { get; set; } = 5; + [Category("1銆佸熀鏈俊鎭�")] + [Description("姣忓眰鎴锋暟")] + [DisplayName("姣忓眰鎴锋暟")] + [Browsable(false)] + public double 姣忓眰鎴锋暟 { get; set; } = 4; + [Category("1銆佸熀鏈俊鎭�")] + [Description("鐢ㄦ埛鎬绘暟")] + [DisplayName("鐢ㄦ埛鎬绘暟")] + [Browsable(false)] + public double 鐢ㄦ埛鎬绘暟 { get { return 灞傛暟 * 姣忓眰鎴锋暟 * 鐢ㄦ埛鍘嬪姏闇�姹�; } } + [Category("2銆佽绠楀弬鏁�")] + [Description("鐢ㄦ埛鎬绘暟")] + [DisplayName("绯荤粺娴侀噺(m鲁/h)")] + [Browsable(true)] + + public double 绯荤粺鏈�澶ф祦閲� { get; set; } = 5; + [Browsable(false)] + private string _templateID = null; + public Build Copy() + { + Build p = new Build(); + p.ID = ID; + p.Name = Name; + p.MaxDemand = MaxDemand; + p.灞傞珮 = 灞傞珮; + p.灞傛暟 = 灞傛暟; + p.姣忓眰鎴锋暟 = 姣忓眰鎴锋暟; + p.绯荤粺鏈�澶ф祦閲� = 绯荤粺鏈�澶ф祦閲�; + p.Type = Type; + p.factory = factory; + foreach (var pair in Datasets) + { + List<PointF> list = new List<PointF>(); + pair.Value.Data.ForEach(m => list.Add(m)); + p.Datasets[pair.Key].Data = list; + Range rangeDefault = new Range(double.MaxValue, double.MinValue); + p.Datasets[pair.Key].range_X = Range.Union(rangeDefault, pair.Value.range_X); + p.Datasets[pair.Key].range_Y = Range.Union(rangeDefault, pair.Value.range_Y); + } + p.CurveFit(); + return p; + //factory.Pumps.Add(p); + //_EditFlag = true; + //DisplayFactoryListInTreeView(factoryList); + } + + [Browsable(false)] + //[Editor(typeof(TemplatePropertyEditor), typeof(UITypeEditor))] + public string templateID + { + get + { + return _templateID; + } + set + { + _templateID = value; + //template = TemplateList.GetTemplate(_templateID); + } + } + + + //public Template template { get; private set; } = null; + + + [Browsable(false)] + public BuildDataset 娴侀噺鍘嬮檷鏇茬嚎 + + { + get + { + if (!Datasets.ContainsKey("娴侀噺鍘嬮檷鏇茬嚎")) Datasets.Add("娴侀噺鍘嬮檷鏇茬嚎", new BuildDataset("娴侀噺鍘嬮檷鏇茬嚎")); + return Datasets["娴侀噺鍘嬮檷鏇茬嚎"]; + } + } + + [Browsable(false)] + + public BuildDataset 娴侀噺鍘嬮檷骞冲潎 + { + get + { + if (!Datasets.ContainsKey("娴侀噺鍘嬮檷骞冲潎")) Datasets.Add("娴侀噺鍘嬮檷骞冲潎", new BuildDataset("娴侀噺鍘嬮檷骞冲潎")); + return Datasets["娴侀噺鍘嬮檷骞冲潎"]; + } + } + [Browsable(false)] + + public BuildDataset 娴侀噺鍘嬮檷涓婇檺 + { + get + { + if (!Datasets.ContainsKey("娴侀噺鍘嬮檷涓婇檺")) Datasets.Add("娴侀噺鍘嬮檷涓婇檺", new BuildDataset("娴侀噺鍘嬮檷涓婇檺")); + return Datasets["娴侀噺鍘嬮檷涓婇檺"]; + } + } + [Browsable(false)] + + + public BuildDataset 娴侀噺鍘嬮檷涓嬮檺 + { + get + { + if (!Datasets.ContainsKey("娴侀噺鍘嬮檷涓嬮檺")) Datasets.Add("娴侀噺鍘嬮檷涓嬮檺", new BuildDataset("娴侀噺鍘嬮檷涓嬮檺")); + return Datasets["娴侀噺鍘嬮檷涓嬮檺"]; + } + } + + [Browsable(false)] + public BuildDataset 鐢ㄦ按瓒嬪娍鏇茬嚎 + { + get + { + if (!Datasets.ContainsKey("鐢ㄦ按瓒嬪娍鏇茬嚎")) Datasets.Add("鐢ㄦ按瓒嬪娍鏇茬嚎", new BuildDataset("鐢ㄦ按瓒嬪娍鏇茬嚎")); + return Datasets["鐢ㄦ按瓒嬪娍鏇茬嚎"]; + } + } + + [Browsable(false)] + public BuildDataset 鐢ㄦ按瓒嬪娍涓嬮檺 + { + get + { + if (!Datasets.ContainsKey("鐢ㄦ按瓒嬪娍涓嬮檺")) Datasets.Add("鐢ㄦ按瓒嬪娍涓嬮檺", new BuildDataset("鐢ㄦ按瓒嬪娍涓嬮檺")); + return Datasets["鐢ㄦ按瓒嬪娍涓嬮檺"]; + } + } + + [Browsable(false)] + public BuildDataset 鐢ㄦ按瓒嬪娍涓婇檺 + { + get + { + if (!Datasets.ContainsKey("鐢ㄦ按瓒嬪娍涓婇檺")) Datasets.Add("鐢ㄦ按瓒嬪娍涓婇檺", new BuildDataset("鐢ㄦ按瓒嬪娍涓婇檺")); + return Datasets["鐢ㄦ按瓒嬪娍涓婇檺"]; + } + } + + public DataTable UDList { get; set; } + + public List<string> UDNames { get; set; } + + public List<double> UDPatterns { get; set; } + + public void CurveFit(bool is鎷熷悎 = true) + { + + foreach (var data in Datasets) + { + //data.Value.Data.Sort((a, b) => a.X > b.X ? 1 : (a.X == b.X ? 0 : -1)); + if (data.Value.HasData) data.Value.CurveFit(); + } + + } + + public void ShowInGrid(DataGridView dataGridView) + { + //dataGridView.Rows.Clear(); + DataTable dt = new DataTable(); + dt.Columns.Add("娴侀噺"); + dt.Columns.Add("鍘嬮檷"); + dt.Columns.Add("涓婇檺"); + dt.Columns.Add("涓嬮檺"); + + for (int i = 0; i < 娴侀噺鍘嬮檷鏇茬嚎.Data.Count; i++) + { + PointF p = 娴侀噺鍘嬮檷鏇茬嚎.Data[i]; + double y1 = 0, y2 = 0; + //if (娴侀噺鍘嬮檷涓婇檺.IsFitted) y1 = 娴侀噺鍘嬮檷涓婇檺.Data[i].Y; + //if (娴侀噺鍘嬮檷涓嬮檺.IsFitted) y2 = 娴侀噺鍘嬮檷涓嬮檺.Data[i].Y; + dt.Rows.Add(Math.Round(p.X, 1), Math.Round(p.Y, 2), Math.Round(y1, 2), Math.Round(y2, 2)); + //dataGridView.Rows.Add(Math.Round(p.X,1), Math.Round(p.Y,2), Math.Round(y1,2), Math.Round(y2, 2)); + } + dataGridView.DataSource = null; + dataGridView.DataSource = dt; + dataGridView.Refresh(); + } + + //public void AddCurve(System.Windows.Forms.DataVisualization.Charting.Chart chart, string type = "娴侀噺鍘嬮檷鏇茬嚎", bool onlyOne = false, Range Force_range_X = null, bool onlyCurve = true) + //{ + // Series series = new Series(""); + // List<PointF> Points; + // List<PointF> FittedCurve; + + // string baseType = "娴侀噺鍘嬮檷鏇茬嚎"; + // string baseType2 = "娴侀噺鍘嬮檷涓嬮檺"; + // if (onlyOne) + // { + // //if (Datasets[type].IsFitted) + // { + // FittedCurve = Datasets[type].FittedCurvebyRange(Force_range_X); + // series = AddSeries("ChartArea1", SeriesChartType.Spline, Datasets[type].Legend, Datasets[type].axisType, $"{factoryName}_{Name}_{type}", FittedCurve, true); + // chart.Series.Add(series); + // } + + // } + // else + // { + // if (!onlyCurve) + // { + // Points = Datasets[type].Data; + // series = AddSeries("ChartArea1", SeriesChartType.Point, Datasets[type].Legend, Datasets[type].axisType, $"娴侀噺鍘嬮檷鏇茬嚎", Points, false); + // chart.Series.Add(series); + // } + + // var series0 = series; + + // foreach (var data in Datasets) + // { + // var type0 = data.Key; + // if (!Datasets[type0].IsFitted) continue; + // FittedCurve = Datasets[type0].FittedCurve; + // series = AddSeries("ChartArea1", SeriesChartType.Spline, Datasets[type0].Legend, Datasets[type0].axisType, $"{factoryName}_{Name}_{type0}", FittedCurve, true); + // chart.Series.Add(series); + // } + + // if (chart.Series.Count == 1 && series0.Points.Count == 0) + // { + // series0.Points.Add(-2, -2); + // series0.Points.Add(-1, -1); + // series0.IsVisibleInLegend = true; + // series0.YAxisType = AxisType.Primary; + // chart.ChartAreas[0].AxisX.Minimum = 0; + // chart.ChartAreas[0].AxisX.Maximum = 3000; + // chart.ChartAreas[0].AxisY.Minimum = 0; + // chart.ChartAreas[0].AxisY.Maximum = 50; + // chart.ChartAreas[0].AxisY2.Minimum = 0; + // chart.ChartAreas[0].AxisY2.Maximum = 100; + // return; + // } + // } + + // Range range_X = null; + + // if (Force_range_X != null && Force_range_X.isValid) + // { + // range_X = Force_range_X; + // } + // else if (Datasets[type].range_X != null && Datasets[type].range_X.isValid) + // { + // range_X = Datasets[type].range_X; + // } + // else if (Datasets[baseType].range_X != null && Datasets[baseType].range_X.isValid) + // { + // range_X = Datasets[baseType].range_X; + // } + // else + // { + // range_X = new Range(double.NaN, double.NaN); + + // } + // if (!double.IsNaN(range_X.Min) && !double.IsNaN(range_X.Max)) + // { + // chart.ChartAreas[0].AxisX.Minimum = range_X.Min; + // chart.ChartAreas[0].AxisX.Maximum = range_X.Max; + // } + + + // if (Datasets[baseType].range_Y != null && Datasets[baseType].range_Y.isValid) + // { + // // 璁剧疆 X 杞寸殑鏈�澶ф渶灏忓�� + // chart.ChartAreas[0].AxisY.Minimum = Datasets[baseType].range_Y.Min; + // chart.ChartAreas[0].AxisY.Maximum = Datasets[baseType].range_Y.Max; + // } + // else + // { + // //chart.ChartAreas[0].AxisY.Minimum = double.NaN; + // //chart.ChartAreas[0].AxisY.Maximum = double.NaN; + // } + + + + // if (type != baseType && Datasets[type].range_Y != null && Datasets[type].range_Y.isValid) + // { + // // 璁剧疆 X 杞寸殑鏈�澶ф渶灏忓�� + // chart.ChartAreas[0].AxisY2.Minimum = Datasets[type].range_Y.Min; + // chart.ChartAreas[0].AxisY2.Maximum = Datasets[type].range_Y.Max; + // } + // else + // if (Datasets[baseType2].range_Y != null && Datasets[baseType2].range_Y.isValid) + // { + // // 璁剧疆 X 杞寸殑鏈�澶ф渶灏忓�� + // chart.ChartAreas[0].AxisY2.Minimum = Datasets[baseType2].range_Y.Min; + // chart.ChartAreas[0].AxisY2.Maximum = Datasets[baseType2].range_Y.Max; + // } + // else + // { + // chart.ChartAreas[0].AxisY2.Minimum = 0; + // chart.ChartAreas[0].AxisY2.Maximum = 100; + // } + + + + + + //} + //private Series AddSeries(string Area, SeriesChartType type, String Legend, AxisType axisType, String Name, List<PointF> Points, bool showLegend = true) + //{ + // Series series = new Series(); + // series.BorderWidth = 2; + // series.YValuesPerPoint = 10; + // series.ChartArea = Area; + // series.ChartType = type; + // series.Legend = Legend; + // series.Name = Name; + // series.IsVisibleInLegend = showLegend; + // series.YAxisType = axisType; + // if (Points != null) Points.ForEach(p => series.Points.AddXY(p.X, p.Y)); + // return series; + //} + + + } + public class Munity : Build + { + //public string Name { get; set; } + public new BuildingType Type { get; set; } + public List<Build> Pumps { get; set; } + + public void CurveFit() + { + foreach (var p in Pumps) + { + p.CurveFit(); + } + } + + } + public class MunityList + { + public List<Munity> Factories { get; set; } + + public MunityList() + { + Factories = new List<Munity>(); + } + public Munity AddFactory(string name, BuildingType type) + { + Munity item = new Munity { Name = name, Type = type, Pumps = new List<Build>() }; + + Factories.Add(item); + return item; + } + public Build AddPump(Munity factory, string name, 浜屼緵鍒嗗尯Type type) + { + + Build pump = new Build { Name = name, Type = type, factoryName = factory.Name }; + pump.factory = factory; + factory.Pumps.Add(pump); + return pump; + } + public void RemoveFactory(Munity factory) + { + Factories.Remove(factory); + } + //private string _filePath = "data.txt"; + //private string _bakPath = "bak\\"; + + private string _filePath = null;// "data.txt"; + private string _bakPath = Path.Combine(Directory.GetCurrentDirectory(), "bak\\"); + private string _fileDirectory = Path.Combine(Directory.GetCurrentDirectory(), "sav\\"); + //public FactoryListFileManager(string filePath) + //{ + // _filePath = filePath; + //} + + public string Save(string filePath) + { + + + if (filePath == null) + { + using (SaveFileDialog ofd = new SaveFileDialog()) + { + ofd.InitialDirectory = _fileDirectory; + ofd.Filter = "txt|*.txt|All|*.*"; + var result = ofd.ShowDialog(); + if (result == DialogResult.OK) + _filePath = ofd.FileName; + else + return null; + } + } + else + { + _filePath = filePath; + } + if (File.Exists(_filePath)) + { + FileInfo fi = new FileInfo(_filePath); + if (!Directory.Exists(_bakPath)) Directory.CreateDirectory(_bakPath); + string bakName = Path.Combine(_bakPath, $"{fi.Name}_bak_{fi.LastWriteTime.ToString("yyyy_MM_dd_HH_mm_ss")}.txt"); + File.Copy(_filePath, bakName, true); + } + + + + + + + var sb = new StringBuilder(); + //sb.Append( JsonConvert.SerializeObject(Factories)); + //2023骞�7鏈�1鏃� 鏀惧純鏂囨湰鍖栬緭鍑猴紝閲囩敤json杈撳嚭 + + + + foreach (var factory in Factories) + { + // 鍐欏叆宸ュ巶淇℃伅 + sb.AppendLine($"Factory,{factory.Type},{factory.Name},{factory.templateID}"); + + foreach (var build in factory.Pumps) + { + // 鍐欏叆姘存车淇℃伅 + sb.AppendLine($"Pump,{build.Type},{build.Name},{build.灞傞珮},{build.姣忓眰鎴锋暟},{build.绯荤粺鏈�澶ф祦閲弣,{build.灞傛暟},{build.templateID}"); + + foreach (var dataset in build.Datasets) + { + // 鍐欏叆鏁版嵁闆嗕俊鎭� + sb.AppendLine($"Dataset,{dataset.Value.Name}"); + if (dataset.Value.range_X != null) + sb.AppendLine($"Dataset_Range_X,{dataset.Value.range_X.Min},{dataset.Value.range_X.Max}"); + if (dataset.Value.range_Y != null) + sb.AppendLine($"Dataset_Range_Y,{dataset.Value.range_Y.Min},{dataset.Value.range_Y.Max}"); + if (dataset.Value.Data != null) + foreach (var point in dataset.Value.Data) + { + // 鍐欏叆鏁版嵁鐐逛俊鎭� + sb.AppendLine($"{point.X},{point.Y}"); + } + } + } + } + + // 灏嗘暟鎹啓鍏ユ枃浠� + File.WriteAllText(_filePath, sb.ToString()); + return _filePath; + } + + public string Load(string fileName) + { + //var factoryList = new FactoryList(); + Factories.Clear(); + if (!Directory.Exists(_fileDirectory)) Directory.CreateDirectory(_fileDirectory); + if (fileName == null) + { + using (OpenFileDialog ofd = new OpenFileDialog()) + { + + ofd.InitialDirectory = _fileDirectory; + ofd.Filter = "txt|*.txt|All|*.*"; + var result = ofd.ShowDialog(); + if (result == DialogResult.OK) _filePath = ofd.FileName; + else return null; + } + } + else + { + _filePath = fileName; + } + //var factoryList = new FactoryList(); + + if (!File.Exists(_filePath)) + { + return null; + } + Factories.Clear(); + var currentFactory = default(Munity); + var currentPump = default(Build); + var currentDataset = default(BuildDataset); + + //var txt = File.ReadAllText(_filePath); + //Factories = JsonConvert.DeserializeObject<List<Factory>>(txt); + //Factories.ToList().ForEach(factory => + //{ + // factory.Pumps.ForEach(pump => { pump.factory = factory; }); + //}); + + + foreach (var line in File.ReadAllLines(_filePath)) + { + var fields = line.Split(','); + + switch (fields[0]) + { + case "Factory": + // 璇诲彇宸ュ巶淇℃伅 + var factoryType = (BuildingType)Enum.Parse(typeof(BuildingType), fields[1]); + var factoryName = fields[2]; + currentFactory = new Munity { Name = factoryName, Type = factoryType, Pumps = new List<Build>(), templateID = fields.Length > 3 ? fields[3] : null }; + this.Factories.Add(currentFactory); + currentPump = null; + currentDataset = null; + break; + + case "Pump": + // 璇诲彇姘存车淇℃伅 + var pumpType = (浜屼緵鍒嗗尯Type)Enum.Parse(typeof(浜屼緵鍒嗗尯Type), fields[1]); + var pumpName = fields[2]; + currentPump = new Build { Name = pumpName, Type = pumpType, factoryName = currentFactory.Name, factory = currentFactory, 灞傞珮 = double.Parse(fields[3]), 姣忓眰鎴锋暟 = double.Parse(fields[4]), 绯荤粺鏈�澶ф祦閲� = double.Parse(fields[5]), 灞傛暟 = fields.Length >= 7 ? double.Parse(fields[6]) : 75, templateID = fields.Length >= 8 ? fields[7] : null }; + + currentFactory.Pumps.Add(currentPump); + currentDataset = null; + break; + + case "Dataset": + // 璇诲彇鏁版嵁闆嗕俊鎭� + var datasetName = fields[1]; + currentDataset = new BuildDataset { Name = datasetName, Data = new List<PointF>() }; + currentPump.Datasets[currentDataset.Name] = currentDataset; + break; + case "Dataset_Range_X": + { + double d1 = 0; double d2 = 0; + if (double.TryParse(fields[1], out d1) && double.TryParse(fields[2], out d2)) + { + currentDataset.range_X = new Range(d1, d2); + } + + break; + } + + case "Dataset_Range_Y": + { + double d1 = 0; double d2 = 0; + if (double.TryParse(fields[1], out d1) && double.TryParse(fields[2], out d2)) + { + currentDataset.range_Y = new Range(d1, d2); + } + + break; + } + default: + // 璇诲彇鏁版嵁鐐逛俊鎭� + var x = float.Parse(fields[0]); + var y = float.Parse(fields[1]); + currentDataset.Data.Add(new PointF(x, y)); + break; + } + } + + CurveFit(); + //return factoryList; + return _filePath; + } + + + + public void CurveFit() + { + foreach (var f in Factories) + { + f.CurveFit(); + } + } + + } + +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/CalcResultViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/CalcResultViewModel.cs new file mode 100644 index 0000000..2aa0401 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/CalcResultViewModel.cs @@ -0,0 +1,22 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Yw.WinFrmUI.Q3d; + +namespace IBox.WinFrmUI +{ + public class CalcResultViewModel + { + public double[] arrayTryValue; + + public float Demand; + + public double ObjFunctionValue; + + public int it_Times; + + public dict<long, int> unitNum; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/CalcUnitViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/CalcUnitViewModel.cs new file mode 100644 index 0000000..861909e --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/CalcUnitViewModel.cs @@ -0,0 +1,17 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class CalcUnitViewModel + { + public string Label { get; set; } + public decimal Value { get; set; } + public decimal Calc { get; set; } + + public string Con { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/CalcValue.cs b/WinFrmUI/IBox.WinFrmUI/Model/CalcValue.cs new file mode 100644 index 0000000..b97c224 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/CalcValue.cs @@ -0,0 +1,53 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class CalcValue : System.ICloneable + { + public CalcValue() { } + public CalcValue(CalcValue rhs) + { + this.CalcSuccess = rhs.CalcSuccess; + this.TargetFlow = rhs.TargetFlow; + this.DataTime = rhs.DataTime; + this.TargetHead = rhs.TargetHead; + this.JsonBody = rhs.JsonBody; + this.RealDataJson = rhs.RealDataJson; + this.ID = rhs.ID; + } + + public long ID { get; set; } + public DateTime? DataTime { get; set; } + + /// <summary> + /// 鎺у埗妯″紡锛�1锛氳瀹氬帇鍔涙帶鍒讹紝2锛氳瀹氬紑娉垫柟妗堟帶鍒� + /// </summary> + public string ControlType { get; set;} + + public double TargetFlow { get; set; } + + public double TargetHead { get; set; } + + public bool CalcSuccess { get; set; } + + public string JsonBody { get; set; } + + public string RealDataJson { get; set; } + + public string Status { get => CalcSuccess ? "鎴愬姛" : "澶辫触"; } + + public CalcValue Clone() + { + return (CalcValue)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/DataGridMonitorViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/DataGridMonitorViewModel.cs new file mode 100644 index 0000000..324fd4f --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/DataGridMonitorViewModel.cs @@ -0,0 +1,44 @@ +锘縩amespace IBox.WinFrmUI +{ + public class DataGridMonitorViewModel + { + public long GroupID { get; set; } + + public string GroupName { get; set; } + + public long MonitorID { get; set; } + + public string MonitorName { get; set; } + + public long SignalID { get; set; } + + public string SignalName { get; set; } + + public string UnitName { get; set; } + + public string DataValue { get; set; } + + public string DataTime { get; set; } + + public string Flags { get; set; } + + public long SignalTypeID { get; set; } + + public eDataStatus DataStatus { get; set; } + + public string Description { get; set; } + + public bool IsEnable { get; set; } + public int? Operator { get; set; } + public string BusAddress { get; set; } + public int BusType { get; set; } + public string Operands { get; set; } + + public int Accuracy { get; set; } + + public int AdcType { get; set; } + + public decimal UpperRange { get; set; } + public decimal LowerRange { get; set;} + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/GetCalcValueModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/GetCalcValueModel.cs new file mode 100644 index 0000000..4ce6178 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/GetCalcValueModel.cs @@ -0,0 +1,19 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class GetCalcValueModel + { + public DateTime StartDate { get; set; } + + public DateTime EndDate { get; set; } + + public string LogEvent { get; set; } + + public string LogResult { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/Global.cs b/WinFrmUI/IBox.WinFrmUI/Model/Global.cs new file mode 100644 index 0000000..a69a225 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/Global.cs @@ -0,0 +1,13 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CloudWaterNetwork +{ + class Global_model + { + public static List<string> list = new List<string>() { "娴侀噺鍘嬮檷鏇茬嚎", "娴侀噺鍘嬮檷涓婇檺", "娴侀噺鍘嬮檷涓嬮檺" }; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/IBoxConfigViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/IBoxConfigViewModel.cs new file mode 100644 index 0000000..3332d0f --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/IBoxConfigViewModel.cs @@ -0,0 +1,125 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class IBoxConfigViewModel + { + /// <summary> + /// 鏈�鍚庝笂浼犳棩鏈� + /// </summary> + public string PostLastTime { get; set; } + + /// <summary> + /// 涓婁紶鏃ユ湡锛堢锛夐渶瑕佽浆鎹� + /// </summary> + public string PostTime { get; set; } + + /// <summary> + /// 姣忔涓婁紶鏁伴噺 + /// </summary> + public string PostCount { get; set; } + + /// <summary> + /// 鏄惁鍚敤鏅鸿兘鎺у埗 + /// </summary> + public string IsControll { get; set; } + + /// <summary> + /// 鏅鸿兘鎺у埗棰戠巼锛堝崟浣嶏細绉掞級 + /// </summary> + public string ControllFrequency { get; set; } + + /// <summary> + /// 鏄惁鍚敤鏁版嵁鎺ㄩ�� + /// </summary> + public string IsPostData { get; set; } + + /// <summary> + /// 鏁版嵁鎺ㄩ�侀厤缃� + /// </summary> + public MqttViewModel PostDataConfig { get; set; } + + /// <summary> + /// 鏄惁鍚敤鏁版嵁鎺ㄩ�佹湇鍔� + /// </summary> + public string IsDataDocking { get; set; } + + /// <summary> + /// 鎺у埗妯″紡锛�1锛氳瀹氬帇鍔涙帶鍒讹紝2锛氳瀹氬紑娉垫柟妗堟帶鍒� + /// </summary> + public string ControlType { get; set; } = "1"; + + /// <summary> + /// 鏄惁鍚敤鏁版嵁缁熻鏈嶅姟 + /// </summary> + public string IsAnaly { get; set; } + + /// <summary> + /// 寤惰繜鑾峰彇瀹炴椂鏁版嵁锛堝崟浣嶏細绉掞級 + /// /// </summary> + public string DelayGetRealData { get; set; } + + /// <summary> + /// 鏄惁鍐欏叆PLC + /// </summary> + public string IsWrite { get; set; } + + /// <summary> + /// 鏁版嵁閲囬泦棰戠巼锛堝崟浣嶏細绉掞級 + /// </summary> + public string DataDockingFrequency { get; set; } + + /// <summary> + /// 鍒濆鐢ㄦ按閲� + /// </summary> + public string InitUseWater { get; set; } + + /// <summary> + /// 鏄惁鍚敤鏃犳祦閲忔帶鍒� + /// </summary> + public string IsNoFlowControl { get; set; } + + /// <summary> + /// 鎺у埗绯绘暟 + /// </summary> + public string ControlCoefficient { get; set; } + + /// <summary> + /// 娉靛垏鎹㈠皬鏃� + /// </summary> + public string PumpChangeHours { get; set; } + + /// <summary> + /// 鏈�灏忔祦閲� + /// </summary> + public string MinFlow { get; set; } + + /// <summary> + /// 鏈�灏忔祦閲忔车杩愯棰戠巼 + /// </summary> + public string MinFlowPumpHz { get; set; } + + /// <summary> + /// 鍥哄畾姘翠綅 + /// </summary> + public string WaterLevel { get; set; } + + /// <summary> + /// 鍘嬪姏鎺у埗闃堝�� + /// </summary> + public string PressYu { get; set; } + } + + public class MqttViewModel + { + public string IP { get; set; } + public string Port { get; set; } + public string User { get; set; } + public string Password { get; set; } + public string Topic { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/IBoxFilterConfigViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/IBoxFilterConfigViewModel.cs new file mode 100644 index 0000000..2bb444e --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/IBoxFilterConfigViewModel.cs @@ -0,0 +1,41 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class IBoxFilterConfigViewModel + { + /// <summary> + /// 鏄惁鎺у埗杈撳叆 + /// </summary> + public bool IsControlInput { get; set; } = false; + + /// <summary> + /// 鎺у埗鍚戦噺鍊硷紝榛樿0.2 + /// </summary> + public double ControlInputValue { get; set; } = 0.2; + + /// <summary> + /// 娴嬮噺鍣0 + /// </summary> + public double RValue { get; set; } + + /// <summary> + /// 杩囩▼鍣0 + /// </summary> + public double QValue { get; set; } + + /// <summary> + /// 鐘舵�佽浆绉� + /// </summary> + public double AValue { get; set; } = 1; + + /// <summary> + /// 鐘舵�佽娴� + /// </summary> + public double HValue { get; set; } = 1; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/IBoxFilterViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/IBoxFilterViewModel.cs new file mode 100644 index 0000000..ffe4d03 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/IBoxFilterViewModel.cs @@ -0,0 +1,19 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class IBoxFilterViewModel + { + public bool IsFlowFilter { get; set; } + + public bool IsPressFilter { get; set; } + + public IBoxFilterConfigViewModel FlowFilterConfig { get; set; } + + public IBoxFilterConfigViewModel PressFilterConfig { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/IBoxLogViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/IBoxLogViewModel.cs new file mode 100644 index 0000000..4bd4d3f --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/IBoxLogViewModel.cs @@ -0,0 +1,31 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class IBoxLogViewModel + { + /// <summary> + /// 浜嬩欢鍚嶇О + /// </summary> + public string LogEvent { get; set; } + + /// <summary> + /// 鏃ュ織缁撴灉 + /// </summary> + public string LogResult { get; set; } + + /// <summary> + /// 浜嬩欢鏃堕棿 + /// </summary> + public string EventTime { get; set; } + + /// <summary> + /// 鏃ュ織鍐呭 + /// </summary> + public string LogContent { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/IBoxProtocolViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/IBoxProtocolViewModel.cs new file mode 100644 index 0000000..2861d69 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/IBoxProtocolViewModel.cs @@ -0,0 +1,63 @@ +锘縰sing System; +using System.Collections.Generic; +using System.IO.Ports; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class IBoxProtocolViewModel + { + /// <summary> + /// 鍗忚绫诲瀷 + /// </summary> + public string ProtocolType { get; set; } + + /// <summary> + /// IP鍦板潃 + /// </summary> + public string IP { get; set; } + + /// <summary> + /// 绔彛 + /// </summary> + public string Port { get; set; } + + /// <summary> + /// 娉㈢壒鐜� + /// </summary> + public int BaudRate { get; set; } + + /// <summary> + /// 濂囧伓鏍¢獙 + /// </summary> + public Parity parity { get; set; } + + /// <summary> + /// 鏁版嵁浣� + /// </summary> + public int dataBits { get; set; } + + /// <summary> + /// 鍋滄浣� + /// </summary> + public StopBits stopBits { get; set; } + + /// <summary> + /// 绔欏彿 + /// </summary> + public int StationNumber { get; set; } + + /// <summary> + /// 鏈烘灦鍙� + /// </summary> + public int RackNumber { get; set; } + + /// <summary> + /// 鎻掓Ы鍙� + /// </summary> + public int SlotNumber { get; set; } + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/PostViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/PostViewModel.cs new file mode 100644 index 0000000..3172374 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/PostViewModel.cs @@ -0,0 +1,13 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class PostViewModel + { + public string msg { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/PumpEnergyViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/PumpEnergyViewModel.cs new file mode 100644 index 0000000..bbec755 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/PumpEnergyViewModel.cs @@ -0,0 +1,16 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class PumpEnergyViewModel + { + public string Day { get; set; } + public decimal Supply { get; set; } + public decimal Electricity { get; set; } + public decimal EnergyOfWater { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/PumpRunStatusViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/PumpRunStatusViewModel.cs new file mode 100644 index 0000000..0390bc4 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/PumpRunStatusViewModel.cs @@ -0,0 +1,25 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class PumpRunStatusViewModel + { + public long ID { get; set; } + + public string Name { get; set; } + + public DateTime DateTime { get; set; } + + public int? RunStatus { get; set; } + + public long? BootTimes { get; set; } + + public long? ContinutRunTime { get; set; } + + public long? TotalRunTime { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/SimuViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/SimuViewModel.cs new file mode 100644 index 0000000..afd06bd --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/SimuViewModel.cs @@ -0,0 +1,40 @@ +锘縰sing PBS.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class SimuViewModel + { + public SimuViewModel() { } + + /// <summary> + /// 绯荤粺鏈�澶ф祦閲� + /// </summary> + public double SysMaxQ { get; set; } = 30; + + /// <summary> + /// 鎭掑帇 + /// </summary> + public double ConstantP { get; set; } = 110; + + /// <summary> + /// 褰撳墠寤虹瓚鐗� + /// </summary> + public Build CurrentBuild { get; set; } + + /// <summary> + /// 璁炬柦 + /// </summary> + public Facility Facilities { get; set; } + + ///// <summary> + ///// 妯℃嫙鍊煎垪琛� + ///// </summary> + //public List<SimuValueViewModel> SimuValues { get; set; } + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/SystemInfoViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/SystemInfoViewModel.cs new file mode 100644 index 0000000..37c8c3b --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/SystemInfoViewModel.cs @@ -0,0 +1,22 @@ +锘� +namespace IBox.WinFrmUI +{ + public class SystemInfoViewModel + { + public string Lan0IpAddress { get; set; } + + public string Wlan0IpAddress { get; set; } + + public string TotalRunTime { get; set;} + + public string SystemVersion { get; set; } + + public string Du { get; set;} + + public string Uptime { get; set; } + + public string CurrentTime { get; set; } + + public string MemUse { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/TemplateStoreViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/TemplateStoreViewModel.cs new file mode 100644 index 0000000..3cb73bb --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/TemplateStoreViewModel.cs @@ -0,0 +1,7 @@ +锘縩amespace IBox.WinFrmUI +{ + public class TemplateStoreViewModel + { + //public List<Hydro.MapView.Template> templates { get; set; } = new List<Hydro.MapView.Template>(); + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/TimeValue.cs b/WinFrmUI/IBox.WinFrmUI/Model/TimeValue.cs new file mode 100644 index 0000000..c9ddc8b --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/TimeValue.cs @@ -0,0 +1,37 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class TimeValue + { + public TimeValue() { } + public TimeValue(DateTime time, double value) + { + this.Time = time; + this.Value = value; + } + + public DateTime Time { get; set; } + public double Value { get; set; } + } + + + public class TimeRangeValue + { + public TimeRangeValue() { } + public TimeRangeValue(DateTime time, double min, double max) + { + this.Time = time; + this.MinValue = min; + this.MaxValue = max; + } + + public DateTime Time { get; set; } + public double MinValue { get; set; } + public double MaxValue { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/WaterPumpCalcViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/WaterPumpCalcViewModel.cs new file mode 100644 index 0000000..c8da2d5 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/WaterPumpCalcViewModel.cs @@ -0,0 +1,15 @@ +锘縰sing DevExpress.XtraCharts.Designer.Native; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class WaterPumpCalcViewModel + { + public PointF? PointF { get; set; } = null; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/WaterUtensilModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/WaterUtensilModel.cs new file mode 100644 index 0000000..fb2a6bd --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/WaterUtensilModel.cs @@ -0,0 +1,19 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class WaterUtensilModel + { + public string Name { get; set; } + + public int Count { get; set; } + + public float RatedFlow { get; set; } + + public float MinRatedFlow { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/Model/mathclass.cs b/WinFrmUI/IBox.WinFrmUI/Model/mathclass.cs new file mode 100644 index 0000000..15b420b --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Model/mathclass.cs @@ -0,0 +1,255 @@ +锘縰sing System; +using System; +using System; +using System.Collections.Generic; +using System.Collections.Generic; +using System.Collections.Generic; +using System.Linq; +using System.Linq; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + + +namespace CloudWaterNetwork +{ + public class Math_Expect + { + public List<double> _datas = null; + public Math_Expect(List<double> datas) + { + _datas = datas.Select(p => Math.Round(p, 1)).Distinct().ToList(); + + } + + public double Average() + { + return _datas.Average(); + } + + + + /// <summary> + /// 杩斿洖缃俊鍖洪棿鐨勪笂涓嬮檺鍊� + /// </summary> + /// <param name="x_percentile">鐢ㄦ埛鎸囧畾鐨勭疆淇℃按骞筹紝鍋囪鏄�90%</param> + /// <returns></returns> + public double[] GetExpect(double x_percentile) + { + //List<double> datas = _datas; + + //double mean = datas.Average(); // 姹傛湡鏈涘�� + + //double std_err = StdErr(datas); // 璁$畻鏍囧噯璇樊 + + + + //double x_percentile_z_score = ZScore(x_percentile / 100.0); // 鏍规嵁缃俊姘村钩璁$畻鍒嗕綅鐐� + + //double x_percentile_CI_lower = mean - x_percentile_z_score * std_err; // 涓嬮檺 + + //double x_percentile_CI_upper = mean + x_percentile_z_score * std_err; // 涓婇檺 + + //return new double[] {x_percentile_CI_lower,x_percentile_CI_upper }; + + + + //List<double> datas = new List<double>() { 2.0, 3.5, 1.2, 4.6, 5.2, 6.8, 7.5, 8.1, 9.0, 10.5 }; + List<double> datas = _datas; + + // 璁$畻鏈熸湜鍊� + double mean = datas.Average(); + + // 璁$畻95%缃俊鍖洪棿鑼冨洿 + //double alpha = 0.05; // 缃俊姘村钩 + double alpha = x_percentile; + double z = InvNormal(1 - alpha / 2); // 鏍规嵁姝f�佸垎甯冩眰鍑簔鍊� + double stdDev = Math.Sqrt(datas.Select(x => Math.Pow((x - mean), 2)).Sum() / (datas.Count - 1)); // 璁$畻鏍囧噯宸� + double marginOfError = z * stdDev / Math.Sqrt(datas.Count); // 璁$畻璇樊鑼冨洿 + double lowerBound = mean - marginOfError; // 涓嬮檺鑼冨洿 + double upperBound = mean + marginOfError; // 涓婇檺鑼冨洿 + + return new double[] { lowerBound, upperBound }; + //// 璁$畻x%缃俊鍖洪棿鑼冨洿锛屽80%缃俊鍖洪棿鑼冨洿 + //double xAlpha = 0.8; // 缃俊姘村钩 + //double xZ = InvNormal(1 - xAlpha / 2); // 鏍规嵁姝f�佸垎甯冩眰鍑簔鍊� + //double xMarginOfError = xZ * stdDev / Math.Sqrt(datas.Count); // 璁$畻璇樊鑼冨洿 + //double xLowerBound = mean - xMarginOfError; // 涓嬮檺鑼冨洿 + //double xUpperBound = mean + xMarginOfError; // 涓婇檺鑼冨洿 + + + } + + + public double[] GetPercent(double x_percentile) + { + return new double[] { GetPercent_single(x_percentile), GetPercent_single(1 - x_percentile) }; + } + + public double GetPercent_single(double x_percentile) + { + _datas.Sort(); + int n = _datas.Count; + double index = x_percentile * (n - 1); + double frac = index % 1; + if (frac == 0) + { + return _datas[(int)index]; + } + else + { + int lowIndex = (int)index; + int highIndex = lowIndex + 1; + + double lowValue = _datas[lowIndex]; + double highValue = _datas[highIndex]; + + return lowValue + (highValue - lowValue) * frac; + } + } + public static double InvNormal(double p) + { + double a0 = 2.50662823884; + double a1 = -18.61500062529; + double a2 = 41.39119773534; + double a3 = -25.44106049637; + double b1 = -8.47351093090; + double b2 = 23.08336743743; + double b3 = -21.06224101826; + double b4 = 3.13082909833; + double c0 = -2.78718931138; + double c1 = -2.29796479134; + double c2 = 4.85014127135; + double c3 = 2.32121276858; + double d1 = 3.54388924762; + double d2 = 1.63706781897; + double p_low = 0.02425; + double p_high = 1.0 - p_low; + double q, r; + + if ((p < 0) || (p > 1)) + { + throw new ArgumentOutOfRangeException("Probability p must be between 0 and 1."); + } + + if (p < p_low) + { + q = Math.Sqrt(-2 * Math.Log(p)); + return (((((c3 * q + c2) * q + c1) * q) + c0) / ((((d2 * q + d1) * q) + 1) * q + 0.0)); + } + else if (p <= p_high) + { + q = p - 0.5; + r = q * q; + return (((((a3 * r + a2) * r + a1) * r) + a0) * q) / + ((((b4 * r + b3) * r + b2) * r + b1) * r + 1); + } + else + { + q = Math.Sqrt(-2 * Math.Log(1 - p)); + return -((((((c3 * q + c2) * q) + c1) * q) + c0) / ((((d2 * q + d1) * q) + 1) * q + 0.0)); + } + } + double StdErr(List<double> datas) + { + double mean = datas.Average(); + double sum_squares = datas.Sum(d => Math.Pow(d - mean, 2)); + int n = datas.Count; + return Math.Sqrt(sum_squares / (n - 1)) / Math.Sqrt(n); + } + + double ZScore(double confidence_level) + { + double z_score = 0; + + if (confidence_level > 0 && confidence_level < 1) + { + double tail_area = (1 - confidence_level) / 2; + + z_score = Math.Abs(NormSInv(tail_area)); + } + + return z_score; + } + + double NormSInv(double p) + { + if (p < 0 || p > 1) + { + throw new ArgumentOutOfRangeException("Argument out of range: " + nameof(p)); + } + else if (p == 0) + { + return double.NegativeInfinity; + } + else if (p == 1) + { + return double.PositiveInfinity; + } + + // Abramowitz and Stegun formula 26.2.23. + // The absolute value of the error should be less than 4.5 e-4. + double[] a = new double[] + { + -3.969683028665376e+01, + 2.209460984245205e+02, + -2.759285104469687e+02, + 1.383577518672690e+02, + -3.066479806614716e+01, + 2.506628277459239e+00 + }; + + double[] b = new double[] + { + -5.447609879822406e+01, + 1.615858368580409e+02, + -1.556989798598866e+02, + 6.680131188771972e+01, + -1.328068155288572e+01 + }; + + double[] c = new double[] + { + -7.784894002430293e-03, + -3.223964580411365e-01, + -2.400758277161838e+00, + -2.549732539343734e+00, + 4.374664141464968e+00, + 2.938163982698783e+00 + }; + + double[] d = new double[] + { + 7.784695709041462e-03, + 3.224671290700398e-01, + 2.445134137142996e+00, + 3.754408661907416e+00 + }; + + // Define break-points. + double p_low = 0.02425; + double p_high = 1 - p_low; + + // Rational approximation for lower region: + if (p < p_low) + { + double q = Math.Sqrt(-2 * Math.Log(p)); + return (((((c[0] * q + c[1]) * q + c[2]) * q + c[3]) * q + c[4]) * q + c[5]) / ((((d[0] * q + d[1]) * q + d[2]) * q + d[3]) * q + 1); + } + // Rational approximation for upper region: + else if (p > p_high) + { + double q = Math.Sqrt(-2 * Math.Log(1 - p)); + return -(((((c[0] * q + c[1]) * q + c[2]) * q + c[3]) * q + c[4]) * q + c[5]) / ((((d[0] * q + d[1]) * q + d[2]) * q + d[3]) * q + 1); + } + // Rational approximation for central region: + else + { + double q = p - 0.5; + double r = q * q; + return (((((a[0] * r + a[1]) * r + a[2]) * r + a[3]) * r + a[4]) * r + a[5]) * q / (((((b[0] * r + b[1]) * r + b[2]) * r + b[3]) * r + b[4]) * r + 1); + } + } + } +} + diff --git a/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.Designer.cs b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.Designer.cs new file mode 100644 index 0000000..4e098f7 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.Designer.cs @@ -0,0 +1,167 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class AnalyDayForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.dateEdit1 = new DevExpress.XtraEditors.DateEdit(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.simpleButton1); + this.dataLayoutControl1.Controls.Add(this.dateEdit1); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(455, 69); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.emptySpaceItem1, + this.layoutControlItem2, + this.emptySpaceItem2}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(455, 69); + this.Root.TextVisible = false; + // + // dateEdit1 + // + this.dateEdit1.EditValue = null; + this.dateEdit1.Location = new System.Drawing.Point(72, 12); + this.dateEdit1.Name = "dateEdit1"; + this.dateEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEdit1.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEdit1.Size = new System.Drawing.Size(177, 20); + this.dateEdit1.StyleController = this.dataLayoutControl1; + this.dateEdit1.TabIndex = 4; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.dateEdit1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(241, 24); + this.layoutControlItem1.Text = "鏍¢獙鏃ユ湡"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14); + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 24); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(241, 25); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // simpleButton1 + // + this.simpleButton1.Location = new System.Drawing.Point(363, 12); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(80, 22); + this.simpleButton1.StyleController = this.dataLayoutControl1; + this.simpleButton1.TabIndex = 5; + this.simpleButton1.Text = "纭畾"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.simpleButton1; + this.layoutControlItem2.Location = new System.Drawing.Point(351, 0); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(84, 49); + this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem2.TextVisible = false; + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(241, 0); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(110, 49); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // AnalyDayForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(455, 69); + this.Controls.Add(this.dataLayoutControl1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "AnalyDayForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "鏍¢獙"; + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraEditors.DateEdit dateEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.cs b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.cs new file mode 100644 index 0000000..09cfc87 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.cs @@ -0,0 +1,28 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public partial class AnalyDayForm : Form + { + public string CurrDateTime { get; set; } + public AnalyDayForm() + { + InitializeComponent(); + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + this.CurrDateTime= dateEdit1.EditValue.ToString(); + DialogResult = DialogResult.OK; + this.Close(); + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.resx b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/AnalyDayForm.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.Designer.cs b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.Designer.cs new file mode 100644 index 0000000..d83adf1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.Designer.cs @@ -0,0 +1,174 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class MonitorGroupEditForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.textEditName = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEditName.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.simpleButton2); + this.dataLayoutControl1.Controls.Add(this.simpleButton1); + this.dataLayoutControl1.Controls.Add(this.textEditName); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(359, 140); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // simpleButton2 + // + this.simpleButton2.Location = new System.Drawing.Point(181, 106); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(166, 22); + this.simpleButton2.StyleController = this.dataLayoutControl1; + this.simpleButton2.TabIndex = 7; + this.simpleButton2.Text = "鍙栨秷"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // simpleButton1 + // + this.simpleButton1.Location = new System.Drawing.Point(12, 106); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(165, 22); + this.simpleButton1.StyleController = this.dataLayoutControl1; + this.simpleButton1.TabIndex = 6; + this.simpleButton1.Text = "纭畾"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // textEditName + // + this.textEditName.Location = new System.Drawing.Point(72, 12); + this.textEditName.Name = "textEditName"; + this.textEditName.Size = new System.Drawing.Size(275, 20); + this.textEditName.StyleController = this.dataLayoutControl1; + this.textEditName.TabIndex = 4; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem3, + this.layoutControlItem4, + this.emptySpaceItem1}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(359, 140); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.textEditName; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(339, 24); + this.layoutControlItem1.Text = "鏈虹粍鍚嶇О"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.simpleButton1; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 94); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(169, 26); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.simpleButton2; + this.layoutControlItem4.Location = new System.Drawing.Point(169, 94); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(170, 26); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 24); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(339, 70); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // MonitorGroupEditForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(359, 140); + this.Controls.Add(this.dataLayoutControl1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "MonitorGroupEditForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "鏈虹粍"; + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEditName.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraEditors.TextEdit textEditName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.cs b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.cs new file mode 100644 index 0000000..4ae3746 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.cs @@ -0,0 +1,65 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public partial class MonitorGroupEditForm : Form + { + public MonitorGroupEditForm(MonitorPointGroup monitorPointGroup) + { + InitializeComponent(); + //SetData(); + if (monitorPointGroup != null) + BindData(monitorPointGroup); + } + public MonitorPointGroup group { get; set; } + private void simpleButton2_Click(object sender, EventArgs e) + { + this.Close(); + } + + private List<string> GetFlags() + { + return new List<string>() + { + "鏈虹粍" + }; + } + + private void SetData() + { + foreach(var item in GetFlags()) + { + //textEditFlags.Properties.Items.Add(item); + } + } + + private void BindData(MonitorPointGroup group) + { + this.group = group; + textEditName.EditValue = group.Name; + } + + private void GetData() + { + if (this.group == null) + this.group = new MonitorPointGroup(); + this.group.Name= textEditName.EditValue.ToString(); + //this.group.Flags= textEditFlags.EditValue.ToString().Split(',').ToList(); + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + GetData(); + DialogResult = DialogResult.OK; + this.Close(); + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.resx b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/MonitorGroupEditForm.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.Designer.cs b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.Designer.cs new file mode 100644 index 0000000..8a8c628 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.Designer.cs @@ -0,0 +1,543 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class SignalEditForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.textEdit13 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit11 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit10 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit8 = new DevExpress.XtraEditors.TextEdit(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.textEdit5 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit1 = new DevExpress.XtraEditors.TextEdit(); + this.textEdit4 = new DevExpress.XtraEditors.CheckEdit(); + this.textEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.textEdit3 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.textEdit6 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.textEdit7 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.textEdit9 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.textEdit14 = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + this.textEdit12 = new DevExpress.XtraEditors.CheckedComboBoxEdit(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit13.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit11.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit10.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit8.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit5.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit4.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit3.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit6.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit7.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit9.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit14.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit12.Properties)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.textEdit13); + this.dataLayoutControl1.Controls.Add(this.textEdit11); + this.dataLayoutControl1.Controls.Add(this.textEdit10); + this.dataLayoutControl1.Controls.Add(this.textEdit8); + this.dataLayoutControl1.Controls.Add(this.simpleButton2); + this.dataLayoutControl1.Controls.Add(this.simpleButton1); + this.dataLayoutControl1.Controls.Add(this.textEdit5); + this.dataLayoutControl1.Controls.Add(this.textEdit1); + this.dataLayoutControl1.Controls.Add(this.textEdit4); + this.dataLayoutControl1.Controls.Add(this.textEdit2); + this.dataLayoutControl1.Controls.Add(this.textEdit3); + this.dataLayoutControl1.Controls.Add(this.textEdit6); + this.dataLayoutControl1.Controls.Add(this.textEdit7); + this.dataLayoutControl1.Controls.Add(this.textEdit9); + this.dataLayoutControl1.Controls.Add(this.textEdit14); + this.dataLayoutControl1.Controls.Add(this.textEdit12); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(409, 618); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // textEdit13 + // + this.textEdit13.Location = new System.Drawing.Point(84, 300); + this.textEdit13.Name = "textEdit13"; + this.textEdit13.Size = new System.Drawing.Size(313, 20); + this.textEdit13.StyleController = this.dataLayoutControl1; + this.textEdit13.TabIndex = 18; + // + // textEdit11 + // + this.textEdit11.EditValue = "0"; + this.textEdit11.Location = new System.Drawing.Point(84, 252); + this.textEdit11.Name = "textEdit11"; + this.textEdit11.Size = new System.Drawing.Size(313, 20); + this.textEdit11.StyleController = this.dataLayoutControl1; + this.textEdit11.TabIndex = 16; + // + // textEdit10 + // + this.textEdit10.EditValue = "0"; + this.textEdit10.Location = new System.Drawing.Point(84, 228); + this.textEdit10.Name = "textEdit10"; + this.textEdit10.Size = new System.Drawing.Size(313, 20); + this.textEdit10.StyleController = this.dataLayoutControl1; + this.textEdit10.TabIndex = 15; + // + // textEdit8 + // + this.textEdit8.EditValue = "2"; + this.textEdit8.Location = new System.Drawing.Point(84, 180); + this.textEdit8.Name = "textEdit8"; + this.textEdit8.Size = new System.Drawing.Size(313, 20); + this.textEdit8.StyleController = this.dataLayoutControl1; + this.textEdit8.TabIndex = 13; + // + // simpleButton2 + // + this.simpleButton2.Location = new System.Drawing.Point(206, 584); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(191, 22); + this.simpleButton2.StyleController = this.dataLayoutControl1; + this.simpleButton2.TabIndex = 11; + this.simpleButton2.Text = "鍙栨秷"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // simpleButton1 + // + this.simpleButton1.Location = new System.Drawing.Point(12, 584); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(190, 22); + this.simpleButton1.StyleController = this.dataLayoutControl1; + this.simpleButton1.TabIndex = 10; + this.simpleButton1.Text = "纭畾"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // textEdit5 + // + this.textEdit5.Location = new System.Drawing.Point(84, 84); + this.textEdit5.Name = "textEdit5"; + this.textEdit5.Size = new System.Drawing.Size(313, 20); + this.textEdit5.StyleController = this.dataLayoutControl1; + this.textEdit5.TabIndex = 8; + // + // textEdit1 + // + this.textEdit1.Location = new System.Drawing.Point(84, 12); + this.textEdit1.Name = "textEdit1"; + this.textEdit1.Size = new System.Drawing.Size(313, 20); + this.textEdit1.StyleController = this.dataLayoutControl1; + this.textEdit1.TabIndex = 4; + // + // textEdit4 + // + this.textEdit4.EditValue = null; + this.textEdit4.Location = new System.Drawing.Point(12, 324); + this.textEdit4.Name = "textEdit4"; + this.textEdit4.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default; + this.textEdit4.Properties.Caption = "鏄惁鍚敤"; + this.textEdit4.Size = new System.Drawing.Size(385, 20); + this.textEdit4.StyleController = this.dataLayoutControl1; + this.textEdit4.TabIndex = 7; + // + // textEdit2 + // + this.textEdit2.Location = new System.Drawing.Point(84, 60); + this.textEdit2.Name = "textEdit2"; + this.textEdit2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEdit2.Size = new System.Drawing.Size(313, 20); + this.textEdit2.StyleController = this.dataLayoutControl1; + this.textEdit2.TabIndex = 5; + // + // textEdit3 + // + this.textEdit3.Location = new System.Drawing.Point(84, 36); + this.textEdit3.Name = "textEdit3"; + this.textEdit3.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEdit3.Size = new System.Drawing.Size(313, 20); + this.textEdit3.StyleController = this.dataLayoutControl1; + this.textEdit3.TabIndex = 6; + // + // textEdit6 + // + this.textEdit6.Location = new System.Drawing.Point(84, 108); + this.textEdit6.Name = "textEdit6"; + this.textEdit6.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEdit6.Size = new System.Drawing.Size(313, 20); + this.textEdit6.StyleController = this.dataLayoutControl1; + this.textEdit6.TabIndex = 9; + // + // textEdit7 + // + this.textEdit7.Location = new System.Drawing.Point(84, 132); + this.textEdit7.Name = "textEdit7"; + this.textEdit7.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEdit7.Size = new System.Drawing.Size(313, 20); + this.textEdit7.StyleController = this.dataLayoutControl1; + this.textEdit7.TabIndex = 12; + // + // textEdit9 + // + this.textEdit9.Location = new System.Drawing.Point(84, 204); + this.textEdit9.Name = "textEdit9"; + this.textEdit9.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEdit9.Size = new System.Drawing.Size(313, 20); + this.textEdit9.StyleController = this.dataLayoutControl1; + this.textEdit9.TabIndex = 14; + // + // textEdit14 + // + this.textEdit14.Location = new System.Drawing.Point(84, 156); + this.textEdit14.Name = "textEdit14"; + this.textEdit14.Size = new System.Drawing.Size(313, 20); + this.textEdit14.StyleController = this.dataLayoutControl1; + this.textEdit14.TabIndex = 19; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.emptySpaceItem1, + this.layoutControlItem3, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem8, + this.layoutControlItem9, + this.layoutControlItem10, + this.layoutControlItem11, + this.layoutControlItem12, + this.layoutControlItem13, + this.layoutControlItem4, + this.layoutControlItem14, + this.layoutControlItem15, + this.layoutControlItem2, + this.layoutControlItem16}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(409, 618); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.textEdit1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem1.Text = "鍚嶇О"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(60, 14); + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 336); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(389, 236); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.textEdit3; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem3.Text = "绫诲瀷"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.textEdit5; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem5.Text = "瀵勫瓨鍣ㄥ湴鍧�"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.textEdit6; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem6.Text = "鏁版嵁绫诲瀷"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.simpleButton1; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 572); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(194, 26); + this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem7.TextVisible = false; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.simpleButton2; + this.layoutControlItem8.Location = new System.Drawing.Point(194, 572); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(195, 26); + this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem8.TextVisible = false; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.textEdit7; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 120); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem9.Text = "杩愮畻绗�"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.textEdit8; + this.layoutControlItem10.Location = new System.Drawing.Point(0, 168); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem10.Text = "绮惧害"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.textEdit9; + this.layoutControlItem11.Location = new System.Drawing.Point(0, 192); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem11.Text = "Adc绫诲瀷"; + this.layoutControlItem11.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.textEdit10; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 216); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem12.Text = "涓婇噺绋�"; + this.layoutControlItem12.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem13 + // + this.layoutControlItem13.Control = this.textEdit11; + this.layoutControlItem13.Location = new System.Drawing.Point(0, 240); + this.layoutControlItem13.Name = "layoutControlItem13"; + this.layoutControlItem13.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem13.Text = "涓嬮噺绋�"; + this.layoutControlItem13.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.textEdit4; + this.layoutControlItem4.Location = new System.Drawing.Point(0, 312); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // layoutControlItem14 + // + this.layoutControlItem14.Control = this.textEdit12; + this.layoutControlItem14.Location = new System.Drawing.Point(0, 264); + this.layoutControlItem14.Name = "layoutControlItem14"; + this.layoutControlItem14.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem14.Text = "鏍囩"; + this.layoutControlItem14.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem15 + // + this.layoutControlItem15.Control = this.textEdit13; + this.layoutControlItem15.Location = new System.Drawing.Point(0, 288); + this.layoutControlItem15.Name = "layoutControlItem15"; + this.layoutControlItem15.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem15.Text = "璇存槑"; + this.layoutControlItem15.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.textEdit2; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem2.Text = "鎵�灞炴満缁�"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem16 + // + this.layoutControlItem16.Control = this.textEdit14; + this.layoutControlItem16.Location = new System.Drawing.Point(0, 144); + this.layoutControlItem16.Name = "layoutControlItem16"; + this.layoutControlItem16.Size = new System.Drawing.Size(389, 24); + this.layoutControlItem16.Text = "杩愮畻鍊�"; + this.layoutControlItem16.TextSize = new System.Drawing.Size(60, 14); + // + // textEdit12 + // + this.textEdit12.Location = new System.Drawing.Point(84, 276); + this.textEdit12.Name = "textEdit12"; + this.textEdit12.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEdit12.Size = new System.Drawing.Size(313, 20); + this.textEdit12.StyleController = this.dataLayoutControl1; + this.textEdit12.TabIndex = 17; + // + // SignalEditForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(409, 618); + this.Controls.Add(this.dataLayoutControl1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "SignalEditForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "鐩戞祴鐐逛俊鎭�"; + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEdit13.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit11.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit10.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit8.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit5.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit4.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit3.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit6.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit7.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit9.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit14.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit12.Properties)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraEditors.TextEdit textEdit5; + private DevExpress.XtraEditors.TextEdit textEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraEditors.TextEdit textEdit11; + private DevExpress.XtraEditors.TextEdit textEdit10; + private DevExpress.XtraEditors.TextEdit textEdit8; + private DevExpress.XtraEditors.CheckEdit textEdit4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraEditors.ImageComboBoxEdit textEdit2; + private DevExpress.XtraEditors.ImageComboBoxEdit textEdit3; + private DevExpress.XtraEditors.ImageComboBoxEdit textEdit6; + private DevExpress.XtraEditors.ImageComboBoxEdit textEdit7; + private DevExpress.XtraEditors.ImageComboBoxEdit textEdit9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + private DevExpress.XtraEditors.TextEdit textEdit13; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraEditors.TextEdit textEdit14; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; + private DevExpress.XtraEditors.CheckedComboBoxEdit textEdit12; + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.cs b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.cs new file mode 100644 index 0000000..1f1537b --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.cs @@ -0,0 +1,136 @@ +锘縰sing DevExpress.Pdf.Native.BouncyCastle.Asn1.Tsp; +using DevExpress.XtraEditors.Controls; +using DevExpress.XtraEditors.Repository; +using NPOI.SS.Formula.Functions; +using NPOI.Util; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public partial class SignalEditForm : Form + { + public SignalEditForm(List<GeneralViewModel> signalTypes, List<MonitorPointGroup> monitorPoints, Signal signal) + { + this.signalTypes = signalTypes; + this.monitorPoints = monitorPoints; + InitializeComponent(); + SetData(); + if (signal != null) + BindData(signal); + } + private List<GeneralViewModel> signalTypes; + private List<MonitorPointGroup> monitorPoints; + public Signal signal; + private void simpleButton2_Click(object sender, EventArgs e) + { + this.Close(); + } + + private List<string> GetFlags() + { + return new List<string>() + { + "鎺у埗娴侀噺","鎺у埗鍘嬪姏","娉靛悗鍘嬪姏","鎺у埗鍔熺巼","鎺у埗棰戠巼","鎺у埗姘翠綅","鐢佃��","1#","2#","3#","4#","5#" + }; + } + + public void GetData() + { + if (signal == null) + signal = new Signal(); + + signal.Accuracy = int.Parse(textEdit8.EditValue.ToString()); + signal.Name = textEdit1.EditValue.ToString(); + signal.SignalTypeID = long.Parse(textEdit3.EditValue.ToString()); + signal.BusAddress = textEdit5.EditValue?.ToString(); + signal.GroupID = long.Parse(textEdit2.EditValue.ToString()); + signal.Operator = int.Parse(textEdit7.EditValue.ToString()); + signal.Operands = textEdit14.EditValue?.ToString(); + signal.AdcType = int.Parse(textEdit9.EditValue.ToString()); + signal.BusType = int.Parse(textEdit6.EditValue.ToString()); + signal.Description = textEdit13.EditValue?.ToString(); + signal.IsEnable = textEdit4.Checked; + signal.LowerRange = decimal.Parse(textEdit11.EditValue.ToString()); + signal.UpperRange = decimal.Parse(textEdit10.EditValue.ToString()); + signal.Flags = textEdit12.EditValue?.ToString().Replace(", ", ",").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + } + + public void BindData(Signal signal) + { + this.signal = signal; + textEdit8.EditValue = signal.Accuracy; + textEdit1.EditValue = signal.Name; + textEdit3.EditValue = signal.SignalTypeID; + textEdit5.EditValue = signal.BusAddress; + textEdit2.EditValue = signal.GroupID; + textEdit7.EditValue = signal.Operator; + textEdit14.EditValue = signal.Operands; + textEdit9.EditValue = signal.AdcType; + textEdit6.EditValue = signal.BusType; + textEdit13.EditValue = signal.Description; + textEdit4.Checked = signal.IsEnable; + textEdit11.EditValue = signal.LowerRange; + textEdit10.EditValue = signal.UpperRange; + //textEdit12.EditValue = signal.Flags; + + for (var i = 0; i < textEdit12.Properties.Items.Count; i++) + { + if (signal.Flags.Contains(textEdit12.Properties.Items[i].ToString())) + textEdit12.Properties.Items[i].CheckState = CheckState.Checked; + } + } + + + private void SetData() + { + var dics = new dModbus().ModbusDataType(); + foreach (var d in dics) + { + textEdit6.Properties.Items.Add(d.Value, d.Key, -1); + } + textEdit6.EditValue = 4; + + var adcDics = new dModbus().AdcType(); + foreach (var adc in adcDics) + { + textEdit9.Properties.Items.Add(adc.Value, adc.Key, -1); + } + textEdit9.EditValue = 0; + var operDics = new dModbus().OperType(); + foreach (var oper in operDics) + { + textEdit7.Properties.Items.Add(oper.Value, oper.Key, -1); + } + textEdit7.EditValue = 0; + foreach (var item in signalTypes) + { + textEdit3.Properties.Items.Add(item.Name, item.ID, -1); + } + + foreach (var item in monitorPoints) + { + textEdit2.Properties.Items.Add(item.Name, item.ID, -1); + } + + foreach (var item in GetFlags()) + { + textEdit12.Properties.Items.Add(item.ToString().Trim()); + } + } + + private void simpleButton1_Click(object sender, EventArgs e) + { + GetData(); + DialogResult = DialogResult.OK; + this.Close(); + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.resx b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/MonitorSignalForm/SignalEditForm.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/Untity/FilterKalman.cs b/WinFrmUI/IBox.WinFrmUI/Untity/FilterKalman.cs new file mode 100644 index 0000000..20180ff --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/Untity/FilterKalman.cs @@ -0,0 +1,105 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class FilterKalman + { + private double A = 1; + private double B = 0; + private double H = 1; + + private double R; + private double Q; + + private double cov = double.NaN; + private double x = double.NaN; + public FilterKalman() + { + + } + /// <summary> + /// 鍗″皵鏇兼护娉� + /// </summary> + public FilterKalman(double R, double Q, double A, double B, double H) + { + this.R = R; + this.Q = Q; + + this.A = A; + this.B = B; + this.H = H; + + this.cov = double.NaN; + this.x = double.NaN; + } + + /// <summary> + /// + /// </summary> + public FilterKalman(double R, double Q) + { + this.R = R; + this.Q = Q; + } + + public double filter(double measurement, double u) + { + if (double.IsNaN(this.x)) + { + this.x = (1 / this.H) * measurement; + this.cov = (1 / this.H) * this.Q * (1 / this.H); + } + else + { + double predX = (this.A * this.x) + (this.B * u); + double predCov = ((this.A * this.cov) * this.A) + this.Q; + + double K = predCov * this.H * (1 / ((this.H * predCov * this.H) + this.Q)); + + this.x = predX + K * (measurement - (this.H * predX)); + this.cov = predCov - (K * this.H * predCov); + } + return this.x; + } + + public double filter(double measurement) + { + double u = 0; + if (double.IsNaN(this.x)) + { + this.x = (1 / this.H) * measurement; + this.cov = (1 / this.H) * this.Q * (1 / this.H); + } + else + { + double predX = (this.A * this.x) + (this.B * u); + double predCov = ((this.A * this.cov) * this.A) + this.R; + + double K = predCov * this.H * (1 / ((this.H * predCov * this.H) + this.Q)); + + this.x = predX + K * (measurement - (this.H * predX)); + this.cov = predCov - (K * this.H * predCov); + } + return this.x; + } + + public double lastMeasurement() + { + return this.x; + } + + public void setMeasurementNoise(double noise) + { + this.Q = noise; + } + + public void setProcessNoise(double noise) + { + this.R = noise; + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/ConstParas.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/ConstParas.cs new file mode 100644 index 0000000..85ca488 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/ConstParas.cs @@ -0,0 +1,18 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// 鍥哄畾鍙傛暟 + /// </summary> + public class ConstantParas + { + /// <summary> + /// 閲嶅姏鍔犻�熷害 m/s虏 + /// </summary> + public const double g = 9.81; + + /// <summary> + /// 姘寸殑瀵嗗害 g/L kg/m鲁 + /// </summary> + public const double WaterDensity = 1000; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/DataStatus.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/DataStatus.cs new file mode 100644 index 0000000..6d02455 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/DataStatus.cs @@ -0,0 +1,94 @@ +锘縰sing System.Collections.Generic; +using System.Linq; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 鏁版嵁鐘舵�� + /// </summary> + public static class DataStatus + { + #region 鐘舵�侀噺 + + /// <summary> + /// 寮�鏈� + /// </summary> + public const string Run = "KJ"; + + /// <summary> + /// 鍏虫満 + /// </summary> + public const string Shut = "GJ"; + + /// <summary> + /// 鎶ヨ + /// </summary> + public const string Alarm = "BJ"; + + /// <summary> + /// 琛ュ厖 + /// </summary> + public const string Supplement = "BC"; + + #endregion + + #region 閿欒閲� + + /// <summary> + /// 鏁版嵁鏍煎紡閿欒 + /// </summary> + public const string DataFormatError = "SZGSCW"; + + /// <summary> + /// 杞崲澶辫触 + /// </summary> + public const string ConvertFailed = "ZHSB"; + + /// <summary> + /// 杩囨护澶辫触 + /// </summary> + public const string FilterFailed = "GLSB"; + + /// <summary> + /// 璁$畻澶辫触 + /// </summary> + public const string CalculateFailed = "JSSB"; + + #endregion + + /// <summary> + /// 鏄惁姝e父 + /// </summary> + public static bool IsNormal(this List<string> dataStatusList) + { + if (dataStatusList == null || !dataStatusList.Any()) + return true; + if (dataStatusList.Contains(DataFormatError)) + { + return false; + } + if (dataStatusList.Contains(ConvertFailed)) + { + return false; + } + if (dataStatusList.Contains(FilterFailed)) + { + return false; + } + if (dataStatusList.Contains(CalculateFailed)) + { + return false; + } + return true; + } + + /// <summary> + /// 鏄惁鏈夐敊璇� + /// </summary> + public static bool HasError(this List<string> dataStatusList) + { + return !IsNormal(dataStatusList); + } + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/DataType.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/DataType.cs new file mode 100644 index 0000000..0f5bb48 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/DataType.cs @@ -0,0 +1,44 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class DataType + { + /// <summary> + /// 鐩戞祴鍏紡缁� + /// </summary> + public const string MonitorFormulaGroup = "monitor-formula-group"; + + /// <summary> + /// 鐩戞祴鍏紡 + /// </summary> + public const string MonitorFormula = "monitor-formula"; + + /// <summary> + /// 淇″彿绫诲瀷缁� + /// </summary> + public const string SignalTypeGroup = "signal-type-group"; + + /// <summary> + /// 淇″彿绫诲瀷 + /// </summary> + public const string SignalType = "signal-type"; + + /// <summary> + /// 娴嬬偣缁� + /// </summary> + public const string MonitorPointGroup = "monitor-point-group"; + + /// <summary> + /// 娴嬬偣 + /// </summary> + public const string MonitorPoint = "monitor-point"; + + /// <summary> + /// 淇″彿 + /// </summary> + public const string Signal = "signal"; + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/Flags.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/Flags.cs new file mode 100644 index 0000000..8088e86 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/Flags.cs @@ -0,0 +1,31 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class Flags + { + /// <summary> + /// 榛樿 + /// </summary> + public const string 榛樿 = "榛樿"; + + /// <summary> + /// 鎸姩 + /// </summary> + public const string 鏈虹粍 = "鏈虹粍"; + + /// <summary> + /// 鍑哄彛 + /// </summary> + public const string 鍑哄彛 = "鍑哄彛"; + + /// <summary> + /// 杩涘彛 + /// </summary> + public const string 杩涘彛 = "杩涘彛"; + + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/Formula.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/Formula.cs new file mode 100644 index 0000000..c61da36 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/Formula.cs @@ -0,0 +1,242 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class Formula + { + + #region 璁$畻 + + #region 鍙橀噺 + + /// <summary> + /// 璁$畻-鍗曞彉閲忚〃杈惧紡 + /// </summary> + public const string Calculation_鍗曞彉閲忚〃杈惧紡 = "calculation-single-expression"; + + /// <summary> + /// 璁$畻-鍖洪棿琛ㄨ揪寮� + /// </summary> + public const string Calculation_鍖洪棿琛ㄨ揪寮� = "calculation-interval-expression"; + + /// <summary> + /// 璁$畻-澶氬彉閲忚〃杈惧紡 + /// </summary> + public const string Calculation_澶氬彉閲忚〃杈惧紡 = "calculation-multi-expression"; + + #endregion + + #region 绱Н + + /// <summary> + /// 鏁板�肩疮绉� + /// </summary> + public const string Calculation_鏁板�肩疮绉� = "calculation-numeric-accumulate"; + + /// <summary> + /// 鏃堕棿绱Н + /// </summary> + public const string Calculation_鏃堕棿绱Н = "calculation-time-accumulate"; + + #endregion + + #region 娉� + + /// <summary> + /// 娉垫壃绋� + /// </summary> + public const string Calculation_娉垫壃绋� = "calculation-pump-h"; + + /// <summary> + /// 娉垫晥鐜� + /// </summary> + public const string Calculation_娉垫晥鐜� = "calculation-pump-e"; + + /// <summary> + /// 娉靛崈鍚ㄨ兘鑰� + /// </summary> + public const string Calculation_娉靛崈鍚ㄨ兘鑰� = "calculation-pump-wp"; + + /// <summary> + /// 娉靛崟浣嶈兘鑰� + /// </summary> + public const string Calculation_娉靛崟浣嶈兘鑰� = "calculation-pump-uwp"; + + #endregion + + #region 鎸姩 + + #region 鏃跺煙 + + /// <summary> + /// 璁$畻 -鎸姩鏈夋晥鍊� + /// </summary> + public const string Calculation_鎸姩鏈夋晥鍊� = "calculation-vibration-effective-value"; + + /// <summary> + /// 璁$畻 -鎸姩宄板�� + /// </summary> + public const string Calculation_鎸姩宄板�� = "calculation-vibration-peak-value"; + + /// <summary> + /// 璁$畻 -鎸姩宄板嘲鍊� + /// </summary> + public const string Calculation_鎸姩宄板嘲鍊� = "calculation-vibration-peaks-value"; + + /// <summary> + /// 璁$畻 -鎸姩骞冲潎骞呭�� + /// </summary> + public const string Calculation_鎸姩骞冲潎骞呭�� = "calculation-vibration-avg-amplitude-value"; + + /// <summary> + /// 璁$畻 -鎸姩鏂规牴骞呭�� + /// </summary> + public const string Calculation_鎸姩鏂规牴骞呭�� = "calculation-vibration-root-amplitude-value"; + + /// <summary> + /// 璁$畻 -鎸姩娉㈠舰鎸囨爣 + /// </summary> + public const string Calculation_鎸姩娉㈠舰鎸囨爣 = "calculation-vibration-wave-quota"; + + /// <summary> + /// 璁$畻 -鎸姩鑴夊啿鎸囨爣 + /// </summary> + public const string Calculation_鎸姩鑴夊啿鎸囨爣 = "calculation-vibration-pulse-quota"; + + /// <summary> + /// 璁$畻 -鎸姩宄板�兼寚鏍� + /// </summary> + public const string Calculation_鎸姩宄板�兼寚鏍� = "calculation-vibration-peak-quota"; + + /// <summary> + /// 璁$畻 -鎸姩瑁曞害鎸囨爣 + /// </summary> + public const string Calculation_鎸姩瑁曞害鎸囨爣 = "calculation-vibration-margin-quota"; + + /// <summary> + /// 璁$畻 -鎸姩姝害鎸囨爣 + /// </summary> + public const string Calculation_鎸姩姝害鎸囨爣 = "calculation-vibration-skew-quota"; + + /// <summary> + /// 璁$畻 -鎸姩宄害鎸囨爣 + /// </summary> + public const string Calculation_鎸姩宄害鎸囨爣 = "calculation-vibration-kurtosis-quota"; + + /// <summary> + /// 璁$畻-鎸姩娉㈠舰鍥� + /// </summary> + public const string Calculation_鎸姩娉㈠舰鍥� = "calculation-vibration-wave-spectrum"; + + #endregion + + #region 棰戝煙 + + /// <summary> + /// 璁$畻 - 鎸姩棰戣氨鍥� + /// </summary> + public const string Calculation_鎸姩棰戣氨鍥� = "calculation-vibration-frequent-spectrum";//2024-1-21 淇敼 + + /// <summary> + /// 璁$畻 - 鎸姩棰戣氨闃舵鍥撅紙閲囩敤娉㈠舰銆侀噰鏍风巼銆佽浆閫熻绠楋級 + /// </summary> + public const string Calculation_鎸姩棰戣氨闃舵鍥� = "calculation-vibration-frequentd-spectrum";//2024-1-21 淇敼 + + /// <summary> + /// 璁$畻 - 鎸姩棰戣氨闃舵鍥撅紙閲囩敤棰戣氨鍥句笌杞�熻绠楋級 + /// </summary> + public const string Calculation_鎸姩棰戣氨闃舵鍥�2 = "calculation-vibration-frequentd-spectrum2";//2024-1-22 澧炲姞 + + /// <summary> + /// 璁$畻 - 鎸姩鍊嶉鍊硷紙閲囩敤娉㈠舰銆侀噰鏍风巼銆佽浆閫熻绠楋級 + /// </summary> + public const string Calculation_鎸姩鍊嶉鍊� = "calculation-vibration-dominant-value"; + + /// <summary> + /// 璁$畻 - 鎸姩鍊嶉鍊硷紙閲囩敤棰戣氨闃舵鍥捐绠楋級 + /// </summary> + public const string Calculation_鎸姩鍊嶉鍊�2 = "calculation-vibration-dominant-value2"; //2024-1-22 澧炲姞 + + /// <summary> + /// 璁$畻 - 鎸姩鐔靛�硷紙閲囩敤娉㈠舰銆侀噰鏍风巼璁$畻锛� + /// </summary> + public const string Calculation_鎸姩鐔靛�� = "calculation-vibration-entropy-value"; + + /// <summary> + /// 璁$畻 - 鎸姩涓�娈甸鐜囧潎鏂规牴鍊硷紙閲囩敤棰戣氨闃舵鍥捐绠楋級 + /// </summary> + public const string Calculation_鎸姩涓�娈甸鐜囧潎鏂规牴鍊� = "calculation-vibration-frequent-range-rms-value"; //2024-1-21 淇敼 + + #endregion + + #region 缁煎悎 + + /// <summary> + /// 璁$畻 - 鎸姩鏈�澶у�奸�氶亾鍊嶉鍊� + /// </summary> + public const string Calculation_鎸姩鏈�澶у�奸�氶亾鍊嶉鍊� = "calculation-vibration-compare-max-dominant-value";//2024-1-21 鏂板 + + /// <summary> + /// 璁$畻 - 鎸姩鏈�澶у�奸�氶亾涓�娈甸鐜囧潎鏂规牴鍊� + /// </summary> + public const string Calculation_鎸姩鏈�澶у�奸�氶亾涓�娈甸鐜囧潎鏂规牴鍊� = "calculation-vibration-compare-max-frequent-range-rms-value";//2024-1-21 鏂板 + + /// <summary> + /// 璁$畻 - 鎸姩鏈�澶у�奸�氶亾绠�鍗曡繑鍥炲�� + /// </summary> + public const string Calculation_鎸姩鏈�澶у�奸�氶亾绠�鍗曡繑鍥炲�� = "calculation-vibration-compare-max-simple-result-value";//2024-1-22 鏂板 + + #endregion + + + #endregion + + #region 姣旇緝 + + /// <summary> + /// 璁$畻-姣旇緝鏈�澶у�� + /// </summary> + public const string Calculation_姣旇緝鏈�澶у�� = "calculation-max-compare"; + + /// <summary> + /// 璁$畻-姣旇緝鏈�灏忓�� + /// </summary> + public const string Calculation_姣旇緝鏈�灏忓�� = "calculation-min-compare"; + + #endregion + + #endregion + + #region 缁熻 + + /// <summary> + /// 缁熻-鏈�澶у�� + /// </summary> + public const string Statistics_鏈�澶у�� = "statistics-max"; + + /// <summary> + /// 缁熻-鏈�灏忓�� + /// </summary> + public const string Statistics_鏈�灏忓�� = "statistics-min"; + + /// <summary> + /// 缁熻-鍧囧�� + /// </summary> + public const string Statistics_鍧囧�� = "statistics-avg"; + + /// <summary> + /// 缁熻-宸�� + /// </summary> + public const string Statistics_宸�� = "statistics-diff"; + + /// <summary> + /// 缁熻-鍜屽�� + /// </summary> + public const string Statistics_鍜屽�� = "statistics-sum"; + + + #endregion + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/MemoryCacheKey.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/MemoryCacheKey.cs new file mode 100644 index 0000000..e2d2000 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/MemoryCacheKey.cs @@ -0,0 +1,26 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// 鍐呭瓨缂撳瓨閿�-涓轰互鍚庡鍔犳竻闄ょ紦瀛樺仛鍑嗗 + /// </summary> + public class MemoryCacheKey + { + /// <summary> + /// 鏈嶅姟灞傜骇 + /// </summary> + public const string ServiceLevel = "Service"; + + /// <summary> + /// 鎺ュ彛灞傜骇 + /// </summary> + public const string WebApiLevel = "WebApi"; + + /// <summary> + /// 妯″潡 + /// </summary> + public const string Module = "Monitor"; + + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/RunStatus.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/RunStatus.cs new file mode 100644 index 0000000..e499614 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/RunStatus.cs @@ -0,0 +1,30 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// 杩愯鐘舵�� + /// </summary> + public class RunStatus + { + /// <summary> + /// 鏈煡 + /// </summary> + public const int UnKnown = -2; + + /// <summary> + /// 鏁呴殰 + /// </summary> + public const int Fault = -1; + + /// <summary> + /// 鍋滄満 + /// </summary> + public const int Shut = 0; + + /// <summary> + /// 寮�鏈� + /// </summary> + public const int Run = 1; + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/SignalType.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/SignalType.cs new file mode 100644 index 0000000..5450893 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/SignalType.cs @@ -0,0 +1,302 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// 淇″彿绫诲瀷 + /// </summary> + public class SignalType + { + #region 娴侀噺 + + /// <summary> + /// 鐬椂娴侀噺 + /// </summary> + public const string 鐬椂娴侀噺 = "鐬椂娴侀噺"; + + /// <summary> + /// 绱Н娴侀噺 + /// </summary> + public const string 绱Н娴侀噺 = "绱Н娴侀噺"; + + #endregion + + #region 鍘嬪姏 + + /// <summary> + /// 鍘嬪姏 + /// </summary> + public const string 鍘嬪姏 = "鍘嬪姏"; + + /// <summary> + /// 杩涘彛鍘嬪姏 + /// </summary> + public const string 杩涘彛鍘嬪姏 = "杩涘彛鍘嬪姏"; + + /// <summary> + /// 鍑哄彛鍘嬪姏 + /// </summary> + public const string 鍑哄彛鍘嬪姏 = "鍑哄彛鍘嬪姏"; + + #endregion + + #region 姘翠綅 + + /// <summary> + /// + /// </summary> + public const string 姘翠綅 = "姘翠綅"; + + /// <summary> + /// + /// </summary> + public const string 鎵▼ = "鎵▼"; + + #endregion + + #region 鍔熺巼 + /// <summary> + /// + /// </summary> + public const string 瑙嗗湪鍔熺巼 = "瑙嗗湪鍔熺巼"; + /// <summary> + /// + /// </summary> + public const string 鏈夊姛鍔熺巼 = "鏈夊姛鍔熺巼"; + /// <summary> + /// + /// </summary> + public const string 鏃犲姛鍔熺巼 = "鏃犲姛鍔熺巼"; + /// <summary> + /// + /// </summary> + public const string 鍔熺巼鍥犳暟 = "鍔熺巼鍥犳暟"; + #endregion + + #region 杞�� + /// <summary> + /// + /// </summary> + public const string 棰戠巼 = "棰戠巼"; + /// <summary> + /// + /// </summary> + public const string 杞�� = "杞��"; + #endregion + + #region 鐢靛害 + /// <summary> + /// + /// </summary> + public const string 鏈夊姛鐢靛害 = "鏈夊姛鐢靛害"; + /// <summary> + /// + /// </summary> + public const string 鏃犲姛鐢靛害 = "鏃犲姛鐢靛害"; + #endregion + + #region 杩愯 + + /// <summary> + /// + /// </summary> + public const string 杩愯鐘舵�� = "杩愯鐘舵��"; + + /// <summary> + /// + /// </summary> + public const string 杩愯鏃堕棿 = "杩愯鏃堕棿"; + + /// <summary> + /// + /// </summary> + public const string 寮�鏈烘鏁� = "寮�鏈烘鏁�"; + + /// <summary> + /// + /// </summary> + public const string 鏁堢巼 = "鏁堢巼"; + + #endregion + + #region 鐢� + + /// <summary> + /// + /// </summary> + public const string 鐢垫祦 = "鐢垫祦"; + /// <summary> + /// + /// </summary> + public const string 鐢靛帇 = "鐢靛帇"; + /// <summary> + /// + /// </summary> + public const string 鐢靛鐜� = "鐢靛鐜�"; + + #endregion + + #region 鑳借�� + /// <summary> + /// + /// </summary> + public const string 鍗冨惃鑳借�� = "鍗冨惃鑳借��"; + /// <summary> + /// + /// </summary> + public const string 鍗曚綅鑳借�� = "鍗曚綅鑳借��"; + #endregion + + #region 闃�闂� + /// <summary> + /// + /// </summary> + public const string 闃�闂ㄧ姸鎬� = "闃�闂ㄧ姸鎬�"; + /// <summary> + /// + /// </summary> + public const string 闃�闂ㄥ紑搴� = "闃�闂ㄥ紑搴�"; + #endregion + + #region 鎸姩 + + /// <summary> + /// + /// </summary> + public const string 閲囨牱鐜� = "閲囨牱鐜�"; + + /// <summary> + /// + /// </summary> + public const string 鏈夋晥鍊� = "鏈夋晥鍊�"; + + /// <summary> + /// + /// </summary> + public const string 宄板�� = "宄板��"; + + /// <summary> + /// + /// </summary> + public const string 宄板嘲鍊� = "宄板嘲鍊�"; + + /// <summary> + /// + /// </summary> + public const string 骞冲潎骞呭�� = "骞冲潎骞呭��"; + + /// <summary> + /// + /// </summary> + public const string 鏂规牴骞呭�� = "鏂规牴骞呭��"; + + /// <summary> + /// + /// </summary> + public const string 娉㈠舰鎸囨爣 = "娉㈠舰鎸囨爣"; + + /// <summary> + /// + /// </summary> + public const string 鑴夊啿鎸囨爣 = "鑴夊啿鎸囨爣"; + + /// <summary> + /// + /// </summary> + public const string 宄板�兼寚鏍� = "宄板�兼寚鏍�"; + + /// <summary> + /// + /// </summary> + public const string 瑁曞害鎸囨爣 = "瑁曞害鎸囨爣"; + + /// <summary> + /// + /// </summary> + public const string 姝害鎸囨爣 = "姝害鎸囨爣"; + + /// <summary> + /// + /// </summary> + public const string 宄害鎸囨爣 = "宄害鎸囨爣"; + + /// <summary> + /// + /// </summary> + public const string 娉㈠舰 = "娉㈠舰"; + + /// <summary> + /// + /// </summary> + public const string 娉㈠舰鍥� = "娉㈠舰鍥�"; + + /// <summary> + /// + /// </summary> + public const string 棰戣氨鍥� = "棰戣氨鍥�"; + + /// <summary> + /// + /// </summary> + public const string 棰戣氨闃舵鍥� = "棰戣氨闃舵鍥�"; + + /// <summary> + /// + /// </summary> + public const string 鐔靛�� = "鐔靛��"; + + /// <summary> + /// + /// </summary> + public const string 鍊嶉鍊� = "鍊嶉鍊�"; + + /// <summary> + /// + /// </summary> + public const string 骞呭�奸娈� = "骞呭�奸娈�"; + + + + + #endregion + + #region 鍏朵粬 + + /// <summary> + /// + /// </summary> + public const string 娓╁害 = "娓╁害"; + /// <summary> + /// + /// </summary> + public const string 娴婂害 = "娴婂害"; + /// <summary> + /// + /// </summary> + public const string 浣欐隘 = "浣欐隘"; + /// <summary> + /// + /// </summary> + public const string 婀垮害 = "婀垮害"; + /// <summary> + /// + /// </summary> + public const string PH = "PH"; + /// <summary> + /// + /// </summary> + public const string 婧惰В姘� = "婧惰В姘�"; + /// <summary> + /// + /// </summary> + public const string 闊抽噺 = "闊抽噺"; + + #endregion + + + + + + + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eAlarmSource.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eAlarmSource.cs new file mode 100644 index 0000000..ea8602b --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eAlarmSource.cs @@ -0,0 +1,23 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// 鎶ヨ婧� + /// </summary> + public enum eAlarmSource + { + /// <summary> + /// 鏁版嵁瀵规帴 + /// </summary> + DataDocking = 1, + + /// <summary> + /// 娴嬬偣 + /// </summary> + MonitorPoint = 2, + + /// <summary> + /// 淇″彿 + /// </summary> + Signal = 3 + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eAlarmType.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eAlarmType.cs new file mode 100644 index 0000000..8c1172c --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eAlarmType.cs @@ -0,0 +1,31 @@ +锘縰sing System.ComponentModel; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 鎶ヨ绫诲瀷 + /// </summary> + public enum eAlarmType + { + //杩樻湁鏁版嵁绐佸彉銆佹暟鎹笉鍙樼瓑鎶ヨ绫诲瀷锛岀幇鍦ㄧ敤涓嶅埌鑰屼笖娑夊強鍒板巻鍙茶褰曟瘮瀵癸紝鎵�鏈夋殏鏃朵笉娣诲姞 + + /// <summary> + /// 瓒婁笂闄� + /// </summary> + [Description("瓒婁笂闄�")] + Upper = 1, + + /// <summary> + /// 瓒婁笅闄� + /// </summary> + [Description("瓒婁笅闄�")] + Lower = 2, + + /// <summary> + /// 闈炲悎鐞嗗尯闂� + /// </summary> + [Description("闈炲悎鐞嗗尯闂�")] + UnReasonable = 3, + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eCronType.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eCronType.cs new file mode 100644 index 0000000..d5dbff7 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eCronType.cs @@ -0,0 +1,41 @@ +锘縰sing System.ComponentModel; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 璁″垝绫诲瀷 + /// </summary> + public enum eCronType + { + /// <summary> + /// 瀹炴椂 + /// </summary> + [Description("瀹炴椂")] + Real = 0, + + /// <summary> + /// 姣忔椂 + /// </summary> + [Description("姣忔椂")] + EachHour = 1, + + /// <summary> + /// 姣忔棩 + /// </summary> + [Description("姣忔棩")] + EachDay = 2, + + /// <summary> + /// 姣忔湀 + /// </summary> + [Description("姣忔湀")] + EachMonth = 3, + + /// <summary> + /// 姣忓勾 + /// </summary> + [Description("姣忓勾")] + EachYear = 4 + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDataStatus.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDataStatus.cs new file mode 100644 index 0000000..5829221 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDataStatus.cs @@ -0,0 +1,41 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// 鏁版嵁鐘舵�� + /// </summary> + public enum eDataStatus + { + /// <summary> + /// 涓柇 + /// </summary> + Interrupt = -2, + + /// <summary> + /// 閿欒 + /// </summary> + Error = -1, + + /// <summary> + /// 姝e父 + /// </summary> + Normal = 1, + + /// <summary> + /// 璀﹀憡 + /// </summary> + Warn = 2, + + /// <summary> + /// 鍗遍櫓 + /// </summary> + Danger = 3, + + /// <summary> + /// 寮傚父 + /// </summary> + Except = 4 + + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDeleteOps.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDeleteOps.cs new file mode 100644 index 0000000..f5ec8a2 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDeleteOps.cs @@ -0,0 +1,18 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// 鍒犻櫎鏂瑰紡 + /// </summary> + public enum eDeleteOps + { + /// <summary> + /// 褰撳墠 + /// </summary> + Current = 0, + + /// <summary> + /// 涔嬪墠 + /// </summary> + Before = 1 + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDockingMode.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDockingMode.cs new file mode 100644 index 0000000..e63432a --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eDockingMode.cs @@ -0,0 +1,40 @@ +锘縰sing System.ComponentModel; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 瀵规帴鏂瑰紡 + /// </summary> + public enum eDockingMode + { + /// <summary> + /// 鏍囧噯瀵规帴 + /// </summary> + [Description("鏍囧噯瀵规帴")] + Standard = 0, + + /// <summary> + /// 涓棿搴撳鎺� + /// </summary> + [Description("涓棿搴撳鎺�")] + MiddleLib = 1, + + /// <summary> + /// 鎺ュ彛瀵规帴 + /// </summary> + [Description("鎺ュ彛瀵规帴")] + Api = 2, + + /// <summary> + /// 鍗忚瀵规帴 + /// </summary> + [Description("鍗忚瀵规帴")] + Socket = 3, + + /// <summary> + /// MQTT瀵规帴 + /// </summary> + [Description("MQTT瀵规帴")] + MQTT = 4 + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eFormatType.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eFormatType.cs new file mode 100644 index 0000000..f6fa7ee --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eFormatType.cs @@ -0,0 +1,46 @@ +锘縰sing System.ComponentModel; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 鏍煎紡绫诲瀷 + /// </summary> + public enum eFormatType + { + /// <summary> + /// 鏁板�� + /// </summary> + [Description("鏁板��")] + Numeric = 1, + + /// <summary> + /// 鏋氫妇 + /// </summary> + [Description("鏋氫妇")] + Enum = 2, + + /// <summary> + /// 闆嗗悎 + /// </summary> + [Description("闆嗗悎")] + Array = 3, + + /// <summary> + /// 闆嗘垚 + /// </summary> + [Description("闆嗘垚")] + Integration = 4, + + /// <summary> + /// 鏂囨湰 + /// </summary> + [Description("鏂囨湰")] + Text = 5, + + /// <summary> + /// 鍥捐氨 + /// </summary> + [Description("鍥捐氨")] + Curve = 6 + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eMeasureType.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eMeasureType.cs new file mode 100644 index 0000000..2fc6991 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eMeasureType.cs @@ -0,0 +1,22 @@ +锘縰sing System.ComponentModel; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 璁¢噺绫诲瀷 + /// </summary> + public enum eMeasureType + { + /// <summary> + /// 鐬椂 + /// </summary> + [Description("鐬椂")] + Instant = 1, + + /// <summary> + /// 绱Н + /// </summary> + [Description("绱Н")] + Accumulate = 2 + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eSourceType.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eSourceType.cs new file mode 100644 index 0000000..259152e --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/00-core/eSourceType.cs @@ -0,0 +1,35 @@ +锘縰sing System.ComponentModel; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 鏉ユ簮绫诲瀷 + /// </summary> + public enum eSourceType + { + /// <summary> + /// 瀵规帴 + /// </summary> + [Description("瀵规帴")] + Docking = 0, + + /// <summary> + /// 鍒嗘瀽 + /// </summary> + [Description("鍒嗘瀽")] + Analyse = 1, + + /// <summary> + /// 褰曞叆 + /// </summary> + [Description("褰曞叆")] + Input = 2, + + /// <summary> + /// 瀹氬埗 + /// </summary> + [Description("瀹氬埗")] + Custom = 3, + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/GetAlarmByDayModel.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/GetAlarmByDayModel.cs new file mode 100644 index 0000000..3cc4065 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/GetAlarmByDayModel.cs @@ -0,0 +1,9 @@ +锘縰sing System; + +namespace IBox.WinFrmUI +{ + public class GetAlarmByDayModel + { + public DateTime Day { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/GetBySignalIDOfDayRangeModel.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/GetBySignalIDOfDayRangeModel.cs new file mode 100644 index 0000000..aa53888 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/GetBySignalIDOfDayRangeModel.cs @@ -0,0 +1,15 @@ +锘縰sing System; + +namespace IBox.WinFrmUI +{ + public class GetBySignalIDOfDayRangeModel + { + public long SignalID { get; set; } + + public DateTime StartDay { get; set; } + + public DateTime EndDay { get; set; } + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPoint.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPoint.cs new file mode 100644 index 0000000..db65f8a --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPoint.cs @@ -0,0 +1,134 @@ +锘縰sing System.Collections.Generic; +using System.Linq; +using Yw.Model; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 娴嬬偣 + /// </summary> + public partial class MonitorPoint + { + /// <summary> + /// + /// </summary> + public MonitorPoint() { } + + /// <summary> + /// + /// </summary> + public MonitorPoint(MonitorPoint rhs) + { + this.ID = rhs.ID; + this.GroupID = rhs.GroupID; + this.Name = rhs.Name; + this.CronType = rhs.CronType; + this.CronParas = rhs.CronParas; + this.SourceType = rhs.SourceType; + this.SerialNO = rhs.SerialNO; + this.Importance = rhs.Importance; + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// + /// </summary> + public void Reset(MonitorPoint rhs) + { + this.ID = rhs.ID; + this.GroupID = rhs.GroupID; + this.Name = rhs.Name; + this.CronType = rhs.CronType; + this.CronParas = rhs.CronParas; + this.SourceType = rhs.SourceType; + this.SerialNO = rhs.SerialNO; + this.Importance = rhs.Importance; + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + public long ID { get; set; } + /// <summary> + /// 缁刬d + /// </summary> + public long GroupID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 璁″垝绫诲瀷 + /// </summary> + public eCronType CronType { get; set; } + + /// <summary> + /// 璁″垝鍙傛暟 + /// </summary> + public string CronParas { get; set; } + + /// <summary> + /// 鏉ユ簮绫诲瀷 + /// </summary> + public IBox.WinFrmUI.eSourceType SourceType { get; set; } + + /// <summary> + /// 搴忓垪鍙� + /// </summary> + public int SerialNO { get; set; } + + /// <summary> + /// 閲嶈搴� + /// </summary> + public int Importance { get; set; } + + /// <summary> + /// 鍙傛暟瀛楀吀 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囪鍚嶇О + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + public eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public MonitorPoint Clone() + { + return new MonitorPoint(this); + } + + + } +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPointExSignalList.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPointExSignalList.cs new file mode 100644 index 0000000..1ecc39d --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPointExSignalList.cs @@ -0,0 +1,40 @@ +锘縰sing System.Collections.Generic; +using System.Linq; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class MonitorPointExSignalList : MonitorPoint + { + /// <summary> + /// + /// </summary> + public MonitorPointExSignalList() { } + + /// <summary> + /// + /// </summary> + public MonitorPointExSignalList(MonitorPoint rhs, IEnumerable<Signal> signal_list) : base(rhs) + { + this.SignalList = signal_list?.ToList(); + } + + /// <summary> + /// + /// </summary> + public MonitorPointExSignalList(MonitorPointExSignalList rhs) : base(rhs) + { + this.SignalList = rhs.SignalList; + } + + /// <summary> + /// 淇″彿鍒楄〃 + /// </summary> + public List<Signal> SignalList { get; set; } + + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPointGroup.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPointGroup.cs new file mode 100644 index 0000000..7b298fb --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPointGroup.cs @@ -0,0 +1,105 @@ +锘縰sing System.Collections.Generic; +using System.Linq; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 娴嬬偣缁� + /// </summary> + public partial class MonitorPointGroup + { + /// <summary> + /// + /// </summary> + public MonitorPointGroup() { } + + /// <summary> + /// + /// </summary> + public MonitorPointGroup(MonitorPointGroup rhs) + { + this.ID = rhs.ID; + this.BelongType = rhs.BelongType; + this.BelongID = rhs.BelongID; + this.ParentIds = rhs.ParentIds?.ToList(); + this.Name = rhs.Name; + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// + /// </summary> + public void Reset(MonitorPointGroup rhs) + { + this.ID = rhs.ID; + this.BelongType = rhs.BelongType; + this.BelongID = rhs.BelongID; + this.ParentIds = rhs.ParentIds?.ToList(); + this.Name = rhs.Name; + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + public long ID { get; set; } + /// <summary> + /// 鎵�灞炵被鍨� + /// </summary> + public string BelongType { get; set; } + + /// <summary> + /// 鎵�灞� id + /// </summary> + public long BelongID { get; set; } + + /// <summary> + /// 鐖剁骇 id 鍒楄〃 + /// </summary> + public List<long> ParentIds { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鍙傛暟瀛楀吀 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囪鍚嶇О + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public MonitorPointGroup Clone() + { + return new MonitorPointGroup(this); + } + + } + +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPoint_Signal_SignalType.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPoint_Signal_SignalType.cs new file mode 100644 index 0000000..ad8d63e --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorPoint_Signal_SignalType.cs @@ -0,0 +1,38 @@ +锘縰sing System.Collections.Generic; +using System.Linq; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class MonitorPoint_Signal_SignalType : MonitorPoint + { + /// <summary> + /// + /// </summary> + public MonitorPoint_Signal_SignalType() { } + + /// <summary> + /// + /// </summary> + public MonitorPoint_Signal_SignalType(MonitorPoint rhs, List<Signal_SignalType> signalList) : base(rhs) + { + this.SignalList = signalList?.ToList(); + } + + /// <summary> + /// + /// </summary> + public MonitorPoint_Signal_SignalType(MonitorPoint_Signal_SignalType rhs) : base(rhs) + { + this.SignalList = rhs.SignalList?.ToList(); + } + + + /// <summary> + /// 淇″彿鍒楄〃 + /// </summary> + public List<Signal_SignalType> SignalList { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorValueAlarmRecord.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorValueAlarmRecord.cs new file mode 100644 index 0000000..bcea5f7 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/MonitorValueAlarmRecord.cs @@ -0,0 +1,108 @@ +锘縰sing System; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 鐩戞祴鍊兼姤璀﹁褰� + /// </summary> + public partial class MonitorValueAlarmRecord + { + /// <summary> + /// + /// </summary> + public MonitorValueAlarmRecord() { } + + public MonitorValueAlarmRecord FromString(string str) + { + MonitorValueAlarmRecord dto = new MonitorValueAlarmRecord(); + var sp = str.Split(';'); + if (sp.Length > 0 && !string.IsNullOrEmpty(sp[0])) + dto.AlarmTime = sp[0]; + if (sp.Length > 1 && !string.IsNullOrEmpty(sp[1])) + dto.MonitorPointName = sp[1]; + if (sp.Length > 2 && !string.IsNullOrEmpty(sp[2])) + dto.Name = sp[2]; + if (sp.Length > 3 && !string.IsNullOrEmpty(sp[3])) + dto.AlarmLevelName = sp[3]; + if (sp.Length > 4 && !string.IsNullOrEmpty(sp[4])) + { + dto.AlarmType = (eAlarmType)int.Parse(sp[4]); + dto.AlarmTypeName = dto.AlarmType == eAlarmType.Upper ? "瓒婁笂闄�" : "瓒婁笅闄�"; + } + if (sp.Length > 5 && !string.IsNullOrEmpty(sp[5])) + dto.ThresholdValue = sp[5]; + if (sp.Length > 6 && !string.IsNullOrEmpty(sp[6])) + dto.DataValue = string.IsNullOrEmpty(sp[6]) ? 0 : double.Parse(sp[6]); + if (sp.Length > 7 && !string.IsNullOrEmpty(sp[7])) + dto.AlarmStatus = int.Parse(sp[7]); + return dto; + } + /// <summary> + /// 鎶ヨ绛夌骇鍚嶇О + /// </summary> + public string AlarmLevelName { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 娴嬬偣鍚嶇О + /// </summary> + public string MonitorPointName { get; set; } + /// <summary> + /// 淇″彿id + /// </summary> + public long SignalID { get; set; } + + /// <summary> + /// 鎶ヨ鍚嶇О + /// </summary> + public string AlarmName { get; set; } + + /// <summary> + /// 鎶ヨ绫诲瀷 + /// </summary> + public eAlarmType AlarmType { get; set; } + + public string AlarmTypeName { get; set; } + + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public int AlarmLevel { get; set; } + + /// <summary> + /// 闃�鍊� + /// </summary> + public string ThresholdValue { get; set; } + + /// <summary> + /// 鏁版嵁鏃堕棿 + /// </summary> + public DateTime DataTime { get; set; } + + /// <summary> + /// 鏁版嵁鍊� + /// </summary> + public double DataValue { get; set; } + + /// <summary> + /// 鎶ヨ鏃堕棿 + /// </summary> + public string AlarmTime { get; set; } + + /// <summary> + /// 鎶ヨ鐘舵�� + /// </summary> + public int AlarmStatus { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + } + +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/Signal.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/Signal.cs new file mode 100644 index 0000000..0ec3172 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/Signal.cs @@ -0,0 +1,178 @@ +锘縰sing System.Collections.Generic; +using System.Linq; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 淇″彿 + /// </summary> + public partial class Signal + { + /// <summary> + /// + /// </summary> + public Signal() { } + + /// <summary> + /// + /// </summary> + public Signal(Signal rhs) + { + this.ID = rhs.ID; + this.MonitorPointID = rhs.MonitorPointID; + this.SignalTypeID = rhs.SignalTypeID; + this.Name = rhs.Name; + this.SourceType = rhs.SourceType; + this.SourceParas = rhs.SourceParas; + this.MeasureParas = rhs.MeasureParas; + this.DisplayParas = rhs.DisplayParas; + this.SerialNO = rhs.SerialNO; + this.Importance = rhs.Importance; + this.Virtually = rhs.Virtually; + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + this.BusAddress = rhs.BusAddress; + this.BusType = rhs.BusType; + this.IsEnable = rhs.IsEnable; + this.Operator = rhs.Operator; + this.Operands = rhs.Operands; + this.Accuracy = rhs.Accuracy; + this.AdcType = rhs.AdcType; + this.UpperRange = rhs.UpperRange; + this.LowerRange = rhs.LowerRange; + this.GroupID = rhs.GroupID; + } + public long ID { get; set; } + /// <summary> + /// + /// </summary> + public void Reset(Signal rhs) + { + this.ID = rhs.ID; + this.MonitorPointID = rhs.MonitorPointID; + this.SignalTypeID = rhs.SignalTypeID; + this.Name = rhs.Name; + this.SourceType = rhs.SourceType; + this.SourceParas = rhs.SourceParas; + this.MeasureParas = rhs.MeasureParas; + this.DisplayParas = rhs.DisplayParas; + this.SerialNO = rhs.SerialNO; + this.Importance = rhs.Importance; + this.Virtually = rhs.Virtually; + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + this.BusAddress = rhs.BusAddress; + this.BusType = rhs.BusType; + this.IsEnable = rhs.IsEnable; + this.Operator = rhs.Operator; + this.Operands = rhs.Operands; + this.Accuracy = rhs.Accuracy; + this.AdcType = rhs.AdcType; + this.UpperRange = rhs.UpperRange; + this.LowerRange = rhs.LowerRange; + this.GroupID = rhs.GroupID; + } + + /// <summary> + /// 娴嬬偣id + /// </summary> + public long MonitorPointID { get; set; } + + /// <summary> + /// 淇″彿绫诲瀷id + /// </summary> + public long SignalTypeID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 璁¢噺鍙傛暟锛堜俊鍙风被鍨嬬殑璁¢噺绫诲瀷涓嶅悓锛岃缃笉鍚岋級 + /// </summary> + public string MeasureParas { get; set; } + + /// <summary> + /// 鏉ユ簮绫诲瀷 + /// </summary> + public eSourceType SourceType { get; set; } + + /// <summary> + /// 鏉ユ簮鍙傛暟锛堟潵婧愪笉鍚岋紝鏉ユ簮鍙傛暟璁剧疆涓嶅悓锛� + /// </summary> + public string SourceParas { get; set; } + + /// <summary> + /// 鏄剧ず鍙傛暟锛堜俊鍙风被鍨嬬殑鏍煎紡涓嶅悓鏄剧ず鍙傛暟璁剧疆涓嶅悓锛� + /// </summary> + public string DisplayParas { get; set; } + + /// <summary> + /// 搴忓垪鍙� -涓昏搴旂敤浜庨�昏緫椤哄簭 濡傦細鍒嗘瀽椤哄簭 + /// </summary> + public int SerialNO { get; set; } + + /// <summary> + /// 閲嶈搴�(瓒婂ぇ瓒婇噸瑕�) + /// </summary> + public int Importance { get; set; } + + /// <summary> + /// 鏄惁铏氭嫙 + /// </summary> + public bool Virtually { get; set; } + + /// <summary> + /// 鍙傛暟瀛楀吀 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囪鍚嶇О + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + public string BusAddress { get; set; } + public int BusType { get; set; } + public bool IsEnable { get; set; } + public int Operator { get; set; } + public string Operands { get; set; } + public int Accuracy { get; set; } + public int AdcType { get; set; } + public decimal UpperRange { get; set; } + public decimal LowerRange { get; set; } + + public long GroupID { get; set; } + + /// <summary> + /// + /// </summary> + public Signal Clone() + { + return new Signal(this); + } + } + +} \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/Signal_SignalType.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/Signal_SignalType.cs new file mode 100644 index 0000000..ccd27e5 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/04-monitor/Signal_SignalType.cs @@ -0,0 +1,37 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public partial class Signal_SignalType : Signal + { + /// <summary> + /// + /// </summary> + public Signal_SignalType() { } + + /// <summary> + /// + /// </summary> + + public Signal_SignalType(Signal rhs, SignalType signalType) : base(rhs) + { + this.SignalType = signalType; + } + + /// <summary> + /// + /// </summary> + public Signal_SignalType(Signal_SignalType rhs) : base(rhs) + { + this.SignalType = rhs.SignalType; + } + + /// <summary> + /// 淇″彿绫诲瀷 + /// </summary> + public SignalType SignalType { get; set; } + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorHistoryQuery.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorHistoryQuery.cs new file mode 100644 index 0000000..c6cbd39 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorHistoryQuery.cs @@ -0,0 +1,9 @@ +锘縩amespace IBox.WinFrmUI +{ + public class MonitorHistoryQuery + { + public long SignalID { get; set; } + public string StartTime { get; set; } + public string EndTime { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRealRecord.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRealRecord.cs new file mode 100644 index 0000000..ba05b4d --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRealRecord.cs @@ -0,0 +1,60 @@ +锘縰sing System; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// 瀹炴椂鐩戞祴璁板綍 + /// </summary> + public class MonitorRealRecord : MonitorRecord + { + /// <summary> + /// + /// </summary> + public MonitorRealRecord() { } + + /// <summary> + /// + /// </summary> + public MonitorRealRecord(MonitorRecord rhs) : base(rhs) { } + + /// <summary> + /// + /// </summary> + public MonitorRealRecord(MonitorRealRecord rhs) : base(rhs) + { + this.HandleTime = rhs.HandleTime; + this.SrcValue = rhs.SrcValue; + } + + /// <summary> + /// + /// </summary> + public void Reset(MonitorRealRecord rhs) + { + this.SignalID = rhs.SignalID; + this.HandleTime = rhs.HandleTime; + this.DataTime = rhs.DataTime; + this.SrcValue = rhs.SrcValue; + this.DataValue = rhs.DataValue; + this.DataStatus = rhs.DataStatus; + } + + /// <summary> + /// 澶勭悊鏃堕棿 + /// </summary> + public DateTime HandleTime { get; set; } + + /// <summary> + /// 鍘熷鍊� + /// </summary> + public string SrcValue { get; set; } + + /// <summary> + /// + /// </summary> + public MonitorRealRecord Clone() + { + return new MonitorRealRecord(this); + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRealStepRecord.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRealStepRecord.cs new file mode 100644 index 0000000..2ff1e9e --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRealStepRecord.cs @@ -0,0 +1,12 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// 鐩戞祴瀹炴椂姝ラ暱璁板綍 + /// </summary> + public class MonitorRealStepRecord : MonitorStepRecord + { + + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRecord.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRecord.cs new file mode 100644 index 0000000..fbd3b3d --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorRecord.cs @@ -0,0 +1,67 @@ +锘縩amespace IBox.WinFrmUI +{ + /// <summary> + /// 鐩戞祴璁板綍 + /// </summary> + public class MonitorRecord + { + /// <summary> + /// + /// </summary> + public MonitorRecord() { } + + /// <summary> + /// + /// </summary> + public MonitorRecord(MonitorRecord rhs) + { + this.SignalID = rhs.SignalID; + this.DataTime = rhs.DataTime; + this.DataValue = rhs.DataValue; + this.DataStatus = rhs.DataStatus?.ToList(); + } + public string ToString() + { + return $"{DataTime.ToString("yyyy-MM-dd HH:mm:ss")};{DataValue};{1}"; + } + + public MonitorRealRecord FromString(string str) + { + MonitorRealRecord ret = new MonitorRealRecord(); + if (!string.IsNullOrEmpty(str)) + { + var sp = str.Split(';'); + if (sp.Length > 0 && !string.IsNullOrEmpty(sp[0])) + { + ret.DataTime = DateTime.Parse(sp[0]); + } + if (sp.Length > 1 && !string.IsNullOrEmpty(sp[1])) + ret.DataValue = sp[1]; + //if (sp.Length > 2 && !string.IsNullOrEmpty(sp[2])) + //ret.DataStatus = DataStatusHelper.ToList(sp[2]); + } + return ret; + } + /// <summary> + /// 淇″彿id + /// </summary> + public long SignalID { get; set; } + + /// <summary> + /// 鏁版嵁鏃堕棿 + /// </summary> + public DateTime DataTime { get; set; } + + /// <summary> + /// 鏁版嵁鍊� + /// </summary> + public string DataValue { get; set; } + + /// <summary> + /// 鏁版嵁鐘舵�� + /// </summary> + public List<string> DataStatus { get; set; } + + + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorStepRecord.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorStepRecord.cs new file mode 100644 index 0000000..a35536b --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/06-record/MonitorStepRecord.cs @@ -0,0 +1,31 @@ +锘縰sing System; +using System.Collections.Generic; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class MonitorStepRecord + { + /// <summary> + /// 淇″彿id + /// </summary> + public long SignalID { get; set; } + + /// <summary> + /// 璁板綍鏃堕棿 + /// </summary> + public DateTime RecordTime { get; set; } + + /// <summary> + /// 璁板綍鍊� + /// </summary> + public string RecordValue { get; set; } + + /// <summary> + /// 璁板綍鐘舵�� + /// </summary> + public List<string> RecordStatus { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/09-station-monitor-list/dto/StationMonitorListGroupMobileDto.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/09-station-monitor-list/dto/StationMonitorListGroupMobileDto.cs new file mode 100644 index 0000000..b58571f --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/09-station-monitor-list/dto/StationMonitorListGroupMobileDto.cs @@ -0,0 +1,40 @@ +锘縰sing System.Collections.Generic; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class StationMonitorListGroupMobileDto + { + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 杩愯鐘舵�� + /// </summary> + public string RunStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + /// <summary> + /// 鐩戞祴椤瑰垪琛� + /// </summary> + public List<StationMonitorListItemMobileDto> MonitorList { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/09-station-monitor-list/dto/StationMonitorListItemMobileDto.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/09-station-monitor-list/dto/StationMonitorListItemMobileDto.cs new file mode 100644 index 0000000..c0d8a93 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/09-station-monitor-list/dto/StationMonitorListItemMobileDto.cs @@ -0,0 +1,73 @@ +锘縰sing System; +using System.Collections.Generic; + +namespace IBox.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class StationMonitorListItemMobileDto + { + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 缂栫爜 + /// </summary> + public string Code { get; set; } + + /// <summary> + /// 淇″彿id + /// </summary> + public long SignalID { get; set; } + + public long SignalTypeID { get; set; } + + /// <summary> + /// 鏍煎紡绫诲瀷 + /// </summary> + public eFormatType FormatType { get; set; } + + /// <summary> + /// 鏁版嵁鍊� + /// </summary> + public string DataValue { get; set; } + + public DateTime? DataTime { get; set; } + + /// <summary> + /// 鍗曚綅鍚嶇О + /// </summary> + public string UnitName { get; set; } + + /// <summary> + /// 鏁版嵁鐘舵�� + /// </summary> + public eDataStatus DataStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + public string Flags { get; set; } + + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + public string BusAddress { get; set; } + public int BusType { get; set; } + public bool IsEnable { get; set; } + public int? Operator { get; set; } + public string Operands { get; set; } + public int Accuracy { get; set; } + public int AdcType { get; set; } + public decimal UpperRange { get; set; } + public decimal LowerRange { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/GeneralViewModel.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/GeneralViewModel.cs new file mode 100644 index 0000000..20e53d9 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/GeneralViewModel.cs @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class GeneralViewModel + { + public long ID { get; set; } + public string Name { get; set; } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/dModbus.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/dModbus.cs new file mode 100644 index 0000000..d00fb5a --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/dModbus.cs @@ -0,0 +1,131 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class dModbus + { + public Dictionary<int, string> ModbusDataType() + { + var dic = new Dictionary<int, string>(); + dic.Add(1, "绾垮湀"); + dic.Add(2, "绂绘暎"); + dic.Add(3, "short"); + dic.Add(4, "ushort"); + dic.Add(5, "int"); + dic.Add(6, "uint"); + dic.Add(7, "long"); + dic.Add(8, "ulong"); + dic.Add(9, "float"); + dic.Add(10, "double"); + return dic; + + } + + public Dictionary<string, string> ProtocolType() + { + var dic = new Dictionary<string, string>(); + dic.Add("ModbusRTU", "ModbusRTU"); + dic.Add("ModbusTcp", "ModbusTcp"); + dic.Add("ModbusAscii", "ModbusAscii"); + dic.Add("瑗块棬瀛怱7-200", "S7200"); + dic.Add("瑗块棬瀛怱7-200Smart", "S7200Smart"); + dic.Add("瑗块棬瀛怱7-300", "S7300"); + dic.Add("瑗块棬瀛怱7-400", "S7400"); + dic.Add("瑗块棬瀛怱7-1200", "S71200"); + dic.Add("瑗块棬瀛怱7-1500", "S71500"); + dic.Add("涓夎彵MC Qna-3E", "MCQna3E"); + dic.Add("涓夎彵MC A-1E", "MCA1E"); + dic.Add("娆у榫橣ins", "Fins"); + dic.Add("缃楀厠闊﹀皵CIP", "CIP"); + + return dic; + } + + public Dictionary<int, string> OperType() + { + var dic = new Dictionary<int, string>(); + dic.Add(0, "鏃�"); + dic.Add(1, "+"); + dic.Add(2, "-"); + dic.Add(3, "*"); + dic.Add(4, "/"); + return dic; + } + + public Dictionary<int, int> BaudRate() + { + + var dic = new Dictionary<int, int>(); + dic.Add(1200, 1200); + dic.Add(4800, 4800); + dic.Add(9600, 9600); + dic.Add(14400, 14400); + dic.Add(19200, 19200); + dic.Add(38400, 38400); + dic.Add(57600, 57600); + return dic; + } + + public Dictionary<int, string> AdcType() + { + var dic = new Dictionary<int, string>(); + dic.Add(0, "鏃�"); + dic.Add(1, "4-20mA"); + dic.Add(2, "0-5V"); + return dic; + } + + public Dictionary<int, string> XMZDataType() + { + var dic = new Dictionary<int, string>(); + dic.Add(1, "bit"); + dic.Add(2, "byte"); + dic.Add(3, "short"); + dic.Add(4, "ushort"); + dic.Add(5, "int"); + dic.Add(6, "uint"); + dic.Add(7, "long"); + dic.Add(8, "ulong"); + dic.Add(9, "float"); + dic.Add(10, "double"); + return dic; + + } + + public Dictionary<int, string> SLANDCIPDataType() + { + var dic = new Dictionary<int, string>(); + dic.Add(1, "bit"); + dic.Add(2, "short"); + dic.Add(3, "ushort"); + dic.Add(4, "int"); + dic.Add(5, "uint"); + dic.Add(6, "long"); + dic.Add(7, "ulong"); + dic.Add(8, "float"); + dic.Add(9, "double"); + return dic; + + } + + public Dictionary<int, string> OMLDataType() + { + var dic = new Dictionary<int, string>(); + dic.Add(1, "bool"); + dic.Add(2, "short"); + dic.Add(3, "ushort"); + dic.Add(4, "int"); + dic.Add(5, "uint"); + dic.Add(6, "long"); + dic.Add(7, "ulong"); + dic.Add(8, "float"); + dic.Add(9, "double"); + return dic; + + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.Designer.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.Designer.cs new file mode 100644 index 0000000..3b31f25 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.Designer.cs @@ -0,0 +1,190 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class ProtocolLKWE + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.textEdit1IP = new DevExpress.XtraEditors.TextEdit(); + this.textEditPort = new DevExpress.XtraEditors.TextEdit(); + this.textEditSlotNumber = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEdit1IP.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditSlotNumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.textEdit1IP); + this.dataLayoutControl1.Controls.Add(this.textEditPort); + this.dataLayoutControl1.Controls.Add(this.textEditSlotNumber); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(841, 574); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // textEdit1IP + // + this.textEdit1IP.Location = new System.Drawing.Point(72, 12); + this.textEdit1IP.Name = "textEdit1IP"; + this.textEdit1IP.Size = new System.Drawing.Size(346, 20); + this.textEdit1IP.StyleController = this.dataLayoutControl1; + this.textEdit1IP.TabIndex = 6; + // + // textEditPort + // + this.textEditPort.Location = new System.Drawing.Point(482, 12); + this.textEditPort.Name = "textEditPort"; + this.textEditPort.Size = new System.Drawing.Size(347, 20); + this.textEditPort.StyleController = this.dataLayoutControl1; + this.textEditPort.TabIndex = 7; + // + // textEditSlotNumber + // + this.textEditSlotNumber.EditValue = "0"; + this.textEditSlotNumber.Location = new System.Drawing.Point(72, 36); + this.textEditSlotNumber.Name = "textEditSlotNumber"; + this.textEditSlotNumber.Size = new System.Drawing.Size(346, 20); + this.textEditSlotNumber.StyleController = this.dataLayoutControl1; + this.textEditSlotNumber.TabIndex = 10; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem3, + this.layoutControlItem6, + this.emptySpaceItem1, + this.emptySpaceItem2}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(841, 574); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.textEdit1IP; + this.layoutControlItem1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem1.CustomizationFormText = "IP鍦板潃:"; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(410, 24); + this.layoutControlItem1.Text = "IP鍦板潃:"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.textEditPort; + this.layoutControlItem3.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem3.CustomizationFormText = "绔彛鍙凤細"; + this.layoutControlItem3.Location = new System.Drawing.Point(410, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(411, 24); + this.layoutControlItem3.Text = "绔彛鍙凤細"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.textEditSlotNumber; + this.layoutControlItem6.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem6.CustomizationFormText = "妲藉彿锛�"; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(410, 24); + this.layoutControlItem6.Text = "妲藉彿锛�"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(48, 14); + // + // emptySpaceItem1 + // + this.emptySpaceItem1.AllowHotTrack = false; + this.emptySpaceItem1.Location = new System.Drawing.Point(0, 48); + this.emptySpaceItem1.Name = "emptySpaceItem1"; + this.emptySpaceItem1.Size = new System.Drawing.Size(821, 506); + this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(410, 24); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(411, 24); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // ProtocolLKWE + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "ProtocolLKWE"; + this.Size = new System.Drawing.Size(841, 574); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEdit1IP.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditSlotNumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit textEdit1IP; + private DevExpress.XtraEditors.TextEdit textEditPort; + private DevExpress.XtraEditors.TextEdit textEditSlotNumber; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.cs new file mode 100644 index 0000000..99cb446 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.cs @@ -0,0 +1,39 @@ +锘縰sing DevExpress.XtraEditors; +using DevExpress.XtraEditors.Controls; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO.Ports; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public partial class ProtocolLKWE : DevExpress.XtraEditors.XtraUserControl + { + public ProtocolLKWE() + { + InitializeComponent(); + } + + public IBoxProtocolViewModel GetData() + { + var model = new IBoxProtocolViewModel(); + model.IP = this.textEdit1IP.Text; + model.Port = this.textEditPort.Text; + model.SlotNumber = int.Parse(this.textEditSlotNumber.Text); + return model; + } + + public void SetData(IBoxProtocolViewModel model) + { + this.textEdit1IP.Text = model.IP; + this.textEditPort.Text = model.Port; + this.textEditSlotNumber.Text = model.SlotNumber.ToString(); + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.resx b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolLKWE.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.Designer.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.Designer.cs new file mode 100644 index 0000000..fdf2a13 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.Designer.cs @@ -0,0 +1,262 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class ProtocolModbus + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.textEditPort = new DevExpress.XtraEditors.TextEdit(); + this.textEditBaudRate = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.textEditDataBits = new DevExpress.XtraEditors.TextEdit(); + this.textEditStopBits = new DevExpress.XtraEditors.TextEdit(); + this.textEditParity = new DevExpress.XtraEditors.ImageComboBoxEdit(); + this.textEditStationNumber = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditBaudRate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditDataBits.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditStopBits.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditParity.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditStationNumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.textEditPort); + this.dataLayoutControl1.Controls.Add(this.textEditBaudRate); + this.dataLayoutControl1.Controls.Add(this.textEditDataBits); + this.dataLayoutControl1.Controls.Add(this.textEditStopBits); + this.dataLayoutControl1.Controls.Add(this.textEditParity); + this.dataLayoutControl1.Controls.Add(this.textEditStationNumber); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(822, 635); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // textEditPort + // + this.textEditPort.Location = new System.Drawing.Point(84, 12); + this.textEditPort.Name = "textEditPort"; + this.textEditPort.Size = new System.Drawing.Size(325, 20); + this.textEditPort.StyleController = this.dataLayoutControl1; + this.textEditPort.TabIndex = 7; + // + // textEditBaudRate + // + this.textEditBaudRate.Location = new System.Drawing.Point(485, 12); + this.textEditBaudRate.Name = "textEditBaudRate"; + this.textEditBaudRate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEditBaudRate.Size = new System.Drawing.Size(325, 20); + this.textEditBaudRate.StyleController = this.dataLayoutControl1; + this.textEditBaudRate.TabIndex = 11; + // + // textEditDataBits + // + this.textEditDataBits.EditValue = "8"; + this.textEditDataBits.Location = new System.Drawing.Point(485, 36); + this.textEditDataBits.Name = "textEditDataBits"; + this.textEditDataBits.Size = new System.Drawing.Size(325, 20); + this.textEditDataBits.StyleController = this.dataLayoutControl1; + this.textEditDataBits.TabIndex = 12; + // + // textEditStopBits + // + this.textEditStopBits.EditValue = "1"; + this.textEditStopBits.Location = new System.Drawing.Point(84, 60); + this.textEditStopBits.Name = "textEditStopBits"; + this.textEditStopBits.Size = new System.Drawing.Size(325, 20); + this.textEditStopBits.StyleController = this.dataLayoutControl1; + this.textEditStopBits.TabIndex = 13; + // + // textEditParity + // + this.textEditParity.Location = new System.Drawing.Point(485, 60); + this.textEditParity.Name = "textEditParity"; + this.textEditParity.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.textEditParity.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { + new DevExpress.XtraEditors.Controls.ImageComboBoxItem("鏃�", "0", -1), + new DevExpress.XtraEditors.Controls.ImageComboBoxItem("濂�", "1", -1), + new DevExpress.XtraEditors.Controls.ImageComboBoxItem("鍋�", "2", -1)}); + this.textEditParity.Properties.NullText = "鏃�"; + this.textEditParity.Size = new System.Drawing.Size(325, 20); + this.textEditParity.StyleController = this.dataLayoutControl1; + this.textEditParity.TabIndex = 14; + // + // textEditStationNumber + // + this.textEditStationNumber.EditValue = "1"; + this.textEditStationNumber.Location = new System.Drawing.Point(84, 36); + this.textEditStationNumber.Name = "textEditStationNumber"; + this.textEditStationNumber.Size = new System.Drawing.Size(325, 20); + this.textEditStationNumber.StyleController = this.dataLayoutControl1; + this.textEditStationNumber.TabIndex = 15; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem8, + this.layoutControlItem9, + this.layoutControlItem10, + this.layoutControlItem11, + this.layoutControlItem7, + this.layoutControlItem3}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(822, 635); + this.Root.TextVisible = false; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.textEditDataBits; + this.layoutControlItem8.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem8.CustomizationFormText = "鏁版嵁浣嶏細"; + this.layoutControlItem8.Location = new System.Drawing.Point(401, 24); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(401, 24); + this.layoutControlItem8.Text = "鏁版嵁浣嶏細"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.textEditStopBits; + this.layoutControlItem9.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem9.CustomizationFormText = "鍋滄浣嶏細"; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(401, 567); + this.layoutControlItem9.Text = "鍋滄浣嶏細"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.textEditParity; + this.layoutControlItem10.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem10.CustomizationFormText = "濂囧伓鏍¢獙锛�"; + this.layoutControlItem10.Location = new System.Drawing.Point(401, 48); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(401, 567); + this.layoutControlItem10.Text = "濂囧伓鏍¢獙锛�"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.textEditStationNumber; + this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem11.CustomizationFormText = "绔欏彿锛�"; + this.layoutControlItem11.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(401, 24); + this.layoutControlItem11.Text = "绔欏彿锛�"; + this.layoutControlItem11.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.textEditBaudRate; + this.layoutControlItem7.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem7.CustomizationFormText = "娉㈢壒鐜囷細"; + this.layoutControlItem7.Location = new System.Drawing.Point(401, 0); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(401, 24); + this.layoutControlItem7.Text = "娉㈢壒鐜囷細"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(60, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.textEditPort; + this.layoutControlItem3.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem3.CustomizationFormText = "绔彛鍙凤細"; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(401, 24); + this.layoutControlItem3.Text = "绔彛鍙凤細"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(60, 14); + // + // ProtocolModbus + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "ProtocolModbus"; + this.Size = new System.Drawing.Size(822, 635); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditBaudRate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditDataBits.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditStopBits.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditParity.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditStationNumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit textEditPort; + private DevExpress.XtraEditors.ImageComboBoxEdit textEditBaudRate; + private DevExpress.XtraEditors.TextEdit textEditDataBits; + private DevExpress.XtraEditors.TextEdit textEditStopBits; + private DevExpress.XtraEditors.ImageComboBoxEdit textEditParity; + private DevExpress.XtraEditors.TextEdit textEditStationNumber; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.cs new file mode 100644 index 0000000..fe76585 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.cs @@ -0,0 +1,55 @@ +锘縰sing DevExpress.Utils.Extensions; +using DevExpress.XtraEditors; +using DevExpress.XtraEditors.Controls; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO.Ports; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public partial class ProtocolModbus : DevExpress.XtraEditors.XtraUserControl + { + public ProtocolModbus() + { + InitializeComponent(); + SetSelectData(); + } + + public IBoxProtocolViewModel GetData() + { + var model = new IBoxProtocolViewModel(); + model.Port = this.textEditPort.Text; + model.BaudRate = int.Parse((this.textEditBaudRate.SelectedItem as ImageComboBoxItem).Value.ToString()); + model.dataBits = int.Parse(this.textEditDataBits.Text); + model.stopBits = this.textEditStopBits.Text == "1" ? StopBits.One : StopBits.None; + model.StationNumber = int.Parse(this.textEditStationNumber.Text); + return model; + } + + private void SetSelectData() + { + var baudRates = new dModbus().BaudRate(); + baudRates.ForEach(baudRate => + { + this.textEditBaudRate.Properties.Items.Add(baudRate.Key.ToString(), baudRate.Value, -1); + }); + this.textEditBaudRate.SelectItemByDescription("9600"); + } + + public void SetData(IBoxProtocolViewModel model) + { + this.textEditPort.Text = model.Port; + this.textEditBaudRate.EditValue = model.BaudRate; + this.textEditDataBits.Text = model.dataBits.ToString(); + this.textEditStopBits.Text = model.stopBits.ToString()=="One"?"1":"0"; + this.textEditStationNumber.Text = model.StationNumber.ToString(); + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.resx b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbus.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.Designer.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.Designer.cs new file mode 100644 index 0000000..99dba07 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.Designer.cs @@ -0,0 +1,134 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class ProtocolModbusTcp + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.textEditIP = new DevExpress.XtraEditors.TextEdit(); + this.textEditPort = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.textEditIP); + this.dataLayoutControl1.Controls.Add(this.textEditPort); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(833, 611); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // textEditIP + // + this.textEditIP.Location = new System.Drawing.Point(72, 12); + this.textEditIP.Name = "textEditIP"; + this.textEditIP.Size = new System.Drawing.Size(342, 20); + this.textEditIP.StyleController = this.dataLayoutControl1; + this.textEditIP.TabIndex = 6; + // + // textEditPort + // + this.textEditPort.Location = new System.Drawing.Point(478, 12); + this.textEditPort.Name = "textEditPort"; + this.textEditPort.Size = new System.Drawing.Size(343, 20); + this.textEditPort.StyleController = this.dataLayoutControl1; + this.textEditPort.TabIndex = 7; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem3}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(833, 611); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.textEditIP; + this.layoutControlItem1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem1.CustomizationFormText = "IP鍦板潃:"; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(406, 591); + this.layoutControlItem1.Text = "IP鍦板潃:"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.textEditPort; + this.layoutControlItem3.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem3.CustomizationFormText = "绔彛鍙凤細"; + this.layoutControlItem3.Location = new System.Drawing.Point(406, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(407, 591); + this.layoutControlItem3.Text = "绔彛鍙凤細"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(48, 14); + // + // ProtocolModbusTcp + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "ProtocolModbusTcp"; + this.Size = new System.Drawing.Size(833, 611); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit textEditIP; + private DevExpress.XtraEditors.TextEdit textEditPort; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.cs new file mode 100644 index 0000000..021100e --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.cs @@ -0,0 +1,35 @@ +锘縰sing DevExpress.XtraEditors; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public partial class ProtocolModbusTcp : DevExpress.XtraEditors.XtraUserControl + { + public ProtocolModbusTcp() + { + InitializeComponent(); + } + + public IBoxProtocolViewModel GetData() + { + var model = new IBoxProtocolViewModel(); + model.IP = this.textEditIP.Text; + model.Port = this.textEditPort.Text; + return model; + } + + public void SetData(IBoxProtocolViewModel model) + { + this.textEditIP.Text = model.IP; + this.textEditPort.Text = model.Port; + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.resx b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolModbusTcp.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.Designer.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.Designer.cs new file mode 100644 index 0000000..d1637cc --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.Designer.cs @@ -0,0 +1,134 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class ProtocolOML + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.textEditIP = new DevExpress.XtraEditors.TextEdit(); + this.textEditPort = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.textEditIP); + this.dataLayoutControl1.Controls.Add(this.textEditPort); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(761, 554); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // textEditIP + // + this.textEditIP.Location = new System.Drawing.Point(72, 12); + this.textEditIP.Name = "textEditIP"; + this.textEditIP.Size = new System.Drawing.Size(306, 20); + this.textEditIP.StyleController = this.dataLayoutControl1; + this.textEditIP.TabIndex = 6; + // + // textEditPort + // + this.textEditPort.Location = new System.Drawing.Point(442, 12); + this.textEditPort.Name = "textEditPort"; + this.textEditPort.Size = new System.Drawing.Size(307, 20); + this.textEditPort.StyleController = this.dataLayoutControl1; + this.textEditPort.TabIndex = 7; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem3}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(761, 554); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.textEditIP; + this.layoutControlItem1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem1.CustomizationFormText = "IP鍦板潃:"; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(370, 534); + this.layoutControlItem1.Text = "IP鍦板潃:"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.textEditPort; + this.layoutControlItem3.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem3.CustomizationFormText = "绔彛鍙凤細"; + this.layoutControlItem3.Location = new System.Drawing.Point(370, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(371, 534); + this.layoutControlItem3.Text = "绔彛鍙凤細"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(48, 14); + // + // ProtocolOML + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "ProtocolOML"; + this.Size = new System.Drawing.Size(761, 554); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit textEditIP; + private DevExpress.XtraEditors.TextEdit textEditPort; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.cs new file mode 100644 index 0000000..fc831a8 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.cs @@ -0,0 +1,35 @@ +锘縰sing DevExpress.XtraEditors; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public partial class ProtocolOML : DevExpress.XtraEditors.XtraUserControl + { + public ProtocolOML() + { + InitializeComponent(); + } + + public IBoxProtocolViewModel GetData() + { + var model = new IBoxProtocolViewModel(); + model.IP = this.textEditIP.Text; + model.Port = this.textEditPort.Text; + return model; + } + + public void SetData(IBoxProtocolViewModel model) + { + this.textEditIP.Text = model.IP; + this.textEditPort.Text = model.Port; + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.resx b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolOML.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.Designer.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.Designer.cs new file mode 100644 index 0000000..deda8f6 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.Designer.cs @@ -0,0 +1,134 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class ProtocolSL + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.textEditIP = new DevExpress.XtraEditors.TextEdit(); + this.textEditPort = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.textEditIP); + this.dataLayoutControl1.Controls.Add(this.textEditPort); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(773, 641); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // textEditIP + // + this.textEditIP.Location = new System.Drawing.Point(72, 12); + this.textEditIP.Name = "textEditIP"; + this.textEditIP.Size = new System.Drawing.Size(312, 20); + this.textEditIP.StyleController = this.dataLayoutControl1; + this.textEditIP.TabIndex = 6; + // + // textEditPort + // + this.textEditPort.Location = new System.Drawing.Point(448, 12); + this.textEditPort.Name = "textEditPort"; + this.textEditPort.Size = new System.Drawing.Size(313, 20); + this.textEditPort.StyleController = this.dataLayoutControl1; + this.textEditPort.TabIndex = 7; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem3}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(773, 641); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.textEditIP; + this.layoutControlItem1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem1.CustomizationFormText = "IP鍦板潃:"; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(376, 621); + this.layoutControlItem1.Text = "IP鍦板潃:"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.textEditPort; + this.layoutControlItem3.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem3.CustomizationFormText = "绔彛鍙凤細"; + this.layoutControlItem3.Location = new System.Drawing.Point(376, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(377, 621); + this.layoutControlItem3.Text = "绔彛鍙凤細"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(48, 14); + // + // ProtocolSL + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "ProtocolSL"; + this.Size = new System.Drawing.Size(773, 641); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit textEditIP; + private DevExpress.XtraEditors.TextEdit textEditPort; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.cs new file mode 100644 index 0000000..7567e89 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.cs @@ -0,0 +1,35 @@ +锘縰sing DevExpress.XtraEditors; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public partial class ProtocolSL : DevExpress.XtraEditors.XtraUserControl + { + public ProtocolSL() + { + InitializeComponent(); + } + + public IBoxProtocolViewModel GetData() + { + var model = new IBoxProtocolViewModel(); + model.IP = this.textEditIP.Text; + model.Port = this.textEditPort.Text; + return model; + } + + public void SetData(IBoxProtocolViewModel model) + { + this.textEditIP.Text = model.IP; + this.textEditPort.Text = model.Port; + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.resx b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolSL.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.Designer.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.Designer.cs new file mode 100644 index 0000000..57285a7 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.Designer.cs @@ -0,0 +1,194 @@ +锘縩amespace IBox.WinFrmUI +{ + partial class ProtocolXMZ + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.textEditIP = new DevExpress.XtraEditors.TextEdit(); + this.textEditPort = new DevExpress.XtraEditors.TextEdit(); + this.textEditRackNumber = new DevExpress.XtraEditors.TextEdit(); + this.textEditSlotNumber = new DevExpress.XtraEditors.TextEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditRackNumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditSlotNumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + this.SuspendLayout(); + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.textEditIP); + this.dataLayoutControl1.Controls.Add(this.textEditPort); + this.dataLayoutControl1.Controls.Add(this.textEditRackNumber); + this.dataLayoutControl1.Controls.Add(this.textEditSlotNumber); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(562, 428); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // textEditIP + // + this.textEditIP.Location = new System.Drawing.Point(72, 12); + this.textEditIP.Name = "textEditIP"; + this.textEditIP.Size = new System.Drawing.Size(206, 20); + this.textEditIP.StyleController = this.dataLayoutControl1; + this.textEditIP.TabIndex = 6; + // + // textEditPort + // + this.textEditPort.Location = new System.Drawing.Point(342, 12); + this.textEditPort.Name = "textEditPort"; + this.textEditPort.Size = new System.Drawing.Size(208, 20); + this.textEditPort.StyleController = this.dataLayoutControl1; + this.textEditPort.TabIndex = 7; + // + // textEditRackNumber + // + this.textEditRackNumber.EditValue = "0"; + this.textEditRackNumber.Location = new System.Drawing.Point(72, 36); + this.textEditRackNumber.Name = "textEditRackNumber"; + this.textEditRackNumber.Size = new System.Drawing.Size(206, 20); + this.textEditRackNumber.StyleController = this.dataLayoutControl1; + this.textEditRackNumber.TabIndex = 9; + // + // textEditSlotNumber + // + this.textEditSlotNumber.EditValue = "0"; + this.textEditSlotNumber.Location = new System.Drawing.Point(342, 36); + this.textEditSlotNumber.Name = "textEditSlotNumber"; + this.textEditSlotNumber.Size = new System.Drawing.Size(208, 20); + this.textEditSlotNumber.StyleController = this.dataLayoutControl1; + this.textEditSlotNumber.TabIndex = 10; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem3, + this.layoutControlItem5, + this.layoutControlItem6}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(562, 428); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.textEditIP; + this.layoutControlItem1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem1.CustomizationFormText = "IP鍦板潃:"; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(270, 24); + this.layoutControlItem1.Text = "IP鍦板潃:"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.textEditPort; + this.layoutControlItem3.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem3.CustomizationFormText = "绔彛鍙凤細"; + this.layoutControlItem3.Location = new System.Drawing.Point(270, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(272, 24); + this.layoutControlItem3.Text = "绔彛鍙凤細"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.textEditRackNumber; + this.layoutControlItem5.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem5.CustomizationFormText = "鏈烘灦鍙凤細"; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(270, 384); + this.layoutControlItem5.Text = "鏈烘灦鍙凤細"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.textEditSlotNumber; + this.layoutControlItem6.ControlAlignment = System.Drawing.ContentAlignment.TopLeft; + this.layoutControlItem6.CustomizationFormText = "妲藉彿锛�"; + this.layoutControlItem6.Location = new System.Drawing.Point(270, 24); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(272, 384); + this.layoutControlItem6.Text = "妲藉彿锛�"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(48, 14); + // + // ProtocolXMZ + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataLayoutControl1); + this.Name = "ProtocolXMZ"; + this.Size = new System.Drawing.Size(562, 428); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.textEditIP.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditPort.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditRackNumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.textEditSlotNumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit textEditIP; + private DevExpress.XtraEditors.TextEdit textEditPort; + private DevExpress.XtraEditors.TextEdit textEditRackNumber; + private DevExpress.XtraEditors.TextEdit textEditSlotNumber; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.cs b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.cs new file mode 100644 index 0000000..38465ca --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.cs @@ -0,0 +1,39 @@ +锘縰sing DevExpress.XtraEditors; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IBox.WinFrmUI +{ + public partial class ProtocolXMZ : DevExpress.XtraEditors.XtraUserControl + { + public ProtocolXMZ() + { + InitializeComponent(); + } + + public IBoxProtocolViewModel GetData() + { + var model = new IBoxProtocolViewModel(); + model.IP = this.textEditIP.Text; + model.Port = this.textEditPort.Text; + model.SlotNumber = int.Parse(this.textEditSlotNumber.Text); + model.RackNumber=int.Parse(this.textEditRackNumber.Text); + return model; + } + + public void SetData(IBoxProtocolViewModel model) + { + this.textEditIP.Text = model.IP; + this.textEditPort.Text = model.Port; + this.textEditSlotNumber.Text = model.SlotNumber.ToString(); + this.textEditRackNumber.Text=model.RackNumber.ToString(); + } + } +} diff --git a/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.resx b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/_UserControls/ProtocolXMZ.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file -- Gitblit v1.9.3