GeneralAppSettingsPageProvider(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService) {
			this.themeService = themeService;
			this.windowsExplorerIntegrationService = windowsExplorerIntegrationService;
			this.documentTabServiceSettings = documentTabServiceSettings;
			this.documentTreeViewSettings = documentTreeViewSettings;
			this.documentServiceSettings = documentServiceSettings;
			this.appSettings = appSettings;
			this.messageBoxService = messageBoxService;
		}
        public AssemblyExplorerAppSettingsPage(DocumentTreeViewSettingsImpl documentTreeViewSettings)
        {
            if (documentTreeViewSettings == null)
            {
                throw new ArgumentNullException(nameof(documentTreeViewSettings));
            }
            this.documentTreeViewSettings = documentTreeViewSettings;

            ShowToken                          = documentTreeViewSettings.ShowToken;
            ShowAssemblyVersion                = documentTreeViewSettings.ShowAssemblyVersion;
            ShowAssemblyPublicKeyToken         = documentTreeViewSettings.ShowAssemblyPublicKeyToken;
            SingleClickExpandsTreeViewChildren = documentTreeViewSettings.SingleClickExpandsTreeViewChildren;
            SyntaxHighlight                    = documentTreeViewSettings.SyntaxHighlight;

            var filterObjs = typeof(DocumentFilterType).GetEnumValues().Cast <DocumentFilterType>().ToArray();

            DocumentFilterTypes = new DocumentFilterTypeVM[filterObjs.Length];
            for (int i = 0; i < filterObjs.Length; i++)
            {
                DocumentFilterTypes[i] = new DocumentFilterTypeVM(filterObjs[i], ToString(filterObjs[i]));
            }

            FilterDraggedItems = DocumentFilterTypes.First(a => a.FilterType == documentTreeViewSettings.FilterDraggedItems);

            var defObjs = typeof(MemberKind).GetEnumValues().Cast <MemberKind>().ToArray();

            memberKindVMs = new MemberKindVM[defObjs.Length];
            for (int i = 0; i < defObjs.Length; i++)
            {
                memberKindVMs[i] = new MemberKindVM(defObjs[i], ToString(defObjs[i]));
            }
            memberKindVMs2 = memberKindVMs.ToArray();

            MemberKind0 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind0);
            MemberKind1 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind1);
            MemberKind2 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind2);
            MemberKind3 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind3);
            MemberKind4 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind4);
        }
 AssemblyExplorerAppSettingsPageProvider(DocumentTreeViewSettingsImpl documentTreeViewSettings)
 {
     this.documentTreeViewSettings = documentTreeViewSettings;
 }
Example #4
0
 GeneralAppSettingsPageProvider(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService)
 {
     this.themeService = themeService;
     this.windowsExplorerIntegrationService = windowsExplorerIntegrationService;
     this.documentTabServiceSettings        = documentTabServiceSettings;
     this.documentTreeViewSettings          = documentTreeViewSettings;
     this.documentServiceSettings           = documentServiceSettings;
     this.appSettings       = appSettings;
     this.messageBoxService = messageBoxService;
 }
