diff --git a/Launcher/Launcher.csproj b/Launcher/Launcher.csproj index 2cce4e3d6..a19d0fbad 100644 --- a/Launcher/Launcher.csproj +++ b/Launcher/Launcher.csproj @@ -36,7 +36,9 @@ False False 4 - false + False + False + obj\$(Configuration)\ AnyCPU @@ -52,6 +54,7 @@ False True DEBUG;TRACE + obj\ ..\output\release\ @@ -77,6 +80,7 @@ MainForm.cs + diff --git a/Launcher/MainForm.Designer.cs b/Launcher/MainForm.Designer.cs index 6038d2686..d182cf9d6 100644 --- a/Launcher/MainForm.Designer.cs +++ b/Launcher/MainForm.Designer.cs @@ -29,774 +29,702 @@ namespace Launcher /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.btnMCSignIn = new System.Windows.Forms.Button(); - this.txtMCPassword = new System.Windows.Forms.TextBox(); - this.lblMCPassword = new System.Windows.Forms.Label(); - this.txtMCUser = new System.Windows.Forms.TextBox(); - this.lblMCUser = new System.Windows.Forms.Label(); - this.txtMCSearch = new System.Windows.Forms.TextBox(); - this.lblMCSearch = new System.Windows.Forms.Label(); - this.btnMCConnect = new System.Windows.Forms.Button(); - this.lblMCPublicName = new System.Windows.Forms.Label(); - this.lblMCServerName = new System.Windows.Forms.Label(); - this.txtMCHash = new System.Windows.Forms.TextBox(); - this.lblMCPlayUrl = new System.Windows.Forms.Label(); - this.lblMCServerUrl = new System.Windows.Forms.Label(); - this.toolTip = new System.Windows.Forms.ToolTip(this.components); - this.tabMinecraftNet = new System.Windows.Forms.TabPage(); - this.tabMC = new System.Windows.Forms.TabControl(); - this.tabMCSignIn = new System.Windows.Forms.TabPage(); - this.prgMCStatus = new System.Windows.Forms.ProgressBar(); - this.lblMCStatusLabel = new System.Windows.Forms.Label(); - this.lblMCStatus = new System.Windows.Forms.Label(); - this.tabMCServers = new System.Windows.Forms.TabPage(); - this.tblMCServers = new System.Windows.Forms.ListView(); - this.colMCName = new System.Windows.Forms.ColumnHeader(); - this.colMCPlayers = new System.Windows.Forms.ColumnHeader(); - this.colMCMaxPlayers = new System.Windows.Forms.ColumnHeader(); - this.colMCUptime = new System.Windows.Forms.ColumnHeader(); - this.cbMCHideInvalid = new System.Windows.Forms.CheckBox(); - this.cbMCHideEmpty = new System.Windows.Forms.CheckBox(); - this.tabMCServer = new System.Windows.Forms.TabPage(); - this.tabLocal = new System.Windows.Forms.TabPage(); - this.btnLanConnect = new System.Windows.Forms.Button(); - this.cbLocalSkinServerCC = new System.Windows.Forms.CheckBox(); - this.txtLanPort = new System.Windows.Forms.TextBox(); - this.lblLanPort = new System.Windows.Forms.Label(); - this.txtLanIP = new System.Windows.Forms.TextBox(); - this.lblLanIP = new System.Windows.Forms.Label(); - this.lblLanUser = new System.Windows.Forms.Label(); - this.txtLanUser = new System.Windows.Forms.TextBox(); - this.tabs = new System.Windows.Forms.TabControl(); - this.tabClassicubeNet = new System.Windows.Forms.TabPage(); - this.tabCC = new System.Windows.Forms.TabControl(); - this.tabCCSignIn = new System.Windows.Forms.TabPage(); - this.prgCCStatus = new System.Windows.Forms.ProgressBar(); - this.lblCCStatusLabel = new System.Windows.Forms.Label(); - this.lblCCStatus = new System.Windows.Forms.Label(); - this.lblCCUser = new System.Windows.Forms.Label(); - this.btnCCSignIn = new System.Windows.Forms.Button(); - this.txtCCUser = new System.Windows.Forms.TextBox(); - this.txtCCPassword = new System.Windows.Forms.TextBox(); - this.lblCCPassword = new System.Windows.Forms.Label(); - this.tabCCServers = new System.Windows.Forms.TabPage(); - this.tblCCServers = new System.Windows.Forms.ListView(); - this.colCCName = new System.Windows.Forms.ColumnHeader(); - this.colCCPlayers = new System.Windows.Forms.ColumnHeader(); - this.colCCMaxPlayers = new System.Windows.Forms.ColumnHeader(); - this.colCCUptime = new System.Windows.Forms.ColumnHeader(); - this.cbCCHideEmpty = new System.Windows.Forms.CheckBox(); - this.txtCCSearch = new System.Windows.Forms.TextBox(); - this.lblCCSearch = new System.Windows.Forms.Label(); - this.tabCCServer = new System.Windows.Forms.TabPage(); - this.btnCCConnect = new System.Windows.Forms.Button(); - this.lblCCServerUrl = new System.Windows.Forms.Label(); - this.lblCCPublicName = new System.Windows.Forms.Label(); - this.lblCCPlayUrl = new System.Windows.Forms.Label(); - this.lblCCServerName = new System.Windows.Forms.Label(); - this.txtCCHash = new System.Windows.Forms.TextBox(); - this.tabMinecraftNet.SuspendLayout(); - this.tabMC.SuspendLayout(); - this.tabMCSignIn.SuspendLayout(); - this.tabMCServers.SuspendLayout(); - this.tabMCServer.SuspendLayout(); - this.tabLocal.SuspendLayout(); - this.tabs.SuspendLayout(); - this.tabClassicubeNet.SuspendLayout(); - this.tabCC.SuspendLayout(); - this.tabCCSignIn.SuspendLayout(); - this.tabCCServers.SuspendLayout(); - this.tabCCServer.SuspendLayout(); - this.SuspendLayout(); - // - // btnMCSignIn - // - this.btnMCSignIn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnMCSignIn.Location = new System.Drawing.Point(10, 120); - this.btnMCSignIn.Name = "btnMCSignIn"; - this.btnMCSignIn.Size = new System.Drawing.Size(100, 30); - this.btnMCSignIn.TabIndex = 4; - this.btnMCSignIn.Text = "Sign in"; - this.btnMCSignIn.UseVisualStyleBackColor = true; - this.btnMCSignIn.Click += new System.EventHandler(this.btnMCSignInClick); - // - // txtMCPassword - // - this.txtMCPassword.Location = new System.Drawing.Point(10, 80); - this.txtMCPassword.MaxLength = 64; - this.txtMCPassword.Name = "txtMCPassword"; - this.txtMCPassword.Size = new System.Drawing.Size(100, 20); - this.txtMCPassword.TabIndex = 3; - this.txtMCPassword.PasswordChar = '*'; - // - // lblMCPassword - // - this.lblMCPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMCPassword.Location = new System.Drawing.Point(10, 60); - this.lblMCPassword.Name = "lblMCPassword"; - this.lblMCPassword.Size = new System.Drawing.Size(77, 20); - this.lblMCPassword.TabIndex = 2; - this.lblMCPassword.Text = "Password"; - // - // txtMCUser - // - this.txtMCUser.Location = new System.Drawing.Point(10, 30); - this.txtMCUser.MaxLength = 64; - this.txtMCUser.Name = "txtMCUser"; - this.txtMCUser.Size = new System.Drawing.Size(100, 20); - this.txtMCUser.TabIndex = 1; - // - // lblMCUser - // - this.lblMCUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMCUser.Location = new System.Drawing.Point(10, 10); - this.lblMCUser.Name = "lblMCUser"; - this.lblMCUser.Size = new System.Drawing.Size(81, 20); - this.lblMCUser.TabIndex = 0; - this.lblMCUser.Text = "Username"; - // - // txtMCSearch - // - this.txtMCSearch.Location = new System.Drawing.Point(80, 10); - this.txtMCSearch.Name = "txtMCSearch"; - this.txtMCSearch.Size = new System.Drawing.Size(100, 20); - this.txtMCSearch.TabIndex = 2; - this.txtMCSearch.TextChanged += new System.EventHandler(this.txtMCSearchTextChanged); - // - // lblMCSearch - // - this.lblMCSearch.AutoSize = true; - this.lblMCSearch.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMCSearch.Location = new System.Drawing.Point(10, 10); - this.lblMCSearch.Name = "lblMCSearch"; - this.lblMCSearch.Size = new System.Drawing.Size(64, 20); - this.lblMCSearch.TabIndex = 1; - this.lblMCSearch.Text = "Search:"; - // - // btnMCConnect - // - this.btnMCConnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnMCConnect.Location = new System.Drawing.Point(10, 120); - this.btnMCConnect.Name = "btnMCConnect"; - this.btnMCConnect.Size = new System.Drawing.Size(100, 30); - this.btnMCConnect.TabIndex = 5; - this.btnMCConnect.Text = "Connect"; - this.btnMCConnect.UseVisualStyleBackColor = true; - this.btnMCConnect.Click += new System.EventHandler(this.btnMCConnectClick); - // - // lblMCPublicName - // - this.lblMCPublicName.AutoSize = true; - this.lblMCPublicName.Location = new System.Drawing.Point(10, 80); - this.lblMCPublicName.Name = "lblMCPublicName"; - this.lblMCPublicName.Size = new System.Drawing.Size(87, 13); - this.lblMCPublicName.TabIndex = 4; - this.lblMCPublicName.Text = "(No public name)"; - // - // lblMCServerName - // - this.lblMCServerName.BackColor = System.Drawing.SystemColors.Control; - this.lblMCServerName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMCServerName.Location = new System.Drawing.Point(10, 60); - this.lblMCServerName.Name = "lblMCServerName"; - this.lblMCServerName.Size = new System.Drawing.Size(166, 20); - this.lblMCServerName.TabIndex = 3; - this.lblMCServerName.Text = "Public name of server"; - // - // txtMCHash - // - this.txtMCHash.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtMCHash.Location = new System.Drawing.Point(180, 30); - this.txtMCHash.Name = "txtMCHash"; - this.txtMCHash.Size = new System.Drawing.Size(190, 13); - this.txtMCHash.TabIndex = 2; - this.txtMCHash.TextChanged += new System.EventHandler(this.txtMCHashTextChanged); - // - // lblMCPlayUrl - // - this.lblMCPlayUrl.AutoSize = true; - this.lblMCPlayUrl.Location = new System.Drawing.Point(10, 30); - this.lblMCPlayUrl.Name = "lblMCPlayUrl"; - this.lblMCPlayUrl.Size = new System.Drawing.Size(170, 13); - this.lblMCPlayUrl.TabIndex = 1; - this.lblMCPlayUrl.Text = "https://minecraft.net/classic/play/"; - // - // lblMCServerUrl - // - this.lblMCServerUrl.BackColor = System.Drawing.SystemColors.Control; - this.lblMCServerUrl.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMCServerUrl.Location = new System.Drawing.Point(10, 10); - this.lblMCServerUrl.Name = "lblMCServerUrl"; - this.lblMCServerUrl.Size = new System.Drawing.Size(92, 20); - this.lblMCServerUrl.TabIndex = 0; - this.lblMCServerUrl.Text = "Server URL"; - // - // tabMinecraftNet - // - this.tabMinecraftNet.Controls.Add(this.tabMC); - this.tabMinecraftNet.Location = new System.Drawing.Point(4, 22); - this.tabMinecraftNet.Name = "tabMinecraftNet"; - this.tabMinecraftNet.Padding = new System.Windows.Forms.Padding(3); - this.tabMinecraftNet.Size = new System.Drawing.Size(424, 367); - this.tabMinecraftNet.TabIndex = 1; - this.tabMinecraftNet.Text = "minecraft.net"; - this.tabMinecraftNet.UseVisualStyleBackColor = true; - // - // tabMC - // - this.tabMC.Controls.Add(this.tabMCSignIn); - this.tabMC.Controls.Add(this.tabMCServers); - this.tabMC.Controls.Add(this.tabMCServer); - this.tabMC.Location = new System.Drawing.Point(0, 0); - this.tabMC.Name = "tabMC"; - this.tabMC.SelectedIndex = 0; - this.tabMC.Size = new System.Drawing.Size(432, 374); - this.tabMC.TabIndex = 0; - // - // tabMCSignIn - // - this.tabMCSignIn.Controls.Add(this.prgMCStatus); - this.tabMCSignIn.Controls.Add(this.lblMCStatusLabel); - this.tabMCSignIn.Controls.Add(this.lblMCStatus); - this.tabMCSignIn.Controls.Add(this.lblMCUser); - this.tabMCSignIn.Controls.Add(this.btnMCSignIn); - this.tabMCSignIn.Controls.Add(this.txtMCUser); - this.tabMCSignIn.Controls.Add(this.txtMCPassword); - this.tabMCSignIn.Controls.Add(this.lblMCPassword); - this.tabMCSignIn.Location = new System.Drawing.Point(4, 22); - this.tabMCSignIn.Name = "tabMCSignIn"; - this.tabMCSignIn.Padding = new System.Windows.Forms.Padding(3); - this.tabMCSignIn.Size = new System.Drawing.Size(424, 348); - this.tabMCSignIn.TabIndex = 0; - this.tabMCSignIn.Text = "Sign in"; - this.tabMCSignIn.UseVisualStyleBackColor = true; - // - // prgMCStatus - // - this.prgMCStatus.ForeColor = System.Drawing.SystemColors.Desktop; - this.prgMCStatus.Location = new System.Drawing.Point(10, 200); - this.prgMCStatus.Name = "prgMCStatus"; - this.prgMCStatus.Size = new System.Drawing.Size(200, 20); - this.prgMCStatus.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.prgMCStatus.TabIndex = 8; - // - // lblMCStatusLabel - // - this.lblMCStatusLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMCStatusLabel.Location = new System.Drawing.Point(10, 180); - this.lblMCStatusLabel.Name = "lblMCStatusLabel"; - this.lblMCStatusLabel.Size = new System.Drawing.Size(77, 20); - this.lblMCStatusLabel.TabIndex = 7; - this.lblMCStatusLabel.Text = "Status:"; - // - // lblMCStatus - // - this.lblMCStatus.AutoSize = true; - this.lblMCStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMCStatus.Location = new System.Drawing.Point(10, 230); - this.lblMCStatus.Name = "lblMCStatus"; - this.lblMCStatus.Size = new System.Drawing.Size(0, 17); - this.lblMCStatus.TabIndex = 6; - // - // tabMCServers - // - this.tabMCServers.Controls.Add(this.tblMCServers); - this.tabMCServers.Controls.Add(this.cbMCHideInvalid); - this.tabMCServers.Controls.Add(this.cbMCHideEmpty); - this.tabMCServers.Controls.Add(this.txtMCSearch); - this.tabMCServers.Controls.Add(this.lblMCSearch); - this.tabMCServers.Location = new System.Drawing.Point(4, 22); - this.tabMCServers.Name = "tabMCServers"; - this.tabMCServers.Padding = new System.Windows.Forms.Padding(3); - this.tabMCServers.Size = new System.Drawing.Size(424, 348); - this.tabMCServers.TabIndex = 1; - this.tabMCServers.Text = "Public servers list"; - this.tabMCServers.UseVisualStyleBackColor = true; - // - // tblMCServers - // - this.tblMCServers.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.colMCName, - this.colMCPlayers, - this.colMCMaxPlayers, - this.colMCUptime}); - this.tblMCServers.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tblMCServers.FullRowSelect = true; - this.tblMCServers.GridLines = true; - this.tblMCServers.Location = new System.Drawing.Point(0, 40); - this.tblMCServers.Name = "tblMCServers"; - this.tblMCServers.Size = new System.Drawing.Size(424, 320); - this.tblMCServers.TabIndex = 5; - this.tblMCServers.UseCompatibleStateImageBehavior = false; - this.tblMCServers.View = System.Windows.Forms.View.Details; - this.tblMCServers.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.tblMCServersColumnClick); - this.tblMCServers.DoubleClick += new System.EventHandler(this.tblMCServersDoubleClick); - // - // colMCName - // - this.colMCName.Text = "Name"; - this.colMCName.Width = 100; - // - // colMCPlayers - // - this.colMCPlayers.Text = "Players"; - this.colMCPlayers.Width = 90; - // - // colMCMaxPlayers - // - this.colMCMaxPlayers.Text = "Max players"; - this.colMCMaxPlayers.Width = 90; - // - // colMCUptime - // - this.colMCUptime.Text = "Uptime"; - this.colMCUptime.Width = 100; - // - // cbMCHideInvalid - // - this.cbMCHideInvalid.AutoSize = true; - this.cbMCHideInvalid.Location = new System.Drawing.Point(230, 23); - this.cbMCHideInvalid.Name = "cbMCHideInvalid"; - this.cbMCHideInvalid.Size = new System.Drawing.Size(118, 17); - this.cbMCHideInvalid.TabIndex = 4; - this.cbMCHideInvalid.Text = "Hide invalid servers"; - this.cbMCHideInvalid.UseVisualStyleBackColor = true; - this.cbMCHideInvalid.CheckedChanged += new System.EventHandler(this.cbMCHideInvalidCheckedChanged); - // - // cbMCHideEmpty - // - this.cbMCHideEmpty.AutoSize = true; - this.cbMCHideEmpty.Location = new System.Drawing.Point(230, 3); - this.cbMCHideEmpty.Name = "cbMCHideEmpty"; - this.cbMCHideEmpty.Size = new System.Drawing.Size(116, 17); - this.cbMCHideEmpty.TabIndex = 3; - this.cbMCHideEmpty.Text = "Hide empty servers"; - this.cbMCHideEmpty.UseVisualStyleBackColor = true; - this.cbMCHideEmpty.CheckedChanged += new System.EventHandler(this.cbMCHideEmptyCheckedChanged); - // - // tabMCServer - // - this.tabMCServer.Controls.Add(this.btnMCConnect); - this.tabMCServer.Controls.Add(this.lblMCServerUrl); - this.tabMCServer.Controls.Add(this.lblMCPublicName); - this.tabMCServer.Controls.Add(this.lblMCPlayUrl); - this.tabMCServer.Controls.Add(this.lblMCServerName); - this.tabMCServer.Controls.Add(this.txtMCHash); - this.tabMCServer.Location = new System.Drawing.Point(4, 22); - this.tabMCServer.Name = "tabMCServer"; - this.tabMCServer.Size = new System.Drawing.Size(424, 348); - this.tabMCServer.TabIndex = 2; - this.tabMCServer.Text = "minecraft.net server"; - this.tabMCServer.UseVisualStyleBackColor = true; - // - // tabLocal - // - this.tabLocal.Controls.Add(this.btnLanConnect); - this.tabLocal.Controls.Add(this.cbLocalSkinServerCC); - this.tabLocal.Controls.Add(this.txtLanPort); - this.tabLocal.Controls.Add(this.lblLanPort); - this.tabLocal.Controls.Add(this.txtLanIP); - this.tabLocal.Controls.Add(this.lblLanIP); - this.tabLocal.Controls.Add(this.lblLanUser); - this.tabLocal.Controls.Add(this.txtLanUser); - this.tabLocal.Location = new System.Drawing.Point(4, 22); - this.tabLocal.Name = "tabLocal"; - this.tabLocal.Padding = new System.Windows.Forms.Padding(3); - this.tabLocal.Size = new System.Drawing.Size(424, 367); - this.tabLocal.TabIndex = 0; - this.tabLocal.Text = "Local server"; - this.tabLocal.UseVisualStyleBackColor = true; - // - // btnLanConnect - // - this.btnLanConnect.AutoSize = true; - this.btnLanConnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnLanConnect.Location = new System.Drawing.Point(10, 200); - this.btnLanConnect.Name = "btnLanConnect"; - this.btnLanConnect.Size = new System.Drawing.Size(86, 30); - this.btnLanConnect.TabIndex = 7; - this.btnLanConnect.Text = "Connect"; - this.btnLanConnect.UseVisualStyleBackColor = true; - this.btnLanConnect.Click += new System.EventHandler(this.BtnLanConnectClick); - // - // cbLocalSkinServerCC - // - this.cbLocalSkinServerCC.Location = new System.Drawing.Point(10, 160); - this.cbLocalSkinServerCC.Name = "cbLocalSkinServerCC"; - this.cbLocalSkinServerCC.Size = new System.Drawing.Size(180, 20); - this.cbLocalSkinServerCC.TabIndex = 6; - this.cbLocalSkinServerCC.Text = "Use Classicube.net for skins"; - this.cbLocalSkinServerCC.UseVisualStyleBackColor = true; - // - // txtLanPort - // - this.txtLanPort.Location = new System.Drawing.Point(10, 130); - this.txtLanPort.MaxLength = 6; - this.txtLanPort.Name = "txtLanPort"; - this.txtLanPort.Size = new System.Drawing.Size(100, 20); - this.txtLanPort.TabIndex = 5; - this.txtLanPort.Text = "25565"; - // - // lblLanPort - // - this.lblLanPort.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblLanPort.Location = new System.Drawing.Point(10, 110); - this.lblLanPort.Name = "lblLanPort"; - this.lblLanPort.Size = new System.Drawing.Size(100, 20); - this.lblLanPort.TabIndex = 4; - this.lblLanPort.Text = "Port number"; - // - // txtLanIP - // - this.txtLanIP.Location = new System.Drawing.Point(10, 80); - this.txtLanIP.Name = "txtLanIP"; - this.txtLanIP.Size = new System.Drawing.Size(100, 20); - this.txtLanIP.TabIndex = 3; - this.txtLanIP.Text = "127.0.0.1"; - // - // lblLanIP - // - this.lblLanIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblLanIP.Location = new System.Drawing.Point(10, 60); - this.lblLanIP.Name = "lblLanIP"; - this.lblLanIP.Size = new System.Drawing.Size(150, 20); - this.lblLanIP.TabIndex = 2; - this.lblLanIP.Text = "Local IP address"; - // - // lblLanUser - // - this.lblLanUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblLanUser.Location = new System.Drawing.Point(10, 10); - this.lblLanUser.Name = "lblLanUser"; - this.lblLanUser.Size = new System.Drawing.Size(100, 20); - this.lblLanUser.TabIndex = 1; - this.lblLanUser.Text = "Username"; - // - // txtLanUser - // - this.txtLanUser.Location = new System.Drawing.Point(10, 30); - this.txtLanUser.MaxLength = 64; - this.txtLanUser.Name = "txtLanUser"; - this.txtLanUser.Size = new System.Drawing.Size(100, 20); - this.txtLanUser.TabIndex = 0; - // - // tabs - // - this.tabs.Controls.Add(this.tabLocal); - this.tabs.Controls.Add(this.tabMinecraftNet); - this.tabs.Controls.Add(this.tabClassicubeNet); - this.tabs.Location = new System.Drawing.Point(-1, 0); - this.tabs.Name = "tabs"; - this.tabs.SelectedIndex = 0; - this.tabs.Size = new System.Drawing.Size(432, 393); - this.tabs.TabIndex = 0; - // - // tabClassicubeNet - // - this.tabClassicubeNet.Controls.Add(this.tabCC); - this.tabClassicubeNet.Location = new System.Drawing.Point(4, 22); - this.tabClassicubeNet.Name = "tabClassicubeNet"; - this.tabClassicubeNet.Size = new System.Drawing.Size(424, 367); - this.tabClassicubeNet.TabIndex = 2; - this.tabClassicubeNet.Text = "classicube.net"; - this.tabClassicubeNet.UseVisualStyleBackColor = true; - // - // tabCC - // - this.tabCC.Controls.Add(this.tabCCSignIn); - this.tabCC.Controls.Add(this.tabCCServers); - this.tabCC.Controls.Add(this.tabCCServer); - this.tabCC.Location = new System.Drawing.Point(0, 0); - this.tabCC.Name = "tabCC"; - this.tabCC.SelectedIndex = 0; - this.tabCC.Size = new System.Drawing.Size(432, 374); - this.tabCC.TabIndex = 1; - // - // tabCCSignIn - // - this.tabCCSignIn.Controls.Add(this.prgCCStatus); - this.tabCCSignIn.Controls.Add(this.lblCCStatusLabel); - this.tabCCSignIn.Controls.Add(this.lblCCStatus); - this.tabCCSignIn.Controls.Add(this.lblCCUser); - this.tabCCSignIn.Controls.Add(this.btnCCSignIn); - this.tabCCSignIn.Controls.Add(this.txtCCUser); - this.tabCCSignIn.Controls.Add(this.txtCCPassword); - this.tabCCSignIn.Controls.Add(this.lblCCPassword); - this.tabCCSignIn.Location = new System.Drawing.Point(4, 22); - this.tabCCSignIn.Name = "tabCCSignIn"; - this.tabCCSignIn.Padding = new System.Windows.Forms.Padding(3); - this.tabCCSignIn.Size = new System.Drawing.Size(424, 348); - this.tabCCSignIn.TabIndex = 0; - this.tabCCSignIn.Text = "Sign in"; - this.tabCCSignIn.UseVisualStyleBackColor = true; - // - // prgCCStatus - // - this.prgCCStatus.ForeColor = System.Drawing.SystemColors.Desktop; - this.prgCCStatus.Location = new System.Drawing.Point(10, 200); - this.prgCCStatus.Name = "prgCCStatus"; - this.prgCCStatus.Size = new System.Drawing.Size(200, 20); - this.prgCCStatus.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.prgCCStatus.TabIndex = 8; - // - // lblCCStatusLabel - // - this.lblCCStatusLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCCStatusLabel.Location = new System.Drawing.Point(10, 180); - this.lblCCStatusLabel.Name = "lblCCStatusLabel"; - this.lblCCStatusLabel.Size = new System.Drawing.Size(77, 20); - this.lblCCStatusLabel.TabIndex = 7; - this.lblCCStatusLabel.Text = "Status:"; - // - // lblCCStatus - // - this.lblCCStatus.AutoSize = true; - this.lblCCStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCCStatus.Location = new System.Drawing.Point(10, 230); - this.lblCCStatus.Name = "lblCCStatus"; - this.lblCCStatus.Size = new System.Drawing.Size(0, 17); - this.lblCCStatus.TabIndex = 6; - // - // lblCCUser - // - this.lblCCUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCCUser.Location = new System.Drawing.Point(10, 10); - this.lblCCUser.Name = "lblCCUser"; - this.lblCCUser.Size = new System.Drawing.Size(81, 20); - this.lblCCUser.TabIndex = 0; - this.lblCCUser.Text = "Username"; - // - // btnCCSignIn - // - this.btnCCSignIn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnCCSignIn.Location = new System.Drawing.Point(10, 120); - this.btnCCSignIn.Name = "btnCCSignIn"; - this.btnCCSignIn.Size = new System.Drawing.Size(100, 30); - this.btnCCSignIn.TabIndex = 4; - this.btnCCSignIn.Text = "Sign in"; - this.btnCCSignIn.UseVisualStyleBackColor = true; - this.btnCCSignIn.Click += new System.EventHandler(this.btnCCSignInClick); - // - // txtCCUser - // - this.txtCCUser.Location = new System.Drawing.Point(10, 30); - this.txtCCUser.MaxLength = 64; - this.txtCCUser.Name = "txtCCUser"; - this.txtCCUser.Size = new System.Drawing.Size(100, 20); - this.txtCCUser.TabIndex = 1; - // - // txtCCPassword - // - this.txtCCPassword.Location = new System.Drawing.Point(10, 80); - this.txtCCPassword.MaxLength = 64; - this.txtCCPassword.Name = "txtCCPassword"; - this.txtCCPassword.Size = new System.Drawing.Size(100, 20); - this.txtCCPassword.TabIndex = 3; - this.txtCCPassword.PasswordChar = '*'; - // - // lblCCPassword - // - this.lblCCPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCCPassword.Location = new System.Drawing.Point(10, 60); - this.lblCCPassword.Name = "lblCCPassword"; - this.lblCCPassword.Size = new System.Drawing.Size(77, 20); - this.lblCCPassword.TabIndex = 2; - this.lblCCPassword.Text = "Password"; - // - // tabCCServers - // - this.tabCCServers.Controls.Add(this.tblCCServers); - this.tabCCServers.Controls.Add(this.cbCCHideEmpty); - this.tabCCServers.Controls.Add(this.txtCCSearch); - this.tabCCServers.Controls.Add(this.lblCCSearch); - this.tabCCServers.Location = new System.Drawing.Point(4, 22); - this.tabCCServers.Name = "tabCCServers"; - this.tabCCServers.Padding = new System.Windows.Forms.Padding(3); - this.tabCCServers.Size = new System.Drawing.Size(424, 348); - this.tabCCServers.TabIndex = 1; - this.tabCCServers.Text = "Public servers list"; - this.tabCCServers.UseVisualStyleBackColor = true; - // - // tblCCServers - // - this.tblCCServers.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.colCCName, - this.colCCPlayers, - this.colCCMaxPlayers, - this.colCCUptime}); - this.tblCCServers.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tblCCServers.FullRowSelect = true; - this.tblCCServers.GridLines = true; - this.tblCCServers.Location = new System.Drawing.Point(0, 40); - this.tblCCServers.Name = "tblCCServers"; - this.tblCCServers.Size = new System.Drawing.Size(424, 320); - this.tblCCServers.TabIndex = 6; - this.tblCCServers.UseCompatibleStateImageBehavior = false; - this.tblCCServers.View = System.Windows.Forms.View.Details; - this.tblCCServers.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.tblCCServersColumnClick); - this.tblCCServers.DoubleClick += new System.EventHandler(this.tblCCServersDoubleClick); - // - // colCCName - // - this.colCCName.Text = "Name"; - this.colCCName.Width = 100; - // - // colCCPlayers - // - this.colCCPlayers.Text = "Players"; - this.colCCPlayers.Width = 90; - // - // colCCMaxPlayers - // - this.colCCMaxPlayers.Text = "Max players"; - this.colCCMaxPlayers.Width = 90; - // - // colCCUptime - // - this.colCCUptime.Text = "Uptime"; - this.colCCUptime.Width = 100; - // - // cbCCHideEmpty - // - this.cbCCHideEmpty.AutoSize = true; - this.cbCCHideEmpty.Location = new System.Drawing.Point(230, 3); - this.cbCCHideEmpty.Name = "cbCCHideEmpty"; - this.cbCCHideEmpty.Size = new System.Drawing.Size(116, 17); - this.cbCCHideEmpty.TabIndex = 3; - this.cbCCHideEmpty.Text = "Hide empty servers"; - this.cbCCHideEmpty.UseVisualStyleBackColor = true; - this.cbCCHideEmpty.CheckedChanged += new System.EventHandler(this.cbCCHideEmptyCheckedChanged); - // - // txtCCSearch - // - this.txtCCSearch.Location = new System.Drawing.Point(80, 10); - this.txtCCSearch.Name = "txtCCSearch"; - this.txtCCSearch.Size = new System.Drawing.Size(100, 20); - this.txtCCSearch.TabIndex = 2; - this.txtCCSearch.TextChanged += new System.EventHandler(this.txtCCSearchTextChanged); - // - // lblCCSearch - // - this.lblCCSearch.AutoSize = true; - this.lblCCSearch.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCCSearch.Location = new System.Drawing.Point(10, 10); - this.lblCCSearch.Name = "lblCCSearch"; - this.lblCCSearch.Size = new System.Drawing.Size(64, 20); - this.lblCCSearch.TabIndex = 1; - this.lblCCSearch.Text = "Search:"; - // - // tabCCServer - // - this.tabCCServer.Controls.Add(this.btnCCConnect); - this.tabCCServer.Controls.Add(this.lblCCServerUrl); - this.tabCCServer.Controls.Add(this.lblCCPublicName); - this.tabCCServer.Controls.Add(this.lblCCPlayUrl); - this.tabCCServer.Controls.Add(this.lblCCServerName); - this.tabCCServer.Controls.Add(this.txtCCHash); - this.tabCCServer.Location = new System.Drawing.Point(4, 22); - this.tabCCServer.Name = "tabCCServer"; - this.tabCCServer.Size = new System.Drawing.Size(424, 348); - this.tabCCServer.TabIndex = 2; - this.tabCCServer.Text = "classicube.net server"; - this.tabCCServer.UseVisualStyleBackColor = true; - // - // btnCCConnect - // - this.btnCCConnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnCCConnect.Location = new System.Drawing.Point(10, 120); - this.btnCCConnect.Name = "btnCCConnect"; - this.btnCCConnect.Size = new System.Drawing.Size(100, 30); - this.btnCCConnect.TabIndex = 5; - this.btnCCConnect.Text = "Connect"; - this.btnCCConnect.UseVisualStyleBackColor = true; - this.btnCCConnect.Click += new System.EventHandler(this.btnCCConnectClick); - // - // lblCCServerUrl - // - this.lblCCServerUrl.BackColor = System.Drawing.SystemColors.Control; - this.lblCCServerUrl.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCCServerUrl.Location = new System.Drawing.Point(10, 10); - this.lblCCServerUrl.Name = "lblCCServerUrl"; - this.lblCCServerUrl.Size = new System.Drawing.Size(92, 20); - this.lblCCServerUrl.TabIndex = 0; - this.lblCCServerUrl.Text = "Server URL"; - // - // lblCCPublicName - // - this.lblCCPublicName.AutoSize = true; - this.lblCCPublicName.Location = new System.Drawing.Point(10, 80); - this.lblCCPublicName.Name = "lblCCPublicName"; - this.lblCCPublicName.Size = new System.Drawing.Size(87, 13); - this.lblCCPublicName.TabIndex = 4; - this.lblCCPublicName.Text = "(No public name)"; - // - // lblCCPlayUrl - // - this.lblCCPlayUrl.AutoSize = true; - this.lblCCPlayUrl.Location = new System.Drawing.Point(10, 30); - this.lblCCPlayUrl.Name = "lblCCPlayUrl"; - this.lblCCPlayUrl.Size = new System.Drawing.Size(196, 13); - this.lblCCPlayUrl.TabIndex = 1; - this.lblCCPlayUrl.Text = "http://www.classicube.net/server/play/"; - // - // lblCCServerName - // - this.lblCCServerName.BackColor = System.Drawing.SystemColors.Control; - this.lblCCServerName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCCServerName.Location = new System.Drawing.Point(10, 60); - this.lblCCServerName.Name = "lblCCServerName"; - this.lblCCServerName.Size = new System.Drawing.Size(166, 20); - this.lblCCServerName.TabIndex = 3; - this.lblCCServerName.Text = "Public name of server"; - // - // txtCCHash - // - this.txtCCHash.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtCCHash.Location = new System.Drawing.Point(206, 30); - this.txtCCHash.Name = "txtCCHash"; - this.txtCCHash.Size = new System.Drawing.Size(190, 13); - this.txtCCHash.TabIndex = 2; - this.txtCCHash.TextChanged += new System.EventHandler(this.txtCCHashTextChanged); - // - // MainForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(432, 393); - this.Controls.Add(this.tabs); - this.Name = "MainForm"; - this.Text = Launcher.MainForm.AppName; - this.ResizeEnd += new System.EventHandler(this.MainFormResizeEnd); - this.tabMinecraftNet.ResumeLayout(false); - this.tabMC.ResumeLayout(false); - this.tabMCSignIn.ResumeLayout(false); - this.tabMCSignIn.PerformLayout(); - this.tabMCServers.ResumeLayout(false); - this.tabMCServers.PerformLayout(); - this.tabMCServer.ResumeLayout(false); - this.tabMCServer.PerformLayout(); - this.tabLocal.ResumeLayout(false); - this.tabLocal.PerformLayout(); - this.tabs.ResumeLayout(false); - this.tabClassicubeNet.ResumeLayout(false); - this.tabCC.ResumeLayout(false); - this.tabCCSignIn.ResumeLayout(false); - this.tabCCSignIn.PerformLayout(); - this.tabCCServers.ResumeLayout(false); - this.tabCCServers.PerformLayout(); - this.tabCCServer.ResumeLayout(false); - this.tabCCServer.PerformLayout(); - this.ResumeLayout(false); + this.components = new System.ComponentModel.Container(); + this.toolTip = new System.Windows.Forms.ToolTip(this.components); + this.tabMinecraftNet = new System.Windows.Forms.TabPage(); + this.tabMC = new System.Windows.Forms.TabControl(); + this.tabMCSignIn = new System.Windows.Forms.TabPage(); + this.prgMCStatus = new System.Windows.Forms.ProgressBar(); + this.lblMCStatusLabel = new System.Windows.Forms.Label(); + this.lblMCStatus = new System.Windows.Forms.Label(); + this.lbMCUser = new System.Windows.Forms.Label(); + this.btnMCSignIn = new System.Windows.Forms.Button(); + this.txtMCUser = new System.Windows.Forms.TextBox(); + this.txtMCPassword = new System.Windows.Forms.TextBox(); + this.lblMCPass = new System.Windows.Forms.Label(); + this.tabMCServers = new System.Windows.Forms.TabPage(); + this.cbMCHideInvalid = new System.Windows.Forms.CheckBox(); + this.txtMCHash = new System.Windows.Forms.TextBox(); + this.lblMCHash = new System.Windows.Forms.Label(); + this.btnMCConnect = new System.Windows.Forms.Button(); + this.tblMCServers = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.cbMCHideEmpty = new System.Windows.Forms.CheckBox(); + this.txtMCSearch = new System.Windows.Forms.TextBox(); + this.lblMCSearch = new System.Windows.Forms.Label(); + this.tabLocal = new System.Windows.Forms.TabPage(); + this.btnLanConnect = new System.Windows.Forms.Button(); + this.cbLocalSkinServerCC = new System.Windows.Forms.CheckBox(); + this.txtLanPort = new System.Windows.Forms.TextBox(); + this.lblLanPort = new System.Windows.Forms.Label(); + this.txtLanIP = new System.Windows.Forms.TextBox(); + this.lblLanIP = new System.Windows.Forms.Label(); + this.lblLanUser = new System.Windows.Forms.Label(); + this.txtLanUser = new System.Windows.Forms.TextBox(); + this.tabs = new System.Windows.Forms.TabControl(); + this.tabClassicubeNet = new System.Windows.Forms.TabPage(); + this.tabCC = new System.Windows.Forms.TabControl(); + this.tabCCSignIn = new System.Windows.Forms.TabPage(); + this.prgCCStatus = new System.Windows.Forms.ProgressBar(); + this.lblCCStatusLabel = new System.Windows.Forms.Label(); + this.lblCCStatus = new System.Windows.Forms.Label(); + this.lblCCUser = new System.Windows.Forms.Label(); + this.btnCCSignIn = new System.Windows.Forms.Button(); + this.txtCCUser = new System.Windows.Forms.TextBox(); + this.txtCCPassword = new System.Windows.Forms.TextBox(); + this.lblCCPassword = new System.Windows.Forms.Label(); + this.tabCCServers = new System.Windows.Forms.TabPage(); + this.txtCCHash = new System.Windows.Forms.TextBox(); + this.lblCCPlayUrl = new System.Windows.Forms.Label(); + this.btnCCConnect = new System.Windows.Forms.Button(); + this.tblCCServers = new System.Windows.Forms.ListView(); + this.colCCName = new System.Windows.Forms.ColumnHeader(); + this.colCCPlayers = new System.Windows.Forms.ColumnHeader(); + this.colCCMaxPlayers = new System.Windows.Forms.ColumnHeader(); + this.colCCUptime = new System.Windows.Forms.ColumnHeader(); + this.cbCCHideEmpty = new System.Windows.Forms.CheckBox(); + this.txtCCSearch = new System.Windows.Forms.TextBox(); + this.lblCCSearch = new System.Windows.Forms.Label(); + this.tabMinecraftNet.SuspendLayout(); + this.tabMC.SuspendLayout(); + this.tabMCSignIn.SuspendLayout(); + this.tabMCServers.SuspendLayout(); + this.tabLocal.SuspendLayout(); + this.tabs.SuspendLayout(); + this.tabClassicubeNet.SuspendLayout(); + this.tabCC.SuspendLayout(); + this.tabCCSignIn.SuspendLayout(); + this.tabCCServers.SuspendLayout(); + this.SuspendLayout(); + // + // tabMinecraftNet + // + this.tabMinecraftNet.Controls.Add(this.tabMC); + this.tabMinecraftNet.Location = new System.Drawing.Point(4, 22); + this.tabMinecraftNet.Name = "tabMinecraftNet"; + this.tabMinecraftNet.Padding = new System.Windows.Forms.Padding(3); + this.tabMinecraftNet.Size = new System.Drawing.Size(474, 440); + this.tabMinecraftNet.TabIndex = 1; + this.tabMinecraftNet.Text = "minecraft.net"; + this.tabMinecraftNet.UseVisualStyleBackColor = true; + // + // tabMC + // + this.tabMC.Controls.Add(this.tabMCSignIn); + this.tabMC.Controls.Add(this.tabMCServers); + this.tabMC.Location = new System.Drawing.Point(0, 0); + this.tabMC.Name = "tabMC"; + this.tabMC.SelectedIndex = 0; + this.tabMC.Size = new System.Drawing.Size(482, 444); + this.tabMC.TabIndex = 2; + // + // tabMCSignIn + // + this.tabMCSignIn.Controls.Add(this.prgMCStatus); + this.tabMCSignIn.Controls.Add(this.lblMCStatusLabel); + this.tabMCSignIn.Controls.Add(this.lblMCStatus); + this.tabMCSignIn.Controls.Add(this.lbMCUser); + this.tabMCSignIn.Controls.Add(this.btnMCSignIn); + this.tabMCSignIn.Controls.Add(this.txtMCUser); + this.tabMCSignIn.Controls.Add(this.txtMCPassword); + this.tabMCSignIn.Controls.Add(this.lblMCPass); + this.tabMCSignIn.Location = new System.Drawing.Point(4, 22); + this.tabMCSignIn.Name = "tabMCSignIn"; + this.tabMCSignIn.Padding = new System.Windows.Forms.Padding(3); + this.tabMCSignIn.Size = new System.Drawing.Size(474, 418); + this.tabMCSignIn.TabIndex = 0; + this.tabMCSignIn.Text = "Sign in"; + this.tabMCSignIn.UseVisualStyleBackColor = true; + // + // prgMCStatus + // + this.prgMCStatus.ForeColor = System.Drawing.SystemColors.Desktop; + this.prgMCStatus.Location = new System.Drawing.Point(10, 200); + this.prgMCStatus.Name = "prgMCStatus"; + this.prgMCStatus.Size = new System.Drawing.Size(200, 20); + this.prgMCStatus.Style = System.Windows.Forms.ProgressBarStyle.Continuous; + this.prgMCStatus.TabIndex = 8; + // + // lblMCStatusLabel + // + this.lblMCStatusLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblMCStatusLabel.Location = new System.Drawing.Point(10, 180); + this.lblMCStatusLabel.Name = "lblMCStatusLabel"; + this.lblMCStatusLabel.Size = new System.Drawing.Size(77, 20); + this.lblMCStatusLabel.TabIndex = 7; + this.lblMCStatusLabel.Text = "Status:"; + // + // lblMCStatus + // + this.lblMCStatus.AutoSize = true; + this.lblMCStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblMCStatus.Location = new System.Drawing.Point(10, 230); + this.lblMCStatus.Name = "lblMCStatus"; + this.lblMCStatus.Size = new System.Drawing.Size(0, 17); + this.lblMCStatus.TabIndex = 6; + // + // lbMCUser + // + this.lbMCUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbMCUser.Location = new System.Drawing.Point(10, 10); + this.lbMCUser.Name = "lbMCUser"; + this.lbMCUser.Size = new System.Drawing.Size(81, 20); + this.lbMCUser.TabIndex = 0; + this.lbMCUser.Text = "Username"; + // + // btnMCSignIn + // + this.btnMCSignIn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnMCSignIn.Location = new System.Drawing.Point(10, 120); + this.btnMCSignIn.Name = "btnMCSignIn"; + this.btnMCSignIn.Size = new System.Drawing.Size(100, 30); + this.btnMCSignIn.TabIndex = 4; + this.btnMCSignIn.Text = "Sign in"; + this.btnMCSignIn.UseVisualStyleBackColor = true; + this.btnMCSignIn.Click += new System.EventHandler(this.btnMCSignInClick); + // + // txtMCUser + // + this.txtMCUser.Location = new System.Drawing.Point(10, 30); + this.txtMCUser.MaxLength = 64; + this.txtMCUser.Name = "txtMCUser"; + this.txtMCUser.Size = new System.Drawing.Size(100, 20); + this.txtMCUser.TabIndex = 1; + // + // txtMCPassword + // + this.txtMCPassword.Location = new System.Drawing.Point(10, 80); + this.txtMCPassword.MaxLength = 64; + this.txtMCPassword.Name = "txtMCPassword"; + this.txtMCPassword.PasswordChar = '*'; + this.txtMCPassword.Size = new System.Drawing.Size(100, 20); + this.txtMCPassword.TabIndex = 3; + // + // lblMCPass + // + this.lblMCPass.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblMCPass.Location = new System.Drawing.Point(10, 60); + this.lblMCPass.Name = "lblMCPass"; + this.lblMCPass.Size = new System.Drawing.Size(77, 20); + this.lblMCPass.TabIndex = 2; + this.lblMCPass.Text = "Password"; + // + // tabMCServers + // + this.tabMCServers.Controls.Add(this.cbMCHideInvalid); + this.tabMCServers.Controls.Add(this.txtMCHash); + this.tabMCServers.Controls.Add(this.lblMCHash); + this.tabMCServers.Controls.Add(this.btnMCConnect); + this.tabMCServers.Controls.Add(this.tblMCServers); + this.tabMCServers.Controls.Add(this.cbMCHideEmpty); + this.tabMCServers.Controls.Add(this.txtMCSearch); + this.tabMCServers.Controls.Add(this.lblMCSearch); + this.tabMCServers.Location = new System.Drawing.Point(4, 22); + this.tabMCServers.Name = "tabMCServers"; + this.tabMCServers.Padding = new System.Windows.Forms.Padding(3); + this.tabMCServers.Size = new System.Drawing.Size(474, 418); + this.tabMCServers.TabIndex = 1; + this.tabMCServers.Text = "minecraft.net server"; + this.tabMCServers.UseVisualStyleBackColor = true; + // + // cbMCHideInvalid + // + this.cbMCHideInvalid.AutoSize = true; + this.cbMCHideInvalid.Location = new System.Drawing.Point(230, 21); + this.cbMCHideInvalid.Name = "cbMCHideInvalid"; + this.cbMCHideInvalid.Size = new System.Drawing.Size(118, 17); + this.cbMCHideInvalid.TabIndex = 10; + this.cbMCHideInvalid.Text = "Hide invalid servers"; + this.cbMCHideInvalid.UseVisualStyleBackColor = true; + this.cbMCHideInvalid.CheckedChanged += new System.EventHandler(this.cbMCHideInvalidCheckedChanged); + // + // txtMCHash + // + this.txtMCHash.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtMCHash.BackColor = System.Drawing.SystemColors.Window; + this.txtMCHash.Location = new System.Drawing.Point(137, 389); + this.txtMCHash.Name = "txtMCHash"; + this.txtMCHash.Size = new System.Drawing.Size(190, 20); + this.txtMCHash.TabIndex = 9; + this.txtMCHash.TextChanged += new System.EventHandler(this.txtMCHashTextChanged); + // + // lblMCHash + // + this.lblMCHash.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lblMCHash.AutoSize = true; + this.lblMCHash.Location = new System.Drawing.Point(3, 392); + this.lblMCHash.Name = "lblMCHash"; + this.lblMCHash.Size = new System.Drawing.Size(134, 13); + this.lblMCHash.TabIndex = 8; + this.lblMCHash.Text = "minecraft.net/classic/play/"; + // + // btnMCConnect + // + this.btnMCConnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnMCConnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnMCConnect.Location = new System.Drawing.Point(367, 382); + this.btnMCConnect.Name = "btnMCConnect"; + this.btnMCConnect.Size = new System.Drawing.Size(100, 30); + this.btnMCConnect.TabIndex = 7; + this.btnMCConnect.Text = "Connect"; + this.btnMCConnect.UseVisualStyleBackColor = true; + this.btnMCConnect.Click += new System.EventHandler(this.btnMCConnectClick); + // + // tblMCServers + // + this.tblMCServers.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2, + this.columnHeader3, + this.columnHeader4}); + this.tblMCServers.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tblMCServers.FullRowSelect = true; + this.tblMCServers.GridLines = true; + this.tblMCServers.HideSelection = false; + this.tblMCServers.Location = new System.Drawing.Point(0, 40); + this.tblMCServers.Name = "tblMCServers"; + this.tblMCServers.Size = new System.Drawing.Size(474, 335); + this.tblMCServers.TabIndex = 6; + this.tblMCServers.UseCompatibleStateImageBehavior = false; + this.tblMCServers.View = System.Windows.Forms.View.Details; + this.tblMCServers.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.tblMCServersColumnClick); + this.tblMCServers.Click += new System.EventHandler(this.tblMCServersClick); + // + // columnHeader1 + // + this.columnHeader1.Text = "Name"; + this.columnHeader1.Width = 100; + // + // columnHeader2 + // + this.columnHeader2.Text = "Players"; + this.columnHeader2.Width = 90; + // + // columnHeader3 + // + this.columnHeader3.Text = "Max players"; + this.columnHeader3.Width = 90; + // + // columnHeader4 + // + this.columnHeader4.Text = "Uptime"; + this.columnHeader4.Width = 100; + // + // cbMCHideEmpty + // + this.cbMCHideEmpty.AutoSize = true; + this.cbMCHideEmpty.Location = new System.Drawing.Point(230, 3); + this.cbMCHideEmpty.Name = "cbMCHideEmpty"; + this.cbMCHideEmpty.Size = new System.Drawing.Size(116, 17); + this.cbMCHideEmpty.TabIndex = 3; + this.cbMCHideEmpty.Text = "Hide empty servers"; + this.cbMCHideEmpty.UseVisualStyleBackColor = true; + this.cbMCHideEmpty.CheckedChanged += new System.EventHandler(this.cbMCHideEmptyCheckedChanged); + // + // txtMCSearch + // + this.txtMCSearch.Location = new System.Drawing.Point(80, 10); + this.txtMCSearch.Name = "txtMCSearch"; + this.txtMCSearch.Size = new System.Drawing.Size(100, 20); + this.txtMCSearch.TabIndex = 2; + this.txtMCSearch.TextChanged += new System.EventHandler(this.txtMCSearchTextChanged); + // + // lblMCSearch + // + this.lblMCSearch.AutoSize = true; + this.lblMCSearch.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblMCSearch.Location = new System.Drawing.Point(10, 10); + this.lblMCSearch.Name = "lblMCSearch"; + this.lblMCSearch.Size = new System.Drawing.Size(64, 20); + this.lblMCSearch.TabIndex = 1; + this.lblMCSearch.Text = "Search:"; + // + // tabLocal + // + this.tabLocal.Controls.Add(this.btnLanConnect); + this.tabLocal.Controls.Add(this.cbLocalSkinServerCC); + this.tabLocal.Controls.Add(this.txtLanPort); + this.tabLocal.Controls.Add(this.lblLanPort); + this.tabLocal.Controls.Add(this.txtLanIP); + this.tabLocal.Controls.Add(this.lblLanIP); + this.tabLocal.Controls.Add(this.lblLanUser); + this.tabLocal.Controls.Add(this.txtLanUser); + this.tabLocal.Location = new System.Drawing.Point(4, 22); + this.tabLocal.Name = "tabLocal"; + this.tabLocal.Padding = new System.Windows.Forms.Padding(3); + this.tabLocal.Size = new System.Drawing.Size(474, 440); + this.tabLocal.TabIndex = 0; + this.tabLocal.Text = "Local server"; + this.tabLocal.UseVisualStyleBackColor = true; + // + // btnLanConnect + // + this.btnLanConnect.AutoSize = true; + this.btnLanConnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnLanConnect.Location = new System.Drawing.Point(10, 200); + this.btnLanConnect.Name = "btnLanConnect"; + this.btnLanConnect.Size = new System.Drawing.Size(86, 30); + this.btnLanConnect.TabIndex = 7; + this.btnLanConnect.Text = "Connect"; + this.btnLanConnect.UseVisualStyleBackColor = true; + this.btnLanConnect.Click += new System.EventHandler(this.BtnLanConnectClick); + // + // cbLocalSkinServerCC + // + this.cbLocalSkinServerCC.Location = new System.Drawing.Point(10, 160); + this.cbLocalSkinServerCC.Name = "cbLocalSkinServerCC"; + this.cbLocalSkinServerCC.Size = new System.Drawing.Size(180, 20); + this.cbLocalSkinServerCC.TabIndex = 6; + this.cbLocalSkinServerCC.Text = "Use Classicube.net for skins"; + this.cbLocalSkinServerCC.UseVisualStyleBackColor = true; + // + // txtLanPort + // + this.txtLanPort.Location = new System.Drawing.Point(10, 130); + this.txtLanPort.MaxLength = 6; + this.txtLanPort.Name = "txtLanPort"; + this.txtLanPort.Size = new System.Drawing.Size(100, 20); + this.txtLanPort.TabIndex = 5; + this.txtLanPort.Text = "25565"; + // + // lblLanPort + // + this.lblLanPort.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblLanPort.Location = new System.Drawing.Point(10, 110); + this.lblLanPort.Name = "lblLanPort"; + this.lblLanPort.Size = new System.Drawing.Size(100, 20); + this.lblLanPort.TabIndex = 4; + this.lblLanPort.Text = "Port number"; + // + // txtLanIP + // + this.txtLanIP.Location = new System.Drawing.Point(10, 80); + this.txtLanIP.Name = "txtLanIP"; + this.txtLanIP.Size = new System.Drawing.Size(100, 20); + this.txtLanIP.TabIndex = 3; + this.txtLanIP.Text = "127.0.0.1"; + // + // lblLanIP + // + this.lblLanIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblLanIP.Location = new System.Drawing.Point(10, 60); + this.lblLanIP.Name = "lblLanIP"; + this.lblLanIP.Size = new System.Drawing.Size(150, 20); + this.lblLanIP.TabIndex = 2; + this.lblLanIP.Text = "Local IP address"; + // + // lblLanUser + // + this.lblLanUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblLanUser.Location = new System.Drawing.Point(10, 10); + this.lblLanUser.Name = "lblLanUser"; + this.lblLanUser.Size = new System.Drawing.Size(100, 20); + this.lblLanUser.TabIndex = 1; + this.lblLanUser.Text = "Username"; + // + // txtLanUser + // + this.txtLanUser.Location = new System.Drawing.Point(10, 30); + this.txtLanUser.MaxLength = 64; + this.txtLanUser.Name = "txtLanUser"; + this.txtLanUser.Size = new System.Drawing.Size(100, 20); + this.txtLanUser.TabIndex = 0; + // + // tabs + // + this.tabs.Controls.Add(this.tabLocal); + this.tabs.Controls.Add(this.tabMinecraftNet); + this.tabs.Controls.Add(this.tabClassicubeNet); + this.tabs.Location = new System.Drawing.Point(-1, 0); + this.tabs.Name = "tabs"; + this.tabs.SelectedIndex = 0; + this.tabs.Size = new System.Drawing.Size(482, 466); + this.tabs.TabIndex = 0; + // + // tabClassicubeNet + // + this.tabClassicubeNet.Controls.Add(this.tabCC); + this.tabClassicubeNet.Location = new System.Drawing.Point(4, 22); + this.tabClassicubeNet.Name = "tabClassicubeNet"; + this.tabClassicubeNet.Size = new System.Drawing.Size(474, 440); + this.tabClassicubeNet.TabIndex = 2; + this.tabClassicubeNet.Text = "classicube.net"; + this.tabClassicubeNet.UseVisualStyleBackColor = true; + // + // tabCC + // + this.tabCC.Controls.Add(this.tabCCSignIn); + this.tabCC.Controls.Add(this.tabCCServers); + this.tabCC.Location = new System.Drawing.Point(0, 0); + this.tabCC.Name = "tabCC"; + this.tabCC.SelectedIndex = 0; + this.tabCC.Size = new System.Drawing.Size(482, 444); + this.tabCC.TabIndex = 1; + // + // tabCCSignIn + // + this.tabCCSignIn.Controls.Add(this.prgCCStatus); + this.tabCCSignIn.Controls.Add(this.lblCCStatusLabel); + this.tabCCSignIn.Controls.Add(this.lblCCStatus); + this.tabCCSignIn.Controls.Add(this.lblCCUser); + this.tabCCSignIn.Controls.Add(this.btnCCSignIn); + this.tabCCSignIn.Controls.Add(this.txtCCUser); + this.tabCCSignIn.Controls.Add(this.txtCCPassword); + this.tabCCSignIn.Controls.Add(this.lblCCPassword); + this.tabCCSignIn.Location = new System.Drawing.Point(4, 22); + this.tabCCSignIn.Name = "tabCCSignIn"; + this.tabCCSignIn.Padding = new System.Windows.Forms.Padding(3); + this.tabCCSignIn.Size = new System.Drawing.Size(474, 418); + this.tabCCSignIn.TabIndex = 0; + this.tabCCSignIn.Text = "Sign in"; + this.tabCCSignIn.UseVisualStyleBackColor = true; + // + // prgCCStatus + // + this.prgCCStatus.ForeColor = System.Drawing.SystemColors.Desktop; + this.prgCCStatus.Location = new System.Drawing.Point(10, 200); + this.prgCCStatus.Name = "prgCCStatus"; + this.prgCCStatus.Size = new System.Drawing.Size(200, 20); + this.prgCCStatus.Style = System.Windows.Forms.ProgressBarStyle.Continuous; + this.prgCCStatus.TabIndex = 8; + // + // lblCCStatusLabel + // + this.lblCCStatusLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCCStatusLabel.Location = new System.Drawing.Point(10, 180); + this.lblCCStatusLabel.Name = "lblCCStatusLabel"; + this.lblCCStatusLabel.Size = new System.Drawing.Size(77, 20); + this.lblCCStatusLabel.TabIndex = 7; + this.lblCCStatusLabel.Text = "Status:"; + // + // lblCCStatus + // + this.lblCCStatus.AutoSize = true; + this.lblCCStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCCStatus.Location = new System.Drawing.Point(10, 230); + this.lblCCStatus.Name = "lblCCStatus"; + this.lblCCStatus.Size = new System.Drawing.Size(0, 17); + this.lblCCStatus.TabIndex = 6; + // + // lblCCUser + // + this.lblCCUser.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCCUser.Location = new System.Drawing.Point(10, 10); + this.lblCCUser.Name = "lblCCUser"; + this.lblCCUser.Size = new System.Drawing.Size(81, 20); + this.lblCCUser.TabIndex = 0; + this.lblCCUser.Text = "Username"; + // + // btnCCSignIn + // + this.btnCCSignIn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnCCSignIn.Location = new System.Drawing.Point(10, 120); + this.btnCCSignIn.Name = "btnCCSignIn"; + this.btnCCSignIn.Size = new System.Drawing.Size(100, 30); + this.btnCCSignIn.TabIndex = 4; + this.btnCCSignIn.Text = "Sign in"; + this.btnCCSignIn.UseVisualStyleBackColor = true; + this.btnCCSignIn.Click += new System.EventHandler(this.btnCCSignInClick); + // + // txtCCUser + // + this.txtCCUser.Location = new System.Drawing.Point(10, 30); + this.txtCCUser.MaxLength = 64; + this.txtCCUser.Name = "txtCCUser"; + this.txtCCUser.Size = new System.Drawing.Size(100, 20); + this.txtCCUser.TabIndex = 1; + // + // txtCCPassword + // + this.txtCCPassword.Location = new System.Drawing.Point(10, 80); + this.txtCCPassword.MaxLength = 64; + this.txtCCPassword.Name = "txtCCPassword"; + this.txtCCPassword.PasswordChar = '*'; + this.txtCCPassword.Size = new System.Drawing.Size(100, 20); + this.txtCCPassword.TabIndex = 3; + // + // lblCCPassword + // + this.lblCCPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCCPassword.Location = new System.Drawing.Point(10, 60); + this.lblCCPassword.Name = "lblCCPassword"; + this.lblCCPassword.Size = new System.Drawing.Size(77, 20); + this.lblCCPassword.TabIndex = 2; + this.lblCCPassword.Text = "Password"; + // + // tabCCServers + // + this.tabCCServers.Controls.Add(this.txtCCHash); + this.tabCCServers.Controls.Add(this.lblCCPlayUrl); + this.tabCCServers.Controls.Add(this.btnCCConnect); + this.tabCCServers.Controls.Add(this.tblCCServers); + this.tabCCServers.Controls.Add(this.cbCCHideEmpty); + this.tabCCServers.Controls.Add(this.txtCCSearch); + this.tabCCServers.Controls.Add(this.lblCCSearch); + this.tabCCServers.Location = new System.Drawing.Point(4, 22); + this.tabCCServers.Name = "tabCCServers"; + this.tabCCServers.Padding = new System.Windows.Forms.Padding(3); + this.tabCCServers.Size = new System.Drawing.Size(474, 418); + this.tabCCServers.TabIndex = 1; + this.tabCCServers.Text = "classicube.net server"; + this.tabCCServers.UseVisualStyleBackColor = true; + // + // txtCCHash + // + this.txtCCHash.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtCCHash.BackColor = System.Drawing.SystemColors.Window; + this.txtCCHash.Location = new System.Drawing.Point(170, 389); + this.txtCCHash.Name = "txtCCHash"; + this.txtCCHash.Size = new System.Drawing.Size(190, 20); + this.txtCCHash.TabIndex = 9; + this.txtCCHash.TextChanged += new System.EventHandler(this.txtCCHashTextChanged); + // + // lblCCPlayUrl + // + this.lblCCPlayUrl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lblCCPlayUrl.AutoSize = true; + this.lblCCPlayUrl.Location = new System.Drawing.Point(3, 392); + this.lblCCPlayUrl.Name = "lblCCPlayUrl"; + this.lblCCPlayUrl.Size = new System.Drawing.Size(165, 13); + this.lblCCPlayUrl.TabIndex = 8; + this.lblCCPlayUrl.Text = "www.classicube.net/server/play/"; + // + // btnCCConnect + // + this.btnCCConnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnCCConnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnCCConnect.Location = new System.Drawing.Point(367, 382); + this.btnCCConnect.Name = "btnCCConnect"; + this.btnCCConnect.Size = new System.Drawing.Size(100, 30); + this.btnCCConnect.TabIndex = 7; + this.btnCCConnect.Text = "Connect"; + this.btnCCConnect.UseVisualStyleBackColor = true; + this.btnCCConnect.Click += new System.EventHandler(this.btnCCConnectClick); + // + // tblCCServers + // + this.tblCCServers.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.colCCName, + this.colCCPlayers, + this.colCCMaxPlayers, + this.colCCUptime}); + this.tblCCServers.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tblCCServers.FullRowSelect = true; + this.tblCCServers.GridLines = true; + this.tblCCServers.HideSelection = false; + this.tblCCServers.Location = new System.Drawing.Point(0, 40); + this.tblCCServers.Name = "tblCCServers"; + this.tblCCServers.Size = new System.Drawing.Size(474, 335); + this.tblCCServers.TabIndex = 6; + this.tblCCServers.UseCompatibleStateImageBehavior = false; + this.tblCCServers.View = System.Windows.Forms.View.Details; + this.tblCCServers.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.tblCCServersColumnClick); + this.tblCCServers.Click += new System.EventHandler(this.tblCCServersClick); + // + // colCCName + // + this.colCCName.Text = "Name"; + this.colCCName.Width = 100; + // + // colCCPlayers + // + this.colCCPlayers.Text = "Players"; + this.colCCPlayers.Width = 90; + // + // colCCMaxPlayers + // + this.colCCMaxPlayers.Text = "Max players"; + this.colCCMaxPlayers.Width = 90; + // + // colCCUptime + // + this.colCCUptime.Text = "Uptime"; + this.colCCUptime.Width = 100; + // + // cbCCHideEmpty + // + this.cbCCHideEmpty.AutoSize = true; + this.cbCCHideEmpty.Location = new System.Drawing.Point(230, 3); + this.cbCCHideEmpty.Name = "cbCCHideEmpty"; + this.cbCCHideEmpty.Size = new System.Drawing.Size(116, 17); + this.cbCCHideEmpty.TabIndex = 3; + this.cbCCHideEmpty.Text = "Hide empty servers"; + this.cbCCHideEmpty.UseVisualStyleBackColor = true; + this.cbCCHideEmpty.CheckedChanged += new System.EventHandler(this.cbCCHideEmptyCheckedChanged); + // + // txtCCSearch + // + this.txtCCSearch.Location = new System.Drawing.Point(80, 10); + this.txtCCSearch.Name = "txtCCSearch"; + this.txtCCSearch.Size = new System.Drawing.Size(100, 20); + this.txtCCSearch.TabIndex = 2; + this.txtCCSearch.TextChanged += new System.EventHandler(this.txtCCSearchTextChanged); + // + // lblCCSearch + // + this.lblCCSearch.AutoSize = true; + this.lblCCSearch.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCCSearch.Location = new System.Drawing.Point(10, 10); + this.lblCCSearch.Name = "lblCCSearch"; + this.lblCCSearch.Size = new System.Drawing.Size(64, 20); + this.lblCCSearch.TabIndex = 1; + this.lblCCSearch.Text = "Search:"; + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(484, 462); + this.Controls.Add(this.tabs); + this.Name = "MainForm"; + this.Text = "ClassicalSharp Launcher 0.5"; + this.ResizeEnd += new System.EventHandler(this.MainFormResizeEnd); + this.tabMinecraftNet.ResumeLayout(false); + this.tabMC.ResumeLayout(false); + this.tabMCSignIn.ResumeLayout(false); + this.tabMCSignIn.PerformLayout(); + this.tabMCServers.ResumeLayout(false); + this.tabMCServers.PerformLayout(); + this.tabLocal.ResumeLayout(false); + this.tabLocal.PerformLayout(); + this.tabs.ResumeLayout(false); + this.tabClassicubeNet.ResumeLayout(false); + this.tabCC.ResumeLayout(false); + this.tabCCSignIn.ResumeLayout(false); + this.tabCCSignIn.PerformLayout(); + this.tabCCServers.ResumeLayout(false); + this.tabCCServers.PerformLayout(); + this.ResumeLayout(false); } - private System.Windows.Forms.ListView tblMCServers; + private System.Windows.Forms.CheckBox cbMCHideInvalid; + private System.Windows.Forms.Label lblMCSearch; + private System.Windows.Forms.TextBox txtMCSearch; + private System.Windows.Forms.CheckBox cbMCHideEmpty; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ListView tblMCServers; + private System.Windows.Forms.Button btnMCConnect; + private System.Windows.Forms.Label lblMCHash; + private System.Windows.Forms.TextBox txtMCHash; + private System.Windows.Forms.TabPage tabMCServers; + private System.Windows.Forms.Label lblMCPass; + private System.Windows.Forms.TextBox txtMCPassword; + private System.Windows.Forms.TextBox txtMCUser; + private System.Windows.Forms.Button btnMCSignIn; + private System.Windows.Forms.Label lbMCUser; + private System.Windows.Forms.Label lblMCStatus; + private System.Windows.Forms.Label lblMCStatusLabel; + private System.Windows.Forms.ProgressBar prgMCStatus; + private System.Windows.Forms.TabPage tabMCSignIn; + private System.Windows.Forms.TabControl tabMC; private System.Windows.Forms.TextBox txtCCHash; - private System.Windows.Forms.Label lblCCServerName; private System.Windows.Forms.Label lblCCPlayUrl; - private System.Windows.Forms.Label lblCCPublicName; - private System.Windows.Forms.Label lblCCServerUrl; private System.Windows.Forms.Button btnCCConnect; - private System.Windows.Forms.TabPage tabCCServer; private System.Windows.Forms.Label lblCCSearch; private System.Windows.Forms.TextBox txtCCSearch; private System.Windows.Forms.ColumnHeader colCCUptime; @@ -817,16 +745,7 @@ namespace Launcher private System.Windows.Forms.TabPage tabCCSignIn; private System.Windows.Forms.TabControl tabCC; - private System.Windows.Forms.CheckBox cbMCHideEmpty; - private System.Windows.Forms.CheckBox cbMCHideInvalid; - private System.Windows.Forms.ProgressBar prgMCStatus; - private System.Windows.Forms.Label lblMCStatus; - private System.Windows.Forms.Label lblMCStatusLabel; private System.Windows.Forms.TabPage tabClassicubeNet; - private System.Windows.Forms.TabPage tabMCServer; - private System.Windows.Forms.TabPage tabMCServers; - private System.Windows.Forms.TabPage tabMCSignIn; - private System.Windows.Forms.TabControl tabMC; private System.Windows.Forms.TextBox txtLanUser; private System.Windows.Forms.Label lblLanUser; private System.Windows.Forms.Label lblLanIP; @@ -838,23 +757,6 @@ namespace Launcher private System.Windows.Forms.TabControl tabs; private System.Windows.Forms.TabPage tabLocal; private System.Windows.Forms.TabPage tabMinecraftNet; - private System.Windows.Forms.Label lblMCUser; - private System.Windows.Forms.TextBox txtMCUser; - private System.Windows.Forms.Label lblMCPassword; - private System.Windows.Forms.TextBox txtMCPassword; - private System.Windows.Forms.Button btnMCSignIn; - private System.Windows.Forms.Button btnMCConnect; - private System.Windows.Forms.Label lblMCServerName; - private System.Windows.Forms.Label lblMCPublicName; - private System.Windows.Forms.Label lblMCServerUrl; - private System.Windows.Forms.Label lblMCPlayUrl; - private System.Windows.Forms.TextBox txtMCHash; - private System.Windows.Forms.Label lblMCSearch; - private System.Windows.Forms.TextBox txtMCSearch; - private System.Windows.Forms.ColumnHeader colMCUptime; - private System.Windows.Forms.ColumnHeader colMCMaxPlayers; - private System.Windows.Forms.ColumnHeader colMCPlayers; - private System.Windows.Forms.ColumnHeader colMCName; private System.Windows.Forms.ToolTip toolTip; } } \ No newline at end of file diff --git a/Launcher/MainForm.GameState.cs b/Launcher/MainForm.GameState.cs new file mode 100644 index 000000000..16817bdb9 --- /dev/null +++ b/Launcher/MainForm.GameState.cs @@ -0,0 +1,184 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Drawing; +using System.Net; +using System.Threading; +using System.Windows.Forms; + +namespace Launcher { + + public delegate void Action( T1 arg1, T2 arg2 ); + + internal class GameState { + public ProgressBar Progress; + public Label Status; + public TextBox Username, Password; + public List Servers; + public string HostServer; + public GameSession Session; + public Button SignInButton; + public TabControl Tab; + public TabPage ServersTab; + public ListView ServersTable; + public TextBox Hash; + public Predicate Filter; + public MainForm form; + + public void DoSignIn() { + if( String.IsNullOrEmpty( Username.Text ) ) { + MessageBox.Show( "Please enter a username." ); + return; + } + if( String.IsNullOrEmpty( Password.Text ) ) { + MessageBox.Show( "Please enter a password." ); + return; + } + + if( Session.Username != null ) { + Session.ResetSession(); + ServersTable.Items.Clear(); + Servers.Clear(); + } + SignInButton.Enabled = false; + Tab.TabPages.Remove( ServersTab ); + Thread loginThread = new Thread( LoginAsync ); + loginThread.Name = "Launcher.LoginAsync_" + HostServer; + loginThread.IsBackground = true; + loginThread.Start(); + } + + void LoginAsync() { + SetStatus( 0, "Signing in.." ); + try { + Session.Login( Username.Text, Password.Text ); + } catch( WebException ex ) { + Session.Username = null; + LoginEnd( false ); + DisplayWebException( ex, "sign in", SetStatus ); + return; + } catch( InvalidOperationException ex ) { + Session.Username = null; + LoginEnd( false ); + string text = "Failed to sign in: " + Environment.NewLine + ex.Message; + SetStatus( 0, text ); + return; + } + + SetStatus( 50, "Retrieving public servers list.." ); + try { + Servers = Session.GetPublicServers(); + } catch( WebException ex ) { + Servers = new List(); + LoginEnd( false ); + DisplayWebException( ex, "retrieve servers list", SetStatus ); + return; + } + SetStatus( 100, "Done" ); + LoginEnd( true ); + } + + public void LoginEnd( bool success ) { + if( form.InvokeRequired ) { + form.Invoke( (Action)LoginEnd, success ); + } else { + GC.Collect(); + if( success ) { + Tab.TabPages.Add( ServersTab ); + FilterList(); + } + SignInButton.Enabled = true; + } + } + + void SetStatus( int percentage, string text ) { + if( form.InvokeRequired ) { + form.Invoke( (Action)SetStatus, percentage, text ); + } else { + Progress.Value = percentage; + Status.Text = text; + } + } + + public void ConnectToServer() { + GameStartData data = null; + try { + data = Session.GetConnectInfo( Hash.Text ); + } catch( WebException ex ) { + DisplayWebException( ex, "retrieve server info", + (p, text) => MessageBox.Show( text ) ); + return; + } + MainForm.StartClient( data, true ); + } + + public void FilterList() { + ServersTable.Items.Clear(); + if( Servers.Count == 0 ) return; + IComparer sorter = ServersTable.ListViewItemSorter; + ServersTable.ListViewItemSorter = null; + + for( int i = 0; i < Servers.Count; i++ ) { + ServerListEntry entry = Servers[i]; + if( Filter( entry ) ) { + string[] row = { entry.Name, entry.Players, entry.MaximumPlayers, entry.Uptime, entry.Hash }; + ServersTable.Items.Add( new ListViewItem( row ) ); + } + } + if( sorter != null ) { + ServersTable.ListViewItemSorter = sorter; + ServersTable.Sort(); + } + ServersTable.EndUpdate(); + } + + public void HashChanged() { + string hash = Hash.Text; + ListView.SelectedIndexCollection selected = ServersTable.SelectedIndices; + if( selected.Count > 0 ) { + ServersTable.Items[selected[0]].Selected = false; + } + + int count = ServersTable.Items.Count; + for( int i = 0; i < count; i++ ) { + ListViewItem entry = ServersTable.Items[i]; + if( hash == entry.SubItems[4].Text ) { + entry.Selected = true; + ServersTable.EnsureVisible( i ); + break; + } + } + } + + public void ServerTableClick() { + Point mousePos = ServersTable.PointToClient( MainForm.MousePosition ); + ListViewHitTestInfo hitTest = ServersTable.HitTest( mousePos ); + if( hitTest != null && hitTest.Item != null ) { + Hash.Text = hitTest.Item.SubItems[4].Text; + } + } + + void DisplayWebException( WebException ex, string action, Action target ) { + string host = HostServer; + if( ex.Status == WebExceptionStatus.Timeout ) { + string text = "Failed to " + action + ":" + + Environment.NewLine + "Timed out while connecting to " + host + ", it may be down."; + target( 0, text ); + } else if( ex.Status == WebExceptionStatus.ProtocolError ) { + HttpWebResponse response = (HttpWebResponse)ex.Response; + int errorCode = (int)response.StatusCode; + string description = response.StatusDescription; + string text = "Failed to " + action + ":" + + Environment.NewLine + host + " returned: (" + errorCode + ") " + description; + target( 0, text ); + } else if( ex.Status == WebExceptionStatus.NameResolutionFailure ) { + string text = "Failed to " + action + ":" + + Environment.NewLine + "Unable to resolve " + host + ", you may not be connected to the internet."; + target( 0, text ); + } else { + string text = "Failed to " + action + ":" + Environment.NewLine + ex.Status; + target( 0, text ); + } + } + } +} \ No newline at end of file diff --git a/Launcher/MainForm.cs b/Launcher/MainForm.cs index 58b0cafae..3b420ad20 100644 --- a/Launcher/MainForm.cs +++ b/Launcher/MainForm.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Drawing; -using System.Net; -using System.Net.Sockets; -using System.Threading; -using System.Windows.Forms; +using System; +using System.ComponentModel; +using System.Diagnostics; +using System.Drawing; +using System.Net; +using System.Net.Sockets; +using System.Windows.Forms; namespace Launcher { @@ -19,15 +16,32 @@ namespace Launcher { InitializeComponent(); AdjustTabs(); SetTooltips(); - tblMCServers.HandleCreated += tblMCServersHandleCreated; - tblCCServers.HandleCreated += tblCCServersHandleCreated; // hide tabs at start tabMC.TabPages.Remove( tabMCServers ); - tabMC.TabPages.Remove( tabMCServer ); tabCC.TabPages.Remove( tabCCServers ); - tabCC.TabPages.Remove( tabCCServer ); Shown += DisplayResourcesDialog; + + mc = new GameState() { Progress = prgMCStatus, Status = lblMCStatus, + Username = txtMCUser, Password = txtMCPassword, HostServer = "minecraft.net", + Session = new MinecraftSession(), SignInButton = btnMCSignIn, Tab = tabMC, + ServersTab = tabMCServers, ServersTable = tblMCServers, Hash = txtMCHash, + form = this }; + cc = new GameState() { Progress = prgCCStatus, Status = lblCCStatus, + Username = txtCCUser, Password = txtCCPassword, HostServer = "classicube.net", + Session = new ClassicubeSession(), SignInButton = btnCCSignIn, Tab = tabCC, + ServersTab = tabCCServers, ServersTable = tblCCServers, Hash = txtCCHash, + form = this }; + + mc.Filter = e => + // NOTE: using ToLower().Contains() allocates too many unecessary strings. + e.Name.IndexOf( txtMCSearch.Text, StringComparison.OrdinalIgnoreCase ) >= 0 + && ( cbMCHideEmpty.Checked ? e.Players[0] != '0' : true ) + && ( cbMCHideInvalid.Checked ? Int32.Parse( e.Players ) < 600 : true ); + cc.Filter = e => + e.Name.IndexOf( txtCCSearch.Text, StringComparison.OrdinalIgnoreCase ) >= 0 + && ( cbCCHideEmpty.Checked ? e.Players[0] != '0' : true ); } + GameState mc, cc; void DisplayResourcesDialog( object sender, EventArgs e ) { // TODO: async fetching @@ -36,14 +50,12 @@ namespace Launcher { DialogResult result = MessageBox.Show( "Some required resources weren't found. Would you like to download them now?", "Missing resources", MessageBoxButtons.OKCancel ); - if( result == DialogResult.OK ) { + if( result == DialogResult.OK ) { fetcher.Run( this ); Text = AppName; - } + } } } - - delegate void Action( T1 arg1, T2 arg2 ); void SetTooltips() { toolTip.SetToolTip( lblLanUser, "The username to use when connecting to the local server. " + Environment.NewLine + @@ -64,82 +76,21 @@ namespace Launcher { void AdjustTabs() { tabs.Width = ClientSize.Width + 6; tabs.Height = ClientSize.Height + 3; - tabMC.Width = tabCC.Width = tabs.SelectedTab.Size.Width + 10; + tabMC.Width = tabCC.Width = tabs.Width; tabMC.Height = tabCC.Height = tabs.SelectedTab.Size.Height + 10; if( tblMCServers.IsHandleCreated ) { - AdjustTablePos( tblMCServers ); + AdjustTablePos( tblMCServers, btnMCConnect ); } if( tblCCServers.IsHandleCreated ) { - AdjustTablePos( tblCCServers ); + AdjustTablePos( tblCCServers, btnCCConnect ); } } - void tblMCServersHandleCreated( object sender, EventArgs e ) { - AdjustTablePos( tblMCServers ); - } - - void tblCCServersHandleCreated( object sender, EventArgs e ) { - AdjustTablePos( tblCCServers ); - } - - void AdjustTablePos( Control control ) { + void AdjustTablePos( Control control, Control connectButton ) { Point formLoc = PointToClient( control.Parent.PointToScreen( control.Location ) ); control.Width = ClientSize.Width - formLoc.X; - control.Height = ClientSize.Height - formLoc.Y; - } - - static string missingExeMessage = "Failed to start ClassicalSharp. (classicalsharp.exe was not found)" - + Environment.NewLine + Environment.NewLine + - "This application is only the launcher, it is not the actual client. " + - "Please place the launcher in the same directory as the client (classicalsharp.exe)."; - - static void StartClient( GameStartData data, bool classicubeSkins ) { - string skinServer = classicubeSkins ? "http://www.classicube.net/static/skins/" : "http://s3.amazonaws.com/MinecraftSkins/"; - string args = data.Username + " " + data.Mppass + " " + - data.Ip + " " + data.Port + " " + skinServer; - Log( "starting..." + args ); - Process process = null; - try { - process = Process.Start( "classicalsharp.exe", args ); - } catch( Win32Exception ex ) { - if( ex.Message.Contains( "The system cannot find the file specified" ) ) { - MessageBox.Show( missingExeMessage ); - } else { - throw; - } - } finally { - if( process != null ) { - process.Dispose(); - } - } - } - - static void Log( string text ) { - System.Diagnostics.Debug.WriteLine( text ); - } - - static void DisplayWebException( WebException ex, string action, string host, Action target ) { - if( ex.Status == WebExceptionStatus.Timeout ) { - string text = "Failed to " + action + ":" + - Environment.NewLine + "Timed out while connecting to " + host + ", it may be down."; - target( 0, text ); - } else if( ex.Status == WebExceptionStatus.ProtocolError ) { - HttpWebResponse response = (HttpWebResponse)ex.Response; - int errorCode = (int)response.StatusCode; - string description = response.StatusDescription; - string text = "Failed to " + action + ":" + - Environment.NewLine + host + " returned: (" + errorCode + ") " + description; - target( 0, text ); - } else if( ex.Status == WebExceptionStatus.NameResolutionFailure ) { - string text = "Failed to " + action + ":" + - Environment.NewLine + "Unable to resolve " + host + ", you may not be connected to the internet."; - target( 0, text ); - } else { - string text = "Failed to " + action + ":" + - Environment.NewLine + ex.Status; - target( 0, text ); - } + control.Height = ClientSize.Height - formLoc.Y - connectButton.Height - 5; } #region Local tab @@ -186,12 +137,6 @@ namespace Launcher { #endregion - - #region minecraft.net tab - - MinecraftSession mcSession = new MinecraftSession(); - List mcServers = new List(); - NameComparer mcNameComparer = new NameComparer( 0 ); NumericalComparer mcPlayersComparer = new NumericalComparer( 1 ); NumericalComparer mcMaxPlayersComparer = new NumericalComparer( 2 ); @@ -213,165 +158,21 @@ namespace Launcher { tblMCServers.Sort(); } - void McFilterList() { - tblMCServers.Items.Clear(); - if( mcServers.Count == 0 ) return; - IComparer sorter = tblMCServers.ListViewItemSorter; - tblMCServers.ListViewItemSorter = null; - - tblMCServers.BeginUpdate(); - Predicate filter = e => - // NOTE: using ToLower().Contains() allocates too many unecessary strings. - e.Name.IndexOf( txtMCSearch.Text, StringComparison.OrdinalIgnoreCase ) >= 0 - && ( cbMCHideEmpty.Checked ? e.Players[0] != '0' : true ) - && ( cbMCHideInvalid.Checked ? Int32.Parse( e.Players ) < 600 : true ); - - for( int i = 0; i < mcServers.Count; i++ ) { - ServerListEntry entry = mcServers[i]; - if( filter( entry ) ) { - string[] row = { entry.Name, entry.Players, entry.MaximumPlayers, entry.Uptime, entry.Hash }; - tblMCServers.Items.Add( new ListViewItem( row ) ); - } - } - if( sorter != null ) { - tblMCServers.ListViewItemSorter = sorter; - tblMCServers.Sort(); - } - tblMCServers.EndUpdate(); - } + void txtMCSearchTextChanged( object sender, EventArgs e ) { mc.FilterList(); } - void txtMCSearchTextChanged( object sender, EventArgs e ) { - McFilterList(); - } + void cbMCHideEmptyCheckedChanged( object sender, EventArgs e ) { mc.FilterList(); } - void cbMCHideEmptyCheckedChanged( object sender, EventArgs e ) { - McFilterList(); - } + void cbMCHideInvalidCheckedChanged(object sender, EventArgs e ) { mc.FilterList(); } - void cbMCHideInvalidCheckedChanged(object sender, EventArgs e ) { - McFilterList(); - } + void tblMCServersClick( object sender, EventArgs e ) { mc.ServerTableClick(); } - void tblMCServersDoubleClick( object sender, EventArgs e ) { - Point mousePos = tblMCServers.PointToClient( MousePosition ); - ListViewHitTestInfo hitTest = tblMCServers.HitTest( mousePos ); - if( hitTest != null && hitTest.Item != null ) { - txtMCHash.Text = hitTest.Item.SubItems[4].Text; - tabMC.SelectedIndex = 2; - } - } + void txtMCHashTextChanged( object sender, EventArgs e ) { mc.HashChanged(); } - void txtMCHashTextChanged( object sender, EventArgs e ) { - string hash = txtMCHash.Text; - lblMCPublicName.Text = "No public name"; - for( int i = 0; i < mcServers.Count; i++ ) { - ServerListEntry entry = mcServers[i]; - if( hash == entry.Hash ) { - lblMCPublicName.Text = entry.Name; - break; - } - } - } + void btnMCConnectClick( object sender, EventArgs e ) { mc.ConnectToServer(); } - void btnMCConnectClick( object sender, EventArgs e ) { - GameStartData data = null; - try { - data = mcSession.GetConnectInfo( txtMCHash.Text ); - } catch( WebException ex ) { - DisplayWebException( ex, "retrieve server info", "minecraft.net", - (p, text) => MessageBox.Show( text ) ); - return; - } - StartClient( data, false ); - } + void btnMCSignInClick( object sender, EventArgs e ) { mc.DoSignIn(); } - void btnMCSignInClick( object sender, EventArgs e ) { - if( String.IsNullOrEmpty( txtMCUser.Text ) ) { - MessageBox.Show( "Please enter a username." ); - return; - } - if( String.IsNullOrEmpty( txtMCPassword.Text ) ) { - MessageBox.Show( "Please enter a password." ); - return; - } - - if( mcSession.Username != null ) { - mcSession.ResetSession(); - tblMCServers.Items.Clear(); - mcServers.Clear(); - } - btnMCSignIn.Enabled = false; - tabMC.TabPages.Remove( tabMCServers ); - tabMC.TabPages.Remove( tabMCServer ); - mcLoginThread = new Thread( McLoginAsync ); - mcLoginThread.Name = "Launcher.McLoginAsync"; - mcLoginThread.IsBackground = true; - mcLoginThread.Start(); - } - - Thread mcLoginThread; - void McLoginAsync() { - SetMcStatus( 0, "Signing in.." ); - try { - mcSession.Login( txtMCUser.Text, txtMCPassword.Text ); - } catch( WebException ex ) { - mcSession.Username = null; - McLoginEnd( false ); - DisplayWebException( ex, "sign in", "minecraft.net", SetMcStatus ); - return; - } catch( InvalidOperationException ex ) { - SetMcStatus( 0, "Failed to sign in" ); - mcSession.Username = null; - McLoginEnd( false ); - string text = "Failed to sign in: " + Environment.NewLine + ex.Message; - SetMcStatus( 0, text ); - return; - } - - SetMcStatus( 50, "Retrieving public servers list.." ); - try { - mcServers = mcSession.GetPublicServers(); - } catch( WebException ex ) { - mcServers = new List(); - McLoginEnd( false ); - DisplayWebException( ex, "retrieve servers list", "minecraft.net", SetMcStatus ); - return; - } - SetMcStatus( 100, "Done" ); - McLoginEnd( true ); - } - - void McLoginEnd( bool success ) { - if( InvokeRequired ) { - Invoke( (Action)McLoginEnd, success ); - } else { - GC.Collect(); - if( success ) { - tabMC.TabPages.Add( tabMCServers ); - tabMC.TabPages.Add( tabMCServer ); - McFilterList(); - } - btnMCSignIn.Enabled = true; - } - } - void SetMcStatus( int percentage, string text ) { - if( InvokeRequired ) { - Invoke( (Action)SetMcStatus, percentage, text ); - } else { - prgMCStatus.Value = percentage; - lblMCStatus.Text = text; - } - } - - #endregion - - - #region classicube.net tab - - ClassicubeSession ccSession = new ClassicubeSession(); - List ccServers = new List(); - NameComparer ccNameComparer = new NameComparer( 0 ); NumericalComparer ccPlayersComparer = new NumericalComparer( 1 ); NumericalComparer ccMaxPlayersComparer = new NumericalComparer( 2 ); @@ -391,151 +192,40 @@ namespace Launcher { tblCCServers.Sort(); } - void CcFilterList() { - tblCCServers.Items.Clear(); - if( ccServers.Count == 0 ) return; - IComparer sorter = tblCCServers.ListViewItemSorter; - tblCCServers.ListViewItemSorter = null; - - tblCCServers.BeginUpdate(); - Predicate filter = e => - e.Name.IndexOf( txtCCSearch.Text, StringComparison.OrdinalIgnoreCase ) >= 0 - && ( cbCCHideEmpty.Checked ? e.Players[0] != '0' : true ); - - for( int i = 0; i < ccServers.Count; i++ ) { - ServerListEntry entry = ccServers[i]; - if( filter( entry ) ) { - string[] row = { entry.Name, entry.Players, entry.MaximumPlayers, entry.Uptime, entry.Hash }; - tblCCServers.Items.Add( new ListViewItem( row ) ); - } - } - if( sorter != null ) { - tblCCServers.ListViewItemSorter = sorter; - tblCCServers.Sort(); - } - tblCCServers.EndUpdate(); - } + void txtCCSearchTextChanged( object sender, EventArgs e ) { cc.FilterList(); } - void txtCCSearchTextChanged( object sender, EventArgs e ) { - CcFilterList(); - } + void cbCCHideEmptyCheckedChanged( object sender, EventArgs e ) { cc.FilterList(); } - void cbCCHideEmptyCheckedChanged( object sender, EventArgs e ) { - CcFilterList(); - } + void tblCCServersClick( object sender, EventArgs e ) { cc.ServerTableClick(); } - void tblCCServersDoubleClick( object sender, EventArgs e ) { - Point mousePos = tblCCServers.PointToClient( MousePosition ); - ListViewHitTestInfo hitTest = tblCCServers.HitTest( mousePos ); - if( hitTest != null && hitTest.Item != null ) { - txtCCHash.Text = hitTest.Item.SubItems[4].Text; - tabCC.SelectedIndex = 2; - } - } + void txtCCHashTextChanged( object sender, EventArgs e ) { cc.HashChanged(); } - void txtCCHashTextChanged( object sender, EventArgs e ) { - string hash = txtCCHash.Text; - lblCCPublicName.Text = "No public name"; - for( int i = 0; i < ccServers.Count; i++ ) { - ServerListEntry entry = ccServers[i]; - if( hash == entry.Hash ) { - lblCCPublicName.Text = entry.Name; - break; - } - } - } + void btnCCConnectClick( object sender, EventArgs e ) { cc.ConnectToServer(); } - void btnCCConnectClick( object sender, EventArgs e ) { - GameStartData data = null; - try { - data = ccSession.GetConnectInfo( txtCCHash.Text ); - } catch( WebException ex ) { - DisplayWebException( ex, "retrieve server info", "classicube.net", - (p, text) => MessageBox.Show( text ) ); - return; - } - StartClient( data, true ); - } - - void btnCCSignInClick( object sender, EventArgs e ) { - if( String.IsNullOrEmpty( txtCCUser.Text ) ) { - MessageBox.Show( "Please enter a username." ); - return; - } - if( String.IsNullOrEmpty( txtCCPassword.Text ) ) { - MessageBox.Show( "Please enter a password." ); - return; - } - - if( ccSession.Username != null ) { - ccSession.ResetSession(); - tblCCServers.Items.Clear(); - ccServers.Clear(); - } - btnCCSignIn.Enabled = false; - tabCC.TabPages.Remove( tabCCServers ); - tabCC.TabPages.Remove( tabCCServer ); - ccLoginThread = new Thread( CcLoginAsync ); - ccLoginThread.Name = "Launcher.CcLoginAsync"; - ccLoginThread.IsBackground = true; - ccLoginThread.Start(); - } - - Thread ccLoginThread; - void CcLoginAsync() { - SetCcStatus( 0, "Signing in.." ); - try { - ccSession.Login( txtCCUser.Text, txtCCPassword.Text ); - } catch( WebException ex ) { - ccSession.Username = null; - CcLoginEnd( false ); - DisplayWebException( ex, "sign in", "classicube.net", SetCcStatus ); - return; - } catch( InvalidOperationException ex ) { - SetCcStatus( 0, "Failed to sign in" ); - ccSession.Username = null; - CcLoginEnd( false ); - string text = "Failed to sign in: " + Environment.NewLine + ex.Message; - SetCcStatus( 0, text ); - return; - } - - SetCcStatus( 50, "Retrieving public servers list.." ); - try { - ccServers = ccSession.GetPublicServers(); - } catch( WebException ex ) { - ccServers = new List(); - CcLoginEnd( false ); - DisplayWebException( ex, "retrieve servers list", "classicube.net", SetCcStatus ); - return; - } - SetCcStatus( 100, "Done" ); - CcLoginEnd( true ); - } - - void CcLoginEnd( bool success ) { - if( InvokeRequired ) { - Invoke( (Action)CcLoginEnd, success ); - } else { - GC.Collect(); - if( success ) { - tabCC.TabPages.Add( tabCCServers ); - tabCC.TabPages.Add( tabCCServer ); - CcFilterList(); - } - btnCCSignIn.Enabled = true; - } - } - - void SetCcStatus( int percentage, string text ) { - if( InvokeRequired ) { - Invoke( (Action)SetCcStatus, percentage, text ); - } else { - prgCCStatus.Value = percentage; - lblCCStatus.Text = text; - } - } - - #endregion + void btnCCSignInClick( object sender, EventArgs e ) { cc.DoSignIn(); } + + + static string missingExeMessage = "Failed to start ClassicalSharp. (classicalsharp.exe was not found)" + + Environment.NewLine + Environment.NewLine + + "This application is only the launcher, it is not the actual client. " + + "Please place the launcher in the same directory as the client (classicalsharp.exe)."; + + internal static void StartClient( GameStartData data, bool classicubeSkins ) { + string skinServer = classicubeSkins ? "http://www.classicube.net/static/skins/" : "http://s3.amazonaws.com/MinecraftSkins/"; + string args = data.Username + " " + data.Mppass + " " + + data.Ip + " " + data.Port + " " + skinServer; + System.Diagnostics.Debug.WriteLine( "starting..." + args ); + Process process = null; + + try { + process = Process.Start( "classicalsharp.exe", args ); + } catch( Win32Exception ex ) { + if( ex.Message.Contains( "The system cannot find the file specified" ) ) { + MessageBox.Show( missingExeMessage ); + } else { + throw; + } + } + } } } \ No newline at end of file diff --git a/Launcher/MainForm.resx b/Launcher/MainForm.resx index 77dbb1f52..9e924f355 100644 --- a/Launcher/MainForm.resx +++ b/Launcher/MainForm.resx @@ -117,8 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + 17, 17 - + \ No newline at end of file diff --git a/launcher instructions.txt b/launcher instructions.txt index b1f0e4ab4..a7bd8088b 100644 --- a/launcher instructions.txt +++ b/launcher instructions.txt @@ -1,6 +1,6 @@ * Note that the first time you run the launcher, a dialog box will pop up with the message "Some required resources weren't found." Just click OK. (This is because I cannot redistribute -the assets of Mine craft Classic with the application as they are the copyrighted property of Mojang) +the assets of MineCraft Classic with the application as they are the copyrighted property of Mojang) The launcher is divided into 3 tabs. They are: 1) Local tab @@ -11,18 +11,18 @@ custom skins if you are not connected to the internet, however) Click "connect" to start the client. -2) Mine craft.net -### Note: Mojang appears to have deleted all of the unpaid free accounts. Premium accounts should still -### work though. The public servers list on minecraft.net is also completely stuffed. There are servers -### that appear on the list that are either fake, or don't actually exist anymore. -### You are probably better off just using ClassiCube.net. +2) MineCraft.net +# Note: Mojang appears to have deleted all of the unpaid free accounts. Premium accounts should still +# work though. The public servers list on minecraft.net is also completely stuffed, as most servers +# that appear on the list that are either fake or don't actually exist anymore. +# You are probably better off just using ClassiCube.net. You will need to provide the username and password for your minecraft.net account. Then click sign in. If sign-in was successful, two new tabs should appear beside 'Sign in'. You can then either: -A) Browse the public servers list and double-click on a server (Which will then take you to the 'minecraft.net server' tab with the hash filled in for you) -B) Directly enter in a hash in the 'minecraft.net server' tab. +A) Browse the public servers list and click on a cell (Which will then fill in the hash textbox) +B) Directly enter in a hash into the hash textbox. Then click "connect". The launcher will then download the necessary information about the server from minecraft.net and start the client.