Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public UserAccount LogIn(string username, string password)
        {
            ServerIOController serverIo = new ServerIOController();

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

            return(null);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
        public void CreateRecurringGoal(string username, RecurringGoal goal)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.CreateRecurringGoal(goal, username);
        }
Exemplo n.º 5
0
        public void AddPoints(string username, int pointsToAdd)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.AddPoints(username, pointsToAdd);
        }
Exemplo n.º 6
0
        public UserAccount GetUser(string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetUser(username));
        }
Exemplo n.º 7
0
        public bool DoesUserExist(string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.DoesUserExist(username));
        }
Exemplo n.º 8
0
        public void UploadFile(File upload)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.UploadFile(upload);
        }
Exemplo n.º 9
0
        public void CreateNote(Note note, string username)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.CreateNote(note, username);
        }
Exemplo n.º 10
0
        public List <NoteMini> GetNotePreviews(string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetNotePreviews(username));
        }
Exemplo n.º 11
0
        public Note GetNote(string guid, string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetNote(guid, username));
        }
Exemplo n.º 12
0
        public void DeleteFile(string guid)
        {
            ServerIOController serverIo = new ServerIOController();

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

            serverIo.ShareFile(guid, users);
        }
Exemplo n.º 14
0
        public File DownloadFile(string guid)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.DownloadFile(guid));
        }
Exemplo n.º 15
0
        public void CompleteGoal(string goalGuid, string username)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.MarkGoalAsCompleted(goalGuid, username);
        }
Exemplo n.º 16
0
        public Goal GetGoal(string guid, string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetGoal(guid, username));
        }
Exemplo n.º 17
0
        public void UpdateNote(Note note)
        {
            ServerIOController serverIo = new ServerIOController();

            serverIo.UpdateNote(note);
        }
Exemplo n.º 18
0
        public List <Goal> GetOverdueGoals(string username)
        {
            ServerIOController serverIo = new ServerIOController();

            return(serverIo.GetOverdueGoals(username));
        }
Exemplo n.º 19
0
        public Month GetMonth(string username, int monthOfYear)
        {
            ServerIOController serverIo = new ServerIOController();

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