Beispiel #1
0
        public ListBox(Manager manager)
            : base(manager)
        {
            Width         = 64;
            Height        = 64;
            MinimumHeight = 16;

            sbVert = new ScrollBar(Manager, EOrientation.Vertical);
            sbVert.Init();
            sbVert.Parent   = this;
            sbVert.Left     = Left + Width - sbVert.Width - Skin.Layers["Control"].ContentMargins.Right;
            sbVert.Top      = Top + Skin.Layers["Control"].ContentMargins.Top;
            sbVert.Height   = Height - Skin.Layers["Control"].ContentMargins.Vertical;
            sbVert.Anchor   = EAnchors.Top | EAnchors.Right | EAnchors.Bottom;
            sbVert.PageSize = 25;
            sbVert.Range    = 1;
            sbVert.PageSize = 1;
            sbVert.StepSize = 10;

            pane = new ClipBox(manager);
            pane.Init();
            pane.Parent   = this;
            pane.Top      = Skin.Layers["Control"].ContentMargins.Top;
            pane.Left     = Skin.Layers["Control"].ContentMargins.Left;
            pane.Width    = Width - sbVert.Width - Skin.Layers["Control"].ContentMargins.Horizontal - 1;
            pane.Height   = Height - Skin.Layers["Control"].ContentMargins.Vertical;
            pane.Anchor   = EAnchors.All;
            pane.Passive  = true;
            pane.CanFocus = false;
            pane.Draw    += new DrawEventHandler(DrawPane);

            CanFocus = true;
            Passive  = false;
        }
Beispiel #2
0
        public Container(Manager manager)
            : base(manager)
        {
            sbVert = new ScrollBar(manager, EOrientation.Vertical);
            sbVert.Init();
            sbVert.Detached      = false;
            sbVert.Anchor        = EAnchors.Top | EAnchors.Right | EAnchors.Bottom;
            sbVert.ValueChanged += new EventHandler(ScrollBarValueChanged);
            sbVert.Range         = 0;
            sbVert.PageSize      = 0;
            sbVert.Value         = 0;
            sbVert.Visible       = false;

            sbHorz = new ScrollBar(manager, EOrientation.Horizontal);
            sbHorz.Init();
            sbHorz.Detached      = false;
            sbHorz.Anchor        = EAnchors.Right | EAnchors.Left | EAnchors.Bottom;
            sbHorz.ValueChanged += new EventHandler(ScrollBarValueChanged);
            sbHorz.Range         = 0;
            sbHorz.PageSize      = 0;
            sbHorz.Value         = 0;
            sbHorz.Visible       = false;

            Add(sbVert, false);
            Add(sbHorz, false);
        }
Beispiel #3
0
        public Console(Manager manager)
            : base(manager)
        {
            Width         = 320;
            Height        = 160;
            MinimumHeight = 64;
            MinimumWidth  = 64;
            CanFocus      = false;

            Resizable = false;
            Movable   = false;

            cmbMain = new ComboBox(manager);
            cmbMain.Init();
            cmbMain.Top           = Height - cmbMain.Height;
            cmbMain.Left          = 0;
            cmbMain.Width         = 128;
            cmbMain.Anchor        = EAnchors.Left | EAnchors.Bottom;
            cmbMain.Detached      = false;
            cmbMain.DrawSelection = false;
            cmbMain.Visible       = channelsVisible;
            Add(cmbMain, false);

            txtMain = new TextBox(manager);
            txtMain.Init();
            txtMain.Top          = Height - txtMain.Height;
            txtMain.Left         = cmbMain.Width + 1;
            txtMain.Anchor       = EAnchors.Left | EAnchors.Bottom | EAnchors.Right;
            txtMain.Detached     = false;
            txtMain.Visible      = textBoxVisible;
            txtMain.KeyDown     += new KeyEventHandler(txtMain_KeyDown);
            txtMain.GamePadDown += new GamePadEventHandler(txtMain_GamePadDown);
            txtMain.FocusGained += new EventHandler(txtMain_FocusGained);
            Add(txtMain, false);

            sbVert = new ScrollBar(manager, EOrientation.Vertical);
            sbVert.Init();
            sbVert.Top           = 2;
            sbVert.Left          = Width - 18;
            sbVert.Anchor        = EAnchors.Right | EAnchors.Top | EAnchors.Bottom;
            sbVert.Range         = 1;
            sbVert.PageSize      = 1;
            sbVert.Value         = 0;
            sbVert.ValueChanged += new EventHandler(sbVert_ValueChanged);
            Add(sbVert, false);

            ClientArea.Draw += new DrawEventHandler(ClientArea_Draw);

            buffer.ItemAdded     += new EventHandler(buffer_ItemAdded);
            channels.ItemAdded   += new EventHandler(channels_ItemAdded);
            channels.ItemRemoved += new EventHandler(channels_ItemRemoved);

            PositionControls();
        }
