Changeset 3430 for trunk/sources/HeuristicLab.Data.Views
- Timestamp:
- 04/20/10 02:02:39 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Data.Views/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/BoolValueView.cs
r3362 r3430 32 32 get { return (BoolValue)base.Content; } 33 33 set { base.Content = value; } 34 } 35 36 public override bool ReadOnly { 37 get { 38 if ((Content != null) && Content.ReadOnly) return true; 39 return base.ReadOnly; 40 } 41 set { base.ReadOnly = value; } 34 42 } 35 43 … … 82 90 83 91 private void valueCheckBox_CheckedChanged(object sender, EventArgs e) { 84 Content.Value = valueCheckBox.Checked;92 if (!Content.ReadOnly) Content.Value = valueCheckBox.Checked; 85 93 } 86 94 } -
trunk/sources/HeuristicLab.Data.Views/3.3/ComparisonView.cs
r3362 r3430 32 32 get { return (Comparison)base.Content; } 33 33 set { base.Content = value; } 34 } 35 36 public override bool ReadOnly { 37 get { 38 if ((Content != null) && Content.ReadOnly) return true; 39 return base.ReadOnly; 40 } 41 set { base.ReadOnly = value; } 34 42 } 35 43 … … 82 90 83 91 private void valueComboBox_SelectedIndexChanged(object sender, EventArgs e) { 84 if ( Content != null) Content.Value = (ComparisonType)valueComboBox.SelectedItem;92 if ((Content != null) && !Content.ReadOnly) Content.Value = (ComparisonType)valueComboBox.SelectedItem; 85 93 } 86 94 } -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayView.cs
r3362 r3430 35 35 get { return (IStringConvertibleArray)base.Content; } 36 36 set { base.Content = value; } 37 } 38 39 public override bool ReadOnly { 40 get { 41 if ((Content != null) && Content.ReadOnly) return true; 42 return base.ReadOnly; 43 } 44 set { base.ReadOnly = value; } 37 45 } 38 46 … … 133 141 } 134 142 private void lengthTextBox_Validated(object sender, EventArgs e) { 135 Content.Length = int.Parse(lengthTextBox.Text);143 if (!Content.ReadOnly) Content.Length = int.Parse(lengthTextBox.Text); 136 144 errorProvider.SetError(lengthTextBox, string.Empty); 137 145 } -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r3362 r3430 34 34 [Content(typeof(IStringConvertibleMatrix), true)] 35 35 public partial class StringConvertibleMatrixView : AsynchronousContentView { 36 private int[] virtualRowIndizes; 37 private List<KeyValuePair<int, SortOrder>> sortedColumnIndizes; 38 private RowComparer rowComparer; 39 36 40 public new IStringConvertibleMatrix Content { 37 41 get { return (IStringConvertibleMatrix)base.Content; } … … 39 43 } 40 44 41 private int[] virtualRowIndizes; 42 private List<KeyValuePair<int, SortOrder>> sortedColumnIndizes; 43 RowComparer rowComparer; 45 public override bool ReadOnly { 46 get { 47 if ((Content != null) && Content.ReadOnly) return true; 48 return base.ReadOnly; 49 } 50 set { base.ReadOnly = value; } 51 } 44 52 45 53 public StringConvertibleMatrixView() { … … 66 74 base.DeregisterContentEvents(); 67 75 } 68 69 76 protected override void RegisterContentEvents() { 70 77 base.RegisterContentEvents(); … … 75 82 Content.ReadOnlyViewChanged += new EventHandler(Content_ReadOnlyViewChanged); 76 83 } 77 78 84 79 85 protected override void OnContentChanged() { … … 204 210 } 205 211 private void rowsTextBox_Validated(object sender, EventArgs e) { 206 int textBoxValue = int.Parse(rowsTextBox.Text); 207 if (textBoxValue != Content.Rows) 208 Content.Rows = textBoxValue; 212 if (!Content.ReadOnly) Content.Rows = int.Parse(rowsTextBox.Text); 209 213 errorProvider.SetError(rowsTextBox, string.Empty); 210 214 } … … 226 230 } 227 231 private void columnsTextBox_Validated(object sender, EventArgs e) { 228 int textBoxValue = int.Parse(columnsTextBox.Text); 229 if (textBoxValue != Content.Columns) 230 Content.Columns = textBoxValue; 232 if (!Content.ReadOnly) Content.Columns = int.Parse(columnsTextBox.Text); 231 233 errorProvider.SetError(columnsTextBox, string.Empty); 232 234 } -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleValueView.cs
r3402 r3430 33 33 get { return (IStringConvertibleValue)base.Content; } 34 34 set { base.Content = value; } 35 } 36 37 public override bool ReadOnly { 38 get { 39 if ((Content != null) && Content.ReadOnly) return true; 40 return base.ReadOnly; 41 } 42 set { base.ReadOnly = value; } 35 43 } 36 44 … … 103 111 } 104 112 private void valueTextBox_Validated(object sender, EventArgs e) { 105 Content.SetValue(valueTextBox.Text);113 if (!Content.ReadOnly) Content.SetValue(valueTextBox.Text); 106 114 errorProvider.SetError(valueTextBox, string.Empty); 107 115 valueTextBox.Text = Content.GetValue();
Note: See TracChangeset
for help on using the changeset viewer.