示例#1
0
        public override void Initialize()
        {
            base.Initialize();

            string[] actions = new string[] {
                "Gegner suchen",
                "Deck bearbeiten",
                "noch ne Aktion",
                "Und noch eine",
                "keine Ahnung",
                "Ficken?",
                "Ok o.o",
                "blubb",
                "foo",
                "bar",
                "moepse sin toll",
            };

            // just to refresh
            ScreenManager.MainWindow.BringToFront();

            #region Links - Übersicht
            GroupPanel wnd = new GroupPanel(WindowManager);
            wnd.Init();
            wnd.Text      = "Übersicht";
            wnd.TextColor = Color.LightGray;
            wnd.Width     = 200;
            wnd.Height    = ScreenManager.MainWindow.ClientHeight - 40;
            wnd.Top       = 20;
            wnd.Left      = 20;
            wnd.Visible   = true;

            // Actions
            int    btnWidth  = 160;
            int    btnHeight = 40;
            Button btn;

            for (int i = 0; i < actions.Length; i++)
            {
                btn = new Button(WindowManager);
                btn.Init();
                btn.Width  = btnWidth;
                btn.Height = btnHeight;
                btn.Left   = 20;
                btn.Top    = ((i * 20) + btnHeight * i) + 20;
                btn.Text   = actions[i];
                btn.Click += new WindowLibrary.Controls.EventHandler(ActionButton_Click);
                btn.Tag    = i;
                wnd.Add(btn);
            }

            AddWindow(wnd);
            #endregion

            #region Rechts - Spiele & Statistik
            GroupPanel runingGamesPanel = new GroupPanel(WindowManager);
            runingGamesPanel.Init();
            runingGamesPanel.Text      = "Laufende Spiele";
            runingGamesPanel.TextColor = Color.LightGray;
            runingGamesPanel.Width     = 200;
            runingGamesPanel.Height    = 400;
            runingGamesPanel.Top       = 20;
            runingGamesPanel.Left      = ScreenManager.MainWindow.ClientWidth - runingGamesPanel.Width - 20;
            runingGamesPanel.Visible   = true;
            AddWindow(runingGamesPanel);

            GroupPanel statPanel = new GroupPanel(WindowManager);
            statPanel.Init();
            statPanel.Text      = "Statistik";
            statPanel.TextColor = Color.LightGray;
            statPanel.Width     = 200;
            statPanel.Height    = ScreenManager.MainWindow.ClientHeight - 460;
            statPanel.Top       = 440;
            statPanel.Left      = ScreenManager.MainWindow.ClientWidth - statPanel.Width - 20;
            statPanel.Visible   = true;
            AddWindow(statPanel);
            #endregion

            #region Mitte - Chat
            TabControl tbc = new TabControl(WindowManager);
            mConsole = new WindowLibrary.Controls.Console(WindowManager);

            tbc.Init();
            tbc.AddPage("Allgemein");

            tbc.Alpha         = 200;
            tbc.Left          = 240;
            tbc.Height        = 220;
            tbc.Width         = ScreenManager.MainWindow.ClientWidth - 480;
            tbc.Top           = ScreenManager.MainWindow.ClientHeight - tbc.Height - 18;
            tbc.Movable       = false;
            tbc.Resizable     = false;
            tbc.MinimumHeight = 96;
            tbc.MinimumWidth  = 160;

            tbc.TabPages[0].Add(mConsole);

            mConsole.Init();
            mConsole.Width  = tbc.TabPages[0].ClientWidth;
            mConsole.Height = tbc.TabPages[0].ClientHeight;
            mConsole.Anchor = EAnchors.All;

            mConsole.Channels.Add(new ConsoleChannel(0, "Allgemein", Color.White));
            mConsole.SelectedChannel = 0;

            mConsole.MessageFormat = ConsoleMessageFormats.None;

            SendSystemMessage("Dein Login war erfolgreich!");
            SendSystemMessage("Willkommen im InsaneRO Card Game ;D");

            mConsole.MessageSent += new ConsoleMessageEventHandler(Channel1_MessageSent);

            AddWindow(tbc);
            #endregion

            GroupPanel newsPanel = new GroupPanel(WindowManager);
            newsPanel.Init();
            newsPanel.Text       = "InsaneRO News";
            newsPanel.TextColor  = Color.LightGray;
            newsPanel.Width      = ScreenManager.MainWindow.ClientWidth - 480;
            newsPanel.Height     = ScreenManager.MainWindow.ClientHeight - 40 - 220;
            newsPanel.Top        = 20;
            newsPanel.Left       = 240;
            newsPanel.Visible    = true;
            newsPanel.AutoScroll = EAutoScroll.Vertical;

            AddWindow(newsPanel);

            LoadNews();
        }
