Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
 /// <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);
     }
 }
Exemplo n.º 3
0
        /// <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;
        }
Exemplo n.º 4
0
 /// <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);
     }
 }
Exemplo n.º 5
0
        /// <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;
            }
        }
Exemplo n.º 6
0
        /// <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;
        }
Exemplo n.º 7
0
        /// <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);
        }
Exemplo n.º 8
0
        /// <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;
        }
Exemplo n.º 9
0
        /// <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;
        }
Exemplo n.º 10
0
 /// <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);
 }
Exemplo n.º 11
0
 /// <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);
 }
Exemplo n.º 12
0
 /// <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);
 }
Exemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LinkCell"/> class.
 /// </summary>
 protected LinkCell()
 {
     VisualModel = VisualModels.Common.LinkStyle;
     BehaviorModels.Add(BehaviorModel.CursorBehaviorModel.Default);
 }
Exemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ButtonCell"/> class.
 /// </summary>
 protected ButtonCell()
 {
     BehaviorModels.Add(BehaviorModel.ButtonBehaviorModel.Default);
     VisualModel = VisualModels.Header.Default;
 }