コード例 #1
0
 private void loadFromSongToGUI(SongData song)
 {
     titleText.Content = song.Title;
     artistAlbumText.Content = song.Artist + " - " + song.Album;
     lyricsText.Content = song.Lyrics;
     Topmost = true;
     Topmost = false;
 }
コード例 #2
0
 private void notifyAndroidDevice(SongData song)
 {
     try
     {
         TcpClient client = new TcpClient();
         client.Connect(IPAddress.Parse("192.168.1.92"), 6969);
         StreamWriter writer = new StreamWriter(client.GetStream());
         writer.WriteLine(song.Title);
         writer.WriteLine(song.Artist);
         writer.WriteLine(song.Album);
         writer.WriteLine(song.Lyrics);
         writer.Close();
         client.Close();
     }
     catch(Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }