private void Conectar(object obj) { // if (DbStatus != Server.DbServerEstatus.Activo) // { var pass = obj as PasswordBox; var server = LogingViewModel.newserver; server.Mysqlserver = txtMyServer; server.Mysqldbuser = txtMyuser; server.Mysqldbkey = pass.Password; server.Mysqldbport = txtMyPort; Properties.Settings.Default.DbKey = pass.Password; Properties.Settings.Default.Save(); DbStatus = server.StartDbService(); ValidTxt = DbStatus.ToString(); if (DbStatus == Server.DbServerEstatus.Activo) { MessageBox.Show("Conexion Realizada", "Conexion", MessageBoxButton.OK, MessageBoxImage.Information); } // } }
public ConfigViewModel() { DbConnectCommand = new RelayCommand(Conectar); ValidTxt = DbStatus.ToString(); }