diff --git a/FizzyLauncher.UI/FizzyLauncher.UI.csproj b/FizzyLauncher.UI/FizzyLauncher.UI.csproj index 7334c5e..ddfdb4a 100644 --- a/FizzyLauncher.UI/FizzyLauncher.UI.csproj +++ b/FizzyLauncher.UI/FizzyLauncher.UI.csproj @@ -52,10 +52,10 @@ True Resources16.resx - + True True - Resources20.resx + Resources.resx @@ -134,9 +134,9 @@ ResXFileCodeGenerator Resources16.Designer.cs - + ResXFileCodeGenerator - Resources20.Designer.cs + Resources.Designer.cs TForm.cs @@ -160,27 +160,6 @@ TTextBox.cs - - - - - - - - - - - - - - - - - - - - - @@ -230,19 +209,64 @@ - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FizzyLauncher.UI/Properties/Resources20.Designer.cs b/FizzyLauncher.UI/Properties/Resources.Designer.cs similarity index 51% rename from FizzyLauncher.UI/Properties/Resources20.Designer.cs rename to FizzyLauncher.UI/Properties/Resources.Designer.cs index 017f654..64c08bd 100644 --- a/FizzyLauncher.UI/Properties/Resources20.Designer.cs +++ b/FizzyLauncher.UI/Properties/Resources.Designer.cs @@ -22,14 +22,14 @@ namespace AppLauncher.Properties { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources20 { + internal class Resources { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources20() { + internal Resources() { } /// @@ -39,7 +39,7 @@ namespace AppLauncher.Properties { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AppLauncher.Properties.Resources20", typeof(Resources20).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AppLauncher.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; @@ -63,9 +63,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap close { + internal static System.Drawing.Bitmap titlebar_blank { get { - object obj = ResourceManager.GetObject("close", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_blank", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -73,9 +73,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap close2 { + internal static System.Drawing.Bitmap titlebar_blank2 { get { - object obj = ResourceManager.GetObject("close2", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_blank2", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -83,9 +83,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap close3 { + internal static System.Drawing.Bitmap titlebar_blank3 { get { - object obj = ResourceManager.GetObject("close3", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_blank3", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -93,9 +93,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap empty { + internal static System.Drawing.Bitmap titlebar_blank4 { get { - object obj = ResourceManager.GetObject("empty", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_blank4", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -103,9 +103,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap empty2 { + internal static System.Drawing.Bitmap titlebar_blank5 { get { - object obj = ResourceManager.GetObject("empty2", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_blank5", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -113,9 +113,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap empty3 { + internal static System.Drawing.Bitmap titlebar_close { get { - object obj = ResourceManager.GetObject("empty3", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_close", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -123,9 +123,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap maximise { + internal static System.Drawing.Bitmap titlebar_close2 { get { - object obj = ResourceManager.GetObject("maximise", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_close2", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -133,9 +133,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap maximise2 { + internal static System.Drawing.Bitmap titlebar_close3 { get { - object obj = ResourceManager.GetObject("maximise2", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_close3", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -143,9 +143,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap maximise3 { + internal static System.Drawing.Bitmap titlebar_close4 { get { - object obj = ResourceManager.GetObject("maximise3", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_close4", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -153,9 +153,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap minimise { + internal static System.Drawing.Bitmap titlebar_close5 { get { - object obj = ResourceManager.GetObject("minimise", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_close5", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -163,9 +163,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap minimise2 { + internal static System.Drawing.Bitmap titlebar_maximise { get { - object obj = ResourceManager.GetObject("minimise2", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_maximise", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -173,9 +173,89 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap minimise3 { + internal static System.Drawing.Bitmap titlebar_maximise2 { get { - object obj = ResourceManager.GetObject("minimise3", resourceCulture); + object obj = ResourceManager.GetObject("titlebar_maximise2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap titlebar_maximise3 { + get { + object obj = ResourceManager.GetObject("titlebar_maximise3", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap titlebar_maximise4 { + get { + object obj = ResourceManager.GetObject("titlebar_maximise4", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap titlebar_maximise5 { + get { + object obj = ResourceManager.GetObject("titlebar_maximise5", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap titlebar_minimise { + get { + object obj = ResourceManager.GetObject("titlebar_minimise", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap titlebar_minimise2 { + get { + object obj = ResourceManager.GetObject("titlebar_minimise2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap titlebar_minimise3 { + get { + object obj = ResourceManager.GetObject("titlebar_minimise3", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap titlebar_minimise4 { + get { + object obj = ResourceManager.GetObject("titlebar_minimise4", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap titlebar_minimise5 { + get { + object obj = ResourceManager.GetObject("titlebar_minimise5", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } diff --git a/FizzyLauncher.UI/Properties/Resources20.resx b/FizzyLauncher.UI/Properties/Resources.resx similarity index 54% rename from FizzyLauncher.UI/Properties/Resources20.resx rename to FizzyLauncher.UI/Properties/Resources.resx index 9a0d447..5f47cda 100644 --- a/FizzyLauncher.UI/Properties/Resources20.resx +++ b/FizzyLauncher.UI/Properties/Resources.resx @@ -118,40 +118,64 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\20\close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\close2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_blank2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\close3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_blank3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\empty.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_blank4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\empty2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_blank5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\empty3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\maximise.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_close2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\maximise2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_close3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\maximise3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_close4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\minimise.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_close5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\minimise2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_maximise.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\20\minimise3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\titlebar_maximise2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\titlebar_maximise3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\titlebar_maximise4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\titlebar_maximise5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\titlebar_minimise.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\titlebar_minimise2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\titlebar_minimise3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\titlebar_minimise4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\titlebar_minimise5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/FizzyLauncher.UI/Resources/20/close.png b/FizzyLauncher.UI/Resources/20/close.png deleted file mode 100644 index fb4f049..0000000 Binary files a/FizzyLauncher.UI/Resources/20/close.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/close2.png b/FizzyLauncher.UI/Resources/20/close2.png deleted file mode 100644 index e2a3277..0000000 Binary files a/FizzyLauncher.UI/Resources/20/close2.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/close3.png b/FizzyLauncher.UI/Resources/20/close3.png deleted file mode 100644 index 14e88b0..0000000 Binary files a/FizzyLauncher.UI/Resources/20/close3.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/empty.png b/FizzyLauncher.UI/Resources/20/empty.png deleted file mode 100644 index 8b7e377..0000000 Binary files a/FizzyLauncher.UI/Resources/20/empty.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/empty2.png b/FizzyLauncher.UI/Resources/20/empty2.png deleted file mode 100644 index 61de605..0000000 Binary files a/FizzyLauncher.UI/Resources/20/empty2.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/empty3.png b/FizzyLauncher.UI/Resources/20/empty3.png deleted file mode 100644 index b98cb46..0000000 Binary files a/FizzyLauncher.UI/Resources/20/empty3.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/maximise.png b/FizzyLauncher.UI/Resources/20/maximise.png deleted file mode 100644 index b2e90e2..0000000 Binary files a/FizzyLauncher.UI/Resources/20/maximise.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/maximise2.png b/FizzyLauncher.UI/Resources/20/maximise2.png deleted file mode 100644 index 4c4c813..0000000 Binary files a/FizzyLauncher.UI/Resources/20/maximise2.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/maximise3.png b/FizzyLauncher.UI/Resources/20/maximise3.png deleted file mode 100644 index 77ae4ee..0000000 Binary files a/FizzyLauncher.UI/Resources/20/maximise3.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/minimise.png b/FizzyLauncher.UI/Resources/20/minimise.png deleted file mode 100644 index 338d63d..0000000 Binary files a/FizzyLauncher.UI/Resources/20/minimise.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/minimise2.png b/FizzyLauncher.UI/Resources/20/minimise2.png deleted file mode 100644 index f7b44a8..0000000 Binary files a/FizzyLauncher.UI/Resources/20/minimise2.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/20/minimise3.png b/FizzyLauncher.UI/Resources/20/minimise3.png deleted file mode 100644 index 2174ece..0000000 Binary files a/FizzyLauncher.UI/Resources/20/minimise3.png and /dev/null differ diff --git a/FizzyLauncher.UI/Resources/titlebar_blank.png b/FizzyLauncher.UI/Resources/titlebar_blank.png new file mode 100644 index 0000000..1f31a99 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_blank.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_blank2.png b/FizzyLauncher.UI/Resources/titlebar_blank2.png new file mode 100644 index 0000000..a04ab4d Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_blank2.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_blank3.png b/FizzyLauncher.UI/Resources/titlebar_blank3.png new file mode 100644 index 0000000..7f2bae3 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_blank3.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_blank4.png b/FizzyLauncher.UI/Resources/titlebar_blank4.png new file mode 100644 index 0000000..af1f600 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_blank4.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_blank5.png b/FizzyLauncher.UI/Resources/titlebar_blank5.png new file mode 100644 index 0000000..32fc5d2 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_blank5.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_close.png b/FizzyLauncher.UI/Resources/titlebar_close.png new file mode 100644 index 0000000..2ee4079 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_close.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_close2.png b/FizzyLauncher.UI/Resources/titlebar_close2.png new file mode 100644 index 0000000..f497ea7 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_close2.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_close3.png b/FizzyLauncher.UI/Resources/titlebar_close3.png new file mode 100644 index 0000000..9813d70 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_close3.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_close4.png b/FizzyLauncher.UI/Resources/titlebar_close4.png new file mode 100644 index 0000000..ee5d5dd Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_close4.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_close5.png b/FizzyLauncher.UI/Resources/titlebar_close5.png new file mode 100644 index 0000000..dc57050 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_close5.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_maximise.png b/FizzyLauncher.UI/Resources/titlebar_maximise.png new file mode 100644 index 0000000..b17fa34 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_maximise.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_maximise2.png b/FizzyLauncher.UI/Resources/titlebar_maximise2.png new file mode 100644 index 0000000..6f98201 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_maximise2.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_maximise3.png b/FizzyLauncher.UI/Resources/titlebar_maximise3.png new file mode 100644 index 0000000..c9b0e18 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_maximise3.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_maximise4.png b/FizzyLauncher.UI/Resources/titlebar_maximise4.png new file mode 100644 index 0000000..613d94d Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_maximise4.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_maximise5.png b/FizzyLauncher.UI/Resources/titlebar_maximise5.png new file mode 100644 index 0000000..f655957 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_maximise5.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_minimise.png b/FizzyLauncher.UI/Resources/titlebar_minimise.png new file mode 100644 index 0000000..19c19ae Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_minimise.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_minimise2.png b/FizzyLauncher.UI/Resources/titlebar_minimise2.png new file mode 100644 index 0000000..2f6a976 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_minimise2.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_minimise3.png b/FizzyLauncher.UI/Resources/titlebar_minimise3.png new file mode 100644 index 0000000..78fe59e Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_minimise3.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_minimise4.png b/FizzyLauncher.UI/Resources/titlebar_minimise4.png new file mode 100644 index 0000000..fb55d84 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_minimise4.png differ diff --git a/FizzyLauncher.UI/Resources/titlebar_minimise5.png b/FizzyLauncher.UI/Resources/titlebar_minimise5.png new file mode 100644 index 0000000..0513690 Binary files /dev/null and b/FizzyLauncher.UI/Resources/titlebar_minimise5.png differ diff --git a/FizzyLauncher.UI/RyzStudio/Windows/Forms/TForm.cs b/FizzyLauncher.UI/RyzStudio/Windows/Forms/TForm.cs index 4e22e8e..48a2803 100644 --- a/FizzyLauncher.UI/RyzStudio/Windows/Forms/TForm.cs +++ b/FizzyLauncher.UI/RyzStudio/Windows/Forms/TForm.cs @@ -1,54 +1,50 @@ -using RyzStudio.Windows.Forms; -using System; +using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; -using Resources = AppLauncher.Properties.Resources20; +using Resources = AppLauncher.Properties.Resources; -namespace AppLauncher.Windows.Forms +namespace RyzStudio.Windows.Forms { public class TForm : Form { - protected readonly Color borderColour = Color.FromArgb(235, 234, 233); + protected readonly Color borderColour = Color.FromArgb(200, 200, 200); protected readonly int borderWidth = 1; - protected readonly int resizeBorderWidth = 3; + protected readonly int resizeBorderWidth = 4; - protected readonly Color backColour = Color.FromArgb(255, 255, 255); + protected readonly Color backColour = Color.FromArgb(250, 250, 250); protected readonly Color titleBackColour = Color.FromArgb(235, 234, 233); protected readonly Color titleBorderColour = Color.FromArgb(200, 198, 196); protected readonly Color titleColour = Color.FromArgb(102, 102, 102); - protected readonly int titleBarHeight = 54; + protected readonly int titleBarHeight = 33; + protected readonly bool showTitleBarLine = true; protected Font titleFont = null; protected int titleFontTop = 0; - protected readonly int titleBarIconSize = 20; - protected readonly int titleBarIconMargin = 8; + protected readonly Size titleBarIconSize = new Size(48, 32); + protected readonly int titleBarIconMargin = 0; + protected readonly int titleBarIconMarginRight = 0; + + protected Image appIcon = null; + protected const int appIconLeft = 12; + protected const int appIconRight = 6; + protected int appIconTop = 0; protected bool isDragging = false; protected Point startPosition = new Point(); protected Point startWindowSize = new Point(); + protected bool enableMinimise { get; set; } = true; + protected bool enableMaximise { get; set; } = true; + protected bool enableClose { get; set; } = true; + protected bool closeOnMinimise { get; set; } = false; + protected bool isBusy = false; - protected Image appIcon = null; - protected int appIconTop = 0; - - protected bool isMinimiseEnabled = true; - protected bool isMaximiseEnabled = true; - protected bool closeOnMinimise = false; - protected bool enableMinimiseMenu = true; - protected bool enableMaximiseMenu = true; - protected bool enableCloseMenu = true; - - protected MouseEventHandler minimiseMenuEvent = null; - protected MouseEventHandler maximiseMenuEvent = null; - protected MouseEventHandler closeMenuEvent = null; - private IContainer components; - public TForm() : base() { InitializeComponent(); @@ -130,14 +126,15 @@ namespace AppLauncher.Windows.Forms area.Inflate((-1 * borderWidth), (-1 * borderWidth)); g.FillRectangle(new SolidBrush(titleBackColour), area.X, area.Y, (area.Width + area.X), titleBarHeight); - g.DrawLine(new Pen(titleBorderColour, 1), area.X, (titleBarHeight + 1), (area.Width + area.X), (titleBarHeight + 1)); + + if (showTitleBarLine) g.DrawLine(new Pen(titleBorderColour, 1), area.X, titleBarHeight, (area.Width + area.X), titleBarHeight); if (!DesignMode) { - //g.DrawImageUnscaled(appIcon, 17, appIconTop); - g.DrawImage(appIcon, 17, appIconTop, appIcon.Width, appIcon.Height); + if (appIcon != null) g.DrawImageUnscaled(appIcon, appIconLeft, appIconTop); - TextRenderer.DrawText(g, this.Text, titleFont, new Point(58, titleFontTop), titleColour); + int iconPosX = borderWidth + appIconLeft + appIconRight + ((appIcon == null) ? 0 : appIcon.Width); + TextRenderer.DrawText(g, this.Text, titleFont, new Point(iconPosX, titleFontTop), titleColour); } } @@ -149,7 +146,7 @@ namespace AppLauncher.Windows.Forms } [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] - public override Color BackColor { get => base.BackColor; set => base.BackColor = value; } + public override Color BackColor { get => base.BackColor; set => base.BackColor = backColour; } [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public new FormBorderStyle FormBorderStyle { get => base.FormBorderStyle; set => base.FormBorderStyle = value; } @@ -190,7 +187,7 @@ namespace AppLauncher.Windows.Forms // AForm // this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "Form"; + this.Name = "AForm"; this.ResumeLayout(false); } @@ -235,129 +232,91 @@ namespace AppLauncher.Windows.Forms // close TImageBox closeBox = generateToolbarImageBox(); - if (enableCloseMenu) + closeBox.Image = closeBox.ImageNormal = (enableClose) ? Resources.titlebar_close : Resources.titlebar_blank; + closeBox.ImageHover = (enableClose) ? Resources.titlebar_close3 : Resources.titlebar_blank; + closeBox.ImageSelected = Resources.titlebar_close3; + closeBox.MouseClick += delegate (object sender, MouseEventArgs e) { - closeBox.Image = closeBox.ImageNormal = Resources.close; - closeBox.ImageHover = Resources.close3; - //closeBox.ImageSelected = null; - closeBox.MouseClick += delegate (object sender, MouseEventArgs e) + if (e.Button == MouseButtons.Left) { - if (e.Button != MouseButtons.Left) return; - - if (closeMenuEvent != null) + if (enableClose) { - closeMenuEvent(sender, e); - return; + this.Close(); } - - this.Close(); - }; - } - else - { - closeBox.Image = closeBox.ImageNormal = closeBox.ImageHover = closeBox.ImageSelected = Resources.close; - } - - closeBox.Left = this.DisplayRectangle.Width - closeBox.Width - 17; + } + }; + closeBox.Left = this.DisplayRectangle.Width - closeBox.Width - (titleBarIconMarginRight + borderWidth); this.Controls.Add(closeBox); // maximise TImageBox maximiseBox = generateToolbarImageBox(); - if (enableMaximiseMenu) + maximiseBox.Image = maximiseBox.ImageNormal = (enableMaximise) ? Resources.titlebar_maximise : Resources.titlebar_blank; + maximiseBox.ImageHover = (enableMaximise) ? Resources.titlebar_maximise5 : Resources.titlebar_blank; + maximiseBox.ImageSelected = Resources.titlebar_maximise3; + maximiseBox.MouseClick += delegate (object sender, MouseEventArgs e) { - maximiseBox.Image = maximiseBox.ImageNormal = (isMaximiseEnabled) ? Resources.maximise : Resources.empty; - maximiseBox.ImageHover = (isMaximiseEnabled) ? Resources.maximise2 : Resources.empty; - maximiseBox.ImageSelected = Resources.maximise3; - maximiseBox.MouseClick += delegate (object sender, MouseEventArgs e) + if (!(sender is TImageBox)) return; + + TImageBox imageBox2 = (sender as TImageBox); + + if (imageBox2 == null) return; + + if (e.Button == MouseButtons.Left) { - if (!(sender is TImageBox)) return; - - TImageBox imageBox2 = (sender as TImageBox); - - if (imageBox2 == null) return; - - if (maximiseMenuEvent != null) + if (enableMaximise) { - maximiseMenuEvent(sender, e); - return; - } - - if (e.Button == MouseButtons.Left) - { - if (isMaximiseEnabled) + if (this.WindowState == FormWindowState.Maximized) { - if (this.WindowState == FormWindowState.Maximized) - { - this.WindowState = FormWindowState.Normal; - imageBox2.Image = imageBox2.ImageNormal = Resources.maximise; - } - else - { - this.WindowState = FormWindowState.Maximized; - imageBox2.Image = imageBox2.ImageNormal = Resources.maximise2; - } - } - } - else if (e.Button == MouseButtons.Right) - { - this.TopMost = !this.TopMost; - - if (this.TopMost) - { - imageBox2.Image = imageBox2.ImageNormal = Resources.maximise3; - imageBox2.ImageHover = (isMaximiseEnabled) ? Resources.maximise2 : Resources.maximise3; + this.WindowState = FormWindowState.Normal; + imageBox2.Image = imageBox2.ImageNormal = Resources.titlebar_maximise; } else { - imageBox2.Image = imageBox2.ImageNormal = (isMaximiseEnabled) ? Resources.maximise : Resources.empty; - imageBox2.ImageHover = (isMaximiseEnabled) ? Resources.maximise2 : Resources.empty; + this.WindowState = FormWindowState.Maximized; + imageBox2.Image = imageBox2.ImageNormal = Resources.titlebar_maximise5; } } - }; - } - else - { - maximiseBox.Image = maximiseBox.ImageNormal = maximiseBox.ImageHover = maximiseBox.ImageSelected = Resources.maximise; - } + } + else if (e.Button == MouseButtons.Right) + { + this.TopMost = !this.TopMost; + if (this.TopMost) + { + imageBox2.Image = imageBox2.ImageNormal = Resources.titlebar_maximise3; + imageBox2.ImageHover = (enableMaximise) ? Resources.titlebar_maximise5 : Resources.titlebar_maximise3; + } + else + { + imageBox2.Image = imageBox2.ImageNormal = (enableMaximise) ? Resources.titlebar_maximise : Resources.titlebar_blank; + imageBox2.ImageHover = (enableMaximise) ? Resources.titlebar_maximise5 : Resources.titlebar_blank; + } + } + }; maximiseBox.Left = closeBox.Left - maximiseBox.Width - titleBarIconMargin; this.Controls.Add(maximiseBox); // minimise TImageBox minimiseBox = generateToolbarImageBox(); - if (enableMinimiseMenu) + minimiseBox.Image = minimiseBox.ImageNormal = (enableMinimise) ? Resources.titlebar_minimise : Resources.titlebar_blank; + minimiseBox.ImageHover = (enableMinimise) ? Resources.titlebar_minimise5 : Resources.titlebar_blank; + //minimiseBox.ImageSelected = null; + minimiseBox.MouseClick += delegate (object sender, MouseEventArgs e) { - minimiseBox.Image = minimiseBox.ImageNormal = (isMinimiseEnabled) ? Resources.minimise : Resources.empty; - minimiseBox.ImageHover = (isMinimiseEnabled) ? Resources.minimise2 : Resources.empty; - //minimiseBox.ImageSelected = null; - minimiseBox.MouseClick += delegate (object sender, MouseEventArgs e) + if (!enableMinimise) return; + if (e.Button != MouseButtons.Left) return; + + if (closeOnMinimise) { - if (!isMinimiseEnabled) return; - if (e.Button != MouseButtons.Left) return; - - if (minimiseMenuEvent != null) - { - minimiseMenuEvent(sender, e); - return; - } - - if (closeOnMinimise) - { - this.Close(); - } - else - { - this.WindowState = FormWindowState.Minimized; - } - }; - } - else - { - minimiseBox.Image = minimiseBox.ImageNormal = minimiseBox.ImageHover = minimiseBox.ImageSelected = Resources.minimise; - } - + this.Close(); + } + else + { + this.WindowState = FormWindowState.Minimized; + } + }; minimiseBox.Left = maximiseBox.Left - minimiseBox.Width - titleBarIconMargin; this.Controls.Add(minimiseBox); @@ -436,8 +395,9 @@ namespace AppLauncher.Windows.Forms protected TImageBox generateToolbarImageBox() { TImageBox imageBox = new TImageBox(); - imageBox.BackColor = Color.Transparent; - imageBox.BackgroundImageLayout = ImageLayout.Center; + //imageBox.BackColor = Color.Transparent; + imageBox.BackColorHover = imageBox.BackColorSelected = Color.FromArgb(220, 220, 220); + imageBox.BackgroundImageLayout = ImageLayout.Center; imageBox.ErrorImage = null; //imageBox.Image = Resources.close; //imageBox.ImageHover = Resources.close2; @@ -445,12 +405,13 @@ namespace AppLauncher.Windows.Forms imageBox.ImageSelected = null; imageBox.IsSelected = false; //closeBox.Location = new System.Drawing.Point(169, 12); - imageBox.Size = new System.Drawing.Size(titleBarIconSize, titleBarIconSize); + imageBox.Size = titleBarIconSize; imageBox.SizeMode = PictureBoxSizeMode.CenterImage; //imageBox.MouseClick += new MouseEventHandler(closeBox_MouseClick); //imageBox.Left = this.DisplayRectangle.Width - imageBox.Width - 17; - imageBox.Top = (int)Math.Floor((decimal)(titleBarHeight - titleBarIconSize) / 2); + imageBox.Top = (int)Math.Floor((decimal) (titleBarHeight - titleBarIconSize.Height) / 2) + borderWidth; imageBox.Anchor = (AnchorStyles.Top | AnchorStyles.Right); + imageBox.Padding = new Padding(0); return imageBox; } diff --git a/FizzyLauncher.UI/RyzStudio/Windows/Forms/TImageBox.cs b/FizzyLauncher.UI/RyzStudio/Windows/Forms/TImageBox.cs index 6a720e2..09f7bbe 100644 --- a/FizzyLauncher.UI/RyzStudio/Windows/Forms/TImageBox.cs +++ b/FizzyLauncher.UI/RyzStudio/Windows/Forms/TImageBox.cs @@ -21,9 +21,21 @@ namespace RyzStudio.Windows.Forms base.OnCreateControl(); } + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Color BackColor { get => base.BackColor; set => base.BackColor = value; } + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public new Image Image { get => base.Image; set => base.Image = value; } + [Category("Appearance"), Browsable(true)] + public Color BackColorNormal { get; set; } = Color.Transparent; + + [Category("Appearance"), Browsable(true)] + public Color BackColorHover { get; set; } = Color.Transparent; + + [Category("Appearance"), Browsable(true)] + public Color BackColorSelected { get; set; } = Color.Transparent; + [Category("Appearance"), Browsable(true)] public Image ImageNormal { get; set; } @@ -33,11 +45,21 @@ namespace RyzStudio.Windows.Forms [Category("Appearance"), Browsable(true)] public Image ImageSelected { get; set; } + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public Image NormalImage { get => this.ImageNormal; set => this.ImageNormal = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public Image HoverImage { get => this.ImageHover; set => this.ImageHover = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public Image SelectedImage { get => this.ImageSelected; set => this.ImageSelected = value; } + public bool IsSelected { get; set; } = false; protected override void OnMouseEnter(EventArgs e) { this.Image = this.ImageHover; + this.BackColor = this.BackColorHover; base.OnMouseEnter(e); } @@ -45,6 +67,7 @@ namespace RyzStudio.Windows.Forms protected override void OnMouseLeave(EventArgs e) { this.Image = (this.IsSelected ? this.ImageSelected : this.ImageNormal); + this.BackColor = (this.IsSelected ? this.BackColorSelected : this.BackColorNormal); base.OnMouseLeave(e); } @@ -52,6 +75,7 @@ namespace RyzStudio.Windows.Forms protected override void OnLostFocus(EventArgs e) { this.Image = (this.IsSelected ? this.ImageSelected : this.ImageNormal); + this.BackColor = (this.IsSelected ? this.BackColorSelected : this.BackColorNormal); base.OnLostFocus(e); } diff --git a/FizzyLauncher.csproj b/FizzyLauncher.csproj index 8d405c8..39bc8d3 100644 --- a/FizzyLauncher.csproj +++ b/FizzyLauncher.csproj @@ -152,14 +152,12 @@ - - - + diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs index b7ff7d2..b088587 100644 --- a/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -42,6 +42,7 @@ this.toolStripMenuItem10 = new System.Windows.Forms.ToolStripSeparator(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem12 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem9 = new System.Windows.Forms.ToolStripMenuItem(); @@ -50,15 +51,16 @@ this.viewHelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); this.exitToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItem12 = new System.Windows.Forms.ToolStripMenuItem(); + this.panel1 = new System.Windows.Forms.Panel(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip2.SuspendLayout(); + this.panel1.SuspendLayout(); this.SuspendLayout(); // // contextMenuStrip1 @@ -69,7 +71,7 @@ this.toolStripMenuItem9, this.helpToolStripMenuItem}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(181, 114); + this.contextMenuStrip1.Size = new System.Drawing.Size(102, 92); this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening); // // toolStripMenuItem4 @@ -85,7 +87,7 @@ this.toolStripMenuItem10, this.exitToolStripMenuItem}); this.toolStripMenuItem4.Name = "toolStripMenuItem4"; - this.toolStripMenuItem4.Size = new System.Drawing.Size(180, 22); + this.toolStripMenuItem4.Size = new System.Drawing.Size(101, 22); this.toolStripMenuItem4.Text = "&File"; // // toolStripMenuItem5 @@ -152,9 +154,16 @@ this.toolStripMenuItem11, this.toolStripMenuItem1}); this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(180, 22); + this.toolStripMenuItem3.Size = new System.Drawing.Size(101, 22); this.toolStripMenuItem3.Text = "&View"; // + // toolStripMenuItem12 + // + this.toolStripMenuItem12.Name = "toolStripMenuItem12"; + this.toolStripMenuItem12.Size = new System.Drawing.Size(222, 22); + this.toolStripMenuItem12.Text = "Enable &Big Icons (In Folders)"; + this.toolStripMenuItem12.Click += new System.EventHandler(this.toolStripMenuItem12_Click); + // // toolStripMenuItem11 // this.toolStripMenuItem11.Name = "toolStripMenuItem11"; @@ -174,7 +183,7 @@ this.toolStripMenuItem9.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.optionToolStripMenuItem}); this.toolStripMenuItem9.Name = "toolStripMenuItem9"; - this.toolStripMenuItem9.Size = new System.Drawing.Size(180, 22); + this.toolStripMenuItem9.Size = new System.Drawing.Size(101, 22); this.toolStripMenuItem9.Text = "&Tools"; // // optionToolStripMenuItem @@ -191,7 +200,7 @@ this.toolStripSeparator1, this.aboutToolStripMenuItem}); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - this.helpToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.helpToolStripMenuItem.Size = new System.Drawing.Size(101, 22); this.helpToolStripMenuItem.Text = "&Help"; // // viewHelpToolStripMenuItem @@ -213,21 +222,6 @@ this.aboutToolStripMenuItem.Text = "&About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.flowLayoutPanel1.AutoScroll = true; - this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flowLayoutPanel1.Location = new System.Drawing.Point(12, 58); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); - this.flowLayoutPanel1.Size = new System.Drawing.Size(620, 340); - this.flowLayoutPanel1.TabIndex = 27; - this.flowLayoutPanel1.WrapContents = false; - // // saveFileDialog1 // this.saveFileDialog1.Filter = "Session files|*.jsonfig"; @@ -260,21 +254,41 @@ this.exitToolStripMenuItem1.Text = "E&xit"; this.exitToolStripMenuItem1.Click += new System.EventHandler(this.exitToolStripMenuItem1_Click); // - // toolStripMenuItem12 + // panel1 // - this.toolStripMenuItem12.Name = "toolStripMenuItem12"; - this.toolStripMenuItem12.Size = new System.Drawing.Size(222, 22); - this.toolStripMenuItem12.Text = "Enable &Big Icons (In Folders)"; - this.toolStripMenuItem12.Click += new System.EventHandler(this.toolStripMenuItem12_Click); + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.AutoScroll = true; + this.panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.panel1.BackColor = System.Drawing.Color.Transparent; + this.panel1.Controls.Add(this.flowLayoutPanel1); + this.panel1.Location = new System.Drawing.Point(12, 34); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(620, 363); + this.panel1.TabIndex = 0; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent; + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 20); + this.flowLayoutPanel1.Size = new System.Drawing.Size(0, 30); + this.flowLayoutPanel1.TabIndex = 29; + this.flowLayoutPanel1.WrapContents = false; // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(254)))), ((int)(((byte)(254))))); + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250))))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(633, 400); - this.Controls.Add(this.flowLayoutPanel1); + this.Controls.Add(this.panel1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MinimumSize = new System.Drawing.Size(420, 280); this.Name = "MainForm"; @@ -282,12 +296,13 @@ this.TitleContextMenuStrip = this.contextMenuStrip1; this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip2.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; @@ -314,6 +329,8 @@ private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem11; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem12; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; } } diff --git a/MainForm.cs b/MainForm.cs index 4349ce5..7b76ac4 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -40,8 +40,10 @@ namespace AppLauncher this.StartPosition = FormStartPosition.WindowsDefaultBounds; - appIcon = Properties.Resources.app_icon_32; - enableMaximiseMenu = false; + appIcon = Properties.Resources.app_icon; + + enableMaximise = false; + //enableMaximiseMenu = false; closeOnMinimise = true; } @@ -139,7 +141,8 @@ namespace AppLauncher break; case WM_QUERYENDSESSION: requestExit = true; - this.Close(); + //this.Close(); + Application.Exit(); break; default: break; diff --git a/Models/TileModel.cs b/Models/TileModel.cs index 53f8dcf..ba7aa02 100644 --- a/Models/TileModel.cs +++ b/Models/TileModel.cs @@ -20,11 +20,81 @@ namespace AppLauncher.Models public override string ToString() => this.Title ?? string.Empty; - public string CleanProcessFilename => (string.IsNullOrWhiteSpace(this.ProcessFilename) ? string.Empty : Environment.ExpandEnvironmentVariables(this.ProcessFilename)); + public string CleanProcessFilename => (string.IsNullOrWhiteSpace(this.ProcessFilename) ? string.Empty : resolvePath(this.ProcessFilename)); - public string CleanProcessArgument => (string.IsNullOrWhiteSpace(this.ProcessArgument) ? string.Empty : Environment.ExpandEnvironmentVariables(this.ProcessArgument)); + public string CleanProcessArgument => (string.IsNullOrWhiteSpace(this.ProcessArgument) ? string.Empty : resolvePath(this.ProcessArgument)); - public string CleanProcessWorkingDirectory => (string.IsNullOrWhiteSpace(this.ProcessWorkingDirectory) ? string.Empty : Environment.ExpandEnvironmentVariables(this.ProcessWorkingDirectory)); + public string CleanProcessWorkingDirectory => (string.IsNullOrWhiteSpace(this.ProcessWorkingDirectory) ? string.Empty : resolvePath(this.ProcessWorkingDirectory)); + + protected string resolvePath(string value) + { + string rv = Environment.ExpandEnvironmentVariables(value); + + rv = resolveFirstPath(rv); + rv = resolveLastPath(rv); + + return rv; + } + + protected string resolveFirstPath(string value) + { + const string last = "%FIRST%"; + if (!value.Contains(last)) + { + return value; + } + + string head = value.Substring(0, value.IndexOf(last)); + string tail = value.Substring(value.IndexOf(last) + last.Length); + + string[] dirList = new string[0]; + + try + { + dirList = System.IO.Directory.GetDirectories(head, "*", System.IO.SearchOption.TopDirectoryOnly); + } + catch + { + // do nothing + } + + if (dirList.Length <= 0) + { + return value; + } + + return dirList[0] + tail; + } + + protected string resolveLastPath(string value) + { + const string last = "%LAST%"; + if (!value.Contains(last)) + { + return value; + } + + string head = value.Substring(0, value.IndexOf(last)); + string tail = value.Substring(value.IndexOf(last) + last.Length); + + string[] dirList = new string[0]; + + try + { + dirList = System.IO.Directory.GetDirectories(head, "*", System.IO.SearchOption.TopDirectoryOnly); + } + catch + { + // do nothing + } + + if (dirList.Length <= 0) + { + return value; + } + + return dirList[(dirList.Length - 1)] + tail; + } } } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 1ebeada..90bd94d 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -63,9 +63,9 @@ namespace AppLauncher.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap app_icon_32 { + internal static System.Drawing.Bitmap app_icon { get { - object obj = ResourceManager.GetObject("app_icon_32", resourceCulture); + object obj = ResourceManager.GetObject("app_icon", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 750ed54..dda20bf 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -118,8 +118,8 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\app_icon_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\app_icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\folder_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Resources/app_icon_24.png b/Resources/app_icon.png similarity index 100% rename from Resources/app_icon_24.png rename to Resources/app_icon.png