private void Border_MouseDown(object sender, MouseButtonEventArgs e) { ListJson lj = new ListJson(); if (He.Settings.MusicList != "") { lj = MusicControl.JsonToObject(He.Settings.MusicList, lj) as ListJson; } lj.List.Add(new ListItem() { ItemText = (this.Music as Music) }); He.Settings.MusicList = MusicControl.ToJSON(lj); He.SaveSettings(); }
private void Border_MouseDown_1(object sender, MouseButtonEventArgs e) { ListJson lj = new ListJson(); if (Settings.Default.MusicList != "") { lj = JsonToObject(Settings.Default.MusicList, lj) as ListJson; } lj.List.Add(new ListItem() { ItemText = ((listBox.SelectedItem as MusicItemControl).Music as string[]) }); Settings.Default.MusicList = ToJSON(lj); Settings.Default.Save(); }