示例#1
0
 public void RaiseRequestConnectionEvent(RequestConnectionEventArgs args)
 {
     if (OnRequestConnection != null)
     {
         OnRequestConnection(this, args);
     }
 }
        private void viewsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (service == null)
            {
                if (OnRequestConnection != null)
                {
                    var args = new RequestConnectionEventArgs { ActionName = "WhoAmI", Control = this, Parameter = null };
                    OnRequestConnection(this, args);
                }
            }
            else
            {
                infoPanel = InformationPanel.GetInformationPanel(this, "Retrieving Views...", 340, 100);

                var worker = new BackgroundWorker();
                worker.DoWork += WorkerLoadViews;
                worker.ProgressChanged += WorkerProgressChanged;
                worker.RunWorkerCompleted += WorkerLoadViewsCompleted;
                worker.WorkerReportsProgress = true;
                worker.RunWorkerAsync();
            }
        }
        private void btnExecuteWFs_Click_1(object sender, EventArgs e)
        {
            if (service == null)
            {
                if (OnRequestConnection != null)
                {
                    var args = new RequestConnectionEventArgs { ActionName = "WhoAmI", Control = this, Parameter = null };
                    OnRequestConnection(this, args);
                }
            }
            else
            {
                infoPanel = InformationPanel.GetInformationPanel(this, "Executing Workflows...", 340, 100);

                var worker = new BackgroundWorker();
                worker.DoWork += WorkerExecWFs;
                worker.ProgressChanged += WorkerProgressChanged;
                worker.RunWorkerCompleted += WorkerExecWFsCompleted;
                worker.WorkerReportsProgress = true;
                worker.RunWorkerAsync();
            }
        }
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (service == null)
            {
                if (OnRequestConnection != null)
                {
                    var args = new RequestConnectionEventArgs { ActionName = "WhoAmI", Control = this, Parameter = null };
                    OnRequestConnection(this, args);
                }
            }
            else
            {
                infoPanel = InformationPanel.GetInformationPanel(this, "Counting Records in View...", 340, 100);

                var worker = new BackgroundWorker();
                worker.DoWork += WorkerGetCounts;
                worker.ProgressChanged += WorkerProgressChanged;
                worker.RunWorkerCompleted += WorkerGetCountsCompleted;
                worker.WorkerReportsProgress = true;
                worker.RunWorkerAsync();
            }
        }
 private void BtnWhoAmIClick(object sender, EventArgs e)
 {
     if (service == null)
     {
         if (OnRequestConnection != null)
         {
             var args = new RequestConnectionEventArgs { ActionName = "WhoAmI", Control = this, Parameter = null };
             OnRequestConnection(this, args);
         }
     }
     else
     {
         ProcessWhoAmI();
     }
 }
 private void TsbLoadSolutionsClick(object sender, EventArgs e)
 {
     if (service == null)
     {
         if (OnRequestConnection != null)
         {
             var args = new RequestConnectionEventArgs {ActionName = "WhoAmI", Control = this, Parameter = null};
             OnRequestConnection(this, args);
         }
     }
     else
     {
         RetrieveSolutions();
     }
 }
 private void BtnSelectTargetClick(object sender, EventArgs e)
 {
     if (OnRequestConnection != null)
     {
         var args = new RequestConnectionEventArgs {ActionName = "TargetOrganization", Control = this};
         OnRequestConnection(this, args);
     }
 }
 private void tsbLoadEntities_Click(object sender, EventArgs e)
 {
     if (service == null)
     {
         if (OnRequestConnection != null)
         {
             var args = new RequestConnectionEventArgs
             {
                 ActionName = "Load",
                 Control = this
             };
             OnRequestConnection(this, args);
         }
         else
         {
             MessageBox.Show(this, "OnRequestConnection event not registered!", "Error", MessageBoxButtons.OK,
                             MessageBoxIcon.Error);
         }
     }
     else
     {
         LoadEntities();
     }
 }