Example #1
0
        private void lvWatchedFolders_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (((ListView)sender).SelectedItems.Count <= 0)
            {
                return;
            }

            List <ListViewItem> itemstoupdate = new List <ListViewItem>();

            foreach (ListViewItem item in ((ListView)sender).SelectedItems)
            {
                itemstoupdate.Add(item);
            }

            MediaTreePicker mtp = new MediaTreePicker();

            if (mtp.ShowDialog() == DialogResult.OK)
            {
                foreach (ListViewItem lvi in itemstoupdate)
                {
                    lvi.SubItems[1].Text = mtp.SelectedTitleName;
                    lvi.Tag = mtp.SelectedTitleID;
                }
            }
        }
Example #2
0
        private void CreateTitleShortcut_Click(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection sic = lvTitles.SelectedItems;
            if (sic.Count < 1) return;

            // Get the parent for the shortcut
            MediaTreePicker mtp = new MediaTreePicker();
            if (mtp.ShowDialog() == DialogResult.OK)
            {
                //lvi.SubItems[1].Text = mtp.SelectedTitleName;
                //lvi.Tag = mtp.SelectedTitleID;
                foreach (ListViewItem item in sic)
                {
                    Title title = _movieList[Convert.ToInt32(item.Text)];

                    if ((title.TitleType & TitleTypes.Shortcut) != 0)
                    {
                        XtraMessageBox.Show("Cannot create a shortcut to '" + title.Name + "'", "Error creating shortcut!");
                    }
                    else
                    {
                        if ((title.TitleType & TitleTypes.AllFolders) != 0)
                        {
                            // Folder
                            CreateFolder(mtp.SelectedTitleID,
                                "Shortcut to : " + title.Name,
                                title.TitleType | TitleTypes.Shortcut,
                                title.SeasonNumber,
                                true);

                        }

                        if ((title.TitleType & TitleTypes.AllMedia) != 0)
                        {
                            // Movie or episode
                            CreateTitle(mtp.SelectedTitleID,
                                "Shortcut to : " + title.Name,
                                title.TitleType | TitleTypes.Shortcut,
                                title.SeasonNumber,
                                title.EpisodeNumber,
                                null,
                                true);
                        }
                    }
                }
            }

            TitleCollectionManager.SaveTitleUpdates();
        }
Example #3
0
        private void lvWatchedFolders_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (((ListView)sender).SelectedItems.Count <= 0) return;

            List<ListViewItem> itemstoupdate = new List<ListViewItem>();

            foreach (ListViewItem item in ((ListView)sender).SelectedItems)
            {
                itemstoupdate.Add(item);
            }

            MediaTreePicker mtp = new MediaTreePicker();
            if (mtp.ShowDialog() == DialogResult.OK)
            {
                foreach (ListViewItem lvi in itemstoupdate)
                {
                    lvi.SubItems[1].Text = mtp.SelectedTitleName;
                    lvi.Tag = mtp.SelectedTitleID;
                }
            }
        }