陈嘉乐
2020-05-11 96e8ca6e5c4b9eb179eb21f04f5b696ae94a82c9
2020-05-11-2
8个文件已修改
119 ■■■■■ 已修改文件
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Language.ini 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Language.ini 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,17 +1,13 @@
<Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default">
  <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.5c86e4357d63" />
  <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" />
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/ZigBee/Device/ZbGateway.cs">
  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/SoneLogicList.cs">
    <Files>
      <File FileName="Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs" Line="772" Column="10" />
      <File FileName="Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs" Line="151" Column="49" />
      <File FileName="Shared/Phone/Device/Logic/SoneLogicList.cs" Line="31" Column="46" />
      <File FileName="Shared/Phone/ZigBee/Device/DoorLock.cs" Line="2757" Column="81" />
      <File FileName="Shared/Phone/Device/Logic/Method.cs" Line="876" Column="49" />
      <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="78" Column="45" />
      <File FileName="Shared/Phone/UserView/HomePage.cs" Line="44" Column="56" />
      <File FileName="Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs" Line="712" Column="50" />
      <File FileName="Shared/Phone/ZigBee/Device/ZbGateway.cs" Line="215" Column="7" />
      <File FileName="Shared/Phone/Device/Logic/LogicView/TipView.cs" Line="416" Column="19" />
      <File FileName="Shared/Phone/Device/Logic/SkipView.cs" Line="706" Column="116" />
      <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="102" Column="75" />
      <File FileName="Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs" Line="1302" Column="15" />
      <File FileName="Shared/Phone/Device/Logic/SoneLogicList.cs" Line="67" Column="16" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
@@ -20,12 +16,16 @@
            <Node name="Shared" expanded="True">
              <Node name="Phone" expanded="True">
                <Node name="Device" expanded="True">
                  <Node name="Logic" expanded="True" />
                  <Node name="Logic" expanded="True">
                    <Node name="LogicView" expanded="True" />
                    <Node name="SoneLogicList.cs" selected="True" />
                  </Node>
                </Node>
                <Node name="UserCenter" expanded="True">
                  <Node name="DoorLock" expanded="True" />
                </Node>
                <Node name="ZigBee" expanded="True">
                  <Node name="Device" expanded="True">
                    <Node name="ZbGateway.cs" selected="True" />
                  </Node>
                  <Node name="Device" expanded="True" />
                </Node>
              </Node>
            </Node>
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -547,8 +547,8 @@
5398=只支持数字输入
5399=关闭失败
5400=开启失败
5401=添加失败
5400=开启常开模式失败
5401=添加时效性常开设置失败
5402=时效性常开设置
5403=时关闭
ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -546,8 +546,8 @@
5397=时间为空
5398=只支持数字输入
5399=关闭失败
5400=开启失败
5401=添加失败
5400=开启常开模式失败
5401=添加时效性常开设置失败
5402=时效性常开设置
5403=时关闭
ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs
@@ -81,7 +81,7 @@
                TextAlignment = TextAlignment.Center,
                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                TextSize = 14,
                //Height =Application.GetRealHeight(127),
                Height = bottomFrame.Height,
                Width = Application.GetRealWidth(397),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
                TextID = R.MyInternationalizationString.cancel,
@@ -95,7 +95,7 @@
                TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                TextSize = 14,
                X = cancelBtn.Right,
                //Height =Application.GetRealHeight(127),
                Height = bottomFrame.Height,
                Width = bottomFrame.Width - cancelBtn.Width,
                BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor,
                TextID = R.MyInternationalizationString.confrim,
@@ -223,7 +223,7 @@
                TextAlignment = TextAlignment.Center,
                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                TextSize = 14,
               // Height = Application.GetRealHeight(127),
                Height = bottomFrame.Height,
                Width = Application.GetRealWidth(397),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
                TextID = R.MyInternationalizationString.cancel,
