Exemplo n.º 1
0
        protected override void OnDisappearing()
        {
            base.OnDisappearing();
            bool IsChanged   = false;
            var  NewUserName = UserNameCell.Text.Trim();

            if (Settings.UserName != NewUserName)
            {
                Settings.UserName        = NewUserName;
                Settings.IsValidUserName = false;
                IsChanged = true;
            }
            var OldLanguage = L.Get();

            Settings.Language = L.DisplayNames.Keys.ElementAt(LanguageCell.SelectedIndex);
            if (OldLanguage != L.Get())
            {
                L.Update();
                Root.RebuildMainPage();
                IsChanged = true;
            }
            if (IsChanged)
            {
                Root.OnChangeSettings();
            }
        }
Exemplo n.º 2
0
 protected override void OnDisappearing()
 {
     base.OnDisappearing();
     if (IsChanged)
     {
         Root.RebuildMainPage();
         Root.OnChangeSettings();
     }
 }
Exemplo n.º 3
0
        public AlphaSettingsPage()
        {
            Title        = L["Settings"];
            LanguageCell = AlphaFactory.MakePickerCell();

            UserLabel.Command = new Command
                                (
                o => AlphaFactory
                .MakeSureApp()
                .ShowSelectUserPage
                (
                    NewUser =>
            {
                Settings.UserName = NewUser;
                Root.OnChangeSettings();
            }
                )
                                );
        }
Exemplo n.º 4
0
        public AlphaSettingsPage()
        {
            Title = L["Settings"];

            UserLabel.Command = new Command
                                (
                o => AlphaFactory
                .MakeSureApp()
                .ShowSelectUserPage
                (
                    NewUser =>
            {
                Settings.UserName = NewUser;
                Domain.UpdateLastPublicActivityCoreAsync(NewUser).LeavingThrown();
                Root.OnChangeSettings();
                ApplyUser(Settings.UserName);
            }
                )
                                );
        }
Exemplo n.º 5
0
        protected override void OnDisappearing()
        {
            base.OnDisappearing();
            bool IsChanged = false;

            foreach (var cell in LeftTimeAlertSwitchCellList)
            {
                if (Settings.GetAlert(cell.Key) != cell.Value.On)
                {
                    Settings.SetAlert(cell.Key, cell.Value.On);
                    IsChanged = true;
                }
            }
            if (IsChanged)
            {
                Root.OnChangeSettings();
            }
        }