private void RestartNginxAction(object sender, RoutedEventArgs e) { // Disable button RestartNginx.IsEnabled = false; // Stop nginx StopNginx.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); // Start nginx StartNginx.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); // Enable button RestartNginx.IsEnabled = true; }
private void StartAll(object sender, RoutedEventArgs e) { // Start nginx if (!nginx) { StartNginx.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Start PHP if (!php) { StartPHP.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Start MongoDB if (!mongodb) { StartMongoDB.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Start memcache if (!memcache) { StartMemcache.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Start redis if (!redis) { StartRedis.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } // Disable start all button, enable stop all button StartAllButton.IsEnabled = false; StopAllButton.IsEnabled = true; }