Example #1
0
        public void OnSettingsModified(IAppRefreshSettings appRefreshSettings)
        {
            bool refreshIL     = appRefreshSettings.Has(SettingsConstants.REDISASSEMBLE_IL_ILSPY_CODE);
            bool refreshILAst  = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_ILAST_ILSPY_CODE);
            bool refreshCSharp = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_CSHARP_ILSPY_CODE);
            bool refreshVB     = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_VB_ILSPY_CODE);

            if (refreshILAst)
            {
                refreshCSharp = refreshVB = true;
            }
            if (refreshCSharp)
            {
                refreshVB = true;
            }

            if (refreshIL)
            {
                RefreshCode <Core.IL.ILDecompiler>();
            }
#if DEBUG
            if (refreshILAst)
            {
                RefreshCode <Core.ILAst.ILAstDecompiler>();
            }
#endif
            if (refreshCSharp)
            {
                RefreshCode <Core.CSharp.CSharpDecompiler>();
            }
            if (refreshVB)
            {
                RefreshCode <Core.VisualBasic.VBDecompiler>();
            }
        }
        public void OnSettingsModified(IAppRefreshSettings appRefreshSettings)
        {
            bool refreshIL     = appRefreshSettings.Has(SettingsConstants.REDISASSEMBLE_IL_ILSPY_CODE);
            bool refreshILAst  = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_ILAST_ILSPY_CODE);
            bool refreshCSharp = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_CSHARP_ILSPY_CODE);
            bool refreshVB     = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_VB_ILSPY_CODE);

            if (refreshILAst)
            {
                refreshCSharp = refreshVB = true;
            }
            if (refreshCSharp)
            {
                refreshVB = true;
            }

            if (refreshIL)
            {
                RefreshCode <IL.ILLanguage>();
            }
#if DEBUG
            if (refreshILAst)
            {
                RefreshCode <ILAst.ILAstLanguage>();
            }
#endif
            if (refreshCSharp)
            {
                RefreshCode <CSharp.CSharpLanguage>();
            }
            if (refreshVB)
            {
                RefreshCode <VB.VBLanguage>();
            }
        }
Example #3
0
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            if (!saveSettings)
            {
                return;
            }

            if (SelectedThemeVM != null)
            {
                themeService.Theme = SelectedThemeVM.Theme;
            }
            windowsExplorerIntegrationService.WindowsExplorerIntegration = WindowsExplorerIntegration;
            documentTabServiceSettings.DecompileFullType  = DecompileFullType;
            documentTabServiceSettings.RestoreTabs        = RestoreTabs;
            documentTreeViewSettings.DeserializeResources = DeserializeResources;

            if (documentServiceSettings.UseMemoryMappedIO != UseMemoryMappedIO)
            {
                documentServiceSettings.UseMemoryMappedIO = UseMemoryMappedIO;
                if (!documentServiceSettings.UseMemoryMappedIO)
                {
                    appRefreshSettings.Add(AppSettingsConstants.DISABLE_MEMORY_MAPPED_IO);
                }
            }

            UseNewRendererVM.Save();
        }
        public void OnApply(IAppRefreshSettings appRefreshSettings)
        {
            documentTreeViewSettings.ShowToken                          = ShowToken;
            documentTreeViewSettings.ShowAssemblyVersion                = ShowAssemblyVersion;
            documentTreeViewSettings.ShowAssemblyPublicKeyToken         = ShowAssemblyPublicKeyToken;
            documentTreeViewSettings.SingleClickExpandsTreeViewChildren = SingleClickExpandsTreeViewChildren;
            documentTreeViewSettings.SyntaxHighlight                    = SyntaxHighlight;

            bool update =
                documentTreeViewSettings.MemberKind0 != MemberKind0.Object ||
                documentTreeViewSettings.MemberKind1 != MemberKind1.Object ||
                documentTreeViewSettings.MemberKind2 != MemberKind2.Object ||
                documentTreeViewSettings.MemberKind3 != MemberKind3.Object ||
                documentTreeViewSettings.MemberKind4 != MemberKind4.Object;

            if (update)
            {
                appRefreshSettings.Add(DocumentTreeViewAppSettingsConstants.REFRESH_ASSEMBLY_EXPLORER_MEMBER_ORDER);
                documentTreeViewSettings.MemberKind0 = MemberKind0.Object;
                documentTreeViewSettings.MemberKind1 = MemberKind1.Object;
                documentTreeViewSettings.MemberKind2 = MemberKind2.Object;
                documentTreeViewSettings.MemberKind3 = MemberKind3.Object;
                documentTreeViewSettings.MemberKind4 = MemberKind4.Object;
            }
        }
