Skip to content

Commit

Permalink
Upgraded SampleCsWithLicense
Browse files Browse the repository at this point in the history
  • Loading branch information
dalefugier committed Dec 12, 2024
1 parent 6e7c638 commit 39c9ecf
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 124 deletions.
2 changes: 2 additions & 0 deletions rhino.inside/dotnet/SampleWinFormsApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion rhinocommon/cs/SampleCsCommands/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion rhinocommon/cs/SampleCsCommands/SampleCsCommands.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<OutputType>Library</OutputType>
<Company>Robert McNeel &amp; Associates</Company>
<Copyright>Copyright © 2013-2024, Robert McNeel &amp; Associates</Copyright>
<Product>SampleCsUserData</Product>
<Product>SampleCsCommands</Product>
<Description>Sample Commands Plug-in</Description>
<Version>8.0.0</Version>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion rhinocommon/cs/SampleCsUserData/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
44 changes: 5 additions & 39 deletions rhinocommon/cs/SampleCsWithLicense/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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, "[email protected]")]
[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")]
14 changes: 14 additions & 0 deletions rhinocommon/cs/SampleCsWithLicense/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
101 changes: 24 additions & 77 deletions rhinocommon/cs/SampleCsWithLicense/SampleCsWithLicense.csproj
Original file line number Diff line number Diff line change
@@ -1,89 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5DEFF610-A9C2-4922-92BC-FF6D3DEB8D5E}</ProjectGuid>
<TargetFrameworks>net7.0-windows;net48</TargetFrameworks>
<TargetExt>.rhp</TargetExt>
<OutputPath>..\Bin\</OutputPath>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SampleCsWithLicense</RootNamespace>
<AssemblyName>SampleCsWithLicense</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
<Company>Robert McNeel &amp; Associates</Company>
<Copyright>Copyright © 2013-2024, Robert McNeel &amp; Associates</Copyright>
<Product>SampleCsWithLicense</Product>
<Description>Sample Rhino Licensing Plug-in</Description>
<Version>8.0.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-windows|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net48|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-windows|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net48|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="RhinoWindows">
<HintPath>C:\Program Files\Rhino 7\System\RhinoWindows.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="RhinoCommon">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Rhino 7\System\rhinocommon.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Eto">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Rhino 7\System\Eto.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rhino.UI">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Rhino 7\System\Rhino.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<EmbeddedResource Include="Resources\**\*" />
</ItemGroup>
<ItemGroup>
<Compile Include="SampleCsWithLicenseCommand.cs" />
<Compile Include="SampleCsWithLicensePlugIn.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<PackageReference Include="RhinoCommon" Version="8.9.24194.18121" />
<PackageReference Include="RhinoWindows" Version="8.9.24194.18121" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\SampleCs.ico" />
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>Copy "$(TargetPath)" "$(TargetDir)$(ProjectName).rhp"
Erase "$(TargetPath)"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<FallbackCulture>en-US</FallbackCulture>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartProgram>C:\Program Files\Rhino 7\System\Rhino.exe</StartProgram>
<StartArguments>
</StartArguments>
<StartAction>Program</StartAction>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </summary>
private static LicenseCapabilities Capabilities => LicenseCapabilities.CanBeEvaluated |
LicenseCapabilities.CanBePurchased |
LicenseCapabilities.CanBeSpecified;
private static LicenseCapabilities Capabilities => LicenseCapabilities.SupportsRhinoAccounts |
LicenseCapabilities.SupportsLicenseDiscovery;

#endregion

Expand Down
2 changes: 1 addition & 1 deletion rhinocommon/cs/SampleCsWpf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 39c9ecf

Please sign in to comment.