Exemple #1
0
        public bool AddArtists(List <string> artists)
        {
            SignInController signIn = SignInController.GetInstance();
            List <int>       result = executer.AddArtistsToUser(signIn.ConnectedUser, artists);

            if (result.Count != 0)
            {
                signIn.ConnectedUser.Artists = result;
                return(true);
            }
            return(false);
        }
Exemple #2
0
        public bool AddSongs(List <string> songs)
        {
            SignInController signIn = SignInController.GetInstance();
            List <string>    result = executer.AddSongsToUser(signIn.ConnectedUser, songs);

            if (result.Count != 0)
            {
                signIn.ConnectedUser.Songs = result;
                return(true);
            }
            return(false);
        }
Exemple #3
0
        public bool SignUp(string firstName, string lastName, string email, int day, int month, int year, string password, string genreName, string placeName)
        {
            bool result = executer.Execute(firstName, lastName, email, day, month, year, password, genreName, placeName);

            if (result)
            {
                SignInController.GetInstance().SignIn(email, password);
                this.password = password;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CompletionController"/> class.
 /// </summary>
 protected CompletionController()
 {
     _signInController = SignInController.GetInstance();
     _topArtistsCache  = new Dictionary <string, List <string> >();
     _topPlacesCache   = new Dictionary <string, List <string> >();
     _topSongsCache    = new Dictionary <string, List <string> >();
     _topGeneresCache  = new Dictionary <string, List <string> >();
     _yearsList        = new List <string>
     {
         "1900 - 1940",
         "1940 - 1960",
         "1960 - 1980",
         "1980 - 2000",
         "2000 - 2018"
     };
     conn = DataBaseConnector.GetInstance();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FeelingLuckyController"/> class.
 /// </summary>
 public FeelingLuckyController()
 {
     db = DataBaseConnector.GetInstance();
     _signInController = SignInController.GetInstance();
 }
 /// <summary>
 /// Gets the instance.
 /// </summary>
 /// <returns> an instance of this class </returns>
 public static SignInController GetInstance()
 {
     return(_instance ?? (_instance = new SignInController()));
 }