Changeset 737 for trunk/sources/HeuristicLab.Data/ArrayDataBaseView.cs
- Timestamp:
- 11/12/08 13:10:09 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/ArrayDataBaseView.cs
r344 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="ArrayDataBase"/>. 34 /// </summary> 32 35 public partial class ArrayDataBaseView : ViewBase { 36 /// <summary> 37 /// Gets or sets the instance of the array to represent. 38 /// </summary> 39 /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>. 40 /// No own data storage present.</remarks> 33 41 public ArrayDataBase ArrayDataBase { 34 42 get { return (ArrayDataBase)Item; } … … 36 44 } 37 45 46 /// <summary> 47 /// Initializes a new instance of <see cref="ArrayDataBaseView"/>. 48 /// </summary> 38 49 public ArrayDataBaseView() { 39 50 InitializeComponent(); 40 51 } 41 52 53 /// <summary> 54 /// Removes the eventhandler from the underlying <see cref="ArrayDataBase"/>. 55 /// </summary> 56 /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>. 57 /// </remarks> 42 58 protected override void RemoveItemEvents() { 43 59 ArrayDataBase.Changed -= new EventHandler(ArrayDataBase_Changed); 44 60 base.RemoveItemEvents(); 45 61 } 62 /// <summary> 63 /// Adds an eventhandler to the underlying <see cref="ArrayDataBase"/>. 64 /// </summary> 65 /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>. 66 /// </remarks> 46 67 protected override void AddItemEvents() { 47 68 base.AddItemEvents(); … … 49 70 } 50 71 72 /// <summary> 73 /// Validates the given data. 74 /// <note type="caution"> Needs to be overridden in each inherited class!</note> 75 /// </summary> 76 /// <exception cref="InvalidOperationException">Thrown when method is not 77 /// overridden in inherited class.</exception> 78 /// <param name="element">The data to validate.</param> 79 /// <returns><c>true</c> if the data is valid, <c>false</c> otherwise.</returns> 51 80 protected virtual bool ValidateData(string element) { 52 81 throw new InvalidOperationException("ValidateData has to be overridden in each inherited class"); 53 82 } 83 /// <summary> 84 /// Replaces an element at the given <paramref name="index"/> 85 /// with the given <paramref name="element"/>. 86 /// <note type="caution"> Needs to be overridden in each inherited class!</note> 87 /// </summary> 88 /// <exception cref="InvalidOperationException">Thrown when method is not 89 /// overridden in inherited class.</exception> 90 /// <param name="index">The position where to substitute the element.</param> 91 /// <param name="element">The element to insert.</param> 54 92 protected virtual void SetArrayElement(int index, string element) { 55 93 throw new InvalidOperationException("SetArrayElement has to be overridden in each inherited class"); 56 94 } 57 95 96 /// <summary> 97 /// Updates all controls and the elements of the table with the latest values. 98 /// </summary> 58 99 protected override void UpdateControls() { 59 100 base.UpdateControls(); … … 90 131 } 91 132 133 /// <summary> 134 /// Creates a new array having the specified number (<paramref name="newLength"/>) of elements of the 135 /// current instance (starting from the beginning). 136 /// </summary> 137 /// <param name="newLength">The size/number of elements of the new array.</param> 92 138 private void CreateAndCopyArray(int newLength) { 93 139 Array newArray = Array.CreateInstance(ArrayDataBase.Data.GetType().GetElementType(), newLength);
Note: See TracChangeset
for help on using the changeset viewer.