private void RestartMongoDBAction(object sender, RoutedEventArgs e) { // Disable button RestartMongoDB.IsEnabled = false; // Stop MongoDB StopMongoDB.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); // Start MongoDB StartMongoDB.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); // Enable button RestartMongoDB.IsEnabled = true; }
private void StopAll(object sender, RoutedEventArgs e) { // Stop nginx if (nginx) { StopNginx.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Stop PHP if (php) { StopPHP.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Stop MongoDB if (mongodb) { StopMongoDB.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Stop memcache if (memcache) { StopMemcache.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Stop redis if (redis) { StopRedis.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Disable start all button, enable stop all button StartAllButton.IsEnabled = true; StopAllButton.IsEnabled = false; }