private void LoadSSOConfig() { try { string fileToOpen = string.Empty; if (openSsoFileDialog.ShowDialog() == DialogResult.OK) { try { this.FormState = FormStateEnum.Processing; fileToOpen = openSsoFileDialog.FileName; txtSSOConfigLoc.Text = fileToOpen; txtConfigAppName.Text = System.IO.Path.GetFileNameWithoutExtension(fileToOpen); chkBxSSOKey.Visible = true; txtBxSSOKey.Visible = true; txtBxSSOKey.Text = ConfigurationManager.AppSettings["SSOKey"]; } finally { this.FormState = FormStateEnum.NotProcessing; } } } catch (Exception ex) { DisplayError(ex); } }
private void LoadMsiPackage() { try { string fileToOpen = string.Empty; if (openMsiFileDialog.ShowDialog() == DialogResult.OK) { try { this.FormState = FormStateEnum.Processing; fileToOpen = openMsiFileDialog.FileName; MsiPackage misPackage = new MsiPackage(fileToOpen); txtMSILocation.Text = fileToOpen; txtAppName.Text = misPackage.DisplayName; LoadTargetEnvironments(misPackage.TargetEnvironments.ToArray()); LoadActions(txtAppName.Text, txtMSILocation.Text, misPackage.WebDirectories()); LoadInProgressServiceInstances(txtAppName.Text); } finally { this.Text = string.Concat(txtAppName.Text, " : ", formText); this.FormState = FormStateEnum.NotProcessing; } } } catch (Exception ex) { DisplayError(ex); } }
private void UpdateFormState(FormStateEnum formState) { switch (formState) { case FormStateEnum.Initial: comboBxAppList.Enabled = true; btnStart.Enabled = true; button1.Enabled = true; btnStop.Enabled = true; UpdateCursor(Cursors.Default); break; case FormStateEnum.NotProcessing: comboBxAppList.Enabled = true; btnStart.Enabled = true; button1.Enabled = true; btnStop.Enabled = true; UpdateCursor(Cursors.Default); break; case FormStateEnum.Processing: comboBxAppList.Enabled = false; btnStart.Enabled = false; button1.Enabled = false; btnStop.Enabled = false; UpdateCursor(Cursors.WaitCursor); break; } }
private void UpdateFormState(FormStateEnum formState) { switch (formState) { case FormStateEnum.Initial: UpdateCursor(Cursors.Default); contextMenuStrip1.Enabled = true; break; case FormStateEnum.NotProcessing: UpdateCursor(Cursors.Default); foreach (TabPage item in tabControl1.TabPages) { ((Control)item).Enabled = true; } contextMenuStrip1.Enabled = true; break; case FormStateEnum.Processing: UpdateCursor(Cursors.WaitCursor); foreach (TabPage item in tabControl1.TabPages) { if (!(item == tabControl1.SelectedTab)) { ((Control)item).Enabled = false; } } contextMenuStrip1.Enabled = false; break; } }
private void comboBxAppList_SelectedIndexChanged(object sender, EventArgs e) { this.FormState = FormStateEnum.Processing; LoadViews(); //CheckInstallHealth(); this.FormState = FormStateEnum.Initial; }
private void btnBrowseMSI_Click(object sender, EventArgs e) { try { string fileToOpen = string.Empty; if (openMsiFileDialog.ShowDialog() == DialogResult.OK) { try { richTextBox1.Text = string.Empty; fileToOpen = openMsiFileDialog.FileName; this.BindingFile = fileToOpen; textBox1.Text = this.BindingFile; } finally { this.FormState = FormStateEnum.NotProcessing; } } } catch (Exception ex) { DisplayError(ex); } }
private void toolStripMenuItem2_Click(object sender, EventArgs e) { this.FormState = FormStateEnum.Processing; IISDeploymentTool iisActionTool = new IISDeploymentTool(5); iisActionTool.ShowDialog(); this.FormState = FormStateEnum.NotProcessing; }
private void SSOAdminInspector_Load(object sender, EventArgs e) { this.FormState = FormStateEnum.Processing; LoadSSOAppsTreeView(); //treeViewSSOApps.ExpandAll();; ExpandToLevel(treeViewSSOApps.Nodes, 1); this.FormState = FormStateEnum.Initial; }
private void tabPageWebAppStatus_Enter(object sender, EventArgs e) { this.FormState = FormStateEnum.Processing; comboBoxAppPoolNames.Items.Add(applicationPoolName); comboBoxAppPoolNames.Text = comboBoxAppPoolNames.Items[0].ToString(); LoadListViewRecycleAppPool(applicationPoolName); this.FormState = FormStateEnum.Initial; }
public virtual void PagePrepareInsertCopy() { if (PageState == FormStateEnum.Navigation) { PageState = FormStateEnum.Insert; PageShow(FormPositioningEnum.None, false); } }
public virtual void PageEdit() { if (PageState == FormStateEnum.Navigation) { PageState = FormStateEnum.Edit; PageShow(FormPositioningEnum.None); } }
public void EndExecuteActions() { this.FormState = FormStateEnum.NotProcessing; if (this.ExecutionComplete != null) { this.ExecutionComplete(new object(), new EventArgs()); } }
private void addApplicationToolStripMenuItem_Click(object sender, EventArgs e) { this.FormState = FormStateEnum.Processing; IISDeploymentTool iisActionTool = new IISDeploymentTool(1); iisActionTool.websiteName = treeView1.SelectedNode.Text; iisActionTool.ShowDialog(); this.FormState = FormStateEnum.NotProcessing; }
private void deleteApplicationPoolToolStripMenuItem_Click(object sender, EventArgs e) { this.FormState = FormStateEnum.Processing; IISDeploymentTool iisActionTool = new IISDeploymentTool(7); iisActionTool.applicationPoolName = treeViewBizTalkApplications.SelectedNode.Text; iisActionTool.ShowDialog(); this.FormState = FormStateEnum.NotProcessing; }
private void btnVocabularies_Click(object sender, EventArgs e) { DialogResult dr = this.openVocabularyDialog.ShowDialog(); if (dr == System.Windows.Forms.DialogResult.OK) { this.FormState = FormStateEnum.Initial; LoadFiles(); } }
private void btnAdd_Click(object sender, EventArgs e) { DialogResult dr = this.assembliesDialog.ShowDialog(); if (dr == System.Windows.Forms.DialogResult.OK) { this.FormState = FormStateEnum.Initial; LoadFiles(); } }
private void BeginActions() { this.FormState = FormStateEnum.Processing; if (this.actionableListView.CheckedItems.Count == 0) { DisplayMessage("Please check item(s) for action."); this.FormState = FormStateEnum.Initial; return; } BeginActions(GetCheckedItems()); }
private void BeginImportPublishBrl() { this.FormState = FormStateEnum.Processing; if (listViewImportAndPublish.CheckedItems.Count == 0) { DisplayMessage("Please check brl(s) to import and publish."); this.FormState = FormStateEnum.Initial; return; } BeginImportingPublishingBrl(GetCheckedBrlsInOrder()); }
private void tabPageDeleteApplication_Enter(object sender, EventArgs e) { this.FormState = FormStateEnum.Processing; comboBoxSiteName.Items.Clear(); comboBoxWebAppNames.Items.Clear(); comboBoxSiteName.Items.Add(this.websiteName); comboBoxWebAppNames.Items.Add(this.applicationName); comboBoxSiteName.Text = this.websiteName; comboBoxWebAppNames.Text = this.applicationName; LoadListViewDeleteApp(); this.FormState = FormStateEnum.Initial; }
void threadProcessor_Completed(object sender, CompletedEventArgs e) { if (this.InvokeRequired) { // We're on a thread other than the GUI thread this.Invoke(new MethodInvoker(() => threadProcessor_Completed(sender, e))); return; } this.FormState = FormStateEnum.Initial; //EndExecuteActions(); }
private void BeginCheckingWebServiceStatus(List <BaseAction> actions) { this.FormState = FormStateEnum.Processing; if (threadProcessor == null) { threadProcessor = new ThreadProcessor(); threadProcessor.Completed += new EventHandler <CompletedEventArgs>(threadProcessor_Completed); threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_CheckWebServiceExecuting); threadProcessor.ActionExecuted += new EventHandler <ActionExecutedEventArgs>(threadProcessor_CheckWebServiceExecuted); } threadProcessor.AsyncRunAllWorkUnits(actions); }
private void toolStripMenuItem3_Click(object sender, EventArgs e) { this.FormState = FormStateEnum.Processing; IISDeploymentTool iisActionTool = new IISDeploymentTool(3); Microsoft.Web.Administration.Application app = treeViewBizTalkApplications.SelectedNode.Tag as Microsoft.Web.Administration.Application; if (app != null) { iisActionTool.applicationPoolName = app.ApplicationPoolName; iisActionTool.ShowDialog(); } this.FormState = FormStateEnum.NotProcessing; }
private void BeginSavingInstances(List <BaseAction> actions) { isInterrupted = false; this.FormState = FormStateEnum.Processing; if (threadProcessor == null) { threadProcessor = new ThreadProcessor(); threadProcessor.Completed += new EventHandler <CompletedEventArgs>(threadProcessor_SavingCompleted); threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_SavingActionExecuting); threadProcessor.ActionExecuted += new EventHandler <ActionExecutedEventArgs>(threadProcessor_SavingActionExecuted); } threadProcessor.AsyncRunControlledWorkUnits(actions, Environment.ProcessorCount); }
private void button1_Click(object sender, EventArgs e) { DialogResult result = DisplayQuestion("Are you sure you want to change the handlers for selected artifacts"); if (result == System.Windows.Forms.DialogResult.OK) { try { progressBar1.Value = 0; if (CheckIfValidForm()) { this.FormState = FormStateEnum.Processing; if (checkBoxRcvPort.Checked && checkBoxSendPort.Checked) { progressBar1.Maximum = explorerHelper.CatalogExplorer.SendPorts.Count + explorerHelper.CatalogExplorer.ReceivePorts.Count; SetForReceivePorts(); SetForSendPorts(); } else if (checkBoxRcvPort.Checked) { progressBar1.Maximum = explorerHelper.CatalogExplorer.ReceivePorts.Count; SetForReceivePorts(); } else if (checkBoxSendPort.Checked) { progressBar1.Maximum = explorerHelper.CatalogExplorer.SendPorts.Count; SetForSendPorts(); } this.FormState = FormStateEnum.NotProcessing; GenericHelper.WriteLog(string.Format("Done changing handlers --- {0}", DateTime.Now)); string logpath = GenericHelper.WriteLog("==========================================================================================="); DisplayMessage("Done changing handlers"); } else { DisplayMessage("Please select valid values and/or check the port type"); } // GenericHelper.WriteLog(sbLog.ToString()); } catch (Exception ex) { DisplayError(ex); } finally { linkLabel1.Text = string.Format("Log file is saved at {0}", logpath); // sbLog = new StringBuilder(); } } }
private void viewToolStripMenuItem_Click(object sender, EventArgs e) { this.FormState = FormStateEnum.Processing; ListViewItem item = actionableListView.SelectedItems[0]; string ruleName = item.SubItems[0].Text; string majorV = item.SubItems[1].Text; string minorV = item.SubItems[2].Text; string rule = GenericHelper.TransformData("BizTalkDeploymentTool.EmbeddedResources.Policy.xslt", (BreHelper.GetRules(new RuleSetInfo(ruleName, Convert.ToInt32(majorV), Convert.ToInt32(minorV))))); this.FormState = FormStateEnum.Initial; Viewer viewer = new Viewer(rule); viewer.Show(); }
private void BeginActionOnServiceStartupType(List <BaseAction> actions) { this.FormState = FormStateEnum.Processing; // Initialize thread if (threadProcessor == null) { threadProcessor = new ThreadProcessor(); threadProcessor.Completed += new EventHandler <CompletedEventArgs>(threadProcessor_Completed); threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_ExecutingStartupType); threadProcessor.ActionExecuted += new EventHandler <ActionExecutedEventArgs>(threadProcessor_ExecutedStartupType); } threadProcessor.AsyncRunAllWorkUnits(actions); }
private void EndExecuteSaveActions() { this.FormState = FormStateEnum.NotProcessing; if (saveInstancesResult.Length == 0) { DisplayMessage("Messages have been saved successfully."); } else { DisplayLog displayLog = new DisplayLog(); displayLog.Log(saveInstancesResult.ToString()); displayLog.ShowDialog(); } }
private void IIS_Load(object sender, EventArgs e) { try { this.FormState = FormStateEnum.Processing; LoadTreeView(); ExpandToLevel(treeView1.Nodes, 2); this.FormState = FormStateEnum.Initial; //treeView1.ExpandAll(); } catch (Exception exe) { DisplayError(exe); } }
private void BeginGacing(List <BaseAction> actions) { this.FormState = FormStateEnum.Processing; // Initialize thread if (threadProcessor == null) { threadProcessor = new ThreadProcessor(); threadProcessor.Completed += new EventHandler <CompletedEventArgs>(threadProcessor_Completed); threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_Executing); threadProcessor.ActionExecuted += new EventHandler <ActionExecutedEventArgs>(threadProcessor_Executed); } threadProcessor.Run(actions); }
private void BeginExecuteActions(List <BaseAction> actions) { // Change form state this.FormState = FormStateEnum.Processing; // Initialize thread if (threadProcessor == null) { threadProcessor = new ThreadProcessor(); threadProcessor.Completed += new EventHandler <CompletedEventArgs>(threadProcessor_Completed); threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_ActionExecuting); threadProcessor.ActionExecuted += new EventHandler <ActionExecutedEventArgs>(threadProcessor_ActionExecuted); } //threadProcessor.AsyncRun(actions); threadProcessor.AsyncRunAllWorkUnits(actions); }