private void button1_Click(object sender, EventArgs e) { panel3.Height = button1.Height; panel3.Top = button1.Top; this.Text = "الرئيسية"; frmReg = new FrontEnd.frmRegisteration(); groupBox1.Controls.Clear(); frmReg.TopLevel = false; groupBox1.Controls.Add(frmReg); frmReg.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frmReg.Dock = DockStyle.Fill; frmReg.Show(); }
public frmHome() { InitializeComponent(); this.Text = "الرئيسية"; ComputerInfoString = ComputerInfo.GetComputerId(); ProductKey = _Reg.GetProductKey(); string Decrypted = _Reg.Decrypt(ProductKey, "s3lw-3xr8-sqoy18"); if (Decrypted == ComputerInfoString) { button2.Enabled = true; button3.Enabled = true; button4.Enabled = true; button1.Visible = false; panel3.Height = button2.Height; panel3.Top = button2.Top; this.Text = "المشتركين"; frmsubdata = new FrontEnd.frmSubData(); groupBox1.Controls.Clear(); frmsubdata.TopLevel = false; groupBox1.Controls.Add(frmsubdata); frmsubdata.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frmsubdata.Dock = DockStyle.Fill; frmsubdata.Show(); } else { button2.Enabled = false; button3.Enabled = false; button4.Enabled = false; panel3.Height = button1.Height; panel3.Top = button1.Top; this.Text = "الرئيسية"; frmReg = new FrontEnd.frmRegisteration(); groupBox1.Controls.Clear(); frmReg.TopLevel = false; groupBox1.Controls.Add(frmReg); frmReg.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frmReg.Dock = DockStyle.Fill; frmReg.Show(); } }