@@ -236,7 +236,7 @@
                TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                TextSize = 14,
                X = cancelBtn.Right,
                //Height = Application.GetRealHeight(127),
                Height = bottomFrame.Height,
                Width = bottomFrame.Width - cancelBtn.Width,
                BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor,
                TextID = R.MyInternationalizationString.confrim,
@@ -363,7 +363,7 @@
                TextAlignment = TextAlignment.Center,
                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                TextSize = 14,
                Height = Application.GetRealHeight(127),
                Height = bottomFrame.Height,
                Width = Application.GetRealWidth(397),
                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
                TextID = R.MyInternationalizationString.cancel,
@@ -376,7 +376,7 @@
                TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                TextSize = 14,
                X = cancelBtn.Right,
                Height = Application.GetRealHeight(127),
                Height = bottomFrame.Height,
                Width = bottomFrame.Width - cancelBtn.Width,
                BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor,
                TextID = R.MyInternationalizationString.confrim,
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -703,7 +703,7 @@
        /// <param name="timeVlaue">时间值</param>
        /// <param name="common">设备</param>
        /// <returns></returns>
        public static async System.Threading.Tasks.Task<bool> LockAddModifyLogic(int timeVlaue, CommonDevice common)
        public static async System.Threading.Tasks.Task<int> LockAddModifyLogic(int timeVlaue, CommonDevice common)
        {
            //读取系统当前时间:时-分
            var h = DateTime.Now.ToString("HH");
@@ -736,9 +736,9 @@
            {
                //添加门锁失效时间的历史记录
                UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog((DoorLock)common, 9003, timeVlaue.ToString());
                return true;//表示添加成功;
                return logicIfon.LogicId;//表示添加成功;
            }
            return false;//表示添加失败;
            return 0;//表示添加失败;
        }
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -14,6 +14,7 @@
        {
            Tag = "SoneLogic";
            soneLogicList = this;
        }
        /// 给徐梅刷新界面用的
        public  Action<bool> action;
@@ -29,8 +30,17 @@
        FrameLayout listLogicFl = new FrameLayout();
        ///常开自动化列表上下滑动的控件
        VerticalRefreshLayout verticalRefresh = new VerticalRefreshLayout();
        /// <summary>
        /// 记录逻辑id
        /// </summary>
        public int logicId = 0;
        /// <summary>
        /// 记录选中时间
        /// </summary>
        public int timeValue = 0;
        public async void Show()
        {
            #region  界面的布局代码
            UserView.HomePage.Instance.ScrollEnabled = false;//锁住左滑
            TopView view = new TopView();
@@ -56,6 +66,23 @@
            };
            this.AddChidren(middle);
            #endregion
            //是常开模式再去读取
            if (Send.CurrentDoorLock.IsDoorLockNormallyMode)
            {
                //进来更新一次
                //查找是否存在时效性自动化;有的话就返回自动化对象;
                var logic = await SkipView.GetLogicIfon();
                if (logic != null)
                {
                    try
                    {
                        //进来更新一次值
                        logicId = logic.LogicId;
                        timeValue = int.Parse(logic.Conditions[0]["DoorLockOpenDelayTime"]);
                    }
                    catch { }
                }
            }
            #region  常开模式图标 时效性常开设置
            ///第二块第一级父控件
@@ -92,7 +119,6 @@
            modeFl.AddChidren(button2);
            ModeView();
            #endregion
            #region 常开自动化
            ///第三块第一级父控件
            listLogicFl = new FrameLayout
