| | |
| | | 675=Low |
| | | 676=Moderate |
| | | 677=High |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | |
| | | |
| | | |
| | |
| | | 675=低 |
| | | 676=中 |
| | | 677=高 |
| | | 678=当前用户数据已清空,即将返回上一页。 |
| | | |
| | | |
| | | 2532=访客邀请记录 |
| | |
| | | 675=Low |
| | | 676=Moderate |
| | | 677=High |
| | | |
| | | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | |
| | | |
| | | |
| | |
| | | 675=Low |
| | | 676=Moderate |
| | | 677=High |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | |
| | | |
| | | |
| | |
| | | 675=Low |
| | | 676=Moderate |
| | | 677=High |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | |
| | | |
| | | |
| | |
| | | 675=Low |
| | | 676=Moderate |
| | | 677=High |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | |
| | | |
| | | |
| | |
| | | 675=低 |
| | | 676=中 |
| | | 677=高 |
| | | 678=当前用户数据已清空,即将返回上一页。 |
| | | |
| | | |
| | | 2532=访客邀请记录 |
| | |
| | | 675=Low |
| | | 676=Moderate |
| | | 677=High |
| | | |
| | | |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | |
| | | |
| | | |
| | |
| | | 675=Low |
| | | 676=Moderate |
| | | 677=High |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | |
| | | |
| | | |
| | |
| | | 675=Low |
| | | 676=Moderate |
| | | 677=High |
| | | 678=Current user data has been cleared, about to return to the previous page. |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | public static class StringId |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 当前用户数据是清空,即将返回上一页。 |
| | | /// </summary> |
| | | public const int VideoDoorlockDelDataTip = 678; |
| | | /// <summary> |
| | | /// 高 |
| | | /// </summary> |
| | |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="sound"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew SetDoorLockSystemSound(string deviceId,string sound) |
| | | public ResponsePackNew SetDoorLockSystemSound(string deviceId,int sound) |
| | | { |
| | | var d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="volume"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew SetDoorBellTone(string deviceId, string volume) |
| | | public ResponsePackNew SetDoorBellTone(string deviceId, int volume) |
| | | { |
| | | var d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockFaceUnlockTriggerSettingPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockFaceUnlockHelpPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockAudioSetupPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockBatteryManagementPage.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
|
| | |
| | | |
| | | var btnConfrim = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(320), |
| | | X = Application.GetRealWidth(200), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | |
| | | |
| | | var btnConfrim = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(320), |
| | | X = Application.GetRealWidth(200), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | |
| | | |
| | | var btnConfrim = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(320), |
| | | X = Application.GetRealWidth(200), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | |
| | | |
| | | var btnConfrim = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(320), |
| | | X = Application.GetRealWidth(200), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | |
| | | TextID = StringId.AudioSetup, |
| | | }; |
| | | audioSetupView.AddChidren(btnAudioSetupText); |
| | | btnAudioSetupText.MouseUpEventHandler = (sender, e) => { |
| | | var page = new VideoDoorlockAudioSetupPage(function); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | }; |
| | | #endregion |
| | | |
| | | #region 电池管理 |
| | |
| | | TextID = StringId.BatteryManagement, |
| | | }; |
| | | batteryManagementView.AddChidren(btnBatteryManagementText); |
| | | btnBatteryManagementText.MouseUpEventHandler = (sender, e) => { |
| | | var page = new VideoDoorlockBatteryManagementPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | |
| | | #endregion |
| | |
| | | serialView.AddChidren(serialTextBtn); |
| | | var serialValuesBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(86), |
| | | X = Application.GetRealWidth(106), |
| | | Width = Application.GetRealWidth(237), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | |
| | | modelView.AddChidren(modelTextBtn); |
| | | var modelValuesBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(86), |
| | | X = Application.GetRealWidth(106), |
| | | Width = Application.GetRealWidth(237), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | |
| | | var view = new VerticalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(300), |
| | | }; |
| | | contentView.AddChidren(view); |
| | | |
| | | new System.Threading.Thread(() => { |
| | | try |
| | | { |
| | | var pack = ApiUtlis.Ins.HttpRequest.GetFaceUnlockCfg(device.deviceId); |
| | | if (pack != null && pack.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //更新界面 |
| | | faceUnlockSetup = Newtonsoft.Json.JsonConvert.DeserializeObject<FaceUnlockSetupObj>(pack.Data.ToString()); |
| | | btnFaceUnlockSwitchIcon.IsSelected = faceUnlockSetup.enabled; |
| | | loadSubView(view, faceUnlockSetup); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //失败提示 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!string.IsNullOrEmpty(pack.message)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = $"{pack.message}({pack.Code})", |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"UnlockSettingPage error : {ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | } |
| | | |
| | | void loadSubView(VerticalScrolViewLayout view, FaceUnlockSetupObj faceUnlockSetup) |
| | | { |
| | | if (faceUnlockSetup.enabled) |
| | | { |
| | | #region 触发方式 TriggerMode |
| | | var triggerModeView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS.CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(triggerModeView); |
| | | view.AddChidren(triggerModeView); |
| | | |
| | | var btnTriggerModeRight = new Button() |
| | | { |
| | |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | }; |
| | | triggerModeView.AddChidren(btnTriggerModeStateText); |
| | | btnTriggerModeStateText.TextID = faceUnlockSetup.mode == 0 ? StringId.AutomaticTriggering : StringId.ManualTriggering; |
| | | |
| | | var btnTriggerModeText = new Button() |
| | | { |
| | |
| | | }; |
| | | #endregion |
| | | |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = 1, |
| | | BackgroundColor = CSS_Color.PromptingColor1, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }); |
| | | |
| | | |
| | | view.AddChidren(new Button { Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); |
| | | } |
| | | #region 人脸录入帮助 |
| | | var faceEntryHelpView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS.CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(faceEntryHelpView); |
| | | view.AddChidren(faceEntryHelpView); |
| | | |
| | | var btnFaceEntryHelpRight = new Button() |
| | | { |
| | |
| | | }; |
| | | faceEntryHelpView.AddChidren(btnFaceEntryHelpText); |
| | | |
| | | btnFaceEntryHelpText.MouseUpEventHandler = (sender, e) => { |
| | | btnFaceEntryHelpText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new VideoDoorlockFaceUnlockHelpPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | new System.Threading.Thread(() => { |
| | | try |
| | | { |
| | | var pack = ApiUtlis.Ins.HttpRequest.GetFaceUnlockCfg(device.deviceId); |
| | | if (pack != null && pack.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //更新界面 |
| | | faceUnlockSetup = Newtonsoft.Json.JsonConvert.DeserializeObject<FaceUnlockSetupObj>(pack.Data.ToString()); |
| | | btnFaceUnlockSwitchIcon.IsSelected = faceUnlockSetup.enabled; |
| | | |
| | | btnTriggerModeStateText.TextID = faceUnlockSetup.mode == 0 ? StringId.AutomaticTriggering : StringId.ManualTriggering; |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //失败提示 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!string.IsNullOrEmpty(pack.message)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = $"{pack.message}({pack.Code})", |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"UnlockSettingPage error : {ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// 开关 |
| | | /// </summary> |
| | | public bool enabled; |
| | | public bool enabled = false; |
| | | /// <summary> |
| | | /// 解锁方式 0-自动 1-手动 |
| | | /// </summary> |
| | |
| | | FrameLayout bodyView; |
| | | |
| | | Function device; |
| | | |
| | | /// <summary> |
| | | /// 门铃系统音量 |
| | | /// </summary> |
| | | int doorlockSystemSound = 0; |
| | | /// <summary> |
| | | /// 门铃音量 |
| | | /// </summary> |
| | | int doorbelVol = 0; |
| | | public VideoDoorlockAudioSetupPage(Function function) |
| | | { |
| | | device = function; |
| | |
| | | |
| | | btnDoorlockSystemVolumeText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | |
| | | LoadEditDialog(StringId.DoorlockSystemVolume, 3-doorlockSystemSound, btnDoorlockSystemVolumeStateText); |
| | | }; |
| | | #endregion |
| | | |
| | |
| | | |
| | | btnDoorbellVolumeText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadEditDialog(StringId.DoorbellVolume, doorbelVol, btnDoorbellVolumeStateText); |
| | | |
| | | }; |
| | | #endregion |
| | |
| | | switch (doorLockSystemSound.sound) |
| | | { |
| | | case 0: |
| | | doorlockSystemSound = 0; |
| | | btnDoorlockSystemVolumeStateText.TextID = StringId.Mute; |
| | | break; |
| | | case 1: |
| | | doorlockSystemSound = 1; |
| | | btnDoorlockSystemVolumeStateText.TextID = StringId.Low; |
| | | break; |
| | | case 2: |
| | | doorlockSystemSound = 2; |
| | | btnDoorlockSystemVolumeStateText.TextID = StringId.Moderate; |
| | | break; |
| | | case 3: |
| | | doorlockSystemSound = 3; |
| | | btnDoorlockSystemVolumeStateText.TextID = StringId.High; |
| | | break; |
| | | } |
| | |
| | | { |
| | | if (doorbellTone.volume == 0) |
| | | { |
| | | doorbelVol = 3; |
| | | btnDoorbellVolumeStateText.TextID = StringId.Mute; |
| | | } |
| | | else if (doorbellTone.volume > 0 && doorbellTone.volume < 35) |
| | | { |
| | | doorbelVol = 2; |
| | | btnDoorbellVolumeStateText.TextID = StringId.Low; |
| | | } |
| | | else if (doorbellTone.volume > 35 && doorbellTone.volume < 70) |
| | | { |
| | | doorbelVol = 1; |
| | | btnDoorbellVolumeStateText.TextID = StringId.Moderate; |
| | | } |
| | | else if (doorbellTone.volume > 70) |
| | | { |
| | | doorbelVol = 0; |
| | | btnDoorbellVolumeStateText.TextID = StringId.High; |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// 加载功能属性数据选择弹窗 |
| | | /// </summary> |
| | | void LoadEditDialog_FunctionPar(int titleId, int index, Button btn) |
| | | void LoadEditDialog(int titleId, int index, Button btn) |
| | | { |
| | | Button lastButton = new Button(); |
| | | var lastData = ""; |
| | |
| | | |
| | | var btnConfrim = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(320), |
| | | X = Application.GetRealWidth(200), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | |
| | | Height = 1, |
| | | }); |
| | | } |
| | | hei++; |
| | | |
| | | var btnChoose = new Button() |
| | | { |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Tag = index, |
| | | Tag = hei-1, |
| | | Text = m |
| | | }; |
| | | row.AddChidren(btnPropertyTitle); |
| | |
| | | lastData = btnPropertyTitle.Tag.ToString(); |
| | | lastText = btnPropertyTitle.Text; |
| | | }; |
| | | hei++; |
| | | } |
| | | |
| | | |
| | |
| | | }; |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => { |
| | | dialog.Close(); |
| | | trait.value = lastData; |
| | | //sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff).value = trait.curValue.ToString() ; |
| | | btn.Text = lastText; |
| | | if(titleId == StringId.DoorlockSystemVolume) |
| | | { |
| | | |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | | |
| | | new System.Threading.Thread(() => { |
| | | try |
| | | { |
| | | int sound = 0; |
| | | /// 0-静音 1-低音 2-中音 3-高音 4-自动 |
| | | |
| | | switch (lastData) |
| | | { |
| | | case "0": |
| | | sound = 3; |
| | | break; |
| | | case "1": |
| | | sound = 2; |
| | | break; |
| | | case "2": |
| | | sound = 1; |
| | | break; |
| | | case "3": |
| | | sound = 0; |
| | | break; |
| | | } |
| | | |
| | | |
| | | var pack = ApiUtlis.Ins.HttpRequest.SetDoorLockSystemSound(device.deviceId,sound); |
| | | if (pack != null && pack.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //更新界面 |
| | | switch (sound) |
| | | { |
| | | case 0: |
| | | btn.TextID = StringId.Mute; |
| | | break; |
| | | case 1: |
| | | btn.TextID = StringId.Low; |
| | | break; |
| | | case 2: |
| | | btn.TextID = StringId.Moderate; |
| | | break; |
| | | case 3: |
| | | btn.TextID = StringId.High; |
| | | break; |
| | | } |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //失败提示 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!string.IsNullOrEmpty(pack.message)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = $"{pack.message}({pack.Code})", |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"{this.GetType()} error 4: {ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | | |
| | | new System.Threading.Thread(() => { |
| | | try |
| | | { |
| | | int Vol = 0; |
| | | switch (lastData) |
| | | { |
| | | case "0": |
| | | Vol = 100; |
| | | break; |
| | | case "1": |
| | | Vol = 70; |
| | | break; |
| | | case "2": |
| | | Vol = 30; |
| | | break; |
| | | case "3": |
| | | Vol = 0; |
| | | break; |
| | | } |
| | | |
| | | var pack = ApiUtlis.Ins.HttpRequest.SetDoorBellTone(device.deviceId,Vol); |
| | | if (pack != null && pack.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //更新界面 |
| | | switch (lastData) |
| | | { |
| | | case "0": |
| | | btn.TextID = StringId.High; |
| | | break; |
| | | case "1": |
| | | btn.TextID = StringId.Moderate; |
| | | break; |
| | | case "2": |
| | | btn.TextID = StringId.Low; |
| | | break; |
| | | case "3": |
| | | btn.TextID = StringId.Mute; |
| | | break; |
| | | } |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //失败提示 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!string.IsNullOrEmpty(pack.message)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = $"{pack.message}({pack.Code})", |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"{this.GetType()} error 5 : {ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | |
| | | |
| | | } |
| | | }; |
| | | |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock |
| | | { |
| | | public class VideoDoorlockBatteryManagementPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | |
| | | |
| | | public VideoDoorlockBatteryManagementPage() |
| | | { |
| | | bodyView = this; |
| | | |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.AudioSetup)).LoadTopView(); |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | |
| | | var btn = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(343), |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(64 + 24), |
| | | IsMoreLines = true, |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | }; |
| | | bodyView.AddChidren(btn); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | TextID = StringId.ManualTriggering, |
| | | }; |
| | | manualView.AddChidren(btnManualText); |
| | | btnManualText.MouseUpEventHandler = (sender, e) => { |
| | | |
| | | }; |
| | | #endregion |
| | | |
| | | |
| | |
| | | |
| | | void initOptionView(bool isEdit) |
| | | { |
| | | if(doorlockUser.faceCount == 0&& |
| | | doorlockUser.faceCount == 0 && |
| | | doorlockUser.pwdCount == 0 && |
| | | doorlockUser.cardCount == 0) |
| | | { |
| | | new PublicAssmebly().TipMsg(StringId.Tip, StringId.VideoDoorlockDelDataTip, () => |
| | | { |
| | | delCallBackAction?.Invoke(); |
| | | this.RemoveFromParent(); |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | |
| | | int childrenViewHeight = Application.GetRealWidth(116); |
| | | int permissionsViewHeight = Application.GetRealHeight(291 + 92); |
| | | if (userPermissionsView!= null) |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | doorlockUser.fingerCount = 0; |
| | | //更新界面 |
| | | initOptionView(true); |
| | | }); |
| | |
| | | }; |
| | | digitalPasswordView.AddChidren(btnDigitalPasswordText); |
| | | |
| | | if (doorlockUser.fingerCount > 0) |
| | | if (doorlockUser.pwdCount > 0) |
| | | { |
| | | btnDigitalPasswordIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UserRightsManagement/DigitalPasswordOnIcon.png"; |
| | | btnDigitalPasswordText.TextColor = CSS_Color.FirstLevelTitleColor; |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnDigitalPasswordText.Text = doorlockUser.fingerCount + "组" + Language.StringByID(StringId.DigitalPassword); |
| | | btnDigitalPasswordText.Text = doorlockUser.pwdCount + "组" + Language.StringByID(StringId.DigitalPassword); |
| | | } |
| | | else |
| | | { |
| | | btnDigitalPasswordText.Text = doorlockUser.fingerCount + " " + Language.StringByID(StringId.DigitalPassword); |
| | | btnDigitalPasswordText.Text = doorlockUser.pwdCount + " " + Language.StringByID(StringId.DigitalPassword); |
| | | } |
| | | |
| | | if (isEdit) |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | doorlockUser.pwdCount = 0; |
| | | //更新界面 |
| | | initOptionView(true); |
| | | }); |
| | |
| | | }; |
| | | nfcView.AddChidren(btnNfcText); |
| | | |
| | | if (doorlockUser.fingerCount > 0) |
| | | if (doorlockUser.cardCount > 0) |
| | | { |
| | | btnNfcIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UserRightsManagement/NfcOnIcon.png"; |
| | | btnNfcText.TextColor = CSS_Color.FirstLevelTitleColor; |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnNfcText.Text = doorlockUser.fingerCount + "组" + Language.StringByID(StringId.NfcKey); |
| | | btnNfcText.Text = doorlockUser.cardCount + "组" + Language.StringByID(StringId.NfcKey); |
| | | } |
| | | else |
| | | { |
| | | btnNfcText.Text = doorlockUser.fingerCount + " " + Language.StringByID(StringId.NfcKey); |
| | | btnNfcText.Text = doorlockUser.cardCount + " " + Language.StringByID(StringId.NfcKey); |
| | | } |
| | | |
| | | if (isEdit) |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | doorlockUser.cardCount = 0; |
| | | //更新界面 |
| | | initOptionView(true); |
| | | }); |
| | |
| | | var faceView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = fingerprintView.Bottom, |
| | | Y = fingerprintView.Bottom+ Application.GetRealHeight(20), |
| | | Width = Application.GetRealWidth(64 + 32), |
| | | Height = childrenViewHeight |
| | | }; |
| | |
| | | }; |
| | | faceView.AddChidren(btnFaceText); |
| | | |
| | | if (doorlockUser.fingerCount > 0) |
| | | if (doorlockUser.faceCount > 0) |
| | | { |
| | | btnFaceIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UserRightsManagement/FaceOnIcon.png"; |
| | | btnFaceText.TextColor = CSS_Color.FirstLevelTitleColor; |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnFaceText.Text = doorlockUser.fingerCount + "组" + Language.StringByID(StringId.FaceKey); |
| | | btnFaceText.Text = doorlockUser.faceCount + "组" + Language.StringByID(StringId.FaceKey); |
| | | } |
| | | else |
| | | { |
| | | btnFaceText.Text = doorlockUser.fingerCount + " " + Language.StringByID(StringId.FaceKey); |
| | | btnFaceText.Text = doorlockUser.faceCount + " " + Language.StringByID(StringId.FaceKey); |
| | | } |
| | | |
| | | if (isEdit) |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | doorlockUser.faceCount = 0; |
| | | //更新界面 |
| | | initOptionView(true); |
| | | }); |