陈嘉乐
2020-12-22 67d661b241f68641ba5ec78cedc10493ca2afd22
2020-12-22-1

隐藏百分比功能
7个文件已修改
182 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 21 ●●●● 补丁 | 查看 | 原始文档 | 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/InpOrOutLogicMethod.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/brightnessView.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 128 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,21 +1,9 @@
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-001674E61438002E" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs">
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs" Line="598" Column="101" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs" Line="1174" Column="46" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs" Line="17" Column="46" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/BrightnessView.cs" Line="127" Column="51" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs" Line="37" Column="64" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SwitchView.cs" Line="168" Column="22" />
      <File FileName="HDL_ON/Common/R.cs" Line="518" Column="44" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs" Line="264" Column="34" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs" Line="1" Column="1" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" Line="527" Column="42" />
      <File FileName="HDL-ON_Android/Assets/Language.ini" Line="527" Column="1" />
      <File FileName="HDL-ON_iOS/Resources/Language.ini" Line="527" Column="11" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs" Line="115" Column="62" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs" Line="66" Column="32" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs" Line="475" Column="48" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs" Line="1" Column="1" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
@@ -32,7 +20,8 @@
                <Node name="UI2" expanded="True">
                  <Node name="3-Intelligence" expanded="True">
                    <Node name="Automation" expanded="True">
                      <Node name="PublicInterface.cs" selected="True" />
                      <Node name="LogicView" expanded="True" />
                      <Node name="InpOrOutLogicMethod.cs" selected="True" />
                    </Node>
                  </Node>
                  <Node name="FuntionControlView" expanded="True">
.vs/HDL_APP_Project/xs/sqlite3/storage.ide
Binary files differ
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm
Binary files differ
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
Binary files differ
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -260,6 +260,8 @@
                                    }
                                    break;
                                case FunctionType.Curtain:
                                case FunctionType.MotorCurtain:
                                case FunctionType.RollingShutter:
                                    {
                                        foreach (var dic in dicList)
                                        {
@@ -282,36 +284,6 @@
                                                    }
                                                    break;
                                            }
                                        }
                                        targetView.btnState.Text = stateStr;
                                    }
                                    break;
                                case FunctionType.MotorCurtain:
                                case FunctionType.RollingShutter:
                                    {
                                        string on_off = GetKeyValue("on_off", dicList);
                                        string percent = GetKeyValue("percent", dicList);
                                        if (on_off == "off")
                                        {
                                            stateStr = Language.StringByID(StringId.offLogic);
                                        }
                                        else if (on_off == "stop")
                                        {
                                            stateStr = Language.StringByID(StringId.stop);
                                        }
                                        else if (on_off == "on" && percent != "")
                                        {
                                            stateStr = Language.StringByID(StringId.onLogic) + percent + "%";
                                        }
                                        else if (on_off == "on")
                                        {
                                            stateStr = Language.StringByID(StringId.onLogic);
                                        }
                                        else if (percent != "")
                                        {
                                            stateStr = percent + "%";
                                        }
                                        targetView.btnState.Text = stateStr;
                                    }
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/brightnessView.cs
@@ -137,6 +137,7 @@
            frameLayout.AddChidren(seekBarVol);
            frameLayout.AddChidren(btn_add);
            frameLayout.AddChidren(btn_add_click);
            btnTitle.Text = titleName;
            //第一个变化记录选中值
            int brightnesValue = 0;
            if (stateValue != "")
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -63,16 +63,11 @@
                    break;
                //窗帘
                case FunctionType.Curtain:
                    {
                        //3表示(开,关,暂停)功能
                        SwitchView(fLayout, device, index, edit, 3);
                    }
                    break;
                case FunctionType.MotorCurtain:
                case FunctionType.RollingShutter:
                    {
                        //3表示(开,关,暂停)功能
                        SwitchBrightnessView(fLayout, device, index, edit, 3);
                        SwitchView(fLayout, device, index, edit, 3);
                    }
                    break;
                case FunctionType.AC:
