public static DialogResult ShowModal(string title, string message, bool showcancel = false)
        {
            var n = new Comformation();

            n.label_title.Text       = title;
            n.label_description.Text = message;
            n.button_cancel.Visible  = showcancel;
            var t = new Transparent(n);

            return(t.ShowDialog());
        }
        private void login_form_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default.isdatabasesetup == false)
            {
                new SETTING.DatabaseSetup().ShowDialog();
            }
            if (Properties.Settings.Default.isdatabasesetup == false)
            {
                Application.Exit();
            }
            if (!Properties.Settings.Default.isuserregister)
            {
                var m     = new AdminSetting.UserRegister();
                var trans = new RetailControls.Transparent(m);

                trans.ShowDialog();
            }
            if (!Properties.Settings.Default.isuserregister)
            {
                MessageBox.Show("Please Register User first");
                this.Close();
            }
            var keyold = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("5D41402ABC4B2A76B9719D911017C592");

            if (keyold != null)
            {
                var key = Convert.ToDateTime((string)keyold.GetValue("upto"));
                if (key < DateTime.Now)
                {
                    var m     = new AdminSetting.AddKey();
                    var trans = new RetailControls.Transparent(m);

                    trans.ShowDialog();
                }
                key = Convert.ToDateTime((string)keyold.GetValue("upto"));
                if (key < DateTime.Now)
                {
                    MessageBox.Show("Your Key has expired");
                    this.Close();
                }
            }
        }