Example #1
0
        /// <summary>
        /// 下发播放列表
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnRelease_Click(object sender, RoutedEventArgs e)
        {
            PlaylistInfoViewModel Releaseplaylist = playlistdataGrid.Items[playlistdataGrid.SelectedIndex] as PlaylistInfoViewModel;
            IssueCommand          ic = new IssueCommand();

            ic.Command   = AdvertManage.Model.Enum.CommandType.Playlist;
            ic.CommandId = int.Parse(Releaseplaylist.Id);
            ic.ShowDialog();
        }
Example #2
0
        /// <summary>
        /// 编辑播放列表
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnPlayEdit_Click(object sender, RoutedEventArgs e)
        {
            PlaylistInfoViewModel editplaylist = playlistdataGrid.Items[playlistdataGrid.SelectedIndex] as PlaylistInfoViewModel;
            PlaylistEditWindow    pew          = new PlaylistEditWindow();

            pew.Playlist = editplaylist;
            pew.IsEdit   = true;
            pew.ShowDialog();
            DataBinding();
        }
 /// <summary>
 /// 窗体载入
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     if (_IsEdit)
     {
         txtNum.IsEnabled = false;
         btnSave.Content  = "更新";
     }
     else
     {
         Playlist = new PlaylistInfoViewModel();
     }
     itemlistView.ItemsSource = Playlist.ItemList;
 }
Example #4
0
        /// <summary>
        /// 离线版
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDownload_Click(object sender, RoutedEventArgs e)
        {
            PlaylistInfoViewModel editplaylist = playlistdataGrid.Items[playlistdataGrid.SelectedIndex] as PlaylistInfoViewModel;

            System.Windows.Forms.FolderBrowserDialog foldBrowerDialog = new System.Windows.Forms.FolderBrowserDialog();
            foldBrowerDialog.ShowDialog();
            if (!string.IsNullOrEmpty(foldBrowerDialog.SelectedPath))
            {
                if (editplaylist.DownloadPlaylist(foldBrowerDialog.SelectedPath))
                {
                    MessageBox.Show("发布离线版本成功!");
                }
                else
                {
                    MessageBox.Show("发布离线版本失败!");
                }
            }
        }