示例#1
0
        private void RestartMongoDBAction(object sender, RoutedEventArgs e)
        {
            // Disable button
            RestartMongoDB.IsEnabled = false;

            // Stop MongoDB
            StopMongoDB.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));

            // Start MongoDB
            StartMongoDB.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));

            // Enable button
            RestartMongoDB.IsEnabled = true;
        }
示例#2
0
        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;
        }