예제 #1
0
        private void EditExportSetup_Click(object sender, EventArgs e)
        {
            DialogResult dr;

            string exportFormat = ExportFileFormat.Text;

            if (Lex.Eq(exportFormat, "None"))
            {
                MessageBoxMx.Show("You must select a format first", UmlautMobius.String);
                return;
            }

            bool useExistingOptionValues = true;

            if (ExportParms == null)
            {
                ExportParms             = new ResultsFormat();
                useExistingOptionValues = false;
            }

            ExportParms.RunInBackground = true;             // alerts are always run in the background

            if (Lex.Eq(exportFormat, "CSV / Text File"))
            {
                dr = SetupTextFile.ShowDialog(ExportParms, useExistingOptionValues);
            }

            else if (Lex.Eq(exportFormat, "Excel Worksheet"))
            {
                dr = SetupExcel.ShowDialog(ExportParms, useExistingOptionValues);
            }

            else if (Lex.Eq(exportFormat, "MS Word Table"))
            {
                dr = SetupWord.ShowDialog(ExportParms, useExistingOptionValues);
            }

            else if (Lex.Eq(exportFormat, "SDFile"))
            {
                dr = SetupSdFile.ShowDialog(ExportParms, useExistingOptionValues);
            }

            else if (Lex.StartsWith(exportFormat, "Mobius"))
            {
                MessageBoxMx.Show(                 // just give a message
                    "When a full result set is exported in the Native Mobius Format\n" +
                    "the exported data will be automatically displayed when the\n" +
                    "associated query is opened. There is no need to supply any\n" +
                    "additional export parameters.");
            }

            ExportParms.RunInBackground = true;             // reset in case cleared in dialog
            return;
        }
예제 #2
0
        /// <summary>
        /// Setup & show the dialog
        /// </summary>
        /// <param name="rf"></param>

        public static new DialogResult ShowDialog(
            ResultsFormat rf,
            bool useExistingOptionValues,
            bool alertExport = false)
        {
            if (Instance == null)
            {
                Instance = new SetupSdFile();
            }
            return(Instance.ShowDialog2(rf, useExistingOptionValues, alertExport));
        }