| | |
| | | { |
| | | public class MemberList : FrameLayout |
| | | { |
| | | public MemberList() |
| | | { |
| | | Tag = "Logic"; |
| | | } |
| | | Button selectedIcon = new Button(); |
| | | public static Action action; |
| | | public static bool edit=false; |
| | |
| | | |
| | | public async void Show(CommonDevice common, Dictionary<string, string> editdeviceConditionsInfo=null) |
| | | { |
| | | |
| | | if (!edit) |
| | | { |
| | | deviceConditionsInfo.Add("Type", "1"); |
| | |
| | | doorlockBtn.MouseUpEventHandler += doorlockclick; |
| | | doorlockSelected.MouseUpEventHandler += doorlockclick; |
| | | doorlockfra.MouseUpEventHandler += doorlockclick; |
| | | if (edit) |
| | | if (edit&&editdeviceConditionsInfo!=null) |
| | | { |
| | | if (editdeviceConditionsInfo["AttriButeData2"] == userifon.OpenMode.ToString()) |
| | | deviceConditionsInfo = editdeviceConditionsInfo; |
| | | if (editdeviceConditionsInfo["AttriButeData2"] == userifon.UserId.ToString()) |
| | | { |
| | | selectedIcon.Visible = false; |
| | | selectedIcon = doorlockSelected; |
| | | doorlockSelected.Visible = true; |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | Btncomplete.MouseUpEventHandler += (sender3, e3) => |
| | | { |
| | | |
| | | if (SelectedDeviceStatuscondition != "") |
| | | { |
| | | |
| | | bool add = false; |
| | | for (int i = 0; i < Common.Logic.CurrentLogic.Conditions.Count; i++) |
| | | { |
| | | if (Common.Logic.CurrentLogic.Conditions[i]["Type"] == "1") |
| | |
| | | Common.Logic.CurrentLogic.Accounts.Insert(j, userdictionary); |
| | | } |
| | | } |
| | | return; |
| | | add = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | Common.Logic.CurrentLogic.Accounts.Add(userdictionary); |
| | | Common.Logic.CurrentLogic.Conditions.Add(deviceConditionsInfo); |
| | | if (!add) |
| | | { |
| | | Common.Logic.CurrentLogic.Accounts.Add(userdictionary); |
| | | Common.Logic.CurrentLogic.Conditions.Add(deviceConditionsInfo); |
| | | } |
| | | |
| | | } |
| | | else |