Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Solved RH6 MacOS Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-ycv committed Sep 13, 2021
1 parent 68e3d77 commit 4455b72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/MultilingualGH/Menu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Menu : GH_AssemblyPriority
#pragma warning disable IDE0044
static internal string EN = "English";
static internal ToolStripMenuItem MGHMenu = new ToolStripMenuItem { Name = "MultilingualGH", Text = "MultilingualGH", Image = Properties.Resources.MultilingualGH, Checked = MGH.Enabled };
static internal ToolStripMenuItem Version = new ToolStripMenuItem { Name = nameof(UI.Version), Text = UI.Version + MultilingualGHInfo.Ver, Enabled=false};
static internal ToolStripMenuItem Version = new ToolStripMenuItem { Name = nameof(UI.Version), Text = UI.Version + MultilingualGHInfo.Ver, Enabled = false };
static internal ToolStripMenuItem languageUI = new ToolStripMenuItem { Name = nameof(UI.LanguageUI), Text = UI.LanguageUI };
static internal ToolStripMenuItem langUIEng = new ToolStripMenuItem { Name = EN, Text = EN, Checked = MGH.LangUI == EN };
static internal ToolStripMenuItem method = new ToolStripMenuItem { Name = nameof(UI.Methods), Text = UI.Methods };
Expand All @@ -43,11 +43,6 @@ public class Menu : GH_AssemblyPriority

public override GH_LoadingInstruction PriorityLoad()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && typeof(Rhino.Geometry.Curve).Assembly.GetName().Version.Major == 6)
{//issue with RH6 on MacOS
MessageBox.Show($"You do not meet the minimum requirements for v{MultilingualGHInfo.Ver}\r\n\r\nPLEASE USE:\r\n v1.3.5", "MultilingualGH", MessageBoxButtons.OK, MessageBoxIcon.Information);
return GH_LoadingInstruction.Proceed;
}
Grasshopper.Instances.CanvasCreated += Setup;
return GH_LoadingInstruction.Proceed;
}
Expand Down Expand Up @@ -117,7 +112,7 @@ static void SetupMenu()
language
}).ToArray());

/*Version*/MGHMenu.Click += (s, e) =>
MGHMenu.Click += (s, e) =>
{
MGH.Enabled = !MGH.Enabled;
((ToolStripMenuItem)s).Checked = MGH.Enabled;
Expand Down
2 changes: 1 addition & 1 deletion src/MultilingualGH/MultilingualGH.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
<Private>False</Private>
<Private>True</Private>
</Reference>
<Reference Include="RhinoCommon">
<HintPath>G:\My Drive\GH\DLL\RH6\RhinoCommon.dll</HintPath>
Expand Down

0 comments on commit 4455b72

Please sign in to comment.