From 6e7c638c5a2155bae85f4ce7a5b52dfe0876be3a Mon Sep 17 00:00:00 2001 From: Dale Fugier Date: Wed, 11 Dec 2024 12:21:03 -0800 Subject: [PATCH] Updated SampleCsWpf to .NET 7 --- cpp/SampleCommands/SampleCommandsPlugIn.cpp | 4 +- .../cs/SampleCsWpf/Properties/AssemblyInfo.cs | 42 +---- .../Properties/launchSettings.json | 14 ++ rhinocommon/cs/SampleCsWpf/README.md | 6 +- rhinocommon/cs/SampleCsWpf/SampleCsWpf.csproj | 147 ++++-------------- 5 files changed, 51 insertions(+), 162 deletions(-) create mode 100644 rhinocommon/cs/SampleCsWpf/Properties/launchSettings.json diff --git a/cpp/SampleCommands/SampleCommandsPlugIn.cpp b/cpp/SampleCommands/SampleCommandsPlugIn.cpp index 1d58a48b..02afc74a 100644 --- a/cpp/SampleCommands/SampleCommandsPlugIn.cpp +++ b/cpp/SampleCommands/SampleCommandsPlugIn.cpp @@ -35,7 +35,7 @@ RHINO_PLUG_IN_ICON_RESOURCE_ID(IDI_ICON1); // Rhino plug-in developer declarations RHINO_PLUG_IN_DEVELOPER_ORGANIZATION(L"Robert McNeel & Associates"); -RHINO_PLUG_IN_DEVELOPER_ADDRESS(L"3670 Woodland Park Avenue North\r\nSeattle WA 98103"); +RHINO_PLUG_IN_DEVELOPER_ADDRESS(L"146 North Canal Street, Suite 320\r\nSeattle WA 98103"); RHINO_PLUG_IN_DEVELOPER_COUNTRY(L"United States"); RHINO_PLUG_IN_DEVELOPER_PHONE(L"206-545-6877"); RHINO_PLUG_IN_DEVELOPER_FAX(L"206-545-7321"); @@ -273,4 +273,4 @@ HCURSOR CSampleCommandsPlugIn::SampleCursor() if (0 == m_hCursor) m_hCursor = (HCURSOR)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDC_SAMPLE_CURSOR), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE); return m_hCursor; -} \ No newline at end of file +} diff --git a/rhinocommon/cs/SampleCsWpf/Properties/AssemblyInfo.cs b/rhinocommon/cs/SampleCsWpf/Properties/AssemblyInfo.cs index 1f9d1660..a2724c2c 100644 --- a/rhinocommon/cs/SampleCsWpf/Properties/AssemblyInfo.cs +++ b/rhinocommon/cs/SampleCsWpf/Properties/AssemblyInfo.cs @@ -1,48 +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.Email, "dale@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, "SampleCsWpf.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("SampleCsWpf")] // Plug-In title is extracted from this -[assembly: AssemblyDescription("RhinoCommon Sample - SampleCsWpf")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Robert McNeel & Associates")] -[assembly: AssemblyProduct("SampleCsWpf")] -[assembly: AssemblyCopyright("Copyright © 2017, 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("b9b3c836-5b53-4f93-b359-e64bdf2a159b")] // 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")] +[assembly: Guid("b9b3c836-5b53-4f93-b359-e64bdf2a159b")] \ No newline at end of file diff --git a/rhinocommon/cs/SampleCsWpf/Properties/launchSettings.json b/rhinocommon/cs/SampleCsWpf/Properties/launchSettings.json new file mode 100644 index 00000000..1eef7cd6 --- /dev/null +++ b/rhinocommon/cs/SampleCsWpf/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/SampleCsWpf/README.md b/rhinocommon/cs/SampleCsWpf/README.md index 873a6e3e..8f37a495 100644 --- a/rhinocommon/cs/SampleCsWpf/README.md +++ b/rhinocommon/cs/SampleCsWpf/README.md @@ -8,12 +8,12 @@ Building Sample -------------------- To build the sample, you are going to need: -* Rhinoceros 6 (http://www.rhino3d.com) -* Microsoft Visual C# 2017 +* Rhinoceros 8 (http://www.rhino3d.com) +* Microsoft Visual C# 2022 Legal Stuff ----------- -Copyright © 2017, Robert McNeel & Associates. All Rights Reserved. +Copyright © 2017-2024, Robert McNeel & Associates. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/rhinocommon/cs/SampleCsWpf/SampleCsWpf.csproj b/rhinocommon/cs/SampleCsWpf/SampleCsWpf.csproj index 5d9bae96..540bff92 100644 --- a/rhinocommon/cs/SampleCsWpf/SampleCsWpf.csproj +++ b/rhinocommon/cs/SampleCsWpf/SampleCsWpf.csproj @@ -1,133 +1,38 @@ - - + - Debug64 - AnyCPU - 8.0.30703 - 2.0 - {098AF3EE-CF77-4FEF-859B-B3BC22C7336A} + net7.0-windows;net48 + true + true + .rhp + ..\Bin\ Library - Properties - SampleCsWpf - SampleCsWpf - v4.8 - 512 - false - + Robert McNeel & Associates + Copyright © 2013-2024, Robert McNeel & Associates + SampleCsWpf + Sample WPF Plug-in + 8.0.0 - - true - full - false - ..\bin\ - DEBUG;TRACE - prompt - false + + 1701;1702;NU1701 - - pdbonly - true - ..\bin\ - TRACE - prompt - 4 - false + + 1701;1702;NU1701 + + + 1701;1702;NU1701 + + + 1701;1702;NU1701 - - - - C:\Program Files\Rhino 7\System\Rhino.UI.dll - False - - - ..\..\..\..\..\..\..\Program Files\Rhino 7\System\RhinoWindows.dll - False - - - - - - - - False - C:\Program Files\Rhino 7\System\rhinocommon.dll - False - - - - - - - - - - - - - - SampleCsWpfDialog.xaml - - - SampleCsWpfPanel.xaml - - - True - True - Resources.resx - - - - - SampleCsWpfViewportDialog.xaml - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - + - + + + - + - - - - Copy "$(TargetPath)" "$(TargetDir)$(ProjectName).rhp" -Erase "$(TargetPath)" - - - en-US - - - C:\Program Files\Rhino 7\System\Rhino.exe - - - Program - false - \ No newline at end of file