private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.CloseReason == CloseReason.UserClosing)
     {
         e.Cancel = true;
         Hide();
     }
     if (e.CloseReason == CloseReason.TaskManagerClosing)
     {
         MSNStatus.Clear();
     }
 }
 private void timer1_Tick(object sender, EventArgs e)
 {
     try
     {
         var obj         = (JObject)JsonConvert.DeserializeObject(File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Google Play Music Desktop Player\\json_store\\playback.json"));
         var songObj     = obj["song"];
         var songTitle   = (string)songObj["title"];
         var songArtist  = (string)songObj["artist"];
         var songAlbum   = (string)songObj["album"];
         var songPlaying = (bool)obj["playing"];
         if (statusesEnabledCheck.Checked)
         {
             if (ShowPausedCheck.Checked)
             {
                 if (songPlaying)
                 {
                     MSNStatus.SetMusic(songArtist, songTitle, songAlbum);
                     currentlyPlayingText.Text = songArtist + " - " + songTitle;
                 }
                 else
                 {
                     MSNStatus.Clear();
                     currentlyPlayingText.Text = "Nothing";
                 }
             }
             else
             {
                 MSNStatus.SetMusic(songArtist, songTitle, songAlbum);
                 currentlyPlayingText.Text = songArtist + " - " + songTitle;
             }
         }
         else
         {
             MSNStatus.Clear();
             currentlyPlayingText.Text = "Nothing";
         }
     } catch
     {
     }
 }
 private void button2_Click(object sender, EventArgs e)
 {
     MSNStatus.Clear();
     Application.Exit();
 }
 private void exitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MSNStatus.Clear();
     Application.Exit();
 }