private void btnAddFolder_Click(object sender, EventArgs e)
        {
            CursorHelper.ShowWaitCursor(this, true);

            OPMFolderBrowserDialog dlg = new OPMFolderBrowserDialog();

            dlg.Description         = Translator.Translate("TXT_SELECTTAGGEDFILESFOLDER");
            dlg.SelectedPath        = ProTONEConfig.LastOpenedFolder;
            dlg.ShowNewFolderButton = false;

            dlg.InheritAppIcon = false;
            dlg.Icon           = Resources.Tagging16.ToIcon();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                IEnumerable <string> files = PathUtils.EnumFiles(dlg.SelectedPath, "*.mp?", SearchOption.AllDirectories);
                if (files != null)
                {
                    foreach (string file in files)
                    {
                        AddFile(file);
                    }
                }

                ProTONEConfig.LastOpenedFolder = dlg.SelectedPath;
            }

            CursorHelper.ShowWaitCursor(this, false);
            Wizard.CanMoveNext = lvFiles.Items.Count > 0;
        }
Exemplo n.º 2
0
        private void btnOpenDvdFolder_Click(object sender, EventArgs e)
        {
            OPMFolderBrowserDialog dlg = new OPMFolderBrowserDialog();

            dlg.ShowNewFolderButton    = false;
            dlg.Description            = Translator.Translate("TXT_LOAD_DVD_FOLDER");
            dlg.PerformPathValidation += new PerformPathValidationHandler(dlg_PerformPathValidation);

            dlg.InheritAppIcon = false;
            dlg.Icon           = this.Icon;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    _selectedMedia = DvdMedia.FromPath(dlg.SelectedPath);
                }
                catch
                {
                    _selectedMedia = null;
                }

                if (_selectedMedia != null)
                {
                    DialogResult = DialogResult.OK;
                    Close();
                }
                else
                {
                    MessageDisplay.Show(Translator.Translate("TXT_INVALIDDVDVOLUME"),
                                        Translator.Translate("TXT_ERROR"), MessageBoxIcon.Warning);
                }
            }
        }
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            OPMFolderBrowserDialog dlg = new OPMFolderBrowserDialog();

            dlg.SelectedPath = theTask.SearchPath;

            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                theTask.SearchPath = dlg.SelectedPath;
                txtSearchPath.Text = dlg.SelectedPath;
            }
        }
Exemplo n.º 4
0
        private void opmButton1_Click(object sender, EventArgs e)
        {
            OPMFolderBrowserDialog dlg = new OPMFolderBrowserDialog();

            dlg.SelectedPath        = txtDestFolder.Text;
            dlg.ShowNewFolderButton = true;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                txtDestFolder.Text = dlg.SelectedPath;
            }
        }