Пример #1
0
 public Form1(LibraryManager lm)
 {
     this.lm = lm;
     InitializeComponent();
     dataGridView1.ReadOnly = true;
     this.BindDataGridView();
 }
Пример #2
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();
        }
Пример #3
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     SessionManager instance = SessionManager.Instance;
     instance.UserId = new Guid();
     LibraryManager lm = new LibraryManager();
     //lm.ImportSongsToLibrary("C:\\Users\\Manuel\\Desktop\\mudi");
     instance.UserId=Guid.Parse("1bbe27bd-164f-4798-9e15-6f4fb2f4bbab");
     instance.Nickname = "Majesco";
        // lm = new LibraryManager();
     //lm.ImportSongsToLibrary("C:\\Users\\Manuel\\Desktop\\mudi1");
     lm.InitializeLibrary();
     //OdysseyCloudAPIConsumer ocac =new OdysseyCloudAPIConsumer();
     //var a =ocac.GetUserAuth(new UserInfo() {Nickname = "manzumbado", Password = "******"});
     //Console.WriteLine(a);
     FileManager fm= new FileManager();
     fm.GetUserPathToOdysseyMusic();
     string reslt =fm.uploadFile(@"C:\Users\Manuel\Desktop\music\09 Eclipse.mp3");
     string result2 = fm.downloadFile(reslt);
     CrearCuenta nuevaCuenta = new CrearCuenta();
     nuevaCuenta.Show();
     this.Close();
 }