Example #5
0
 public void OnSettingsModified(IAppRefreshSettings appRefreshSettings)
 {
     if (appRefreshSettings.Has(AppSettingsConstants.DISABLE_MMAP))
     {
         DisableMemoryMappedIO();
     }
 }
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
     foreach (var option in options)
     {
         option.OnClosed(saveSettings, appRefreshSettings);
     }
 }
 public void OnSettingsModified(IAppRefreshSettings appRefreshSettings)
 {
     bool showMember = appRefreshSettings.Has(AppSettingsConstants.REFRESH_LANGUAGE_SHOWMEMBER);
     bool memberOrder = appRefreshSettings.Has(AppSettingsConstants.REFRESH_TREEVIEW_MEMBER_ORDER);
     if (showMember || memberOrder)
         fileTreeView.RefreshNodes(showMember, memberOrder);
 }
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            if (!saveSettings)
                return;

            displayAppSettingsVM.Settings.CopyTo(hexEditorSettingsImpl);
        }
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            if (!saveSettings)
            {
                return;
            }

            options.UseVirtualSpace            = UseVirtualSpace;
            options.LineNumberMargin           = ShowLineNumbers;
            options.EnableHighlightCurrentLine = HighlightCurrentLine;

            var newStyle = options.WordWrapStyle;

            if (WordWrap)
            {
                newStyle |= WordWrapStyles.WordWrap;
            }
            else
            {
                newStyle &= ~WordWrapStyles.WordWrap;
            }
            if (WordWrapVisualGlyphs)
            {
                newStyle |= WordWrapStyles.VisibleGlyphs;
            }
            else
            {
                newStyle &= ~WordWrapStyles.VisibleGlyphs;
            }
            options.WordWrapStyle = newStyle;
        }
        public void OnSettingsModified(IAppRefreshSettings appRefreshSettings)
        {
            bool refreshIL     = appRefreshSettings.Has(SettingsConstants.REDISASSEMBLE_IL_ILSPY_CODE);
            bool refreshILAst  = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_ILAST_ILSPY_CODE);
            bool refreshCSharp = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_CSHARP_ILSPY_CODE);
            bool refreshVB     = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_VB_ILSPY_CODE);

            if (refreshILAst)
            {
                refreshCSharp = refreshVB = true;
            }
            if (refreshCSharp)
            {
                refreshVB = true;
            }

            if (refreshIL)
            {
                RefreshCode(LanguageConstants.LANGUAGE_IL);
            }
            if (refreshILAst)
            {
                RefreshCode(LanguageConstants.LANGUAGE_ILAST_ILSPY);
            }
            if (refreshCSharp)
            {
                RefreshCode(LanguageConstants.LANGUAGE_CSHARP);
            }
            if (refreshVB)
            {
                RefreshCode(LanguageConstants.LANGUAGE_VB);
            }
        }
Example #11
0
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
     decompilerAppSettingsTabSettings.LastSelectedSettingsName = selectedLanguageSetting == null ? null : selectedLanguageSetting.Name;
     foreach (var setting in settings)
     {
         setting.OnClosed(saveSettings, appRefreshSettings);
     }
 }
Example #12
0
		public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings) {
			// Check if user canceled
			if (!saveSettings)
				return;

			// OK was pressed, save the settings
			newSettings.CopyTo(globalSettings);
		}
Example #13
0
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
     if (!saveSettings)
     {
         return;
     }
     bamlSettings.CopyTo(_global_settings);
 }
