public BattleListTab() {
            SuspendLayout();
            Size = new Size(731, 463);

            panel1 = new Panel { BackColor = Color.Transparent, Dock = DockStyle.Top, Location = new Point(0, 0), Size = new Size(731, 50) };
            searchLabel = new Label { AutoSize = true, Location = new Point(203, 17), Size = new Size(59, 18), Text = "Search:", ForeColor = Config.TextColor, Font = Config.GeneralFont};
            searchBox = new ZklTextBox { BackColor = Color.FromArgb(0, 30, 40), Location = new Point(268, 14), Size = new Size(178, 24), TabIndex = 1 };


            var btnMm = new BitmapButton()
            {
                Text = "Start MatchMaker",
                Width = 150,
                Height = 50,
                Image = Buttons.mp.GetResizedWithCache(32, 32),
                TextImageRelation = TextImageRelation.ImageBeforeText
            };
            btnMm.Click += (s, e) =>
            {
                var mm = new StartMatchMakerDialog();
                mm.StartPosition = FormStartPosition.CenterScreen;
                mm.Show(Program.MainWindow);
            };
            
            panel1.Controls.Add(btnMm);

            panel1.Controls.Add(searchLabel);
            panel1.Controls.Add(searchBox);

            battlePanel = new Panel
            {
                Location = new Point(0, 50),
                Size = new Size(731, 432),
                Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right
            };

            // battle list
            battleListControl = new BattleListControl { Dock = DockStyle.Fill };
            battlePanel.Controls.Add(battleListControl);

            Controls.Add(panel1);
            Controls.Add(battlePanel);

            Program.ToolTip.SetText(searchBox, "Search game, map or player");
            Program.ToolTip.SetText(searchBox.TextBox, "Search game, map or player");
            Program.ToolTip.SetText(searchLabel, "Search game, map or player");

            searchBox.TextChanged += searchBox_TextChanged;

            ResumeLayout();
        }
        private void InitializeComponent()
        {
            playerListMapSplitContainer = new SplitContainer();
            playerBoxSearchBarContainer = new Panel();
            playerBox = new PlayerListControl();
            searchBarContainer = new TableLayoutPanel();
            playerSearchBox = new ZklTextBox();
            sendBox = new SendBox();
            topicPanel = new Panel();
            hideButton = new BitmapButton();
            topicBox = new ChatBox();
            ChatBox = new ChatBox();
            splitContainer1 = new ZkSplitContainer();
            ((ISupportInitialize)playerListMapSplitContainer).BeginInit();
            playerListMapSplitContainer.Panel1.SuspendLayout();
            playerListMapSplitContainer.SuspendLayout();
            playerBoxSearchBarContainer.SuspendLayout();
            searchBarContainer.SuspendLayout();
            topicPanel.SuspendLayout();
            ((ISupportInitialize)splitContainer1).BeginInit();
            splitContainer1.Panel1.SuspendLayout();
            splitContainer1.Panel2.SuspendLayout();
            splitContainer1.SuspendLayout();
            SuspendLayout();
            // 
            // playerListMapSplitContainer
            // 
            playerListMapSplitContainer.BackColor = Color.DimGray;
            playerListMapSplitContainer.Dock = DockStyle.Fill;
            playerListMapSplitContainer.Location = new Point(0, 0);
            playerListMapSplitContainer.Margin = new Padding(2);
            playerListMapSplitContainer.Name = "playerListMapSplitContainer";
            playerListMapSplitContainer.Orientation = Orientation.Horizontal;
            // 
            // playerListMapSplitContainer.Panel1
            // 
            playerListMapSplitContainer.Panel1.Controls.Add(playerBoxSearchBarContainer);
            // 
            // playerListMapSplitContainer.Panel2
            // 
            playerListMapSplitContainer.Panel2.AutoScroll = true;
            playerListMapSplitContainer.Size = new Size(326, 793);
            playerListMapSplitContainer.SplitterDistance = 565;
            playerListMapSplitContainer.SplitterWidth = 3;
            playerListMapSplitContainer.TabIndex = 0;
            playerListMapSplitContainer.SplitterMoved += new SplitterEventHandler(playerListMapSplitContainer_SplitterMoved);
            // 
            // playerBoxSearchBarContainer
            // 
            playerBoxSearchBarContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            playerBoxSearchBarContainer.Controls.Add(playerBox);
            playerBoxSearchBarContainer.Controls.Add(searchBarContainer);
            playerBoxSearchBarContainer.Dock = DockStyle.Fill;
            playerBoxSearchBarContainer.Location = new Point(0, 0);
            playerBoxSearchBarContainer.Name = "playerBoxSearchBarContainer";
            playerBoxSearchBarContainer.Size = new Size(326, 565);
            playerBoxSearchBarContainer.TabIndex = 2;
            // 
            // playerBox
            // 
            playerBox.BackColor = Color.DimGray;
            playerBox.Dock = DockStyle.Fill;
            playerBox.ForeColor = Color.White;
            playerBox.HoverItem = null;
            playerBox.IsBattle = false;
            playerBox.IsSorted = false;
            playerBox.Location = new Point(0, 24);
            playerBox.Name = "playerBox";
            playerBox.SelectedItem = null;
            playerBox.Size = new Size(326, 541);
            playerBox.TabIndex = 1;
            // 
            // searchBarContainer
            // 
            searchBarContainer.ColumnCount = 2;
            searchBarContainer.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize, 20F));
            searchBarContainer.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
            searchBarContainer.Controls.Add(playerSearchBox, 1, 0);
            searchBarContainer.Dock = DockStyle.Top;
            searchBarContainer.Location = new Point(0, 0);
            searchBarContainer.Name = "searchBarContainer";
            searchBarContainer.RowCount = 1;
            searchBarContainer.RowStyles.Add(new RowStyle(SizeType.Absolute, 25F));
            searchBarContainer.Size = new Size(326, 30);
            searchBarContainer.AutoSize = false;
            searchBarContainer.TabIndex = 0;
            // 
            // playerSearchBox
            // 
            playerSearchBox.Anchor = AnchorStyles.Left | AnchorStyles.Top;
            playerSearchBox.Location = new Point(23, 22);
            playerSearchBox.Name = "playerSearchBox";
            playerSearchBox.Size = new Size(300, 20);
            playerSearchBox.Margin = new Padding(0);
            playerSearchBox.TabIndex = 0;
            playerSearchBox.Font = Config.GeneralFontSmall;
            playerSearchBox.TextChanged += new EventHandler(playerSearchBox_TextChanged);
            // 
            // sendBox
            // 
            sendBox.Dock = DockStyle.Bottom;
            sendBox.Font = Config.GeneralFont;
            sendBox.ForeColor = Color.White;
            sendBox.Location = new Point(0, 765);
            sendBox.Multiline = true;
            sendBox.Name = "sendBox";
            sendBox.Size = new Size(800, 28);
            sendBox.TabIndex = 0;
            sendBox.WordWrap = false;
            // 
            // topicPanel
            // 
            topicPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            topicPanel.Controls.Add(hideButton);
            topicPanel.Controls.Add(topicBox);
            topicPanel.Dock = DockStyle.Top;
            topicPanel.Location = new Point(0, 0);
            topicPanel.Margin = new Padding(0);
            topicPanel.Name = "topicPanel";
            topicPanel.Size = new Size(800, 0);
            topicPanel.TabIndex = 3;
            // 
            // hideButton
            // 
            hideButton.Anchor = (AnchorStyles)(AnchorStyles.Bottom | AnchorStyles.Right);
            hideButton.BackColor = Color.Transparent;
            hideButton.ButtonStyle = FrameBorderRenderer.StyleType.DarkHive;
            hideButton.Cursor = Cursors.Hand;
            hideButton.FlatStyle = FlatStyle.Flat;
            hideButton.ForeColor = Color.White;
            hideButton.Location = new Point(711, -29);
            hideButton.Name = "hideButton";
            hideButton.Size = new Size(75, 23);
            hideButton.SoundType = SoundPalette.SoundType.Click;
            hideButton.TabIndex = 3;
            hideButton.Text = "Hide";
            hideButton.UseVisualStyleBackColor = true;
            hideButton.Click += new EventHandler(hideButton_Click);
            // 
            // topicBox
            // 
            topicBox.BackColor = Color.FromArgb((int)(byte)0, (int)(byte)30, (int)(byte)40);
            topicBox.ChatBackgroundColor = 0;
            topicBox.DefaultTooltip = null;
            topicBox.Dock = DockStyle.Fill;
            topicBox.Font = Config.GeneralFontBig;
            topicBox.HideScroll = false;
            topicBox.IRCForeColor = 0;
            topicBox.LineHighlight = null;
            topicBox.Location = new Point(0, 0);
            topicBox.Name = "topicBox";
            topicBox.NoColorMode = false;
            topicBox.ShowHistory = true;
            topicBox.ShowJoinLeave = false;
            topicBox.ShowUnreadLine = true;
            topicBox.SingleLine = false;
            topicBox.Size = new Size(800, 0);
            topicBox.TabIndex = 2;
            topicBox.TextFilter = null;
            // 
            // ChatBox
            // 
            ChatBox.BackColor = Color.DimGray;
            ChatBox.ChatBackgroundColor = 0;
            ChatBox.DefaultTooltip = null;
            ChatBox.Dock = DockStyle.Fill;
            ChatBox.Font = Config.GeneralFont;
            ChatBox.ForeColor = Color.White;
            ChatBox.HideScroll = false;
            ChatBox.IRCForeColor = 0;
            ChatBox.LineHighlight = null;
            ChatBox.Location = new Point(0, 0);
            ChatBox.Name = "ChatBox";
            ChatBox.NoColorMode = false;
            ChatBox.ShowHistory = true;
            ChatBox.ShowJoinLeave = false;
            ChatBox.ShowUnreadLine = true;
            ChatBox.SingleLine = false;
            ChatBox.Size = new Size(800, 765);
            ChatBox.TabIndex = 1;
            ChatBox.TextFilter = null;
            // 
            // splitContainer1
            // 
            splitContainer1.BackColor = Color.Transparent;
            splitContainer1.Dock = DockStyle.Fill;
            splitContainer1.Location = new Point(0, 0);
            splitContainer1.Margin = new Padding(0);
            splitContainer1.Name = "splitContainer1";
            // 
            // splitContainer1.Panel1
            // 
            splitContainer1.Panel1.Controls.Add(ChatBox);
            splitContainer1.Panel1.Controls.Add(topicPanel);
            splitContainer1.Panel1.Controls.Add(sendBox);
            // 
            // splitContainer1.Panel2
            // 
            splitContainer1.Panel2.Controls.Add(playerListMapSplitContainer);
            splitContainer1.Size = new Size(1130, 793);
            splitContainer1.SplitterDistance = 800;
            splitContainer1.TabIndex = 0;
            splitContainer1.SplitterMoved += splitContainer1_SplitterMoved;


            playerBox.BackColor = Config.BgColor;
            playerBox.ForeColor = Config.TextColor;
            playerBox_zklclick.AttachTo(playerBox);
            playerBox_zklclick.MouseClick += PlayerBox_MouseClick;

            playerSearchBox.BackColor = Config.BgColor;
            playerSearchBox.ForeColor = Config.TextColor;


            var searchLabel = new Label() { Text = "Search: ", AutoSize = true, Font = Config.GeneralFontSmall, Margin = new Padding(3) };
            searchBarContainer.Controls.Add(searchLabel, 0, 0);


            // 
            // ChatControl
            // 
            Controls.Add(splitContainer1);
            Margin = new Padding(0);
            Name = "ChatControl";
            Size = new Size(1130, 793);
            playerListMapSplitContainer.Panel1.ResumeLayout(false);
            ((ISupportInitialize)playerListMapSplitContainer).EndInit();
            playerListMapSplitContainer.ResumeLayout(false);
            playerBoxSearchBarContainer.ResumeLayout(false);
            searchBarContainer.ResumeLayout(false);
            topicPanel.ResumeLayout(false);
            splitContainer1.Panel1.ResumeLayout(false);
            splitContainer1.Panel1.PerformLayout();
            splitContainer1.Panel2.ResumeLayout(false);
            ((ISupportInitialize)splitContainer1).EndInit();
            splitContainer1.ResumeLayout(false);
            ResumeLayout(false);
        }
        private void CreateTopRightMiniIcons(FlowLayoutPanel miniIconPanel) {
            urlBox = new ZklTextBox
            {
                Size = new Size(110, 20),
                TabIndex = 1,
                Font = Config.GeneralFontSmall,
                Margin = new Padding(10)
            };
            urlBox.KeyDown += urlBox_KeyDown;
            urlBox.MouseDown += urlBox_MouseDown;

            var minMaxButton = new BitmapButton
            {
                ButtonStyle = FrameBorderRenderer.StyleType.IconOnly,
                SoundType = SoundPalette.SoundType.Click,
                Height = TopRightMiniIconSize,
                Width = TopRightMiniIconSize,
                Image = Buttons.win_max.GetResizedWithCache(TopRightMiniIconSize, TopRightMiniIconSize)
            };
            minMaxButton.Click += (sender, args) =>
            { Program.MainWindow?.SwitchFullscreenState(); };

            var exitButton = new BitmapButton()
            {
                ButtonStyle = FrameBorderRenderer.StyleType.IconOnly,
                SoundType = SoundPalette.SoundType.Click,
                Height = TopRightMiniIconSize,
                Width = TopRightMiniIconSize,
                Image = Buttons.exit.GetResizedWithCache(TopRightMiniIconSize, TopRightMiniIconSize),
            };
            exitButton.Click += (sender, args) => Program.MainWindow?.Exit();

            var backButton = new BitmapButton()
            {
                ButtonStyle = FrameBorderRenderer.StyleType.IconOnly,
                SoundType = SoundPalette.SoundType.Click,
                Height = TopRightMiniIconSize,
                Width = TopRightMiniIconSize,
                Image = Buttons.left.GetResizedWithCache(TopRightMiniIconSize, TopRightMiniIconSize),
            };
            backButton.Click += (sender, args) => { NavigateBack(); };

            var forwardImage = Buttons.left.GetResizedWithCache(TopRightMiniIconSize, TopRightMiniIconSize);
            forwardImage.RotateFlip(RotateFlipType.RotateNoneFlipX);
            var forwardButton = new BitmapButton()
            {
                ButtonStyle = FrameBorderRenderer.StyleType.IconOnly,
                SoundType = SoundPalette.SoundType.Click,
                Height = TopRightMiniIconSize,
                Width = TopRightMiniIconSize,
                Image = forwardImage,
            };
            forwardButton.Click += (sender, args) => { NavigateForward(); };

            sndButton = new BitmapButton()
            {
                ButtonStyle = FrameBorderRenderer.StyleType.IconOnly,
                SoundType = SoundPalette.SoundType.Click,
                Height = TopRightMiniIconSize,
                Width = TopRightMiniIconSize,
                Image = Buttons.soundOn.GetResizedWithCache(TopRightMiniIconSize, TopRightMiniIconSize),
            };
            sndButton.Click += (sender, args) => Program.MainWindow?.SwitchMusicOnOff();

            var settingsButton = new BitmapButton()
            {
                ButtonStyle = FrameBorderRenderer.StyleType.IconOnly,
                SoundType = SoundPalette.SoundType.Click,
                Height = TopRightMiniIconSize,
                Width = TopRightMiniIconSize,
                Image = Buttons.settings.GetResizedWithCache(TopRightMiniIconSize, TopRightMiniIconSize),
            };
            settingsButton.Click += (sender, args) => { Path = "settings"; };

            Program.ToolTip.SetText(exitButton,"Exit");
            Program.ToolTip.SetText(minMaxButton, "Fullscreen on/off");
            Program.ToolTip.SetText(settingsButton, "Settings");
            Program.ToolTip.SetText(sndButton, "Music on/off");
            Program.ToolTip.SetText(forwardButton, "Forward");
            Program.ToolTip.SetText(backButton, "Back");

            miniIconPanel.Controls.Add(exitButton);
            miniIconPanel.Controls.Add(minMaxButton);
            miniIconPanel.Controls.Add(settingsButton);
            miniIconPanel.Controls.Add(sndButton);
            miniIconPanel.Controls.Add(urlBox);
            miniIconPanel.Controls.Add(forwardButton);
            miniIconPanel.Controls.Add(backButton);
        }
        public LoginForm() {
            Font = Config.GeneralFontBig;
            SuspendLayout();

            btnSubmit = new BitmapButton
            {
                ButtonStyle = FrameBorderRenderer.StyleType.DarkHive,
                DialogResult = DialogResult.OK,
                Location = new Point(70, 255),
                Size = new Size(104, 44),
                SoundType = SoundPalette.SoundType.Click,
                Text = "OK"
            };
            btnSubmit.Click += btnSubmit_Click;

            tbLogin = new ZklTextBox { Location = new Point(237, 123), Size = new Size(146, 24), TabIndex = 1 };
            tbLogin.TextBox.TextChanged += (sender, args) => { tbLogin_TextBox_TextChanged(sender, args); };

            tbPassword = new ZklTextBox
            {
                Location = new Point(237, 164),
                Size = new Size(146, 24),
                TabIndex = 2,
                TextBox = { UseSystemPasswordChar = true }
            };

            lbInfo = new Label
            {
                BackColor = Color.Transparent,
                ForeColor = Color.Red,
                Location = new Point(29, 20),
                Size = new Size(414, 51),
                Text = "Error",
                TextAlign = ContentAlignment.MiddleCenter
            };

            btnCancel = new BitmapButton
            {
                ButtonStyle = FrameBorderRenderer.StyleType.DarkHive,
                DialogResult = DialogResult.Cancel,
                Location = new Point(286, 255),
                Size = new Size(97, 44),
                SoundType = SoundPalette.SoundType.Click,
                Text = "Cancel"
            };
            btnCancel.Click += btnCancel_Click;

            var label1 = new Label
            {
                AutoSize = true,
                BackColor = Color.Transparent,
                Location = new Point(112, 126),
                Size = new Size(89, 18),
                Text = "Login name:"
            };

            var label2 = new Label
            {
                AutoSize = true,
                BackColor = Color.Transparent,
                Location = new Point(121, 167),
                Size = new Size(79, 18),
                Text = "Password:"******"Zero-K Login/Register";
            Load += LoginForm_Load;
            ResumeLayout(false);
            PerformLayout();

            tbLogin.Text = Program.Conf.LobbyPlayerName;
            if (string.IsNullOrEmpty(tbLogin.Text))
            {
                tbLogin.Text = Program.SteamHandler.SteamName;
                Program.SteamHandler.SteamHelper.SteamOnline += SteamApiOnSteamOnline;
            }
            tbPassword.Text = Program.Conf.LobbyPlayerPassword;

            tbLogin.TextBox.PreviewKeyDown += onKeyPress;
            tbPassword.TextBox.PreviewKeyDown += onKeyPress;
        }