public SpotifyPage() { InitializeComponent(); var agent = new TransferAgent(); agent.SpotifyAgent.OnAuthEvent += () => Dispatcher.Invoke(NextPage); transferAgent = agent; spotifyAuthButton.Click += async(o, e) => await agent.SpotifyAuth(); LayoutUpdated += (o, e) => CloseNavBar(); }
public TransferPage(TransferAgent agent) { transferAgent = agent; InitializeComponent(); var autoEvent = new AutoResetEvent(false); AddButton.Click += (o, e) => AddTracksButton(); agent.OnAddSongEvent += (song) => Dispatcher.Invoke(() => AddSongToList(song)); agent.OnEndFindSongEvent += () => Dispatcher.Invoke(UnblockAddButton); agent.OnEndAddSongsEvent += () => Dispatcher.Invoke(End); agent.GenerateSpotifyTracksUris(agent.VkAgent.GetUserUrl()); }
public VkPage(TransferAgent agent) { InitializeComponent(); this.agent = agent; AuthButton.Click += (o, e) => Auth(); }