示例#1
0
        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;
        }
示例#2
0
        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;
        }