Exemplo n.º 1
0
        private void ToolStripOptionClick(object sender, EventArgs e)
        {
            if (sender == saveToolStripButton || sender == saveToolStripMenuItem)
            {
                if (mainNav.ActiveGroup == groupMediaTree)
                {
                    SaveChanges();
                    ToggleSaveState(false);
                    this.Text = APP_TITLE + " - " + titleEditor.EditedTitle.Name;
                }
                if (mainNav.ActiveGroup == groupGenresMetadata)
                {
                    TitleCollectionManager.SaveGenreMetaDataChanges();
                    genreMetaDataEditor.Status = GenreMetaDataEditor.GenreMetaDataStatus.Normal;
                    this.Text = APP_TITLE + " - " + genreMetaDataEditor.EditedGenreMetaData.Name;

                }
                if (mainNav.ActiveGroup == groupBioData)
                {
                    TitleCollectionManager.SaveBioMetaDataChanges();
                    bioDataEditor.Status = BioDataEditor.BioDataStatus.Normal;
                    this.Text = APP_TITLE + " - " + bioDataEditor.EditedBioData.FullName;
                }
            }
            else if (sender == exitToolStripMenuItem)
            {
                SaveCurrentMovie();
                Application.Exit();
            }
            else if (sender == optionsToolStripMenuItem)
            {
                Options options = new Options();
                options.Owner = this;
                if (options.ShowDialog(this) == DialogResult.OK)
                {
                    if (options.OptionsDirty)
                    {
                        this.titleEditor.SetMRULists();
                        fromPreferredSourcesToolStripMenuItem1.Visible = !String.IsNullOrEmpty(OMLEngine.Settings.OMLSettings.DefaultMetadataPluginMovies);
                    }
                    PopulateMovieListV2(SelectedTreeRoot);
                }
            }
            else if (sender == aboutToolStripMenuItem)
            {
                AboutOML about = new AboutOML();
                about.Show();
            }
            else if (sender == moveDisksToolStripMenuItem)
            {
                // Build list of folders in current title list view
                List<int> titleid = new List<int>();

                foreach (ListViewItem Item in lvTitles.Items)
                {
                    if (Item.Text != "All Media")
                    {
                        titleid.Add(Convert.ToInt32(Item.Text));
                    }
                }

                List<string> folders = (from title in _movieList
                                        where titleid.Contains(title.Key)
                                        from disk in title.Value.Disks
                                        orderby System.IO.Path.GetDirectoryName(disk.Path) ascending
                                        select System.IO.Path.GetDirectoryName(disk.Path)).Distinct().ToList<string>();

                DiskMoverFrm dsm = new DiskMoverFrm(folders);

                if (dsm.ShowDialog(this) == DialogResult.OK)
                {
                    string fromFolder = dsm.fromFolder;
                    string toFolder = dsm.toFolder;

                    List<Disk> disks = (from title in _movieList
                                        from disk in title.Value.Disks
                                        where System.IO.Path.GetDirectoryName(disk.Path).StartsWith(fromFolder)
                                        select disk).ToList();

                    foreach (Disk disk in disks)
                    {
                        disk.Path = System.IO.Path.Combine(
                            System.IO.Path.GetDirectoryName(disk.Path).Replace(fromFolder, toFolder),
                            System.IO.Path.GetFileName(disk.Path));
                    }
                    /*if (dsm.withImages)
                    {
                        if (title.FrontCoverPath.StartsWith(fromFolder))
                        {
                            title.FrontCoverPath = title.FrontCoverPath.Replace(fromFolder, toFolder);
                        }
                        if (title.FrontCoverMenuPath.StartsWith(fromFolder))
                        {
                            title.FrontCoverMenuPath = title.FrontCoverMenuPath.Replace(fromFolder, toFolder);
                        }
                        if (title.BackCoverPath.StartsWith(fromFolder))
                        {
                            title.BackCoverPath = title.BackCoverPath.Replace(fromFolder, toFolder);
                        }
                    }*/

                    TitleCollectionManager.SaveTitleUpdates();
                }
            }
        }
Exemplo n.º 2
0
        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AboutOML about = new AboutOML();

            about.Show();
        }
 private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     AboutOML about = new AboutOML();
     about.Show();
 }