Ejemplo n.º 1
0
        public NewConfigViewModel()
        {
            DBProvider  = new EnumSelection <DatabaseProvider>(DatabaseProvider.SQLite);
            ArchiveType = new EnumSelection <ArchiveType>(Zebra.Library.ArchiveType.Local);

            LocalArchiveCredentials = new LocalArchiveCredentials();
            FTPCredentials          = new FTPCredentials();

            SQLiteCredentials = new SQLiteCredentials();
            MySQLCredentials  = new MySQLCredentials();

            BrowseLocalDBCommand              = new DelegateCommand(ExecuteBrowseLocalDBCommand, canExecuteBrowseLocalDBCommand);
            BrowseLocalArchiveCommand         = new DelegateCommand(ExecuteBrowseLocalArchiveCommand, canExecuteBrowseLocalArchiveCommand);
            TestMySQLServerCredentialsCommand = new DelegateCommand(ExecuteTestMySQLServerCredentialsCommand, canExecuteTestMySQLServerCredentialsCommand);
            TestFTPArchiveCredentialsCommand  = new DelegateCommand(ExecuteTestFTPArchiveCredentialsCommand, canExecuteFTPArchiveCredentialsCommand);
            SaveNewConfigCommand              = new DelegateCommand(ExecuteSaveNewConfigCommand, canExecuteSaveNewConfigCommand);

            this.PropertyChanged += UpdateButtonStatus;

            //TODO: Implemet INotifyPropertyChanged for Credentials, so that Update can trigger the button state
        }
Ejemplo n.º 2
0
 public MySQLTestContext(MySQLCredentials _credentials)
 {
     Credentials = _credentials;
 }