Changeset 10947
- Timestamp:
- 06/04/14 14:57:45 (10 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/ComparisonFilterView.Designer.cs
r10693 r10947 91 91 this.cbAttr.Location = new System.Drawing.Point(92, 12); 92 92 this.cbAttr.Name = "cbAttr"; 93 this.cbAttr.Size = new System.Drawing.Size(2 47, 21);93 this.cbAttr.Size = new System.Drawing.Size(235, 21); 94 94 this.cbAttr.TabIndex = 3; 95 95 this.cbAttr.SelectedIndexChanged += new System.EventHandler(this.cbAttr_SelectedIndexChanged); … … 103 103 this.cbFilterOperation.Location = new System.Drawing.Point(92, 39); 104 104 this.cbFilterOperation.Name = "cbFilterOperation"; 105 this.cbFilterOperation.Size = new System.Drawing.Size(2 47, 21);105 this.cbFilterOperation.Size = new System.Drawing.Size(235, 21); 106 106 this.cbFilterOperation.TabIndex = 4; 107 107 this.cbFilterOperation.SelectedIndexChanged += new System.EventHandler(this.cbFilterOperation_SelectedIndexChanged); … … 113 113 this.tbFilterData.Location = new System.Drawing.Point(92, 67); 114 114 this.tbFilterData.Name = "tbFilterData"; 115 this.tbFilterData.Size = new System.Drawing.Size(2 47, 20);115 this.tbFilterData.Size = new System.Drawing.Size(235, 20); 116 116 this.tbFilterData.TabIndex = 5; 117 117 this.tbFilterData.Validating += new System.ComponentModel.CancelEventHandler(this.tbFilterData_Validating); -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/ComparisonFilterView.cs
r10735 r10947 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 24 using HeuristicLab.Core; 23 25 using HeuristicLab.Core.Views; 24 using HeuristicLab.Core;25 26 using HeuristicLab.Data; 26 27 using HeuristicLab.DataPreprocessing.Filter; 27 28 using HeuristicLab.MainForm; 28 using System.Collections;29 using System;30 using System.Collections.Generic;31 29 32 30 namespace HeuristicLab.DataPreprocessing.Views { … … 44 42 45 43 46 protected override void OnContentChanged() 47 { 44 protected override void OnContentChanged() { 48 45 base.OnContentChanged(); 49 46 cbAttr.Items.Clear(); //cmbConstraintColumn.Items.Clear(); 50 47 cbFilterOperation.Items.Clear(); //cmbConstraintOperation.Items.Clear(); 51 48 tbFilterData.Text = string.Empty; 52 if (Content != null) 53 { 49 if (Content != null) { 54 50 cbFilterOperation.Items.AddRange(Content.AllowedConstraintOperations.ToArray()); 55 51 if (Content.ConstraintOperation != null) … … 59 55 UpdateColumnComboBox(); 60 56 ReadOnly = Content.Active; 61 if (Content.ConstraintData != null) 62 { 57 if (Content.ConstraintData != null) { 63 58 tbFilterData.Text = Content.ConstraintData.GetValue(); 64 } 65 else 66 { 59 } else { 67 60 this.Content_ConstraintColumnChanged(cbAttr, EventArgs.Empty); // TODO 68 61 } 69 62 } 70 if (Content == null || Content.ConstraintData == null) 71 { 63 if (Content == null || Content.ConstraintData == null) { 72 64 tbFilterData.Text = string.Empty; 73 } 74 else 75 { 65 } else { 76 66 tbFilterData.Text = Content.ConstraintData.GetValue(); 77 67 } 78 68 } 79 69 80 protected virtual void UpdateColumnComboBox() 81 { 70 protected virtual void UpdateColumnComboBox() { 82 71 this.cbAttr.Items.Clear(); 83 if (Content.ConstrainedValue != null) 84 { 72 if (Content.ConstrainedValue != null) { 85 73 this.cbAttr.Items.AddRange(Content.ConstrainedValue.VariableNames.ToArray<string>()); 86 74 //if (!string.IsNullOrEmpty(Content.ConstraintColumn)) … … 89 77 //if (Content.ConstraintColumn != null) 90 78 //{ 91 92 93 94 95 79 cbAttr.SelectedItem = Content.ConstraintColumn; 80 if (Content.ConstraintData != null) 81 tbFilterData.Text = Content.ConstraintData.GetValue(); 82 else 83 this.Content_ConstraintColumnChanged(cbAttr, EventArgs.Empty); 96 84 //} 97 85 } 98 86 } 99 87 100 protected override void RegisterContentEvents() 101 { 88 protected override void RegisterContentEvents() { 102 89 base.RegisterContentEvents(); 103 90 this.Content.ActiveChanged += new EventHandler(Content_ActiveChanged); … … 108 95 } 109 96 110 protected override void DeregisterContentEvents() 111 { 97 protected override void DeregisterContentEvents() { 112 98 base.DeregisterContentEvents(); 113 99 this.Content.ActiveChanged -= new EventHandler(Content_ActiveChanged); … … 118 104 } 119 105 120 protected virtual void Content_ConstrainedValueChanged(object sender, EventArgs e) 121 { 106 protected virtual void Content_ConstrainedValueChanged(object sender, EventArgs e) { 122 107 this.UpdateColumnComboBox(); 123 108 } 124 109 125 private void Content_ConstrainedDataChanged(object sender, EventArgs e) 126 { 110 private void Content_ConstrainedDataChanged(object sender, EventArgs e) { 127 111 if (Content.ConstraintData != null) 128 112 tbFilterData.Text = Content.ConstraintData.GetValue(); … … 131 115 } 132 116 133 protected virtual void Content_ConstraintColumnChanged(object sender, EventArgs e) 134 { 135 if (Content.ConstrainedValue != null) 136 { 137 if (cbAttr.Items.IndexOf(cbAttr.SelectedItem) != Content.ConstraintColumn) 138 { 117 protected virtual void Content_ConstraintColumnChanged(object sender, EventArgs e) { 118 if (Content.ConstrainedValue != null) { 119 if (cbAttr.Items.IndexOf(cbAttr.SelectedItem) != Content.ConstraintColumn) { 139 120 cbAttr.SelectedItem = this.cbAttr.Items[Content.ConstraintColumn]; 140 121 } 141 122 } 142 if (Content.ConstraintData == null) 143 this.Content.ConstraintData = new StringValue(); 123 if (Content.ConstraintData == null) { 124 this.Content.ConstraintData = CreateStringConvertibleValue(cbAttr.SelectedIndex); 125 } 144 126 } 145 127 146 128 147 protected virtual void Content_ComparisonOperationChanged(object sender, EventArgs e) 148 { 129 protected virtual void Content_ComparisonOperationChanged(object sender, EventArgs e) { 149 130 if (Content.ConstraintOperation != (ConstraintOperation)this.cbFilterOperation.SelectedItem) 150 131 this.cbFilterOperation.SelectedItem = Content.ConstraintOperation; 151 132 } 152 133 153 protected override void SetEnabledStateOfControls() 154 { 134 protected override void SetEnabledStateOfControls() { 155 135 base.SetEnabledStateOfControls(); 156 136 /* … … 165 145 } 166 146 167 private void cbAttr_SelectedIndexChanged(object sender, EventArgs e) 168 { 169 if (Content.ConstrainedValue != null) 170 { 147 private void cbAttr_SelectedIndexChanged(object sender, EventArgs e) { 148 if (Content.ConstrainedValue != null) { 171 149 Content.ConstraintColumn = Content.ConstrainedValue.GetColumnIndex(cbAttr.SelectedItem.ToString()); 172 150 } 173 151 } 174 152 175 private void cbFilterOperation_SelectedIndexChanged(object sender, EventArgs e) 176 { 153 private void cbFilterOperation_SelectedIndexChanged(object sender, EventArgs e) { 177 154 Content.ConstraintOperation = (ConstraintOperation)this.cbFilterOperation.SelectedItem; 178 155 } 179 156 180 protected virtual void Content_ActiveChanged(object sender, EventArgs e) 181 { 157 protected virtual void Content_ActiveChanged(object sender, EventArgs e) { 182 158 this.ReadOnly = !Content.Active; 183 159 SetEnabledStateOfControls(); … … 185 161 } 186 162 187 private void tbFilterData_Validated(object sender, EventArgs e) 188 { 189 IStringConvertibleValue value = new StringValue(); 190 value.SetValue(tbFilterData.Text); 191 Content.ConstraintData = value; 163 private void tbFilterData_Validated(object sender, EventArgs e) { 164 IStringConvertibleValue value = CreateStringConvertibleValue(cbAttr.SelectedIndex); 165 value.SetValue(tbFilterData.Text); 166 Content.ConstraintData = value; 192 167 } 193 168 194 private void tbFilterData_Validating(object sender, System.ComponentModel.CancelEventArgs e) 195 { 196 string errorMessage = string.Empty; 197 if (!Content.ConstraintData.Validate(tbFilterData.Text, out errorMessage)) 198 { 199 errorProvider.SetError(tbFilterData, errorMessage); 200 e.Cancel = true; 201 } 202 else 203 errorProvider.Clear(); 169 private IStringConvertibleValue CreateStringConvertibleValue(int columnIndex) { 170 IStringConvertibleValue value; 171 if (Content.ConstrainedValue.IsType<double>(columnIndex)) { 172 value = new DoubleValue(); 173 } else if (Content.ConstrainedValue.IsType<String>(columnIndex)) { 174 value = new StringValue(); 175 } else if (Content.ConstrainedValue.IsType<DateTime>(columnIndex)) { 176 value = new DateTimeValue(); 177 } else { 178 throw new ArgumentException("unsupported type"); 179 } 180 return value; 181 } 182 183 private void tbFilterData_Validating(object sender, System.ComponentModel.CancelEventArgs e) { 184 string errorMessage = string.Empty; 185 if (!Content.ConstraintData.Validate(tbFilterData.Text, out errorMessage)) { 186 errorProvider.SetError(tbFilterData, errorMessage); 187 e.Cancel = true; 188 } else 189 errorProvider.Clear(); 204 190 } 205 191 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/CopyOfStringConvertibleMatrixView.cs
r10916 r10947 104 104 } 105 105 106 // Was private before 107 protected void Sort() { 108 virtualRowIndices = Sort(sortedColumnIndices); 109 UpdateSortGlyph(); 110 UpdateRowHeaders(); 111 dataGridView.Invalidate(); 112 } 113 114 // Was private before 115 protected List<KeyValuePair<int, SortOrder>> sortedColumnIndices; 116 106 117 #region unchanged copied from original - see HeuristicLab.Data.Views.StringConvertibleMatrix 107 118 108 119 protected int[] virtualRowIndices; 109 private List<KeyValuePair<int, SortOrder>> sortedColumnIndices;110 120 private RowComparer rowComparer; 111 121 … … 293 303 private Point[] GetSelectedCellsAsPoints() { 294 304 Point[] points = new Point[dataGridView.SelectedCells.Count]; 295 for (int i = 0; i < dataGridView.SelectedCells.Count; i++) 296 { 305 for (int i = 0; i < dataGridView.SelectedCells.Count; i++) { 297 306 points[i].X = dataGridView.SelectedCells[i].ColumnIndex; 298 307 points[i].Y = dataGridView.SelectedCells[i].RowIndex; … … 487 496 } 488 497 489 private void Sort() {490 virtualRowIndices = Sort(sortedColumnIndices);491 UpdateSortGlyph();492 UpdateRowHeaders();493 dataGridView.Invalidate();494 }495 498 protected virtual int[] Sort(IEnumerable<KeyValuePair<int, SortOrder>> sortedColumns) { 496 499 int[] newSortedIndex = Enumerable.Range(0, Content.Rows).ToArray(); … … 597 600 } 598 601 599 602 600 603 } 601 604 #endregion -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
r10946 r10947 73 73 dataGridView.KeyDown += dataGridView_KeyDown; 74 74 dataGridView.MouseUp += dataGridView_MouseUp; 75 dataGridView.ColumnHeaderMouseClick += dataGridView_ColumnHeaderMouseClick; 75 76 contextMenuCell.Items.Add(ShowHideColumns); 76 77 _highlightedRowIndices = new List<int>(); … … 79 80 } 80 81 82 private void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { 83 searchIterator = null; 84 } 85 81 86 protected override void dataGridView_SelectionChanged(object sender, EventArgs e) { 82 87 if (Content != null) { … … 87 92 return; 88 93 } 89 94 90 95 base.dataGridView_SelectionChanged(sender, e); 91 96 92 97 Content.DataGridLogic.SetSelection(GetSelectedCells()); 93 98 } … … 96 101 97 102 private void dataGridView_MouseUp(object sender, MouseEventArgs e) { 98 if (!updateOnMouseUp) 103 if (!updateOnMouseUp) 99 104 return; 100 105 101 106 updateOnMouseUp = false; 102 107 dataGridView_SelectionChanged(sender, e); 103 } 108 } 104 109 105 110 protected override void OnContentChanged() { … … 250 255 251 256 void findAndReplaceDialog_FindNextEvent(object sender, EventArgs e) { 252 if (searchIterator == null || 253 currentSearchText != findAndReplaceDialog.GetSearchText() || 254 currentComparisonOperation != findAndReplaceDialog.GetComparisonOperation()) { 257 if (searchIterator == null 258 || currentSearchText != findAndReplaceDialog.GetSearchText() 259 || currentComparisonOperation != findAndReplaceDialog.GetComparisonOperation()) { 260 255 261 searchIterator = new FindPreprocessingItemsIterator(FindAll(findAndReplaceDialog.GetSearchText())); 256 262 currentSearchText = findAndReplaceDialog.GetSearchText(); … … 349 355 bool searchInSelection = HightlightedCellsBackground.Values.Sum(list => list.Count) > 1; 350 356 ComparisonOperation comparisonOperation = findAndReplaceDialog.GetComparisonOperation(); 351 var comparisonFilter = new ComparisonFilter(Content.FilterLogic.PreprocessingData, GetConstraintOperation(comparisonOperation), new StringValue(match), true);352 var filters = new List<Filter.IFilter>() { comparisonFilter };353 357 var foundCells = new Dictionary<int, IList<int>>(); 354 358 for (int i = 0; i < Content.FilterLogic.PreprocessingData.Columns; i++) { 355 comparisonFilter.ConstraintColumn = i; 359 var filters = CreateFilters(match, comparisonOperation, i); 360 356 361 bool[] filteredRows = Content.FilterLogic.GetFilterResult(filters, true); 357 362 var foundIndices = new List<int>(); … … 370 375 } 371 376 } 372 return foundCells; 377 return MapToSorting(foundCells); 378 } 379 380 private List<IFilter> CreateFilters(string match, ComparisonOperation comparisonOperation, int columnIndex) { 381 IPreprocessingData preprocessingData = Content.FilterLogic.PreprocessingData; 382 IStringConvertibleValue value; 383 if (preprocessingData.IsType<double>(columnIndex)) { 384 value = new DoubleValue(); 385 } else if (preprocessingData.IsType<String>(columnIndex)) { 386 value = new StringValue(); 387 } else if (preprocessingData.IsType<DateTime>(columnIndex)) { 388 value = new DateTimeValue(); 389 } else { 390 throw new ArgumentException("unsupported type"); 391 } 392 value.SetValue(match); 393 var comparisonFilter = new ComparisonFilter(preprocessingData, GetConstraintOperation(comparisonOperation), value, true); 394 comparisonFilter.ConstraintColumn = columnIndex; 395 return new List<Filter.IFilter>() { comparisonFilter }; 396 } 397 398 private IDictionary<int, IList<int>> MapToSorting(Dictionary<int, IList<int>> foundCells) { 399 if (sortedColumnIndices.Count == 0) { 400 return foundCells; 401 } else { 402 var sortedFoundCells = new Dictionary<int, IList<int>>(); 403 404 var indicesToVirtual = new Dictionary<int, int>(); 405 for (int i = 0; i < virtualRowIndices.Length; ++i) { 406 indicesToVirtual.Add(virtualRowIndices[i], i); 407 } 408 409 foreach (var entry in foundCells) { 410 var cells = new List<int>(); 411 foreach (var cell in entry.Value) { 412 cells.Add(indicesToVirtual[cell]); 413 } 414 cells.Sort(); 415 sortedFoundCells.Add(entry.Key, cells); 416 } 417 return sortedFoundCells; 418 } 373 419 } 374 420 … … 533 579 private void StopReplacing() { 534 580 isReplacing = false; 535 ResumeRepaint(true); 581 ResumeRepaint(true); 536 582 } 537 583 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/Filter/ComparisonFilter.cs
r10785 r10947 20 20 #endregion 21 21 22 using System; 22 23 using System.Drawing; 24 using HeuristicLab.Common; 23 25 using HeuristicLab.Common.Resources; 24 26 using HeuristicLab.Core; 25 using System;26 using System.Collections;27 using HeuristicLab.Common;28 27 using HeuristicLab.Data; 29 using System.Collections.Generic;30 28 31 namespace HeuristicLab.DataPreprocessing.Filter 32 { 33 [Item("ComparisonFilter", "A filter which compares the member of the preprocessing data with the constraint data.")] 34 public class ComparisonFilter : ComparisonConstraint, IFilter 35 { 36 protected ComparisonFilter(bool deserializing) : base(deserializing) { } 29 namespace HeuristicLab.DataPreprocessing.Filter { 30 [Item("ComparisonFilter", "A filter which compares the member of the preprocessing data with the constraint data.")] 31 public class ComparisonFilter : ComparisonConstraint, IFilter { 37 32 38 protected ComparisonFilter(ComparisonFilter original, Cloner cloner) 39 : base(original, cloner) 40 { 41 constraintColumn = original.constraintColumn; 33 34 35 protected ComparisonFilter(bool deserializing) : base(deserializing) { 36 37 } 38 39 protected ComparisonFilter(ComparisonFilter original, Cloner cloner) 40 : base(original, cloner) { 41 constraintColumn = original.constraintColumn; 42 } 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new ComparisonFilter(this, cloner); 45 } 46 47 public ComparisonFilter() : base() { } 48 public ComparisonFilter(IPreprocessingData constrainedValue, ConstraintOperation constraintOperation, object constraintData) 49 : base(constrainedValue, constraintOperation, constraintData) { 50 } 51 52 public ComparisonFilter(IPreprocessingData constrainedValue, ConstraintOperation constraintOperation, object constraintData, bool active) 53 : base(constrainedValue, constraintOperation, constraintData, active) { 54 } 55 56 57 public override string ItemName { 58 get { return "ComparisonFilter"; } 59 } 60 61 public override Image ItemImage { 62 get { return VSImageLibrary.Filter; } 63 } 64 65 public new IPreprocessingData ConstrainedValue { 66 get { return (IPreprocessingData)base.ConstrainedValue; } 67 set { base.ConstrainedValue = value; } 68 } 69 70 public new IStringConvertibleValue ConstraintData { 71 get { return (IStringConvertibleValue)base.ConstraintData; } 72 set { 73 if (!(value is IComparable)) 74 throw new ArgumentException("Only IComparables allowed for ConstraintData"); 75 base.ConstraintData = value; 76 } 77 } 78 79 80 private int constraintColumn; 81 public int ConstraintColumn { 82 get { return constraintColumn; } 83 set { 84 if (ConstrainedValue.Columns < value) 85 throw new ArgumentException("Could not set ConstraintData to not existing column index."); 86 87 if (constraintColumn != value) { 88 constraintColumn = value; 89 this.OnConstraintColumnChanged(); 90 this.OnToStringChanged(); 42 91 } 43 public override IDeepCloneable Clone(Cloner cloner) 44 { 45 return new ComparisonFilter(this, cloner); 92 } 93 } 94 95 96 public new bool[] Check() { 97 bool[] result = new bool[ConstrainedValue.Rows]; 98 99 if (!Active) 100 return result; 101 102 for (int row = 0; row < ConstrainedValue.Rows; ++row) { 103 object item = null; 104 if (ConstrainedValue.IsType<double>(constraintColumn)) { 105 item = new HeuristicLab.Data.DoubleValue(ConstrainedValue.GetCell<double>(ConstraintColumn, row)); 106 } else if (ConstrainedValue.IsType<DateTime>(constraintColumn)) { 107 item = new HeuristicLab.Data.DateTimeValue(ConstrainedValue.GetCell<DateTime>(ConstraintColumn, row)); 108 } else { 109 item = new StringValue(ConstrainedValue.GetCell<string>(ConstraintColumn, row)); 46 110 } 47 111 48 public ComparisonFilter() : base() { } 49 public ComparisonFilter(IPreprocessingData constrainedValue, ConstraintOperation constraintOperation, object constraintData) 50 : base(constrainedValue, constraintOperation, constraintData) 51 { 52 } 112 result[row] = !base.Check(item); 113 } 53 114 54 public ComparisonFilter(IPreprocessingData constrainedValue, ConstraintOperation constraintOperation, object constraintData, bool active) 55 : base(constrainedValue, constraintOperation, constraintData, active) 56 { 57 } 115 return result; 116 } 58 117 118 public new bool[] Check(out string errorMessage) { 119 errorMessage = string.Empty; 120 return this.Check(); 121 } 59 122 60 public override string ItemName 61 { 62 get { return "ComparisonFilter"; } 63 } 123 public event EventHandler ConstraintColumnChanged; 124 protected virtual void OnConstraintColumnChanged() { 125 EventHandler handler = ConstraintColumnChanged; 126 if (handler != null) 127 handler(this, EventArgs.Empty); 128 } 64 129 65 public override Image ItemImage66 {67 get { return VSImageLibrary.Filter; }68 }130 public override string ToString() { 131 string s = string.Empty; 132 if (ConstrainedValue != null) 133 s += ConstrainedValue.GetVariableName(ConstraintColumn) + " "; 69 134 70 public new IPreprocessingData ConstrainedValue 71 { 72 get { return (IPreprocessingData)base.ConstrainedValue; } 73 set { base.ConstrainedValue = value; } 74 } 135 if (ConstraintOperation != null) 136 s += ConstraintOperation.ToString() + " "; 75 137 76 public new IStringConvertibleValue ConstraintData 77 { 78 get { return (IStringConvertibleValue)base.ConstraintData; } 79 set 80 { 81 if (!(value is IComparable)) 82 throw new ArgumentException("Only IComparables allowed for ConstraintData"); 83 base.ConstraintData = value; 84 } 85 } 138 if (ConstraintData != null) 139 s += ConstraintData.ToString(); 140 else 141 s += "null"; 86 142 87 88 private int constraintColumn; 89 public int ConstraintColumn 90 { 91 get { return constraintColumn; } 92 set 93 { 94 if (ConstrainedValue.Columns < value) 95 throw new ArgumentException("Could not set ConstraintData to not existing column index."); 96 97 if (constraintColumn != value) 98 { 99 constraintColumn = value; 100 this.OnConstraintColumnChanged(); 101 this.OnToStringChanged(); 102 } 103 } 104 } 105 106 107 public new bool[] Check() 108 { 109 bool[] result = new bool[ConstrainedValue.Rows]; 110 111 if (!Active) 112 return result; 113 114 for (int row = 0; row < ConstrainedValue.Rows; ++row) 115 { 116 object item = null; 117 if (ConstrainedValue.IsType<double>(constraintColumn)) 118 { 119 item = new StringValue(ConstrainedValue.GetCell<double>(ConstraintColumn, row).ToString()); 120 } 121 else if (ConstrainedValue.IsType<DateTime>(constraintColumn)) 122 { 123 item = new StringValue(ConstrainedValue.GetCell<DateTime>(ConstraintColumn, row).ToString()); 124 } 125 else 126 { 127 item = new StringValue(ConstrainedValue.GetCell<string>(ConstraintColumn, row)); 128 } 129 130 result[row] = !base.Check(item); 131 } 132 133 return result; 134 } 135 136 public new bool[] Check(out string errorMessage) 137 { 138 errorMessage = string.Empty; 139 return this.Check(); 140 } 141 142 public event EventHandler ConstraintColumnChanged; 143 protected virtual void OnConstraintColumnChanged() 144 { 145 EventHandler handler = ConstraintColumnChanged; 146 if (handler != null) 147 handler(this, EventArgs.Empty); 148 } 149 150 public override string ToString() 151 { 152 string s = string.Empty; 153 if (ConstrainedValue != null) 154 s += ConstrainedValue.GetVariableName(ConstraintColumn) + " "; 155 156 if (ConstraintOperation != null) 157 s += ConstraintOperation.ToString() + " "; 158 159 if (ConstraintData != null) 160 s += ConstraintData.ToString(); 161 else 162 s += "null"; 163 164 s += "."; 165 return s; 166 } 143 s += "."; 144 return s; 167 145 } 146 } 168 147 }
Note: See TracChangeset
for help on using the changeset viewer.