Exemple #1
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);
		}
Exemple #2
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();
		}