コード例 #1
0
        private void ButtonAdd_Click(object sender, EventArgs e)
        {
            if (ListViewExistedServices.SelectedItems.Count > 0)
            {
                var Item = ListViewExistedServices.SelectedItems[0];

                foreach (var Serv in ArrayOfServices)
                {
                    if (Serv.DisplayName == Item.SubItems[0].Text)
                    {
                        var ClusterForm = new ServiceParam();
                        ClusterForm.ItsAdd = true;
                        ClusterForm.Serv   = Serv;
                        ClusterForm.ShowDialog();
                    }
                }
            }
            else
            {
                var AddNewService = new AvailableServices();
                AddNewService.FullServiceList = ListInstalledServices;
                AddNewService.ShowDialog();
            }

            RefreshListService();
        }
コード例 #2
0
        private void ButtonAdd_Click(object sender, EventArgs e)
        {
            ServiceParam ClusterForm = new ServiceParam();

            ClusterForm.ItsAdd = true;
            ClusterForm.Serv   = new Service1C();
            ClusterForm.ShowDialog();

            Close();
        }
コード例 #3
0
        private void ListAllServices_DoubleClick(object sender, EventArgs e)
        {
            ListViewItem Item = ListAllServices.SelectedItems[0];

            if (Item.SubItems[0].Text == "AppServer")
            {
                Service1C Serv = new Service1C();
                Serv.ExeFile = Item.SubItems[2].Text;

                ServiceParam ClusterForm = new ServiceParam();
                ClusterForm.ItsAdd = true;
                ClusterForm.Serv   = Serv;
                ClusterForm.ShowDialog();
            }
            Close();
        }
コード例 #4
0
        private void ButtonEdit_Click(object sender, EventArgs e)
        {
            if (ListViewExistedServices.SelectedItems.Count > 0)
            {
                var Item = ListViewExistedServices.SelectedItems[0];

                foreach (var Serv in ArrayOfServices)
                {
                    if (Serv.DisplayName == Item.SubItems[0].Text)
                    {
                        var ClusterForm = new ServiceParam();
                        ClusterForm.ItsAdd = true;
                        ClusterForm.Serv   = Serv;
                        ClusterForm.ShowDialog();
                        RefreshListService();
                    }
                }
            }
            else
            {
                MessageBox.Show("Необходимо выделить строку со службой сервера 1С, которую требуется изменить.");
            }
        }