Example #14
0
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
     if (!saveSettings)
     {
         return;
     }
     Settings.CopyTo(_global_settings);
     _global_settings.BreakProcessKind = this.BreakProcessKind;
 }
Example #15
0
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
     if (!saveSettings)
     {
         return;
     }
     debuggerSettings.CopyTo(_global_settings);
     _global_settings.BreakProcessType = this.BreakProcessType;
 }
Example #16
0
		public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings) {
			if (!saveSettings)
				return;

			displayAppSettingsVM.OnBeforeSave(appRefreshSettings);
			displayAppSettingsVM.TextEditorSettings.CopyTo(textEditorSettings);
			displayAppSettingsVM.FileTreeViewSettings.CopyTo(fileTreeViewSettings);
			displayAppSettingsVM.FileTabManagerSettings.CopyTo(fileTabManagerSettings);
		}
Example #17
0
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
     backgroundImageSettingsService.LastSelectedId = currentItem.Id;
     if (!saveSettings)
     {
         return;
     }
     backgroundImageSettingsService.SetRawSettings(Settings.Select(a => a.GetUpdatedRawSettings()).ToArray());
 }
Example #18
0
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            if (!saveSettings)
            {
                return;
            }

            displayAppSettingsVM.Settings.CopyTo(hexEditorSettingsImpl);
        }
Example #19
0
        public void OnApply(IAppRefreshSettings appRefreshSettings)
        {
            if (!_global_ilSettings.Equals(ilSettings))
            {
                appRefreshSettings.Add(SettingsConstants.REDISASSEMBLE_IL_ILSPY_CODE);
            }

            ilSettings.CopyTo(_global_ilSettings);
        }
		public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings) {
			if (!saveSettings)
				return;

			if (!_global_ilSettings.Equals(ilSettings))
				appRefreshSettings.Add(SettingsConstants.REDISASSEMBLE_IL_ILSPY_CODE);

			ilSettings.CopyTo(_global_ilSettings);
		}
Example #21
0
		public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings) {
			if (!saveSettings)
				return;

			if (!TabSizeVM.HasError)
				options.TabSize = TabSizeVM.Value;
			if (!IndentSizeVM.HasError)
				options.IndentSize = IndentSizeVM.Value;
			options.ConvertTabsToSpaces = ConvertTabsToSpaces;
		}
Example #22
0
        public void OnSettingsModified(IAppRefreshSettings appRefreshSettings)
        {
            bool showMember  = appRefreshSettings.Has(AppSettingsConstants.REFRESH_LANGUAGE_SHOWMEMBER);
            bool memberOrder = appRefreshSettings.Has(AppSettingsConstants.REFRESH_TREEVIEW_MEMBER_ORDER);

            if (showMember || memberOrder)
            {
                fileTreeView.RefreshNodes(showMember, memberOrder);
            }
        }
Example #23
0
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            if (!saveSettings)
            {
                return;
            }

            textEditorSettings.FontFamily = FontFamily;
            textEditorSettings.FontSize   = FontSize;
        }
Example #24
0
        public void OnSettingsModified(IAppRefreshSettings appRefreshSettings)
        {
            bool showMember  = appRefreshSettings.Has(AppSettingsConstants.REFRESH_LANGUAGE_SHOWMEMBER);
            bool memberOrder = appRefreshSettings.Has(DocumentTreeViewAppSettingsConstants.REFRESH_ASSEMBLY_EXPLORER_MEMBER_ORDER);

            if (showMember || memberOrder)
            {
                documentTreeView.RefreshNodes(showMember, memberOrder);
            }
        }
Example #25
0
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            if (!saveSettings)
            {
                return;
            }

            options.HorizontalScrollBar = HorizontalScrollBar;
            options.VerticalScrollBar   = VerticalScrollBar;
        }
