예제 #1
0
        private void startName_button_Click(object sender, System.EventArgs e)
        {
            ServiceProcessInstaller svcProcInst = new ServiceProcessInstaller();

            textBox.Text = "Displaying service installer dialog...";

            if (ServiceChange.GetServiceAccount(ref svcProcInst))
            {
                textBox.Text = "Changing the service account is not currently implemented in this application.";
            }
            else
            {
                textBox.Text = "No change made to service account.";
            }

            String scInfo;

            if (ServiceChange.QueryService(ref currentService, out scInfo))
            {
                textBox.Text += Environment.NewLine + scInfo;
            }
        }
예제 #2
0
        private void query_button_Click(object sender, System.EventArgs e)
        {
            textBox.Text = "Querying service configuration...";

            String scInfo;

            currentService.DisplayName = "TelNet";

            if (ServiceChange.QueryService(ref currentService, out scInfo))
            {
                textBox.Text = scInfo;

                this.startName_button.Enabled = true;
                this.startMode_button.Enabled = true;

                this.modeLabel.Visible    = true;
                this.modeComboBox.Visible = true;
            }
            else
            {
                textBox.Text = "Could not read configuration information for service.";
            }
        }