private void GetSongButt_Click(object sender, RoutedEventArgs e) { MusicPlayer_ClientSide.ServerInterrogationWindow servWindow = new MusicPlayer_ClientSide.ServerInterrogationWindow(); servWindow.Show(); servWindow.Closing += (object sender2, System.ComponentModel.CancelEventArgs e2) => { RefreshLibrary(); }; foreach (Song sng in HttpClient.GetSongList()) { servWindow.SongListBox.Items.Add(sng.ToString()); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ServerWindowXAML = ((MusicPlayer_ClientSide.ServerInterrogationWindow)(target)); return; case 2: #line 9 "..\..\..\Secondary windows\ServerInterrogationWindow.xaml" ((System.Windows.Shapes.Rectangle)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Border_MouseDown); #line default #line hidden return; case 3: this.SongListBox = ((System.Windows.Controls.ListBox)(target)); return; case 4: this.GetSongButt = ((System.Windows.Controls.Button)(target)); #line 11 "..\..\..\Secondary windows\ServerInterrogationWindow.xaml" this.GetSongButt.Click += new System.Windows.RoutedEventHandler(this.GetSongButt_Click); #line default #line hidden return; case 5: this.ExitButt = ((System.Windows.Controls.Button)(target)); #line 12 "..\..\..\Secondary windows\ServerInterrogationWindow.xaml" this.ExitButt.Click += new System.Windows.RoutedEventHandler(this.ExitButt_Click); #line default #line hidden return; case 6: this.Header = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }