Exemple #1
0
        private void addNewInstance_Click(object sender, EventArgs e)
        {
            using (m_addNewInstanceForm = new AddNewInstanceForm())
            {
                if (m_addNewInstanceForm.ShowDialog() == DialogResult.OK)
                {
                    // install a service
                    ManagedInstallerClass.InstallHelper(new string[] { "/servicename=" + m_addNewInstanceForm.NameOfService, m_serviceExeName });

                    // reload service controls
                    ReloadServices();
                }
            }
        }
        private void addNewInstance_Click(object sender, EventArgs e)
        {
            using (m_addNewInstanceForm = new AddNewInstanceForm())
            {
                if (m_addNewInstanceForm.ShowDialog() == DialogResult.OK)
                {
                    // install a service
                    ManagedInstallerClass.InstallHelper(new string[] { "/servicename=" + m_addNewInstanceForm.NameOfService, m_serviceExeName });

                    // reload service controls
                    ReloadServices();
                }
            }
        }