private void mainform_Load(object sender, EventArgs e)
        {
            RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("smartparking", true);

            try
            {
                if (key != null)
                {
                    if (key.GetValue("IsClosedWindow") != null && (string)key.GetValue("IsClosedWindow") == "True")
                    {
                        bunifuImageButton2_Click(sender, e);
                    }
                    else
                    {
                        key.SetValue("IsClosedWindow", false);
                    }
                }
            }
            finally
            {
                if (key != null)
                {
                    key.Close();
                }
            }
            EmployeeForm welcom = EmployeeForm.GetInstance(this.Userid);

            welcom.MdiParent = this;
            welcom.Dock      = DockStyle.Fill;
            welcom.Show();
            welcom.BringToFront();
        }
        private void btnUserManage_Click(object sender, EventArgs e)
        {
            EmployeeForm welcom = EmployeeForm.GetInstance(this.Userid);

            welcom.MdiParent = this;
            welcom.Dock      = DockStyle.Fill;
            welcom.Show();
            welcom.BringToFront();
        }
 public static EmployeeForm GetInstance(string id)
 {
     if (instance != null)
     {
         return(instance);
     }
     else
     {
         return(instance = new EmployeeForm(id));
     }
 }