From 4dd81dc365dafc21caae17e8b1acf801ae82f9f0 Mon Sep 17 00:00:00 2001 From: Luis Fraguada Date: Wed, 9 Dec 2020 14:45:30 +0100 Subject: [PATCH] Updating dotnet Rhino.Inside samples to .net 4.8 --- rhino.inside/dotnet/SampleConvert/App.config | 4 +- .../dotnet/SampleConvert/Convert.csproj | 5 +- rhino.inside/dotnet/SampleConvert/Program.cs | 1 + .../dotnet/SampleEtoApp/EtoApp.csproj | 2 +- .../dotnet/SampleHelloWorld/App.config | 2 +- .../dotnet/SampleHelloWorld/HelloWorld.csproj | 4 +- .../dotnet/SampleHelloWorld/HelloWorld.sln | 4 +- .../dotnet/SampleHelloWorldVB/App.config | 4 +- .../SampleHelloWorldVB/HelloWorldVB.vbproj | 6 +- .../My Project/Resources.Designer.vb | 89 +++++++++--------- .../My Project/Settings.Designer.vb | 92 +++++++++---------- .../dotnet/SampleRunGrasshopper/App.config | 6 +- .../RunGrasshopper.csproj | 5 +- .../SampleWinFormsApp/WinFormsApp.csproj | 2 +- .../dotnet/SampleWinFormsApp/WinFormsApp.sln | 4 +- 15 files changed, 118 insertions(+), 112 deletions(-) diff --git a/rhino.inside/dotnet/SampleConvert/App.config b/rhino.inside/dotnet/SampleConvert/App.config index f2f3978a..4bfa0056 100644 --- a/rhino.inside/dotnet/SampleConvert/App.config +++ b/rhino.inside/dotnet/SampleConvert/App.config @@ -1,6 +1,6 @@ - + - + diff --git a/rhino.inside/dotnet/SampleConvert/Convert.csproj b/rhino.inside/dotnet/SampleConvert/Convert.csproj index a58b9917..3bf439a3 100644 --- a/rhino.inside/dotnet/SampleConvert/Convert.csproj +++ b/rhino.inside/dotnet/SampleConvert/Convert.csproj @@ -8,12 +8,13 @@ Exe Convert Convert - v4.6.2 + v4.8 512 true true + AnyCPU @@ -48,7 +49,7 @@ - 0.2.0 + 7.0.0 diff --git a/rhino.inside/dotnet/SampleConvert/Program.cs b/rhino.inside/dotnet/SampleConvert/Program.cs index 8f08c4cf..666fe4f1 100644 --- a/rhino.inside/dotnet/SampleConvert/Program.cs +++ b/rhino.inside/dotnet/SampleConvert/Program.cs @@ -20,6 +20,7 @@ static Program() [System.STAThread] static void Main(string[] args) { + Console.WriteLine("Please wait while Rhino is starting..."); try { using (new RhinoCore(new string[] { "/NOSPLASH" }, WindowStyle.Hidden )) diff --git a/rhino.inside/dotnet/SampleEtoApp/EtoApp.csproj b/rhino.inside/dotnet/SampleEtoApp/EtoApp.csproj index ebf1299b..8db1d91c 100644 --- a/rhino.inside/dotnet/SampleEtoApp/EtoApp.csproj +++ b/rhino.inside/dotnet/SampleEtoApp/EtoApp.csproj @@ -55,7 +55,7 @@ - 0.2.0 + 7.0.0 diff --git a/rhino.inside/dotnet/SampleHelloWorld/App.config b/rhino.inside/dotnet/SampleHelloWorld/App.config index 8d234373..4bfa0056 100644 --- a/rhino.inside/dotnet/SampleHelloWorld/App.config +++ b/rhino.inside/dotnet/SampleHelloWorld/App.config @@ -1,6 +1,6 @@ - + diff --git a/rhino.inside/dotnet/SampleHelloWorld/HelloWorld.csproj b/rhino.inside/dotnet/SampleHelloWorld/HelloWorld.csproj index 2de154f6..37e86663 100644 --- a/rhino.inside/dotnet/SampleHelloWorld/HelloWorld.csproj +++ b/rhino.inside/dotnet/SampleHelloWorld/HelloWorld.csproj @@ -8,7 +8,7 @@ Exe HelloWorld HelloWorld - v4.6.2 + v4.8 512 true true @@ -46,7 +46,7 @@ - 0.2.0 + 7.0.0 diff --git a/rhino.inside/dotnet/SampleHelloWorld/HelloWorld.sln b/rhino.inside/dotnet/SampleHelloWorld/HelloWorld.sln index 4ed29cc4..1b1213f1 100644 --- a/rhino.inside/dotnet/SampleHelloWorld/HelloWorld.sln +++ b/rhino.inside/dotnet/SampleHelloWorld/HelloWorld.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.2016 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld", "HelloWorld.csproj", "{E279A641-7002-47FF-A0EE-694CAB972A5C}" EndProject diff --git a/rhino.inside/dotnet/SampleHelloWorldVB/App.config b/rhino.inside/dotnet/SampleHelloWorldVB/App.config index f2f3978a..4bfa0056 100644 --- a/rhino.inside/dotnet/SampleHelloWorldVB/App.config +++ b/rhino.inside/dotnet/SampleHelloWorldVB/App.config @@ -1,6 +1,6 @@ - + - + diff --git a/rhino.inside/dotnet/SampleHelloWorldVB/HelloWorldVB.vbproj b/rhino.inside/dotnet/SampleHelloWorldVB/HelloWorldVB.vbproj index 3da458ae..b730c1c1 100644 --- a/rhino.inside/dotnet/SampleHelloWorldVB/HelloWorldVB.vbproj +++ b/rhino.inside/dotnet/SampleHelloWorldVB/HelloWorldVB.vbproj @@ -11,11 +11,12 @@ HelloWorldVB 512 Console - v4.6.2 + v4.8 true true + On @@ -79,6 +80,7 @@ True Application.myapp + True True @@ -114,7 +116,7 @@ - 0.2.0 + 7.0.0 diff --git a/rhino.inside/dotnet/SampleHelloWorldVB/My Project/Resources.Designer.vb b/rhino.inside/dotnet/SampleHelloWorldVB/My Project/Resources.Designer.vb index 06874088..f88c9076 100644 --- a/rhino.inside/dotnet/SampleHelloWorldVB/My Project/Resources.Designer.vb +++ b/rhino.inside/dotnet/SampleHelloWorldVB/My Project/Resources.Designer.vb @@ -11,52 +11,53 @@ Option Strict On Option Explicit On +Imports System Namespace My.Resources - - 'This class was auto-generated by the StronglyTypedResourceBuilder - 'class via a tool like ResGen or Visual Studio. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("HelloWorldVB.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. + ''' A strongly-typed resource class, for looking up localized strings, etc. ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set(ByVal value As Global.System.Globalization.CultureInfo) - resourceCulture = value - End Set - End Property - End Module + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("HelloWorldVB.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module End Namespace diff --git a/rhino.inside/dotnet/SampleHelloWorldVB/My Project/Settings.Designer.vb b/rhino.inside/dotnet/SampleHelloWorldVB/My Project/Settings.Designer.vb index 963f0115..150cf8bd 100644 --- a/rhino.inside/dotnet/SampleHelloWorldVB/My Project/Settings.Designer.vb +++ b/rhino.inside/dotnet/SampleHelloWorldVB/My Project/Settings.Designer.vb @@ -13,61 +13,61 @@ Option Explicit On Namespace My - - _ - Partial Friend NotInheritable Class MySettings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) - + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + #Region "My.Settings Auto-Save Functionality" #If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean + Private Shared addedHandler As Boolean - Private Shared addedHandlerLockObject As New Object + Private Shared addedHandlerLockObject As New Object - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub #End If #End Region - - Public Shared ReadOnly Property [Default]() As MySettings - Get - + + Public Shared ReadOnly Property [Default]() As MySettings + Get + #If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If #End If - Return defaultInstance - End Get - End Property - End Class + Return defaultInstance + End Get + End Property + End Class End Namespace Namespace My - - _ - Friend Module MySettingsProperty - - _ - Friend ReadOnly Property Settings() As Global.HelloWorldVB.My.MySettings - Get - Return Global.HelloWorldVB.My.MySettings.Default - End Get - End Property - End Module + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.HelloWorldVB.My.MySettings + Get + Return Global.HelloWorldVB.My.MySettings.Default + End Get + End Property + End Module End Namespace diff --git a/rhino.inside/dotnet/SampleRunGrasshopper/App.config b/rhino.inside/dotnet/SampleRunGrasshopper/App.config index 56efbc7b..4bfa0056 100644 --- a/rhino.inside/dotnet/SampleRunGrasshopper/App.config +++ b/rhino.inside/dotnet/SampleRunGrasshopper/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/rhino.inside/dotnet/SampleRunGrasshopper/RunGrasshopper.csproj b/rhino.inside/dotnet/SampleRunGrasshopper/RunGrasshopper.csproj index d44e27bd..7218a19a 100644 --- a/rhino.inside/dotnet/SampleRunGrasshopper/RunGrasshopper.csproj +++ b/rhino.inside/dotnet/SampleRunGrasshopper/RunGrasshopper.csproj @@ -8,10 +8,11 @@ Exe RunGrasshopper RunGrasshopper - v4.7.2 + v4.8 512 true true + AnyCPU @@ -54,7 +55,7 @@ - 0.2.0 + 7.0.0 diff --git a/rhino.inside/dotnet/SampleWinFormsApp/WinFormsApp.csproj b/rhino.inside/dotnet/SampleWinFormsApp/WinFormsApp.csproj index 336f9ed6..4c6a0fff 100644 --- a/rhino.inside/dotnet/SampleWinFormsApp/WinFormsApp.csproj +++ b/rhino.inside/dotnet/SampleWinFormsApp/WinFormsApp.csproj @@ -88,7 +88,7 @@ - 0.2.0 + 7.0.0 diff --git a/rhino.inside/dotnet/SampleWinFormsApp/WinFormsApp.sln b/rhino.inside/dotnet/SampleWinFormsApp/WinFormsApp.sln index b2227774..ff0d2cb8 100644 --- a/rhino.inside/dotnet/SampleWinFormsApp/WinFormsApp.sln +++ b/rhino.inside/dotnet/SampleWinFormsApp/WinFormsApp.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.852 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsApp", "WinFormsApp.csproj", "{E622672F-76E7-47DF-8B54-B4C685ABB55A}" EndProject