Beispiel #1
0
        /// <summary>
        /// Try to get user to pick settings sections for export.
        /// </summary>
        public static bool TryGetExportSelections(out SettingsSelectionViewModel selectionViewModel)
        {
            var dataContext = new SettingsSelectionViewModel
            {
                Title        = "Sections to Export",
                Description  = "Only the sections selected below will be exported.",
                OkButtonText = "Export",
            };

            EnableSections(SettingsSelectionViewModel.GetDefaultSelections(), dataContext);

            var window = UILoader.CreateNonModalWindow(
                "Modals\\SettingsSelection.xaml",
                "Export Settings",
                dataContext,
                350,
                225
                );

            return(OpenSelectionsDialog(out selectionViewModel, dataContext, window));
        }
Beispiel #2
0
        /// <summary>
        /// Try to get user to pick settings sections for import.
        /// </summary>
        public static bool TryGetImportSelections(HashSet <SettingsSelectionItem> importedParts, out SettingsSelectionViewModel selectionViewModel)
        {
            var dataContext = new SettingsSelectionViewModel
            {
                Title        = "Sections to Import",
                Description  = "Only the sections selected below will be imported.",
                OkButtonText = "Import",
            };

            EnableSections(importedParts, dataContext);

            var window = UILoader.CreateNonModalWindow(
                "Modals\\SettingsSelection.xaml",
                "Import Settings",
                dataContext,
                350,
                225
                );

            return(OpenSelectionsDialog(out selectionViewModel, dataContext, window));
        }