public bool ConfigureDatabaseOnProgress(BombsHost.DatabaseConfigurationSteps databaseConfiurationStep)
        {
            if (ConfigureDatabaseStepsOnChanged != null)
                ConfigureDatabaseStepsOnChanged(this, new ResultArg() { Result = databaseConfiurationStep });

            return true;
        }
        public bool ConnectDatabaseOnProgress(BombsHost.DatabaseInformation previousInformation, BombsHost.DatabaseStatus oldStatus, BombsHost.DatabaseStatus newStatus)
        {
            if (DatabaseStatusOnChanged != null) DatabaseStatusOnChanged(this, new ConnectdDatabaseOnProgressArguments()
            {
                PreviousDatabaseInformation = previousInformation,
                OldStatus = oldStatus,
                NewStatus = newStatus
            });

            return true;
        }
 private void CommunicatorHost_GetServerInformationCompleted(object sender, BombsHost.GetServerInformationCompletedEventArgs e)
 {
     InvokeValidateDatabaseStatus(((BombsHost.ServerInformation)e.Result).DatabaseInformation.Status);
 }
        private void InvokeValidateDatabaseStatus(BombsHost.DatabaseStatus databaseStatus)
        {
            if (databaseStatus != BombsHost.DatabaseStatus.Ready)
            {
                Dispatcher.BeginInvoke(new Action(delegate()
                {
                    switch (databaseStatus)
                    {
                        case BombsHost.DatabaseStatus.ConfigurationOnProgress:
                            overlappingBusyMessage.BusyMessage = Properties.Resources.DatabaseStatus_ConfigurationOnProgress;
                            overlappingBusyMessage.Show();
                            break;
                        case BombsHost.DatabaseStatus.DatabaseErrorConfiguration:
                            Application.Current.MainWindow.Activate();
                            overlappingBusyMessage.Hide();
                            MessageBox.Show(Properties.Resources.DatabaseStatus_DatabaseErrorConfiguration, "Error", MessageBoxButton.OK, MessageBoxImage.Information);

                            break;

                    }
                }));
            }
        }
Exemple #5
0
 private void communicatorHideMessage_PushDatabaseConfigurationCompleted(object sender, BombsHost.PushDatabaseConfigurationCompletedEventArgs e)
 {
     ((BombsHost.CommunicatorClient)sender).PushDatabaseConfigurationCompleted -= communicatorHideMessage_PushDatabaseConfigurationCompleted;
     Dispatcher.BeginInvoke(new Action(delegate() { HideBusyMessage(); }));
 }
Exemple #6
0
 private void communicatorDoNothing_PushDatabaseConfigurationCompleted(object sender, BombsHost.PushDatabaseConfigurationCompletedEventArgs e)
 {
     ((BombsHost.CommunicatorClient)sender).PushDatabaseConfigurationCompleted -= communicatorDoNothing_PushDatabaseConfigurationCompleted;
 }
Exemple #7
0
 private void testCommunicator_GetServerInformationCompleted(object sender, BombsHost.GetServerInformationCompletedEventArgs e)
 {
     if (TestConnectionCompleted != null)
         TestConnectionCompleted(this, new ResultArg()
         {
             Result = new Server.TestConnectionVariablesArgs()
             {
                 IsTestConnectionSuccessful = true,
                 ServerInformation = e.Result
             }
         });
 }
Exemple #8
0
        private void OnTestConnectionCompleted(bool result, BombsHost.CommunicatorClient testCommunicator, Server.ServerVariables serverVariables)
        {
            serverToConnect = serverVariables;
            if (TestConnectionCompleted != null)
            {
                if (!result)
                {
                    TestConnectionCompleted(this, new ResultArg()
                    {
                        Result = new Server.TestConnectionVariablesArgs()
                        {
                            IsTestConnectionSuccessful = false,
                            ServerInformation = null
                        }
                    });
                }
                else
                {
                    if (testCommunicator != null)
                    {
                        testResultHost = testCommunicator;

                        testResultHost.GetServerInformationCompleted -= testCommunicator_GetServerInformationCompleted;
                        testResultHost.GetServerInformationCompleted += testCommunicator_GetServerInformationCompleted;

                        testResultHost.GetServerInformationAsync();
                    }
                }
            }
        }
Exemple #9
0
        private void OnActiveServerInformationChanged(BombsHost.ServerInformation oldServerInformation, BombsHost.ServerInformation newServerInformation)
        {
            if (ActiveServerInformationChanged == null) return;

            ActiveServerInformationChanged(this, new NewValueArgs("Information")
                {
                    OldValue = oldServerInformation,
                    NewValue = newServerInformation
                });
        }
Exemple #10
0
 private void connector_GetServerInformationCompleted(object sender, BombsHost.GetServerInformationCompletedEventArgs e)
 {
     if (activeServer.Information != e.Result)
     {
         BombsHost.ServerInformation previousServerInformation = activeServer.Information;
         activeServer.Information = e.Result;
         WriteResources();
         OnActiveServerInformationChanged(previousServerInformation, activeServer.Information);
     }
 }
        public bool SendObject(BombsHost.DataCommunicator dataCommunicator)
        {
            AssemblyType assType = Activator.CreateInstance(dataCommunicator.AssemblyName, dataCommunicator.ClassName).Unwrap() as AssemblyType;

            BombsHost.DataCommunicator test = new BombsHost.DataCommunicator();

            return true;
        }
 public IAsyncResult BeginSendObject(BombsHost.DataCommunicator dataCommunicator, AsyncCallback callback, object asyncState)
 {
     throw new NotImplementedException();
 }
 public IAsyncResult BeginConnectDatabaseOnProgress(BombsHost.DatabaseInformation previousInformation, BombsHost.DatabaseStatus oldStatus, BombsHost.DatabaseStatus newStatus, AsyncCallback callback, object asyncState)
 {
     throw new NotImplementedException();
 }
 public IAsyncResult BeginConfigureDatabaseOnProgress(BombsHost.DatabaseConfigurationSteps databaseConfiurationStep, AsyncCallback callback, object asyncState)
 {
     throw new NotImplementedException();
 }