예제 #1
0
        private void Button_ConfirmNewPlaylist_Click(object sender, RoutedEventArgs e)
        {
            PlayListDetailRoot playListDetailRoot = PlaylistService.AddNewPlaylist((bool)CheckBox_Privacy.IsChecked, TextBox_PlaylistName.Text);

            if (playListDetailRoot.code != 200)
            {
                NotifyPopup notifyPopup = new NotifyPopup("创建失败", "\xF78A");
                notifyPopup.Show();
            }
            else
            {
                NotifyPopup notifyPopup = new NotifyPopup("创建成功", "\xF78C", Colors.MediumSeaGreen);
                notifyPopup.Show();
                PlayingService.PlaylistItems_Created.Insert(1, playListDetailRoot.playlist);
                ContentDialog_AddNewPlaylist.Closed += ContentDialog_AddNewPlaylist_Closed;
                ContentDialog_AddNewPlaylist.Hide();
            }
        }
예제 #2
0
 private void Button_CancelNewPlaylist_Click(object sender, RoutedEventArgs e)
 {
     ContentDialog_AddNewPlaylist.Closed += ContentDialog_AddNewPlaylist_Closed;
     ContentDialog_AddNewPlaylist.Hide();
 }