@@ -418,6 +413,11 @@
                        ///模式点击事件
                        floorHeatingModehView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            FrameLayout frame = new FrameLayout
                            {
                                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
                            };
                            this.AddChidren(frame);
                            List<string> modeStr = new List<string> {
                                Language.StringByID(StringId.dayMode),
                                 Language.StringByID(StringId.nightMode),
@@ -425,65 +425,21 @@
                                   Language.StringByID(StringId.ordinaryMode),
                                Language.StringByID(StringId.timeMode),
                            };
                            FrameLayout frame = new FrameLayout
                            {
                                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
                            };
                            this.AddChidren(frame);
                            LogicView.DateView modeView = new LogicView.DateView();
                            modeView.btnTitle.TextID = StringId.modeLogic;
                            modeView.FLayoutView(frame, modeStr.Count);
                            modeView.btnCancel.MouseUpEventHandler += (sender2, e2) =>
                            {
                                frame.RemoveFromParent();
                            };
                            ///定义一个Btn记录选中状态
                            Button checkBtn = new Button
                            {
                                Tag = "unknown",
                            };
                            for (int i = 0; i < modeStr.Count; i++)
                            {
                                LogicView.CheckView modeTypeView = new LogicView.CheckView();
                                modeTypeView.frameLayout.Y = Application.GetRealHeight(56 + 50 * i);
                                modeView.frameLayout.AddChidren(modeTypeView.FLayoutView());
                                modeTypeView.btnText.Text = modeStr[i];
                                modeTypeView.btnClick.Tag = modeStr[i];//标记
                            ///之前的状态文本
                            string currText= floorHeatingModehView.btnState.Text;
                            PublicInterface modeView = new PublicInterface();
                            modeView.SingleSelectionShow(frame, modeStr, Language.StringByID(StringId.modeLogic), currText
                               , (stateValue) =>
                               {
                                   string keyVlaue = "mode";
                                   Dictionary<string, string> dic = new Dictionary<string, string>();
                                   LogicMethod.dictionary(dic, "key", "mode");
                                   LogicMethod.dictionary(dic, "value", GetModeValueString(stateValue, "FloorHeating"));
                                   AddDictionaryData(dicSateteList, keyVlaue, dic);
                                   floorHeatingModehView.btnState.Text = stateValue;
                                   selectedState = device.functionType + "_mode";
                               });
                                if (floorHeatingModehView.btnState.Text == modeStr[i])
                                {
                                    //显示之前的选中状态
                                    checkBtn.IsSelected = false;
                                    modeTypeView.btnCheckIcon.IsSelected = true;
                                    checkBtn = modeTypeView.btnCheckIcon;
                                    checkBtn.Tag = modeTypeView.btnClick.Tag.ToString();
                                }
                                //星期的点击事件
                                modeTypeView.btnClick.MouseUpEventHandler += (sender1, e1) =>
                                {
                                    checkBtn.IsSelected = false;
                                    modeTypeView.btnCheckIcon.IsSelected = true;
                                    checkBtn = modeTypeView.btnCheckIcon;
                                    checkBtn.Tag = modeTypeView.btnClick.Tag.ToString();
                                };
                            }
                            modeView.btnConfirm.MouseUpEventHandler += (sender1, e1) =>
                            {
                                if (checkBtn.Tag.ToString() == "unknown")
                                {
                                    return;
                                }
                                Dictionary<string, string> dic = new Dictionary<string, string>();
                                LogicMethod.dictionary(dic, "key", "mode");
                                string keyVlaue = "mode";
                                LogicMethod.dictionary(dic, "value", GetModeValueString(checkBtn.Tag.ToString(), "FloorHeating"));
                                floorHeatingModehView.btnState.Text = checkBtn.Tag.ToString();
                                selectedState = device.functionType + "_mode";
                                AddDictionaryData(dicSateteList, keyVlaue, dic);
                                RemView(frame);
                            };
                        };
                        if (edit)
                        {
@@ -894,6 +850,8 @@
                    }
                    break;
                case FunctionType.Curtain:
                case FunctionType.MotorCurtain:
                case FunctionType.RollingShutter:
                    {
                        foreach (var dic in dicList)
                        {
@@ -916,48 +874,6 @@
                                    }
                                    break;
                            }
                        }
                    }
                    break;
                case FunctionType.MotorCurtain:
                case FunctionType.RollingShutter:
                    {
                        foreach (var dic in dicList)
                        {
                            string value = dic["value"];
                            switch (dic["key"])
                            {
                                case "on_off":
                                    {
                                        switch (value)
                                        {
                                            case "on":
                                                {
                                                    button1.Text = Language.StringByID(StringId.onLogic);
                                                }
                                                break;
                                            case "off":
                                                {
                                                    button1.Text = Language.StringByID(StringId.offLogic);
                                                }
                                                break;
                                            case "stop":
                                                {
                                                    button1.Text = Language.StringByID(StringId.stop);
                                                }
                                                break;
                                        }
                                    }
                                    break;
                                case "percent":
                                    {
                                        button2.Text = value;
                                    }
                                    break;
                            }
                        }
                    }
                    break;