Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17384


Ignore:
Timestamp:
12/19/19 10:58:13 (5 years ago)
Author:
jkarder
Message:

#3045: added dialog that displays warning/error information

Location:
trunk/HeuristicLab.Scripting.Views/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs

    r17180 r17384  
    4747    private void InitializeComponent() {
    4848      this.components = new System.ComponentModel.Container();
     49      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ScriptView));
    4950      this.infoTextLabel = new System.Windows.Forms.Label();
    5051      this.imageList = new System.Windows.Forms.ImageList(this.components);
     
    184185      this.errorListView.UseCompatibleStateImageBehavior = false;
    185186      this.errorListView.View = System.Windows.Forms.View.Details;
     187      this.errorListView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.errorListView_MouseClick);
    186188      this.errorListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.errorListView_MouseDoubleClick);
    187189      //
  • trunk/HeuristicLab.Scripting.Views/3.3/ScriptView.cs

    r17180 r17384  
    209209    }
    210210
     211    private void errorListView_MouseClick(object sender, MouseEventArgs e) {
     212      if (e.Button != MouseButtons.Left) return;
     213
     214      var item = errorListView.SelectedItems[0];
     215      var message = (CompilerError)item.Tag;
     216
     217      codeEditor.ScrollToPosition(message.Line, message.Column);
     218      codeEditor.Focus();
     219    }
     220
    211221    private void errorListView_MouseDoubleClick(object sender, MouseEventArgs e) {
    212       if (e.Button == MouseButtons.Left) {
    213         var item = errorListView.SelectedItems[0];
    214         var message = (CompilerError)item.Tag;
    215         codeEditor.ScrollToPosition(message.Line, message.Column);
    216         codeEditor.Focus();
    217       }
     222      if (e.Button != MouseButtons.Left) return;
     223
     224      var item = errorListView.SelectedItems[0];
     225      var message = (CompilerError)item.Tag;
     226
     227      using (var dialog = new CompilerErrorDialog(message)) {
     228        dialog.ShowDialog(this);
     229      };
    218230    }
    219231    #endregion
Note: See TracChangeset for help on using the changeset viewer.