示例#1
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public SettingsViewModel()
        {
            // Create Username
            Username = new TextEntryViewModel
            {
                Label        = "Usuário",
                OriginalText = mLoadingText,
                CommitAction = SaveUsernameAsync
            };

            // Create Password
            Password = new PasswordEntryViewModel
            {
                Label        = "Senha",
                FakePassword = "******",
                CommitAction = SavePasswordAsync
            };

            // Create commands
            OpenCommand          = new RelayCommand(Open);
            CloseCommand         = new RelayCommand(Close);
            LogoutCommand        = new RelayCommand(async() => await LogoutAsync());
            ClearUserDataCommand = new RelayCommand(ClearUserData);
            LoadCommand          = new RelayCommand(async() => await LoadAsync());
            SaveUsernameCommand  = new RelayCommand(async() => await SaveUsernameAsync());

            LogoutButtonText = "Sair";
        }
示例#2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SettingsDesignModel()
 {
     Username = new TextEntryViewModel {
         Label = "Usuário", OriginalText = "luke"
     };
     Password = new PasswordEntryViewModel {
         Label = "Senha", FakePassword = "******"
     };
 }