From de6b200709678dae7b574d08efaec8758e3e819c Mon Sep 17 00:00:00 2001 From: sili98 <sili98@sch.bme.hu> Date: Mon, 25 May 2020 11:14:02 +0200 Subject: [PATCH] Last commit before presentation. --- zsirozas/Form1.Designer.cs | 92 ++++++++++++++++++++------------------ zsirozas/Form1.cs | 14 +++--- 2 files changed, 56 insertions(+), 50 deletions(-) diff --git a/zsirozas/Form1.Designer.cs b/zsirozas/Form1.Designer.cs index e220aa5..d1f1863 100644 --- a/zsirozas/Form1.Designer.cs +++ b/zsirozas/Form1.Designer.cs @@ -6,8 +6,10 @@ namespace zsirozas /// <summary> /// Required designer variable. /// </summary> + private System.ComponentModel.IContainer components = null; + /// <summary> /// Clean up any resources being used. /// </summary> @@ -31,6 +33,9 @@ namespace zsirozas { this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPageWelcome = new System.Windows.Forms.TabPage(); + this.panel4 = new System.Windows.Forms.Panel(); + this.textBoxSignalRUrl = new System.Windows.Forms.TextBox(); + this.buttonUseSignalR = new System.Windows.Forms.Button(); this.label8 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.textBoxIncomingPort = new System.Windows.Forms.TextBox(); @@ -53,7 +58,6 @@ namespace zsirozas this.buttonLogout = new System.Windows.Forms.Button(); this.groupBoxOwnRoom = new System.Windows.Forms.GroupBox(); this.labelOwnRoomName = new System.Windows.Forms.Label(); - this.button4 = new System.Windows.Forms.Button(); this.buttonCreateRoom = new System.Windows.Forms.Button(); this.listBoxOwnRoom = new System.Windows.Forms.ListBox(); this.label2 = new System.Windows.Forms.Label(); @@ -84,10 +88,9 @@ namespace zsirozas this.buttonCard1 = new System.Windows.Forms.Button(); this.buttonCard0 = new System.Windows.Forms.Button(); this.buttonEndTurn = new System.Windows.Forms.Button(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); this.tabControl1.SuspendLayout(); this.tabPageWelcome.SuspendLayout(); + this.panel4.SuspendLayout(); this.tabPageServer.SuspendLayout(); this.panel3.SuspendLayout(); this.groupBoxOwnRoom.SuspendLayout(); @@ -98,7 +101,6 @@ namespace zsirozas this.panelPlayer1.SuspendLayout(); this.panelGame.SuspendLayout(); this.panelCards.SuspendLayout(); - this.tabPage1.SuspendLayout(); this.SuspendLayout(); // // tabControl1 @@ -106,7 +108,6 @@ namespace zsirozas this.tabControl1.Controls.Add(this.tabPageWelcome); this.tabControl1.Controls.Add(this.tabPageServer); this.tabControl1.Controls.Add(this.tabPageGame); - this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Name = "tabControl1"; @@ -116,6 +117,7 @@ namespace zsirozas // // tabPageWelcome // + this.tabPageWelcome.Controls.Add(this.panel4); this.tabPageWelcome.Controls.Add(this.label8); this.tabPageWelcome.Controls.Add(this.label7); this.tabPageWelcome.Controls.Add(this.textBoxIncomingPort); @@ -140,6 +142,37 @@ namespace zsirozas this.tabPageWelcome.Text = "Welcome"; this.tabPageWelcome.UseVisualStyleBackColor = true; // + // panel4 + // + this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.panel4.BackColor = System.Drawing.Color.Wheat; + this.panel4.Controls.Add(this.textBoxSignalRUrl); + this.panel4.Controls.Add(this.buttonUseSignalR); + this.panel4.Location = new System.Drawing.Point(366, 281); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(307, 69); + this.panel4.TabIndex = 14; + // + // textBoxSignalRUrl + // + this.textBoxSignalRUrl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxSignalRUrl.Location = new System.Drawing.Point(19, 31); + this.textBoxSignalRUrl.Name = "textBoxSignalRUrl"; + this.textBoxSignalRUrl.Size = new System.Drawing.Size(173, 20); + this.textBoxSignalRUrl.TabIndex = 1; + this.textBoxSignalRUrl.Text = "http://127.0.0.1:9080"; + // + // buttonUseSignalR + // + this.buttonUseSignalR.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.buttonUseSignalR.Location = new System.Drawing.Point(198, 14); + this.buttonUseSignalR.Name = "buttonUseSignalR"; + this.buttonUseSignalR.Size = new System.Drawing.Size(93, 37); + this.buttonUseSignalR.TabIndex = 0; + this.buttonUseSignalR.Text = "Használj SignalR-t"; + this.buttonUseSignalR.UseVisualStyleBackColor = true; + this.buttonUseSignalR.Click += new System.EventHandler(this.buttonUseSignalR_Click); + // // label8 // this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -317,7 +350,6 @@ namespace zsirozas this.tabPageServer.Controls.Add(this.listBoxUsers); this.tabPageServer.Controls.Add(this.listBoxRooms); this.tabPageServer.Controls.Add(this.label6); - this.tabPageServer.Controls.Add(this.buttonStartGame); this.tabPageServer.Location = new System.Drawing.Point(4, 22); this.tabPageServer.Name = "tabPageServer"; this.tabPageServer.Padding = new System.Windows.Forms.Padding(3); @@ -360,9 +392,9 @@ namespace zsirozas // this.groupBoxOwnRoom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.groupBoxOwnRoom.Controls.Add(this.labelOwnRoomName); - this.groupBoxOwnRoom.Controls.Add(this.button4); this.groupBoxOwnRoom.Controls.Add(this.buttonCreateRoom); this.groupBoxOwnRoom.Controls.Add(this.listBoxOwnRoom); + this.groupBoxOwnRoom.Controls.Add(this.buttonStartGame); this.groupBoxOwnRoom.Location = new System.Drawing.Point(436, 220); this.groupBoxOwnRoom.Name = "groupBoxOwnRoom"; this.groupBoxOwnRoom.Size = new System.Drawing.Size(246, 139); @@ -379,16 +411,6 @@ namespace zsirozas this.labelOwnRoomName.TabIndex = 3; this.labelOwnRoomName.Text = "roomName"; // - // button4 - // - this.button4.Location = new System.Drawing.Point(165, 40); - this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(75, 23); - this.button4.TabIndex = 2; - this.button4.Text = "Játék"; - this.button4.UseVisualStyleBackColor = true; - this.button4.Click += new System.EventHandler(this.button4_Click); - // // buttonCreateRoom // this.buttonCreateRoom.Location = new System.Drawing.Point(165, 10); @@ -447,6 +469,7 @@ namespace zsirozas this.listBoxRooms.Size = new System.Drawing.Size(101, 329); this.listBoxRooms.TabIndex = 2; this.listBoxRooms.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBoxRooms_MouseDoubleClick); + //this.listBoxRooms.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listBoxRooms_DrawItem); // // label6 // @@ -456,15 +479,16 @@ namespace zsirozas this.label6.Size = new System.Drawing.Size(219, 26); this.label6.TabIndex = 1; this.label6.Text = "Jelenleg nincsnek külön szobák a szerveren.\r\nMindenki a RoomZero szoba tagja."; + this.label6.Visible = false; // // buttonStartGame // this.buttonStartGame.Enabled = false; - this.buttonStartGame.Location = new System.Drawing.Point(341, 95); + this.buttonStartGame.Location = new System.Drawing.Point(165, 39); this.buttonStartGame.Name = "buttonStartGame"; this.buttonStartGame.Size = new System.Drawing.Size(75, 23); this.buttonStartGame.TabIndex = 0; - this.buttonStartGame.Text = "Start game"; + this.buttonStartGame.Text = "Játék"; this.buttonStartGame.UseVisualStyleBackColor = true; this.buttonStartGame.Click += new System.EventHandler(this.buttonStartGame_Click); // @@ -701,25 +725,6 @@ namespace zsirozas this.buttonEndTurn.UseVisualStyleBackColor = true; this.buttonEndTurn.Click += new System.EventHandler(this.buttonEndTurn_Click); // - // tabPage1 - // - this.tabPage1.Controls.Add(this.groupBox1); - this.tabPage1.Location = new System.Drawing.Point(4, 22); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.Size = new System.Drawing.Size(690, 367); - this.tabPage1.TabIndex = 3; - this.tabPage1.Text = "tabPage1"; - this.tabPage1.UseVisualStyleBackColor = true; - // - // groupBox1 - // - this.groupBox1.Location = new System.Drawing.Point(423, 59); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(200, 100); - this.groupBox1.TabIndex = 4; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "groupBox1"; - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -733,6 +738,8 @@ namespace zsirozas this.tabControl1.ResumeLayout(false); this.tabPageWelcome.ResumeLayout(false); this.tabPageWelcome.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); this.tabPageServer.ResumeLayout(false); this.tabPageServer.PerformLayout(); this.panel3.ResumeLayout(false); @@ -749,7 +756,6 @@ namespace zsirozas this.panelGame.ResumeLayout(false); this.panelGame.PerformLayout(); this.panelCards.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); this.ResumeLayout(false); } @@ -799,11 +805,8 @@ namespace zsirozas private System.Windows.Forms.Label label7; private System.Windows.Forms.TextBox textBoxIncomingPort; private System.Windows.Forms.TextBox textBoxUserNickname; - private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.ListBox listBoxRooms; private System.Windows.Forms.GroupBox groupBoxOwnRoom; - private System.Windows.Forms.Button button4; private System.Windows.Forms.Button buttonCreateRoom; private System.Windows.Forms.ListBox listBoxOwnRoom; private System.Windows.Forms.Label label2; @@ -813,5 +816,8 @@ namespace zsirozas private System.Windows.Forms.Button buttonRefreshServer; private System.Windows.Forms.Button buttonLogout; private System.Windows.Forms.Label labelOwnRoomName; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Button buttonUseSignalR; + private System.Windows.Forms.TextBox textBoxSignalRUrl; } -} \ No newline at end of file +} diff --git a/zsirozas/Form1.cs b/zsirozas/Form1.cs index 2963ec1..abdc57f 100644 --- a/zsirozas/Form1.cs +++ b/zsirozas/Form1.cs @@ -431,7 +431,7 @@ namespace zsirozas //todo "nem játsik" jlezés buttonCreateRoom.Text = "Új szoba"; buttonCreateRoom.Enabled = true; - button4.Enabled = false; + buttonStartGame.Enabled = false; } else { @@ -447,7 +447,7 @@ namespace zsirozas //todo "játszik" helzés buttonCreateRoom.Text = "Kilépés"; buttonCreateRoom.Enabled = true; - button4.Enabled = true; + buttonStartGame.Enabled = true; } } } @@ -476,11 +476,6 @@ namespace zsirozas } } - private void button4_Click(object sender, EventArgs e) - { - - } - private void listBoxOwnRoom_MouseDoubleClick(object sender, MouseEventArgs e) { int idx = (sender as ListBox).IndexFromPoint(e.Location); @@ -492,5 +487,10 @@ namespace zsirozas //TODO: ki is rúgni } } + + private void buttonUseSignalR_Click(object sender, EventArgs e) + { + //todo connect with signalR + } } } -- GitLab