Exemple #1
0
        /// <summary>
        /// Execute the task of the ServiceStartStop activity.
        /// </summary>
        /// <param name="executionData"></param>
        /// <returns></returns>
        public PluginExecutionResult Execute(PluginExecutionData executionData)
        {
            _executionData = executionData;
            ServiceStartStopActivityData activityData = executionData.GetMetadata <ServiceStartStopActivityData>();

            return(ServiceActionPerform(activityData.serv.Address, activityData.task, activityData.services, executionData.Environment));
        }
        private void GetConfigurationControls(ServiceStartStopActivityData data)
        {
            _activityData = data;
            server_ComboBox.Initialize(data.serv, "Serviceable");

            LoadServices(data.serv.Address);

            foreach (var item in data.serviceIDs)
            {
                serviceListBox.SetSelected(item, true);
            }
            if (data.task == 0)
            {
                radioStop.Checked = true;
            }
            else if (data.task == 1)
            {
                radioStart.Checked = true;
            }
            else if (data.task == 2)
            {
                radioRestart.Checked = true;
            }
        }
 /// <summary>
 /// Initializes the configuration control with default settings.
 /// </summary>
 /// <param name="environment"></param>
 public void Initialize(PluginEnvironment environment)
 {
     _activityData = new ServiceStartStopActivityData();
     server_ComboBox.Initialize("Serviceable");
 }