Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/16/10 12:19:54 (13 years ago)
Author:
epitzer
Message:
  • fixed truncation of bold text in TreeView
  • changed "show actual value" initial caps
  • select node on right click
  • fixed margins
  • include actual name for parameters
  • remove unnecessary labels

(#47)

Location:
trunk/sources/HeuristicLab.DebugEngine/3.3
Files:
4 edited

Legend:

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

    r5114 r5116  
    4747      this.components = new System.ComponentModel.Container();
    4848      this.treeView = new System.Windows.Forms.TreeView();
     49      this.imageList = new System.Windows.Forms.ImageList(this.components);
    4950      this.groupBox = new System.Windows.Forms.GroupBox();
    50       this.imageList = new System.Windows.Forms.ImageList(this.components);
    5151      this.groupBox.SuspendLayout();
    5252      this.SuspendLayout();
     
    5454      // treeView
    5555      //
    56       this.treeView.Dock = System.Windows.Forms.DockStyle.Fill;
     56      this.treeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     57            | System.Windows.Forms.AnchorStyles.Left)
     58            | System.Windows.Forms.AnchorStyles.Right)));
    5759      this.treeView.ImageIndex = 0;
    5860      this.treeView.ImageList = this.imageList;
    59       this.treeView.Location = new System.Drawing.Point(3, 16);
     61      this.treeView.Location = new System.Drawing.Point(6, 19);
    6062      this.treeView.Name = "treeView";
    6163      this.treeView.SelectedImageIndex = 0;
    6264      this.treeView.ShowNodeToolTips = true;
    63       this.treeView.Size = new System.Drawing.Size(303, 261);
     65      this.treeView.Size = new System.Drawing.Size(297, 255);
    6466      this.treeView.TabIndex = 0;
    6567      this.treeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView_NodeMouseDoubleClick);
     68      //
     69      // imageList
     70      //
     71      this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
     72      this.imageList.ImageSize = new System.Drawing.Size(16, 16);
     73      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
    6674      //
    6775      // groupBox
     
    7583      this.groupBox.TabStop = false;
    7684      this.groupBox.Text = "Execution Stack";
    77       //
    78       // imageList
    79       //
    80       this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
    81       this.imageList.ImageSize = new System.Drawing.Size(16, 16);
    82       this.imageList.TransparentColor = System.Drawing.Color.Transparent;
    8385      //
    8486      // ExecutionStackView
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperationContentView.Designer.cs

    r5114 r5116  
    5050      this.executionContextGroupBox = new System.Windows.Forms.GroupBox();
    5151      this.executionContextTreeView = new System.Windows.Forms.TreeView();
     52      this.executionContextConextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
     53      this.showValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    5254      this.executionContextImageList = new System.Windows.Forms.ImageList(this.components);
    5355      this.scopeGroupBox = new System.Windows.Forms.GroupBox();
     
    5557      this.scopeImageList = new System.Windows.Forms.ImageList(this.components);
    5658      this.nameTextBox = new System.Windows.Forms.TextBox();
    57       this.contextLabel = new System.Windows.Forms.Label();
    58       this.atomicLabel = new System.Windows.Forms.Label();
    59       this.collectionLabel = new System.Windows.Forms.Label();
    6059      this.parametersImageList = new System.Windows.Forms.ImageList(this.components);
    61       this.executionContextConextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
    62       this.showValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    6360      this.groupBox.SuspendLayout();
    6461      this.splitContainer1.Panel1.SuspendLayout();
     
    6663      this.splitContainer1.SuspendLayout();
    6764      this.executionContextGroupBox.SuspendLayout();
     65      this.executionContextConextMenu.SuspendLayout();
    6866      this.scopeGroupBox.SuspendLayout();
    69       this.executionContextConextMenu.SuspendLayout();
    7067      this.SuspendLayout();
    7168      //
     
    7471      this.groupBox.Controls.Add(this.splitContainer1);
    7572      this.groupBox.Controls.Add(this.nameTextBox);
    76       this.groupBox.Controls.Add(this.contextLabel);
    77       this.groupBox.Controls.Add(this.atomicLabel);
    78       this.groupBox.Controls.Add(this.collectionLabel);
    7973      this.groupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    8074      this.groupBox.Location = new System.Drawing.Point(0, 0);
     
    117111      // executionContextTreeView
    118112      //
     113      this.executionContextTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     114            | System.Windows.Forms.AnchorStyles.Left)
     115            | System.Windows.Forms.AnchorStyles.Right)));
    119116      this.executionContextTreeView.ContextMenuStrip = this.executionContextConextMenu;
    120       this.executionContextTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
    121117      this.executionContextTreeView.ImageIndex = 0;
    122118      this.executionContextTreeView.ImageList = this.executionContextImageList;
    123       this.executionContextTreeView.Location = new System.Drawing.Point(3, 16);
     119      this.executionContextTreeView.Location = new System.Drawing.Point(6, 19);
    124120      this.executionContextTreeView.Name = "executionContextTreeView";
    125121      this.executionContextTreeView.SelectedImageIndex = 0;
    126122      this.executionContextTreeView.ShowNodeToolTips = true;
    127       this.executionContextTreeView.Size = new System.Drawing.Size(236, 342);
     123      this.executionContextTreeView.Size = new System.Drawing.Size(230, 336);
    128124      this.executionContextTreeView.TabIndex = 0;
    129125      this.executionContextTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.executionContextTreeView_NodeMouseClick);
    130126      this.executionContextTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.executionContextTreeView_NodeMouseDoubleClick);
     127      this.executionContextTreeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.executionContextTreeView_MouseDown);
     128      //
     129      // executionContextConextMenu
     130      //
     131      this.executionContextConextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     132            this.showValueToolStripMenuItem});
     133      this.executionContextConextMenu.Name = "executionContextConextMenu";
     134      this.executionContextConextMenu.Size = new System.Drawing.Size(173, 26);
     135      this.executionContextConextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.executionContextConextMenu_Opening);
     136      //
     137      // showValueToolStripMenuItem
     138      //
     139      this.showValueToolStripMenuItem.Name = "showValueToolStripMenuItem";
     140      this.showValueToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
     141      this.showValueToolStripMenuItem.Text = "Show Actual Value";
     142      this.showValueToolStripMenuItem.ToolTipText = "Try to obtain the parameter\'s actual value in the current execution context and o" +
     143    "pen it in a new view.";
     144      this.showValueToolStripMenuItem.Click += new System.EventHandler(this.ShowValue_Click);
    131145      //
    132146      // executionContextImageList
     
    149163      // scopeTreeView
    150164      //
    151       this.scopeTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
     165      this.scopeTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     166            | System.Windows.Forms.AnchorStyles.Left)
     167            | System.Windows.Forms.AnchorStyles.Right)));
    152168      this.scopeTreeView.ImageIndex = 0;
    153169      this.scopeTreeView.ImageList = this.scopeImageList;
    154       this.scopeTreeView.Location = new System.Drawing.Point(3, 16);
     170      this.scopeTreeView.Location = new System.Drawing.Point(6, 19);
    155171      this.scopeTreeView.Name = "scopeTreeView";
    156172      this.scopeTreeView.SelectedImageIndex = 0;
    157173      this.scopeTreeView.ShowNodeToolTips = true;
    158       this.scopeTreeView.Size = new System.Drawing.Size(299, 342);
     174      this.scopeTreeView.Size = new System.Drawing.Size(293, 336);
    159175      this.scopeTreeView.TabIndex = 0;
    160176      this.scopeTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.scopeTreeView_NodeMouseDoubleClick);
     
    174190      this.nameTextBox.Name = "nameTextBox";
    175191      this.nameTextBox.ReadOnly = true;
    176       this.nameTextBox.Size = new System.Drawing.Size(395, 20);
     192      this.nameTextBox.Size = new System.Drawing.Size(551, 20);
    177193      this.nameTextBox.TabIndex = 3;
    178194      this.nameTextBox.DoubleClick += new System.EventHandler(this.nameTextBox_DoubleClick);
    179       //
    180       // contextLabel
    181       //
    182       this.contextLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    183       this.contextLabel.AutoSize = true;
    184       this.contextLabel.ForeColor = System.Drawing.SystemColors.ControlDark;
    185       this.contextLabel.Location = new System.Drawing.Point(407, 22);
    186       this.contextLabel.Name = "contextLabel";
    187       this.contextLabel.Size = new System.Drawing.Size(43, 13);
    188       this.contextLabel.TabIndex = 2;
    189       this.contextLabel.Text = "Context";
    190       //
    191       // atomicLabel
    192       //
    193       this.atomicLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    194       this.atomicLabel.AutoSize = true;
    195       this.atomicLabel.ForeColor = System.Drawing.SystemColors.ControlDark;
    196       this.atomicLabel.Location = new System.Drawing.Point(456, 22);
    197       this.atomicLabel.Name = "atomicLabel";
    198       this.atomicLabel.Size = new System.Drawing.Size(39, 13);
    199       this.atomicLabel.TabIndex = 1;
    200       this.atomicLabel.Text = "Atomic";
    201       //
    202       // collectionLabel
    203       //
    204       this.collectionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    205       this.collectionLabel.AutoSize = true;
    206       this.collectionLabel.ForeColor = System.Drawing.SystemColors.ControlDark;
    207       this.collectionLabel.Location = new System.Drawing.Point(501, 22);
    208       this.collectionLabel.Name = "collectionLabel";
    209       this.collectionLabel.Size = new System.Drawing.Size(53, 13);
    210       this.collectionLabel.TabIndex = 0;
    211       this.collectionLabel.Text = "Collection";
    212195      //
    213196      // parametersImageList
     
    216199      this.parametersImageList.ImageSize = new System.Drawing.Size(16, 16);
    217200      this.parametersImageList.TransparentColor = System.Drawing.Color.Transparent;
    218       //
    219       // executionContextConextMenu
    220       //
    221       this.executionContextConextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    222             this.showValueToolStripMenuItem});
    223       this.executionContextConextMenu.Name = "executionContextConextMenu";
    224       this.executionContextConextMenu.Size = new System.Drawing.Size(169, 48);
    225       this.executionContextConextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.executionContextConextMenu_Opening);
    226       //
    227       // showValueToolStripMenuItem
    228       //
    229       this.showValueToolStripMenuItem.Name = "showValueToolStripMenuItem";
    230       this.showValueToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
    231       this.showValueToolStripMenuItem.Text = "show actual value";
    232       this.showValueToolStripMenuItem.ToolTipText = "Try to obtain the parameter\'s actual value in the current execution context and o" +
    233     "pen it in a new view.";
    234       this.showValueToolStripMenuItem.Click += new System.EventHandler(this.ShowValue_Click);
    235201      //
    236202      // OperationContentView
     
    247213      this.splitContainer1.ResumeLayout(false);
    248214      this.executionContextGroupBox.ResumeLayout(false);
     215      this.executionContextConextMenu.ResumeLayout(false);
    249216      this.scopeGroupBox.ResumeLayout(false);
    250       this.executionContextConextMenu.ResumeLayout(false);
    251217      this.ResumeLayout(false);
    252218
     
    257223    private System.Windows.Forms.GroupBox groupBox;
    258224    private System.Windows.Forms.TextBox nameTextBox;
    259     private System.Windows.Forms.Label contextLabel;
    260     private System.Windows.Forms.Label atomicLabel;
    261     private System.Windows.Forms.Label collectionLabel;
    262225    private System.Windows.Forms.SplitContainer splitContainer1;
    263226    private System.Windows.Forms.TreeView scopeTreeView;
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperationContentView.cs

    r5114 r5116  
    4848      if (Content == null) {
    4949        nameTextBox.Text = "";
    50         contextLabel.ForeColor = SystemColors.ControlDark;
    51         atomicLabel.ForeColor = SystemColors.ControlDark;
    52         collectionLabel.ForeColor = SystemColors.ControlDark;
    5350        scopeTreeView.Nodes.Clear();
    5451        executionContextTreeView.Nodes.Clear();
    5552      } else {
    56         contextLabel.ForeColor = Content.IsContext ? Color.Black : SystemColors.ControlDark;
    57         atomicLabel.ForeColor = Content.IsAtomic ? Color.Black : SystemColors.ControlDark;
    58         collectionLabel.ForeColor = Content.IsCollection ? Color.Black : SystemColors.ControlDark;
    5953        nameTextBox.Text = Content.Name;
    6054        UpdateScopeTree();
     
    6357    }
    6458
    65     private object GetParameterValue(IParameter param, IExecutionContext context) {
     59    private object GetParameterValue(IParameter param, IExecutionContext context, out string actualName) {
    6660      param = (IParameter)param.Clone();
    6761      param.ExecutionContext = context;
     
    7266        value = x.Message;
    7367      }
     68      ILookupParameter lookupParam = param as ILookupParameter;
     69      if (lookupParam != null)
     70        actualName = lookupParam.ActualName;
     71      else
     72        actualName = null;
    7473      return value;
    7574    }
     
    146145      node.SelectedImageIndex = 0;
    147146      foreach (var param in executionContext.Parameters) {
    148         TreeNode paramNode = node.Nodes.Add(string.Format("{0}={1}",
    149           param.Name, GetParameterValue(param, executionContext)));
     147        string actualName = null;
     148        object value = GetParameterValue(param, executionContext, out actualName);
     149        string label = actualName != null && actualName != param.Name ?
     150          string.Format("{0}({1})={2}", param.Name, actualName, value) :
     151          string.Format("{0}={1}", param.Name, value);
     152        TreeNode paramNode = node.Nodes.Add(label);
    150153        paramNode.Tag = param;
    151154        executionContextTreeView.ImageList.Images.Add(param.ItemImage ?? VS2008ImageLibrary.Nothing);
     
    180183    private TreeNode selectedScopeNode = null;
    181184    private void executionContextTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) {
     185      scopeTreeView.BeginUpdate();
    182186      if (selectedScopeNode != null) {
    183187        if (Content.IsAtomic && Content.AtomicOperation.Scope == selectedScopeNode.Tag) {
     
    210214        }
    211215      }
     216      scopeTreeView.EndUpdate();
    212217    }
    213218
     
    234239        return;
    235240      IParameter param = executionContextTreeView.SelectedNode.Tag as IParameter;
     241      string actualName = null;
    236242      if (param != null)
    237         MainFormManager.MainForm.ShowContent(GetParameterValue(param, Content.ExecutionContext) as IContent);
    238     }
    239 
    240     #endregion
     243        MainFormManager.MainForm.ShowContent(GetParameterValue(param, Content.ExecutionContext, out actualName) as IContent);
     244    }
    241245
    242246    private void executionContextConextMenu_Opening(object sender, System.ComponentModel.CancelEventArgs e) {
    243247      IParameter param = executionContextTreeView.SelectedNode.Tag as IParameter;
     248      string actualName = null;
    244249      if (param != null)
    245         showValueToolStripMenuItem.Enabled = GetParameterValue(param, Content.ExecutionContext) is IContent;
     250        showValueToolStripMenuItem.Enabled = GetParameterValue(param, Content.ExecutionContext, out actualName) is IContent;
    246251      else
    247252        e.Cancel = true;
    248253    }
    249254
     255    private void executionContextTreeView_MouseDown(object sender, MouseEventArgs e) {
     256      if (e.Button == System.Windows.Forms.MouseButtons.Right)
     257        executionContextTreeView.SelectedNode = executionContextTreeView.GetNodeAt(e.Location);
     258    }
     259
     260    #endregion
    250261
    251262
  • trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTraceView.Designer.cs

    r5114 r5116  
    6666      // listView
    6767      //
     68      this.listView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     69            | System.Windows.Forms.AnchorStyles.Left)
     70            | System.Windows.Forms.AnchorStyles.Right)));
    6871      this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
    6972            this.listViewColumnHeader});
    70       this.listView.Dock = System.Windows.Forms.DockStyle.Fill;
    7173      this.listView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
    7274      this.listView.HideSelection = false;
    73       this.listView.Location = new System.Drawing.Point(3, 16);
     75      this.listView.Location = new System.Drawing.Point(6, 19);
    7476      this.listView.Name = "listView";
    7577      this.listView.ShowItemToolTips = true;
    76       this.listView.Size = new System.Drawing.Size(146, 470);
     78      this.listView.Size = new System.Drawing.Size(140, 464);
    7779      this.listView.SmallImageList = this.imageList;
    7880      this.listView.TabIndex = 0;
Note: See TracChangeset for help on using the changeset viewer.