示例#1
0
        private void OnChangeServiceStatus(ServiceStateRequest ssr, string title)
        {
            PerformServiceStateRequest pssr = new PerformServiceStateRequest(ssr);

            foreach (ServiceDataObject sdo in MainListView.SelectedItems)
            {
                pssr.Services.Add(sdo);
            }
            if (pssr.Services.Count > 0)
            {
                new LongRunningFunctionWindow(pssr, title).ShowDialog();
            }
        }
示例#2
0
        public void PerformExplicitRequest(ServiceStateRequest ssr, List <string> serviceNames, string title)
        {
            PerformServiceStateRequest pssr = new PerformServiceStateRequest(ssr);

            // OK, so this code is not very efficient and I should really be using a dictionary.
            // BUT. I expect one or at max two services to be passed, so who cares?
            foreach (ServiceDataObject sdo in MainListView.Items)
            {
                foreach (string serviceName in serviceNames)
                {
                    if (serviceName.Equals(sdo.InternalID, StringComparison.OrdinalIgnoreCase))
                    {
                        pssr.Services.Add(sdo);
                        break;
                    }
                }
            }
            if (pssr.Services.Count > 0)
            {
                new LongRunningFunctionWindow(pssr, title).ShowDialog();
            }
        }
示例#3
0
 private void OnChangeServiceStatus(ServiceStateRequest ssr, string title)
 {
     PerformServiceStateRequest pssr = new PerformServiceStateRequest(ssr);
     foreach(ServiceDataObject sdo in MainListView.SelectedItems)
     {
         pssr.Services.Add(sdo);
     }
     if( pssr.Services.Count > 0 )
     {
         new LongRunningFunctionWindow(pssr, title).ShowDialog();
     }
 }
示例#4
0
        public void PerformExplicitRequest(ServiceStateRequest ssr, List<string> serviceNames, string title)
        {
            PerformServiceStateRequest pssr = new PerformServiceStateRequest(ssr);

            // OK, so this code is not very efficient and I should really be using a dictionary.
            // BUT. I expect one or at max two services to be passed, so who cares?
            foreach (ServiceDataObject sdo in MainListView.Items)
            {
                foreach(string serviceName in serviceNames)
                {
                    if(serviceName.Equals(sdo.InternalID, StringComparison.OrdinalIgnoreCase) )
                    {
                        pssr.Services.Add(sdo);
                        break;
                    }
                }
            }
            if (pssr.Services.Count > 0)
            {
                new LongRunningFunctionWindow(pssr, title).ShowDialog();
            }
        }