/// <summary>
        /// Change Application Language
        /// </summary>
        /// <param name="cultureInfo">CultureInfo Instance</param>
        public static void ChangeLanguage(CultureInfo cultureInfo)
        {
            GwinApp.instance.user.Language = Convert_CultureInfo_Language(cultureInfo);
            SetLanguage(cultureInfo);

            //[Role] Restart must be after Language change, for Set Application Name Title after
            // Initialize Form
            GwinApp.Restart();
        }
示例#2
0
        /// <summary>
        /// Authentification
        /// </summary>
        private static void Login()
        {
            // Authentication fo Guest User
            // Change GuestUser by Current User
            if (GwinApp.Instance.user.Reference == nameof(User.Users.Guest))
            {
                do
                {
                    // Authentification
                    LoginForm loginForm = new LoginForm();

                    loginForm.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
                    loginForm.ShowDialog();
                } while (GwinApp.Instance.user.Reference == nameof(User.Users.Guest));
                GwinApp.Restart();
            }
        }