private void InstallButton_Click(object sender, EventArgs e) { ServiceLogonInformationDialog dlg = new ServiceLogonInformationDialog(); switch (dlg.ShowDialog(this)) { case DialogResult.Cancel: return; case DialogResult.OK: break; default: return; } try { using (ElevatedServiceClient c = new ElevatedServiceClient()) { c.Interface.InstallService(dlg.User, dlg.Pass); } } catch (Exception ex) { MessageBox.Show(ex.Message); //throw; return; } setGuiElementsAccordingServiceState(); }
private void InstallButton_Click(object sender, EventArgs e) { ServiceLogonInformationDialog dlg = new ServiceLogonInformationDialog(); switch (dlg.ShowDialog(this)) { case DialogResult.Cancel: return; case DialogResult.OK: break; default: return; } try { using (ElevatedServiceClient c = new ElevatedServiceClient()) { c.Interface.InstallService(dlg.User, dlg.Pass); } } catch (Exception ex) { MessageBox.Show(ex.Message); //throw; return; } setGuiElementsAccordingServiceState(); }