WJC
2019-12-24 0480792bde7bcf770290ba3414bd615e563e7b43
2019-12-24-02
3个文件已修改
148 ■■■■ 已修改文件
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,9 +1,12 @@
<Properties StartupConfiguration="{F1296E2C-3777-4385-85B2-DA77617E3178}|Default">
  <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/AddLogicPage.cs">
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/LogicCommunalPage.cs">
    <Files>
      <File FileName="Shared/Phone/Device/Logic/AddLogicPage.cs" Line="70" Column="1" />
      <File FileName="Shared/Phone/Device/Logic/AddLogicPage.cs" Line="708" Column="22" />
      <File FileName="Shared/Phone/Device/Logic/DeviceTarget.cs" Line="258" Column="45" />
      <File FileName="Shared/Phone/Device/Logic/SecurityMode.cs" Line="328" Column="9" />
      <File FileName="Shared/Phone/Device/Logic/LogicCommunalPage.cs" Line="1" Column="1" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
@@ -20,7 +23,7 @@
              <Node name="Phone" expanded="True">
                <Node name="Device" expanded="True">
                  <Node name="Logic" expanded="True">
                    <Node name="AddLogicPage.cs" selected="True" />
                    <Node name="LogicCommunalPage.cs" selected="True" />
                  </Node>
                </Node>
                <Node name="ZigBee" expanded="True">
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -388,8 +388,8 @@
            var securityfra = new FrameLayout
            {
                Width = Application.GetRealWidth(1080),
                Height = Application.GetRealHeight(690),
                Y = Application.GetRealHeight(1920 - 690),
                Height = Application.GetRealHeight(690+160),
                Y = Application.GetRealHeight(1920 - 690-160),
                BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
                //Radius = (uint)Application.GetRealHeight(60),
            };
@@ -528,7 +528,7 @@
                Width = Application.GetRealWidth(920),
                Height = Application.GetRealHeight(130),
                X = Application.GetRealWidth(80),
                LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
            };
            withdrawalFrameLayout.AddChidren(withdrawalRowLayout);
@@ -545,7 +545,38 @@
            var withdrawalSelected = new SelectedButton();
            withdrawalRowLayout.AddChidren(withdrawalSelected);
            #endregion
            #region  胁迫撤防
            var urgentwithdFrameLayout = new FrameLayout
            {
                Height = Application.GetRealHeight(160),
                Y = withdrawalFrameLayout.Bottom,
            };
            securityfra.AddChidren(urgentwithdFrameLayout);
            var urgentwithdrawalRowLayout = new RowLayout
            {
                Y = Application.GetRealHeight(30),
                Width = Application.GetRealWidth(920),
                Height = Application.GetRealHeight(130),
                X = Application.GetRealWidth(80),
                LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
            };
            urgentwithdFrameLayout.AddChidren(urgentwithdrawalRowLayout);
            var btnurgentwithdrawal = new Button
            {
                TextID = MyInternationalizationString.urgentwithdrawal,
                Width = Application.GetRealWidth(600),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
                TextSize = 14,
            };
            urgentwithdrawalRowLayout.AddChidren(btnurgentwithdrawal);
            var urgentwithdrawalSelected = new SelectedButton();
            urgentwithdrawalRowLayout.AddChidren(urgentwithdrawalSelected);
            #endregion
            #region  ----在家布防 离家布防  撤防点击事件
            ///在家布防点击事件
            EventHandler<MouseEventArgs> athomeclick = (sedner14, e14) =>
@@ -553,9 +584,11 @@
                btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                btnurgentwithdrawal.TextColor= ZigbeeColor.Current.LogicBtnNotSelectedColor;
                athomedefenceSelected.Visible = true;
                leavehomedefenceSelected.Visible = false;
                withdrawalSelected.Visible = false;
                urgentwithdrawalSelected.Visible = false;
            };
            athomedefenceRowLayout.MouseUpEventHandler += athomeclick;
            btnathomedefence.MouseUpEventHandler += athomeclick;
@@ -568,9 +601,11 @@
                btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                btnurgentwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                athomedefenceSelected.Visible = false;
                leavehomedefenceSelected.Visible = true;
                withdrawalSelected.Visible = false;
                urgentwithdrawalSelected.Visible = false;
            };
            leavehomedefenceRowLayout.MouseUpEventHandler += leavehomeclick;
            leavehomebtndefence.MouseUpEventHandler += leavehomeclick;
@@ -582,14 +617,33 @@
                btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                btnurgentwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                athomedefenceSelected.Visible = false;
                leavehomedefenceSelected.Visible = false;
                withdrawalSelected.Visible = true;
                urgentwithdrawalSelected.Visible = false;
            };
            withdrawalRowLayout.MouseUpEventHandler += disableclick;
            btnwithdrawal.MouseUpEventHandler += disableclick;
            withdrawalSelected.MouseUpEventHandler += disableclick;
            withdrawalFrameLayout.MouseUpEventHandler += disableclick;
            ///胁迫撤防点击事件
            EventHandler<MouseEventArgs> urgentwithdrawalclick = (seder, e) =>
            {
                btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                btnurgentwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                athomedefenceSelected.Visible = false;
                leavehomedefenceSelected.Visible = false;
                withdrawalSelected.Visible = false;
                urgentwithdrawalSelected.Visible = true;
            };
            urgentwithdrawalRowLayout.MouseUpEventHandler += urgentwithdrawalclick;
            btnurgentwithdrawal.MouseUpEventHandler += urgentwithdrawalclick;
            urgentwithdrawalSelected.MouseUpEventHandler += urgentwithdrawalclick;
            urgentwithdFrameLayout.MouseUpEventHandler += urgentwithdrawalclick;
            #endregion
            #endregion