Example #26
0
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            // Check if user canceled
            if (!saveSettings)
            {
                return;
            }

            // OK was pressed, save the settings
            newSettings.CopyTo(globalSettings);
        }
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            if (!saveSettings)
            {
                return;
            }

            displayAppSettingsVM.OnBeforeSave(appRefreshSettings);
            displayAppSettingsVM.TextEditorSettings.CopyTo(textEditorSettingsImpl, editorOptions);
            displayAppSettingsVM.FileTreeViewSettings.CopyTo(fileTreeViewSettings);
            displayAppSettingsVM.FileTabManagerSettings.CopyTo(fileTabManagerSettings);
        }
Example #28
0
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            if (!saveSettings)
            {
                return;
            }

            if (!_global_ilSettings.Equals(ilSettings))
            {
                appRefreshSettings.Add(SettingsConstants.REDISASSEMBLE_IL_ILSPY_CODE);
            }

            ilSettings.CopyTo(_global_ilSettings);
        }
Example #29
0
        public void OnSettingsModified(IAppRefreshSettings appRefreshSettings)
        {
            bool shouldUpdate = appRefreshSettings.Has(Constants.SourceMapSettingsChanged);

            // TODO: only if custom decompiler is selected?

            if (shouldUpdate)
            {
                foreach (var document in documentTabService.DocumentTreeView.DocumentService.GetDocuments())
                {
                    documentTabService.RefreshModifiedDocument(document);
                }
            }
        }
		public void OnSettingsModified(IAppRefreshSettings appRefreshSettings) {
			bool refreshIL = appRefreshSettings.Has(SettingsConstants.REDISASSEMBLE_IL_ILSPY_CODE);
			bool refreshILAst = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_ILAST_ILSPY_CODE);
			bool refreshCSharp = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_CSHARP_ILSPY_CODE);
			bool refreshVB = appRefreshSettings.Has(SettingsConstants.REDECOMPILE_VB_ILSPY_CODE);
			if (refreshILAst)
				refreshCSharp = refreshVB = true;
			if (refreshCSharp)
				refreshVB = true;

			if (refreshIL)
				RefreshCode(LanguageConstants.LANGUAGE_IL);
			if (refreshILAst)
				RefreshCode(LanguageConstants.LANGUAGE_ILAST_ILSPY);
			if (refreshCSharp)
				RefreshCode(LanguageConstants.LANGUAGE_CSHARP);
			if (refreshVB)
				RefreshCode(LanguageConstants.LANGUAGE_VB);
		}
        public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
        {
            if (!saveSettings)
            {
                return;
            }

            options.ReferenceHighlighting             = ReferenceHighlighting;
            options.HighlightRelatedKeywords          = HighlightRelatedKeywords;
            options.BraceMatching                     = HighlightMatchingBrace;
            options.LineSeparators                    = LineSeparators;
            options.ShowStructureLines                = ShowStructureLines;
            options.CompressEmptyOrWhitespaceLines    = CompressEmptyOrWhitespaceLines;
            options.CompressNonLetterLines            = CompressNonLetterLines;
            options.RemoveExtraTextLineVerticalPixels = MinimumLineSpacing;
            options.SelectionMargin                   = SelectionMargin;
            options.GlyphMargin          = GlyphMargin;
            options.EnableMouseWheelZoom = MouseWheelZoom;
            options.ZoomControl          = ZoomControl;
        }
        public void OnBeforeSave(IAppRefreshSettings appRefreshSettings)
        {
            bool update =
                FileTreeViewSettings.MemberKind0 != MemberKind0.Object ||
                FileTreeViewSettings.MemberKind1 != MemberKind1.Object ||
                FileTreeViewSettings.MemberKind2 != MemberKind2.Object ||
                FileTreeViewSettings.MemberKind3 != MemberKind3.Object ||
                FileTreeViewSettings.MemberKind4 != MemberKind4.Object;

            if (update)
            {
                appRefreshSettings.Add(AppSettingsConstants.REFRESH_TREEVIEW_MEMBER_ORDER);
            }

            FileTreeViewSettings.MemberKind0 = MemberKind0.Object;
            FileTreeViewSettings.MemberKind1 = MemberKind1.Object;
            FileTreeViewSettings.MemberKind2 = MemberKind2.Object;
            FileTreeViewSettings.MemberKind3 = MemberKind3.Object;
            FileTreeViewSettings.MemberKind4 = MemberKind4.Object;
        }
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
     foreach (var option in options)
         option.OnClosed(saveSettings, appRefreshSettings);
 }