@@ -225,9 +251,6 @@
            
            if (Send.CurrentDoorLock.IsDoorLockNormallyMode)
            {
                /// 查找是否存在时效性自动化;有的话就返回自动化对象;
                var logic = await SkipView.GetLogicIfon();
                fLayout.Height = Application.GetRealHeight(780);//改变高度 
                modeIconBtn.UnSelectedImagePath = "ZigeeLogic/openMode.png";//改变图标状态
                modeFl.Y = modeIconBtn.Bottom + Application.GetRealHeight(64);
@@ -257,11 +280,10 @@
                        var result = await UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(Send.CurrentDoorLock);
                        if (result)
                        {
                            if (logic != null)
                            if (logicId != 0)
                            {
                                ///有可能只有常开模式,没有时效性自动化
                                ///没有判断的话,逻辑会为空,抛出异常;
                                Send.DelLogic(logic.LogicId);
                                Send.DelLogic(logicId);
                            }
                            Send.CurrentDoorLock.IsDoorLockNormallyMode = false;
                            ModeView();
@@ -281,7 +303,7 @@
                        });
                    }
                };
                if (logic != null)
                if (logicId != 0)
                {
                    ///显示失效设置时间文本控件
                    button2.Y = Application.GetRealHeight(127 + 69);
@@ -296,9 +318,8 @@
                    var m = DateTime.Now.Month.ToString();//那一月
                    var d = DateTime.Now.ToString("dd");//那一天
                    var h = int.Parse(DateTime.Now.ToString("HH"));//当前系统时间
                    var timeInt = int.Parse(logic.Conditions[0]["DoorLockOpenDelayTime"]);
                    int dayInt = (h + timeInt) / 24;//算出几天后执行
                    int hour = (h + timeInt) % 24;//算出几天后那个时间执行
                    int dayInt = (h + timeValue) / 24;//算出几天后执行
                    int hour = (h + timeValue) % 24;//算出几天后那个时间执行
                    int days = int.Parse(d) + dayInt;
                    string text1 = Language.StringByID(MyInternationalizationString.timeSensitive);
                    string text2 = Language.StringByID(MyInternationalizationString.yearSone);
@@ -307,7 +328,8 @@
                    string text5 = Language.StringByID(MyInternationalizationString.executeSone);
                    button2.Text = text1 + y + text2 + m + text3 + days.ToString() + text4 + hour.ToString() + text5;
                }
                else {
                else
                {
                    button2.Y = Application.GetRealHeight(0);
                    button2.X = Application.GetRealWidth(0);
                    button2.Width = Application.GetRealWidth(0);
@@ -362,7 +384,6 @@
                            try
                            {
                                ///xm
                                var result = await UserCenter.DoorLock.DoorLockCommonInfo.SetNormallyOpenModeFuncAsync(Send.CurrentDoorLock);
                                if (!result)
                                {
@@ -374,7 +395,7 @@
                                    ///因为有常开模式下才可以创建失效逻辑;
                                    SkipView.GetLogicAll();//删除之前所有失效逻辑
                                    var addResult = await SkipView.LockAddModifyLogic(int.Parse(str), Send.CurrentDoorLock);//添加一条失效逻辑
                                    if (!addResult)
                                    if (addResult == 0)
                                    {
                                        ///可欣说如果常开模式开,创建自动化失败,那么将要发一条常开模式关闭命令;
                                        UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(Send.CurrentDoorLock);
@@ -382,8 +403,13 @@
                                        LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.addFailed));
                                        return;
                                    }
                                    Send.CurrentDoorLock.IsDoorLockNormallyMode = true;
                                    ModeView();
                                    else
                                    {
                                        logicId = addResult;
                                        timeValue = int.Parse(str);
                                        Send.CurrentDoorLock.IsDoorLockNormallyMode = true;
                                        ModeView();
                                    }
                                }
@@ -556,10 +582,7 @@
                    TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
                };
                logicRow.AddRightView(edit);
                if (logic.LogicType == 2)
                {
                    edit.TextID = MyInternationalizationString.look;
                }
                ///删除
                var del = new Button
                {
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -1320,7 +1320,7 @@
                 DoorLockCommonInfo.NormallyOpenModeInvalidTime = temp;
                 //默认创建常开模式的特殊逻辑 
                 var res = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock);
                 if (!res)
                 if (res==0)
                 {
                     //默认创建常开模式失败
                     string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed);