Пример #1
0
        /// Check Login, Return null if Login failed
        public UserInfo CheckLogin()
        {
            MyInfo.Initialize(Username, SecureAuthentication);

            if (SecureAuthentication == false)
            {
                return(MyInfo.GetInstance());
            }

            // Login Progress Dialog
            LoginProgressDialog dialog   = new LoginProgressDialog(Password);
            ResponseType        response = (ResponseType)dialog.Run();
            string responseMsg           = dialog.ResponseMessage;

            dialog.Destroy();

            // Login OK
            if (response == ResponseType.Ok)
            {
                return(MyInfo.GetInstance());
            }

            WindowUtils.Shake(this, 2);
            if (responseMsg != null)
            {
                Glue.Dialogs.MessageError("Login Error", responseMsg);
            }
            return(null);
        }
Пример #2
0
        /// Check Login, Return null if Login failed
        public UserInfo CheckLogin()
        {
            MyInfo.Initialize(Username, SecureAuthentication);

            if (SecureAuthentication == false)
                return(MyInfo.GetInstance());

            // Login Progress Dialog
            LoginProgressDialog dialog = new LoginProgressDialog(Password);
            ResponseType response = (ResponseType) dialog.Run();
            string responseMsg = dialog.ResponseMessage;
            dialog.Destroy();

            // Login OK
            if (response == ResponseType.Ok)
                return(MyInfo.GetInstance());

            WindowUtils.Shake(this, 2);
            if (responseMsg != null)
                Glue.Dialogs.MessageError("Login Error", responseMsg);
            return(null);
        }