Example #34
0
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
     onClosed(saveSettings, appRefreshSettings);
 }
		public void OnApply(IAppRefreshSettings appRefreshSettings) {
			if (!_global_ilSettings.Equals(ilSettings))
				appRefreshSettings.Add(SettingsConstants.REDISASSEMBLE_IL_ILSPY_CODE);

			ilSettings.CopyTo(_global_ilSettings);
		}
        public void OnApply(IAppRefreshSettings appRefreshSettings)
        {
            RefreshFlags flags = 0;
            var          g     = _global_decompilerSettings;
            var          d     = decompilerSettings;

            d.DecompilationObject0 = DecompilationObject0.Object;
            d.DecompilationObject1 = DecompilationObject1.Object;
            d.DecompilationObject2 = DecompilationObject2.Object;
            d.DecompilationObject3 = DecompilationObject3.Object;
            d.DecompilationObject4 = DecompilationObject4.Object;

            if (g.AnonymousMethods != d.AnonymousMethods)
            {
                flags |= RefreshFlags.ILAst | RefreshFlags.ShowMember;
            }
            if (g.ExpressionTrees != d.ExpressionTrees)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.YieldReturn != d.YieldReturn)
            {
                flags |= RefreshFlags.ILAst | RefreshFlags.ShowMember;
            }
            if (g.AsyncAwait != d.AsyncAwait)
            {
                flags |= RefreshFlags.ILAst | RefreshFlags.ShowMember;
            }
            if (g.AutomaticProperties != d.AutomaticProperties)
            {
                flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
            }
            if (g.AutomaticEvents != d.AutomaticEvents)
            {
                flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
            }
            if (g.UsingStatement != d.UsingStatement)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.ForEachStatement != d.ForEachStatement)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.LockStatement != d.LockStatement)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.SwitchStatementOnString != d.SwitchStatementOnString)
            {
                flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
            }
            if (g.UsingDeclarations != d.UsingDeclarations)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.QueryExpressions != d.QueryExpressions)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.FullyQualifyAmbiguousTypeNames != d.FullyQualifyAmbiguousTypeNames)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.FullyQualifyAllTypes != d.FullyQualifyAllTypes)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.UseDebugSymbols != d.UseDebugSymbols)
            {
                flags |= RefreshFlags.DecompileAll;
            }
            if (g.ObjectOrCollectionInitializers != d.ObjectOrCollectionInitializers)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.ShowXmlDocumentation != d.ShowXmlDocumentation)
            {
                flags |= RefreshFlags.DecompileAll;
            }
            if (g.RemoveEmptyDefaultConstructors != d.RemoveEmptyDefaultConstructors)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.IntroduceIncrementAndDecrement != d.IntroduceIncrementAndDecrement)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.MakeAssignmentExpressions != d.MakeAssignmentExpressions)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.AlwaysGenerateExceptionVariableForCatchBlocksUnlessTypeIsObject != d.AlwaysGenerateExceptionVariableForCatchBlocksUnlessTypeIsObject)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.ShowTokenAndRvaComments != d.ShowTokenAndRvaComments)
            {
                flags |= RefreshFlags.DecompileAll;
            }
            if (g.DecompilationObject0 != d.DecompilationObject0)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.DecompilationObject1 != d.DecompilationObject1)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.DecompilationObject2 != d.DecompilationObject2)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.DecompilationObject3 != d.DecompilationObject3)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.DecompilationObject4 != d.DecompilationObject4)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.SortMembers != d.SortMembers)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.ForceShowAllMembers != d.ForceShowAllMembers)
            {
                flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
            }
            if (g.SortSystemUsingStatementsFirst != d.SortSystemUsingStatementsFirst)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.MaxArrayElements != d.MaxArrayElements)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.SortCustomAttributes != d.SortCustomAttributes)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.UseSourceCodeOrder != d.UseSourceCodeOrder)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.AllowFieldInitializers != d.AllowFieldInitializers)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.OneCustomAttributePerLine != d.OneCustomAttributePerLine)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.TypeAddInternalModifier != d.TypeAddInternalModifier)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.MemberAddPrivateModifier != d.MemberAddPrivateModifier)
            {
                flags |= RefreshFlags.CSharp;
            }

            if ((flags & RefreshFlags.ShowMember) != 0)
            {
                appRefreshSettings.Add(AppSettingsConstants.REFRESH_LANGUAGE_SHOWMEMBER);
            }
            if ((flags & RefreshFlags.ILAst) != 0)
            {
                appRefreshSettings.Add(SettingsConstants.REDECOMPILE_ILAST_ILSPY_CODE);
            }
            if ((flags & RefreshFlags.CSharp) != 0)
            {
                appRefreshSettings.Add(SettingsConstants.REDECOMPILE_CSHARP_ILSPY_CODE);
            }
            if ((flags & RefreshFlags.VB) != 0)
            {
                appRefreshSettings.Add(SettingsConstants.REDECOMPILE_VB_ILSPY_CODE);
            }

            decompilerSettings.CopyTo(_global_decompilerSettings);
        }
 public void OnSettingsModified(IAppRefreshSettings appRefreshSettings)
 {
     if (appRefreshSettings.Has(AppSettingsConstants.DISABLE_MMAP))
         DisableMemoryMappedIO();
 }
