static void Main(string[] args) { //var client = new MegaStarzClient("http://*****:*****@"C:\1020.log", FileMode.Open, FileAccess.Read); } catch (Exception e) { } client.UploadRecordingAsync(response.Ticket.ticket, 1, fs, (recResponse) => { Console.WriteLine(recResponse.playUrl); }); }); // client.GetSongsAsync((response) => // { // foreach (var songResponse in response) // { // Console.WriteLine(string.Format("Song ({0}): \"{1}\", ({2}). Length {3}, PlayUrl: {4}", songResponse.id, songResponse.name, songResponse.artistName, songResponse.length, songResponse.playUrl)); // } // }); System.Threading.Thread.CurrentThread.Suspend(); }
/// <summary> /// Login Success. Get a ticket from the Azure Cloud /// </summary> private void loginSucceeded() { TitlePanel.Visibility = Visibility.Visible; FacebookLoginBrowser.Visibility = Visibility.Collapsed; var client = new MegaStarzClient(); //Get a ticket from the clod client.GetTicketAsync(new GetTicketRequest() { AccessToken = _fbClient.AccessToken }, (response) => //Callback when we have a ticket { if (response != null) { //Save ticket & star object ((App) Application.Current).starTicket = response.Ticket.ticket; ((App) Application.Current).star = response.Star; //Navigate to MegaStarzViewModelInstance Page NavigationService.Navigate(new Uri("/SongListPage.xaml", UriKind.Relative)); } else //Azure could error { Dispatcher.BeginInvoke(() => MessageBox.Show("Could not contact Azure server. Please try again later")); } }); }