Exemple #1
0
        private void showButton_Click(object sender, EventArgs e)
        {
            VideoListItem selectedItem = this.filePropertyGrid.SelectedObject as VideoListItem;

            if (selectedItem != null)
            {
                try
                {
                    System.Diagnostics.Process.Start(selectedItem.Url.ToString());
                }
                catch { }
            }
        }
Exemple #2
0
        private void removeButton_Click(object sender, EventArgs e)
        {
            VideoListItem selectedItem = this.filePropertyGrid.SelectedObject as VideoListItem;

            if (selectedItem != null)
            {
                if (MessageBox.Show("Are you sure you want to delete this video?", "Confirm delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                {
                    Viddler.ViddlerService viddlerService = this.GetVidlerService();

                    if (viddlerService.Videos.Delete(selectedItem.Id))
                    {
                        this.LoadVideoList(viddlerService);
                        MessageBox.Show("The video has been deleted successfully.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
        }