Example #38
0
 /// <summary>
 /// Called when the dialog box has been closed
 /// </summary>
 /// <param name="saveSettings">true to save the settings, false to cancel any changes</param>
 /// <param name="appRefreshSettings">Used if <paramref name="saveSettings"/> is true. Add
 /// anything that needs to be refreshed, eg. re-decompile code</param>
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings) =>
 onClosed(saveSettings, appRefreshSettings, Value);
Example #39
0
		public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings) {
			if (!saveSettings)
				return;
			debuggerSettings.CopyTo(_global_settings);
			_global_settings.BreakProcessType = this.BreakProcessType;
		}
		public void OnSettingsModified(IAppRefreshSettings appRefreshSettings) {
			bool showMember = appRefreshSettings.Has(AppSettingsConstants.REFRESH_LANGUAGE_SHOWMEMBER);
			bool memberOrder = appRefreshSettings.Has(DocumentTreeViewAppSettingsConstants.REFRESH_ASSEMBLY_EXPLORER_MEMBER_ORDER);
			if (showMember || memberOrder)
				documentTreeView.RefreshNodes(showMember, memberOrder);
		}
Example #41
0
 public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
     decompilerAppSettingsTabSettings.LastSelectedSettingsName = selectedLanguageSetting == null ? null : selectedLanguageSetting.Name;
     foreach (var setting in settings)
         setting.OnClosed(saveSettings, appRefreshSettings);
 }
		public void OnApply(IAppRefreshSettings appRefreshSettings) {
			RefreshFlags flags = 0;
			var g = _global_decompilerSettings;
			var d = decompilerSettings;

			d.DecompilationObject0 = DecompilationObject0.Object;
			d.DecompilationObject1 = DecompilationObject1.Object;
			d.DecompilationObject2 = DecompilationObject2.Object;
			d.DecompilationObject3 = DecompilationObject3.Object;
			d.DecompilationObject4 = DecompilationObject4.Object;

			if (g.AnonymousMethods != d.AnonymousMethods) flags |= RefreshFlags.ILAst | RefreshFlags.ShowMember;
			if (g.ExpressionTrees != d.ExpressionTrees) flags |= RefreshFlags.ILAst;
			if (g.YieldReturn != d.YieldReturn) flags |= RefreshFlags.ILAst | RefreshFlags.ShowMember;
			if (g.AsyncAwait != d.AsyncAwait) flags |= RefreshFlags.ILAst | RefreshFlags.ShowMember;
			if (g.AutomaticProperties != d.AutomaticProperties) flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
			if (g.AutomaticEvents != d.AutomaticEvents) flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
			if (g.UsingStatement != d.UsingStatement) flags |= RefreshFlags.CSharp;
			if (g.ForEachStatement != d.ForEachStatement) flags |= RefreshFlags.CSharp;
			if (g.LockStatement != d.LockStatement) flags |= RefreshFlags.CSharp;
			if (g.SwitchStatementOnString != d.SwitchStatementOnString) flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
			if (g.UsingDeclarations != d.UsingDeclarations) flags |= RefreshFlags.CSharp;
			if (g.QueryExpressions != d.QueryExpressions) flags |= RefreshFlags.CSharp;
			if (g.FullyQualifyAmbiguousTypeNames != d.FullyQualifyAmbiguousTypeNames) flags |= RefreshFlags.CSharp;
			if (g.FullyQualifyAllTypes != d.FullyQualifyAllTypes) flags |= RefreshFlags.CSharp;
			if (g.UseDebugSymbols != d.UseDebugSymbols) flags |= RefreshFlags.DecompileAll;
			if (g.ObjectOrCollectionInitializers != d.ObjectOrCollectionInitializers) flags |= RefreshFlags.ILAst;
			if (g.ShowXmlDocumentation != d.ShowXmlDocumentation) flags |= RefreshFlags.DecompileAll;
			if (g.RemoveEmptyDefaultConstructors != d.RemoveEmptyDefaultConstructors) flags |= RefreshFlags.CSharp;
			if (g.IntroduceIncrementAndDecrement != d.IntroduceIncrementAndDecrement) flags |= RefreshFlags.ILAst;
			if (g.MakeAssignmentExpressions != d.MakeAssignmentExpressions) flags |= RefreshFlags.ILAst;
			if (g.AlwaysGenerateExceptionVariableForCatchBlocksUnlessTypeIsObject != d.AlwaysGenerateExceptionVariableForCatchBlocksUnlessTypeIsObject) flags |= RefreshFlags.ILAst;
			if (g.ShowTokenAndRvaComments != d.ShowTokenAndRvaComments) flags |= RefreshFlags.DecompileAll;
			if (g.DecompilationObject0 != d.DecompilationObject0) flags |= RefreshFlags.CSharp;
			if (g.DecompilationObject1 != d.DecompilationObject1) flags |= RefreshFlags.CSharp;
			if (g.DecompilationObject2 != d.DecompilationObject2) flags |= RefreshFlags.CSharp;
			if (g.DecompilationObject3 != d.DecompilationObject3) flags |= RefreshFlags.CSharp;
			if (g.DecompilationObject4 != d.DecompilationObject4) flags |= RefreshFlags.CSharp;
			if (g.SortMembers != d.SortMembers) flags |= RefreshFlags.CSharp;
			if (g.ForceShowAllMembers != d.ForceShowAllMembers) flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
			if (g.SortSystemUsingStatementsFirst != d.SortSystemUsingStatementsFirst) flags |= RefreshFlags.CSharp;
			if (g.MaxArrayElements != d.MaxArrayElements) flags |= RefreshFlags.CSharp;
			if (g.SortCustomAttributes != d.SortCustomAttributes) flags |= RefreshFlags.CSharp;
			if (g.UseSourceCodeOrder != d.UseSourceCodeOrder) flags |= RefreshFlags.CSharp;
			if (g.AllowFieldInitializers != d.AllowFieldInitializers) flags |= RefreshFlags.CSharp;

			if ((flags & RefreshFlags.ShowMember) != 0)
				appRefreshSettings.Add(AppSettingsConstants.REFRESH_LANGUAGE_SHOWMEMBER);
			if ((flags & RefreshFlags.ILAst) != 0)
				appRefreshSettings.Add(SettingsConstants.REDECOMPILE_ILAST_ILSPY_CODE);
			if ((flags & RefreshFlags.CSharp) != 0)
				appRefreshSettings.Add(SettingsConstants.REDECOMPILE_CSHARP_ILSPY_CODE);
			if ((flags & RefreshFlags.VB) != 0)
				appRefreshSettings.Add(SettingsConstants.REDECOMPILE_VB_ILSPY_CODE);

			decompilerSettings.CopyTo(_global_decompilerSettings);
		}
		public void OnApply(IAppRefreshSettings appRefreshSettings) {
			if (SelectedThemeVM != null)
				themeService.Theme = SelectedThemeVM.Theme;
			windowsExplorerIntegrationService.WindowsExplorerIntegration = WindowsExplorerIntegration;
			documentTabServiceSettings.DecompileFullType = DecompileFullType;
			documentTabServiceSettings.RestoreTabs = RestoreTabs;
			documentTreeViewSettings.DeserializeResources = DeserializeResources;

			if (documentServiceSettings.UseMemoryMappedIO != UseMemoryMappedIO) {
				documentServiceSettings.UseMemoryMappedIO = UseMemoryMappedIO;
				if (!documentServiceSettings.UseMemoryMappedIO)
					appRefreshSettings.Add(AppSettingsConstants.DISABLE_MEMORY_MAPPED_IO);
			}

			UseNewRendererVM.Save();
		}
