/// <summary> /// Initializes a new instance of the <see cref="Cell"/> class. /// </summary> /// <param name="value">The value of the cell</param> public Cell(object value) { Value = value; VisualModel = VisualModels.Common.Default; BehaviorModels.Add(BehaviorModel.ToolTipTextBehaviorModel.Default); BehaviorModels.Add(BehaviorModel.CursorBehaviorModel.Default); BehaviorModels.Add(BehaviorModel.ContextMenuBehaviorModel.Default); }
/// <summary> /// Initializes a new instance of the <see cref="HeaderCell"/> class. /// </summary> /// <param name="p_VisualModel">The visual model.</param> /// <param name="p_HeaderBehavior">The header behavior.</param> protected HeaderCell(VisualModels.IVisualModel p_VisualModel, BehaviorModel.IBehaviorModel p_HeaderBehavior) { VisualModel = p_VisualModel; if (p_HeaderBehavior != null) { BehaviorModels.Add(p_HeaderBehavior); } }
/// <summary> /// Initializes a new instance of the <see cref="LinkCell"/> class. /// </summary> /// <param name="value">The value.</param> public LinkCell(object value) : base(value) { VisualModel = VisualModels.Common.LinkStyle; BehaviorModels.Add(BehaviorModel.CursorBehaviorModel.Default); Cursor = System.Windows.Forms.Cursors.Hand; }
/// <summary> /// Initializes a new instance of the <see cref="HeaderCell"/> class. /// </summary> /// <param name="value">The value.</param> /// <param name="p_VisualModel">The visual model.</param> /// <param name="p_HeaderBehavior">The header behavior.</param> public HeaderCell(object value, VisualModels.IVisualModel p_VisualModel, BehaviorModel.IBehaviorModel p_HeaderBehavior) : base(value) { VisualModel = p_VisualModel; if (p_HeaderBehavior != null) { BehaviorModels.Add(p_HeaderBehavior); } }
/// <summary> /// Initializes a new instance of the <see cref="ButtonCell"/> class. /// </summary> /// <param name="value">The value.</param> /// <param name="p_Click">The click.</param> public ButtonCell(object value, PositionEventHandler p_Click) : base(value) { BehaviorModels.Add(BehaviorModel.ButtonBehaviorModel.Default); VisualModel = VisualModels.Header.Default; if (p_Click != null) { Click += p_Click; } }
/// <summary> /// Initializes a new instance of the <see cref="ExpandCell"/> class. /// </summary> /// <param name="p_expand">if set to <c>true</c> cell is expanded.</param> public ExpandCell(bool p_expand) { childCells = new List <ICellVirtual>(); ExpandedCell = false; DataModel = new DataModels.DataModelBase(typeof(bool)); VisualModel = VisualModels.ExpandCell.Default; BehaviorModels.Add(BehaviorModel.ExpandCellBehaviorModel.Default); Value = p_expand; IsLastExpandedCell = false; }
/// <summary> /// Initializes a new instance of the <see cref="CellVirtual"/> class. /// </summary> /// <param name="p_Editor">Formatters used for string conversion, if null is used a shared default formatter.</param> /// <param name="p_VisualModel">Visual properties of the current cell, if null is used a shared default properties.</param> protected CellVirtual(DataModels.IDataModel p_Editor, VisualModels.IVisualModel p_VisualModel) { DataModel = p_Editor; if (p_VisualModel != null) { VisualModel = p_VisualModel; } else { VisualModel = VisualModels.Common.Default; } BehaviorModels.Add(BehaviorModel.CommonBehaviorModel.Default); }
/// <summary> /// Construct a BitmapCell class with caption and align checkbox in the MiddleLeft /// </summary> /// <param name="p_Caption">The caption.</param> /// <param name="p_InitialValue">The initial value.</param> public BitmapCell(string p_Caption, Bitmap p_InitialValue) { captionText = p_Caption; DataModel = new DataModels.DataModelBase(typeof(Image)); if (p_Caption == null || p_Caption.Length <= 0) { VisualModel = VisualModels.BitmapCell.Default; } else { VisualModel = VisualModels.BitmapCell.MiddleLeftAlign; } BehaviorModels.Add(BehaviorModel.BitmapCellBehaviorModel.Default); Value = p_InitialValue; IsLastExpandedCell = false; }
/// <summary> /// Initializes a new instance of the <see cref="CheckBoxCell"/> class. /// </summary> /// <param name="p_Caption">The caption.</param> /// <param name="p_InitialValue">if set to <c>true</c> initial value is true.</param> /// <remarks> /// Construct a CellCheckBox class with caption and align checkbox in the MiddleLeft /// </remarks> public CheckBoxCell(string p_Caption, bool p_InitialValue) { caption = p_Caption; DataModel = new DataModels.DataModelBase(typeof(bool)); if (p_Caption == null || p_Caption.Length <= 0) { VisualModel = VisualModels.CheckBox.Default; } else { VisualModel = VisualModels.CheckBox.MiddleLeftAlign; } BehaviorModels.Add(BehaviorModel.CheckBoxBehaviorModel.Default); Value = p_InitialValue; IsLastExpandedCell = false; EnableEdit = true; EditableMode = EditableModes.None; }
/// <summary> /// Initializes a new instance of the <see cref="ExpandCell"/> class. /// </summary> protected ExpandCell() { DataModel = new DataModels.DataModelBase(typeof(bool)); VisualModel = VisualModels.ExpandCell.Default; BehaviorModels.Add(BehaviorModel.ExpandCellBehaviorModel.Default); }
/// <summary> /// Initializes a new instance of the <see cref="BitmapCell"/> class. /// </summary> protected BitmapCell() { DataModel = new DataModels.DataModelBase(typeof(Image)); VisualModel = VisualModels.BitmapCell.Default; BehaviorModels.Add(BehaviorModel.BitmapCellBehaviorModel.Default); }
/// <summary> /// Initializes a new instance of the <see cref="CheckBoxCell"/> class. /// </summary> protected CheckBoxCell() { DataModel = new DataModels.DataModelBase(typeof(bool)); VisualModel = VisualModels.CheckBox.Default; BehaviorModels.Add(BehaviorModel.CheckBoxBehaviorModel.Default); }
/// <summary> /// Initializes a new instance of the <see cref="LinkCell"/> class. /// </summary> protected LinkCell() { VisualModel = VisualModels.Common.LinkStyle; BehaviorModels.Add(BehaviorModel.CursorBehaviorModel.Default); }
/// <summary> /// Initializes a new instance of the <see cref="ButtonCell"/> class. /// </summary> protected ButtonCell() { BehaviorModels.Add(BehaviorModel.ButtonBehaviorModel.Default); VisualModel = VisualModels.Header.Default; }