Beispiel #4
0
        public override void Init()
        {
            base.Init();

            vert.Init();
            vert.Range         = 1;
            vert.PageSize      = 1;
            vert.Value         = 0;
            vert.Anchor        = EAnchors.Top | EAnchors.Right | EAnchors.Bottom;
            vert.ValueChanged += new EventHandler(sb_ValueChanged);

            horz.Init();
            horz.Range         = ClientArea.Width;
            horz.PageSize      = ClientArea.Width;
            horz.Value         = 0;
            horz.Anchor        = EAnchors.Right | EAnchors.Left | EAnchors.Bottom;
            horz.ValueChanged += new EventHandler(sb_ValueChanged);

            horz.Visible = false;
            vert.Visible = false;

            Add(vert, false);
            Add(horz, false);
        }
Beispiel #5
0
		public Container(Manager manager)
			: base(manager) {
			sbVert = new ScrollBar(manager, EOrientation.Vertical);
			sbVert.Init();
			sbVert.Detached = false;
			sbVert.Anchor = EAnchors.Top | EAnchors.Right | EAnchors.Bottom;
			sbVert.ValueChanged += new EventHandler(ScrollBarValueChanged);
			sbVert.Range = 0;
			sbVert.PageSize = 0;
			sbVert.Value = 0;
			sbVert.Visible = false;

			sbHorz = new ScrollBar(manager, EOrientation.Horizontal);
			sbHorz.Init();
			sbHorz.Detached = false;
			sbHorz.Anchor = EAnchors.Right | EAnchors.Left | EAnchors.Bottom;
			sbHorz.ValueChanged += new EventHandler(ScrollBarValueChanged);
			sbHorz.Range = 0;
			sbHorz.PageSize = 0;
			sbHorz.Value = 0;
			sbHorz.Visible = false;

			Add(sbVert, false);
			Add(sbHorz, false);
		}
Beispiel #6
0
		public Console(Manager manager)
			: base(manager) {
			Width = 320;
			Height = 160;
			MinimumHeight = 64;
			MinimumWidth = 64;
			CanFocus = false;

			Resizable = false;
			Movable = false;

			cmbMain = new ComboBox(manager);
			cmbMain.Init();
			cmbMain.Top = Height - cmbMain.Height;
			cmbMain.Left = 0;
			cmbMain.Width = 128;
			cmbMain.Anchor = EAnchors.Left | EAnchors.Bottom;
			cmbMain.Detached = false;
			cmbMain.DrawSelection = false;
			cmbMain.Visible = channelsVisible;
			Add(cmbMain, false);

			txtMain = new TextBox(manager);
			txtMain.Init();
			txtMain.Top = Height - txtMain.Height;
			txtMain.Left = cmbMain.Width + 1;
			txtMain.Anchor = EAnchors.Left | EAnchors.Bottom | EAnchors.Right;
			txtMain.Detached = false;
			txtMain.Visible = textBoxVisible;
			txtMain.KeyDown += new KeyEventHandler(txtMain_KeyDown);
			txtMain.GamePadDown += new GamePadEventHandler(txtMain_GamePadDown);
			txtMain.FocusGained += new EventHandler(txtMain_FocusGained);
			Add(txtMain, false);

			sbVert = new ScrollBar(manager, EOrientation.Vertical);
			sbVert.Init();
			sbVert.Top = 2;
			sbVert.Left = Width - 18;
			sbVert.Anchor = EAnchors.Right | EAnchors.Top | EAnchors.Bottom;
			sbVert.Range = 1;
			sbVert.PageSize = 1;
			sbVert.Value = 0;
			sbVert.ValueChanged += new EventHandler(sbVert_ValueChanged);
			Add(sbVert, false);

			ClientArea.Draw += new DrawEventHandler(ClientArea_Draw);

			buffer.ItemAdded += new EventHandler(buffer_ItemAdded);
			channels.ItemAdded += new EventHandler(channels_ItemAdded);
			channels.ItemRemoved += new EventHandler(channels_ItemRemoved);

			PositionControls();
		}