Esempio n. 1
0
        private void exportRunImagesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!RequireActiveProject() || !RequireSubjects())
            {
                return;
            }

            string folderPath = String.Format(String.Format("{0}/{1}/images/",
                                                            Exporter.EXPORT_DIRECTORY,
                                                            Exporter.ToFriendlyFilename(Researcher.Current.ActiveProject.ToString())));

            RunImageExporter runImageExporter = new RunImageExporter();

            runImageExporter.FolderPath = folderPath;
            int imagesExported = runImageExporter.Export(Researcher.Current.ActiveProject);

            DialogResult dialogResult = MessageBox.Show(
                string.Format(
                    "{1} images were exported in the following directory: {0}{2}\n\nOpen Containing Folder?",
                    Environment.NewLine, imagesExported, System.IO.Path.GetFullPath(folderPath)),
                "Images Exported", MessageBoxButtons.YesNo);

            if (dialogResult == System.Windows.Forms.DialogResult.Yes)
            {
                System.Diagnostics.Process.Start(System.IO.Path.GetFullPath(folderPath));
            }
        }
Esempio n. 2
0
        private void exportRunImagesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!RequireActiveProject() || !RequireSubjects())
            {
                return;
            }

                string folderPath = String.Format(String.Format("{0}/{1}/images/",
                Exporter.EXPORT_DIRECTORY,
                Exporter.ToFriendlyFilename(Researcher.Current.ActiveProject.ToString())));

                RunImageExporter runImageExporter = new RunImageExporter();
                runImageExporter.FolderPath = folderPath;
                int imagesExported = runImageExporter.Export(Researcher.Current.ActiveProject);

                DialogResult dialogResult = MessageBox.Show(
                    string.Format(
                        "{1} images were exported in the following directory: {0}{2}\n\nOpen Containing Folder?",
                        Environment.NewLine, imagesExported, System.IO.Path.GetFullPath(folderPath)),
                    "Images Exported", MessageBoxButtons.YesNo);

                if (dialogResult == System.Windows.Forms.DialogResult.Yes)
                {
                    System.Diagnostics.Process.Start(System.IO.Path.GetFullPath(folderPath));
                }
        }