From 214f0a53ef3f1efd5ce4c0b6e85451c8d1d986d2 Mon Sep 17 00:00:00 2001 From: JFronny <33260128+JFronny@users.noreply.github.com> Date: Sat, 4 Apr 2020 16:36:13 +0200 Subject: [PATCH] Move all WinForms-related code to W32 --- Misc/Misc.csproj | 12 ++---------- {Misc => W32/Forms}/DataGridViewNumericUpDownCell.cs | 3 +-- .../Forms}/DataGridViewNumericUpDownColumn.cs | 3 +-- .../DataGridViewNumericUpDownEditingControl.cs | 3 +-- Misc/Forms.cs => W32/Forms/Extensions.cs | 5 ++--- {Misc => W32/Forms}/RotatingIndicator.cs | 3 +-- {Misc => W32/Forms}/SelectBox.Designer.cs | 2 +- {Misc => W32/Forms}/SelectBox.cs | 3 +-- {Misc => W32/Forms}/SelectBox.resx | 0 {Misc => W32}/Security.cs | 2 +- W32/W32.csproj | 8 ++++++++ 11 files changed, 19 insertions(+), 25 deletions(-) rename {Misc => W32/Forms}/DataGridViewNumericUpDownCell.cs (99%) rename {Misc => W32/Forms}/DataGridViewNumericUpDownColumn.cs (99%) rename {Misc => W32/Forms}/DataGridViewNumericUpDownEditingControl.cs (99%) rename Misc/Forms.cs => W32/Forms/Extensions.cs (97%) rename {Misc => W32/Forms}/RotatingIndicator.cs (98%) rename {Misc => W32/Forms}/SelectBox.Designer.cs (98%) rename {Misc => W32/Forms}/SelectBox.cs (93%) rename {Misc => W32/Forms}/SelectBox.resx (100%) rename {Misc => W32}/Security.cs (89%) diff --git a/Misc/Misc.csproj b/Misc/Misc.csproj index ee313e6..b2281e2 100644 --- a/Misc/Misc.csproj +++ b/Misc/Misc.csproj @@ -1,11 +1,10 @@ - + Library CC_Functions.Misc CC_Functions.Misc 8 true - net461;netcoreapp3.1 false CC-Functions.Misc CC-Functions.Misc @@ -19,6 +18,7 @@ 1.0.0.0 0.0 1.1.$(VersionSuffix) + netstandard2.0 bin\Debug\Misc.xml @@ -26,14 +26,6 @@ bin\Release\Misc.xml - - - Component - - - Component - - diff --git a/Misc/DataGridViewNumericUpDownCell.cs b/W32/Forms/DataGridViewNumericUpDownCell.cs similarity index 99% rename from Misc/DataGridViewNumericUpDownCell.cs rename to W32/Forms/DataGridViewNumericUpDownCell.cs index 28f08cf..7f29025 100644 --- a/Misc/DataGridViewNumericUpDownCell.cs +++ b/W32/Forms/DataGridViewNumericUpDownCell.cs @@ -4,9 +4,8 @@ using System.Diagnostics; using System.Drawing; using System.Globalization; using System.Runtime.InteropServices; -using System.Windows.Forms; -namespace CC_Functions.Misc +namespace CC_Functions.W32.Forms { public class DataGridViewNumericUpDownCell : DataGridViewTextBoxCell { diff --git a/Misc/DataGridViewNumericUpDownColumn.cs b/W32/Forms/DataGridViewNumericUpDownColumn.cs similarity index 99% rename from Misc/DataGridViewNumericUpDownColumn.cs rename to W32/Forms/DataGridViewNumericUpDownColumn.cs index 123ec63..7106f6d 100644 --- a/Misc/DataGridViewNumericUpDownColumn.cs +++ b/W32/Forms/DataGridViewNumericUpDownColumn.cs @@ -2,9 +2,8 @@ using System; using System.ComponentModel; using System.Globalization; using System.Text; -using System.Windows.Forms; -namespace CC_Functions.Misc +namespace CC_Functions.W32.Forms { /// /// Custom column type dedicated to the DataGridViewNumericUpDownCell cell type. diff --git a/Misc/DataGridViewNumericUpDownEditingControl.cs b/W32/Forms/DataGridViewNumericUpDownEditingControl.cs similarity index 99% rename from Misc/DataGridViewNumericUpDownEditingControl.cs rename to W32/Forms/DataGridViewNumericUpDownEditingControl.cs index ee173c2..bd15db9 100644 --- a/Misc/DataGridViewNumericUpDownEditingControl.cs +++ b/W32/Forms/DataGridViewNumericUpDownEditingControl.cs @@ -2,9 +2,8 @@ using System; using System.Drawing; using System.Globalization; using System.Runtime.InteropServices; -using System.Windows.Forms; -namespace CC_Functions.Misc +namespace CC_Functions.W32.Forms { /// /// Defines the editing control for the DataGridViewNumericUpDownCell custom cell type. diff --git a/Misc/Forms.cs b/W32/Forms/Extensions.cs similarity index 97% rename from Misc/Forms.cs rename to W32/Forms/Extensions.cs index 8c4975a..5d5e3eb 100644 --- a/Misc/Forms.cs +++ b/W32/Forms/Extensions.cs @@ -1,9 +1,8 @@ using System; using System.Linq.Expressions; using System.Reflection; -using System.Windows.Forms; -namespace CC_Functions.Misc +namespace CC_Functions.W32.Forms { public delegate void SetPropertyDelegate(TCtl control, Expression> propexpr, TProp value) where TCtl : Control; @@ -17,7 +16,7 @@ namespace CC_Functions.Misc public delegate TResult InvokeFuncDelegate(TCtl control, Delegate dlg, params object[] args) where TCtl : Control; - public static class Forms + public static class Extensions { public static void SetProperty(this TCtl control, Expression> propexpr, TProp value) where TCtl : Control diff --git a/Misc/RotatingIndicator.cs b/W32/Forms/RotatingIndicator.cs similarity index 98% rename from Misc/RotatingIndicator.cs rename to W32/Forms/RotatingIndicator.cs index 171f088..f75c3df 100644 --- a/Misc/RotatingIndicator.cs +++ b/W32/Forms/RotatingIndicator.cs @@ -2,10 +2,9 @@ using System.ComponentModel; using System.Drawing; using System.Drawing.Drawing2D; -using System.Windows.Forms; using Timer = System.Timers.Timer; -namespace CC_Functions.Misc +namespace CC_Functions.W32.Forms { /// /// Animated control similar to update screens in Windows 8 and 10 diff --git a/Misc/SelectBox.Designer.cs b/W32/Forms/SelectBox.Designer.cs similarity index 98% rename from Misc/SelectBox.Designer.cs rename to W32/Forms/SelectBox.Designer.cs index 5f0d86e..2fdc0f2 100644 --- a/Misc/SelectBox.Designer.cs +++ b/W32/Forms/SelectBox.Designer.cs @@ -1,4 +1,4 @@ -namespace CC_Functions.Misc +namespace CC_Functions.W32.Forms { partial class SelectBox { diff --git a/Misc/SelectBox.cs b/W32/Forms/SelectBox.cs similarity index 93% rename from Misc/SelectBox.cs rename to W32/Forms/SelectBox.cs index 1613166..ebde33e 100644 --- a/Misc/SelectBox.cs +++ b/W32/Forms/SelectBox.cs @@ -1,8 +1,7 @@ using System; using System.Linq; -using System.Windows.Forms; -namespace CC_Functions.Misc +namespace CC_Functions.W32.Forms { internal partial class SelectBox : Form { diff --git a/Misc/SelectBox.resx b/W32/Forms/SelectBox.resx similarity index 100% rename from Misc/SelectBox.resx rename to W32/Forms/SelectBox.resx diff --git a/Misc/Security.cs b/W32/Security.cs similarity index 89% rename from Misc/Security.cs rename to W32/Security.cs index 907f0f8..bd5414d 100644 --- a/Misc/Security.cs +++ b/W32/Security.cs @@ -1,6 +1,6 @@ using System.Security.Principal; -namespace CC_Functions.Misc +namespace CC_Functions.W32 { public static class MiscFunctions { diff --git a/W32/W32.csproj b/W32/W32.csproj index 574a554..4ebb052 100644 --- a/W32/W32.csproj +++ b/W32/W32.csproj @@ -18,6 +18,14 @@ 0.0 1.1.$(VersionSuffix) + + + Component + + + Component + + true bin\Debug\W32.xml