From 39c9ecfc7dbbda4daf3c603df7ee7e82bccf8ba6 Mon Sep 17 00:00:00 2001 From: Dale Fugier Date: Thu, 12 Dec 2024 09:03:26 -0800 Subject: [PATCH] Upgraded SampleCsWithLicense --- .../dotnet/SampleWinFormsApp/Program.cs | 2 + .../Properties/AssemblyInfo.cs | 2 +- .../SampleCsCommands/SampleCsCommands.csproj | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 44 +------- .../Properties/launchSettings.json | 14 +++ .../SampleCsWithLicense.csproj | 101 +++++------------- .../SampleCsWithLicensePlugIn.cs | 5 +- .../cs/SampleCsWpf/Properties/AssemblyInfo.cs | 2 +- 10 files changed, 52 insertions(+), 124 deletions(-) create mode 100644 rhinocommon/cs/SampleCsWithLicense/Properties/launchSettings.json diff --git a/rhino.inside/dotnet/SampleWinFormsApp/Program.cs b/rhino.inside/dotnet/SampleWinFormsApp/Program.cs index 75de2fd2..2c5ee0d4 100644 --- a/rhino.inside/dotnet/SampleWinFormsApp/Program.cs +++ b/rhino.inside/dotnet/SampleWinFormsApp/Program.cs @@ -12,6 +12,8 @@ static void Main() // NOTE: Make sure to adjust your project settings so this is compiled as a 64 bit // application. Rhino.Inside will only run in 64 bit + RhinoInside.Resolver.UseLatest = true; + // Set up RhinoInside resolver at the very beginning of the application // This helps find and load Rhino assemblies while the program runs RhinoInside.Resolver.Initialize(); diff --git a/rhinocommon/cs/SampleCsCommands/Properties/AssemblyInfo.cs b/rhinocommon/cs/SampleCsCommands/Properties/AssemblyInfo.cs index 082fcaf8..2216f8a2 100644 --- a/rhinocommon/cs/SampleCsCommands/Properties/AssemblyInfo.cs +++ b/rhinocommon/cs/SampleCsCommands/Properties/AssemblyInfo.cs @@ -4,7 +4,7 @@ [assembly: PlugInDescription(DescriptionType.Address, "146 North Canal Street, Suite 320\r\nSeattle, WA 98103")] [assembly: PlugInDescription(DescriptionType.Country, "United States")] -[assembly: PlugInDescription(DescriptionType.Email, "dale@mcneel.com")] +[assembly: PlugInDescription(DescriptionType.Email, "devsupport@mcneel.com")] [assembly: PlugInDescription(DescriptionType.Phone, "206-545-6877")] [assembly: PlugInDescription(DescriptionType.Fax, "206-545-7321")] [assembly: PlugInDescription(DescriptionType.Organization, "Robert McNeel & Associates")] diff --git a/rhinocommon/cs/SampleCsCommands/SampleCsCommands.csproj b/rhinocommon/cs/SampleCsCommands/SampleCsCommands.csproj index 87ccca52..a0c5e9c2 100644 --- a/rhinocommon/cs/SampleCsCommands/SampleCsCommands.csproj +++ b/rhinocommon/cs/SampleCsCommands/SampleCsCommands.csproj @@ -7,7 +7,7 @@ Library Robert McNeel & Associates Copyright © 2013-2024, Robert McNeel & Associates - SampleCsUserData + SampleCsCommands Sample Commands Plug-in 8.0.0 diff --git a/rhinocommon/cs/SampleCsEventWatcher/Properties/AssemblyInfo.cs b/rhinocommon/cs/SampleCsEventWatcher/Properties/AssemblyInfo.cs index cd760f8e..2f1afbd1 100644 --- a/rhinocommon/cs/SampleCsEventWatcher/Properties/AssemblyInfo.cs +++ b/rhinocommon/cs/SampleCsEventWatcher/Properties/AssemblyInfo.cs @@ -4,7 +4,7 @@ [assembly: PlugInDescription(DescriptionType.Address, "146 North Canal Street, Suite 320\r\nSeattle, WA 98103")] [assembly: PlugInDescription(DescriptionType.Country, "United States")] -[assembly: PlugInDescription(DescriptionType.Email, "dale@mcneel.com")] +[assembly: PlugInDescription(DescriptionType.Email, "devsupport@mcneel.com")] [assembly: PlugInDescription(DescriptionType.Phone, "206-545-6877")] [assembly: PlugInDescription(DescriptionType.Fax, "206-545-7321")] [assembly: PlugInDescription(DescriptionType.Organization, "Robert McNeel & Associates")] diff --git a/rhinocommon/cs/SampleCsUserData/Properties/AssemblyInfo.cs b/rhinocommon/cs/SampleCsUserData/Properties/AssemblyInfo.cs index d2aa4377..65e18245 100644 --- a/rhinocommon/cs/SampleCsUserData/Properties/AssemblyInfo.cs +++ b/rhinocommon/cs/SampleCsUserData/Properties/AssemblyInfo.cs @@ -4,7 +4,7 @@ [assembly: PlugInDescription(DescriptionType.Address, "146 North Canal Street, Suite 320\r\nSeattle, WA 98103")] [assembly: PlugInDescription(DescriptionType.Country, "United States")] -[assembly: PlugInDescription(DescriptionType.Email, "dale@mcneel.com")] +[assembly: PlugInDescription(DescriptionType.Email, "devsupport@mcneel.com")] [assembly: PlugInDescription(DescriptionType.Phone, "206-545-6877")] [assembly: PlugInDescription(DescriptionType.Fax, "206-545-7321")] [assembly: PlugInDescription(DescriptionType.Organization, "Robert McNeel & Associates")] diff --git a/rhinocommon/cs/SampleCsWithLicense/Properties/AssemblyInfo.cs b/rhinocommon/cs/SampleCsWithLicense/Properties/AssemblyInfo.cs index 348a2d1e..5c1f7f4a 100644 --- a/rhinocommon/cs/SampleCsWithLicense/Properties/AssemblyInfo.cs +++ b/rhinocommon/cs/SampleCsWithLicense/Properties/AssemblyInfo.cs @@ -1,52 +1,18 @@ -using System.Reflection; +using Rhino.PlugIns; +using System.Reflection; using System.Runtime.InteropServices; -using Rhino.PlugIns; -// Plug-in Description Attributes - all of these are optional. -// These will show in Rhino's option dialog, in the tab Plug-ins. -[assembly: PlugInDescription(DescriptionType.Address, "3670 Woodland Park Avenue North\r\nSeattle, WA 98103")] +[assembly: PlugInDescription(DescriptionType.Address, "146 North Canal Street, Suite 320\r\nSeattle, WA 98103")] [assembly: PlugInDescription(DescriptionType.Country, "United States")] [assembly: PlugInDescription(DescriptionType.Email, "devsupport@mcneel.com")] [assembly: PlugInDescription(DescriptionType.Phone, "206-545-6877")] [assembly: PlugInDescription(DescriptionType.Fax, "206-545-7321")] [assembly: PlugInDescription(DescriptionType.Organization, "Robert McNeel & Associates")] [assembly: PlugInDescription(DescriptionType.UpdateUrl, "https://github.com/mcneel/rhino-developer-samples")] -[assembly: PlugInDescription(DescriptionType.WebSite, "http://www.rhino3d.com/")] +[assembly: PlugInDescription(DescriptionType.WebSite, "https://github.com/mcneel/rhino-developer-samples")] [assembly: PlugInDescription(DescriptionType.Icon, "SampleCsWithLicense.Resources.SampleCs.ico")] - -// 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("SampleCsWithLicense")] -[assembly: AssemblyDescription("RhinoCommon Sample - SampleCsWithLicense")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Robert McNeel & Associates")] -[assembly: AssemblyProduct("SampleCsCommands")] -[assembly: AssemblyCopyright("Copyright © 2018, Robert McNeel & Associates")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5deff610-a9c2-4922-92bc-ff6d3deb8d5e")] // This will also be the Guid of the Rhino plug-in - -// 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 Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.0.0.0")] -[assembly: AssemblyFileVersion("6.0.0.0")] - -// Make compatible with Rhino Installer Engine -[assembly: AssemblyInformationalVersion("2")] +[assembly: Guid("5deff610-a9c2-4922-92bc-ff6d3deb8d5e")] diff --git a/rhinocommon/cs/SampleCsWithLicense/Properties/launchSettings.json b/rhinocommon/cs/SampleCsWithLicense/Properties/launchSettings.json new file mode 100644 index 00000000..1eef7cd6 --- /dev/null +++ b/rhinocommon/cs/SampleCsWithLicense/Properties/launchSettings.json @@ -0,0 +1,14 @@ +{ + "profiles": { + "Rhino 8 (net7.0)": { + "commandName": "Executable", + "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", + "commandLineArgs": "/netcore" + }, + "Rhino 8 net48)": { + "commandName": "Executable", + "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", + "commandLineArgs": "/netfx" + } + } +} \ No newline at end of file diff --git a/rhinocommon/cs/SampleCsWithLicense/SampleCsWithLicense.csproj b/rhinocommon/cs/SampleCsWithLicense/SampleCsWithLicense.csproj index 2092d277..1eabe0f6 100644 --- a/rhinocommon/cs/SampleCsWithLicense/SampleCsWithLicense.csproj +++ b/rhinocommon/cs/SampleCsWithLicense/SampleCsWithLicense.csproj @@ -1,89 +1,36 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {5DEFF610-A9C2-4922-92BC-FF6D3DEB8D5E} + net7.0-windows;net48 + .rhp + ..\Bin\ Library - Properties - SampleCsWithLicense - SampleCsWithLicense - v4.8 - 512 - false - + Robert McNeel & Associates + Copyright © 2013-2024, Robert McNeel & Associates + SampleCsWithLicense + Sample Rhino Licensing Plug-in + 8.0.0 - - true - full - false - ..\bin\ - DEBUG;TRACE - prompt - false + + 1701;1702;NU1701 - - pdbonly - true - ..\bin\ - TRACE - prompt - 4 + + 1701;1702;NU1701 + + + 1701;1702;NU1701 + + + 1701;1702;NU1701 - - C:\Program Files\Rhino 7\System\RhinoWindows.dll - False - - - - - - - False - C:\Program Files\Rhino 7\System\rhinocommon.dll - False - - - False - C:\Program Files\Rhino 7\System\Eto.dll - False - - - False - C:\Program Files\Rhino 7\System\Rhino.UI.dll - False - + - - - + + + - + - - - - Copy "$(TargetPath)" "$(TargetDir)$(ProjectName).rhp" -Erase "$(TargetPath)" - - - en-US - - - C:\Program Files\Rhino 7\System\Rhino.exe - - - Program - \ No newline at end of file diff --git a/rhinocommon/cs/SampleCsWithLicense/SampleCsWithLicensePlugIn.cs b/rhinocommon/cs/SampleCsWithLicense/SampleCsWithLicensePlugIn.cs index fdffac6f..645bbfbf 100644 --- a/rhinocommon/cs/SampleCsWithLicense/SampleCsWithLicensePlugIn.cs +++ b/rhinocommon/cs/SampleCsWithLicense/SampleCsWithLicensePlugIn.cs @@ -78,9 +78,8 @@ private static System.Drawing.Icon ProductIcon // is displayed if a license for the requesting product is not found. Note, the // "Close" button will always be displayed. /// - private static LicenseCapabilities Capabilities => LicenseCapabilities.CanBeEvaluated | - LicenseCapabilities.CanBePurchased | - LicenseCapabilities.CanBeSpecified; + private static LicenseCapabilities Capabilities => LicenseCapabilities.SupportsRhinoAccounts | + LicenseCapabilities.SupportsLicenseDiscovery; #endregion diff --git a/rhinocommon/cs/SampleCsWpf/Properties/AssemblyInfo.cs b/rhinocommon/cs/SampleCsWpf/Properties/AssemblyInfo.cs index a2724c2c..c618d523 100644 --- a/rhinocommon/cs/SampleCsWpf/Properties/AssemblyInfo.cs +++ b/rhinocommon/cs/SampleCsWpf/Properties/AssemblyInfo.cs @@ -4,7 +4,7 @@ [assembly: PlugInDescription(DescriptionType.Address, "146 North Canal Street, Suite 320\r\nSeattle, WA 98103")] [assembly: PlugInDescription(DescriptionType.Country, "United States")] -[assembly: PlugInDescription(DescriptionType.Email, "dale@mcneel.com")] +[assembly: PlugInDescription(DescriptionType.Email, "devsupport@mcneel.com")] [assembly: PlugInDescription(DescriptionType.Phone, "206-545-6877")] [assembly: PlugInDescription(DescriptionType.Fax, "206-545-7321")] [assembly: PlugInDescription(DescriptionType.Organization, "Robert McNeel & Associates")]