예제 #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 = "******"
     };
 }
예제 #3
0
        public NewEmployeeViewModel()
        {
            Name = new TextEntryViewModel
            {
                Label        = "Nome",
                OriginalText = ""
            };

            AddCommand   = new RelayCommand(SalvarUsuarioAsync);
            CloseCommand = new RelayCommand(Close);
        }
예제 #4
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public NewEmployeeDesignModel()
 {
     Name = new TextEntryViewModel {
         Label = "Nome", OriginalText = "luke"
     };
 }