diff --git a/src/SnippetDesigner/Guids.cs b/src/SnippetDesigner/Guids.cs index 1dbeab3..c4ea5a7 100644 --- a/src/SnippetDesigner/Guids.cs +++ b/src/SnippetDesigner/Guids.cs @@ -1,4 +1,5 @@ -using System; +using Microsoft.VisualStudio; +using System; namespace Microsoft.SnippetDesigner { @@ -22,9 +23,6 @@ public static class GuidList internal const string markerServiceString = "BD9FE285-9066-4553-9C6A-C2F49A24777E"; - internal const string autoLoadOnSolutionExists = "f1536ef8-92ec-443c-9ed7-fdadf150da82"; - internal const string autoLoadOnNoSolution = "adfc4e64-0397-11d1-9f4e-00a0c911004f"; - internal const string editorFactoryLogicalView = "{7651a703-06e5-11d1-8ebd-00a0c90f26ea}"; internal const string miscellaneousFilesProject = "{A2FE74E1-B743-11d0-AE1A-00A0C90FFFC3}"; diff --git a/src/SnippetDesigner/Properties/AssemblyInfo.cs b/src/SnippetDesigner/Properties/AssemblyInfo.cs index ef44e1c..d3c82fe 100644 --- a/src/SnippetDesigner/Properties/AssemblyInfo.cs +++ b/src/SnippetDesigner/Properties/AssemblyInfo.cs @@ -23,4 +23,4 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.6.*")] \ No newline at end of file +[assembly: AssemblyVersion("1.8.*")] \ No newline at end of file diff --git a/src/SnippetDesigner/SnippetDesigner.csproj b/src/SnippetDesigner/SnippetDesigner.csproj index 3d8afcb..aa8da31 100644 --- a/src/SnippetDesigner/SnippetDesigner.csproj +++ b/src/SnippetDesigner/SnippetDesigner.csproj @@ -2,10 +2,13 @@ - 15.0 - 15.0 + 16.0 + 16.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - 14.0 + + + + 15.0 Debug AnyCPU 2.0 @@ -43,6 +46,9 @@ + Program + $(DevEnvDir)devenv.exe + /rootsuffix Exp true @@ -72,6 +78,9 @@ ..\..\..\..\CxCache\VSSDK.CoreUtility.12.0.4\lib\net45\Microsoft.VisualStudio.CoreUtility.dll True + + ..\..\..\..\CxCache\Microsoft.VisualStudio.DpiAwareness.6.5.29903\lib\net46\Microsoft.VisualStudio.DpiAwareness.dll + ..\..\..\..\CxCache\VSSDK.Editor.12.0.4\lib\net45\Microsoft.VisualStudio.Editor.dll True diff --git a/src/SnippetDesigner/SnippetDesigner.pkgdef b/src/SnippetDesigner/SnippetDesigner.pkgdef index 3c25898..8dc1f00 100644 Binary files a/src/SnippetDesigner/SnippetDesigner.pkgdef and b/src/SnippetDesigner/SnippetDesigner.pkgdef differ diff --git a/src/SnippetDesigner/SnippetDesignerPackage.cs b/src/SnippetDesigner/SnippetDesignerPackage.cs index ba74ed3..663e4c9 100644 --- a/src/SnippetDesigner/SnippetDesignerPackage.cs +++ b/src/SnippetDesigner/SnippetDesignerPackage.cs @@ -36,15 +36,15 @@ namespace Microsoft.SnippetDesigner // This attribute tells the registration utility (regpkg.exe) that this class needs // to be registered as package. [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] - [InstalledProductRegistration("#100", "#102", "1.6.5", IconResourceID = 404)] + [InstalledProductRegistration("#100", "#102", "1.8.1", IconResourceID = 404)] [ProvideMenuResource("Menus.ctmenu", 1)] // This attribute registers a tool window exposed by this package. [ProvideToolWindow(typeof(SnippetExplorerToolWindow))] // Options pages [ProvideOptionPage(typeof(SnippetDesignerOptions), "Snippet Designer", "General Options", 14340, 17770, true)] [ProvideOptionPage(typeof(ResetOptions), "Snippet Designer", "Reset", 14340, 17771, true)] - [ProvideAutoLoad(GuidList.autoLoadOnNoSolution, PackageAutoLoadFlags.BackgroundLoad)] - [ProvideAutoLoad(GuidList.autoLoadOnSolutionExists, PackageAutoLoadFlags.BackgroundLoad)] + [ProvideAutoLoad(VSConstants.UICONTEXT.SolutionExistsAndFullyLoaded_string, PackageAutoLoadFlags.BackgroundLoad)] + [ProvideAutoLoad(VSConstants.UICONTEXT.NoSolution_string, PackageAutoLoadFlags.BackgroundLoad)] [ProvideEditorExtension(typeof(EditorFactory), StringConstants.SnippetExtension, 70, ProjectGuid = GuidList.miscellaneousFilesProject, DefaultName = "Snippet Designer", @@ -148,7 +148,12 @@ public bool IsVisualStudio2013 public bool IsVisualStudio2017 { - get { return VSVersion.Equals("15.0"); } + get { return VSVersion.StartsWith("15."); } + } + + public bool IsVisualStudio2019 + { + get { return VSVersion.StartsWith("16."); } } /// @@ -249,7 +254,6 @@ private void ShowSnippetExplorer(object sender, EventArgs e) { throw new COMException(Resources.CanNotCreateWindow); } - Guid textEditor = GuidList.textEditorFactory; var windowFrame = (IVsWindowFrame)window.Frame; ErrorHandler.ThrowOnFailure(windowFrame.Show()); } diff --git a/src/SnippetDesigner/SnippetDirectories.cs b/src/SnippetDesigner/SnippetDirectories.cs index 7586ecf..e90f4b4 100644 --- a/src/SnippetDesigner/SnippetDirectories.cs +++ b/src/SnippetDesigner/SnippetDirectories.cs @@ -72,6 +72,11 @@ private void AddPathsFromRegistryKey(RegistryKey key, string subKeyName) { using (RegistryKey subKey = key.OpenSubKey(subKeyName)) { + if (subKey == null) + { + return; + } + foreach (string name in subKey.GetValueNames()) { string possiblePathString = subKey.GetValue(name) as string; diff --git a/src/SnippetDesigner/SnippetEditor/SnippetEditor.cs b/src/SnippetDesigner/SnippetEditor/SnippetEditor.cs index fef1b20..d3aad92 100644 --- a/src/SnippetDesigner/SnippetEditor/SnippetEditor.cs +++ b/src/SnippetDesigner/SnippetEditor/SnippetEditor.cs @@ -143,41 +143,31 @@ public SnippetEditor(SnippetDesignerPackage package) public void SetPropertyGridColors() { ThreadHelper.ThrowIfNotOnUIThread(); - IVsUIShell5 shell = (IVsUIShell5)GetVsService(typeof(SVsUIShell)); - var backgroundColor2 = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemBackgroundColorKey); - var backgroundColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowBackgroundColorKey); + IVsUIShell5 shell = (IVsUIShell5)GetVsService(typeof(SVsUIShell)); + var searchBoxBackgroundColorKey = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SearchBoxBackgroundColorKey); + var backgroundColorLighter = VsColors.GetThemedGDIColor(shell, EnvironmentColors.BrandedUIBackgroundColorKey); + var backgroundColorDarker = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowBackgroundColorKey); var foregroundColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowTextColorKey); - var lineColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowContentGridColorKey); - var disabledColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemGrayTextColorKey); - var highlightColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemHighlightColorKey); - var highlightTextColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemHighlightTextColorKey); - var hyperLinkColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ControlLinkTextColorKey); - var hyperLinkActiveColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ControlLinkTextPressedColorKey); - var buttonFaceColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemButtonFaceBrushKey); - var buttonTextColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemButtonTextColorKey); - var toolWindowContentGridColorKey = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowContentGridColorKey); - var gridHeadingBackgroundColorKey = VsColors.GetThemedGDIColor(shell, EnvironmentColors.GridHeadingBackgroundColorKey); - var gridHeadingTextColorKey = VsColors.GetThemedGDIColor(shell, EnvironmentColors.GridHeadingTextColorKey); - - this.codeReplacementsSplitter.BackColor = backgroundColor; - this.languageLabel.BackColor = backgroundColor; + + this.codeReplacementsSplitter.BackColor = backgroundColorDarker; + this.languageLabel.BackColor = backgroundColorLighter; this.languageLabel.ForeColor = foregroundColor; - this.replacementLabel.BackColor = backgroundColor; + this.replacementLabel.BackColor = backgroundColorLighter; this.replacementLabel.ForeColor = foregroundColor; this.replacementTable.CellBorderStyle = TableLayoutPanelCellBorderStyle.None; - this.shortcutLabel.BackColor = backgroundColor; + this.shortcutLabel.BackColor = backgroundColorLighter; this.shortcutLabel.ForeColor = foregroundColor; - this.shortcutTextBox.BackColor = backgroundColor; + this.shortcutTextBox.BackColor = searchBoxBackgroundColorKey; this.shortcutTextBox.ForeColor = foregroundColor; - this.snippetCodeWindow.BackColor = backgroundColor; + this.snippetCodeWindow.BackColor = backgroundColorDarker; this.snippetCodeWindow.ForeColor = foregroundColor; - this.snippetsLabel.BackColor = backgroundColor; + this.snippetsLabel.BackColor = backgroundColorLighter; this.snippetsLabel.ForeColor = foregroundColor; - this.toolStripLanguageBox.BackColor = backgroundColor; + this.toolStripLanguageBox.BackColor = searchBoxBackgroundColorKey; this.toolStripLanguageBox.ForeColor = foregroundColor; - this.toolStripSnippetTitles.BackColor = backgroundColor; + this.toolStripSnippetTitles.BackColor = searchBoxBackgroundColorKey; this.toolStripSnippetTitles.ForeColor = foregroundColor; - this.topCommandBar.BackColor = backgroundColor; + this.topCommandBar.BackColor = backgroundColorLighter; this.topCommandBar.ForeColor = foregroundColor; } diff --git a/src/SnippetDesigner/SnippetEditor/SnippetEditorForm.Designer.cs b/src/SnippetDesigner/SnippetEditor/SnippetEditorForm.Designer.cs index 50f9b15..1445c51 100644 --- a/src/SnippetDesigner/SnippetEditor/SnippetEditorForm.Designer.cs +++ b/src/SnippetDesigner/SnippetEditor/SnippetEditorForm.Designer.cs @@ -38,7 +38,6 @@ public void InitializeComponent() this.shortcutLabel = new System.Windows.Forms.ToolStripLabel(); this.shortcutTextBox = new System.Windows.Forms.ToolStripTextBox(); this.codeReplacementsSplitter = new System.Windows.Forms.SplitContainer(); - this.snippetCodeWindow = new Microsoft.SnippetDesigner.CodeWindow(); this.replacementTable = new System.Windows.Forms.TableLayoutPanel(); this.replacementGridView = new System.Windows.Forms.DataGridView(); this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -51,6 +50,7 @@ public void InitializeComponent() this.replacementGridMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.removeReplacementToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.replacementLabel = new System.Windows.Forms.Label(); + this.snippetCodeWindow = new Microsoft.SnippetDesigner.CodeWindow(); this.topCommandBar.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.codeReplacementsSplitter)).BeginInit(); this.codeReplacementsSplitter.Panel1.SuspendLayout(); @@ -63,6 +63,8 @@ public void InitializeComponent() // // topCommandBar // + resources.ApplyResources(this.topCommandBar, "topCommandBar"); + this.topCommandBar.GripMargin = new System.Windows.Forms.Padding(1); this.topCommandBar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.topCommandBar.ImageScalingSize = new System.Drawing.Size(32, 32); this.topCommandBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -72,7 +74,6 @@ public void InitializeComponent() this.toolStripLanguageBox, this.shortcutLabel, this.shortcutTextBox}); - resources.ApplyResources(this.topCommandBar, "topCommandBar"); this.topCommandBar.Name = "topCommandBar"; this.topCommandBar.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; this.topCommandBar.Paint += new System.Windows.Forms.PaintEventHandler(this.mainObjectsRepaiont_Paint); @@ -110,8 +111,8 @@ public void InitializeComponent() // // shortcutTextBox // - this.shortcutTextBox.Name = "shortcutTextBox"; resources.ApplyResources(this.shortcutTextBox, "shortcutTextBox"); + this.shortcutTextBox.Name = "shortcutTextBox"; this.shortcutTextBox.TextChanged += new System.EventHandler(this.shortcutTextBox_TextChanged); // // codeReplacementsSplitter @@ -127,13 +128,6 @@ public void InitializeComponent() // this.codeReplacementsSplitter.Panel2.Controls.Add(this.replacementTable); // - // snippetCodeWindow - // - resources.ApplyResources(this.snippetCodeWindow, "snippetCodeWindow"); - this.snippetCodeWindow.CodeText = ""; - this.snippetCodeWindow.Name = "snippetCodeWindow"; - this.snippetCodeWindow.Paint += new System.Windows.Forms.PaintEventHandler(this.mainObjectsRepaiont_Paint); - // // replacementTable // resources.ApplyResources(this.replacementTable, "replacementTable"); @@ -234,6 +228,13 @@ public void InitializeComponent() resources.ApplyResources(this.replacementLabel, "replacementLabel"); this.replacementLabel.Name = "replacementLabel"; // + // snippetCodeWindow + // + resources.ApplyResources(this.snippetCodeWindow, "snippetCodeWindow"); + this.snippetCodeWindow.CodeText = ""; + this.snippetCodeWindow.Name = "snippetCodeWindow"; + this.snippetCodeWindow.Paint += new System.Windows.Forms.PaintEventHandler(this.mainObjectsRepaiont_Paint); + // // SnippetEditorForm // resources.ApplyResources(this, "$this"); @@ -253,7 +254,6 @@ public void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.replacementGridView)).EndInit(); this.replacementGridMenu.ResumeLayout(false); this.ResumeLayout(false); - this.PerformLayout(); } diff --git a/src/SnippetDesigner/SnippetEditor/SnippetEditorForm.resx b/src/SnippetDesigner/SnippetEditor/SnippetEditorForm.resx index 77d6219..cc9abc6 100644 --- a/src/SnippetDesigner/SnippetEditor/SnippetEditorForm.resx +++ b/src/SnippetDesigner/SnippetEditor/SnippetEditorForm.resx @@ -120,25 +120,29 @@ 0, 0 + + + False + - 102, 37 + 50, 25 Flat - 238, 40 + 121, 23 - 131, 37 + 65, 20 - 238, 40 + 121, 23 - 110, 37 + 55, 20 Shortcut: @@ -146,19 +150,21 @@ Keyboard shortcut to insert this snippet + + Segoe UI, 9pt + - 196, 40 + 100, 23 0, 0 - 0, 0, 2, 0 + 1, 2, 2, 0 - 1690, 40 + 845, 30 - 0 @@ -181,10 +187,7 @@ Fill - 0, 40 - - - 6, 6, 6, 6 + 0, 30 Horizontal @@ -198,14 +201,11 @@ 0, 0 - - 6, 6, 6, 6 - - 500, 192 + 250, 100 - 1690, 995 + 845, 511 15 @@ -214,7 +214,7 @@ snippetCodeWindow - Microsoft.SnippetDesigner.CodeWindow, SnippetDesigner, Version=1.6.6287.20653, Culture=neutral, PublicKeyToken=8cfc085d5269c705 + Microsoft.SnippetDesigner.CodeWindow, SnippetDesigner, Version=1.8.7422.18551, Culture=neutral, PublicKeyToken=8cfc085d5269c705 codeReplacementsSplitter.Panel1 @@ -261,14 +261,8 @@ 130, 5 - - 346, 38 - - - Remove Replacement - - 347, 42 + 190, 26 replacementGridMenu @@ -280,13 +274,10 @@ Fill - 6, 31 - - - 6, 6, 6, 6 + 3, 16 - 1678, 483 + 839, 249 26 @@ -313,13 +304,10 @@ NoControl - 6, 0 - - - 6, 0, 6, 0 + 3, 0 - 149, 25 + 75, 13 23 @@ -345,14 +333,11 @@ 0, 0 - - 6, 6, 6, 6 - 2 - 1690, 520 + 845, 268 0 @@ -385,13 +370,10 @@ 1 - 1690, 1523 + 845, 783 - 995 - - - 8 + 511 1 @@ -408,6 +390,12 @@ 1 + + 189, 22 + + + Remove Replacement + True @@ -415,7 +403,7 @@ 339 - 12, 25 + 6, 13 True @@ -423,11 +411,8 @@ GrowAndShrink - - 6, 6, 6, 6 - - 1690, 1563 + 845, 813 snippetsLabel diff --git a/src/SnippetDesigner/SnippetExplorer/SnippetExplorerForm.cs b/src/SnippetDesigner/SnippetExplorer/SnippetExplorerForm.cs index dc4d316..f3113ca 100644 --- a/src/SnippetDesigner/SnippetExplorer/SnippetExplorerForm.cs +++ b/src/SnippetDesigner/SnippetExplorer/SnippetExplorerForm.cs @@ -35,6 +35,7 @@ public partial class SnippetExplorerForm : UserControl, ICodeWindowHost /// public SnippetExplorerForm() { + ThreadHelper.ThrowIfNotOnUIThread(); InitializeComponent(); previewCodeWindow.CodeWindowHost = this; @@ -55,48 +56,42 @@ public void SetPropertyGridColors() { ThreadHelper.ThrowIfNotOnUIThread(); IVsUIShell5 shell = (IVsUIShell5)GetVsService(typeof(SVsUIShell)); - var backgroundColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowBackgroundColorKey); + + var backgroundColorDarker = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowBackgroundColorKey); + var backgroundColorLighter = VsColors.GetThemedGDIColor(shell, EnvironmentColors.BrandedUIBackgroundColorKey); + var searchBoxBackgroundColorKey = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SearchBoxBackgroundColorKey); var foregroundColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowTextColorKey); - var lineColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowContentGridColorKey); - var disabledColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemGrayTextColorKey); - var highlightColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemHighlightColorKey); - var highlightTextColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemHighlightTextColorKey); - var hyperLinkColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ControlLinkTextColorKey); - var hyperLinkActiveColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ControlLinkTextPressedColorKey); var buttonFaceColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemButtonFaceBrushKey); var buttonTextColor = VsColors.GetThemedGDIColor(shell, EnvironmentColors.SystemButtonTextColorKey); - var toolWindowContentGridColorKey = VsColors.GetThemedGDIColor(shell, EnvironmentColors.ToolWindowContentGridColorKey); - var gridHeadingBackgroundColorKey = VsColors.GetThemedGDIColor(shell, EnvironmentColors.GridHeadingBackgroundColorKey); - var gridHeadingTextColorKey = VsColors.GetThemedGDIColor(shell, EnvironmentColors.GridHeadingTextColorKey); this.searchButton.BackColor = buttonFaceColor; this.searchButton.ForeColor = buttonTextColor; - this.searchOptionBar.BackColor = backgroundColor; + this.searchOptionBar.BackColor = backgroundColorLighter; this.searchOptionBar.ForeColor = foregroundColor; - this.searchBox.BackColor = backgroundColor; + this.searchBox.BackColor = searchBoxBackgroundColorKey; this.searchBox.ForeColor = foregroundColor; - this.showCountComboBox.BackColor = backgroundColor; + this.showCountComboBox.BackColor = searchBoxBackgroundColorKey; this.showCountComboBox.ForeColor = foregroundColor; - this.showCountLabel.BackColor = backgroundColor; + this.showCountLabel.BackColor = backgroundColorLighter; this.showCountLabel.ForeColor = foregroundColor; - this.languageLabel.BackColor = backgroundColor; + this.languageLabel.BackColor = backgroundColorLighter; this.languageLabel.ForeColor = foregroundColor; - this.languageFilters.BackColor = backgroundColor; + this.languageFilters.BackColor = backgroundColorLighter; this.languageFilters.ForeColor = foregroundColor; - this.panel1.BackColor = backgroundColor; + this.panel1.BackColor = backgroundColorLighter; this.panel1.ForeColor = foregroundColor; - this.panel2.BackColor = backgroundColor; + this.panel2.BackColor = backgroundColorLighter; this.panel2.ForeColor = foregroundColor; - this.tableLayoutPanel1.BackColor = backgroundColor; + this.tableLayoutPanel1.BackColor = backgroundColorLighter; //this.tableLayoutPanel1.ForeColor = foregroundColor; this.tableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.None; - this.toolStripSeparator1.BackColor = backgroundColor; + this.toolStripSeparator1.BackColor = backgroundColorLighter; this.toolStripSeparator1.ForeColor = foregroundColor; - this.snippetExplorerSplitter.BackColor = backgroundColor; + this.snippetExplorerSplitter.BackColor = backgroundColorLighter; this.previewCodeWindow.ForeColor = foregroundColor; - this.previewCodeWindow.BackColor = backgroundColor; + this.previewCodeWindow.BackColor = backgroundColorDarker; } /// diff --git a/src/SnippetDesigner/SnippetExplorer/SnippetExplorerForm.resx b/src/SnippetDesigner/SnippetExplorer/SnippetExplorerForm.resx index e549534..3324714 100644 --- a/src/SnippetDesigner/SnippetExplorer/SnippetExplorerForm.resx +++ b/src/SnippetDesigner/SnippetExplorer/SnippetExplorerForm.resx @@ -125,6 +125,9 @@ 0, 0 + + 6, 6, 6, 6 + Horizontal @@ -135,17 +138,20 @@ GrowAndShrink + + 150 + Fill - 3, 17 + 6, 33 - 3, 10, 3, 0 + 6, 18, 6, 0 - 331, 46 + 607, 82 8 @@ -175,16 +181,16 @@ NoControl - 3, 0 + 6, 1 - 0, 0, 3, 5 + 0, 0, 6, 9 - 0, 0, 0, 4 + 0, 0, 0, 7 - 73, 17 + 126, 32 4 @@ -208,13 +214,16 @@ Fill - 3, 35 + 6, 50 + + + 6, 6, 6, 6 - 3, 0, 0, 0 + 6, 1, 0, 1 - 336, 65 + 615, 118 2 @@ -238,28 +247,31 @@ Fill - 42, 22 + 74, 36 Show: - 121, 25 + 219, 42 Tahoma, 8.25pt - 0, 22 + 0, 36 - 0, 103 + 0, 174 - 0, 0, 0, 3 + 0, 0, 0, 6 + + + 0, 1, 4, 1 - 342, 25 + 627, 44 3 @@ -282,8 +294,11 @@ + + 9 + - 19 + 33 True @@ -291,6 +306,9 @@ Title + + 9 + 52 @@ -300,6 +318,9 @@ Description + + 9 + False @@ -312,8 +333,11 @@ Language + + 9 + - 81 + 105 True @@ -321,29 +345,32 @@ Path + + 9 + - 55 + 74 17, 17 - 107, 22 + 146, 36 Open - 107, 22 + 146, 36 Delete - 104, 6 + 143, 6 - 108, 54 + 147, 82 snippetExplorerContextMenu @@ -355,10 +382,16 @@ Fill - 3, 134 + 6, 230 + + + 6, 6, 6, 6 + + + 72 - 336, 212 + 615, 408 1 @@ -382,13 +415,13 @@ Top, Left, Right - 3, 3 + 6, 6 - 3, 10, 3, 3 + 6, 18, 6, 6 - 252, 20 + 459, 20 1 @@ -415,10 +448,13 @@ NoControl - 261, 0 + 477, 0 + + + 6, 6, 6, 6 - 75, 26 + 138, 32 0 @@ -442,10 +478,13 @@ Fill - 3, 3 + 6, 6 + + + 6, 6, 6, 6 - 336, 26 + 615, 32 4 @@ -475,7 +514,7 @@ 5 - 342, 349 + 627, 644 0 @@ -514,10 +553,10 @@ 0, 0 - 5, 5, 5, 5 + 9, 9, 9, 9 - 342, 221 + 627, 409 0 @@ -526,7 +565,7 @@ previewCodeWindow - Microsoft.SnippetDesigner.CodeWindow, SnippetDesigner, Version=1.6.7418.27765, Culture=neutral, PublicKeyToken=8cfc085d5269c705 + Microsoft.SnippetDesigner.CodeWindow, SnippetDesigner, Version=1.8.7424.17259, Culture=neutral, PublicKeyToken=8cfc085d5269c705 snippetExplorerSplitter.Panel2 @@ -547,10 +586,13 @@ 1 - 342, 574 + 627, 1060 - 349 + 644 + + + 7 0 @@ -571,10 +613,13 @@ True - 6, 13 + 11, 24 + + + 6, 6, 6, 6 - 342, 574 + 627, 1060 showCountLabel diff --git a/src/SnippetDesigner/SnippetExplorer/SnippetExplorerToolWindow.cs b/src/SnippetDesigner/SnippetExplorer/SnippetExplorerToolWindow.cs index 98893e4..4e29b58 100644 --- a/src/SnippetDesigner/SnippetExplorer/SnippetExplorerToolWindow.cs +++ b/src/SnippetDesigner/SnippetExplorer/SnippetExplorerToolWindow.cs @@ -4,7 +4,7 @@ using System.Runtime.InteropServices; using System.Windows.Forms; using Microsoft.VisualStudio.Shell; - +using Microsoft.VisualStudio.Utilities; namespace Microsoft.SnippetDesigner.SnippetExplorer { @@ -44,8 +44,6 @@ public SnippetExplorerToolWindow() // the strip being 16x16. this.BitmapResourceID = 301; this.BitmapIndex = 2; - - snippetExplorerForm = new SnippetExplorerForm(); } @@ -57,7 +55,15 @@ override public IWin32Window Window { get { - return (IWin32Window)snippetExplorerForm; + + using (DpiAwareness.EnterDpiScope(DpiAwarenessContext.SystemAware)) + { + if (snippetExplorerForm == null) + { + snippetExplorerForm = new SnippetExplorerForm(); + } + return snippetExplorerForm; + } } } } diff --git a/src/SnippetDesigner/packages.config b/src/SnippetDesigner/packages.config index 4ce3406..91df21f 100644 --- a/src/SnippetDesigner/packages.config +++ b/src/SnippetDesigner/packages.config @@ -1,5 +1,6 @@  + diff --git a/src/SnippetDesigner/source.extension.vsixmanifest b/src/SnippetDesigner/source.extension.vsixmanifest index 78aa180..6bfb914 100644 --- a/src/SnippetDesigner/source.extension.vsixmanifest +++ b/src/SnippetDesigner/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Snippet Designer Snippet Designer is a Visual Studio plug in which allows you to create and search for snippets inside the IDE https://github.com/mmanela/SnippetDesigner @@ -11,11 +11,11 @@ snippet languages editor - - - - - + + + + +