| | |
| | | using System; |
| | | using Shared.Common; |
| | | using Shared.Phone.Device.CommonForm; |
| | | using Shared.Phone.UserCenter; |
| | | |
| | | namespace Shared.Phone.UserView |
| | |
| | | |
| | | var bg = new Button |
| | | { |
| | | X = Application.GetRealWidth(485), |
| | | X = Application.GetRealWidth(495), |
| | | Y = Application.GetRealHeight(161), |
| | | Width = Application.GetRealWidth(449), |
| | | Height = Application.GetRealHeight(495), |
| | |
| | | |
| | | var bg1 = new FrameLayout |
| | | { |
| | | X = Application.GetRealWidth(485), |
| | | X = Application.GetRealWidth(495), |
| | | Y = Application.GetRealHeight(161), |
| | | Width = Application.GetRealWidth(449), |
| | | Height = Application.GetRealHeight(495), |
| | |
| | | atHome.IsSelected = true; |
| | | tempRow = atHome; |
| | | } |
| | | atHome.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | atHome.ButtonClickEvent += (sender, e) => |
| | | { |
| | | if((sender as Button).IsSelected) |
| | | dialog.Close(); |
| | | if (sender.IsSelected) |
| | | { |
| | | dialog.Close(); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | CommonPage.Loading.Start(); |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | var result= HdlSafeguardLogic.Current.SetSafetyGarrisonByModel(GarrisonMode.AtHome); |
| | | var result=await HdlSafeguardLogic.Current.SetSafetyGarrisonByModel(GarrisonMode.AtHome); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | dialog.Close(); |
| | | CommonPage.Loading.Hide(); |
| | | if(result == GarrisonMode.AtHome) |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uSetGarrisonSuccess)); |
| | | } |
| | | else |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uSetGarrisonFail)); |
| | | } |
| | | }); |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | |
| | | withdrawGarriso.IsSelected = true; |
| | | tempRow = withdrawGarriso; |
| | | } |
| | | withdrawGarriso.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | withdrawGarriso.ButtonClickEvent += (sender, e) => |
| | | { |
| | | if ((sender as Button).IsSelected) |
| | | dialog.Close(); |
| | | if (sender.IsSelected) |
| | | { |
| | | dialog.Close(); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | CommonPage.Loading.Start(); |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | var result = HdlSafeguardLogic.Current.RemoveSafetyGarrison(GarrisonMode.RemoveGarrison, true); |
| | | var result = await HdlSafeguardLogic.Current.RemoveSafetyGarrison(GarrisonMode.RemoveGarrison, true); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | dialog.Close(); |
| | | CommonPage.Loading.Hide(); |
| | | if (result == 1) |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uRemoveGarrisonSuccess)); |
| | | } |
| | | else |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uRemoveGarrisonFail)); |
| | | } |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | { |
| | | atHome.IsSelected = true; |
| | | } |
| | | atHome.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | atHome.ButtonClickEvent += (sender, e) => |
| | | { |
| | | if ((sender as Button).IsSelected) |
| | | dialog.Close(); |
| | | if (sender.IsSelected) |
| | | { |
| | | dialog.Close(); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | CommonPage.Loading.Start(); |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | var result = HdlSafeguardLogic.Current.SetSafetyGarrisonByModel(GarrisonMode.AtHome); |
| | | var result =await HdlSafeguardLogic.Current.SetSafetyGarrisonByModel(GarrisonMode.AtHome); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | dialog.Close(); |
| | | CommonPage.Loading.Hide(); |
| | | if (result == GarrisonMode.AtHome) |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uSetAtHomeGarrisonSuccess)); |
| | | } |
| | | else |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uSetGarrisonFail)); |
| | | } |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | { |
| | | removeHome.IsSelected = true; |
| | | } |
| | | removeHome.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | removeHome.ButtonClickEvent += (sender, e) => |
| | | { |
| | | if ((sender as Button).IsSelected) |
| | | dialog.Close(); |
| | | if (sender.IsSelected) |
| | | { |
| | | dialog.Close(); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | CommonPage.Loading.Start(); |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | var result = HdlSafeguardLogic.Current.SetSafetyGarrisonByModel(GarrisonMode.RemoveHome); |
| | | var result =await HdlSafeguardLogic.Current.SetSafetyGarrisonByModel(GarrisonMode.RemoveHome); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | dialog.Close(); |
| | | CommonPage.Loading.Hide(); |
| | | if (result == GarrisonMode.RemoveHome) |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uSetRemoveHomeGarrisonSuccess)); |
| | | } |
| | | else |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uSetGarrisonFail)); |
| | | } |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | { |
| | | withdrawGarriso.IsSelected = true; |
| | | } |
| | | withdrawGarriso.ClickBtn.MouseUpEventHandler += (sender, e) => |
| | | withdrawGarriso.ButtonClickEvent += (sender, e) => |
| | | { |
| | | if ((sender as Button).IsSelected) |
| | | dialog.Close(); |
| | | if (sender.IsSelected) |
| | | { |
| | | dialog.Close(); |
| | | return; |
| | | } |
| | | new System.Threading.Thread(() => |
| | | CommonPage.Loading.Start(); |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | var result = HdlSafeguardLogic.Current.RemoveSafetyGarrison(GarrisonMode.RemoveGarrison, true); |
| | | var result =await HdlSafeguardLogic.Current.RemoveSafetyGarrison(GarrisonMode.RemoveGarrison, true); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | dialog.Close(); |
| | | CommonPage.Loading.Hide(); |
| | | if (result == 1) |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uRemoveGarrisonSuccess)); |
| | | } |
| | | else |
| | | { |
| | | CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.uRemoveGarrisonFail)); |
| | | } |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |