Ejemplo n.º 1
0
 private void Communicator_ConfigureDatabaseStepsOnChanged(object sender, ResultArg e)
 {
     Dispatcher.BeginInvoke(new Action(delegate()
     {
         switch ((BombsHost.DatabaseConfigurationSteps)e.Result)
         {
             case BombsHost.DatabaseConfigurationSteps.ConfigurationFailure:
             case BombsHost.DatabaseConfigurationSteps.ConfigurationCancelled:
                 HideBusyMessage();
                 break;
         }
     }));
 }
Ejemplo n.º 2
0
        private void communicator_TestConnectionCompleted(object sender, ResultArg e)
        {
            HideBusyMessage();
            communicator.TestConnectionCompleted -= communicator_TestConnectionCompleted;

            Server.TestConnectionVariablesArgs result = ((Server.TestConnectionVariablesArgs)e.Result);
            bool isTestConnectionSuccessful = result.IsTestConnectionSuccessful;
            buttonCollection.IsOkButtonEnabled = isTestConnectionSuccessful;

            if (isTestConnectionSuccessful)
            {
                MessageBox.Show("Connection Successful", "Information", MessageBoxButton.OK, MessageBoxImage.Information);
                serverVariables.Information = result.ServerInformation;
                PopulateServerInformation();
            }
            else
            {
                ClearServerInformation();
                MessageBox.Show("Invalid Connection.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                serverAddressTextBox.Focus();
            }
        }