Example #44
0
 void IAppSettingsPage.OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings)
 {
 }
Example #45
0
		public void OnClosed(bool saveSettings, IAppRefreshSettings appRefreshSettings) {
			if (!saveSettings)
				return;
			bamlSettings.CopyTo(_global_settings);
		}
		public void OnApply(IAppRefreshSettings appRefreshSettings) {
			documentTreeViewSettings.ShowToken = ShowToken;
			documentTreeViewSettings.ShowAssemblyVersion = ShowAssemblyVersion;
			documentTreeViewSettings.ShowAssemblyPublicKeyToken = ShowAssemblyPublicKeyToken;
			documentTreeViewSettings.SingleClickExpandsTreeViewChildren = SingleClickExpandsTreeViewChildren;
			documentTreeViewSettings.SyntaxHighlight = SyntaxHighlight;
			documentTreeViewSettings.FilterDraggedItems = FilterDraggedItems.FilterType;

			bool update =
				documentTreeViewSettings.MemberKind0 != MemberKind0.Object ||
				documentTreeViewSettings.MemberKind1 != MemberKind1.Object ||
				documentTreeViewSettings.MemberKind2 != MemberKind2.Object ||
				documentTreeViewSettings.MemberKind3 != MemberKind3.Object ||
				documentTreeViewSettings.MemberKind4 != MemberKind4.Object;
			if (update) {
				appRefreshSettings.Add(DocumentTreeViewAppSettingsConstants.REFRESH_ASSEMBLY_EXPLORER_MEMBER_ORDER);
				documentTreeViewSettings.MemberKind0 = MemberKind0.Object;
				documentTreeViewSettings.MemberKind1 = MemberKind1.Object;
				documentTreeViewSettings.MemberKind2 = MemberKind2.Object;
				documentTreeViewSettings.MemberKind3 = MemberKind3.Object;
				documentTreeViewSettings.MemberKind4 = MemberKind4.Object;
			}
		}
Example #47
0
        public void OnBeforeSave(IAppRefreshSettings appRefreshSettings)
        {
            bool update =
                fileTreeViewSettings.MemberKind0 != MemberKind0.Object ||
                fileTreeViewSettings.MemberKind1 != MemberKind1.Object ||
                fileTreeViewSettings.MemberKind2 != MemberKind2.Object ||
                fileTreeViewSettings.MemberKind3 != MemberKind3.Object ||
                fileTreeViewSettings.MemberKind4 != MemberKind4.Object;
            if (update)
                appRefreshSettings.Add(AppSettingsConstants.REFRESH_TREEVIEW_MEMBER_ORDER);

            fileTreeViewSettings.MemberKind0 = MemberKind0.Object;
            fileTreeViewSettings.MemberKind1 = MemberKind1.Object;
            fileTreeViewSettings.MemberKind2 = MemberKind2.Object;
            fileTreeViewSettings.MemberKind3 = MemberKind3.Object;
            fileTreeViewSettings.MemberKind4 = MemberKind4.Object;
        }