コード例 #1
0
 void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e)
 {
     if (e.Status == LoginStatus.Logged)
     {
         Clear();
     }
 }
コード例 #2
0
 void EventSource_OnLoginStatus(object sender, LoginStatusEventArgs e)
 {
     requestedDisconnect = false;
     Dispatcher.Invoke(new Action <LoginStatusEventArgs>((args) => {
         InvokeLoginEvent(args);
         btnConnect.Content = "Disconnect";
     }), e);
 }
コード例 #3
0
 static void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e)
 {
     if (e.Status == LoginStatus.Logged)
     {
         ClearExerciseCache();
         ClearWorkoutPlansCache();
     }
 }
コード例 #4
0
        private void EventSource_OnLoginStatus(object sender, LoginStatusEventArgs e)
        {
            bool loginAccepted = e.isLoggedIn;

            if (loginAccepted)
            {
                DispatchOnConnected();
            }
        }
コード例 #5
0
ファイル: BaseWindow.cs プロジェクト: robocik/BodyArchitect
 void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e)
 {
     if (TasksManager == null)
     {
         return;
     }
     UIHelper.BeginInvoke(new Action(delegate
     {
         LoginStatusChanged(e.Status);
     }), null);
 }
 //Callback for TTUS Server Login Status Updates
 void m_TTUSAPI_OnLoginStatusUpdate(object sender, LoginStatusEventArgs e)
 {
     if (e.LoginResultCode == TTUSAPI.LoginResultCode.Success)
     {
         Console.WriteLine("Login was Successful");
         //We have successfully logged in, so request users
         m_TTUSAPI.Initialize();   //Initialize the API to get all of the User, Fix Adapter, Account, and MGT data
     }
     else
     {
         Console.WriteLine("Error:  Login failed");
     }
 }
コード例 #7
0
        //Callback for TTUS Server Login Status Updates
        void m_TTUSAPI_OnLoginStatusUpdate(object sender, LoginStatusEventArgs e)
        {
            if (e.LoginResultCode == TTUSAPI.LoginResultCode.Success)
            {
                UpdateStatusBar("Login was Successful");

                m_TTUSAPI.Initialize();
            }
            else
            {
                UpdateStatusBar("Error:  Login failed");
            }
        }
コード例 #8
0
 void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e)
 {
     //if (ParentWindow == null)
     //{
     //    return;
     //}
     if (!CheckAccess())
     {
         Dispatcher.BeginInvoke(new Action <LoginStatus>(LoginStatusChanged), e.Status);
     }
     else
     {
         LoginStatusChanged(e.Status);
     }
 }
コード例 #9
0
 void m_TTUSAPI_OnLoginStatusUpdate(object sender, LoginStatusEventArgs e)
 {
     if (e.LoginResultCode == TTUSAPI.LoginResultCode.Success)
     {
         UpdateStatusBar("Login was Successful");
         Console.WriteLine("Login was Successful");
         //We have successfully logged in, so request users and FA Servers...
         m_TTUSAPI.Initialize();   //Initialize the API to get all of the User, Fix Adapter, Account, and MGT data
         m_TTUSAPI.GetProducts();
     }
     else
     {
         UpdateStatusBar("Error:  Login failed");
         Environment.Exit(0);
     }
 }
コード例 #10
0
ファイル: BaseWindow.cs プロジェクト: robocik/BodyArchitect
 void UserContext_LoginStatusChanged(object sender, LoginStatusEventArgs e)
 {
     if (TasksManager == null)
     {
         return;
     }
     SynchronizationContext.Send(delegate
     {
         LoginStatusChanged(e.Status);
     }, null);
     //if(!Created)
     //{
     //    return;
     //}
     //if(InvokeRequired)
     //{
     //    BeginInvoke(new Action<LoginStatus>(LoginStatusChanged), e.Status);
     //}
     //else
     //{
     //    LoginStatusChanged(e.Status);
     //}
 }
コード例 #11
0
 //Callback for TTUS Server Login Status Updates
 void m_TTUSAPI_OnLoginStatusUpdate(object sender, LoginStatusEventArgs e)
 {
     if (e.LoginResultCode == TTUSAPI.LoginResultCode.Success)
     {
         Console.WriteLine("Login was Successful");
         //We have successfully logged in, so request users
         m_TTUSAPI.Initialize();   //Initialize the API to get all of the User, Fix Adapter, Account, and MGT data
     }
     else
     {
         Console.WriteLine("Error:  Login failed");
     }
 }
