Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Button"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXButton(IDirectXControlHost controlHost, DXControl parent)
     : base(controlHost, parent)
 {
     this.ForeColor  = Color.White;
     this.BackColor  = Color.LightGray;
     this.BackColor2 = Color.DarkSlateGray;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXListBox"/> control.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXListBox(IDirectXControlHost controlHost, DXControl parent)
     : base(controlHost, parent)
 {
     this.BackColor  = Color.White;
     this.BackColor2 = Color.LightGray;
     this.ForeColor  = Color.Black;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXMenuItem"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXMenuItem(IDirectXControlHost controlHost, DXControl parent)
     : base(controlHost, parent)
 {
     this.parentMenu = (DXMenu)parent;
     this.BackColor  = Color.DarkGray;
     this.BackColor2 = Color.DarkGray;
     this.ForeColor  = Color.White;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXComboBox"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXComboBox(IDirectXControlHost controlHost, DXControl parent)
     : base(controlHost, parent)
 {
     this.BackColor = Color.White;
     this.ForeColor = Color.Black;
     this.scrollbar = new DXScrollBar(controlHost, parent);
     this.ControlHost.MouseActionPerformed += new EventHandler <DXMouseEventArgs>(ControlHost_MouseActionPerformed);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXMenu"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXMenu(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent)
 {
     this.menuItems = new DXControlCollection();
     this.menuItems.CollectionChanged += new CollectionChangeEventHandler(MenuItemsCollectionChanged);
     this.BackColor  = Color.Tan;
     this.BackColor2 = Color.Tan;
     this.ForeColor  = Color.White;
 }
Ejemplo n.º 6
0
        void MenuItemsCollectionChanged(object sender, CollectionChangeEventArgs e)
        {
            int height = this.menuItems.Count * 32;

            this.Height = height;
            DXControl ctl = (DXControl)e.Element;

            if (e.Action == CollectionChangeAction.Add)
            {
                int width = CalcItemWidth(ctl.Text);
                if (width > this.Width)
                {
                    this.Width = width;
                }
                ctl.Location = new Point(0, this.Height - 32);
                ctl.Size     = new Size(this.Width, 32);
                ctl.Parent   = this;
                this.Controls.Add(ctl);
            }
            else
            {
                this.Controls.Remove(ctl);
            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXScrollBar"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXScrollBar(IDirectXControlHost controlHost, DXControl parent)
     : base(controlHost, parent)
 {
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXContainerControl"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXContainerControl(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent)
 {
     this.controls = new DXControlCollection();
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXControl"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXControl(IDirectXControlHost controlHost, DXControl parent) : this(controlHost)
 {
     this.parent = parent;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXCheckBox"/> control.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXCheckBox(IDirectXControlHost controlHost, DXControl parent) : base(controlHost, parent)
 {
     this.ForeColor  = SystemColors.ControlText;
     this.textFormat = DrawStringFormat.Left;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXLinkLabel"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXLinkLabel(IDirectXControlHost controlHost, DXControl parent)
     : base(controlHost, parent)
 {
     this.ForeColor  = Color.Blue;
     this.hoverColor = Color.Red;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXListControl"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 protected DXListControl(IDirectXControlHost controlHost, DXControl parent)
     : base(controlHost, parent)
 {
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXLabel"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXLabel(IDirectXControlHost controlHost, DXControl parent)
     : base(controlHost, parent)
 {
     this.ForeColor     = Color.White;
     this.TextAlignment = TextAlign.Left;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DXPanel"/> class.
 /// </summary>
 /// <param name="controlHost"></param>
 /// <param name="parent"></param>
 public DXPanel(IDirectXControlHost controlHost, DXControl parent)
     : base(controlHost, parent)
 {
     InitializeComponent();
 }