private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Window)); this.guna2BorderlessForm1 = new Guna.UI2.WinForms.Guna2BorderlessForm(this.components); this.TitleBar = new Guna.UI2.WinForms.Guna2Panel(); this.MinimizeButton = new Guna.UI2.WinForms.Guna2Button(); this.CloseButton = new Guna.UI2.WinForms.Guna2Button(); this.TitleText = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.StatusText = new System.Windows.Forms.Label(); this.AttachButton = new Guna.UI2.WinForms.Guna2GradientButton(); this.TitleBar.SuspendLayout(); this.SuspendLayout(); // // guna2BorderlessForm1 // this.guna2BorderlessForm1.AnimateWindow = true; this.guna2BorderlessForm1.AnimationInterval = 200; this.guna2BorderlessForm1.BorderRadius = 20; this.guna2BorderlessForm1.ContainerControl = this; this.guna2BorderlessForm1.DockForm = false; this.guna2BorderlessForm1.DockIndicatorColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(12)))), ((int)(((byte)(12))))); this.guna2BorderlessForm1.ResizeForm = false; // // TitleBar // this.TitleBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(24)))), ((int)(((byte)(24)))), ((int)(((byte)(24))))); this.TitleBar.Controls.Add(this.MinimizeButton); this.TitleBar.Controls.Add(this.CloseButton); this.TitleBar.Controls.Add(this.TitleText); this.TitleBar.Location = new System.Drawing.Point(0, 0); this.TitleBar.Name = "TitleBar"; this.TitleBar.ShadowDecoration.Parent = this.TitleBar; this.TitleBar.Size = new System.Drawing.Size(700, 30); this.TitleBar.TabIndex = 0; // // MinimizeButton // this.MinimizeButton.BackColor = System.Drawing.Color.Transparent; this.MinimizeButton.CheckedState.Parent = this.MinimizeButton; this.MinimizeButton.CustomImages.Parent = this.MinimizeButton; this.MinimizeButton.FillColor = System.Drawing.Color.Transparent; this.MinimizeButton.Font = new System.Drawing.Font("Segoe UI", 9F); this.MinimizeButton.ForeColor = System.Drawing.Color.White; this.MinimizeButton.HoverState.Parent = this.MinimizeButton; this.MinimizeButton.Image = ((System.Drawing.Image)(resources.GetObject("MinimizeButton.Image"))); this.MinimizeButton.ImageSize = new System.Drawing.Size(40, 40); this.MinimizeButton.Location = new System.Drawing.Point(640, 0); this.MinimizeButton.Name = "MinimizeButton"; this.MinimizeButton.ShadowDecoration.Parent = this.MinimizeButton; this.MinimizeButton.Size = new System.Drawing.Size(30, 30); this.MinimizeButton.TabIndex = 2; this.MinimizeButton.UseTransparentBackground = true; this.MinimizeButton.Click += new System.EventHandler(this.MinimizeButton_Click); // // CloseButton // this.CloseButton.BackColor = System.Drawing.Color.Transparent; this.CloseButton.CheckedState.Parent = this.CloseButton; this.CloseButton.CustomImages.Parent = this.CloseButton; this.CloseButton.FillColor = System.Drawing.Color.Transparent; this.CloseButton.Font = new System.Drawing.Font("Segoe UI", 9F); this.CloseButton.ForeColor = System.Drawing.Color.White; this.CloseButton.HoverState.Parent = this.CloseButton; this.CloseButton.Image = ((System.Drawing.Image)(resources.GetObject("CloseButton.Image"))); this.CloseButton.ImageSize = new System.Drawing.Size(40, 40); this.CloseButton.Location = new System.Drawing.Point(670, 0); this.CloseButton.Name = "CloseButton"; this.CloseButton.ShadowDecoration.Parent = this.CloseButton; this.CloseButton.Size = new System.Drawing.Size(30, 30); this.CloseButton.TabIndex = 1; this.CloseButton.UseTransparentBackground = true; this.CloseButton.Click += new System.EventHandler(this.CloseButton_Click); // // TitleText // this.TitleText.BackColor = System.Drawing.Color.Transparent; this.TitleText.Font = new System.Drawing.Font("Gotham SSm Black", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.TitleText.ForeColor = System.Drawing.Color.DimGray; this.TitleText.Location = new System.Drawing.Point(0, 0); this.TitleText.Name = "TitleText"; this.TitleText.Size = new System.Drawing.Size(196, 30); this.TitleText.TabIndex = 1; this.TitleText.Text = "Aurora Client"; this.TitleText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label13 // this.label13.BackColor = System.Drawing.Color.Transparent; this.label13.Font = new System.Drawing.Font("Gotham SSm Black", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label13.ForeColor = System.Drawing.Color.White; this.label13.Location = new System.Drawing.Point(0, 83); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(700, 55); this.label13.TabIndex = 3; this.label13.Text = "Welcome!"; this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // label14 // this.label14.BackColor = System.Drawing.Color.Transparent; this.label14.Font = new System.Drawing.Font("Gotham SSm Black", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label14.ForeColor = System.Drawing.Color.DimGray; this.label14.Location = new System.Drawing.Point(0, 138); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(700, 27); this.label14.TabIndex = 4; this.label14.Text = "Clicking \"Attach\" will attach to Roblox."; this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // StatusText // this.StatusText.BackColor = System.Drawing.Color.Transparent; this.StatusText.Font = new System.Drawing.Font("Gotham SSm Black", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.StatusText.ForeColor = System.Drawing.Color.DimGray; this.StatusText.Location = new System.Drawing.Point(0, 249); this.StatusText.Name = "StatusText"; this.StatusText.Size = new System.Drawing.Size(700, 27); this.StatusText.TabIndex = 6; this.StatusText.Text = "Status: You haven\'t clicked Attach yet!"; this.StatusText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.StatusText.Click += new System.EventHandler(this.StatusText_Click); // // AttachButton // this.AttachButton.Animated = true; this.AttachButton.AutoRoundedCorners = true; this.AttachButton.BorderRadius = 10; this.AttachButton.CheckedState.Parent = this.AttachButton; this.AttachButton.CustomImages.Parent = this.AttachButton; this.AttachButton.FillColor = System.Drawing.Color.LightSeaGreen; this.AttachButton.FillColor2 = System.Drawing.Color.MediumSpringGreen; this.AttachButton.Font = new System.Drawing.Font("Gotham SSm Black", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.AttachButton.ForeColor = System.Drawing.Color.White; this.AttachButton.HoverState.FillColor = System.Drawing.Color.MediumSpringGreen; this.AttachButton.HoverState.FillColor2 = System.Drawing.Color.LightSeaGreen; this.AttachButton.HoverState.Parent = this.AttachButton; this.AttachButton.Location = new System.Drawing.Point(260, 201); this.AttachButton.Name = "AttachButton"; this.AttachButton.ShadowDecoration.Parent = this.AttachButton; this.AttachButton.Size = new System.Drawing.Size(180, 45); this.AttachButton.TabIndex = 7; this.AttachButton.Text = "Attach"; this.AttachButton.Click += new System.EventHandler(this.AttachButton_Click_1); // // Window // this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(12)))), ((int)(((byte)(12))))); this.ClientSize = new System.Drawing.Size(700, 400); this.Controls.Add(this.AttachButton); this.Controls.Add(this.StatusText); this.Controls.Add(this.label14); this.Controls.Add(this.label13); this.Controls.Add(this.TitleBar); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "Window"; this.TitleBar.ResumeLayout(false); this.ResumeLayout(false); }
private int pnl_number; // luc khoi tao thi dung de tao panel con luc chay thi dung de xac dinh dang o panel nao //public ResultForm() //{ // InitializeComponent(); //} public ResultForm(GameForm parent, startGameForm grand_parent, mainForm grand_parent_parent) { InitializeComponent(); listbtn = new Guna.UI2.WinForms.Guna2Button[parent.gameManager.quesData.number_question]; this.grand_parent = grand_parent; this.grand_parent_parent = grand_parent_parent; this.parent = parent; string a = "Câu "; // Tao so luong panel; if (parent.gameManager.quesData.number_question % 8 == 0) { listpnl = new Guna.UI2.WinForms.Guna2Panel[parent.gameManager.quesData.number_question / 8]; } else { listpnl = new Guna.UI2.WinForms.Guna2Panel[parent.gameManager.quesData.number_question / 8 + 1]; } for (int j = 0; j < listpnl.Length; j++) { listpnl[j] = new Guna.UI2.WinForms.Guna2Panel() { Location = new System.Drawing.Point(27, 120), Size = new System.Drawing.Size(284, 428) }; this.listpnl[j].BackColor = System.Drawing.Color.Transparent; this.Controls.Add(listpnl[j]); } pnl_number = 0; // Tao btn //for (int i = 0; i < parent.gameManager.quesData.number_question; i++) //{ // a = "Câu "; // a = a + (i + 1).ToString(); // listbtn[i] = new Guna.UI2.WinForms.Guna2Button() { Text = a, Size = new System.Drawing.Size(30, 50) }; // listbtn[i].BorderRadius = 20; // listbtn[i].Font = new System.Drawing.Font("Segoe UI", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); // if (this.parent.gameManager.quesData.Result[i] == 1) // { // //listbtn[i].FillColor = System.Drawing.SystemColors.ActiveCaption; // listbtn[i].FillColor = System.Drawing.Color.MediumSeaGreen; // } // else // { // listbtn[i].FillColor = System.Drawing.Color.IndianRed; // } // listbtn[i].ForeColor = System.Drawing.Color.White; // listpnl[pnl_number].Controls.Add(listbtn[i]); // if (pnl_member == 8) // { // pnl_member = 1; // pnl_number++; // } // else // { // pnl_member++; // } // listbtn[i].Dock = DockStyle.Top; // listbtn[i].Click += (s, e) => // { // //listpnl[current_question/8].BringToFront(); // foreach (Guna.UI2.WinForms.Guna2Button x in listbtn) // { // if (s == x) // { // string temp = x.Text.Substring(4); // current_question = Convert.ToInt32(temp); // OpenQuestion(Convert.ToInt32(temp) - 1); // } // } // }; // //if (i > this.parent.gameManager.current_ques_index) // //{ // // listbtn[i].Enabled = false; // //} // //listbtn[i].CheckedChanged += (s, e) => // //{ // // string temp = listbtn[i].Text.Substring(listbtn[i].Text.Length - 1, 1); // // OpenQuestion(Convert.ToInt32(temp)); // //}; //} //pnl_number = 0; // khoi tao khi mo form thi se mo panel 0 //listpnl[0].BringToFront(); for (int i = 0; listbtn[parent.gameManager.quesData.number_question - 1] == null;) { if (pnl_member + 8 * pnl_number > parent.gameManager.quesData.number_question) { pnl_member--; continue; } a = "Câu "; a = a + (pnl_member + 8 * pnl_number).ToString(); listbtn[i] = new Guna.UI2.WinForms.Guna2Button() { Text = a, Size = new System.Drawing.Size(30, 50) }; listbtn[i].BorderRadius = 20; listbtn[i].Font = new System.Drawing.Font("Segoe UI", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); if (this.parent.gameManager.quesData.Result[Convert.ToInt32(listbtn[i].Text.Substring(4)) - 1] == 1) { //listbtn[i].FillColor = System.Drawing.SystemColors.ActiveCaption; listbtn[i].FillColor = System.Drawing.Color.MediumSeaGreen; } else { listbtn[i].FillColor = System.Drawing.Color.IndianRed; } listbtn[i].ForeColor = System.Drawing.Color.White; listpnl[pnl_number].Controls.Add(listbtn[i]); if (pnl_member <= 1) { pnl_member = 8; pnl_number++; } else { pnl_member--; } listbtn[i].Dock = DockStyle.Top; listbtn[i].Click += (s, e) => { panel_Question.BringToFront(); foreach (Guna.UI2.WinForms.Guna2Button x in listbtn) { if (s == x) { string temp = x.Text.Substring(4); current_question = Convert.ToInt32(temp); OpenQuestion(Convert.ToInt32(temp) - 1); } } }; string k = listbtn[i].Text.Substring(4); if (Convert.ToInt32(k) - 1 > this.parent.gameManager.current_ques_index) { //listbtn[i].Enabled = false; listbtn[i].FillColor = System.Drawing.Color.LightSlateGray; } i++; //listbtn[i].CheckedChanged += (s, e) => //{ // string temp = listbtn[i].Text.Substring(listbtn[i].Text.Length - 1, 1); // OpenQuestion(Convert.ToInt32(temp)); //}; } pnl_number = 0; // khoi tao khi mo form thi se mo panel 0 listpnl[0].BringToFront(); OpenQuestion(0); // vua mo len la load cau so 1 len lien :3 }
/// <summary> /// Tasarımcı desteği için gerekli metot - bu metodun ///içeriğini kod düzenleyici ile değiştirmeyin. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Home)); guna2Panel1 = new Guna.UI2.WinForms.Guna2Panel(); this.addBtn = new System.Windows.Forms.PictureBox(); this.bestBtn = new System.Windows.Forms.PictureBox(); this.rulesBtn = new System.Windows.Forms.PictureBox(); this.homeBtn = new System.Windows.Forms.PictureBox(); this.ucHomePanel = new Guna.UI2.WinForms.Guna2Panel(); this.guna2BorderlessForm1 = new Guna.UI2.WinForms.Guna2BorderlessForm(this.components); this.guna2DragControl1 = new Guna.UI2.WinForms.Guna2DragControl(this.components); this.guna2Panel2 = new Guna.UI2.WinForms.Guna2Panel(); this.pictureBox5 = new System.Windows.Forms.PictureBox(); this.pictureBox4 = new System.Windows.Forms.PictureBox(); this.guna2DragControl2 = new Guna.UI2.WinForms.Guna2DragControl(this.components); guna2Panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.addBtn)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bestBtn)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rulesBtn)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.homeBtn)).BeginInit(); this.guna2Panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit(); this.SuspendLayout(); // // guna2Panel1 // guna2Panel1.BackColor = System.Drawing.Color.Transparent; guna2Panel1.BorderRadius = 30; guna2Panel1.Controls.Add(this.addBtn); guna2Panel1.Controls.Add(this.bestBtn); guna2Panel1.Controls.Add(this.rulesBtn); guna2Panel1.Controls.Add(this.homeBtn); guna2Panel1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(12)))), ((int)(((byte)(50))))); guna2Panel1.Location = new System.Drawing.Point(-4, -2); guna2Panel1.Name = "guna2Panel1"; guna2Panel1.ShadowDecoration.Parent = guna2Panel1; guna2Panel1.Size = new System.Drawing.Size(113, 495); guna2Panel1.TabIndex = 0; // // addBtn // this.addBtn.BackColor = System.Drawing.Color.Transparent; this.addBtn.Image = ((System.Drawing.Image)(resources.GetObject("addBtn.Image"))); this.addBtn.Location = new System.Drawing.Point(16, 321); this.addBtn.Name = "addBtn"; this.addBtn.Size = new System.Drawing.Size(59, 41); this.addBtn.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.addBtn.TabIndex = 5; this.addBtn.TabStop = false; this.addBtn.Tag = "Soru Ekle"; this.addBtn.Click += new System.EventHandler(this.addBtn_Click); // // bestBtn // this.bestBtn.BackColor = System.Drawing.Color.Transparent; this.bestBtn.Image = ((System.Drawing.Image)(resources.GetObject("bestBtn.Image"))); this.bestBtn.Location = new System.Drawing.Point(16, 248); this.bestBtn.Name = "bestBtn"; this.bestBtn.Size = new System.Drawing.Size(59, 41); this.bestBtn.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.bestBtn.TabIndex = 4; this.bestBtn.TabStop = false; this.bestBtn.Tag = "Skorlar"; this.bestBtn.Click += new System.EventHandler(this.bestBtn_Click); // // rulesBtn // this.rulesBtn.BackColor = System.Drawing.Color.Transparent; this.rulesBtn.Image = ((System.Drawing.Image)(resources.GetObject("rulesBtn.Image"))); this.rulesBtn.Location = new System.Drawing.Point(16, 175); this.rulesBtn.Name = "rulesBtn"; this.rulesBtn.Size = new System.Drawing.Size(59, 41); this.rulesBtn.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.rulesBtn.TabIndex = 3; this.rulesBtn.TabStop = false; this.rulesBtn.Tag = "Kurallar"; this.rulesBtn.Click += new System.EventHandler(this.rulesBtn_Click); // // homeBtn // this.homeBtn.BackColor = System.Drawing.Color.Transparent; this.homeBtn.Image = ((System.Drawing.Image)(resources.GetObject("homeBtn.Image"))); this.homeBtn.Location = new System.Drawing.Point(16, 102); this.homeBtn.Name = "homeBtn"; this.homeBtn.Size = new System.Drawing.Size(59, 41); this.homeBtn.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.homeBtn.TabIndex = 2; this.homeBtn.TabStop = false; this.homeBtn.Tag = "Anasayfa"; this.homeBtn.Click += new System.EventHandler(this.homeBtn_Click); // // ucHomePanel // this.ucHomePanel.Location = new System.Drawing.Point(86, -2); this.ucHomePanel.Name = "ucHomePanel"; this.ucHomePanel.ShadowDecoration.Parent = this.ucHomePanel; this.ucHomePanel.Size = new System.Drawing.Size(766, 484); this.ucHomePanel.TabIndex = 1; // // guna2BorderlessForm1 // this.guna2BorderlessForm1.BorderRadius = 80; this.guna2BorderlessForm1.ContainerControl = this; this.guna2BorderlessForm1.DragForm = false; // // guna2DragControl1 // this.guna2DragControl1.ContainerControl = this; this.guna2DragControl1.TargetControl = guna2Panel1; // // guna2Panel2 // this.guna2Panel2.BackColor = System.Drawing.Color.Transparent; this.guna2Panel2.BorderRadius = 30; this.guna2Panel2.Controls.Add(this.pictureBox5); this.guna2Panel2.Controls.Add(this.pictureBox4); this.guna2Panel2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(12)))), ((int)(((byte)(50))))); this.guna2Panel2.Location = new System.Drawing.Point(850, -21); this.guna2Panel2.Name = "guna2Panel2"; this.guna2Panel2.ShadowDecoration.Parent = this.guna2Panel2; this.guna2Panel2.Size = new System.Drawing.Size(97, 525); this.guna2Panel2.TabIndex = 1; // // pictureBox5 // this.pictureBox5.BackColor = System.Drawing.Color.Transparent; this.pictureBox5.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox5.Image"))); this.pictureBox5.Location = new System.Drawing.Point(22, 72); this.pictureBox5.Name = "pictureBox5"; this.pictureBox5.Size = new System.Drawing.Size(31, 33); this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox5.TabIndex = 8; this.pictureBox5.TabStop = false; this.pictureBox5.Click += new System.EventHandler(this.pictureBox5_Click); // // pictureBox4 // this.pictureBox4.BackColor = System.Drawing.Color.Transparent; this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image"))); this.pictureBox4.Location = new System.Drawing.Point(22, 33); this.pictureBox4.Name = "pictureBox4"; this.pictureBox4.Size = new System.Drawing.Size(31, 33); this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox4.TabIndex = 7; this.pictureBox4.TabStop = false; this.pictureBox4.Click += new System.EventHandler(this.pictureBox4_Click); // // guna2DragControl2 // this.guna2DragControl2.ContainerControl = this; this.guna2DragControl2.TargetControl = this.guna2Panel2; // // Home // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(930, 483); this.Controls.Add(this.guna2Panel2); this.Controls.Add(this.ucHomePanel); this.Controls.Add(guna2Panel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "Home"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Form1"; this.Load += new System.EventHandler(this.Form1_Load); guna2Panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.addBtn)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bestBtn)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rulesBtn)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.homeBtn)).EndInit(); this.guna2Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit(); this.ResumeLayout(false); }