From d1a0e8c93871ac07c1aba85c7cb93fe8477c70bf Mon Sep 17 00:00:00 2001 From: Dale Fugier Date: Thu, 2 Aug 2018 09:55:18 -0700 Subject: [PATCH] Panels update --- .../cs/SampleCsWinForms/Commands/SampleCsPanelCommand.cs | 8 +------- .../cs/SampleCsWinForms/Forms/SampleCsPanelUserControl.cs | 8 +------- rhinocommon/cs/SampleCsWinForms/SampleCsWinFormsPlugIn.cs | 4 ++-- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/rhinocommon/cs/SampleCsWinForms/Commands/SampleCsPanelCommand.cs b/rhinocommon/cs/SampleCsWinForms/Commands/SampleCsPanelCommand.cs index b395ed53..d857dbb8 100644 --- a/rhinocommon/cs/SampleCsWinForms/Commands/SampleCsPanelCommand.cs +++ b/rhinocommon/cs/SampleCsWinForms/Commands/SampleCsPanelCommand.cs @@ -8,13 +8,7 @@ namespace SampleCsWinForms.Commands [System.Runtime.InteropServices.Guid("3d3db472-509d-41c5-97e3-2890c5fb9827")] public class SampleCsPanelCommand : Command { - /// - /// The command name as it appears on the Rhino command line. - /// - public override string EnglishName - { - get { return "SampleCsPanel"; } - } + public override string EnglishName => "SampleCsPanel"; protected override Result RunCommand(Rhino.RhinoDoc doc, RunMode mode) { diff --git a/rhinocommon/cs/SampleCsWinForms/Forms/SampleCsPanelUserControl.cs b/rhinocommon/cs/SampleCsWinForms/Forms/SampleCsPanelUserControl.cs index 9a4e206b..401d71ee 100644 --- a/rhinocommon/cs/SampleCsWinForms/Forms/SampleCsPanelUserControl.cs +++ b/rhinocommon/cs/SampleCsWinForms/Forms/SampleCsPanelUserControl.cs @@ -44,12 +44,6 @@ void OnUserControlDisposed(object sender, EventArgs e) /// /// Returns the ID of this panel. /// - public static Guid PanelId - { - get - { - return typeof(SampleCsPanelUserControl).GUID; - } - } + public static Guid PanelId => typeof(SampleCsPanelUserControl).GUID; } } diff --git a/rhinocommon/cs/SampleCsWinForms/SampleCsWinFormsPlugIn.cs b/rhinocommon/cs/SampleCsWinForms/SampleCsWinFormsPlugIn.cs index 260afb7a..31cc0384 100644 --- a/rhinocommon/cs/SampleCsWinForms/SampleCsWinFormsPlugIn.cs +++ b/rhinocommon/cs/SampleCsWinForms/SampleCsWinFormsPlugIn.cs @@ -28,8 +28,8 @@ public SampleCsWinFormsPlugIn() /// protected override LoadReturnCode OnLoad(ref string errorMessage) { - var panel_type = typeof(SampleCsPanelUserControl); - Panels.RegisterPanel(this, panel_type, "Sample", SampleCsWinForms.Properties.Resources.Panel); + var type = typeof(SampleCsPanelUserControl); + Panels.RegisterPanel(this, type, "SampleWinForms", SampleCsWinForms.Properties.Resources.Panel, PanelType.System); return LoadReturnCode.Success; }