private void BtnCategory_Click(object sender, EventArgs e) { pnPanel.Controls.Clear(); this.pnPanel.Visible = true; Guna.UI.WinForms.GunaButton btn = sender as Guna.UI.WinForms.GunaButton; Guna.UI.WinForms.GunaPanel pn = new Guna.UI.WinForms.GunaPanel(); string CategoryName = btn.Text; if (CategoryName == "Rau") { pn.Location = new Point(3, 4); pnPanel.Location = new Point(233, 215); } if (CategoryName == "Củ") { pn.Location = new Point(3, 4);//38); pnPanel.Location = new Point(233, 249); } if (CategoryName == "Quả") { pn.Location = new Point(3, 4);//72); pnPanel.Location = new Point(233, 283); } if (CategoryName == "Hạt giống") { pn.Location = new Point(3, 4);//106); pnPanel.Location = new Point(233, 317); } if (CategoryName == "Phân bón") { pn.Location = new Point(3, 4);//140); pnPanel.Location = new Point(233, 351); } string IDCategory = AdminSettingController.IDCategory_Find(CategoryName).Tables[0].Rows[0][0].ToString(); DataTable dtSubCategory = AdminSettingController.SubCategory_Show(IDCategory).Tables[0]; pn.BackColor = Color.Silver; pn.Width = 217; pnPanel.Controls.Add(pn); int ybtn = 0; int count = 0; foreach (DataRow dr in dtSubCategory.Rows) { Guna.UI.WinForms.GunaButton btnSubCategory = new Guna.UI.WinForms.GunaButton(); btnSubCategory.Location = new Point(0, ybtn); btnSubCategory.Size = new Size(215, 35); btnSubCategory.Animated = true; btnSubCategory.BackColor = Color.Transparent; btnSubCategory.BaseColor = Color.Silver; btnSubCategory.BorderColor = Color.Black; btnSubCategory.ForeColor = Color.Black; btnSubCategory.BorderSize = 1; btnSubCategory.Cursor = Cursors.Hand; btnSubCategory.Font = new Font("Tahoma", 13, FontStyle.Bold); btnSubCategory.Image = null; btnSubCategory.OnHoverBaseColor = Color.DarkGray; btnSubCategory.Radius = 5; btnSubCategory.TextAlign = HorizontalAlignment.Center; btnSubCategory.Text = dr["SubCategoryName"].ToString(); btnSubCategory.Click += BtnSubCategory_Click; ybtn += 34; count++; pn.Controls.Add(btnSubCategory); } pn.Height = 35 * count; pnPanel.Height = 37 * count; }
/// <summary> /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas /// le contenu de cette méthode avec l'éditeur de code. /// </summary> private void InitializeComponent() { this.pnl_roles = new System.Windows.Forms.FlowLayoutPanel(); this.gunaPanel1 = new Guna.UI.WinForms.GunaPanel(); this.lbl_action = new Guna.UI.WinForms.GunaLabel(); this.lbl_libelle = new Guna.UI.WinForms.GunaLabel(); this.lbl_id = new Guna.UI.WinForms.GunaLabel(); pnl_createUpdate = new Guna.UI.WinForms.GunaPanel(); this.btn_create_role = new Guna.UI.WinForms.GunaButton(); this.gunaPanel1.SuspendLayout(); this.SuspendLayout(); // // pnl_roles // this.pnl_roles.Location = new System.Drawing.Point(61, 70); this.pnl_roles.Name = "pnl_roles"; this.pnl_roles.Size = new System.Drawing.Size(525, 655); this.pnl_roles.TabIndex = 18; // // gunaPanel1 // this.gunaPanel1.Controls.Add(this.lbl_action); this.gunaPanel1.Controls.Add(this.lbl_libelle); this.gunaPanel1.Controls.Add(this.lbl_id); this.gunaPanel1.Location = new System.Drawing.Point(61, 3); this.gunaPanel1.Name = "gunaPanel1"; this.gunaPanel1.Size = new System.Drawing.Size(495, 61); this.gunaPanel1.TabIndex = 19; // // lbl_action // this.lbl_action.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_action.Location = new System.Drawing.Point(325, 22); this.lbl_action.MaximumSize = new System.Drawing.Size(160, 20); this.lbl_action.Name = "lbl_action"; this.lbl_action.Size = new System.Drawing.Size(160, 20); this.lbl_action.TabIndex = 19; this.lbl_action.Text = "ACTION"; this.lbl_action.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // lbl_libelle // this.lbl_libelle.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_libelle.Location = new System.Drawing.Point(159, 22); this.lbl_libelle.MaximumSize = new System.Drawing.Size(160, 20); this.lbl_libelle.Name = "lbl_libelle"; this.lbl_libelle.Size = new System.Drawing.Size(160, 20); this.lbl_libelle.TabIndex = 18; this.lbl_libelle.Text = "NOM"; this.lbl_libelle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // lbl_id // this.lbl_id.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_id.Location = new System.Drawing.Point(9, 22); this.lbl_id.MaximumSize = new System.Drawing.Size(140, 20); this.lbl_id.Name = "lbl_id"; this.lbl_id.Size = new System.Drawing.Size(140, 20); this.lbl_id.TabIndex = 17; this.lbl_id.Text = "ID"; // // pnl_createUpdate // pnl_createUpdate.Location = new System.Drawing.Point(638, 73); pnl_createUpdate.Name = "pnl_createUpdate"; pnl_createUpdate.Size = new System.Drawing.Size(430, 200); pnl_createUpdate.TabIndex = 20; // // btn_create_role // this.btn_create_role.AnimationHoverSpeed = 0.07F; this.btn_create_role.AnimationSpeed = 0.03F; this.btn_create_role.BackColor = System.Drawing.Color.Transparent; this.btn_create_role.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(212)))), ((int)(((byte)(253))))); this.btn_create_role.BorderColor = System.Drawing.Color.Black; this.btn_create_role.Cursor = System.Windows.Forms.Cursors.Hand; this.btn_create_role.DialogResult = System.Windows.Forms.DialogResult.None; this.btn_create_role.FocusedColor = System.Drawing.Color.Empty; this.btn_create_role.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_create_role.ForeColor = System.Drawing.Color.White; this.btn_create_role.Image = global::FrontEndGSBrevet.Properties.Resources.plus; this.btn_create_role.ImageSize = new System.Drawing.Size(12, 12); this.btn_create_role.Location = new System.Drawing.Point(638, 22); this.btn_create_role.Name = "btn_create_role"; this.btn_create_role.OnHoverBaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(236)))), ((int)(((byte)(252))))); this.btn_create_role.OnHoverBorderColor = System.Drawing.Color.Black; this.btn_create_role.OnHoverForeColor = System.Drawing.Color.White; this.btn_create_role.OnHoverImage = null; this.btn_create_role.OnPressedColor = System.Drawing.Color.Black; this.btn_create_role.Radius = 6; this.btn_create_role.Size = new System.Drawing.Size(145, 42); this.btn_create_role.TabIndex = 21; this.btn_create_role.Text = "CREER UN ROLE"; this.btn_create_role.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.btn_create_role.Click += new System.EventHandler(this.btn_create_role_Click); // // uc_MainRole // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.btn_create_role); this.Controls.Add(pnl_createUpdate); this.Controls.Add(this.gunaPanel1); this.Controls.Add(this.pnl_roles); this.Name = "uc_MainRole"; this.Size = new System.Drawing.Size(1140, 737); this.Load += new System.EventHandler(this.uc_MainRole_Load); this.gunaPanel1.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.pnl_top = new Guna.UI.WinForms.GunaPanel(); this.lbl_userType = new Guna.UI.WinForms.GunaLabel(); this.btn_initial = new Guna.UI.WinForms.GunaCircleButton(); this.lbl_title = new Guna.UI.WinForms.GunaLabel(); this.gunaControlBox1 = new Guna.UI.WinForms.GunaControlBox(); this.btn_close = new Guna.UI.WinForms.GunaControlBox(); pnl_main = new Guna.UI.WinForms.GunaPanel(); this.btn_roles = new Guna.UI.WinForms.GunaButton(); this.btn_users = new Guna.UI.WinForms.GunaButton(); this.gunaDragControl1 = new Guna.UI.WinForms.GunaDragControl(this.components); this.gunaVSeparator1 = new Guna.UI.WinForms.GunaVSeparator(); this.pnl_top.SuspendLayout(); this.SuspendLayout(); // // pnl_top // this.pnl_top.BackColor = System.Drawing.Color.White; this.pnl_top.Controls.Add(this.lbl_userType); this.pnl_top.Controls.Add(this.btn_initial); this.pnl_top.Controls.Add(this.lbl_title); this.pnl_top.Controls.Add(this.gunaControlBox1); this.pnl_top.Controls.Add(this.btn_close); this.pnl_top.Dock = System.Windows.Forms.DockStyle.Top; this.pnl_top.Location = new System.Drawing.Point(0, 0); this.pnl_top.Name = "pnl_top"; this.pnl_top.Size = new System.Drawing.Size(1300, 57); this.pnl_top.TabIndex = 18; // // lbl_userType // this.lbl_userType.BackColor = System.Drawing.Color.Transparent; this.lbl_userType.Font = new System.Drawing.Font("Segoe UI", 9F); this.lbl_userType.ForeColor = System.Drawing.SystemColors.ControlDark; this.lbl_userType.Location = new System.Drawing.Point(0, 37); this.lbl_userType.Name = "lbl_userType"; this.lbl_userType.Size = new System.Drawing.Size(146, 17); this.lbl_userType.TabIndex = 4; this.lbl_userType.Text = "Administrateur"; this.lbl_userType.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // btn_initial // this.btn_initial.AnimationHoverSpeed = 0.07F; this.btn_initial.AnimationSpeed = 0.03F; this.btn_initial.BackColor = System.Drawing.Color.Transparent; this.btn_initial.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(212)))), ((int)(((byte)(253))))); this.btn_initial.BorderColor = System.Drawing.Color.Black; this.btn_initial.DialogResult = System.Windows.Forms.DialogResult.None; this.btn_initial.FocusedColor = System.Drawing.Color.Empty; this.btn_initial.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_initial.ForeColor = System.Drawing.Color.White; this.btn_initial.Image = null; this.btn_initial.ImageSize = new System.Drawing.Size(52, 52); this.btn_initial.Location = new System.Drawing.Point(1067, 4); this.btn_initial.Margin = new System.Windows.Forms.Padding(0); this.btn_initial.Name = "btn_initial"; this.btn_initial.OnHoverBaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(212)))), ((int)(((byte)(253))))); this.btn_initial.OnHoverBorderColor = System.Drawing.Color.Black; this.btn_initial.OnHoverForeColor = System.Drawing.Color.White; this.btn_initial.OnHoverImage = null; this.btn_initial.OnPressedColor = System.Drawing.Color.Black; this.btn_initial.Size = new System.Drawing.Size(50, 50); this.btn_initial.TabIndex = 3; this.btn_initial.Text = "PD"; // // lbl_title // this.lbl_title.Font = new System.Drawing.Font("Segoe UI", 16F, System.Drawing.FontStyle.Bold); this.lbl_title.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(212)))), ((int)(((byte)(253))))); this.lbl_title.Location = new System.Drawing.Point(0, 0); this.lbl_title.Name = "lbl_title"; this.lbl_title.Size = new System.Drawing.Size(146, 54); this.lbl_title.TabIndex = 2; this.lbl_title.Text = "GSBrevets"; this.lbl_title.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // gunaControlBox1 // this.gunaControlBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.gunaControlBox1.AnimationHoverSpeed = 0.07F; this.gunaControlBox1.AnimationSpeed = 0.03F; this.gunaControlBox1.BackColor = System.Drawing.Color.White; this.gunaControlBox1.ControlBoxType = Guna.UI.WinForms.FormControlBoxType.MinimizeBox; this.gunaControlBox1.IconColor = System.Drawing.Color.Black; this.gunaControlBox1.IconSize = 15F; this.gunaControlBox1.Location = new System.Drawing.Point(1187, 8); this.gunaControlBox1.Name = "gunaControlBox1"; this.gunaControlBox1.OnHoverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(236)))), ((int)(((byte)(252))))); this.gunaControlBox1.OnHoverIconColor = System.Drawing.Color.White; this.gunaControlBox1.OnPressedColor = System.Drawing.Color.Black; this.gunaControlBox1.Size = new System.Drawing.Size(45, 40); this.gunaControlBox1.TabIndex = 1; // // btn_close // this.btn_close.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btn_close.AnimationHoverSpeed = 0.07F; this.btn_close.AnimationSpeed = 0.03F; this.btn_close.BackColor = System.Drawing.Color.White; this.btn_close.IconColor = System.Drawing.Color.Black; this.btn_close.IconSize = 15F; this.btn_close.Location = new System.Drawing.Point(1243, 8); this.btn_close.Name = "btn_close"; this.btn_close.OnHoverBackColor = System.Drawing.Color.Red; this.btn_close.OnHoverIconColor = System.Drawing.Color.White; this.btn_close.OnPressedColor = System.Drawing.Color.Black; this.btn_close.Size = new System.Drawing.Size(45, 40); this.btn_close.TabIndex = 0; this.btn_close.Click += new System.EventHandler(this.btn_close_Click); // // pnl_main // pnl_main.BackColor = System.Drawing.Color.Transparent; pnl_main.Dock = System.Windows.Forms.DockStyle.Right; pnl_main.Location = new System.Drawing.Point(160, 57); pnl_main.Name = "pnl_main"; pnl_main.Size = new System.Drawing.Size(1140, 743); pnl_main.TabIndex = 19; // // btn_roles // this.btn_roles.AnimationHoverSpeed = 0.07F; this.btn_roles.AnimationSpeed = 0.03F; this.btn_roles.BackColor = System.Drawing.Color.Transparent; this.btn_roles.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(212)))), ((int)(((byte)(253))))); this.btn_roles.BorderColor = System.Drawing.Color.Black; this.btn_roles.Cursor = System.Windows.Forms.Cursors.Hand; this.btn_roles.DialogResult = System.Windows.Forms.DialogResult.None; this.btn_roles.FocusedColor = System.Drawing.Color.Empty; this.btn_roles.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_roles.ForeColor = System.Drawing.Color.White; this.btn_roles.Image = global::FrontEndGSBrevet.Properties.Resources.role; this.btn_roles.ImageSize = new System.Drawing.Size(20, 20); this.btn_roles.Location = new System.Drawing.Point(9, 144); this.btn_roles.Name = "btn_roles"; this.btn_roles.OnHoverBaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(212)))), ((int)(((byte)(253))))); this.btn_roles.OnHoverBorderColor = System.Drawing.Color.Black; this.btn_roles.OnHoverForeColor = System.Drawing.Color.White; this.btn_roles.OnHoverImage = null; this.btn_roles.OnPressedColor = System.Drawing.Color.Black; this.btn_roles.Radius = 5; this.btn_roles.Size = new System.Drawing.Size(133, 42); this.btn_roles.TabIndex = 21; this.btn_roles.Text = "Rôles"; this.btn_roles.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.btn_roles.Click += new System.EventHandler(this.btn_roles_Click); // // btn_users // this.btn_users.AnimationHoverSpeed = 0.07F; this.btn_users.AnimationSpeed = 0.03F; this.btn_users.BackColor = System.Drawing.Color.Transparent; this.btn_users.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(212)))), ((int)(((byte)(253))))); this.btn_users.BorderColor = System.Drawing.Color.Black; this.btn_users.Cursor = System.Windows.Forms.Cursors.Hand; this.btn_users.DialogResult = System.Windows.Forms.DialogResult.None; this.btn_users.FocusedColor = System.Drawing.Color.Empty; this.btn_users.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_users.ForeColor = System.Drawing.Color.White; this.btn_users.Image = global::FrontEndGSBrevet.Properties.Resources.user; this.btn_users.ImageSize = new System.Drawing.Size(20, 20); this.btn_users.Location = new System.Drawing.Point(9, 79); this.btn_users.Name = "btn_users"; this.btn_users.OnHoverBaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(212)))), ((int)(((byte)(253))))); this.btn_users.OnHoverBorderColor = System.Drawing.Color.Black; this.btn_users.OnHoverForeColor = System.Drawing.Color.White; this.btn_users.OnHoverImage = null; this.btn_users.OnPressedColor = System.Drawing.Color.Black; this.btn_users.Radius = 5; this.btn_users.Size = new System.Drawing.Size(133, 42); this.btn_users.TabIndex = 20; this.btn_users.Text = "Utilisateurs"; this.btn_users.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.btn_users.Click += new System.EventHandler(this.btn_users_Click); // // gunaDragControl1 // this.gunaDragControl1.TargetControl = this.pnl_top; // // gunaVSeparator1 // this.gunaVSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.gunaVSeparator1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.gunaVSeparator1.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(212)))), ((int)(((byte)(253))))); this.gunaVSeparator1.Location = new System.Drawing.Point(148, 57); this.gunaVSeparator1.Name = "gunaVSeparator1"; this.gunaVSeparator1.Size = new System.Drawing.Size(6, 743); this.gunaVSeparator1.TabIndex = 22; // // form_Admin // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(1300, 800); this.Controls.Add(this.gunaVSeparator1); this.Controls.Add(this.btn_roles); this.Controls.Add(this.btn_users); this.Controls.Add(pnl_main); this.Controls.Add(this.pnl_top); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "form_Admin"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "form_Admin"; this.Load += new System.EventHandler(this.form_Admin_Load); this.pnl_top.ResumeLayout(false); this.ResumeLayout(false); }