Esempio n. 1
0
        private static void main_LanguageChangedEvent(object sender, LocalizationEventArgs eventArgs)
        {
            var newCulture = eventArgs.Culture;

            Thread.CurrentThread.CurrentCulture   = CultureInfo.GetCultureInfo(newCulture);
            Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(newCulture);
            _doNotExit = true;
            _fm?.Close();
        }
Esempio n. 2
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            BonusSkins.Register();
            SkinManager.EnableFormSkins();
            UserLookAndFeel.Default.SetSkinStyle(Settings.Default.ApplicationSkinName);
            //Application.Run(new Form1());
            if (new frm_ChangeServer().ShowDialog() == DialogResult.OK)
            {
                bool temp;
                do
                {
                    temp = false;
                    Frm_Login a = new Frm_Login();
                    a.lb_programName.Text = @"           SANTEI Project";

                    a.lb_vision.Text      = @"Version :";
                    a.grb_1.Text          = @"Information PC";
                    a.lb_machine.Text     = @"PC name:";
                    a.lb_user_window.Text = @"Account window: ";
                    a.lb_ip.Text          = @"Address IP :";
                    a.grb_2.Text          = @"Login account information";
                    a.lb_username.Text    = @"User Name:";
                    a.lb_password.Text    = @"Password:"******"Role";
                    a.lb_date.Text        = @"Date: ";
                    a.lb_time.Text        = @"Time: ";
                    a.lb_batchno.Text     = @"BatchName: ";
                    a.btn_thoat.Text      = @"Exit";
                    a.chb_hienthi.Text    = @"Show";
                    a.chb_luu.Text        = @"Save";
                    a.lb_version.Text     = Global.Version;
                    a.UrlUpdateVersion    = Global.UrlUpdateVersion;
                    a.LoginEvent         += a_LoginEvent;
                    a.ButtonLoginEven    += a_ButtonLoginEven;
                    if (a.ShowDialog() == DialogResult.OK)
                    {
                        Global.StrMachine    = a.StrMachine;
                        Global.StrUserWindow = a.StrUserWindow;
                        Global.StrIpAddress  = a.StrIpAddress;
                        Global.StrUsername   = a.StrUserName;
                        Global.StrBatch      = a.StrBatch;
                        Global.StrRole       = a.StrRole;
                        Global.StrToken      = a.Token;
                        FrmMain f = new FrmMain();
                        if (f.ShowDialog() == DialogResult.Yes)
                        {
                            f.Close();
                            temp = true;
                        }
                    }
                }while (temp);
            }
        }
 private void Btn_Quit_Click(object sender, EventArgs e)
 {
     _pMainFrame.Close();
 }
Esempio n. 4
0
 private void btnExit_Click(object sender, EventArgs e)
 {
     FrmMain.Close();
     this.Close();
 }