From 8b317182c94145de9b7e8ca5a22c14b2d99bb66b Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 23 六月 2021 16:27:35 +0800 Subject: [PATCH] 2021-6-23-2 --- HDL_ON/DAL/Server/HttpUtil.cs | 4 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 148 +++++++++++++++++++++++++++-- HDL-ON_iOS/HDL-ON_iOS.csproj | 2 HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs | 4 HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 2 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs | 43 +++++--- .vs/HDL_APP_Project/xs/UserPrefs.xml | 55 ++++------ HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TimeView.cs | 28 +++++ HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs | 2 9 files changed, 225 insertions(+), 63 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 317a65d..dedae25 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,25 +1,17 @@ -锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> - <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-000929D421E8802E" /> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs"> +锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> + <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.FE1D0763-7181-4B0C-AB18-E30AA773A6FA" /> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs"> <Files> - <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="275" Column="53" /> - <File FileName="HDL-ON_iOS/Resources/Language.ini" Line="30" Column="10" /> - <File FileName="HDL-ON_Android/Assets/Language.ini" /> - <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="637" Column="53" /> - <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs" Line="402" Column="64" /> - <File FileName="HDL_ON/UI/MainPage.cs" Line="275" Column="45" /> - <File FileName="HDL_ON/UI/UI2/UserPageBLL.cs" Line="6" Column="26" /> - <File FileName="HDL_ON/UI/UI2/UserPage.cs" Line="571" Column="7" /> - <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="101" Column="16" /> - <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="599" Column="27" /> - <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" Line="249" Column="22" /> - <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" Line="238" Column="25" /> - <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" Line="94" Column="26" /> - <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="123" Column="1" /> - <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="16" Column="22" /> - <File FileName="HDL_ON/Entity/Room.cs" Line="111" Column="43" /> - <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" Line="244" Column="1" /> - <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" Line="186" Column="39" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs" Line="336" Column="27" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" Line="92" Column="38" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs" Line="645" Column="50" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs" Line="88" Column="54" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs" Line="116" Column="23" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs" Line="48" Column="59" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TimeView.cs" Line="298" Column="26" /> + <File FileName="HDL_ON/Common/R.cs" Line="1376" Column="27" /> + <File FileName="../EvoyoHomeNewCloud/ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs" Line="1462" Column="32" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" Line="169" Column="37" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -28,16 +20,20 @@ <Node name="HDL_ON" expanded="True"> <Node name="Common" expanded="True" /> <Node name="DAL" expanded="True"> + <Node name="DriverLayer" expanded="True" /> <Node name="Server" expanded="True" /> </Node> <Node name="Entity" expanded="True" /> <Node name="UI" expanded="True"> + <Node name="CSS" expanded="True" /> <Node name="UI2" expanded="True"> <Node name="3-Intelligence" expanded="True"> <Node name="Automation" expanded="True"> - <Node name="AddLogic.cs" selected="True" /> + <Node name="LogicView" expanded="True" /> + <Node name="Send.cs" selected="True" /> </Node> </Node> + <Node name="4-PersonalCenter" expanded="True" /> </Node> </Node> </Node> @@ -55,17 +51,14 @@ <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> - <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> - <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> + <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> + <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.4b65c4650918" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore> - <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" line="34" column="1" /> - <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs" line="118" column="1" /> - <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" line="546" column="1" /> - <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Common/ApiUtlis.cs" relfile="HDL_ON/Common/ApiUtlis.cs" line="117" column="1" /> - <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" line="255" column="1" /> - <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" line="327" column="1" /> - <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" line="191" column="1" /> + <Breakpoint file="/Users/jlchen/Desktop/wjc/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" line="34" column="1" /> + <Breakpoint file="/Users/jlchen/Desktop/wjc/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs" line="118" column="1" /> + <Breakpoint file="/Users/jlchen/Desktop/wjc/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" line="546" column="1" /> + <Breakpoint file="/Users/jlchen/Desktop/wjc/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" line="327" column="1" /> </BreakpointStore> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index 5bd1b66..97326f6 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -27,7 +27,7 @@ <MtouchDebug>true</MtouchDebug> <CodesignKey>iPhone Developer</CodesignKey> <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC";-w</MtouchExtraArgs> - <CodesignProvision>On+Dev-20210428-1</CodesignProvision> + <CodesignProvision>On+Dev-20210616-1</CodesignProvision> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> <DebugType>none</DebugType> diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 32c87e1..75c9b97 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -18,8 +18,8 @@ /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// /// </summary> - public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm + //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs index d185e19..6ba1356 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs @@ -47,7 +47,7 @@ delayView.frameLayout.Y = sceneView.frameLayout.Bottom; delayView.btnText.TextID = StringId.delayLogic; delayView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png"; - //viewLayout.AddChidren(delayView.FLayoutView()); + viewLayout.AddChidren(delayView.FLayoutView()); #endregion #region 鎵�鏈夌偣鍑讳簨浠� diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index c888bc1..7e25ab5 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -639,6 +639,8 @@ targetView.btnClick.Tag = outputTarget.sid; ///鏉′欢鐘舵�佹暟缁� List<Dictionary<string, string>> dicList = outputTarget.status as List<Dictionary<string, string>>; + //鏄剧ず鐘舵�佸�� + string stateStr = ""; //鏄剧ず杈撳嚭鏉′欢鍚勭绫诲瀷鐘舵�� switch (outputTarget.target_type) { @@ -652,8 +654,7 @@ targetView.btnText.Text = device.name; //鏀瑰彉璁惧鍚嶇О鏄剧ず鎺т欢瀹藉害 targetView.btnText.Width = Application.GetRealWidth(80); - //绗竴涓彉閲忔樉绀虹姸鎬佸�� - string stateStr = ""; + //鍖哄埆涓嶅悓璁惧锛屾樉绀轰笉鍚岃澶囩姸鎬� switch (device.spk) { @@ -673,7 +674,6 @@ stateStr = Language.StringByID(StringId.offLogic); } } - targetView.btnState.Text = stateStr; } break; case SPK.LightRGB: @@ -699,7 +699,7 @@ { stateStr = brightness + "%"; } - targetView.btnState.Text = stateStr; + } break; case SPK.CurtainSwitch: @@ -728,7 +728,6 @@ break; } } - targetView.btnState.Text = stateStr; } break; case SPK.AcStandard: @@ -820,11 +819,11 @@ } if (on_off != "" && on_off == "off") { - targetView.btnState.Text = Language.StringByID(StringId.offLogic); + stateStr = Language.StringByID(StringId.offLogic); } else { - targetView.btnState.Text = stateStr.TrimEnd(','); + stateStr = stateStr.TrimEnd(','); } @@ -918,11 +917,11 @@ } if (on_off != "" && on_off == "off") { - targetView.btnState.Text = Language.StringByID(StringId.offLogic); + stateStr = Language.StringByID(StringId.offLogic); } else { - targetView.btnState.Text = stateStr.TrimEnd(','); + stateStr = stateStr.TrimEnd(','); } } @@ -937,7 +936,7 @@ targetView.btnIcon.UnSelectedImagePath = "LogicIcon/scene.png"; targetView.btnNextIcon.Visible = false; //鏄剧ず鍦烘櫙鍚嶇О - targetView.btnText.Text = scene.name; + stateStr = scene.name; } break; case "3": @@ -946,10 +945,19 @@ foreach (var dic in dicList) { string value = dic["value"]; - targetView.btnText.Text = value; + stateStr = value; } } break; + } + + if (outputTarget.target_type == "1") + { + targetView.btnState.Text =new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr; + } + else + { + targetView.btnText.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay)+ stateStr; } //鍐嶆缂栬緫鏉′欢鐘舵�佺偣鍑讳簨浠� targetView.btnClick.MouseUpEventHandler += (sen, e) => @@ -997,6 +1005,25 @@ } break; } + }; + //寤舵椂鐐瑰嚮浜嬩欢 + targetView.btnDelay.MouseUpEventHandler += (sen, e) => + { + + InpOrOutLogicMethod inpOrOutLogicMethod = new InpOrOutLogicMethod(); + inpOrOutLogicMethod.Delayed(thisView, outputTarget, (value) => + { + outputTarget.delay = value.ToString(); + if (outputTarget.target_type == "1") + { + targetView.btnState.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr; + } + else + { + targetView.btnText.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr; + } + }); + }; ///鍒犻櫎鎺т欢 targetView.btnDel.MouseUpEventHandler += (sender, e) => @@ -1585,5 +1612,104 @@ catch { } return name; } + + + /// <summary> + /// 寤舵椂鏃堕棿鏂规硶 + /// </summary> + /// <param name="fLayout">鍦ㄥ摢涓晫闈㈡樉绀�</param> + /// <param name="edit">锛坱rue=缂栬緫锛沠alse=鏂板缓锛�</param> + /// <param name="index">缂栬緫鏉′欢鐨勭储寮�</param> + private void Delayed(FrameLayout thisFLayout, Output output,Action<int>action) + { + FrameLayout fLayout = new FrameLayout + { + BackgroundColor = CSS.CSS_Color.viewTrans60lucence, + }; + thisFLayout.AddChidren(fLayout); + LogicView.TimeView timePointView = new LogicView.TimeView(); + timePointView.FLayoutView(fLayout); + EventHandler<MouseEventArgs> RemovefLayout = (sender, e1) => + { + //绉婚櫎fLayout鐣岄潰 + fLayout.RemoveFromParent(); + }; + //鍙栨秷鐐瑰嚮浜嬩欢 + timePointView.btnCancel.MouseUpEventHandler += RemovefLayout; + + //鍔犺浇鏁版嵁鐣岄潰鐨勮缃柟娉�(鍒楄〃浜掍笉鑱斿姩) + timePointView.mUIPickerView.setNPicker(timePointView.GetmStringList(), timePointView.GetsStringList(), null); + //榛樿鍒濆閫変腑鐘舵�� + timePointView.mUIPickerView.setCurrentItems(0, 5, 0); + //瀹氫箟涓�涓眬閮ㄥ彉閲忚褰曢�変腑鏃堕棿 + int timepoint = 5; + + if (output.delay != "0") + { + int intValue = int.Parse(output.delay); + var m = intValue / 60; + var s = intValue % 60; + + string timeValue = m.ToString() + ":" + s.ToString(); + int mIndex = timePointView.GetValueIndex(timeValue, 0, 1, timePointView.GetmIntList()); + int sIndex = timePointView.GetValueIndex(timeValue, 1, 0, timePointView.GetmIntList()); + //鏇存柊鍒濆鐘舵�� + timePointView.mUIPickerView.setCurrentItems(mIndex, sIndex, 0); + timepoint = intValue; + } + + + //閫変腑鏃堕棿鍥炶皟鏂规硶,鏃堕棿鍙樺寲涓�娆″洖璋冧竴娆� + timePointView.mUIPickerView.OnSelectChangeEvent += (index1, index2, index3) => + { + string minuet = timePointView.GethStringList0()[index1].Split(' ')[0]; + string second = timePointView.GetmStringList()[index2].Split(' ')[0]; + int minuetIntValue = int.Parse(minuet); + int secondIntValue = int.Parse(second); + timepoint = minuetIntValue*60+secondIntValue; + }; + //纭畾鐐瑰嚮浜嬩欢 + timePointView.btnConfirm.MouseUpEventHandler += (sender, e3) => + { + if (timepoint==0) + { + //鎻愮ず + return; + } + fLayout.RemoveFromParent(); + action(timepoint); + }; + } + /// <summary> + /// 鑾峰彇鏃堕棿鏂囨湰鎻忚堪 + /// </summary> + /// <param name="strTimeValue">鏃堕棿鍊硷紙鍗曚綅s绉掞級</param> + /// <returns></returns> + private string GetTimeText(string strTimeValue) + { + var timeValue = int.Parse(strTimeValue); + string state = ""; + var minutes = timeValue / 60; + var seconds = timeValue % 60; + if (minutes != 0) + { + if (seconds == 0) + { + state = minutes.ToString() + Language.StringByID(StringId.minute); + } + else + { + state = minutes.ToString() + Language.StringByID(StringId.minute) + seconds.ToString() + Language.StringByID(StringId.s); + } + } + else + { + if (seconds != 0) + { + state = seconds.ToString() + Language.StringByID(StringId.s); + } + } + return state; + } } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs index d392722..f076168 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs @@ -112,6 +112,10 @@ /// </summary> public string sid = ""; /// <summary> + /// 閫昏緫杈撳嚭鐩爣寤舵椂闂�(鍗曚綅鐢ㄧ) + /// </summary> + public string delay = "0"; + /// <summary> /// 閫昏緫杈撳嚭鐩爣绫诲瀷 /// 璁惧=1; /// 鍦烘櫙=2; diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs index 37e2d2d..9f8dc40 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs @@ -7,11 +7,11 @@ /// <summary> /// 涓绘帶浠禫iew /// </summary> - public FrameLayout frameLayout= new FrameLayout + public FrameLayout frameLayout = new FrameLayout { Height = Application.GetRealHeight(44), Width = Application.GetRealWidth(343), - BackgroundColor= CSS.CSS_Color.view, + BackgroundColor = CSS.CSS_Color.view, X = Application.GetRealWidth(LogicView.TextSize.left16), }; @@ -23,28 +23,28 @@ Height = Application.GetRealHeight(43), Width = Application.GetRealWidth(343), LineColor = CSS.CSS_Color.viewTranslucence, - SubViewWidth=Application.GetRealWidth(68), + SubViewWidth = Application.GetRealWidth(68), }; /// <summary> /// 锛堟潯浠舵垨鑰呯洰鏍囷級鍥炬爣 /// </summary> - public Button btnIcon= new Button + public Button btnIcon = new Button { - Width= Application.GetRealWidth(28), - Height =Application.GetRealWidth(28), + Width = Application.GetRealWidth(28), + Height = Application.GetRealWidth(28), //Y = Application.GetRealHeight(8), X = Application.GetRealWidth(TextSize.left12), - + }; /// <summary> /// 锛堟潯浠舵垨鑰呯洰鏍囷級鏂囨湰鎻忚堪 /// </summary> - public Button btnText= new Button + public Button btnText = new Button { TextSize = TextSize.text14, Width = Application.GetRealWidth(250), Height = Application.GetRealHeight(20), - TextColor= CSS.CSS_Color.textColor, + TextColor = CSS.CSS_Color.textColor, //Y=Application.GetRealHeight(12), X = Application.GetRealWidth(52), }; @@ -58,9 +58,9 @@ Width = Application.GetRealWidth(130), Height = Application.GetRealHeight(17), TextColor = CSS.CSS_Color.textCancelColor, - Y=Application.GetRealHeight(14), + Y = Application.GetRealHeight(14), X = Application.GetRealWidth(165), - TextAlignment=TextAlignment.CenterRight, + TextAlignment = TextAlignment.CenterRight, }; /// <summary> @@ -81,13 +81,26 @@ /// </summary> public Button btnLine = new Button { - Width=Application.GetRealWidth(279), - Y = Application.GetRealHeight(44-1), + Width = Application.GetRealWidth(279), + Y = Application.GetRealHeight(44 - 1), X = Application.GetRealWidth(52), Height = 1, BackgroundColor = CSS.CSS_Color.viewLine, }; + /// <summary> + /// 寤舵椂 + /// </summary> + public Button btnDelay = new Button + { + BackgroundColor = CSS.CSS_Color.AuxiliaryColor1, + TextID = StringId.delayLogic, + TextSize = LogicView.TextSize.text16, + TextColor = CSS.CSS_Color.view, + }; + /// <summary> + /// 鍒犻櫎 + /// </summary> public Button btnDel = new Button { BackgroundColor = CSS.CSS_Color.textRedColor, @@ -95,7 +108,6 @@ TextSize = LogicView.TextSize.text16, TextColor = CSS.CSS_Color.view, }; - public Button btnClick = new Button { Height = Application.GetRealHeight(44), @@ -117,12 +129,13 @@ rowLayout.AddChidren(btnText); rowLayout.AddChidren(btnState); rowLayout.AddChidren(btnNextIcon); + rowLayout.AddRightView(btnDelay); rowLayout.AddRightView(btnDel); rowLayout.AddChidren(btnClick); btnLine.Y = frameLayout.Height - 1; frameLayout.AddChidren(btnLine); } - + } } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TimeView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TimeView.cs index a36dc65..a79324c 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TimeView.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TimeView.cs @@ -72,7 +72,6 @@ /// </summary> /// <returns></returns> public void FLayoutView(FrameLayout fLayout) - //public void FLayoutView(FrameLayout fLayout, string currState, Action<string> action) { fLayout.AddChidren(frameLayout); @@ -80,7 +79,6 @@ frameLayout.AddChidren(btnCancel); frameLayout.AddChidren(btnConfirm); frameLayout.AddChidren(btnLine); - //TimePoint(fLayout, action,currState); } /// <summary> /// 閫変腑鏃堕棿鐨勬柟娉� @@ -248,6 +246,32 @@ return mList; } + /// <summary> + /// 鑾峰彇60绉掑垪琛� + /// </summary> + /// <returns></returns> + public List<string> GetsStringList() + { + //鍒濆鍖栧垪琛� + var mList = new List<string>(); + for (int i = 0; i < 60; i++) + { + if (i < 10) + { + var a = "0" + i.ToString(); + //娣诲姞鏁版嵁 + mList.Add(a + " " + Language.StringByID(StringId.s)); + } + else + { + //娣诲姞鏁版嵁 + mList.Add(i.ToString() + " " + Language.StringByID(StringId.s)); + } + + } + + return mList; + } /// <summary> /// 鑾峰彇023灏忔椂鍒楄〃 diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs index 28e66fa..2f32631 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs @@ -114,6 +114,7 @@ { var outputTypeJOb = new JObject { }; outputTypeJOb.Add("sid", dictionary.sid); + outputTypeJOb.Add("delay", dictionary.delay); outputTypeJOb.Add("target_type", dictionary.target_type); var statusArray = new JArray { }; foreach (var dic in dictionary.status) @@ -226,6 +227,7 @@ { var outputTypeJOb = new JObject { }; outputTypeJOb.Add("sid", dictionary.sid); + outputTypeJOb.Add("delay", dictionary.delay); outputTypeJOb.Add("target_type", dictionary.target_type); var statusArray = new JArray { }; foreach (var dic in dictionary.status) -- Gitblit v1.8.0