Exemplo n.º 1
0
 private void SetupWorker()
 {
     worker                 = new IssueProcessor();
     worker.Results        += OnResults;
     worker.Error          += OnError;
     worker.ProcessingFile += OnProcessingFile;
 }
 private void SetupWorker()
 {
     worker = new IssueProcessor();
     worker.Results += OnResults;
     worker.Error += OnError;
     worker.ProcessingFile += OnProcessingFile;
 }
Exemplo n.º 3
0
 internal CheckFile(IssueServices issueService,
                    SourceFile file,
                    IssueProcessor issueProcessor)
 {
     this.issueService   = issueService;
     this.file           = file;
     this.issueProcessor = issueProcessor;
 }
 internal CheckFile(IssueServices issueService, 
                     SourceFile file, 
                     IssueProcessor issueProcessor)
 {
     this.issueService = issueService;
     this.file = file;
     this.issueProcessor = issueProcessor;
 }
Exemplo n.º 5
0
 private void gridView1_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         Point    pt   = gridControl1.PointToClient(MousePosition);
         GridView view = (GridView)sender;
         if (view.CalcHitInfo(pt).InRow)
         {
             IssueProcessor.GotoCode((SourceFile)gridView1.GetFocusedDataRow()["Source File"], (SourceRange)gridView1.GetFocusedDataRow()["Range"], locatorBeacon1);
         }
     }
     catch (Exception err)
     {
         MessageBox.Show(err.Message, "Error Going To Code");
     }
 }
        private void OnError(object sender, IssueProcessor.ErrorArgs e)
        {
            //cross thread - so you don't get the cross theading exception
            if (this.InvokeRequired)
            {
                this.BeginInvoke((MethodInvoker)delegate { OnError(sender, e); });
                return;
            }

            MessageBox.Show(e.Error.Message, "Update Error");
            progressBar.Value = 0;
            progressBar.Visible = false;
        }
        private void OnProcessingFile(object sender, IssueProcessor.ProcessingArgs e)
        {
            //cross thread - so you don't get the cross theading exception
            if (this.InvokeRequired)
            {
                this.BeginInvoke((MethodInvoker)delegate { OnProcessingFile(sender, e); });
                return;
            }

            try
            {
                progressBar.Maximum = e.totalFiles;
                progressBar.Value = e.processedFiles;
            }
            catch (Exception err)
            {
                //don't assert anymore as thread sync issue
                //Debug.Assert(false, "Error Setting Progress Bar");
            }
        }