コード例 #1
0
        void GenerateAndExportSeriesOfReportsSPSS()
        {
            var sessionTopicDlg = new NewSessionTopicDlg();

            sessionTopicDlg.ShowDialog();

            var selector = new ExportEventSelector(_exportEventSelectorVM);

            selector.ShowDialog();

            var dlg = new Microsoft.Win32.OpenFileDialog
            {
                DefaultExt      = ".csv",
                Filter          = "CSV files (.csv)|*.csv",
                CheckFileExists = false,
                Title           = "Report pathname?"
            };

            // Set filter for file extension and default file extension

            // Display OpenFileDialog by calling ShowDialog method
            bool?result = dlg.ShowDialog();

            if (result.Value)
            {
                CsvEventExporter.Export(dlg.FileName,
                                        _exportEventSelectorVM,
                                        sessionTopicDlg.Model.SelectedReportTargets
                                        );

                var dirName = System.IO.Path.GetDirectoryName(dlg.FileName);

                try
                {
                    Process.Start("explorer.exe", dirName);
                }
                catch
                {
                }
            }
        }
コード例 #2
0
        void GenerateAndExportSeriesOfReportsSPSS()
        {
            var sessionTopicDlg = new NewSessionTopicDlg();
            sessionTopicDlg.ShowDialog();

            var selector = new ExportEventSelector(_exportEventSelectorVM);
            selector.ShowDialog();

            var dlg = new Microsoft.Win32.OpenFileDialog
            {
                DefaultExt = ".csv",
                Filter = "CSV files (.csv)|*.csv",
                CheckFileExists = false,
                Title = "Report pathname?"
            };

            // Set filter for file extension and default file extension

            // Display OpenFileDialog by calling ShowDialog method
            bool? result = dlg.ShowDialog();

            if (result.Value)
            {
                CsvEventExporter.Export(dlg.FileName,
                    _exportEventSelectorVM,
                    sessionTopicDlg.Model.SelectedReportTargets
                    );

                var dirName = System.IO.Path.GetDirectoryName(dlg.FileName);

                try
                {
                    Process.Start("explorer.exe", dirName);
                }
                catch 
                {
                }
            }
        }