Beispiel #1
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            LibraryManager lm=new LibraryManager();
            OdysseyCloudAPIConsumer APIConsumer = new OdysseyCloudAPIConsumer();

            //Se obtiene logueo de usuario
            UserInfo userToAuth = APIConsumer.GetUserAuth(new UserInfo() {Nickname= "kevuo", Password = "******"}).Result;

            //Si el usuario que se retorna no es nulo
            if (!userToAuth.UserId.Equals(new Guid()))
            {
                SessionManager.Instance.Nickname = userToAuth.Nickname;
                SessionManager.Instance.Name = userToAuth.Name;
                SessionManager.Instance.UserId = userToAuth.UserId;
            }

            //Inicializa la biblioteca de usuario
            lm.InitializeLibrary();
            //Importa carpeta de usuario a la biblioteca musical local
            lm.ImportSongsToLibrary(@"C:\Users\Manuel\Desktop\majesco");
            //Sincroniza Biblioteca con Cloud
            lm.SyncUserLibrary();

            Form1 principal = new Form1(lm);
            this.Close();
            principal.ShowDialog();
        }
Beispiel #2
0
 private void Button_Click_2(object sender, RoutedEventArgs e)
 {
     OdysseyCloudAPIConsumer clientApiConsumer =new OdysseyCloudAPIConsumer();
     Guid? userID = clientApiConsumer.GetUserAuth(new UserInfo() {Nickname = "manzumbado", Password = "******"}).Result;
     Console.WriteLine(userID.ToString());
     MainWindow principal = new MainWindow();
     principal.Show();
     this.Close();
 }