Пример #1
0
 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);
     }
 }
Пример #2
0
        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);
            }
        }
Пример #3
0
        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;
            }
        }
Пример #4
0
        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;
            }
        }
Пример #5
0
 private void comboBxAppList_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.FormState = FormStateEnum.Processing;
     LoadViews();
     //CheckInstallHealth();
     this.FormState = FormStateEnum.Initial;
 }
Пример #6
0
 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);
     }
 }
Пример #7
0
        private void toolStripMenuItem2_Click(object sender, EventArgs e)
        {
            this.FormState = FormStateEnum.Processing;
            IISDeploymentTool iisActionTool = new IISDeploymentTool(5);

            iisActionTool.ShowDialog();
            this.FormState = FormStateEnum.NotProcessing;
        }
Пример #8
0
 private void SSOAdminInspector_Load(object sender, EventArgs e)
 {
     this.FormState = FormStateEnum.Processing;
     LoadSSOAppsTreeView();
     //treeViewSSOApps.ExpandAll();;
     ExpandToLevel(treeViewSSOApps.Nodes, 1);
     this.FormState = FormStateEnum.Initial;
 }
Пример #9
0
 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;
 }
Пример #10
0
 public virtual void PagePrepareInsertCopy()
 {
     if (PageState == FormStateEnum.Navigation)
     {
         PageState = FormStateEnum.Insert;
         PageShow(FormPositioningEnum.None, false);
     }
 }
Пример #11
0
 public virtual void PageEdit()
 {
     if (PageState == FormStateEnum.Navigation)
     {
         PageState = FormStateEnum.Edit;
         PageShow(FormPositioningEnum.None);
     }
 }
Пример #12
0
 public void EndExecuteActions()
 {
     this.FormState = FormStateEnum.NotProcessing;
     if (this.ExecutionComplete != null)
     {
         this.ExecutionComplete(new object(), new EventArgs());
     }
 }
Пример #13
0
        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;
        }
Пример #14
0
        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;
        }
Пример #15
0
        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();
            }
        }
Пример #16
0
        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();
            }
        }
Пример #17
0
 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());
 }
Пример #18
0
 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());
 }
Пример #19
0
 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;
 }
Пример #20
0
        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();
        }
Пример #21
0
 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);
 }
Пример #22
0
        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;
        }
Пример #23
0
 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);
 }
Пример #24
0
        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();
                }
            }
        }
Пример #25
0
        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();
        }
Пример #26
0
        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);
        }
Пример #27
0
 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();
     }
 }
Пример #28
0
 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);
     }
 }
Пример #29
0
        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);
        }
Пример #30
0
        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);
        }