private void RestartPHPAction(object sender, RoutedEventArgs e) { // Disable button RestartPHP.IsEnabled = false; // Stop PHP StopPHP.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); // Start PHP StartPHP.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); // Enable button RestartPHP.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; }