Example #5
0
        public GeneralAppSettingsPage(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService)
        {
            if (themeService == null)
            {
                throw new ArgumentNullException(nameof(themeService));
            }
            if (windowsExplorerIntegrationService == null)
            {
                throw new ArgumentNullException(nameof(windowsExplorerIntegrationService));
            }
            if (documentTabServiceSettings == null)
            {
                throw new ArgumentNullException(nameof(documentTabServiceSettings));
            }
            if (documentTreeViewSettings == null)
            {
                throw new ArgumentNullException(nameof(documentTreeViewSettings));
            }
            if (documentServiceSettings == null)
            {
                throw new ArgumentNullException(nameof(documentServiceSettings));
            }
            if (appSettings == null)
            {
                throw new ArgumentNullException(nameof(appSettings));
            }
            if (messageBoxService == null)
            {
                throw new ArgumentNullException(nameof(messageBoxService));
            }
            this.themeService = themeService;
            this.windowsExplorerIntegrationService = windowsExplorerIntegrationService;
            this.documentTabServiceSettings        = documentTabServiceSettings;
            this.documentTreeViewSettings          = documentTreeViewSettings;
            this.documentServiceSettings           = documentServiceSettings;
            this.messageBoxService = messageBoxService;

            ThemesVM = new ObservableCollection <ThemeVM>(themeService.VisibleThemes.Select(a => new ThemeVM(a)));
            if (!ThemesVM.Any(a => a.Theme == themeService.Theme))
            {
                ThemesVM.Add(new ThemeVM(themeService.Theme));
            }
            SelectedThemeVM = ThemesVM.FirstOrDefault(a => a.Theme == themeService.Theme);
            Debug.Assert(SelectedThemeVM != null);

            WindowsExplorerIntegration = windowsExplorerIntegrationService.WindowsExplorerIntegration;
            DecompileFullType          = documentTabServiceSettings.DecompileFullType;
            RestoreTabs          = documentTabServiceSettings.RestoreTabs;
            DeserializeResources = documentTreeViewSettings.DeserializeResources;
            UseMemoryMappedIO    = documentServiceSettings.UseMemoryMappedIO;
            UseNewRendererVM     = new UseNewRendererVM(appSettings);
        }
		public GeneralAppSettingsPage(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService) {
			if (themeService == null)
				throw new ArgumentNullException(nameof(themeService));
			if (windowsExplorerIntegrationService == null)
				throw new ArgumentNullException(nameof(windowsExplorerIntegrationService));
			if (documentTabServiceSettings == null)
				throw new ArgumentNullException(nameof(documentTabServiceSettings));
			if (documentTreeViewSettings == null)
				throw new ArgumentNullException(nameof(documentTreeViewSettings));
			if (documentServiceSettings == null)
				throw new ArgumentNullException(nameof(documentServiceSettings));
			if (appSettings == null)
				throw new ArgumentNullException(nameof(appSettings));
			if (messageBoxService == null)
				throw new ArgumentNullException(nameof(messageBoxService));
			this.themeService = themeService;
			this.windowsExplorerIntegrationService = windowsExplorerIntegrationService;
			this.documentTabServiceSettings = documentTabServiceSettings;
			this.documentTreeViewSettings = documentTreeViewSettings;
			this.documentServiceSettings = documentServiceSettings;
			this.messageBoxService = messageBoxService;

			ThemesVM = new ObservableCollection<ThemeVM>(themeService.VisibleThemes.Select(a => new ThemeVM(a)));
			if (!ThemesVM.Any(a => a.Theme == themeService.Theme))
				ThemesVM.Add(new ThemeVM(themeService.Theme));
			SelectedThemeVM = ThemesVM.FirstOrDefault(a => a.Theme == themeService.Theme);
			Debug.Assert(SelectedThemeVM != null);

			WindowsExplorerIntegration = windowsExplorerIntegrationService.WindowsExplorerIntegration;
			DecompileFullType = documentTabServiceSettings.DecompileFullType;
			RestoreTabs = documentTabServiceSettings.RestoreTabs;
			DeserializeResources = documentTreeViewSettings.DeserializeResources;
			UseMemoryMappedIO = documentServiceSettings.UseMemoryMappedIO;
			UseNewRendererVM = new UseNewRendererVM(appSettings);
		}
		AssemblyExplorerAppSettingsPageProvider(DocumentTreeViewSettingsImpl documentTreeViewSettings) {
			this.documentTreeViewSettings = documentTreeViewSettings;
		}
		public AssemblyExplorerAppSettingsPage(DocumentTreeViewSettingsImpl documentTreeViewSettings) {
			if (documentTreeViewSettings == null)
				throw new ArgumentNullException(nameof(documentTreeViewSettings));
			this.documentTreeViewSettings = documentTreeViewSettings;

			ShowToken = documentTreeViewSettings.ShowToken;
			ShowAssemblyVersion = documentTreeViewSettings.ShowAssemblyVersion;
			ShowAssemblyPublicKeyToken = documentTreeViewSettings.ShowAssemblyPublicKeyToken;
			SingleClickExpandsTreeViewChildren = documentTreeViewSettings.SingleClickExpandsTreeViewChildren;
			SyntaxHighlight = documentTreeViewSettings.SyntaxHighlight;

			var filterObjs = typeof(DocumentFilterType).GetEnumValues().Cast<DocumentFilterType>().ToArray();
			DocumentFilterTypes = new DocumentFilterTypeVM[filterObjs.Length];
			for (int i = 0; i < filterObjs.Length; i++)
				DocumentFilterTypes[i] = new DocumentFilterTypeVM(filterObjs[i], ToString(filterObjs[i]));

			FilterDraggedItems = DocumentFilterTypes.First(a => a.FilterType == documentTreeViewSettings.FilterDraggedItems);

			var defObjs = typeof(MemberKind).GetEnumValues().Cast<MemberKind>().ToArray();
			memberKindVMs = new MemberKindVM[defObjs.Length];
			for (int i = 0; i < defObjs.Length; i++)
				memberKindVMs[i] = new MemberKindVM(defObjs[i], ToString(defObjs[i]));
			memberKindVMs2 = memberKindVMs.ToArray();

			MemberKind0 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind0);
			MemberKind1 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind1);
			MemberKind2 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind2);
			MemberKind3 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind3);
			MemberKind4 = memberKindVMs.First(a => a.Object == documentTreeViewSettings.MemberKind4);
		}