Esempio n. 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
            LoginDialog.ProgressDialog dialog = new LoginDialog.ProgressDialog(Password);
            ResponseType response             = (ResponseType)dialog.Run();
            string       responseMsg          = dialog.ResponseMessage;

            dialog.Destroy();

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

            string title = "Login Error";

            if (responseMsg == null)
            {
                responseMsg = "Unknown Error...";
            }
            ShowErrorMessage(title, responseMsg);
            return(null);
        }
Esempio n. 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
            LoginDialog.ProgressDialog dialog = new LoginDialog.ProgressDialog(Password);
            ResponseType response = (ResponseType) dialog.Run();
            string responseMsg = dialog.ResponseMessage;
            dialog.Destroy();

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

            string title = "Login Error";
            if (responseMsg == null) responseMsg = "Unknown Error...";
            ShowErrorMessage(title, responseMsg);
            return(null);
        }