@@ -608,30 +662,47 @@
                                btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                                leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                btnurgentwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                athomedefenceSelected.Visible = true;
                                leavehomedefenceSelected.Visible = false;
                                withdrawalSelected.Visible = false;
                                urgentwithdrawalSelected.Visible = false;
                            }
                            else
                            {
                                btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                                btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                btnurgentwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                athomedefenceSelected.Visible = false;
                                leavehomedefenceSelected.Visible = true;
                                withdrawalSelected.Visible = false;
                                urgentwithdrawalSelected.Visible = false;
                            }
                        }
                        else
                        else if (securityifon["EnOrWithdrawMode"] == "1")
                        {
                            btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                            leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                            btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                            btnurgentwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                            athomedefenceSelected.Visible = false;
                            leavehomedefenceSelected.Visible = false;
                            withdrawalSelected.Visible = true;
                            urgentwithdrawalSelected.Visible = false;
                        }
                        else if (securityifon["EnOrWithdrawMode"] == "2")
                        {
                            btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                            leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                            btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                            btnurgentwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                            athomedefenceSelected.Visible = false;
                            leavehomedefenceSelected.Visible = false;
                            withdrawalSelected.Visible = false;
                            urgentwithdrawalSelected.Visible = true;
                        }
                        break;
                    }
@@ -639,7 +710,7 @@
            }
            Btncomplete.MouseUpEventHandler += (sender, e) =>
            {
                if (!athomedefenceSelected.Visible && !leavehomedefenceSelected.Visible && !withdrawalSelected.Visible)
                if (!athomedefenceSelected.Visible && !leavehomedefenceSelected.Visible && !withdrawalSelected.Visible&&!urgentwithdrawalSelected.Visible)
                {
                    return;
                }
@@ -656,13 +727,8 @@
                {
                    SecurityConditionsInfo.Remove("ModeId");
                }
                SecurityConditionsInfo.Add("Type", "6");
                SecurityConditionsInfo.Add("IsValid", "1");
                SecurityConditionsInfo.Add("ModeId", "0");
                //在家布防
                if (athomedefenceSelected.Visible)
                {
                    if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
                    {
                        SecurityConditionsInfo.Remove("EnOrWithdrawMode");
@@ -671,31 +737,33 @@
                    {
                        SecurityConditionsInfo.Remove("ModeId");
                    }
                //在家布防
                if (athomedefenceSelected.Visible)
                {
                    SecurityConditionsInfo.Add("EnOrWithdrawMode", "0");
                    SecurityConditionsInfo.Add("ModeId", "1");
                }
                //离家布防
                if (leavehomedefenceSelected.Visible)
                {
                    if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
                    {
                        SecurityConditionsInfo.Remove("EnOrWithdrawMode");
                    }
                    if (SecurityConditionsInfo.ContainsKey("ModeId"))
                    {
                        SecurityConditionsInfo.Remove("ModeId");
                    }
                    SecurityConditionsInfo.Add("EnOrWithdrawMode", "0");
                    SecurityConditionsInfo.Add("ModeId", "2");
                }
                //撤防
                if (withdrawalSelected.Visible)
                {
                    if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
                    {
                        SecurityConditionsInfo.Remove("EnOrWithdrawMode");
                    }
                    SecurityConditionsInfo.Add("EnOrWithdrawMode", "1");
                    SecurityConditionsInfo.Add("ModeId", "0");
                }
                //胁迫撤防
                if (urgentwithdrawalSelected.Visible)
                {
                    SecurityConditionsInfo.Add("EnOrWithdrawMode", "2");
                    SecurityConditionsInfo.Add("ModeId", "0");
                }
                LogicIfon.AddSecurityconditions(SecurityConditionsInfo);
                var logicCommunalPage = new LogicCommunalPage();
@@ -916,6 +984,8 @@
                    if (accounts["Type"] == "7" && accounts["Account"] == guid)
                    {
                        ///转换为double类型;
                        latitude = Convert.ToDouble(accounts["Latitude"])/1000000.0;
                        longitude = Convert.ToDouble(accounts["Longitude"]) / 1000000.0;
                        r = int.Parse(accounts["Radius"]);
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -936,12 +936,9 @@
                                };
                                conditionsRowLayout.AddChidren(securitystatus);
                                if (conditions["EnOrWithdrawMode"] == "1")
                                switch (conditions["EnOrWithdrawMode"])
                                {
                                    conditionIcon.UnSelectedImagePath = "ZigeeLogic/withdrawal.png";
                                    securitystatus.Text = Language.StringByID(MyInternationalizationString.withdrawal);
                                }
                                else
                                    case "0":
                                {
                                    if (conditions["ModeId"] == "1")
                                    {
@@ -953,9 +950,23 @@
                                    {
                                        conditionIcon.UnSelectedImagePath = "ZigeeLogic/leavehome.png";
                                        securitystatus.Text = Language.StringByID(MyInternationalizationString.logicremovehomegarrison);
                                            }
                                        }
                                        break;
                                    case "1":
                                        {
                                            conditionIcon.UnSelectedImagePath = "ZigeeLogic/withdrawal.png";
                                            securitystatus.Text = Language.StringByID(MyInternationalizationString.withdrawal);
                                        }
                                        break;
                                    case "2":
                                        {
                                            conditionIcon.UnSelectedImagePath = "ZigeeLogic/withdrawal.png";
                                            securitystatus.Text = Language.StringByID(MyInternationalizationString.urgentwithdrawal);
                                        }
                                        break;
                                }
                                    }
                                }
                            }
                            break;
                        case 7: