Esempio n. 1
0
        public static void MaintainedDbConnect()

        {
            var server = LogingViewModel.newserver;

            server.Mysqlserver = Properties.Settings.Default.DbServer;
            server.Mysqldbuser = Properties.Settings.Default.DbUser;
            server.Mysqldbkey  = Properties.Settings.Default.DbKey;
            server.Mysqldbport = Properties.Settings.Default.DbPort;
            DbStatus           = server.StartDbService();
        }
Esempio n. 2
0
        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);
            }

            //  }
        }