From 231c752738a7aa15ccdb3c555468fba7e22bccb2 Mon Sep 17 00:00:00 2001 From: Nicholas Shulman Date: Sun, 5 Jan 2025 23:42:26 -0800 Subject: [PATCH 1/2] Prevent properties like "SelectedResultsIndex" from showing up in the property sheet in "ViewMenu" form. In the form designer for classes that are derived from "SkylineControl", such as "ViewMenu" or "EditMenu", some properties from the base class were showing up in the property sheet. --- pwiz_tools/Skyline/Menus/SkylineControl.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pwiz_tools/Skyline/Menus/SkylineControl.cs b/pwiz_tools/Skyline/Menus/SkylineControl.cs index f7023fc601..e5d58d13fa 100644 --- a/pwiz_tools/Skyline/Menus/SkylineControl.cs +++ b/pwiz_tools/Skyline/Menus/SkylineControl.cs @@ -55,12 +55,18 @@ private void InitializeComponent() modeUIHandler = new Helpers.ModeUIExtender(_components); } + [Browsable(false)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public SkylineWindow SkylineWindow { get; private set; } + [Browsable(false)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public SrmDocument DocumentUI { get { return SkylineWindow?.DocumentUI; } } + [Browsable(false)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public SrmDocument Document { get { return SkylineWindow?.Document; } @@ -71,22 +77,30 @@ public void ModifyDocument(string description, Func ac SkylineWindow.ModifyDocument(description, null, act, null, null, logFunc); } + [Browsable(false)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public IdentityPath SelectedPath { get { return SkylineWindow?.SelectedPath; } set { SkylineWindow.SelectedPath = value; } } + [Browsable(false)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public SequenceTree SequenceTree { get { return SkylineWindow.SequenceTree; } } + [Browsable(false)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public TreeNodeMS SelectedNode { get { return SkylineWindow.SelectedNode; } } + [Browsable(false)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public int SelectedResultsIndex { get From f1e9227b6c0e485b27046a59465be68d5dd8356f Mon Sep 17 00:00:00 2001 From: Nicholas Shulman Date: Mon, 6 Jan 2025 13:28:01 -0800 Subject: [PATCH 2/2] Hide "ModeUiHandler" from the property sheet too. --- pwiz_tools/Skyline/Menus/SkylineControl.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pwiz_tools/Skyline/Menus/SkylineControl.cs b/pwiz_tools/Skyline/Menus/SkylineControl.cs index e5d58d13fa..7583bde65e 100644 --- a/pwiz_tools/Skyline/Menus/SkylineControl.cs +++ b/pwiz_tools/Skyline/Menus/SkylineControl.cs @@ -44,6 +44,8 @@ public SkylineControl(SkylineWindow skylineWindow) : this() SkylineWindow = skylineWindow; } + [Browsable(false)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public Helpers.ModeUIExtender ModeUiHandler { get { return modeUIHandler; }