示例#1
0
        public void onSaveSettings(string nick)
        {
            if (selectedLanguage != null)
            {
                Application.Current.Properties["language"] = selectedLanguage;
            }
            else
            {
                resetLanguage();
            }

            Application.Current.Properties["lockenabled"] = lockEnabled;
            Application.Current.SavePropertiesAsync(); // Force-save properties for compatibility with WPF

            if (Node.localStorage.nickname != nick)
            {
                Node.localStorage.nickname = nick;
                FriendList.broadcastNicknameChange();
            }
            Node.localStorage.writeAccountFile();
            Node.changedSettings = true;
            applyAvatar();

            if (ThemeManager.changeAppearance(selectedAppearance))
            {
                UIHelpers.reloadAllPages();
                if (Device.RuntimePlatform == Device.iOS)
                {
                    return; // iOS automatically pops the current page when reloading contents
                }
            }

            // Pop the current page from the stack
            Navigation.PopAsync(Config.defaultXamarinAnimations);
        }
示例#2
0
        public void onSaveSettings(string nick)
        {
            if (Node.localStorage.nickname != nick)
            {
                Node.localStorage.nickname = nick;
                FriendList.broadcastNicknameChange();
            }
            Node.localStorage.writeAccountFile();
            Node.changedSettings = true;
            applyAvatar();

            Navigation.PopAsync(Config.defaultXamarinAnimations);
        }
        public void onSaveSettings(string nick)
        {
            if (selectedLanguage != null)
            {
                Application.Current.Properties["language"] = selectedLanguage;
                Application.Current.SavePropertiesAsync();  // Force-save properties for compatibility with WPF
            }
            else
            {
                resetLanguage();
            }

            if (Node.localStorage.nickname != nick)
            {
                Node.localStorage.nickname = nick;
                FriendList.broadcastNicknameChange();
            }
            Node.localStorage.writeAccountFile();
            Node.changedSettings = true;
            applyAvatar();

            Navigation.PopAsync(Config.defaultXamarinAnimations);
        }