コード例 #12
0
        private void InvokeLoginEvent(LoginStatusEventArgs e)
        {
            UserListWPF.DisableAudioAlertForDuration(5.0);

            bool isLoggedIn = e.isLoggedIn;
            int version = e.version;
            string message = e.message;

            if (message != null)
                Console.WriteLine(message);

            var client = Client;

            if (!isLoggedIn && client != null && client.IsConnected)
            {
                Console.WriteLine("Server requests login.");
                if (invalidLoginAttempts == 0)
                {
                    invalidLoginAttempts++;
                    client.SendLoginInfo();
                }
                else
                {
                    invalidLoginAttempts++;
                    if (version >= 1)
                    {
                        var pass = client.Password;
                        if (LoginPassWindow.Prompt(password: ref pass, message: message) && !string.IsNullOrWhiteSpace(pass))
                        {
                            Password = client.Password = pass;
                            client.SendLoginInfo();
                            invalidLoginAttempts = 0;
                        }
                        else
                        {
                            Console.WriteLine("Server login canceled.");
                            client.Dispose();
                            if (Client == client)
                                Client = null;
                        }

                    }
                    else
                    {
                        Console.WriteLine("Server login rejected.");
                        client.Dispose();
                        if (Client == client)
                            Client = null;
                    }
                }
            }

            else
            {
                Console.WriteLine("Server login accepted.");
                invalidLoginAttempts = 0;
            }
        }
コード例 #13
0
 void EventSource_OnLoginStatus(object sender, LoginStatusEventArgs e)
 {
     requestedDisconnect = false;
     Dispatcher.Invoke(new Action<LoginStatusEventArgs>((args) => {
         InvokeLoginEvent(args);
         btnConnect.Content = "Disconnect";
     }), e);
 }
コード例 #14
0
        private void InvokeLoginEvent(LoginStatusEventArgs e)
        {
            UserListWPF.DisableAudioAlertForDuration(5.0);

            bool   isLoggedIn = e.isLoggedIn;
            int    version    = e.version;
            string message    = e.message;

            if (message != null)
            {
                Console.WriteLine(message);
            }

            var client = Client;

            if (!isLoggedIn && client != null && client.IsConnected)
            {
                Console.WriteLine("Server requests login.");
                if (invalidLoginAttempts == 0)
                {
                    invalidLoginAttempts++;
                    client.SendLoginInfo();
                }
                else
                {
                    invalidLoginAttempts++;
                    if (version >= 1)
                    {
                        var pass = client.Password;
                        if (LoginPassWindow.Prompt(password: ref pass, message: message) && !string.IsNullOrWhiteSpace(pass))
                        {
                            Password = client.Password = pass;
                            client.SendLoginInfo();
                            invalidLoginAttempts = 0;
                        }
                        else
                        {
                            Console.WriteLine("Server login canceled.");
                            client.Dispose();
                            if (Client == client)
                            {
                                Client = null;
                            }
                        }
                    }
                    else
                    {
                        Console.WriteLine("Server login rejected.");
                        client.Dispose();
                        if (Client == client)
                        {
                            Client = null;
                        }
                    }
                }
            }

            else
            {
                Console.WriteLine("Server login accepted.");
                invalidLoginAttempts = 0;
            }
        }
コード例 #15
0
        //Callback for TTUS Server Login Status Updates
        void m_TTUSAPI_OnLoginStatusUpdate(object sender, LoginStatusEventArgs e)
        {
            if (e.LoginResultCode == TTUSAPI.LoginResultCode.Success)
            {
                UpdateStatusBar("Login was Successful");

                m_TTUSAPI.Initialize();
            }
            else
            {
                UpdateStatusBar("Error:  Login failed");
            }
        }
コード例 #16
0
 private void EventSource_OnLoginStatus(object sender, LoginStatusEventArgs e)
 {
     bool loginAccepted = e.isLoggedIn;
     if (loginAccepted)
     {
         DispatchOnConnected();
     }
 }