.vs/HDL_APP_Project/xs/UserPrefs.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
.vs/HDL_APP_Project/xs/sqlite3/storage.ide | 补丁 | 查看 | 原始文档 | blame | 历史 | |
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm | 补丁 | 查看 | 原始文档 | blame | 历史 | |
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal | 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/DeviceFunList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,19 +1,20 @@ <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.D4411691-F5B8-40F4-97C1-964F33115DBC" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs"> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/DeviceFunList.cs"> <Files> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs" Line="19" Column="15" IsPinned="True" /> <File FileName="HDL_ON/Common/R.cs" Line="467" Column="1" /> <File FileName="HDL-ON_Android/Assets/Language.ini" Line="460" Column="8" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs" Line="79" Column="63" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs" Line="225" Column="120" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs" Line="69" Column="69" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs" Line="239" Column="66" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs" Line="185" Column="67" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/DeviceFunList.cs" Line="44" Column="82" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/DeviceFunList.cs" Line="226" Column="36" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/LogicTypeTitleView.cs" Line="57" Column="44" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" Line="45" Column="38" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs" Line="60" Column="18" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs" Line="5" Column="18" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs" Line="18" Column="43" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs" Line="53" Column="11" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs" Line="124" Column="14" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -31,9 +32,8 @@ <Node name="UI2" expanded="True"> <Node name="3-Intelligence" expanded="True"> <Node name="Automation" expanded="True"> <Node name="LogicView" expanded="True"> <Node name="AddOutputInputView.cs" selected="True" /> </Node> <Node name="LogicView" expanded="True" /> <Node name="DeviceFunList.cs" selected="True" /> </Node> </Node> </Node> .vs/HDL_APP_Project/xs/sqlite3/storage.ideBinary files differ
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shmBinary files differ
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-walBinary files differ
HDL_ON/UI/UI2/3-Intelligence/Automation/DeviceFunList.cs
@@ -10,8 +10,9 @@ Tag = "Logic"; } public void Show(Entity.Function device) public void Show(Entity.Function device, int index, bool edit) { #region 界面布局 this.BackgroundColor = CSS.CSS_Color.viewMiddle; LogicView.TopView topView = new LogicView.TopView(); this.AddChidren(topView.FLayoutView()); @@ -27,17 +28,24 @@ Height = Application.GetRealHeight(667 - 64), }; this.AddChidren(fLayout); Input inputdevice = new Input(); inputdevice.condition_type = "3"; inputdevice.sid = device.sid; #endregion //定义一个变量,记录选中状态 string selectedState = "unknown"; Input inputdevice = new Input(); inputdevice.condition_type = "3"; inputdevice.sid = device.sid; switch (device.functionType) { //开关灯光 case FunctionType.Relay: { //for (int i = 0; i < device.function.Count; i++) //{ //} @@ -46,9 +54,9 @@ relayView.btnState.Visible = true; relayView.btnText.TextSize = LogicView.TextSize.text16; relayView.btnText.Height = Application.GetRealHeight(22); relayView.btnText.TextID =StringId.switchLogic; relayView.btnText.TextID = StringId.switchLogic; relayView.btnText.X = Application.GetRealWidth(16); relayView.btnText.Width= Application.GetRealWidth(130); relayView.btnText.Width = Application.GetRealWidth(130); relayView.btnLine.X = Application.GetRealWidth(16); relayView.btnLine.Width = Application.GetRealWidth(343); fLayout.AddChidren(relayView.FLayoutView()); @@ -61,7 +69,7 @@ this.AddChidren(relayFunView); LogicView.SwitchView switchView = new LogicView.SwitchView(); switchView.FLayoutView(relayFunView, 2); Button btnOn = new Button { TextAlignment = TextAlignment.Center, @@ -96,18 +104,43 @@ LogicMethod.dictionary(dic, "comparator", "="); LogicMethod.dictionary(dic, "data_type", "string"); inputdevice.condition.Add(dic); btnOn.MouseUpEventHandler += (sender2, e2) => { btnOn.MouseUpEventHandler += (sender2, e2) => { LogicMethod.dictionary(dic, "value", "on"); RemView(relayFunView); relayView.btnState.TextID = StringId.onLogic; selectedState = device.functionType + "_on"; }; btnOff.MouseUpEventHandler += (sender3, e3) => { btnOff.MouseUpEventHandler += (sender3, e3) => { LogicMethod.dictionary(dic, "value", "off"); RemView(relayFunView); relayView.btnState.TextID = StringId.offLogic; selectedState = device.functionType + "_off"; }; }; if (edit) { Input inputs = Logic.currlogic.input[index]; if (inputs.condition_type == "3") { List<Dictionary<string, string>> dicList = inputs.condition as List<Dictionary<string, string>>; foreach (var dic in dicList) { string value = dic["value"]; if (value == "on") { relayView.btnState.Text = Language.StringByID(StringId.onLogic); } else { relayView.btnState.Text = Language.StringByID(StringId.offLogic); } } } } } break; @@ -124,21 +157,31 @@ this.AddChidren(saveView.FLayoutView()); saveView.btnClick.MouseUpEventHandler += (sen, e) => { //if (edit) //{ // //移除旧数据 // Logic.currlogic.input.RemoveAt(index); // //新数据插入旧数据的位置; // Logic.currlogic.input.Insert(index, inputdevice); //} //else //{ // //添加一个新的时间点条件 // Logic.currlogic.input.Add(inputdevice); //} //添加一个新的时间点条件 Logic.currlogic.input.Add(inputdevice); if (selectedState != "unknown") { if (edit) { //移除旧数据 Logic.currlogic.input.RemoveAt(index); //新数据插入旧数据的位置; Logic.currlogic.input.Insert(index, inputdevice); } else { //添加一个新的时间点条件 Logic.currlogic.input.Add(inputdevice); } } else { if (!edit) { //提示用户 return; } this.RemoveFromParent(); return; } RemoveViewByTag("Logic"); AddLogic addLogic = new AddLogic(); MainPage.BasePageView.AddChidren(addLogic); @@ -153,8 +196,40 @@ /// 移除控件 /// </summary> /// <param name="frame"></param> public void RemView(FrameLayout frame) { public void RemView(FrameLayout frame) { frame.RemoveFromParent(); } public void GetState(Entity.Function device, bool edit, int index,Button button1,Button button2,Button button3,Button button4) { if (edit) { Input inputs = Logic.currlogic.input[index]; var dicList = inputs.condition as List<Dictionary<string, string>>; switch (device.functionType) { //开关灯光 case FunctionType.Relay: { foreach (var dic in dicList) { string value = dic["value"]; //if (value == "on") //{ // relayView.btnState.Text = Language.StringByID(StringId.onLogic); //} //else //{ // relayView.btnState.Text = Language.StringByID(StringId.offLogic); //} } } break; } } } } } HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -240,7 +240,7 @@ funView.btnClick.MouseUpEventHandler += (sen,e) => { DeviceFunList deviceFunList = new DeviceFunList(); MainPage.BasePageView.AddChidren(deviceFunList); deviceFunList.Show(dev); deviceFunList.Show(dev,0,false); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; } HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -59,7 +59,7 @@ inputView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(device.functionType); //显示设备名称 inputView.btnText.Text = device.name; //改变设备名称宽度 //改变设备名称显示控件宽度 inputView.btnText.Width = Application.GetRealWidth(80); //区别不同设备,显示不同设备状态 switch (device.functionType) @@ -90,6 +90,10 @@ inputView.btnClick.MouseUpEventHandler += (sen, e) => { Button button = (Button)sen; //找到当前编辑的索引 int indexVulae = int.Parse(inputView.btnClick.Tag.ToString()); //标记编辑状态 bool edit = true; switch (button.Name) { case "1": @@ -100,7 +104,7 @@ }; thisView.AddChidren(fLayout); TimeTpye timeTpye = new TimeTpye(); timeTpye.TimePoint(fLayout, true, int.Parse(inputView.btnClick.Tag.ToString())); timeTpye.TimePoint(fLayout, edit, indexVulae); } break; case "2": @@ -111,9 +115,22 @@ }; thisView.AddChidren(fLayout); TimeTpye timeTpye = new TimeTpye(); timeTpye.TimeHorizon(fLayout, true, int.Parse(inputView.btnClick.Tag.ToString())); timeTpye.TimeHorizon(fLayout, edit, indexVulae); } break; case "3": { //用sid找到设备; var device = LogicMethod.GetDevice(inputCondition.sid); DeviceFunList deviceFunList = new DeviceFunList(); MainPage.BasePageView.AddChidren(deviceFunList); deviceFunList.Show(device, indexVulae,edit); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; } break; } }; }