Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/21/10 12:04:19 (14 years ago)
Author:
epitzer
Message:

(#47)

  • Show a different icon for breakpoints
  • Show an icon for the active operation
Location:
trunk/sources/HeuristicLab.DebugEngine/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DebugEngine/3.3/ExecutionStackView.cs

    r5114 r5146  
    8181        treeView.ImageList.Images.Add(VS2008ImageLibrary.Method);
    8282        treeView.ImageList.Images.Add(VS2008ImageLibrary.Module);
     83        treeView.ImageList.Images.Add(VS2008ImageLibrary.BreakpointActive);
    8384        int totalNodes = AddStackOperations(treeView.Nodes, ((IEnumerable<IOperation>)Content).Reverse());
    8485        if (treeView.Nodes.Count > 0)
     
    111112            Utils.TypeName(atom.Operator), Environment.NewLine,
    112113            Utils.Wrap(atom.Operator.Description ?? atom.Operator.ItemDescription, 60));
    113           node.ImageIndex = 0;
    114           node.SelectedImageIndex = 0;
    115           if (atom.Operator.Breakpoint)
     114          if (atom.Operator.Breakpoint) {
    116115            node.ForeColor = Color.Red;
     116            node.ImageIndex = 2;
     117            node.SelectedImageIndex = 2;
     118          } else {
     119            node.ImageIndex = 0;
     120            node.SelectedImageIndex = 0;
     121          }
    117122          count++;
    118123        } else if (op is OperationCollection) {
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperationContent.cs

    r5114 r5146  
    2020#endregion
    2121
     22using System.Drawing;
    2223using HeuristicLab.Common;
     24using HeuristicLab.Common.Resources;
    2325using HeuristicLab.Core;
    2426
     
    3133    public ExecutionContext ExecutionContext { get; private set; }
    3234    public string Name { get; private set; }
     35    public Image Icon { get; private set; }
    3336
    3437    public OperationContent(IOperation operation) {
     
    3942      if (AtomicOperation != null) {
    4043        Name = Utils.Name(AtomicOperation);
     44        if (AtomicOperation.Operator != null && AtomicOperation.Operator.Breakpoint) {
     45          Icon = VS2008ImageLibrary.BreakpointActive;
     46        } else {
     47          Icon = VS2008ImageLibrary.Method;
     48        }
    4149      } else if (Collection != null) {
    4250        Name = string.Format("{0} Operations", Collection.Count);
     51        Icon = VS2008ImageLibrary.Module;
    4352      } else {
    4453        Name = "";
     54        Icon = VS2008ImageLibrary.Nothing;
    4555      }
    4656    }
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperationContentView.Designer.cs

    r5116 r5146  
    5858      this.nameTextBox = new System.Windows.Forms.TextBox();
    5959      this.parametersImageList = new System.Windows.Forms.ImageList(this.components);
     60      this.iconBox = new System.Windows.Forms.PictureBox();
    6061      this.groupBox.SuspendLayout();
    6162      this.splitContainer1.Panel1.SuspendLayout();
     
    6566      this.executionContextConextMenu.SuspendLayout();
    6667      this.scopeGroupBox.SuspendLayout();
     68      ((System.ComponentModel.ISupportInitialize)(this.iconBox)).BeginInit();
    6769      this.SuspendLayout();
    6870      //
    6971      // groupBox
    7072      //
     73      this.groupBox.Controls.Add(this.iconBox);
    7174      this.groupBox.Controls.Add(this.splitContainer1);
    7275      this.groupBox.Controls.Add(this.nameTextBox);
     
    187190            | System.Windows.Forms.AnchorStyles.Right)));
    188191      this.nameTextBox.Cursor = System.Windows.Forms.Cursors.Default;
    189       this.nameTextBox.Location = new System.Drawing.Point(6, 19);
     192      this.nameTextBox.Location = new System.Drawing.Point(32, 19);
    190193      this.nameTextBox.Name = "nameTextBox";
    191194      this.nameTextBox.ReadOnly = true;
    192       this.nameTextBox.Size = new System.Drawing.Size(551, 20);
     195      this.nameTextBox.Size = new System.Drawing.Size(525, 20);
    193196      this.nameTextBox.TabIndex = 3;
    194197      this.nameTextBox.DoubleClick += new System.EventHandler(this.nameTextBox_DoubleClick);
     
    199202      this.parametersImageList.ImageSize = new System.Drawing.Size(16, 16);
    200203      this.parametersImageList.TransparentColor = System.Drawing.Color.Transparent;
     204      //
     205      // iconBox
     206      //
     207      this.iconBox.Location = new System.Drawing.Point(6, 19);
     208      this.iconBox.Name = "iconBox";
     209      this.iconBox.Size = new System.Drawing.Size(20, 20);
     210      this.iconBox.TabIndex = 5;
     211      this.iconBox.TabStop = false;
    201212      //
    202213      // OperationContentView
     
    215226      this.executionContextConextMenu.ResumeLayout(false);
    216227      this.scopeGroupBox.ResumeLayout(false);
     228      ((System.ComponentModel.ISupportInitialize)(this.iconBox)).EndInit();
    217229      this.ResumeLayout(false);
    218230
     
    233245    private System.Windows.Forms.ContextMenuStrip executionContextConextMenu;
    234246    private System.Windows.Forms.ToolStripMenuItem showValueToolStripMenuItem;
     247    private System.Windows.Forms.PictureBox iconBox;
    235248  }
    236249}
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperationContentView.cs

    r5124 r5146  
    5050        scopeTreeView.Nodes.Clear();
    5151        executionContextTreeView.Nodes.Clear();
     52        iconBox.Image = null;
    5253      } else {
    5354        nameTextBox.Text = Content.Name;
    5455        UpdateScopeTree();
    5556        UpdateExecutionContext();
     57        iconBox.Image = Content.Icon;
    5658      }
    5759    }
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTraceView.cs

    r5117 r5146  
    2121
    2222using System;
     23using System.Drawing;
    2324using System.Windows.Forms;
    2425using HeuristicLab.Collections;
     
    7778      listView.SmallImageList.Images.Add(VS2008ImageLibrary.Method);
    7879      listView.SmallImageList.Images.Add(VS2008ImageLibrary.Module);
     80      listView.SmallImageList.Images.Add(VS2008ImageLibrary.BreakpointActive);
    7981      foreach (var item in Content) {
    8082        var viewItem = listView.Items.Add(item.Name ?? item.ItemName);
     
    8385          Utils.Wrap(item.Description, 60));
    8486        viewItem.Tag = item;
    85         viewItem.ImageIndex = item is CombinedOperator ? 1 : 0;
     87        if (item.Breakpoint) {
     88          viewItem.ForeColor = Color.Red;
     89          viewItem.ImageIndex = 2;
     90        } else {
     91          viewItem.ImageIndex = item is CombinedOperator ? 1 : 0;
     92        }
    8693      }
    8794      if (listView.Items.Count > 0) {
Note: See TracChangeset for help on using the changeset viewer.