From 9e962b468eb308251a3308ee002a32bb45eed907 Mon Sep 17 00:00:00 2001 From: Sean Kaim Date: Thu, 3 Jan 2019 11:11:08 -0500 Subject: [PATCH] FilteredPropertyGrid -> Segoe UI --- .../FilteredPropertyGrid.cs | 28 ++-- .../FilteredPropertyGrid.designer.cs | 9 +- .../FilteredPropertyGrid.resx | 123 ++++++++++++++++++ mRemoteV1/mRemoteV1.csproj | 6 + 4 files changed, 149 insertions(+), 17 deletions(-) create mode 100644 mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.resx diff --git a/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs index 127654ba5..57c745386 100644 --- a/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs +++ b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs @@ -50,8 +50,8 @@ namespace mRemoteNG.UI.Controls.FilteredPropertyGrid public IEnumerable VisibleProperties => _propertyDescriptors.Select(p => p.Name); public new AttributeCollection BrowsableAttributes { - get { return _browsableAttributes; } - set { + get => _browsableAttributes; + set { if (_browsableAttributes == value) return; _hiddenAttributes = null; _browsableAttributes = value; @@ -63,8 +63,8 @@ namespace mRemoteNG.UI.Controls.FilteredPropertyGrid /// Get or set the categories to hide. /// public AttributeCollection HiddenAttributes { - get { return _hiddenAttributes; } - set { + get => _hiddenAttributes; + set { if (value == _hiddenAttributes) return; _hiddenAttributes = value; _browsableAttributes = null; @@ -77,8 +77,8 @@ namespace mRemoteNG.UI.Controls.FilteredPropertyGrid /// /// if one or several properties don't exist. public string[] BrowsableProperties { - get { return _mBrowsableProperties; } - set { + get => _mBrowsableProperties; + set { if (value == _mBrowsableProperties) return; _mBrowsableProperties = value; RefreshProperties(); @@ -87,8 +87,8 @@ namespace mRemoteNG.UI.Controls.FilteredPropertyGrid /// Get or set the properties to hide. public string[] HiddenProperties { - get { return _mHiddenProperties; } - set { + get => _mHiddenProperties; + set { if (value == _mHiddenProperties) return; _mHiddenProperties = value; RefreshProperties(); @@ -100,13 +100,11 @@ namespace mRemoteNG.UI.Controls.FilteredPropertyGrid /// /// The object passed to the base PropertyGrid is the wrapper. public new object SelectedObject { - get - { - return _mWrapper != null - ? ((ObjectWrapper)base.SelectedObject).SelectedObject - : null; - } - set { + get => + _mWrapper != null + ? ((ObjectWrapper)base.SelectedObject).SelectedObject + : null; + set { // Set the new object to the wrapper and create one if necessary. if(_mWrapper == null) { diff --git a/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs index 586b88139..1113c99d9 100644 --- a/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs +++ b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs @@ -25,8 +25,13 @@ /// the contents of this method with the code editor. /// private void InitializeComponent() { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.SuspendLayout(); + // + // FilteredPropertyGrid + // + this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ResumeLayout(false); + } #endregion diff --git a/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.resx b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.resx new file mode 100644 index 000000000..e5858cc29 --- /dev/null +++ b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj index c1c109d2f..d0e53cfff 100644 --- a/mRemoteV1/mRemoteV1.csproj +++ b/mRemoteV1/mRemoteV1.csproj @@ -814,6 +814,9 @@ NGTextBox.cs + + ConnectionTree.cs + CredentialRecordComboBox.cs @@ -826,6 +829,9 @@ CredentialRepositoryListView.cs + + FilteredPropertyGrid.cs + HeadlessTabControl.cs