Esempio n. 1
0
 public LoginViewModel(
     ServerCredentialsModel serverCredentials,
     Action connectCallback)
 {
     this.serverCredentials = serverCredentials;
     serverCredentials.PropertyChanged += ServerCredentialsPropertyChanged;
     connectCommand = new DelegateCommand(
         connectCallback,
         serverCredentials.IsValid);
     connectCommandViewModel = new CommandViewModel("_Login", connectCommand);
 }
 public FolderSelector()
 {
     var delegateCommand = new DelegateCommand(() =>
     {
         var dialog = new FolderBrowserDialog { SelectedPath = selectedFolder };
         if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             SelectedFolder = dialog.SelectedPath;
         }
     });
     command = new CommandViewModel("Select Folder", delegateCommand);
     selectedFolder = Environment.CurrentDirectory;
 }