Beispiel #1
0
        public static SaveAsDialog CreateFolderDialog(bool showSfaCheckbox)
        {
            var result = new SaveAsDialog();

            result.dlg = new CommonOpenFileDialog();
            if (showSfaCheckbox)
            {
                result.AddSfaCheckbox();
            }
            (result.dlg as CommonOpenFileDialog).IsFolderPicker = true;

            return(result);
        }
Beispiel #2
0
        public static SaveAsDialog CreateFileDialog(bool showSfaCheckbox, string defaultFileName, bool allowPbit)
        {
            var result = new SaveAsDialog();

            result.dlg = new CommonSaveFileDialog();
            if (showSfaCheckbox)
            {
                result.AddSfaCheckbox();
            }
            result.dlg.DefaultFileName = defaultFileName;
            result.dlg.Filters.Clear();
            if (allowPbit)
            {
                result.dlg.Filters.Add(new CommonFileDialogFilter("Power BI Template", "*.pbit"));
            }
            result.dlg.Filters.Add(new CommonFileDialogFilter("Tabular Model Files", "*.bim"));
            result.dlg.Filters.Add(new CommonFileDialogFilter("All files", "*.*"));

            return(result);
        }