Beispiel #1
0
        protected static void InitDialog(FileSystemDialog dialog, double?width, double?height,
                                         string currentDirectory,
                                         bool showHiddenFilesAndDirectories, bool showSystemFilesAndDirectories,
                                         bool createNewDirectoryEnabled       = false,
                                         bool switchPathPartsAsButtonsEnabled = false, bool pathPartsAsButtons = true)
        {
            if (width != null)
            {
                dialog.Width = (double)width;
            }

            if (height != null)
            {
                dialog.Height = (double)height;
            }

            if (!string.IsNullOrWhiteSpace(currentDirectory))
            {
                dialog.CurrentDirectory = currentDirectory;
            }

            dialog.CreateNewDirectoryEnabled       = createNewDirectoryEnabled;
            dialog.ShowHiddenFilesAndDirectories   = showHiddenFilesAndDirectories;
            dialog.ShowSystemFilesAndDirectories   = showSystemFilesAndDirectories;
            dialog.SwitchPathPartsAsButtonsEnabled = switchPathPartsAsButtonsEnabled;
            dialog.PathPartsAsButtons = pathPartsAsButtons;
        }
Beispiel #2
0
        protected static void InitDialog(FileSystemDialog dialog, double?width, double?height,
                                         string currentDirectory,
                                         bool showHiddenFilesAndDirectories, bool showSystemFilesAndDirectories)
        {
            if (width != null)
            {
                dialog.Width = (double)width;
            }

            if (height != null)
            {
                dialog.Height = (double)height;
            }

            if (!string.IsNullOrWhiteSpace(currentDirectory))
            {
                dialog.CurrentDirectory = currentDirectory;
            }

            dialog.ShowHiddenFilesAndDirectories = showHiddenFilesAndDirectories;
            dialog.ShowSystemFilesAndDirectories = showSystemFilesAndDirectories;
        }