Пример #1
0
            public static void Save(UserConfiguration userConfig)
            {
                Properties.Settings.Default.UserToken = userConfig.Token;
                Properties.Settings.Default.Save();

                ServerCredentials.Create(userConfig);
            }
Пример #2
0
        public void Login(ServerCredentials.LoginData loginData)
        {
            UserConfiguration userConfig = null;

            if (loginData != null )
            {
                while (loginData != null && userConfig == null)
                {
                    userConfig = UserManagement.TokenLogin(loginData.Token);
                    if (userConfig == null)
                    {
                        Logger.Log(String_Functions.UppercaseFirst(loginData.Username) + " Failed to Login... Retrying in 5 seconds");

                        Thread.Sleep(5000);

                        loginData = ServerCredentials.Read();
                    }
                }

                if (userConfig != null) Logger.Log(String_Functions.UppercaseFirst(userConfig.Username) + " Logged in Successfully");
            }

            CurrentUser = userConfig;
        }
Пример #3
0
 private void LoginMonitor_UserChanged(ServerCredentials.LoginData loginData)
 {
     Login(loginData);
 }