Changeset 4909 for branches/HeuristicLab.DebugEngine/DebugEngineView.cs
- Timestamp:
- 11/23/10 15:03:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DebugEngine/DebugEngineView.cs
r4904 r4909 58 58 protected override void DeregisterContentEvents() { 59 59 Content.CurrentOperationChanged -= new EventHandler<OperationChangedEventArgs>(Content_CurrentOperationChanged); 60 Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged);61 60 Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged); 62 61 base.DeregisterContentEvents(); … … 69 68 protected override void RegisterContentEvents() { 70 69 base.RegisterContentEvents(); 71 Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged);72 70 Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged); 73 71 Content.CurrentOperationChanged += new EventHandler<OperationChangedEventArgs>(Content_CurrentOperationChanged); … … 81 79 base.OnContentChanged(); 82 80 if (Content == null) { 83 logView.Content = null;84 executionTimeTextBox.Text = "-";85 81 executionStackView.Content = null; 82 operatorTraceView.Content = null; 86 83 operationContentView.Content = null; 87 84 } else { 88 logView.Content = Content.Log;89 executionTimeTextBox.Text = Content.ExecutionTime.ToString();90 85 executionStackView.Content = Content.ExecutionStack; 86 operatorTraceView.Content = Content.OperatorTrace; 91 87 operationContentView.Content = new OperationContent(Content.CurrentOperation); 92 88 } … … 96 92 base.SetEnabledStateOfControls(); 97 93 if (Content == null) { 98 logView.Enabled = false;99 executionTimeTextBox.Enabled = false;100 94 stepButton.Enabled = false; 95 refreshButton.Enabled = false; 101 96 } else { 102 logView.Enabled = true;103 executionTimeTextBox.Enabled = true;104 97 stepButton.Enabled = Content.CanContinue; 98 refreshButton.Enabled = Content.CurrentAtomicOperation != null; 105 99 } 106 100 } … … 108 102 #endregion 109 103 110 protected virtual void Content_ExecutionTimeChanged(object sender, EventArgs e) {111 if (InvokeRequired)112 Invoke(new EventHandler(Content_ExecutionTimeChanged), sender, e);113 else114 executionTimeTextBox.Text = Content == null ? "-" : Content.ExecutionTime.ToString();115 }116 117 104 void Content_ExecutionStateChanged(object sender, EventArgs e) { 118 if (InvokeRequired) 105 if (InvokeRequired) { 119 106 Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e); 120 else {107 } else { 121 108 switch (Content.ExecutionState) { 122 109 case ExecutionState.Started: 123 110 executionStackView.SuspendUpdate(); 124 logView.Content = null; 125 operatorTraceView.Content = null; 111 operatorTraceView.SuspendUpdate(); 126 112 break; 127 113 default: 128 logView.Content = Content.Log;129 114 executionStackView.ResumeUpdate(); 130 115 operationContentView.Content = new OperationContent(Content.CurrentOperation); 131 operatorTraceView. Content = Content.OperatorTrace;116 operatorTraceView.ResumeUpdate(); 132 117 break; 133 118 } … … 140 125 Invoke(new EventHandler<OperationChangedEventArgs>(Content_CurrentOperationChanged), sender, e); 141 126 } else { 127 142 128 } 143 129 } 144 130 145 131 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); 149 133 } 150 134
Note: See TracChangeset
for help on using the changeset viewer.