| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________ |
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | /// <param name="i_iasZone">传感器设备</param> |
| | | public void ShowForm(IASZone i_iasZone) |
| | | /// <param name="i_iasZone">传感器设备</param>
|
| | | public void ShowForm(IASZone i_iasZone)
|
| | | {
|
| | | this.ScrollEnabled = false;
|
| | | deviceIASZone = i_iasZone;
|
| | |
|
| | | //设置头部信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uBindTargets)); |
| | | |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uBindTargets));
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //初始化中部信息
|
| | | this.InitMiddleFrame();
|
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化中部信息 |
| | | /// </summary> |
| | | private async void InitMiddleFrame() |
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化中部信息
|
| | | /// </summary>
|
| | | private async void InitMiddleFrame()
|
| | | {
|
| | | this.listEsixtDevice.Clear();
|
| | |
|
| | |
| | | {
|
| | | //初始化控件
|
| | | this.InitMiddleControl();
|
| | | }); |
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | btnLightView.TextID = R.MyInternationalizationString.uIlluminationValue;
|
| | | btnLightView.TextSize = 12;
|
| | | btnLightView.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnLightView.X = ControlCommonResourse.XXLeft;
|
| | | btnLightView.X = HdlControlResourse.XXLeft;
|
| | | btnLightView.Y = Application.GetRealHeight(71);
|
| | | frameLight.AddChidren(btnLightView);
|
| | | var btnLightValue = new NormalViewControl(200, 50, true);
|
| | |
| | | frameLight.AddChidren(btnTipView);
|
| | |
|
| | | //底线
|
| | | var btnIfLine = new NormalViewControl(frameLight.Width, ControlCommonResourse.BottomLineHeight, false);
|
| | | btnIfLine.Y = frameLight.Height - ControlCommonResourse.BottomLineHeight;
|
| | | var btnIfLine = new NormalViewControl(frameLight.Width, HdlControlResourse.BottomLineHeight, false);
|
| | | btnIfLine.Y = frameLight.Height - HdlControlResourse.BottomLineHeight;
|
| | | btnIfLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
|
| | | frameLight.AddChidren(btnIfLine);
|
| | |
|
| | |
| | | listView.AddChidren(frameResult);
|
| | | //触发目标
|
| | | var rowTarget = new FrameRowControl(listView.rowSpace / 2);
|
| | | rowTarget.LeftOffset = Application.GetRealWidth(138) - ControlCommonResourse.XXLeft;
|
| | | rowTarget.LeftOffset = Application.GetRealWidth(138) - HdlControlResourse.XXLeft;
|
| | | frameResult.AddChidren(rowTarget);
|
| | | rowTarget.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uTriggerTarget), 600);
|
| | | rowTarget.AddRightArrow();
|
| | |
| | | if (listSaveDevice.Count > 0)
|
| | | {
|
| | | //随便丢一个名字上去
|
| | | var device = Common.LocalDevice.Current.GetDevice(listSaveDevice[0]);
|
| | | btnTargetView.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(listSaveDevice[0]);
|
| | | btnTargetView.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | foreach (string mainkey in this.listEsixtDevice)
|
| | | {
|
| | | var device = Common.LocalDevice.Current.GetDevice(mainkey);
|
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(mainkey);
|
| | | if (device != null)
|
| | | {
|
| | | //随便丢一个名字上去
|
| | | btnTargetView.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
|
| | | btnTargetView.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | string strSecond = pirConfigure.transitionTime % 60 + Language.StringByID(R.MyInternationalizationString.uSecond);
|
| | | var rowDelay = new FrameRowControl(listView.rowSpace / 2);
|
| | | rowDelay.LeftOffset = Application.GetRealWidth(138) - ControlCommonResourse.XXLeft;
|
| | | rowDelay.LeftOffset = Application.GetRealWidth(138) - HdlControlResourse.XXLeft;
|
| | | frameResult.AddChidren(rowDelay);
|
| | | rowDelay.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uDelayed), 300);
|
| | | rowDelay.AddRightArrow();
|
| | |
| | | this.listEsixtDevice.Clear();
|
| | | foreach (var device in listDevice)
|
| | | {
|
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
|
| | | if (listEsixtDevice.Contains(mainKeys) == false)
|
| | | {
|
| | | listEsixtDevice.Add(mainKeys);
|
| | |
| | | {
|
| | | if (this.listSaveDevice.Contains(mainKey) == false)
|
| | | {
|
| | | var myDevice = Common.LocalDevice.Current.GetDevice(mainKey);
|
| | | var myDevice = HdlDeviceCommonLogic.Current.GetDevice(mainKey);
|
| | | listDelDevice.Add(myDevice);
|
| | | if (myDevice.Type == DeviceType.DimmableLight)
|
| | | {
|
| | |
| | | listLightDevice = new List<CommonDevice>();
|
| | | foreach (var mainKey in listSaveDevice)
|
| | | {
|
| | | var myDevice = Common.LocalDevice.Current.GetDevice(mainKey);
|
| | | var myDevice = HdlDeviceCommonLogic.Current.GetDevice(mainKey);
|
| | | listBind.Add(myDevice);
|
| | | if (myDevice.Type == DeviceType.DimmableLight)
|
| | | {
|