Beispiel #1
0
        /// <summary>
        /// creates a new login session with the username, password, and other relevant information about the user
        /// captain, position.
        /// </summary>
        /// <param name="Username"></param>
        /// <param name="Password"></param>
        public void NewSession(String Username, String Password)
        {
            api = APIController.GetAPIController();
            Boolean logincheck = api.Login(Username, Password);
            Boolean Captain    = api.CaptainCheck();

            session = new Session();
            session.createUser(Username, Password, Captain);
        }
Beispiel #2
0
        /// <summary>
        /// checks if the user exists on the server through the API, returns true if they exist.
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public Boolean Login(String username, String password)
        {
            api = APIController.GetAPIController();
            Boolean logincheck = api.Login(username, password);
            Boolean Captain    = api.CaptainCheck();

            session = new Session();
            session.createUser(username, password, Captain);
            return(logincheck);
        }