示例#2
0
		public override void Initialize() {
			base.Initialize();

			string[] actions = new string[]{
				"Gegner suchen",
				"Deck bearbeiten",
				"noch ne Aktion",
				"Und noch eine",
				"keine Ahnung",
				"Ficken?",
				"Ok o.o",
				"blubb",
				"foo",
				"bar",
				"moepse sin toll",
			};

			// just to refresh
			ScreenManager.MainWindow.BringToFront();

			#region Links - Übersicht
			GroupPanel wnd = new GroupPanel(WindowManager);
			wnd.Init();
			wnd.Text = "Übersicht";
			wnd.TextColor = Color.LightGray;
			wnd.Width = 200;
			wnd.Height = ScreenManager.MainWindow.ClientHeight - 40;
			wnd.Top = 20;
			wnd.Left = 20;
			wnd.Visible = true;

			// Actions
			int btnWidth = 160;
			int btnHeight = 40;
			Button btn;

			for (int i = 0; i < actions.Length; i++) {
				btn = new Button(WindowManager);
				btn.Init();
				btn.Width = btnWidth;
				btn.Height = btnHeight;
				btn.Left = 20;
				btn.Top = ((i * 20) + btnHeight * i) + 20;
				btn.Text = actions[i];
				btn.Click += new WindowLibrary.Controls.EventHandler(ActionButton_Click);
				btn.Tag = i;
				wnd.Add(btn);
			}

			AddWindow(wnd);
			#endregion

			#region Rechts - Spiele & Statistik
			GroupPanel runingGamesPanel = new GroupPanel(WindowManager);
			runingGamesPanel.Init();
			runingGamesPanel.Text = "Laufende Spiele";
			runingGamesPanel.TextColor = Color.LightGray;
			runingGamesPanel.Width = 200;
			runingGamesPanel.Height = 400;
			runingGamesPanel.Top = 20;
			runingGamesPanel.Left = ScreenManager.MainWindow.ClientWidth - runingGamesPanel.Width - 20;
			runingGamesPanel.Visible = true;
			AddWindow(runingGamesPanel);

			GroupPanel statPanel = new GroupPanel(WindowManager);
			statPanel.Init();
			statPanel.Text = "Statistik";
			statPanel.TextColor = Color.LightGray;
			statPanel.Width = 200;
			statPanel.Height = ScreenManager.MainWindow.ClientHeight - 460;
			statPanel.Top = 440;
			statPanel.Left = ScreenManager.MainWindow.ClientWidth - statPanel.Width - 20;
			statPanel.Visible = true;
			AddWindow(statPanel);
			#endregion

			#region Mitte - Chat
			TabControl tbc = new TabControl(WindowManager);
			mConsole = new WindowLibrary.Controls.Console(WindowManager);

			tbc.Init();
			tbc.AddPage("Allgemein");

			tbc.Alpha = 200;
			tbc.Left = 240;
			tbc.Height = 220;
			tbc.Width = ScreenManager.MainWindow.ClientWidth - 480;
			tbc.Top = ScreenManager.MainWindow.ClientHeight - tbc.Height - 18;
			tbc.Movable = false;
			tbc.Resizable = false;
			tbc.MinimumHeight = 96;
			tbc.MinimumWidth = 160;

			tbc.TabPages[0].Add(mConsole);

			mConsole.Init();
			mConsole.Width = tbc.TabPages[0].ClientWidth;
			mConsole.Height = tbc.TabPages[0].ClientHeight;
			mConsole.Anchor = EAnchors.All;

			mConsole.Channels.Add(new ConsoleChannel(0, "Allgemein", Color.White));
			mConsole.SelectedChannel = 0;

			mConsole.MessageFormat = ConsoleMessageFormats.None;

			SendSystemMessage("Dein Login war erfolgreich!");
			SendSystemMessage("Willkommen im InsaneRO Card Game ;D");

			mConsole.MessageSent += new ConsoleMessageEventHandler(Channel1_MessageSent);

			AddWindow(tbc);
			#endregion

			GroupPanel newsPanel = new GroupPanel(WindowManager);
			newsPanel.Init();
			newsPanel.Text = "InsaneRO News";
			newsPanel.TextColor = Color.LightGray;
			newsPanel.Width = ScreenManager.MainWindow.ClientWidth - 480;
			newsPanel.Height = ScreenManager.MainWindow.ClientHeight - 40 - 220;
			newsPanel.Top = 20;
			newsPanel.Left = 240;
			newsPanel.Visible = true;
			newsPanel.AutoScroll = EAutoScroll.Vertical;

			AddWindow(newsPanel);

			LoadNews();
		}