Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/23/10 15:03:01 (14 years ago)
Author:
epitzer
Message:

Several GUI improvements (#47)

  • add icons and tool tips
  • add support for suspending the operator trace view
  • faster skipping of stack-only operations
  • remove log view and execution time view
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DebugEngine/DebugEngineView.cs

    r4904 r4909  
    5858    protected override void DeregisterContentEvents() {
    5959      Content.CurrentOperationChanged -= new EventHandler<OperationChangedEventArgs>(Content_CurrentOperationChanged);
    60       Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged);
    6160      Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged);
    6261      base.DeregisterContentEvents();
     
    6968    protected override void RegisterContentEvents() {
    7069      base.RegisterContentEvents();
    71       Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged);
    7270      Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged);
    7371      Content.CurrentOperationChanged += new EventHandler<OperationChangedEventArgs>(Content_CurrentOperationChanged);
     
    8179      base.OnContentChanged();
    8280      if (Content == null) {
    83         logView.Content = null;
    84         executionTimeTextBox.Text = "-";
    8581        executionStackView.Content = null;
     82        operatorTraceView.Content = null;
    8683        operationContentView.Content = null;
    8784      } else {
    88         logView.Content = Content.Log;
    89         executionTimeTextBox.Text = Content.ExecutionTime.ToString();
    9085        executionStackView.Content = Content.ExecutionStack;
     86        operatorTraceView.Content = Content.OperatorTrace;
    9187        operationContentView.Content = new OperationContent(Content.CurrentOperation);
    9288      }
     
    9692      base.SetEnabledStateOfControls();
    9793      if (Content == null) {
    98         logView.Enabled = false;
    99         executionTimeTextBox.Enabled = false;
    10094        stepButton.Enabled = false;
     95        refreshButton.Enabled = false;
    10196      } else {
    102         logView.Enabled = true;
    103         executionTimeTextBox.Enabled = true;
    10497        stepButton.Enabled = Content.CanContinue;
     98        refreshButton.Enabled = Content.CurrentAtomicOperation != null;
    10599      }
    106100    }
     
    108102    #endregion
    109103
    110     protected virtual void Content_ExecutionTimeChanged(object sender, EventArgs e) {
    111       if (InvokeRequired)
    112         Invoke(new EventHandler(Content_ExecutionTimeChanged), sender, e);
    113       else
    114         executionTimeTextBox.Text = Content == null ? "-" : Content.ExecutionTime.ToString();
    115     }
    116 
    117104    void Content_ExecutionStateChanged(object sender, EventArgs e) {
    118       if (InvokeRequired)
     105      if (InvokeRequired) {
    119106        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
    120       else {
     107      } else {
    121108        switch (Content.ExecutionState) {
    122109          case ExecutionState.Started:
    123110            executionStackView.SuspendUpdate();
    124             logView.Content = null;
    125             operatorTraceView.Content = null;
     111            operatorTraceView.SuspendUpdate();
    126112            break;
    127113          default:
    128             logView.Content = Content.Log;
    129114            executionStackView.ResumeUpdate();
    130115            operationContentView.Content = new OperationContent(Content.CurrentOperation);
    131             operatorTraceView.Content = Content.OperatorTrace;
     116            operatorTraceView.ResumeUpdate();
    132117            break;
    133118        }
     
    140125        Invoke(new EventHandler<OperationChangedEventArgs>(Content_CurrentOperationChanged), sender, e);
    141126      } else {
     127
    142128      }
    143129    }
    144130
    145131    private void stepButton_Click(object sender, EventArgs e) {
    146       Content.Step();
    147       while (skipStackOpsCheckBox.Checked && !(Content.CurrentOperation is IAtomicOperation) && Content.CanContinue)
    148         Content.Step();
     132      Content.Step(skipStackOpsCheckBox.Checked);
    149133    }
    150134
Note: See TracChangeset for help on using the changeset viewer.