private void RestartRedisAction(object sender, RoutedEventArgs e) { // Disable button RestartRedis.IsEnabled = false; // Stop Redis StopRedis.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); // Start Redis StartRedis.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); // Enable button RestartRedis.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; }