Пример #1
0
        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;
        }
Пример #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;
        }