Skip to content

Commit

Permalink
Supports Visual Studio 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
엄준일 committed Feb 23, 2022
1 parent b48f328 commit c4d2e13
Show file tree
Hide file tree
Showing 20 changed files with 639 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ If you have any feedback, please send me an email to powerumc at gmail.com or vi

Support Visual Studio
=====================
- Visual Studio 2022
- Visual Studio 2019
- Visual Studio 2017
- Visual Studio 2015
Expand All @@ -31,7 +32,7 @@ Screenshot
Download
========

- **VSGesture for VS2019, VS2017, VS2015, VS2013, VS2012, VS2010 is now available for download.**
- **VSGesture for VS2022, VS2019, VS2017, VS2015, VS2013, VS2012, VS2010 is now available for download.**
http://blog.powerumc.kr/305
http://visualstudiogallery.msdn.microsoft.com/e03c91ff-e20d-4dcc-822b-172a68c40f5b

Expand Down
36 changes: 36 additions & 0 deletions Src/Umc.Core.Tools.VSGesture for VS2022/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VSGesture")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Umc.Core")]
[assembly: AssemblyProduct("VSGesture")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: NeutralResourcesLanguage("en-US")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]



Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umc.Core.Tools.VSGesture for VS2022", "Umc.Core.Tools.VSGesture for VS2022.csproj", "{83988780-238F-4B91-B039-711AE564E5D0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{83988780-238F-4B91-B039-711AE564E5D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83988780-238F-4B91-B039-711AE564E5D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83988780-238F-4B91-B039-711AE564E5D0}.Debug|x86.ActiveCfg = Debug|x86
{83988780-238F-4B91-B039-711AE564E5D0}.Debug|x86.Build.0 = Debug|x86
{83988780-238F-4B91-B039-711AE564E5D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83988780-238F-4B91-B039-711AE564E5D0}.Release|Any CPU.Build.0 = Release|Any CPU
{83988780-238F-4B91-B039-711AE564E5D0}.Release|x86.ActiveCfg = Release|x86
{83988780-238F-4B91-B039-711AE564E5D0}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {10BAF8B1-3179-4012-9D5F-EF7A831B56A5}
EndGlobalSection
EndGlobal
135 changes: 135 additions & 0 deletions Src/Umc.Core.Tools.VSGesture for VS2022/VSGestureAsyncPackage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
// VsPkg.cs : Implementation of Umc_Core_Tools_VSGesture
//

using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using System;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Threading;
using Umc.Core.Tools.VSGesture.Services;

namespace Umc.Core.Tools.VSGesture
{
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
//[DefaultRegistryRoot("Software\\Microsoft\\VisualStudio\\9.0")]
[InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400, LanguageIndependentName = "Umc.Core.Tools.VSGesture")]
[ProvideLoadKey("Standard", "1.0", "Umc.Core.Tools.VSGesture", "Umc.Core", 1)]
[ProvideMenuResource(1000, 1)]
[Guid(GuidList.guidUmc_Core_Tools_VSGesturePkgString)]

#region OptionPages
[ProvideOptionPage(typeof(OptionPages.OptionPageDefault), "VSGesture", "Default", 200, 201, true)]
[ProvideOptionPage(typeof(OptionPages.OptionPageMouseAction), "VSGesture", "Mouse Gesture", 200, 202, true)]
[ProvideOptionPage(typeof(OptionPages.OptionPageManual), "VSGesture", "Manual", 200, 203, true)]
[ProvideOptionPage(typeof(OptionPages.OptionPageAbout), "VSGesture", "About", 200, 204, true)]
#endregion

[ProvideService(typeof(SVSGestureService), ServiceName = "VSGesture Service", IsAsyncQueryable = true)]
[ProvideAutoLoad(UIContextGuids.SolutionExists, PackageAutoLoadFlags.BackgroundLoad)]
public sealed class VSGestureAsyncPackage : AsyncPackage, IVsInstalledProduct
{
public VSGestureAsyncPackage()
{
Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering constructor for: {0}", this.ToString()));
}

#region Initialize

protected override System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
{
Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
base.InitializeAsync(cancellationToken, progress);

initMenu();
initService();

return System.Threading.Tasks.Task.CompletedTask;
}

private void initMenu()
{
OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
if (null != mcs)
{
CommandID menuCommandID = new CommandID(GuidList.guidUmc_Core_Tools_VSGestureCmdSet, (int)PkgCmdIDList.cmdidVSGesture);
MenuCommand menuItem = new MenuCommand(MenuItemShowOptionPage, menuCommandID);
mcs.AddCommand(menuItem);
}
}

private void initService()
{
this.AddService(typeof(SVSGestureService), new AsyncServiceCreatorCallback(CreateService), true);
}

public System.Threading.Tasks.Task<object> CreateService(IAsyncServiceContainer container, CancellationToken cancellationToken, Type serviceType)
{
if (serviceType == typeof(SVSGestureService))
{
return System.Threading.Tasks.Task.FromResult<object>(new VSGestureService(this));
}

throw new Exception("Null Service");
}
#endregion

internal void MenuItemShowOptionPage(object sender, EventArgs e)
{
VSGestureService.Current.ShowOptionPage();
}

#region IVsInstalledProduct ¸â¹ö

public int IdBmpSplash(out uint pIdBmp)
{
pIdBmp = 400;
return VSConstants.S_OK;
}

public int IdIcoLogoForAboutbox(out uint pIdIco)
{
pIdIco = 400;
return VSConstants.S_OK;
}

public int OfficialName(out string pbstrName)
{
pbstrName = GetResourceString("@110");
return VSConstants.S_OK;
}

public int ProductDetails(out string pbstrProductDetails)
{
pbstrProductDetails = GetResourceString("@112");
return VSConstants.S_OK;
}

public int ProductID(out string pbstrPID)
{
pbstrPID = "1.0";
return VSConstants.S_OK;
}

#endregion

public string GetResourceString(string resourceName)
{
string resourceValue;
IVsResourceManager resourceManager =
(IVsResourceManager)GetService(typeof(SVsResourceManager));
if (resourceManager == null)
{
throw new InvalidOperationException(
"Could not get SVsResourceManager service. Make sure that the package is sited before calling this method");
}
Guid packageGuid = this.GetType().GUID;
int hr = resourceManager.LoadResourceString(ref packageGuid, -1, resourceName, out resourceValue);
Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(hr);
return resourceValue;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="F4D6A646-FAD6-4F5A-9E1C-1A696C3B83DC" Version="17.0.0" Language="en-US" Publisher="엄준일" />
<DisplayName>VSGesture for Visual Studio 2022</DisplayName>
<Description xml:space="preserve">Gesturing at the Visual Studio 2022</Description>
<MoreInfo>http://blog.powerumc.kr</MoreInfo>
<Icon>Resources\Package.ico</Icon>
<PreviewImage>Resources\VSGesture.jpg</PreviewImage>
<Tags>Gesture, Gesturing, Mouse, POWERUMC, UMC, Editor</Tags>
</Metadata>
<Prerequisites>
<Prerequisite Id="Microsoft.Net.ComponentGroup.DevelopmentPrerequisites" Version="[16.0.28516.191,17.0)" DisplayName=".NET Framework 4.7.2 개발 도구" />
</Prerequisites>
<Installation InstalledByMsi="false">
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Community">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Pro">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Enterprise">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="4.6" />
<Dependency Id="Microsoft.VisualStudio.MPF.12.0" DisplayName="Visual Studio MPF 12.0" d:Source="Installed" Version="[12.0,16.0)" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
</PackageManifest>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c4d2e13

Please sign in to comment.