예제 #1
0
        public UserAccount CreateAccount(string username, string password, string email, string phoneNum = null)
        {
            UserAccount        account  = new UserAccount(userName: username, email: email, phoneNumber: phoneNum);
            ServerIOController serverIo = new ServerIOController();

            serverIo.CreateUser(account, password);
            return(account);
        }
예제 #2
0
        public UserAccount LogIn(string username, string password)
        {
            ServerIOController serverIo = new ServerIOController();

            if (serverIo.AuthenticateUser(username, password))
            {
                return(CurrentUser = GetUser(username));
            }

            return(null);
        }
예제 #3
0
        public List <NonRecurringGoal> GetUpcomingNonRecurringGoals(string username)
        {
            ServerIOController      serverIo = new ServerIOController();
            List <NonRecurringGoal> list     = new List <NonRecurringGoal>();

            foreach (Goal g in serverIo.GetUpcomingGoals(username))
            {
                if (g.GetType() == typeof(NonRecurringGoal))
                {
                    list.Add((NonRecurringGoal)g);
                }
            }

            return(list);
        }
예제 #4
0
        public void CreateRecurringGoal(string username, RecurringGoal goal)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.CreateRecurringGoal(goal, username);
        }
예제 #5
0
        public void AddPoints(string username, int pointsToAdd)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.AddPoints(username, pointsToAdd);
        }
예제 #6
0
        public UserAccount GetUser(string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetUser(username));
        }
예제 #7
0
        public bool DoesUserExist(string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.DoesUserExist(username));
        }
예제 #8
0
        public void UploadFile(File upload)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.UploadFile(upload);
        }
예제 #9
0
        public void CreateNote(Note note, string username)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.CreateNote(note, username);
        }
예제 #10
0
        public List <NoteMini> GetNotePreviews(string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetNotePreviews(username));
        }
예제 #11
0
        public Note GetNote(string guid, string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetNote(guid, username));
        }
예제 #12
0
        public void DeleteFile(string guid)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.DeleteFile(guid);
        }
예제 #13
0
        public void ShareFile(string guid, Dictionary <string, Permission> users)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.ShareFile(guid, users);
        }
예제 #14
0
        public File DownloadFile(string guid)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.DownloadFile(guid));
        }
예제 #15
0
        public void CompleteGoal(string goalGuid, string username)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.MarkGoalAsCompleted(goalGuid, username);
        }
예제 #16
0
        public Goal GetGoal(string guid, string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetGoal(guid, username));
        }
예제 #17
0
        public void UpdateNote(Note note)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.UpdateNote(note);
        }
예제 #18
0
        public List <Goal> GetOverdueGoals(string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetOverdueGoals(username));
        }
예제 #19
0
        public Month GetMonth(string username, int monthOfYear)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetMonth(username, monthOfYear));
        }