From 3e3d93f3c75bde47e9fa4c8ca26cfadbee1ae7f0 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 3 Oct 2021 18:43:59 +0100 Subject: [PATCH] Initial commit --- .gitignore | 2 + .vs/VideoPreview/DesignTimeBuild/.dtbcache.v2 | Bin 0 -> 76422 bytes .vs/VideoPreview/v16/.suo | Bin 0 -> 38912 bytes AppResource.Designer.cs | 73 ++ AppResource.resx | 124 +++ MainForm.Designer.cs | 289 +++++++ MainForm.cs | 411 +++++++++ MainForm.resx | 379 ++++++++ Models/AppSession.cs | 10 + OptionsForm.cs | 275 ++++++ OptionsForm.resx | 60 ++ Program.cs | 23 + Resources/UI/cog.png | Bin 0 -> 713 bytes Resources/UI/cog2.png | Bin 0 -> 467 bytes Resources/UI/file.png | Bin 0 -> 372 bytes Resources/UI/file2.png | Bin 0 -> 323 bytes Resources/loading-block.gif | Bin 0 -> 33840 bytes RyzStudio/Data/SQLite/SQLiteDatabase.cs | 444 ++++++++++ RyzStudio/Drawing/Rectangoid.cs | 124 +++ RyzStudio/IO/FileType.cs | 56 ++ RyzStudio/IO/SessionFileFormatBase.cs | 290 +++++++ RyzStudio/IO/SharpZipLib.cs | 241 ++++++ RyzStudio/IO/SmarterFileSystem.cs | 281 ++++++ RyzStudio/Net/HttpWeb.cs | 168 ++++ RyzStudio/Windows/Forms/StackLayoutPanel.cs | 69 ++ .../Forms/TCustomProgressBar.Designer.cs | 63 ++ RyzStudio/Windows/Forms/TCustomProgressBar.cs | 158 ++++ .../Windows/Forms/TCustomProgressBar.resx | 120 +++ RyzStudio/Windows/Forms/TFlatButton.cs | 115 +++ RyzStudio/Windows/Forms/TForm.cs | 434 ++++++++++ RyzStudio/Windows/Forms/TForm.resx | 424 +++++++++ .../Forms/THorizontalSeparator.Designer.cs | 37 + .../Windows/Forms/THorizontalSeparator.cs | 101 +++ .../Windows/Forms/THorizontalSeparator.resx | 120 +++ RyzStudio/Windows/Forms/TImageBox.cs | 84 ++ RyzStudio/Windows/Forms/TPanelBook.cs | 258 ++++++ RyzStudio/Windows/Forms/TUserControl.cs | 73 ++ RyzStudio/Windows/Forms/ThreadControl.cs | 815 ++++++++++++++++++ .../PickerBox/TNumericPickerBox.cs | 52 ++ .../ThemedForms/PickerBox/TPickerBox.cs | 98 +++ .../PickerBox/TPickerBox.designer.cs | 59 ++ .../ThemedForms/PickerBox/TPickerBox.resx | 120 +++ .../ThemedForms/PickerBox/TYesNoPickerBox.cs | 27 + RyzStudio/Windows/ThemedForms/TButton.cs | 183 ++++ .../Windows/ThemedForms/TButton.designer.cs | 62 ++ RyzStudio/Windows/ThemedForms/TButton.resx | 60 ++ .../ThemedForms/TDialogForm.Designer.cs | 47 + RyzStudio/Windows/ThemedForms/TDialogForm.cs | 117 +++ .../Windows/ThemedForms/TDialogForm.resx | 60 ++ RyzStudio/Windows/ThemedForms/TListBox.cs | 385 +++++++++ .../Windows/ThemedForms/TListBox.designer.cs | 358 ++++++++ RyzStudio/Windows/ThemedForms/TListBox.resx | 69 ++ RyzStudio/Windows/ThemedForms/TMemoBox.cs | 59 ++ .../Windows/ThemedForms/TMemoBox.designer.cs | 63 ++ RyzStudio/Windows/ThemedForms/TNumericBox.cs | 99 +++ .../ThemedForms/TNumericBox.designer.cs | 60 ++ .../Windows/ThemedForms/TNumericBox.resx | 60 ++ RyzStudio/Windows/ThemedForms/TProgressBar.cs | 50 ++ .../ThemedForms/TProgressBar.designer.cs | 65 ++ .../Windows/ThemedForms/TProgressBar.resx | 60 ++ RyzStudio/Windows/ThemedForms/TUserControl.cs | 106 +++ .../ThemedForms/TUserControl.designer.cs | 37 + .../ThemedForms/TextBox/TButtonTextBox.cs | 139 +++ .../TextBox/TButtonTextBox.designer.cs | 81 ++ .../ThemedForms/TextBox/TButtonTextBox.resx | 120 +++ .../ThemedForms/TextBox/TFolderTextBox.cs | 46 + .../ThemedForms/TextBox/TFolderTextBox.resx | 120 +++ .../ThemedForms/TextBox/TKeyCodeTextBox.cs | 96 +++ .../ThemedForms/TextBox/TOpenFileTextBox.cs | 48 ++ .../Windows/ThemedForms/TextBox/TTextBox.cs | 100 +++ .../ThemedForms/TextBox/TTextBox.designer.cs | 60 ++ .../Windows/ThemedForms/TextBox/TTextBox.resx | 120 +++ UIResource.Designer.cs | 103 +++ UIResource.resx | 133 +++ VideoPreview.csproj | 97 +++ VideoPreview.csproj.user | 50 ++ VideoPreview.sln | 25 + favicon.ico | Bin 0 -> 17542 bytes 78 files changed, 9815 insertions(+) create mode 100644 .gitignore create mode 100644 .vs/VideoPreview/DesignTimeBuild/.dtbcache.v2 create mode 100644 .vs/VideoPreview/v16/.suo create mode 100644 AppResource.Designer.cs create mode 100644 AppResource.resx create mode 100644 MainForm.Designer.cs create mode 100644 MainForm.cs create mode 100644 MainForm.resx create mode 100644 Models/AppSession.cs create mode 100644 OptionsForm.cs create mode 100644 OptionsForm.resx create mode 100644 Program.cs create mode 100644 Resources/UI/cog.png create mode 100644 Resources/UI/cog2.png create mode 100644 Resources/UI/file.png create mode 100644 Resources/UI/file2.png create mode 100644 Resources/loading-block.gif create mode 100644 RyzStudio/Data/SQLite/SQLiteDatabase.cs create mode 100644 RyzStudio/Drawing/Rectangoid.cs create mode 100644 RyzStudio/IO/FileType.cs create mode 100644 RyzStudio/IO/SessionFileFormatBase.cs create mode 100644 RyzStudio/IO/SharpZipLib.cs create mode 100644 RyzStudio/IO/SmarterFileSystem.cs create mode 100644 RyzStudio/Net/HttpWeb.cs create mode 100644 RyzStudio/Windows/Forms/StackLayoutPanel.cs create mode 100644 RyzStudio/Windows/Forms/TCustomProgressBar.Designer.cs create mode 100644 RyzStudio/Windows/Forms/TCustomProgressBar.cs create mode 100644 RyzStudio/Windows/Forms/TCustomProgressBar.resx create mode 100644 RyzStudio/Windows/Forms/TFlatButton.cs create mode 100644 RyzStudio/Windows/Forms/TForm.cs create mode 100644 RyzStudio/Windows/Forms/TForm.resx create mode 100644 RyzStudio/Windows/Forms/THorizontalSeparator.Designer.cs create mode 100644 RyzStudio/Windows/Forms/THorizontalSeparator.cs create mode 100644 RyzStudio/Windows/Forms/THorizontalSeparator.resx create mode 100644 RyzStudio/Windows/Forms/TImageBox.cs create mode 100644 RyzStudio/Windows/Forms/TPanelBook.cs create mode 100644 RyzStudio/Windows/Forms/TUserControl.cs create mode 100644 RyzStudio/Windows/Forms/ThreadControl.cs create mode 100644 RyzStudio/Windows/ThemedForms/PickerBox/TNumericPickerBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.resx create mode 100644 RyzStudio/Windows/ThemedForms/PickerBox/TYesNoPickerBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/TButton.cs create mode 100644 RyzStudio/Windows/ThemedForms/TButton.designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/TButton.resx create mode 100644 RyzStudio/Windows/ThemedForms/TDialogForm.Designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/TDialogForm.cs create mode 100644 RyzStudio/Windows/ThemedForms/TDialogForm.resx create mode 100644 RyzStudio/Windows/ThemedForms/TListBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/TListBox.designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/TListBox.resx create mode 100644 RyzStudio/Windows/ThemedForms/TMemoBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/TMemoBox.designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/TNumericBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/TNumericBox.designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/TNumericBox.resx create mode 100644 RyzStudio/Windows/ThemedForms/TProgressBar.cs create mode 100644 RyzStudio/Windows/ThemedForms/TProgressBar.designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/TProgressBar.resx create mode 100644 RyzStudio/Windows/ThemedForms/TUserControl.cs create mode 100644 RyzStudio/Windows/ThemedForms/TUserControl.designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.resx create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TFolderTextBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TFolderTextBox.resx create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TKeyCodeTextBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TOpenFileTextBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TTextBox.cs create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TTextBox.designer.cs create mode 100644 RyzStudio/Windows/ThemedForms/TextBox/TTextBox.resx create mode 100644 UIResource.Designer.cs create mode 100644 UIResource.resx create mode 100644 VideoPreview.csproj create mode 100644 VideoPreview.csproj.user create mode 100644 VideoPreview.sln create mode 100644 favicon.ico diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c7473d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/bin +/obj diff --git a/.vs/VideoPreview/DesignTimeBuild/.dtbcache.v2 b/.vs/VideoPreview/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000000000000000000000000000000000000..eaba7c57a4296fd102c1aa25da1e52c61e480cc4 GIT binary patch literal 76422 zcmd5_3w#_^xt}SIwv+?*F`Y9=qG@Zf1tt{=S^= z%=~xG_nr6iJFiYs6lI@IeXuxuPJ3o-W=HS9Im+S7ibg8gp(VEH9cHGW8JT>qmMa)q zs#7ay%I^KSqOR=Un={YU6NTkQW?0W6Wzmo}IDetGsI6_G*4C1kuN+K+E{IRBDHgKD z!it<(%qpj?S{xrX3Mp-H?iRyH=d`i-HY2Hpo1u@!2aQae=@HN9g|^tdxuZrV zX^!SOOrT=9Vy0lE^@N!jGKOPk=FN<91pCe|0J|Y*<eDBCyPqh#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NFM@6WeF=0U=*ys+Kwkmf z4EieQ7SPuw(SG8slU7+@p9F_Yv2L4$?KO1s47}DiCXs!t+b5CztZxEx$0Rs_e5(Zc KrVDc3dH)A#PU!3a literal 0 HcmV?d00001 diff --git a/.vs/VideoPreview/v16/.suo b/.vs/VideoPreview/v16/.suo new file mode 100644 index 0000000000000000000000000000000000000000..30cbbf757154a56af70175ceb98a3ec2f40bff94 GIT binary patch literal 38912 zcmeHQ3wTu3oxg(!Dk4~{q9}%lsE~=1Wb(uUlb3)AL=plnK|7hbNd_h}ab}Vb6BO&S z^-=4i;;Ra%b*omOS`qPqQmXY+yZh<3zN&m~cWsxi*3VV9yPvYZ-#z!t+|2XN3_-y; z^ZoC+_ndR@|2+Ta|2XH&?_WRmgAH3w+M`6dIm%(mSNo1s#u&mahI?hAqD;o~D8N_y z_U&U7<8hmF2T=_yQT+IYlsu(Q@xc!$18hpu?s(`uz#;88=OTW<1>_JRc4CPE#qKbK-={_;~(Yq@M?H z0IC5sfLcHupdN58U_M|0U?E^UAl`Ql_OJsv{_|$$#y`4Ic)sNQ*FFAa|CMw=jyr~P zOdkW703bb(xPfZyb}CY>bRWm@St{^h;&IsWB+ zZv4xd7#aU^)b$SlR{*XATm`rq@FT#rfFAj z%eDWvyZy=Wwky5hJIQ$lzzYT7JHd(_GPKt6huMvWKt=%M0GaV^vF%kgQ9OLWgUin1%6Pb<5MFK6bC z*6~~LI`d%WE1XL|93@iLg9EKoY>FM%8l_0FDkXR-0uO4%wFvc7qFe;|KuAf=$fpya zhS5|3|8zWYo-~V}b5(U-jUQDz=xIb6qW7XJ{^%kgK9{{!Z`Dd3QrJh@!)50i zZq!Vd))Jt9mP&k2U^j=K{e?0dUG)5$oBu_q(yKV@1TDT<2F0~rs4zX^?xJA z;rC}^{K>ML#ZTRd)W1fTpYt$jpIHrXCj1BIeo6n6&A+YSKg*PIT&ZD=?`ER>Wr(r? z%$9#U(jG>Jc|W;y>wiC?4S(if#@~k7c0jpA<9m8Fe$%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>RTKd;@ zTmS7(8~abY`PI!YoO9&FHE;db`Dedx+ww&+(gt zw=Bx7VVi(%nn<6uPj%ozcea}TZ)zTEGtSsnOSS_jyYp9tY+nr`D9#R*YnSA|7qp;f zQTi7t1VL0*KJwS6PbvFM{om_0w#>Rq{e17=H*T4=@X5dY`p&^i>sFkK?i405a(E^( zG^k<4{Rng(qZ~9V)sj<#WRy5jA8LPqRgz)3( zrlNPeUGt+O&iv@luXXm8dQRBWJ}`Rjqe~`loHF64IbUwOt<=6VUhm-PNU0dEcoT)D zHRlIC^D-QPd|9gcGwFfLUl;2C1cp{vlI}=KSEp+u%lHoxLCi+2;P1!{7HU`KG11vn z;}N$!YwJ_|O~}HQ^LW-@{~9Qig1yg4*BzTV+d0{}17gP;$H4IM&;`MZ+-dy1{oppxZg<5N9at;P9q$;_`BNmthOvP{!R$gca^lI&-A>|EN`2*Mix>$NgRWAH~?g zzCKI-Gd+DxHly*-JpVEJ{G)Wwe@t|AoH!wE}-;691NNdGS&i)_y$C#0!3tu<&Ie6{=Is2dam2)}!AJiEUn_$lV2Mtfo z{+FJ$GiU$P6il@K^RT&y`bmnuIs0E)w)OOEZaMp3(ycw2D9}^vRMLzb&|T1FtmNk( z0A{1)PnpM@{V!+#%Vrmq=-<4?TSb|(|8b&=uL%czpv#yv@a1esL(cw}+H#wn*4McH zfdAiPYK211{->=t%-R34>3gxZz1aVcicKT!Ts&1WXaAEHIw_vy?0>=vItIPtP_X~~ EKUvo|*Z=?k literal 0 HcmV?d00001 diff --git a/AppResource.Designer.cs b/AppResource.Designer.cs new file mode 100644 index 0000000..0f0121e --- /dev/null +++ b/AppResource.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace VideoPreview { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class AppResource { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AppResource() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VideoPreview.AppResource", typeof(AppResource).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap loading_block { + get { + object obj = ResourceManager.GetObject("loading_block", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/AppResource.resx b/AppResource.resx new file mode 100644 index 0000000..499f667 --- /dev/null +++ b/AppResource.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Resources\loading-block.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs new file mode 100644 index 0000000..097e825 --- /dev/null +++ b/MainForm.Designer.cs @@ -0,0 +1,289 @@ + +namespace VideoPreview +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.button1 = new RyzStudio.Windows.ThemedForms.TButton(); + this.tHorizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator(); + this.tHorizontalSeparator3 = new RyzStudio.Windows.Forms.THorizontalSeparator(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.textBox1 = new RyzStudio.Windows.ThemedForms.TOpenFileTextBox(); + this.button2 = new RyzStudio.Windows.ThemedForms.TButton(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(86, 35); + this.label1.TabIndex = 3; + this.label1.Text = "File Name"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.label1.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); + this.label1.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(111, 90); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(12, 15); + this.label2.TabIndex = 5; + this.label2.Text = "-"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.label2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); + this.label2.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver); + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.BackColor = System.Drawing.Color.Transparent; + this.button1.DefaultImage = null; + this.button1.DownImage = null; + this.button1.IsSelected = false; + this.button1.LabelText = "&Close"; + this.button1.Location = new System.Drawing.Point(296, 705); + this.button1.Margin = new System.Windows.Forms.Padding(10); + this.button1.Name = "button1"; + this.button1.OverImage = null; + this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.button1.Size = new System.Drawing.Size(149, 37); + this.button1.TabIndex = 8; + this.button1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.button1_MouseClick); + // + // tHorizontalSeparator1 + // + this.tHorizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tHorizontalSeparator1.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator1.BackColor = System.Drawing.Color.Transparent; + this.tHorizontalSeparator1.Location = new System.Drawing.Point(8, 105); + this.tHorizontalSeparator1.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0); + this.tHorizontalSeparator1.MaximumSize = new System.Drawing.Size(5760, 22); + this.tHorizontalSeparator1.MinimumSize = new System.Drawing.Size(0, 22); + this.tHorizontalSeparator1.Name = "tHorizontalSeparator1"; + this.tHorizontalSeparator1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10); + this.tHorizontalSeparator1.Size = new System.Drawing.Size(442, 22); + this.tHorizontalSeparator1.TabIndex = 9; + this.tHorizontalSeparator1.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); + this.tHorizontalSeparator1.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver); + // + // tHorizontalSeparator3 + // + this.tHorizontalSeparator3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tHorizontalSeparator3.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator3.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator3.BackColor = System.Drawing.Color.Transparent; + this.tHorizontalSeparator3.Location = new System.Drawing.Point(8, 673); + this.tHorizontalSeparator3.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0); + this.tHorizontalSeparator3.MaximumSize = new System.Drawing.Size(5760, 22); + this.tHorizontalSeparator3.MinimumSize = new System.Drawing.Size(0, 22); + this.tHorizontalSeparator3.Name = "tHorizontalSeparator3"; + this.tHorizontalSeparator3.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10); + this.tHorizontalSeparator3.Size = new System.Drawing.Size(442, 22); + this.tHorizontalSeparator3.TabIndex = 13; + // + // 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.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(12, 130); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(433, 540); + this.flowLayoutPanel1.TabIndex = 14; + this.flowLayoutPanel1.WrapContents = false; + this.flowLayoutPanel1.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); + this.flowLayoutPanel1.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver); + // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox1.ErrorImage = null; + this.pictureBox1.InitialImage = null; + this.pictureBox1.Location = new System.Drawing.Point(246, 705); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(37, 37); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.pictureBox1.TabIndex = 15; + this.pictureBox1.TabStop = false; + // + // textBox1 + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.BackColor = System.Drawing.Color.Transparent; + this.textBox1.FileDialog = null; + this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.textBox1.HighlightImage = ((System.Drawing.Image)(resources.GetObject("textBox1.HighlightImage"))); + this.textBox1.Location = new System.Drawing.Point(111, 9); + this.textBox1.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3); + this.textBox1.Name = "textBox1"; + this.textBox1.NormalImage = ((System.Drawing.Image)(resources.GetObject("textBox1.NormalImage"))); + this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9); + this.textBox1.Size = new System.Drawing.Size(341, 35); + this.textBox1.SubmitButton = null; + this.textBox1.TabIndex = 16; + this.textBox1.UseSystemPasswordChar = false; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button2.BackColor = System.Drawing.Color.Transparent; + this.button2.DefaultImage = null; + this.button2.DownImage = null; + this.button2.IsSelected = false; + this.button2.LabelText = ""; + this.button2.Location = new System.Drawing.Point(12, 705); + this.button2.Margin = new System.Windows.Forms.Padding(10); + this.button2.Name = "button2"; + this.button2.OverImage = null; + this.button2.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.button2.Size = new System.Drawing.Size(37, 37); + this.button2.TabIndex = 17; + this.toolTip1.SetToolTip(this.button2, "Options"); + this.button2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.button2_MouseClick); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(12, 90); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(53, 15); + this.label4.TabIndex = 18; + this.label4.Text = "Duration"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(12, 60); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(45, 15); + this.label3.TabIndex = 20; + this.label3.Text = "Format"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(111, 60); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(12, 15); + this.label5.TabIndex = 19; + this.label5.Text = "-"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(12, 75); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(63, 15); + this.label6.TabIndex = 22; + this.label6.Text = "Frame Size"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(111, 75); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(12, 15); + this.label7.TabIndex = 21; + this.label7.Text = "-"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MainForm + // + this.AllowDrop = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250))))); + this.ClientSize = new System.Drawing.Size(464, 761); + this.Controls.Add(this.label6); + this.Controls.Add(this.label7); + this.Controls.Add(this.label3); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + this.Controls.Add(this.button2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.flowLayoutPanel1); + this.Controls.Add(this.tHorizontalSeparator3); + this.Controls.Add(this.tHorizontalSeparator1); + this.Controls.Add(this.button1); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "MainForm"; + this.Text = "Video Preview"; + this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); + this.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private RyzStudio.Windows.ThemedForms.TButton button1; + private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator1; + private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator3; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.PictureBox pictureBox1; + private RyzStudio.Windows.ThemedForms.TOpenFileTextBox textBox1; + private RyzStudio.Windows.ThemedForms.TButton button2; + private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label7; + } +} + diff --git a/MainForm.cs b/MainForm.cs new file mode 100644 index 0000000..5549c14 --- /dev/null +++ b/MainForm.cs @@ -0,0 +1,411 @@ +using MediaToolkit; +using MediaToolkit.Model; +using MediaToolkit.Options; +using RyzStudio.Windows.Forms; +using System; +using System.Drawing; +using System.IO; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace VideoPreview +{ + public partial class MainForm : Form + { + protected readonly Random randy; + protected readonly string tempPath; + + protected OptionsForm optionsForm = null; + protected bool isBusy = false; + + protected string videoFilename = null; + protected TimeSpan videoDuration = TimeSpan.FromSeconds(0); + + + public MainForm() + { + InitializeComponent(); + + randy = new Random(); + tempPath = Application.StartupPath.TrimEnd('\\') + "\\"; + + textBox1.InnerTextBox.ReadOnly = true; + textBox1.InnerTextBox.BackColor = Color.White; + textBox1.InnerTextBox.TextChanged += textBox1_TextChanged; + + button2.DefaultImage = UIResource.cog2; + button2.DownImage = UIResource.cog; + button2.OverImage = UIResource.cog; + + } + + protected override void OnFormClosing(FormClosingEventArgs e) + { + if (this.IsBusy) + { + e.Cancel = true; + return; + } + + base.OnFormClosing(e); + } + + + public bool IsBusy + { + get => isBusy; + set + { + isBusy = value; + + ThreadControl.SetValue(pictureBox1, (isBusy ? AppResource.loading_block : null)); + ThreadControl.SetEnable(textBox1, !isBusy); + ThreadControl.SetEnable(button1, !isBusy); + ThreadControl.SetEnable(button2, !isBusy); + } + } + + + //private void button1_Click(object sender, EventArgs e) + //{ + // //string searchPattern = "*.avi|*.mp4|*.ogm|*.mkv"; + + // //string[] parts = searchPattern.Split(',', ';', '|'); + + + // //var inputFile = new MediaFile { Filename = videoFilename }; + // ////var outputFile = new MediaFile { Filename = @"N:\#\invincible.2021.s01e02.here.goes.nothing.720p.webrip.hevc.x265.mkv.jpg" }; + + // //using (var engine = new Engine()) + // //{ + // // engine.GetMetadata(inputFile); + + // // // Saves the frame located on the 15th second of the video. + // // var options = new ConversionOptions { Seek = TimeSpan.FromSeconds(150) }; + // // engine.GetThumbnail(inputFile, outputFile, options); + // //} + + + // //int i = 0; + + // //FFmpegLoader.FFmpegPath = @"L:\repos\WinFormsApp1\bin\Debug\net5.0-windows"; + + // //MediaFile file = MediaFile.Open(@"N:\#\invincible.2021.s01e03.who.you.calling.ugly.720p.webrip.hevc.x265.mkv"); + + // //FFMediaToolkit.Graphics.ImageData img; + // //if (file.Video.TryGetNextFrame(out img)) + // //{ + // // //img..ToBitmap() + // //} + + // //while (file.Video.TryGetNextFrame(out var imageData)) + // //{ + // // imageData.ToBitmap().Save($@"C:\images\frame_{i++}.png"); + // // // See the #Usage details for example .ToBitmap() implementation + // // // The .Save() method may be different depending on your graphics library + // //} + + // //MessageBox.Show("!"); + //} + + //private async void button2_Click(object sender, EventArgs e) + //{ + // //await Task.Run(() => + // //{ + // // if (string.IsNullOrWhiteSpace(textBox1.Text)) return; + // // if (!Directory.Exists(textBox1.Text)) return; + + // // ThreadControl.Clear(richTextBox1); + + // // //string[] extensionFilters = new string[] { ".avi", ".mp4", ".ogm", ".mkv" }; + + // // ThreadControl.SetText(textBox1, @"C:\Windows"); + + // // List fileList = RyzStudio.IO.SmarterFileSystem.GetFiles(textBox1.Text, "*.avi|*.mp4|*.ogm|*.mkv", SearchOption.AllDirectories); + + // // //string[] fileList = Directory.GetFiles(textBox1.Text, "*.avi|*.mp4|*.ogm|*.mkv", SearchOption.TopDirectoryOnly); + // // foreach (string item in fileList) + // // { + // // ThreadControl.AddLine(richTextBox1, item); + + + // // //if (IsMatchExtension(item, extensionFilters)) + // // //{ + // // // ThreadControl.AddLine(richTextBox1, item); + + // // //} + + + // // } + + + // // MessageBox.Show("!"); + + // //}); + //} + + //private bool IsMatchExtension(string filename, string[] extensionFilters) + //{ + // string ext = Path.GetExtension(filename)?.ToLower(); + + // foreach (var item in extensionFilters) + // { + // if (ext.Equals(item)) + // { + // return true; + // } + // } + + // return false; + //} + + + //private string[] Split(string lines) + //{ + // string[] rs = new string[0]; + + // foreach (string item in lines.Split(',', ';', '|')) + // { + // if (string.IsNullOrWhiteSpace(item)) + // { + // continue; + // } + + // Array.Resize(ref rs, (rs.Length + 1)); + // rs[(rs.Length - 1)] = item?.Trim(); + // } + + // return rs; + //} + + private void Form1_DragOver(object sender, DragEventArgs e) + { + e.Effect = (e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None); + } + + private async void Form1_DragDrop(object sender, DragEventArgs e) + { + string[] fileList = e.Data.GetData(DataFormats.FileDrop) as string[]; + if (fileList == null) + { + return; + } + + if (fileList.Length <= 0) + { + return; + } + + await ReadVideoFile(fileList[0]); + } + + private async void textBox1_TextChanged(object sender, EventArgs e) + { + await ReadVideoFile(textBox1.Text); + } + + + public AppSession CurrentSession { get; set; } = new AppSession(); + + + private void button1_MouseClick(object sender, MouseEventArgs e) + { + this.Close(); + } + + private void button2_MouseClick(object sender, MouseEventArgs e) + { + if (this.IsBusy) + { + return; + } + + if (optionsForm == null) optionsForm = new OptionsForm(this.CurrentSession); + if (optionsForm.ShowDialog() == DialogResult.OK) + { + this.CurrentSession = optionsForm.Session; + + this.TopMost = this.CurrentSession.AlwaysOnTop; + } + } + + + protected TimeSpan CalcRandomTimeSpan(TimeSpan duration) + { + int mm = randy.Next(0, (int)Math.Floor(duration.TotalMinutes)); + int ss = randy.Next(0, duration.Seconds); + + return new TimeSpan(0, mm, ss); + } + + protected void Clear() + { + videoFilename = null; + videoDuration = TimeSpan.FromSeconds(0); + + ThreadControl.SetText(textBox1.InnerTextBox, ""); + ThreadControl.SetText(label5, "-"); + ThreadControl.SetText(label7, "-"); + ThreadControl.SetText(label2, "-"); + ThreadControl.Clear(flowLayoutPanel1); + } + + protected Label CreateLabel(TimeSpan duration) + { + Label label = new Label(); + label.Padding = new Padding(0); + label.Margin = new Padding(0, 0, 0, 10); + label.Text = string.Format("{0}h {1}m {2}s", duration.Hours, duration.Minutes, duration.Seconds); + + return label; + } + + protected PictureBox CreatePictureBox(string filename, int width, int height) + { + PictureBox imageBox = new PictureBox() + { + BackColor = Color.White, + Margin = new Padding(0, 0, 0, 0), + Padding = new Padding(0), + SizeMode = PictureBoxSizeMode.Zoom, + Width = width, + Height = height, + }; + imageBox.Load(filename); + + return imageBox; + } + + protected void DeleteFile(string filename) + { + try + { + File.Delete(filename); + } + catch + { + // do nothing + } + } + + protected decimal ParseFrameSizeRatio(string videoSize) + { + if (string.IsNullOrWhiteSpace(videoSize)) + { + return 0; + } + + string[] parts = videoSize.Trim().Split("x"); + if (parts.Length != 2) + { + return 0; + } + + int w; + if (!int.TryParse(parts[0], out w)) + { + return 0; + } + + int h; + if (!int.TryParse(parts[1], out h)) + { + return 0; + } + + try + { + return decimal.Divide(w, h); + } + catch + { + return 0; + } + } + + protected async Task ReadVideoFile(string filename) + { + await Task.Run(() => + { + if (this.IsBusy) + { + return; + } + + this.IsBusy = true; + + Clear(); + + MediaFile inputFile = new MediaFile + { + Filename = filename + }; + + using (Engine engine = new Engine()) + { + try + { + engine.GetMetadata(inputFile); + } + catch (Exception exc) + { + MessageBox.Show(exc.Message); + + this.IsBusy = false; + return; + } + } + + videoFilename = filename; + videoDuration = inputFile.Metadata.Duration; + + ThreadControl.SetText(textBox1.InnerTextBox, Path.GetFileName(videoFilename)); + ThreadControl.SetText(label5, inputFile.Metadata.VideoData.Format ?? string.Empty); + ThreadControl.SetText(label7, (inputFile.Metadata.VideoData.FrameSize ?? string.Empty) + " @ " + inputFile.Metadata.VideoData.Fps.ToString() + "FPS"); + ThreadControl.SetText(label2, string.Format("{0}h {1}m {2}s", videoDuration.Hours, videoDuration.Minutes, videoDuration.Seconds)); + + // calculate frame dimensions ratio + decimal frameRatio = ParseFrameSizeRatio(inputFile.Metadata.VideoData.FrameSize); + if (frameRatio <= 0) + { + this.IsBusy = false; + return; + } + + int thumbnailWidth = flowLayoutPanel1.ClientSize.Width - flowLayoutPanel1.Padding.Horizontal - SystemInformation.VerticalScrollBarWidth; + int thumbnailHeight = (int)Math.Round(decimal.Divide((decimal)thumbnailWidth, frameRatio)); + + using (Engine engine = new Engine()) + { + for (int i = 0; i < this.CurrentSession.NoFrames; i++) + { + TimeSpan ts = CalcRandomTimeSpan(videoDuration); + + string saveFilename = tempPath + "temp-" + string.Format("{0}h-{1}m-{2}s", ts.Hours, ts.Minutes, ts.Seconds) + ".jpg"; + + ConversionOptions options = new ConversionOptions + { + Seek = ts, + CustomWidth = thumbnailWidth, + CustomHeight = thumbnailHeight + }; + engine.GetThumbnail(inputFile, new MediaFile { Filename = saveFilename }, options); + + PictureBox imageBox = CreatePictureBox(saveFilename, thumbnailWidth, thumbnailHeight); + ThreadControl.Add(flowLayoutPanel1, imageBox); + + Label label = CreateLabel(ts); + ThreadControl.Add(flowLayoutPanel1, label); + + // clean-up + DeleteFile(saveFilename); + } + } + + this.IsBusy = false; + }); + } + + + } +} diff --git a/MainForm.resx b/MainForm.resx new file mode 100644 index 0000000..a8edcae --- /dev/null +++ b/MainForm.resx @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + +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du7//Q7u//0O7v/9Du7/+htrf0TVNTqlVV + VQMAAAAAAAAAAAAAAAAAAAAAAAAAADk5ORJGS0tiXGNjuneAgN+htLT3yeXm/9Du7/+TpabvS09PmgAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAIQURET1FXV7BaYWLXSlFReAAA + AAAAAAAAAAAAAAAAAAAAAAAA+D+sQfAHrEHAAaxBgAGsQQABrEEAAaxBAACsQQAArEEAAKxBAACsQYAA + rEGAAKxBgAGsQYADrEHgD6xB/B+sQQ== + + + \ No newline at end of file diff --git a/Models/AppSession.cs b/Models/AppSession.cs new file mode 100644 index 0000000..0c33ad9 --- /dev/null +++ b/Models/AppSession.cs @@ -0,0 +1,10 @@ +namespace VideoPreview +{ + public class AppSession + { + public bool AlwaysOnTop { get; set; } = false; + + public int NoFrames { get; set; } = 3; + + } +} diff --git a/OptionsForm.cs b/OptionsForm.cs new file mode 100644 index 0000000..bdc988f --- /dev/null +++ b/OptionsForm.cs @@ -0,0 +1,275 @@ +using RyzStudio.Windows.ThemedForms; +using System; +using System.Windows.Forms; + +namespace VideoPreview +{ + public class OptionsForm : TDialogForm + { + private System.Windows.Forms.Label label1; + private TButton button1; + private TYesNoPickerBox pickerBox1; + private System.Windows.Forms.Label label6; + private TYesNoPickerBox pickerBox3; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator1; + private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator3; + private TTextBox textBox1; + private TNumericPickerBox pickerBox2; + private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator2; + + + public OptionsForm(AppSession session) : base() + { + InitializeComponent(); + + this.Session = session; + } + + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.button1 = new RyzStudio.Windows.ThemedForms.TButton(); + this.pickerBox1 = new RyzStudio.Windows.ThemedForms.TYesNoPickerBox(); + this.label6 = new System.Windows.Forms.Label(); + this.pickerBox3 = new RyzStudio.Windows.ThemedForms.TYesNoPickerBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.tHorizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator(); + this.tHorizontalSeparator2 = new RyzStudio.Windows.Forms.THorizontalSeparator(); + this.tHorizontalSeparator3 = new RyzStudio.Windows.Forms.THorizontalSeparator(); + this.textBox1 = new RyzStudio.Windows.ThemedForms.TTextBox(); + this.pickerBox2 = new RyzStudio.Windows.ThemedForms.TNumericPickerBox(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.BackColor = System.Drawing.Color.Transparent; + this.label1.ForeColor = System.Drawing.SystemColors.ControlText; + this.label1.Location = new System.Drawing.Point(10, 193); + this.label1.Margin = new System.Windows.Forms.Padding(0); + this.label1.Name = "label1"; + this.label1.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10); + this.label1.Size = new System.Drawing.Size(109, 34); + this.label1.TabIndex = 153; + this.label1.Text = "Custom Command"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.BackColor = System.Drawing.Color.Transparent; + this.button1.DefaultImage = null; + this.button1.DownImage = null; + this.button1.IsSelected = false; + this.button1.LabelText = "&Save"; + this.button1.Location = new System.Drawing.Point(241, 469); + this.button1.Margin = new System.Windows.Forms.Padding(10); + this.button1.Name = "button1"; + this.button1.OverImage = null; + this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.button1.Size = new System.Drawing.Size(128, 32); + this.button1.TabIndex = 173; + this.button1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.button1_MouseClick); + // + // pickerBox1 + // + this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pickerBox1.BackColor = System.Drawing.Color.Transparent; + this.pickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.pickerBox1.Location = new System.Drawing.Point(285, 21); + this.pickerBox1.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4); + this.pickerBox1.Name = "pickerBox1"; + this.pickerBox1.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5); + this.pickerBox1.Size = new System.Drawing.Size(84, 34); + this.pickerBox1.SubmitButton = null; + this.pickerBox1.TabIndex = 183; + this.pickerBox1.Value = true; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.BackColor = System.Drawing.Color.Transparent; + this.label6.ForeColor = System.Drawing.SystemColors.ControlText; + this.label6.Location = new System.Drawing.Point(10, 85); + this.label6.Margin = new System.Windows.Forms.Padding(0); + this.label6.Name = "label6"; + this.label6.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10); + this.label6.Size = new System.Drawing.Size(117, 34); + this.label6.TabIndex = 182; + this.label6.Text = "Generate No. Frames"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // pickerBox3 + // + this.pickerBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pickerBox3.BackColor = System.Drawing.Color.Transparent; + this.pickerBox3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.pickerBox3.Location = new System.Drawing.Point(285, 126); + this.pickerBox3.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4); + this.pickerBox3.Name = "pickerBox3"; + this.pickerBox3.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5); + this.pickerBox3.Size = new System.Drawing.Size(84, 34); + this.pickerBox3.SubmitButton = null; + this.pickerBox3.TabIndex = 185; + this.pickerBox3.Value = true; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.BackColor = System.Drawing.Color.Transparent; + this.label7.ForeColor = System.Drawing.SystemColors.ControlText; + this.label7.Location = new System.Drawing.Point(10, 126); + this.label7.Margin = new System.Windows.Forms.Padding(0); + this.label7.Name = "label7"; + this.label7.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10); + this.label7.Size = new System.Drawing.Size(89, 34); + this.label7.TabIndex = 184; + this.label7.Text = "Always-On-Top"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.BackColor = System.Drawing.Color.Transparent; + this.label8.ForeColor = System.Drawing.SystemColors.ControlText; + this.label8.Location = new System.Drawing.Point(10, 21); + this.label8.Margin = new System.Windows.Forms.Padding(0); + this.label8.Name = "label8"; + this.label8.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10); + this.label8.Size = new System.Drawing.Size(89, 34); + this.label8.TabIndex = 186; + this.label8.Text = "Always-On-Top"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // tHorizontalSeparator1 + // + this.tHorizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tHorizontalSeparator1.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator1.BackColor = System.Drawing.Color.Transparent; + this.tHorizontalSeparator1.Location = new System.Drawing.Point(10, 437); + this.tHorizontalSeparator1.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0); + this.tHorizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2); + this.tHorizontalSeparator1.MinimumSize = new System.Drawing.Size(0, 22); + this.tHorizontalSeparator1.Name = "tHorizontalSeparator1"; + this.tHorizontalSeparator1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10); + this.tHorizontalSeparator1.Size = new System.Drawing.Size(364, 22); + this.tHorizontalSeparator1.TabIndex = 188; + // + // tHorizontalSeparator2 + // + this.tHorizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tHorizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator2.BackColor = System.Drawing.Color.Transparent; + this.tHorizontalSeparator2.Location = new System.Drawing.Point(10, 59); + this.tHorizontalSeparator2.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0); + this.tHorizontalSeparator2.MaximumSize = new System.Drawing.Size(4920, 2); + this.tHorizontalSeparator2.MinimumSize = new System.Drawing.Size(0, 22); + this.tHorizontalSeparator2.Name = "tHorizontalSeparator2"; + this.tHorizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10); + this.tHorizontalSeparator2.Size = new System.Drawing.Size(364, 22); + this.tHorizontalSeparator2.TabIndex = 190; + // + // tHorizontalSeparator3 + // + this.tHorizontalSeparator3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tHorizontalSeparator3.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator3.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.tHorizontalSeparator3.BackColor = System.Drawing.Color.Transparent; + this.tHorizontalSeparator3.Location = new System.Drawing.Point(10, 164); + this.tHorizontalSeparator3.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0); + this.tHorizontalSeparator3.MaximumSize = new System.Drawing.Size(4920, 2); + this.tHorizontalSeparator3.MinimumSize = new System.Drawing.Size(0, 22); + this.tHorizontalSeparator3.Name = "tHorizontalSeparator3"; + this.tHorizontalSeparator3.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10); + this.tHorizontalSeparator3.Size = new System.Drawing.Size(364, 22); + this.tHorizontalSeparator3.TabIndex = 191; + // + // textBox1 + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBox1.BackColor = System.Drawing.Color.Transparent; + this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.textBox1.Location = new System.Drawing.Point(192, 192); + this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6); + this.textBox1.Name = "textBox1"; + this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9); + this.textBox1.Size = new System.Drawing.Size(177, 35); + this.textBox1.SubmitButton = null; + this.textBox1.TabIndex = 192; + this.textBox1.UseSystemPasswordChar = false; + // + // pickerBox2 + // + this.pickerBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pickerBox2.BackColor = System.Drawing.Color.Transparent; + this.pickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.pickerBox2.Location = new System.Drawing.Point(285, 85); + this.pickerBox2.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4); + this.pickerBox2.Name = "pickerBox2"; + this.pickerBox2.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5); + this.pickerBox2.Size = new System.Drawing.Size(84, 34); + this.pickerBox2.SubmitButton = null; + this.pickerBox2.TabIndex = 193; + this.pickerBox2.Value = 0; + // + // OptionsForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(384, 521); + this.Controls.Add(this.pickerBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.tHorizontalSeparator3); + this.Controls.Add(this.tHorizontalSeparator2); + this.Controls.Add(this.tHorizontalSeparator1); + this.Controls.Add(this.label8); + this.Controls.Add(this.pickerBox3); + this.Controls.Add(this.label7); + this.Controls.Add(this.pickerBox1); + this.Controls.Add(this.label6); + this.Controls.Add(this.button1); + this.Controls.Add(this.label1); + this.MinimumSize = new System.Drawing.Size(400, 560); + this.Name = "OptionsForm"; + this.Text = "Options"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + + this.DialogResult = System.Windows.Forms.DialogResult.None; + + pickerBox1.Value = this.Session.AlwaysOnTop; + pickerBox2.Clear(1, 20, this.Session.NoFrames); + } + + + public AppSession Session { get; protected set; } + + + private void button1_MouseClick(object sender, MouseEventArgs e) + { + if (this.Session == null) this.Session = new AppSession(); + + this.Session.AlwaysOnTop = pickerBox1.Value; + this.Session.NoFrames = pickerBox2.Value; + + this.DialogResult = DialogResult.OK; + this.Close(); + } + + } +} \ No newline at end of file diff --git a/OptionsForm.resx b/OptionsForm.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/OptionsForm.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..79d1084 --- /dev/null +++ b/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace VideoPreview +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.SetHighDpiMode(HighDpiMode.SystemAware); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/Resources/UI/cog.png b/Resources/UI/cog.png new file mode 100644 index 0000000000000000000000000000000000000000..7a63c8ff497a06e19075ce81b066f66cccff3621 GIT binary patch literal 713 zcmV;)0yh1LP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10#->x zK~y-6g_ALe+(j70e{c36f*7kDVrxYBf4hqi!B{B7GN?sj@WAH4$O$3@vVKU}^TD=CDTk-i=|cdmwRK6?BwcH*eGD+2P9H6$JZW2Voc4h?fs>N% z*uDguk#w}RwkK%|_!L+H4ggn%!{Mm~LC<>K_6eYqbQ1U?BF+KioZn6`#0c9 zYwfY|czk0CK+?~)@1~TNBjP-8{$Elr^i9tBJ>d3WFt`P<1kiQePomJGM^)M8r8sN9XA*^{(FD+uQp^lK1J> zeP*}T_U2YAAH}M@wTauoUv^IYSsn+^oYwhXL zXmkXi);gT84Qxb2=_CKz_7B71aCNcM?(Xivob#Q@Wb!WmQ>B!(obz9$lt&gZ&StY^ z;2=;ZlgS$?r4`#(BjN)|E~T8ceG2&8_IJR6*4i>~b74--c@uaUxGU+h?bVdhG26e| zF2F~UUbX!&uo)4rNc!hf*jCPYlv27C5jS(r71#xS2VRVbLpwV=56)(@L*w!I#vHe_ v$mw2$+xz6cDe0o^2W-DCsR4iVy{NwdQgAt!(CbpF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10bof) zK~y-6jnX|!mT?pY@So4pP`D-L(2$!whJz3^1hyqKnBO7$0F_8i`T^1*H^EV~!EaDY zV`fWBU|SJCfcJo*|=qi;4l8H-~IFR_h<0Qcb;-r)(R6ML%;a3kn5y=JY+ zJPvWK=~%_v+W#n)^V&80c1G;V1AN9AW@Ed9zX|>ry#iUx2wir*Vhi`3v$CATR^ASl z;%h0(UB_MvSCq}~`=6R7#g%l@ZPzx9gE;15Yp3lUh4VkS9pCfB?%`nt(!vTp)GD>p z_EIgGLg$)>^y65$fs15Dp?t8aOgYbfg^j1F@}f59oWjUFek*$$Xd-WBwo~OM&J<=w zVt=hHyMv7iyt(O7{KAiP^F_J3N4Sow`R-m~R1*pOj>o-%{sE_RS^{qBODF&U002ov JPDHLkV1n}Z*WUmD literal 0 HcmV?d00001 diff --git a/Resources/UI/file.png b/Resources/UI/file.png new file mode 100644 index 0000000000000000000000000000000000000000..d0c9e5830ade13c518f1a0a7fb5c4e4f20407e41 GIT binary patch literal 372 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1en1E;5pV~B-+@}K|z?GJx_eO>q8-{0o#jg5}n z9g>X_tOiC#_t=80Zr!@IUqOk7N1;}M!R*1StE;a!K12(Z}++-JXWeQ&xW63z>H+#w~#;bXZn+`j)9pFh|njA5wmragwuLSFoy^UXf z-QJ$R*||lK?E$O9ZJ!1+Yvz}S9d3O--Y>s=VUUaD2I&+{T?OdXq84umfFr?P-?xdad}WKNiL#_{XZGGItC Nc)I$ztaD0e0s!%Bg1i6# literal 0 HcmV?d00001 diff --git a/Resources/UI/file2.png b/Resources/UI/file2.png new file mode 100644 index 0000000000000000000000000000000000000000..f3e9f6d2179af7121d2314669151bada83185afe GIT binary patch literal 323 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1en@P?<0V~B_mzch1Gq$$e+;8eZOfUvhDuXxoI>Z<;4FSAKHgGum`mj9+JAe$xE~D$Gfb_Ufni z7#v^{&B$rov*qGpw%RufHG>j*wWC%%Y+_q<#CAgOdiK0!6}xON-0+;gM&xay`G2PQ zOt+G*wXB{cw|r8~q%TRk64!0sue^WDo$FTu|J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fr6HMuh#X;Dz9@-Zm&R?(E^Rqg z)|Ox1UQjLu0QonV@nn^W3roeE5;2!6E-4oCip8ZUz;LL9&z0~?q$qgOGX9w|L8qXi zQ&8C@5OtT=^pw|~EkAv(qVar1)A@?#^A#np#HE)huPY%!B`yjEj4j2QQiO;Q!Ph5tv)6KrcELu@N>O^;?|d z&>&PA+tuCry~7TdWx*8U&zjCnZYuHTR5{;#$uwKlJe0!;bP@+GIiELzq1o4=lcB%H zd{5?>hTQr*oBJQ%R^+J-y1US@Uk?`P9Cq{z^RoKe#@`Y}gl_pgMDMBfhP;Nn{xkbh zA+O)I%LV1VsgT!@*O1q 0); + } + + public bool DoQueryExist(string query, params string[] args) + { + string sql = SQLiteDatabase.PrepareQuery(query, args); + + return DoQueryExist(sql); + } + + public bool HasTable(string table_name) + { + lastError = string.Empty; + if (database == null) + { + return false; + } + + int rv = this.DoQueryCount("SELECT 1 FROM sqlite_master WHERE type='table' AND name='" + escapeSQL(table_name) + "'"); + + return (rv > 0); + } + + public bool CheckRequiredTables() + { + bool rv = true; + foreach (string tbl in requiredTableList) + { + if (string.IsNullOrEmpty(tbl)) + { + continue; + } + + if (!this.HasTable(tbl)) + { + rv = false; + break; + } + } + + return rv; + } + + + protected bool PrepareConfig() + { + if (HasTable(tableNameConfig)) + { + return true; + } + + bool rv = this.DoNonQuery(@" + BEGIN TRANSACTION; + CREATE TABLE " + tableNameConfig + @" (cfg_name TEXT, cfg_value TEXT); + COMMIT; + "); + + return rv; + } + + public bool SetConfig(string name, string value) + { + if (!PrepareConfig()) + { + return false; + } + + string sql = string.Empty; + int rv = this.DoQueryCount("SELECT 1 FROM " + tableNameConfig + " WHERE cfg_name='" + escapeSQL(name) + "'"); + if (rv <= 0) + { + sql = "INSERT INTO " + tableNameConfig + " (cfg_name, cfg_value) VALUES ('[^1]', '[^2]');"; + } + else + { + sql = "UPDATE " + tableNameConfig + " SET cfg_value='[^2]' WHERE cfg_name='[^1]';"; + } + + sql = PrepareQuery(sql, new string[] { name, value }); + + return this.DoNonQuery(sql); + } + + public string GetConfig(string name, string default_value = "") + { + if (!PrepareConfig()) + { + return default_value; + } + + bool rv = this.DoQueryExist("SELECT 1 FROM " + tableNameConfig + " WHERE cfg_name='" + escapeSQL(name) + "'"); + if (!rv) + { + return default_value; + } + + return this.DoQuerySingle("SELECT cfg_value FROM " + tableNameConfig + " WHERE cfg_name='" + escapeSQL(name) + "'"); + } + + #endregion + + protected virtual bool Prepare() + { + return true; + } + } +} \ No newline at end of file diff --git a/RyzStudio/Drawing/Rectangoid.cs b/RyzStudio/Drawing/Rectangoid.cs new file mode 100644 index 0000000..59a24d8 --- /dev/null +++ b/RyzStudio/Drawing/Rectangoid.cs @@ -0,0 +1,124 @@ +using System.Drawing; +using System.Drawing.Drawing2D; + +namespace RyzStudio.Drawing +{ + public struct Rectangoid + { + private int X; + private int Y; + private int Width; + private int Height; + private int Radius; + + public Rectangoid(Rectangle rect, int radius) + { + X = rect.X; + Y = rect.Y; + Width = rect.Width; + Height = rect.Height; + Radius = radius; + } + + public Rectangoid(Rectangle rect, int radius, int borderWidth) + { + rect.Inflate((-1 * borderWidth), (-1 * borderWidth)); + + X = rect.X; + Y = rect.Y; + Width = rect.Width; + Height = rect.Height; + Radius = radius; + } + + public Rectangoid(int x, int y, int width, int height, int radius) + { + X = x; + Y = y; + Width = width; + Height = height; + Radius = radius; + } + + public Rectangoid(int x, int y, int width, int height) + { + X = x; + Y = y; + Width = width; + Height = height; + Radius = 0; + } + + public Rectangoid(int width, int height, int radius) + { + X = 0; + Y = 0; + Width = width; + Height = height; + Radius = radius; + } + + public Rectangoid(int width, int height) + { + X = 0; + Y = 0; + Width = width; + Height = height; + Radius = 0; + } + + public Rectangoid(int width) + { + X = 0; + Y = 0; + Width = width; + Height = width; + Radius = 0; + } + + public GraphicsPath ToGraphicsPath() + { + GraphicsPath rv = new GraphicsPath(); + rv.AddLine(X + this.Radius, Y, X + Width - (this.Radius * 2), Y); + + if (this.Radius > 0) + { + rv.AddArc(X + Width - (this.Radius * 2), Y, this.Radius * 2, this.Radius * 2, 270, 90); + } + + rv.AddLine(X + Width, Y + this.Radius, X + Width, Y + Height - (this.Radius * 2)); + + if (this.Radius > 0) + { + rv.AddArc(X + Width - (this.Radius * 2), Y + Height - (this.Radius * 2), this.Radius * 2, this.Radius * 2, 0, 90); + } + + rv.AddLine(X + Width - (this.Radius * 2), Y + Height, X + this.Radius, Y + Height); + + if (this.Radius > 0) + { + rv.AddArc(X, Y + Height - (this.Radius * 2), this.Radius * 2, this.Radius * 2, 90, 90); + } + + rv.AddLine(X, Y + Height - (this.Radius * 2), X, Y + this.Radius); + + if (this.Radius > 0) + { + rv.AddArc(X, Y, this.Radius * 2, this.Radius * 2, 180, 90); + } + + rv.CloseFigure(); + + return rv; + } + + public PointF GetOrigin() + { + PointF rv = new PointF(); + rv.X = ((float)Width / 2) + X; + rv.Y = ((float)Height / 2) + Y; + + return rv; + } + } +} \ No newline at end of file diff --git a/RyzStudio/IO/FileType.cs b/RyzStudio/IO/FileType.cs new file mode 100644 index 0000000..3c8b616 --- /dev/null +++ b/RyzStudio/IO/FileType.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace RyzStudio.IO +{ + public class FileType + { + protected static readonly byte[] BMP = { 66, 77 }; + protected static readonly byte[] GIF = { 71, 73, 70, 56 }; + protected static readonly byte[] ICO = { 0, 0, 1, 0 }; + protected static readonly byte[] JPG = { 255, 216, 255 }; + protected static readonly byte[] PNG = { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82 }; + + public static bool IsImage(byte[] byteArray) + { + if (byteArray == null) + { + return false; + } + + if (byteArray.Length <= 0) + { + return false; + } + + if (byteArray.Take(2).SequenceEqual(BMP)) + { + return true; + } + + if (byteArray.Take(4).SequenceEqual(GIF)) + { + return true; + } + + if (byteArray.Take(4).SequenceEqual(ICO)) + { + return true; + } + + if (byteArray.Take(3).SequenceEqual(JPG)) + { + return true; + } + + if (byteArray.Take(16).SequenceEqual(PNG)) + { + return true; + } + + return false; + } + } +} diff --git a/RyzStudio/IO/SessionFileFormatBase.cs b/RyzStudio/IO/SessionFileFormatBase.cs new file mode 100644 index 0000000..3ae2887 --- /dev/null +++ b/RyzStudio/IO/SessionFileFormatBase.cs @@ -0,0 +1,290 @@ +using System; +using System.IO; +using System.Text; +using System.Xml; +using System.Windows.Forms; +using ICSharpCode.SharpZipLib.Zip; + +namespace RyzStudio.IO +{ + public abstract class SessionFileFormatBase + { + protected string CONST_KEYPASS = ""; + protected string CONST_PRODUCT = ""; + protected string CONST_STREAM_FILE_NAME = ""; + + protected bool enableErrorReporting = false; + protected string lastUsedFileName = ""; + + #region public properties + + public string passkey + { + get { return CONST_KEYPASS; } + set { CONST_KEYPASS = value; } + } + + /*public string LastFilename + { + get { return lastUsedFileName; } + set { lastUsedFileName = value; } + }*/ + + #endregion + + #region public methods + +/* public bool loadFromRyz() + { + return loadFromRyz(lastUsedFileName); + }*/ + + public bool loadFromRyz(string file_name) + { + lastUsedFileName = file_name; + if (!File.Exists(file_name)) + { + return false; + } + + bool rv = false; + + try + { + ZipInputStream zipIn = new ZipInputStream(File.OpenRead(file_name)); + zipIn.Password = CONST_KEYPASS; + ZipEntry theEntry = null; + + while ((theEntry = zipIn.GetNextEntry()) != null) + { + string streamFileName = Path.GetFileName(theEntry.Name); + if (streamFileName.Equals(CONST_STREAM_FILE_NAME)) + { + MemoryStream oxStream = new MemoryStream(); + StreamWriter streamWriter = new StreamWriter(oxStream); + int size = 2048; + byte[] data = new byte[size]; + while (true) + { + size = zipIn.Read(data, 0, data.Length); + if (size <= 0) break; + streamWriter.BaseStream.Write(data, 0, size); + } + + oxStream.Position = 0; + + StreamReader sr2 = new StreamReader(oxStream, Encoding.UTF8); + XmlDocument xDoc = new XmlDocument(); + xDoc.LoadXml(sr2.ReadToEnd()); + + loadFromXmlDocument(ref xDoc); + } + } + + zipIn.Close(); + + rv = true; + } + catch (Exception exc) + { + if (enableErrorReporting) + { + MessageBox.Show(exc.Message); + } + } + + return rv; + } + + public bool loadFromXml() + { + return loadFromXml(lastUsedFileName); + } + + public bool loadFromXml(string file_name) + { + lastUsedFileName = file_name; + if (!File.Exists(file_name)) + { + return false; + } + + bool rv = false; + + try + { + StreamReader sr2 = new StreamReader(file_name, Encoding.UTF8); + XmlDocument xDoc = new XmlDocument(); + xDoc.LoadXml(sr2.ReadToEnd()); + + loadFromXmlDocument(ref xDoc); + sr2.Close(); + + rv = true; + } + catch (Exception exc) + { + if (enableErrorReporting) + { + MessageBox.Show(exc.Message); + } + } + + return rv; + } + +/* public bool saveToRyz() + { + return saveToRyz(lastUsedFileName); + } +*/ + + public bool saveToRyz(string file_name) + { + bool rv = false; + lastUsedFileName = file_name; + byte[] buffer = new byte[4096]; + + try + { + File.Delete(file_name); + FileInfo fileinfo1 = new FileInfo(file_name); + if (!Directory.Exists(fileinfo1.DirectoryName)) + { + Directory.CreateDirectory(fileinfo1.DirectoryName); + } + } + catch (Exception exc) + { + if (enableErrorReporting) + { + MessageBox.Show(exc.Message); + } + } + + try + { + ZipOutputStream zipOutStream1 = new ZipOutputStream(File.Create(file_name)); + zipOutStream1.SetLevel(9); + zipOutStream1.Password = CONST_KEYPASS; + + MemoryStream oxIndexStream = new MemoryStream(); + XmlTextWriter oxTW = new XmlTextWriter(oxIndexStream, Encoding.UTF8); + saveToXmlTextWriter(ref oxTW); + oxTW.Flush(); + + // write to file + zipOutStream1.PutNextEntry(new ZipEntry(CONST_STREAM_FILE_NAME)); + oxIndexStream.Position = 0; + StreamReader sr2 = new StreamReader(oxIndexStream, Encoding.UTF8); + int sourceBytes; + do + { + sourceBytes = sr2.BaseStream.Read(buffer, 0, buffer.Length); + zipOutStream1.Write(buffer, 0, sourceBytes); + } + while (sourceBytes > 0); + + sr2.Close(); + oxTW.Close(); + zipOutStream1.Finish(); + zipOutStream1.Close(); + + rv = true; + } + catch (Exception exc) + { + if (enableErrorReporting) + { + MessageBox.Show(exc.Message); + } + } + + return rv; + } + + public bool saveToXml() + { + return saveToXml(lastUsedFileName); + } + + public bool saveToXml(string file_name) + { + bool rv = false; + + lastUsedFileName = file_name; + try + { + File.Delete(file_name); + FileInfo fileinfo1 = new FileInfo(file_name); + if (!Directory.Exists(fileinfo1.DirectoryName)) + { + Directory.CreateDirectory(fileinfo1.DirectoryName); + } + } + catch (Exception exc) + { + if (enableErrorReporting) + { + MessageBox.Show(exc.Message); + } + } + + try + { + XmlTextWriter oxTW = new XmlTextWriter(file_name, Encoding.UTF8); + saveToXmlTextWriter(ref oxTW); + oxTW.Flush(); + oxTW.Close(); + + rv = true; + } + catch (Exception exc) + { + if (enableErrorReporting) + { + MessageBox.Show(exc.Message); + } + } + + return rv; + } + + #endregion + + protected virtual void loadFromXmlDocument(ref XmlDocument xml_doc) { } + protected virtual void saveToXmlTextWriter(ref XmlTextWriter writer) { } + + #region public methods (conversions) + + public int[] convIntArrayString(string s1, char c) + { + string[] sarr = s1.Split(c); + int[] iarr = new int[sarr.Length]; + for (int i = 0; i < sarr.Length; i++) + { + iarr[i] = Int32.Parse(sarr[i]); + } + + return iarr; + } + + public string convStringIntArray(int[] r, char s) + { + string t = null; + for (int i = 0; i < r.Length; i++) + { + if (i != 0) + { + t += s.ToString(); + } + + t += r[i].ToString(); + } + + return t; + } + +#endregion + } +} \ No newline at end of file diff --git a/RyzStudio/IO/SharpZipLib.cs b/RyzStudio/IO/SharpZipLib.cs new file mode 100644 index 0000000..33729b8 --- /dev/null +++ b/RyzStudio/IO/SharpZipLib.cs @@ -0,0 +1,241 @@ +using System; +using System.IO; +using ICSharpCode.SharpZipLib.Zip; + +namespace RyzStudio.IO +{ + public class SharpZipLib + { + + + public static bool IsZipEncrypted(string filename) + { + bool rv = false; + + try + { + ZipInputStream readStream = new ZipInputStream(System.IO.File.OpenRead(filename)); + + ZipEntry theEntry = null; + while ((theEntry = readStream.GetNextEntry()) != null) + { + if (theEntry.IsCrypted) + { + rv = true; + } + + break; + } + + readStream.Close(); + readStream.Dispose(); + readStream = null; + } + catch + { + // do nothing + } + + return rv; + } + + //public static void AddFile(ZipOutputStream zipStream, string filename, string prefixPath = null) + //{ + // byte[] buffer = new byte[4096]; + + // string f1 = ""; + // if (prefixPath != null) + // { + // f1 = Path.GetDirectoryName(filename).TrimEnd('\\') + "\\"; + // f1 = f1.Replace(prefixPath, "").TrimEnd('\\') + "\\"; + // f1 = f1 + Path.GetFileName(filename); + // f1 = f1.TrimStart('\\'); + // } + + // ZipEntry entry = new ZipEntry(f1); + // entry.DateTime = DateTime.Now; + + // zipStream.PutNextEntry(entry); + + // FileStream fs = File.OpenRead(filename); + + // int sourceBytes; + + // do + // { + // sourceBytes = fs.Read(buffer, 0, buffer.Length); + // zipStream.Write(buffer, 0, sourceBytes); + // } + // while (sourceBytes > 0); + //} + + //public static void AddFolder(ZipOutputStream zipstream, string folderpath, string prefixpath = null) + //{ + // foreach (string fn in Directory.GetFiles(folderpath, "*.*", System.IO.SearchOption.AllDirectories)) + // { + // AddFile(zipstream, fn, prefixpath); + // } + //} + + public static string ReadSingle(string filename, string password, string entryFilename) + { + string rv = null; + + int size = 2048; + byte[] buffer = new byte[size]; + int bufferSize = 0; + + ZipEntry readEntry = null; + + try + { + ZipInputStream readStream = new ZipInputStream(File.OpenRead(filename)); + readStream.Password = password; + + while (true) + { + readEntry = readStream.GetNextEntry(); + if (readEntry == null) + { + break; + } + + if (string.IsNullOrWhiteSpace(readEntry.Name)) + { + continue; + } + + if (!readEntry.IsFile) + { + continue; + } + + if (!readEntry.Name.Equals(entryFilename)) + { + continue; + } + + MemoryStream ms = new MemoryStream(); + buffer = new byte[size]; + bufferSize = 0; + + do + { + bufferSize = readStream.Read(buffer, 0, buffer.Length); + ms.Write(buffer, 0, bufferSize); + } + while (bufferSize > 0); + + ms.Position = 0; + + StreamReader sr = new StreamReader(ms); + rv = sr.ReadToEnd(); + + break; + } + + readStream.Flush(); + readStream.Close(); + readStream.Dispose(); + readStream = null; + } + catch (Exception) + { + return rv; + } + + return rv; + } + + public static bool TestArchive(string filename, string password = null) + { + if (string.IsNullOrWhiteSpace(filename)) + { + return false; + } + + if (!File.Exists(filename)) + { + return false; + } + + ZipEntry readEntry = null; + + try + { + ZipInputStream readStream = new ZipInputStream(System.IO.File.OpenRead(filename)); + readStream.Password = password; + + while (true) + { + readEntry = readStream.GetNextEntry(); + if (readEntry == null) + { + break; + } + + //break; + } + + readStream.Close(); + readStream.Dispose(); + readStream = null; + } + catch (Exception) + { + return false; + } + + return true; + } + + public static bool CreateSingle(string filename, string password, string entryFilename, string content) + { + int size = 2048; + byte[] buffer = new byte[size]; + int bufferSize = 0; + + try + { + ZipOutputStream zipStream = new ZipOutputStream(File.Create(filename)); + zipStream.SetLevel(9); + zipStream.Password = password; + + // stream + MemoryStream ms = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(content)); + ms.Position = 0; + + // write file entry + zipStream.PutNextEntry(new ZipEntry(entryFilename)); + + buffer = new byte[size]; + bufferSize = 0; + + do + { + bufferSize = ms.Read(buffer, 0, buffer.Length); + zipStream.Write(buffer, 0, bufferSize); + } + while (bufferSize > 0); + + ms.Flush(); + ms.Close(); + ms.Dispose(); + ms = null; + + zipStream.Finish(); + zipStream.Flush(); + zipStream.Close(); + zipStream.Dispose(); + zipStream = null; + } + catch (Exception) + { + return false; + } + + return true; + } + + } +} \ No newline at end of file diff --git a/RyzStudio/IO/SmarterFileSystem.cs b/RyzStudio/IO/SmarterFileSystem.cs new file mode 100644 index 0000000..9a04fb1 --- /dev/null +++ b/RyzStudio/IO/SmarterFileSystem.cs @@ -0,0 +1,281 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace RyzStudio.IO +{ + public class SmarterFileSystem + { + public static List GetFiles(string path, string pattern, System.IO.SearchOption searchOption) + { + List fileList = new List(); + List directoryList = new List(); + + directoryList.Add(path); + + while (true) + { + if (directoryList.Count <= 0) + { + break; + } + + string directory = directoryList.First(); + directoryList.RemoveAt(0); + + if (!IsDirectoryAccessible(directory)) + { + continue; + } + + IEnumerable dirList = Enumerable.Empty(); + + try + { + dirList = Directory.EnumerateDirectories(directory, "*", SearchOption.TopDirectoryOnly); + } + catch + { + continue; + } + + foreach (string item in dirList) + { + //if (!IsDirectoryAccessible(item)) + //{ + // continue; + //} + + directoryList.Add(item); + } + + foreach (string item in Directory.EnumerateFiles(directory, "*", SearchOption.TopDirectoryOnly)) + { + if (!IsFileAccessible(item)) + { + continue; + } + + fileList.Add(item); + } + } + + return fileList; + } + + //public static List GetFiles(string path, string searchPattern, System.IO.SearchOption searchOption) + //{ + // List rs = new List(); + + // if (string.IsNullOrWhiteSpace(path)) return rs; + // if (!System.IO.Directory.Exists(path)) return rs; + + // IEnumerable fileList = Enumerable.Empty(); + + + // //if (!IsDirectoryAccessible(path)) + // //{ + // // return rs; + // //} + + // try + // { + // fileList = Directory.EnumerateFiles(path, "*", SearchOption.TopDirectoryOnly); + // } + // catch + // { + // return rs; + // } + + // foreach (string item in fileList) + // { + // if (!IsFileAccessible(item)) + // { + // continue; + // } + + // rs.Add(item); + // } + + // if (searchOption == SearchOption.AllDirectories) + // { + // foreach (string item in Directory.EnumerateDirectories(path, "*", SearchOption.TopDirectoryOnly)) + // { + // //if (!IsDirectoryAccessible(item)) + // //{ + // // continue; + // //} + + // rs.AddRange(GetFiles(item, searchPattern, searchOption)); + // } + // } + + // return rs; + //} + + + //public static string CleanFilename(string value, string defaultValue = "") + //{ + // if (string.IsNullOrWhiteSpace(value)) + // { + // return defaultValue; + // } + // else + // { + // return string.Join("-", value.Replace(".", "-").Split(Path.GetInvalidFileNameChars())); + // } + //} + + //public static List GetFiles(string path, string pattern) + //{ + // List fileList = new List(); + // List directoryList = new List(); + + // directoryList.Add(path); + + // while (true) + // { + // if (directoryList.Count <= 0) + // { + // break; + // } + + // string directory = directoryList.First(); + // directoryList.RemoveAt(0); + + // if (!IsDirectoryAccessible(directory)) + // { + // continue; + // } + + // foreach (string item in Directory.EnumerateDirectories(directory, "*", SearchOption.TopDirectoryOnly)) + // { + // if (!IsDirectoryAccessible(item)) + // { + // continue; + // } + + // directoryList.Add(item); + // } + + // foreach (string item in Directory.EnumerateFiles(directory, pattern, SearchOption.TopDirectoryOnly)) + // { + // if (!IsFileAccessible(item)) + // { + // continue; + // } + + // fileList.Add(item); + // } + // } + + // return fileList; + //} + + public static bool IsFileAccessible(string filename) + { + if (string.IsNullOrWhiteSpace(filename)) return false; + if (!System.IO.File.Exists(filename)) return false; + + try + { + System.IO.File.GetAttributes(filename); + } + catch + { + return false; + } + + return true; + } + + public static bool IsDirectoryAccessible(string path) + { + if (string.IsNullOrWhiteSpace(path)) return false; + if (!System.IO.Directory.Exists(path)) return false; + + //try + //{ + // System.IO.Directory.GetCreationTime(path); + //} + //catch + //{ + // return false; + //} + + return true; + } + + //public static string ResolvePath(string value) + //{ + // string rv = Environment.ExpandEnvironmentVariables(value); + + // rv = resolveFirstPath(rv); + // rv = resolveLastPath(rv); + + // return rv; + //} + + //protected static 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 static 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/RyzStudio/Net/HttpWeb.cs b/RyzStudio/Net/HttpWeb.cs new file mode 100644 index 0000000..bafff2e --- /dev/null +++ b/RyzStudio/Net/HttpWeb.cs @@ -0,0 +1,168 @@ +using System; +using System.IO; +using System.Net; +using System.Text; +using System.Windows.Forms; + +namespace RyzStudio.Net +{ + public class HttpWeb + { + public string defaultUserAgent = "Momozilla/5.0 (" + Environment.OSVersion.Platform.ToString() + " ; " + Environment.OSVersion.VersionString + "; " + Application.CurrentCulture.TwoLetterISOLanguageName + ")"; + public int defaultTimeout = 6000; + public int defaultMaxRedirect = 8; + public bool defaultAllowRedirect = true; + public CookieContainer defaultCookierContainer = null; + + public HttpWeb() + { + } + + public HttpWebRequest CreateRequest(string url) + { + return this.CreateRequest(url, url); + } + + public HttpWebRequest CreateRequest(string url, string referrerURL) + { + if (defaultCookierContainer == null) + { + defaultCookierContainer = new CookieContainer(); + } + + HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); + webRequest.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore); + webRequest.MaximumAutomaticRedirections = defaultMaxRedirect; + webRequest.CookieContainer = defaultCookierContainer; + webRequest.UserAgent = defaultUserAgent; + webRequest.AllowAutoRedirect = defaultAllowRedirect; + webRequest.Timeout = defaultTimeout; + + return webRequest; + } + + public int GetResponse(out string sourceCode, string url, string referrerURL = "") + { + HttpWebRequest webRequest = this.CreateRequest(url, referrerURL); + + return GetResponse(out sourceCode, webRequest); + } + + public int GetResponse(out string sourceCode, HttpWebRequest webRequest) + { + sourceCode = string.Empty; + + int rv = 0; + + try + { + HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse(); + + rv = (int)webResponse.StatusCode; + + StreamReader readContent = new StreamReader(webResponse.GetResponseStream()); + sourceCode = readContent.ReadToEnd(); + + webResponse.Close(); + webResponse = null; + } + catch (WebException xc) + { + if (xc.Response is HttpWebResponse) + { + HttpWebResponse rs = xc.Response as HttpWebResponse; + StreamReader readContent = new StreamReader(rs.GetResponseStream()); + if (readContent != null) + { + sourceCode = readContent.ReadToEnd(); + } + + rv = (int)rs.StatusCode; + } + else + { + rv = (int)xc.Status; + sourceCode = xc.Message; + } + } + catch (Exception xc) + { + sourceCode = xc.Message; + } + + return rv; + } + + public static HttpWebRequest AddBasicAuthentication(HttpWebRequest webRequest, string username, string password) + { + webRequest.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.Default.GetBytes(string.Concat(username, ":", password))); + webRequest.PreAuthenticate = true; + + return webRequest; + } + + + public int GetPOSTResponse(out string sourceCode, HttpWebRequest webRequest, string postData) + { + sourceCode = ""; + int rv = 0; + byte[] buffer = Encoding.UTF8.GetBytes(postData); + + webRequest.ContentLength = buffer.Length; + + try + { + Stream dataStream = webRequest.GetRequestStream(); + dataStream.Write(buffer, 0, buffer.Length); + dataStream.Close(); + } + catch (Exception xc) + { + sourceCode = xc.Message; + return rv; + } + + return this.GetResponse(out sourceCode, webRequest); + } + + public int GetHeader(out WebHeaderCollection headerCollection, string url, string referrerURL = "") + { + headerCollection = null; + + int rv = 0; + + HttpWebRequest webRequest = this.CreateRequest(url, referrerURL); + webRequest.Method = "HEAD"; + + try + { + HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse(); + headerCollection = webResponse.Headers; + + rv = (int)webResponse.StatusCode; + + webResponse.Close(); + webResponse = null; + } + catch (WebException xc) + { + if (xc.Response is HttpWebResponse) + { + HttpWebResponse rs = xc.Response as HttpWebResponse; + + rv = (int)rs.StatusCode; + } + else + { + rv = (int)xc.Status; + } + } + catch + { + // do nothing + } + + return rv; + } + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/Forms/StackLayoutPanel.cs b/RyzStudio/Windows/Forms/StackLayoutPanel.cs new file mode 100644 index 0000000..8cdeae5 --- /dev/null +++ b/RyzStudio/Windows/Forms/StackLayoutPanel.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace RyzStudio.Windows.Forms +{ + public class StackLayoutPanel : FlowLayoutPanel + { + public StackLayoutPanel() : base() + { + this.AutoScroll = true; + this.FlowDirection = FlowDirection.TopDown; + this.WrapContents = false; + } + + protected override void OnResize(EventArgs eventargs) + { + base.OnResize(eventargs); + + //int w = this.ClientRectangle.Width - SystemInformation.VerticalScrollBarWidth; + int w = this.ClientRectangle.Width - 1; + + foreach (Control item in this.Controls) + { + if (item.Width != w) + { + item.Width = w; + } + } + } + + protected override void OnControlAdded(ControlEventArgs e) + { + base.OnControlAdded(e); + + OnResize(null); + } + + protected override void OnControlRemoved(ControlEventArgs e) + { + base.OnControlRemoved(e); + + OnResize(null); + } + + public void AddControl(Control value) + { + if (this.InvokeRequired) + { + this.Invoke(new MethodInvoker(() => + { + value.Margin = new Padding(0, 3, 0, 3); + + this.Controls.Add(value); + })); + } + else + { + value.Margin = new Padding(0, 3, 0, 3); + + this.Controls.Add(value); + } + } + + } +} diff --git a/RyzStudio/Windows/Forms/TCustomProgressBar.Designer.cs b/RyzStudio/Windows/Forms/TCustomProgressBar.Designer.cs new file mode 100644 index 0000000..73c344f --- /dev/null +++ b/RyzStudio/Windows/Forms/TCustomProgressBar.Designer.cs @@ -0,0 +1,63 @@ +namespace RyzStudio.Windows.Forms +{ + partial class TCustomProgressBar + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label3 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label3 + // + this.label3.BackColor = System.Drawing.Color.Transparent; + this.label3.Dock = System.Windows.Forms.DockStyle.Fill; + this.label3.Font = new System.Drawing.Font("Segoe UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(4, 4); + this.label3.Margin = new System.Windows.Forms.Padding(0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(803, 47); + this.label3.TabIndex = 144; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // ProgressBarInner + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label3); + this.Margin = new System.Windows.Forms.Padding(0); + this.Name = "ProgressBarInner"; + this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.Size = new System.Drawing.Size(810, 54); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label3; + } +} diff --git a/RyzStudio/Windows/Forms/TCustomProgressBar.cs b/RyzStudio/Windows/Forms/TCustomProgressBar.cs new file mode 100644 index 0000000..1a8493e --- /dev/null +++ b/RyzStudio/Windows/Forms/TCustomProgressBar.cs @@ -0,0 +1,158 @@ +using System; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace RyzStudio.Windows.Forms +{ + public partial class TCustomProgressBar : TUserControl + { + protected int minimum = 0; + protected int maximum = 100; + protected int value = 50; + + + public TCustomProgressBar() : base() + { + InitializeComponent(); + + this.Padding = new Padding(0); + } + + + [Category("Data"), Browsable(true)] + public int Minimum + { + get => minimum; + set + { + if (this.InvokeRequired) + { + this.Invoke(new MethodInvoker(() => { + SetMinimum(value); + })); + } + else + { + SetMinimum(value); + } + } + } + + [Category("Data"), Browsable(true)] + public int Maximum + { + get => maximum; + set + { + if (this.InvokeRequired) + { + this.Invoke(new MethodInvoker(() => { + SetMaximum(value); + })); + } + else + { + SetMaximum(value); + } + } + } + + [Category("Data"), Browsable(true)] + public int Value + { + get => value; + set + { + if (this.InvokeRequired) + { + this.Invoke(new MethodInvoker(() => { + SetValue(value); + })); + } + else + { + SetValue(value); + } + } + } + + [Category("Appearance"), Browsable(true)] + public Color BarColour { get; set; } = Color.FromArgb(158, 225, 249); + + [Category("Appearance"), Browsable(true)] + public Color BarTextColour { get => label3.ForeColor; set => label3.ForeColor = value; } + + + protected override void OnPaint(PaintEventArgs e) + { + base.OnPaint(e); + + Rectangle canvas = this.DisplayRectangle; + Graphics g = e.Graphics; + + if (this.Value > 0) + { + decimal result = decimal.Divide(canvas.Width, this.Maximum) * this.Value; + + canvas.Width = (int)Math.Round(result); + + g.FillRectangle(new SolidBrush(this.BarColour), canvas); + } + } + + + public void Reset(int value) + { + this.Minimum = 0; + this.Value = 0; + this.Maximum = value; + } + + protected void UpdateText() => RyzStudio.Windows.Forms.ThreadControl.SetText(label3, string.Format("{0}/{1}", this.Value.ToString(), this.Maximum.ToString())); + + protected void SetMinimum(int value) + { + int m = value; + if (m < 0) m = 0; + if (m > this.Maximum) m = this.Maximum; + if (this.Value < m) this.Value = m; + if (this.value > this.Maximum) this.value = this.Maximum; + + minimum = m; + + UpdateText(); + + this.Invalidate(); + } + + protected void SetMaximum(int value) + { + int m = value; + if (m < 0) m = 0; + if (m < this.Minimum) m = this.Minimum; + if (this.Value > m) this.Value = m; + if (this.value < this.Minimum) this.value = this.Minimum; + + maximum = m; + + UpdateText(); + + this.Invalidate(); + } + + protected void SetValue(int value) + { + int m = value; + if (m < this.Minimum) m = this.Minimum; + if (m > this.Maximum) m = this.Maximum; + + this.value = m; + + UpdateText(); + + this.Invalidate(); + } + + } +} diff --git a/RyzStudio/Windows/Forms/TCustomProgressBar.resx b/RyzStudio/Windows/Forms/TCustomProgressBar.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RyzStudio/Windows/Forms/TCustomProgressBar.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/RyzStudio/Windows/Forms/TFlatButton.cs b/RyzStudio/Windows/Forms/TFlatButton.cs new file mode 100644 index 0000000..b50dee0 --- /dev/null +++ b/RyzStudio/Windows/Forms/TFlatButton.cs @@ -0,0 +1,115 @@ +using System.Drawing; +using System.Windows.Forms; + +namespace RyzStudio.Windows.Forms +{ + public class TFlatButton : Label + { + public class ButtonStyle + { + public Color BackColour { get; set; } = Color.Transparent; + public Color PenColour { get; set; } = Color.Transparent; + } + + public enum FlatButtonState + { + Idle = 0, + Hover, + Down + } + + protected FlatButtonState controlState = FlatButtonState.Idle; + + public TFlatButton() : base() + { + this.AutoSize = false; + this.ImageAlign = ContentAlignment.MiddleCenter; + this.TextAlign = ContentAlignment.MiddleCenter; + + // customise + this.StyleOver = new ButtonStyle() + { + BackColour = Color.FromArgb(51, 51, 51), + PenColour = Color.White + }; + this.StyleDown = new ButtonStyle() + { + BackColour = Color.FromArgb(179, 179, 179), + PenColour = Color.Black + }; + this.StyleDefault = new ButtonStyle() + { + BackColour = Color.White, + PenColour = Color.Black + }; + + this.VisualState = FlatButtonState.Idle; + + this.Click += delegate { this.OnClick(null); }; + this.MouseEnter += delegate { this.VisualState = FlatButtonState.Hover; }; + this.MouseLeave += delegate { this.VisualState = FlatButtonState.Idle; }; + this.MouseDown += delegate { this.VisualState = FlatButtonState.Down; }; + this.MouseUp += delegate { this.VisualState = FlatButtonState.Idle; }; + } + + protected FlatButtonState VisualState + { + get { return controlState; } + set + { + switch (value) + { + case FlatButtonState.Idle: + if (this.VisualState == FlatButtonState.Down) + { + updateButton(StyleOver); + } + else + { + updateButton(StyleDefault); + } + + break; + case FlatButtonState.Hover: + updateButton(StyleOver); + break; + case FlatButtonState.Down: + updateButton(StyleDown); + break; + default: + updateButton(StyleDefault); + break; + } + + controlState = value; + } + } + + protected void updateButton(ButtonStyle style) + { + this.ForeColor = style.PenColour; + this.BackColor = style.BackColour; + } + + protected ButtonStyle StyleOver { get; set; } = new ButtonStyle(); + + protected ButtonStyle StyleDown { get; set; } = new ButtonStyle(); + + protected ButtonStyle StyleDefault { get; set; } = new ButtonStyle(); + + public void PerformClick() + { + if (this.InvokeRequired) + { + this.Invoke(new MethodInvoker(() => { + this.OnClick(null); + })); + } + else + { + this.OnClick(null); + } + } + + } +} diff --git a/RyzStudio/Windows/Forms/TForm.cs b/RyzStudio/Windows/Forms/TForm.cs new file mode 100644 index 0000000..58ed7dc --- /dev/null +++ b/RyzStudio/Windows/Forms/TForm.cs @@ -0,0 +1,434 @@ +using System; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; +//using Resources = AppLauncher.Properties.Resources; + +namespace RyzStudio.Windows.Forms +{ + public class TForm : Form + { + //protected readonly Color borderColour = Color.FromArgb(200, 200, 200); + //protected readonly int borderWidth = 1; + + //protected readonly int resizeBorderWidth = 4; + + 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 = 33; + //protected readonly bool showTitleBarLine = true; + //protected Font titleFont = null; + //protected int titleFontTop = 0; + + //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; + + private IContainer components; + + public TForm() : base() + { + InitializeComponent(); + + //if (!this.DesignMode) + //{ + // this.FormBorderStyle = FormBorderStyle.None; + // this.StartPosition = FormStartPosition.Manual; + //} + + this.AutoScaleMode = AutoScaleMode.Font; + this.BackColor = backColour; + this.FormBorderStyle = FormBorderStyle.Sizable; + this.Padding = new Padding(0); + this.DoubleBuffered = true; + + this.MouseDown += new MouseEventHandler(form_MouseDown); + this.MouseMove += new MouseEventHandler(form_MouseMove); + this.MouseUp += new MouseEventHandler(form_MouseUp); + this.PreviewKeyDown += new PreviewKeyDownEventHandler(form_PreviewKeyDown); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.Text = Application.ProductName; + + //initialiseLoadComponent(); + + //if (appIcon != null) appIconTop = (int)Math.Floor((decimal)(titleBarHeight - appIcon.Height) / 2) + borderWidth; + //titleFont = new Font(this.Font.FontFamily, 10F); + //titleFontTop = (int)Math.Floor((decimal)(titleBarHeight - TextRenderer.MeasureText("#", titleFont).Height) / 2) + borderWidth; + + } + + //protected override void OnMouseClick(MouseEventArgs e) + //{ + // base.OnMouseClick(e); + + // bool isLabel = ((e.Location.X >= 0) && (e.Location.X <= this.Width) && (e.Location.Y >= 0) && (e.Location.Y <= titleBarHeight)); + + // if (e.Button == MouseButtons.Left) + // { + // if (isLabel) + // { + // // do nothing + // } + // else + // { + // // do nothing + // } + // } + // else if (e.Button == MouseButtons.Right) + // { + // if (isLabel) + // { + // if (this.TitleContextMenuStrip != null) + // { + // this.TitleContextMenuStrip.Show(this, e.Location); + // } + // } + // else + // { + // // do nothing + // } + // } + //} + + //protected override void OnPaint(PaintEventArgs e) + //{ + // base.OnPaint(e); + + // Graphics g = e.Graphics; + // Rectangle area = new Rectangle(this.DisplayRectangle.X, this.DisplayRectangle.Y, (this.DisplayRectangle.Width - borderWidth), (this.DisplayRectangle.Height - borderWidth)); + + // // border + // g.DrawRectangle(new Pen(borderColour, borderWidth), area); + + // area.Inflate((-1 * borderWidth), (-1 * borderWidth)); + + //g.FillRectangle(new SolidBrush(titleBackColour), area.X, area.Y, (area.Width + area.X), titleBarHeight); + + //if (showTitleBarLine) g.DrawLine(new Pen(titleBorderColour, 1), area.X, titleBarHeight, (area.Width + area.X), titleBarHeight); + + //if (!DesignMode) + //{ + // if (appIcon != null) g.DrawImageUnscaled(appIcon, appIconLeft, appIconTop); + + // int iconPosX = borderWidth + appIconLeft + appIconRight + ((appIcon == null) ? 0 : appIcon.Width); + // TextRenderer.DrawText(g, this.Text, titleFont, new Point(iconPosX, titleFontTop), titleColour); + //} + //} + + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + + this.Invalidate(); + } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + 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; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Padding { get => base.Padding; set => base.Padding = value; } + + [Category("Appearance")] + public ContextMenuStrip TitleContextMenuStrip { get; set; } = null; + + //[Browsable(false)] + //public Image AppIcon { get; set; } = null; + + //[Browsable(false)] + //public bool IsMaximiseEnabled { get; set; } = false; + + //protected Point DefaultLocation + //{ + // get + // { + // Point newPosition = new Point(Cursor.Position.X, Cursor.Position.Y); + // newPosition.X -= (this.Width / 2); + // newPosition.Y -= (this.Height / 2); + + // newPosition.X = Math.Max(newPosition.X, Screen.PrimaryScreen.WorkingArea.Left); + // newPosition.Y = Math.Max(newPosition.Y, Screen.PrimaryScreen.WorkingArea.Top); + + // return newPosition; + // } + //} + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TForm)); + this.SuspendLayout(); + // + // AForm + // + this.Name = "AForm"; + this.ResumeLayout(false); + } + + private void form_MouseDown(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + isDragging = true; + startPosition = e.Location; + //startWindowSize = new Point(this.Width, this.Height); + } + } + + private void form_MouseMove(object sender, MouseEventArgs e) + { + if (isDragging) + { + int x = (this.Location.X + (e.Location.X - startPosition.X)); + int y = (this.Location.Y + (e.Location.Y - startPosition.Y)); + + //this.Location = validateFormLocation(x, y); + this.Location = new Point(x, y); + } + } + + private void form_MouseUp(object sender, MouseEventArgs e) + { + isDragging = false; + } + + private void form_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) + { + if (e.KeyCode == Keys.Escape) + { + Application.Exit(); + } + } + + //protected virtual void initialiseLoadComponent() + //{ + // if (DesignMode) return; + + // // close + // TImageBox closeBox = generateToolbarImageBox(); + // 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) + // { + // if (e.Button == MouseButtons.Left) + // { + // if (enableClose) + // { + // this.Close(); + // } + // } + // }; + // closeBox.Left = this.DisplayRectangle.Width - closeBox.Width - (titleBarIconMarginRight + borderWidth); + + // this.Controls.Add(closeBox); + + // // maximise + // TImageBox maximiseBox = generateToolbarImageBox(); + // 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) + // { + // if (!(sender is TImageBox)) return; + + // TImageBox imageBox2 = (sender as TImageBox); + + // if (imageBox2 == null) return; + + // if (e.Button == MouseButtons.Left) + // { + // if (enableMaximise) + // { + // if (this.WindowState == FormWindowState.Maximized) + // { + // this.WindowState = FormWindowState.Normal; + // imageBox2.Image = imageBox2.ImageNormal = Resources.titlebar_maximise; + // } + // else + // { + // this.WindowState = FormWindowState.Maximized; + // imageBox2.Image = imageBox2.ImageNormal = Resources.titlebar_maximise5; + // } + // } + // } + // 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(); + // 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) + // { + // if (!enableMinimise) return; + // if (e.Button != MouseButtons.Left) return; + + // if (closeOnMinimise) + // { + // this.Close(); + // } + // else + // { + // this.WindowState = FormWindowState.Minimized; + // } + // }; + // minimiseBox.Left = maximiseBox.Left - minimiseBox.Width - titleBarIconMargin; + + // this.Controls.Add(minimiseBox); + + // // resize + // UserControl uc1 = new UserControl() + // { + // Anchor = (AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right), + // Height = resizeBorderWidth, + // Width = this.DisplayRectangle.Width - resizeBorderWidth, + // Left = 0, + // Top = this.DisplayRectangle.Height - resizeBorderWidth, + // BackColor = Color.Transparent, + // Cursor = Cursors.SizeNS + // }; + // uc1.MouseDown += form_MouseDown; + // uc1.MouseUp += form_MouseUp; + // uc1.MouseMove += delegate (object sender, MouseEventArgs e) + // { + // if (isDragging) + // { + // this.Size = new Size(startWindowSize.X, e.Y - startPosition.Y + this.Height); + // } + // }; + // uc1.BringToFront(); + + // this.Controls.Add(uc1); + + // UserControl uc2 = new UserControl() + // { + // Anchor = (AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom), + // Height = this.DisplayRectangle.Height - resizeBorderWidth, + // Width = resizeBorderWidth, + // Left = this.DisplayRectangle.Width - resizeBorderWidth, + // Top = 0, + // BackColor = Color.Transparent, + // Cursor = Cursors.SizeWE + // }; + // uc2.MouseDown += form_MouseDown; + // uc2.MouseUp += form_MouseUp; + // uc2.MouseMove += delegate (object sender, MouseEventArgs e) + // { + // if (isDragging) + // { + // this.Size = new Size(e.X - startPosition.X + this.Width, startWindowSize.Y); + // } + // }; + // uc2.BringToFront(); + + // this.Controls.Add(uc2); + + // UserControl uc3 = new UserControl() + // { + // Anchor = (AnchorStyles.Bottom | AnchorStyles.Right), + // Height = resizeBorderWidth, + // Width = resizeBorderWidth, + // Left = this.DisplayRectangle.Width - resizeBorderWidth, + // Top = this.DisplayRectangle.Height - resizeBorderWidth, + // BackColor = Color.Transparent, + // Cursor = Cursors.SizeNWSE + // }; + // uc3.MouseDown += form_MouseDown; + // uc3.MouseUp += form_MouseUp; + // uc3.MouseMove += delegate (object sender, MouseEventArgs e) + // { + // if (isDragging) + // { + // this.Size = new Size((e.X - startPosition.X + this.Width), (e.Y - startPosition.Y + this.Height)); + // } + // }; + // uc3.BringToFront(); + + // this.Controls.Add(uc3); + //} + + //protected TImageBox generateToolbarImageBox() + //{ + // TImageBox imageBox = new TImageBox(); + // //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; + // //imageBox.ImageNormal = Resources.close; + // imageBox.ImageSelected = null; + // imageBox.IsSelected = false; + // //closeBox.Location = new System.Drawing.Point(169, 12); + // 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.Height) / 2) + borderWidth; + // imageBox.Anchor = (AnchorStyles.Top | AnchorStyles.Right); + // imageBox.Padding = new Padding(0); + + // return imageBox; + //} + + //private void exitToolStripMenuItem_Click(object sender, EventArgs e) => this.Close(); + + //private void notifyIcon1_MouseClick(object sender, MouseEventArgs e) + //{ + // if (e.Button == MouseButtons.Left) + // { + // this.Visible = !this.Visible; + // } + + // //notifyIcon1.Visible = !this.Visible; + //} + + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/Forms/TForm.resx b/RyzStudio/Windows/Forms/TForm.resx new file mode 100644 index 0000000..b723165 --- /dev/null +++ b/RyzStudio/Windows/Forms/TForm.resx @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + + 130, 17 + + + + + AAABAAQAMDAAAAEAIACoJQAARgAAACAgAAABACAAqBAAAO4lAAAYGAAAAQAgAIgJAACWNgAAEBAAAAEA + IABoBAAAHkAAACgAAAAwAAAAYAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGxc + VU5rW1Tna1tU22paU5BsXVVCgEBABA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+Sh4L/bV5X/2tbVP9rW1T/a1tU/2tbVP9rW1T/a1tU/2tbVOFrXFOZallTTW1J + SQcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGlaWhFqW1TCa1tU/2tbVP9rW1T/o5mV//38 + /P//////////////////////////////////////9PPy/8jDwP+cko3/c2Nd/2tbVP9rW1T/a1tU/2tb + VP9rW1T/a1tU/2tbVPVrW1SzalxUXmlaWhEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAalhYHWtbVNRrW1T/a1tU/2tb + VP+1rar/////////////////////////////////////////////////////////////////+vn5/9LN + y/+lm5f/eGpj/2tbVP9rW1T/a1tU/2tbVP9rW1T/a1tU/2tbVPtrWlS9bFxVb2xdVSEAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABrWVMra1tU42tb + VP9rW1T/bV1W/8S9u/////////////////////////////////////////////////////////////// + /////////////////////////v7+/97a2f+xqKT/g3Zw/2tbVP9rW1T/a1tU/2tbVP9rW1T/a1tU/2tb + VP5qW1V4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGpZ + VTxrW1Tua1tU/2tbVP9wYVr/0czK//////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////+ro5/+8tbL/j4N+/21d + Vv9rW1T/a1tU/2tbVP9rW1TpAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAbFxTUGtbVPZrW1T/a1tU/3VnYP/d2df///////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////Tz8v/Iw8D/dmdh/2tbVP9rW1T/blpTJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAABsXFRha1tU+2tbVP9rW1T/emxl/+Th4P////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////m5CL/2tbVP9rW1T/a1tTXwAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAGtaVHdrW1T/a1tU/2tbVP+DdnD/7uzs/////////////Pvw//z6 + 7v/8+u7//Pru//z67v/8+u7//Pru//z67v/9/PT///////////////////////z4+f/79fX/+/X1//v1 + 9f/79fX/+/X1//v19f/79fX//Pb2////////////////////////////vLWy/2tbVP9rW1T/a1xTmQAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVVVUDa1tUmGtbVP9rW1T/a1tU/4t/ev/08/L///////// + ///cyT7/0bcA/9G3AP/RtwD/0bcA/9G3AP/RtwD/0bcA/9G3AP/RtwD/6Nt+////////////4bG1/8Rl + bP/EZWz/xGVs/8RlbP/EZWz/xGVs/8RlbP/EZWz/xGVs/9KKkP//////////////////////3tvZ/2tb + VP9rW1T/a1tU1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG1JSQdrW1Sra1tU/2tbVP9rW1T/mY6J//r5 + +f////////////389f/RtwD/0bcA/9G3AP/RtwD/0bcA/9G3AP/RtwD/0bcA/9G3AP/RtwD/28Y1//// + ////////0IWL/8RlbP/EZWz/xGVs/8RlbP/EZWz/xGVs/8RlbP/EZWz/xGVs/8RlbP/9+fn///////// + /////////Pz8/3BhWv9rW1T/a1tU/nFVVRIAAAAAAAAAAAAAAAAAAAAAaVpaEWtcVMNrW1T/a1tU/2tb + VP+kmpb//fz8//////////////////389P/RtwD/0bcA/+TVbP/w56r/8Oeq//Dnqv/w56r/8Oeq/93K + Qv/RtwD/28Y1////////////0IWL/8RlbP/TjZL/68zO/+vMzv/rzM7/68zO/+vMzv/dpqr/xGVs/8Rl + bP/8+Pn//////////////////////46CfP9rW1T/a1tU/2xbVEkAAAAAAAAAAAAAAABsWFgaa1xU0Wtb + VP9rW1T/a1tU/7CopP////////////////////////////389P/RtwD/0bcA/+7lov////////////// + /////////////+PTY//RtwD/28Y1////////////0IWL/8RlbP/boaX///////////////////////// + ///px8n/xGVs/8RlbP/8+Pn//////////////////////7CopP9rW1T/a1tU/2tbVIMAAAAAAAAAAAAA + AABqXFTOa1tU/2tbVP9tXlf/xr+9//////////////////////////////////389P/RtwD/0bcA/+7l + ov///////////////////////////+PTY//RtwD/28Y1////////////0IWL/8RlbP/boaX///////// + ///////////////////px8n/xGVs/8RlbP/8+Pn//////////////////////9LNy/9rW1T/a1tU/2tb + VL8AAAAAAAAAAAAAAABrW1Tva1tU/2tbVP/KxML///////////////////////////////////////38 + 9P/RtwD/0bcA/+7lov///////////////////////////+PTY//RtwD/28Y1////////////0IWL/8Rl + bP/boaX////////////////////////////px8n/xGVs/8RlbP/8+Pn///////////////////////Py + 8v9sXFX/a1tU/2tbVPRmZmYFAAAAAAAAAABrW1W4a1tU/2tbVP/Oycf///////////////////////// + //////////////389P/RtwD/0bcA/+7lov///////////////////////////+PTY//RtwD/28Y1//// + ////////0IWL/8RlbP/boaX////////////////////////////px8n/xGVs/8RlbP/8+Pn///////// + //////////////////+CdG7/a1tU/2tbVP9sXVM0AAAAAAAAAABqWlR/a1tU/2tbVP+tpKD///////// + //////////////////////////////389P/RtwD/0bcA/+7lov///////////////////////////+PT + Y//RtwD/28Y1////////////0IWL/8RlbP/boaX////////////////////////////px8n/xGVs/8Rl + bP/8+Pn///////////////////////////+jmZX/a1tU/2tbVP9rWlNuAAAAAAAAAABtWlNEa1tU/2tb + VP+Lfnn///////////////////////////////////////389P/RtwD/0bcA/93JQf/j1Gb/49Rm/+PU + Zv/j1Gb/49Rm/9jCJ//RtwD/28Y1////////////0IWL/8RlbP/NfYL/3KOn/9yjp//co6f/3KOn/9yj + p//TjJH/xGVs/8RlbP/8+Pn////////////////////////////Fv7z/a1tU/2tbVP9qW1OoAAAAAAAA + AABqVVUMa1tU+2tbVP9uXlf/+fn4//////////////////////////////////389P/RtwD/0bcA/9G3 + AP/RtwD/0bcA/9G3AP/RtwD/0bcA/9G3AP/RtwD/28c5////////////0IWL/8RlbP/EZWz/xGVs/8Rl + bP/EZWz/xGVs/8RlbP/EZWz/xGVs/8Rmbf/9+vr////////////////////////////n5eT/a1tU/2tb + VP9rW1TkAAAAAAAAAAAAAAAAa1tUz2tbVP9rW1T/3NjW//////////////////////////////////38 + 9v/axTP/2sUz/9rFM//axTP/2sUz/9rFM//axTP/2sUz/9rFM//bxzj/8Ois////////////2p2i/9CE + if/QhIn/0ISJ/9CEif/QhIn/0ISJ/9CEif/QhIn/0ISJ/+GwtP////////////////////////////// + ///+/v7/dWdg/2tbVP9rW1T/alhYHQAAAAAAAAAAa1tUlGtbVP9rW1T/ubKv//////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////l4uG/2tbVP9rW1T/a1pUWAAAAAAAAAAAbFtVWmtbVP9rW1T/mI2I//// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////uLGt/2tbVP9rW1T/a1tUkgAAAAAAAAAAa1pSH2tb + VP9rW1T/dmdh//7+/v////////////////////////////////+rnPH/fGTp/3xk6f98ZOn/fGTp/3xk + 6f98ZOn/fGTp/3xk6f9/aOr/ysD2////////////rOH9/zi4+v8ztvr/M7b6/zO2+v8ztvr/M7b6/zO2 + +v8ztvr/M7b6/33R/P//////////////////////////////////////2tbV/2tbVP9rW1T/a1tVzQAA + AAAAAAAAAAAAAGtbVONrW1T/a1tU/+jm5f////////////////////////////r5/v9cPuT/Wz3k/1s9 + 5P9bPeT/Wz3k/1s95P9bPeT/Wz3k/1s95P9bPeT/gGjq////////////Obj6/wCk+f8ApPn/AKT5/wCk + +f8ApPn/AKT5/wCk+f8ApPn/AKT5/wGk+f/3/P//////////////////////////////////+vn5/25f + WP9rW1T/a1tU/GpVVQwAAAAAAAAAAGtcVKprW1T/a1tU/8bAvf////////////////////////////j3 + /v9bPeT/Wz3k/4Vu6/+di+//nYvv/52L7/+di+//nYvv/3Rb6P9bPeT/fWXq////////////Nbf6/wCk + +f8nsvr/Zsj7/2bI+/9myPv/Zsj7/2bI+/9Bu/v/AKT5/wCk+f/0+/////////////////////////// + /////////////4p9eP9rW1T/a1tU/2xdVUIAAAAAAAAAAGtbVHBrW1T/a1tU/6Sblv////////////// + //////////////j3/v9bPeT/Wz3k/8O49f///////////////////////////5uI7v9bPeT/fWXq//// + ////////Nbf6/wCk+f9jx/v///////////////////////////+i3v3/AKT5/wCk+f/0+/////////// + /////////////////////////////6yjn/9rW1T/a1tU/2pcVH0AAAAAAAAAAGxdUzRrW1T/a1tU/4J0 + bv////////////////////////////j3/v9bPeT/Wz3k/8O49f///////////////////////////5uI + 7v9bPeT/fWXq////////////Nbf6/wCk+f9jx/v///////////////////////////+i3v3/AKT5/wCk + +f/0+////////////////////////////////////////87Jx/9rW1T/a1tU/2tbVbgAAAAAAAAAAGZm + ZgVrW1T0a1tU/2xcVf/z8vL///////////////////////j3/v9bPeT/Wz3k/8O49f////////////// + /////////////5uI7v9bPeT/fWXq////////////Nbf6/wCk+f9jx/v///////////////////////// + //+i3v3/AKT5/wCk+f/0+////////////////////////////////////////8rEwv9rW1T/a1tU/2tb + VO8AAAAAAAAAAAAAAABrW1S/a1tU/2tbVP/Szcv///////////////////////j3/v9bPeT/Wz3k/8O4 + 9f///////////////////////////5uI7v9bPeT/fWXq////////////Nbf6/wCk+f9jx/v///////// + //////////////////+i3v3/AKT5/wCk+f/0+///////////////////////////////////xr+9/21e + V/9rW1T/a1tU/2pcVM4AAAAAAAAAAAAAAABrWlSFa1tU/2tbVP+xqaX///////////////////////j3 + /v9bPeT/Wz3k/8O49f///////////////////////////5uI7v9bPeT/fWXq////////////Nbf6/wCk + +f9jx/v///////////////////////////+i3v3/AKT5/wCk+f/0+/////////////////////////// + //+6sq//bFxV/2tbVP9rW1T/a1tT1m9eVR4AAAAAAAAAAAAAAABpXFVLa1tU/2tbVP+Pg37///////// + //////////////j3/v9bPeT/Wz3k/6CP7//Ivvb/yL72/8i+9v/Ivvb/yL72/4Vv6/9bPeT/fWXq//// + ////////Nbf6/wCk+f9CvPv/quH9/6rh/f+q4f3/quH9/6rh/f9sy/z/AKT5/wCk+f/0+/////////// + /////////f39/6ifmv9rW1T/a1tU/2tbVP9rW1TIZllZFAAAAAAAAAAAAAAAAAAAAABpWloRa1tU/Wtb + VP9wYVr//Pv7//////////////////j3/v9bPeT/Wz3k/1s95P9bPeT/Wz3k/1s95P9bPeT/Wz3k/1s9 + 5P9bPeT/fWXq////////////Nbf6/wCk+f8ApPn/AKT5/wCk+f8ApPn/AKT5/wCk+f8ApPn/AKT5/wCk + +f/1+//////////////7+vr/nZKO/2tbVP9rW1T/a1tU/2tcVbJmZk0KAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAa1tT1mtbVP9rW1T/4Nzb//////////////////j3/v9bPeT/Wz3k/1s95P9bPeT/Wz3k/1s9 + 5P9bPeT/Wz3k/1s95P9bPeT/rJ3x////////////Nbf6/wCk+f8ApPn/AKT5/wCk+f8ApPn/AKT5/wCk + +f8ApPn/AKT5/z66+v////////////b19P+Pg37/a1tU/2tbVP9rW1T/a1tTn4BAQAQAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAa1pUm2tbVP9rW1T/vbaz//////////////////7+///08v3/9PL9//Ty + /f/08v3/9PL9//Ty/f/08v3/9PL9//Ty/f/49/7/////////////////8vr//+75///u+f//7vn//+75 + ///u+f//7vn//+75///u+f//8Pr/////////////8O/u/4Z5dP9rW1T/a1tU/2tbVP9rXFSIAAAAAQAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbFxUYWtbVP9rW1T/nJGM//////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////n5eT/fG5o/2tbVP9rW1T/a1tU/Gta + VWkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAblpTJWtbVP9rW1T/dmdh/8jD + wP/08/L///////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////93Z1/91Z2D/a1tU/2tb + VP9rW1T2bFxTUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWtb + VOlrW1T/a1tU/2tbVP9tXVb/j4N+/7y1sv/q6Of///////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////0czK/3Bh + Wv9rW1T/a1tU/2tbVO5qWVU8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAGpbVXhrW1T+a1tU/2tbVP9rW1T/a1tU/2tbVP9rW1T/g3Zw/7GopP/e2tn//v7+//// + //////////////////////////////////////////////////////////////////////////////// + ///Evbv/bV1W/2tbVP9rW1T/a1tU42tZUysAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsXVUhbFxVb2taVL1rW1T7a1tU/2tbVP9rW1T/a1tU/2tb + VP9rW1T/eGpj/6Wbl//Szcv/+vn5//////////////////////////////////////////////////// + /////////////7Wtqv9rW1T/a1tU/2tbVP9rW1TUalhYHQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpWloRbFpUVWtb + U6JrW1Twa1tU/2tbVP9rW1T/a1tU/2tbVP9rW1T/cGFa/5KHgv+/uLX/8O/u//////////////////// + ///////////////////9/f3/p56a/2tbVP9rW1T/a1tU/2pbVcdmWVkUAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAbFtVe2tbVP5rW1T/a1tU/2tbVP9rW1T/a1tT1mtcVIhrWVU5gICAAgAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAVVVVA2xbVJVrW1T/bV5X/8K7uf/RzMr/pJqW/3hpY/9rW1T/a1tU/2tb + VP9rW1TpalxTnGxcVU5mZk0KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAG1JSQdrW1Spa1tU/29fWf/Oycf//////////////////v7+/+He + 3f+1ran/iXx2/2tbVP9rW1T/a1tU/2tbVPZqW1W7bFxVb2xYWBoAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwYFAQbFxUwGtbVP91ZmD+3trZ//////////////////// + ////////////////////////6efm/7y0sf+Ogn3/bV1W/2tbVP9rW1T/a1tU/WtbVMZrWlR3ZlVVDwAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaF5VG2tbVNJrW1T/fW9p/+fl5P////////////// + ///////////////////////////////////////////////////z8vL/x8G//5uQi/9xYlv/a1tU/2tb + VP9rW1SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGpdVylrW1Tha1tU/4V4cv/w7u7///////// + //////////////////////////////////////////////////////////////////////////////r6 + +v/Evbv/a1tU/2xbVMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABrXVM3a1tU62tbVP+MgHr/9PPy//// + //////////////////////////////////////////////////////////////////////////////// + //////////////v6+v9vX1n/a1tU+2pVVQwAAAAAAAAAAAAAAAAAAAAAallTTWtbVPVrW1T/mY6K//r5 + +f///v3/1r8d/9G3AP/RtwD/0bcA/9G3AP/RtwD/07oL//r34//57u//x2xy/8RlbP/EZWz/xGVs/8Rl + bP/EZWz/y3d9///+/v///////////4yAev9rW1T/alpSQQAAAAAAAAAAAAAAAGpaVWBrW1T7a1tU/6mg + nP/+/v7///////799//RtwD/2cMr/+PUZv/j1Gb/49Rm/9zIPP/RtwD/9vHM//Pg4v/EZWz/0omP/9yj + p//co6f/3KOn/85/hf/EZWz//fr6////////////rqai/2tbVP9sW1V7AAAAAAAAAABrW1R5a1tU/2xc + Vf+4sa3//////////////////v33/9G3AP/k1Wz/////////////////7OGW/9G3AP/28cz/8+Di/8Rl + bP/nwML/////////////////3aaq/8RlbP/9+vr////////////RzMn/a1tU/2pbVLYAAAAAAAAAAGtb + VO5rW1T/w726///////////////////////+/ff/0bcA/+TVbP/////////////////s4Zb/0bcA//bx + zP/z4OL/xGVs/+fAwv/////////////////dpqr/xGVs//36+v////////////Lw8P9rW1T/a1tU74CA + gAIAAAAAa1tUxWtbVP/Z1dP///////////////////////799//RtwD/5NVs/////////////////+zh + lv/RtwD/9vHM//Pg4v/EZWz/58DC/////////////////92mqv/EZWz//fr6/////////////////4By + bP9rW1T/aF1RLAAAAABqXFSLa1tU/7iwrf///////////////////////v33/9G3AP/dyUH/7eKZ/+3i + mf/t4pn/4dBa/9G3AP/28cz/8+Di/8RlbP/Zm6D/58HE/+fBxP/nwcT/04yR/8RlbP/9+vr///////// + ////////opeT/2tbVP9qW1NlAAAAAGtbVVFrW1T/louG///////////////////////+/ff/0bcA/9G3 + AP/RtwD/0bcA/9G3AP/RtwD/0bcB//n12//z4OL/xGVs/8RlbP/EZWz/xGVs/8RlbP/EZWz/x2xy//79 + /f/////////////////Dvbr/a1tU/2tbU58AAAAAaF1RFmtbVP90ZV///v7+///////////////////+ + /f/28cz/9vHM//bxzP/28cz/9vHM//bxzP/49dr///////35+f/z4OL/8+Di//Pg4v/z4OL/8+Di//Pg + 4v/47e7//////////////////////+Xi4f9rW1T/altU2gAAAAAAAAAAa1xT3GtbVP/m4+L///////// + /////////////+zp/P/e2Pr/3tj6/97Y+v/e2Pr/3tj6/+fj+////////////9ry/v/M7f7/zO3+/8zt + /v/M7f7/zO3+/+L1/v///////////////////////v7+/3VmX/9rW1T+aF1RFgAAAABsWlSha1tU/8S+ + u//////////////////8/P//YkXl/1s95P9bPeT/Wz3k/1s95P9bPeT/XD7k/+jk+//b8v7/AaT5/wCk + +f8ApPn/AKT5/wCk+f8ApPn/C6j5//v+////////////////////////lYmE/2tbVP9rWlRPAAAAAGpc + VGdrW1T/o5mU//////////////////r5/v9bPeT/hW7r/72x9P+9sfT/vbH0/5WB7v9bPeT/3tj6/8zt + /v8ApPn/WsT7/5nb/f+Z2/3/mdv9/0G7+/8ApPn/9/z///////////////////////+2r6v/a1tU/2pb + VIkAAAAAaF1RLGtbVP+Acmz/////////////////+vn+/1s95P+gj+//////////////////u6/0/1s9 + 5P/e2Pr/zO3+/wCk+f+W2v3/////////////////bMv8/wCk+f/3/P///////////////////////9nV + 0/9rW1T/a1tUxQAAAACAgIACa1tU72tbVP/y8PD////////////6+f7/Wz3k/6CP7/////////////// + //+7r/T/Wz3k/97Y+v/M7f7/AKT5/5ba/f////////////////9sy/z/AKT5//f8//////////////// + ////////w726/2tbVP9rW1TuAAAAAAAAAABqW1S2a1tU/9HMyf////////////r5/v9bPeT/oI/v//// + /////////////7uv9P9bPeT/3tj6/8zt/v8ApPn/ltr9/////////////////2zL/P8ApPn/9/z///// + /////////////7ixrf9sXFX/a1tU/2tbVHkAAAAAAAAAAGpcVH1rW1T/r6ej////////////+vn+/1s9 + 5P93Xun/nYvv/52L7/+di+//gmvq/1s95P/e2Pr/zO3+/wCk+f88ufr/Zsj7/2bI+/9myPv/K7P6/wCk + +f/3/P////////7+/v+upaH/a1tU/2tbVPxqXFRnAAAAAAAAAAAAAAAAa1tUQ2tbVP+NgXz///////// + ///6+f7/Wz3k/1s95P9bPeT/Wz3k/1s95P9bPeT/YkXl/+3q/P/M7f7/AKT5/wCk+f8ApPn/AKT5/wCk + +f8ApPn/Ha76//3+///7+vr/nZOO/2tbVP9rWlT4altVVAAAAAAAAAAAAAAAAAAAAAB0XV0La1tU+29f + Wf/7+vr///////////////////////////////////////////////////////////////////////// + ////////////////////////9vX0/5CEfv9rW1T/bFxU72pZVTwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AABsW1TMa1tU/8S9u//6+vr///////////////////////////////////////////////////////// + //////////////////////////////Du7v+FeHL/a1tU/2tbVOFqXVcpAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAGtbVI9rW1T/a1tU/3FiW/+bkIv/x8G///Py8v////////////////////////////// + ///////////////////////////////////n5eT/fW9p/2tbVP9rW1TSaF5VGwAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAZlVVD2taVHdrW1TGa1tU/WtbVP9rW1T/bV1W/46Cff+8tLH/6efm//// + ////////////////////////////////////////3trZ/3ZnYf9rW1T/bFxUwHBgUBAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmWVkUalxUXmtcVKprW1Tya1tU/2tb + VP9rW1T/f3Fr/6uinv/Y09H//fz8/////////////////9LNy/9xYVv/a1tU/2paVa9xVVUJAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGZm + TQpsXFVOalxTnGtbVOlrW1T/a1tU/2tbVP94aWP/pJqW/9HMyv/Cu7n/bV5X/2tbVP9sW1SVVVVVAwAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAgICAAmtZVTlrXFSIa1tT1mtbVP9rW1T/a1tU/2tbVP9rW1T+bFtVewAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAalxVJGpbVHNrW1XBa1tU7Gxc + VGEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/g////wA///wAB//4A + AD/8AAAH+AAAB/AAAAfgAAADwAAAA4AAAAMAAAADAAAAAQAAAAEAAAABAAAAAQAAAAGAAAAAgAAAAIAA + AACAAAAAgAAAAMAAAADAAAABwAAAA8AAAAfgAAAP4AAAH+AAAD/8AAB//4AA///wA////wf/KAAAABgA + AAAwAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAa1tTa2xcVfBsXFW1bFpVZmZcUhkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFrWlSFa1tU/4+Dfv+AcWv8a1tU/2tb + VP5tXlbMa1xUemxbVS0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAVVVVA2xbVJprW1T/qqCc//7+/v//////6+no/7+4tf+RhoH9bF1W/mtbVP9tXlbia1xTmWpZ + U02AVVUGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0XV0LbFxVtWxcVf+5sq////////// + ////////////////////////8/Hx/8bAvf+Zjor/cGBa/WtbVP9tXVbxaltUo2heVRsAAAAAAAAAAAAA + AAAAAAAAAAAAAGZZWRRtXFbKbV1W/sjCv/////////////////////////////////////////////// + ////////+vn5/9LNy/+mnJj/bV1W/WtbVIMAAAAAAAAAAAAAAAAAAAAAaFhYIG1eV9pvYFn808/N//// + ////////////////////////////////////////////////////////////////////////in55/W1d + Vr4AAAAAAAAAAAAAAABoXVEsbV5X53NlXvzd2tj//v78/9S8EP/RtwD/0bcA/9G3AP/RtwD/8Oit/+zN + 0P/EZWz/xGVs/8RlbP/EZWz/yG91//79/f//////raSg/2xcVfaAQEAEAAAAAGxcVEBtXVbzfG5n++jm + 5f///////v35/9G3AP/v5qf/9vHM//bxzP/Ywij/7eKZ/+fBxP/NfYP/8+Di//Pg4v/rysz/xGVs//77 + /P//////z8rH/2tbVP9rXFIyAAAAAG1dVe2CdW/98O/u/////////////v35/9G3AP/38tH///////// + ///axTL/7eKZ/+fBxP/Qg4n////////////04+T/xGVs//77/P//////8fDv/2tbVP9sW1RtAAAAAG5e + Vs+ViYT+/////////////////v35/9G3AP/38tH////////////axTL/7eKZ/+fBxP/Qg4n///////// + ///04+T/xGVs//77/P///////////31waftqW1OoAAAAAGxaU5NyY138/v7+/////////////v35/9G3 + AP/Zwyr/2sUz/9rFM//Tugr/7eOb/+fBxP/Ga3L/0ISJ/9CEif/OfoT/xGVs//78/P///////////6CW + kv9tXlflAAAAAGpcU1lrW1T/5ePh//////////////79/+3imf/t4pn/7eKZ/+3imf/t4pr/+/nr//bm + 5//nwcT/58HE/+fBxP/nwcT/7M3P/////////////////8K7uf9rW1T/alhYHW9eVR5rW1T/w726//// + /////////////8rA9v+9sfT/vbH0/72x9P++svT/8vD9/+v4//+a2/3/mdv9/5nb/f+Z2/3/rOH9//// + /////////////+Th4P9rW1T/bFtVVwAAAABtXlfnopeT/////////////Pv+/1s95P92Xej/fGTp/3xk + 6f9hReX/v7P0/5vb/f8KqPn/M7b6/zO2+v8qs/r/AKT5//r9//////////////7+/v9yY1z8a1tUkQAA + AABqW1OofXBp+///////////+/r+/1s95P/h3Pr///////////97Y+n/vbH0/5nb/f8ytvr///////// + ///R7/7/AKT5//n9//////////////////+ViYT+bl5WzwAAAABsW1Rta1tU//Hw7///////+/r+/1s9 + 5P/h3Pr///////////97Y+n/vbH0/5nb/f8ytvr////////////R7/7/AKT5//n9//////////////Dv + 7v+CdW/9bV1V7QAAAABsXVM0a1tU/9DLyf//////+/r+/1s95P/GvPb/3tj6/97Y+v91W+j/vbH0/5nb + /f8osvr/zO3+/8zt/v+n4P3/AKT5//n9////////6+no/35wavxsXVX1altURgAAAACAQEAEbV1W9q6m + ov//////+/r+/1s95P9bPeT/Wz3k/1s95P9bPeT/ysH2/5nb/f8ApPn/AKT5/wCk+f8ApPn/EKr5//z+ + ///g3dv/dmdh/G1dVuptWFMxAAAAAAAAAAAAAAAAbFxVv4x/ev3///////////////////////////// + /////////////////////////////////////////////9jT0f9xYVv8bV5W32pcVSQAAAAAAAAAAAAA + AAAAAAAAa1tUg21dVv2mnJj/0s3L//r5+f////////////////////////////////////////////// + ////////yMK//21dVv5tXFbKZllZFAAAAAAAAAAAAAAAAAAAAAAAAAAAaF5VG2pbVKNsXFXwa1tU/3Bg + Wv2Zjor+xsC9//Px8f////////////////////////////////+5sq//bFxV/2xcVbV0XV0LAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVVVUDallVPGtcVIhtXVbba1tU/2tbVP6Ie3X9ta2p/+He + 3f///////v7+/66mov9rW1T/bFpUoWZmZgUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAbFtVLWtcVHpsXVXLa1tU/mtbVP9/cWv7j4N+/2tbVP9rWlSFAAAAAQAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAZlxSGWxaVWZsXFW1bFxV8GtbU2sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8H + /0H8AP9B+AAPQfAAA0HgAANBwAADQYAAAUEAAAFBAAABQQAAAUEAAAFBAAAAQQAAAEGAAABBgAAAQYAA + AEGAAABBgAABQcAAA0HAAAdBwAAPQfAAH0H/AD9B/+D/QSgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHJhW3tvYFn0dWZgsmxbVVdmVVUPAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICAAnFiW5eCdG705OHg/8a/vf+UiYT0cWFa+Xdo + YcptXFVsb15VHgAAAAAAAAAAAAAAAAAAAAAAAAAAbUlJB3NkXbKMgHr09/b2//////////////////r5 + +f/Szcv/oJeS9XNlXfZzZV7baVxVJwAAAAAAAAAAbVtbDnNjXciZj4n1+/r6//////////////////// + ///////////////////+/v7/pJqW+WxdVnYAAAAAamBVGHJkXdmnnpn2/f37/9S8E//axTP/2MIo/+XX + cP/eqa3/zX2D/9CEif/IcHf//v39/83Ixf92Z2C8AAAAAHJjXOC5sK36//////7++//bxjb///////Xw + yv/k1Gf/3KOn//Pf4P//////0IaL//79/f/w7u7/cWFb8gAAAAF0Zl/i4+Df///////+/vv/2cMr//bx + zP/u5aL/5NRn/9yjp//px8n/8+Di/85/hf/+/f3//////3hpYvNuWlMldGReo8K7uf////////79/+PU + Zv/j1Gb/49Rm//Dorv/qyMv/3KOn/9yjp//eqKz///7+//////+ajoryalxUXmpaVWCbkYzz//////7+ + //+ikfD/nYvv/52L7//Lwfb/ruL9/2bI+/9myPv/b8z8//7/////////wbq3/3RlXqJuWlMleGli8/// + ///8/P//d17p/97Y+v/DuPX/nYvv/2fJ+/+i3v3/zO3+/yuz+v/7/v///////+Pg3/90Zl/iAAAAAXFh + W/Lw7u7//Pz//35m6v//////3df5/52L7/9nyfv/yuz+//////82t/r/+/7///////+5sK36cmNc4AAA + AAB2Z2G+zsnH//z8//9iReX/fGTp/3Vb6P+jkvD/Z8n7/yiy+v8ztvr/E6v5//v9/v+to5/4c2Nd3m1b + UhwAAAAAbF1WdqSalvn+/v7///////////////////////////////////////v6+v+Zj4r2c2ReyW1b + Ww4AAAAAAAAAAGlcVSdzZV7bc2Vd9qCXkvXSzcv/+vn5//////////////////f29v+MgHr0c2Rdsm1J + SQcAAAAAAAAAAAAAAAAAAAAAAAAAAG9eVR5rW1NrdGRexnBhWfiShoHvxr+9/uTh4P+CdG70c2RdmYCA + gAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmVVUPbFtVV3VmYLJvYFn0cmFbewAA + AAAAAAAAAAAAAAAAAAAAAAAA+D+sQeAHrEHAAaxBgAGsQQABrEEAAKxBAACsQQAArEEAAKxBAACsQQAA + rEGAAKxBgAGsQYADrEHgB6xB/B+sQQ== + + + \ No newline at end of file diff --git a/RyzStudio/Windows/Forms/THorizontalSeparator.Designer.cs b/RyzStudio/Windows/Forms/THorizontalSeparator.Designer.cs new file mode 100644 index 0000000..1058088 --- /dev/null +++ b/RyzStudio/Windows/Forms/THorizontalSeparator.Designer.cs @@ -0,0 +1,37 @@ +namespace RyzStudio.Windows.Forms +{ + partial class THorizontalSeparator + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/RyzStudio/Windows/Forms/THorizontalSeparator.cs b/RyzStudio/Windows/Forms/THorizontalSeparator.cs new file mode 100644 index 0000000..1be87f2 --- /dev/null +++ b/RyzStudio/Windows/Forms/THorizontalSeparator.cs @@ -0,0 +1,101 @@ +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace RyzStudio.Windows.Forms +{ + public partial class THorizontalSeparator : System.Windows.Forms.UserControl + { + public THorizontalSeparator() + { + InitializeComponent(); + + this.BackColor = Color.Transparent; + this.Margin = new Padding(10, 0, 10, 0); + this.MaximumSize = new Size(SystemInformation.VirtualScreen.Width, 22); + this.MinimumSize = new Size(0, 22); + this.Padding = new Padding(0, 10, 0, 10); + } + + protected override void OnPaintBackground(PaintEventArgs e) + { + base.OnPaintBackground(e); + + Graphics g = e.Graphics; + + g.FillRectangle(new SolidBrush(Color.FromArgb(213, 223, 229)), new Rectangle(this.DisplayRectangle.Left, 11, this.DisplayRectangle.Width, 1)); + g.FillRectangle(new SolidBrush(Color.FromArgb(249, 251, 253)), new Rectangle(this.DisplayRectangle.Left, 12, this.DisplayRectangle.Width, 1)); + } + + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Image BackgroundImage { get => base.BackgroundImage; set => base.BackgroundImage = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override ImageLayout BackgroundImageLayout { get => base.BackgroundImageLayout; set => base.BackgroundImageLayout = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new BorderStyle BorderStyle { get => base.BorderStyle; set => base.BorderStyle = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Cursor Cursor { get => base.Cursor; set => base.Cursor = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Font Font { get => base.Font; set => base.Font = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Color BackColor { get => base.BackColor; set => base.BackColor = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Color ForeColor { get => base.ForeColor; set => base.ForeColor = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override RightToLeft RightToLeft { get => base.RightToLeft; set => base.RightToLeft = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool UseWaitCursor { get => base.UseWaitCursor; set => base.UseWaitCursor = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override bool AllowDrop { get => base.AllowDrop; set => base.AllowDrop = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override AutoValidate AutoValidate { get => base.AutoValidate; set => base.AutoValidate = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override ContextMenuStrip ContextMenuStrip { get => base.ContextMenuStrip; set => base.ContextMenuStrip = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new ImeMode ImeMode { get => base.ImeMode; set => base.ImeMode = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override bool AutoScroll { get => base.AutoScroll; set => base.AutoScroll = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Size AutoScrollMargin { get => base.AutoScrollMargin; set => base.AutoScrollMargin = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Size AutoScrollMinSize { get => base.AutoScrollMinSize; set => base.AutoScrollMinSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override bool AutoSize { get => base.AutoSize; set => base.AutoSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new AutoSizeMode AutoSizeMode { get => base.AutoSizeMode; set => base.AutoSizeMode = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Size MaximumSize { get => base.MaximumSize; set => base.MaximumSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Size MinimumSize { get => base.MinimumSize; set => base.MinimumSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Margin { get => base.Margin; set => base.Margin = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Padding { get => base.Padding; set => base.Padding = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new DockStyle Dock { get => base.Dock; set => base.Dock = value; } + + } +} diff --git a/RyzStudio/Windows/Forms/THorizontalSeparator.resx b/RyzStudio/Windows/Forms/THorizontalSeparator.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RyzStudio/Windows/Forms/THorizontalSeparator.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/RyzStudio/Windows/Forms/TImageBox.cs b/RyzStudio/Windows/Forms/TImageBox.cs new file mode 100644 index 0000000..09f7bbe --- /dev/null +++ b/RyzStudio/Windows/Forms/TImageBox.cs @@ -0,0 +1,84 @@ +using System; +using System.ComponentModel; +using System.Drawing; + +namespace RyzStudio.Windows.Forms +{ + public class TImageBox : System.Windows.Forms.PictureBox + { + public TImageBox() : base() + { + this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.ErrorImage = null; + this.InitialImage = null; + this.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + } + + protected override void OnCreateControl() + { + OnMouseLeave(null); + + 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; } + + [Category("Appearance"), Browsable(true)] + public Image ImageHover { get; set; } + + [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); + } + + 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); + } + + 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/RyzStudio/Windows/Forms/TPanelBook.cs b/RyzStudio/Windows/Forms/TPanelBook.cs new file mode 100644 index 0000000..eae6a0f --- /dev/null +++ b/RyzStudio/Windows/Forms/TPanelBook.cs @@ -0,0 +1,258 @@ +namespace RyzStudio.Windows.Forms +{ + using System; + using System.Collections; + using System.ComponentModel; + using System.Drawing; + using System.Windows.Forms; + + [ToolboxItem(true)] + public class TPanelBook : UserControl + { + public class PanelCollection : CollectionBase + { + protected TPanelBook panelBook = null; + + public PanelCollection(TPanelBook parentPanelBook) : base() + { + panelBook = parentPanelBook; + } + + public TPanelBook Parent => panelBook; + + public Panel this[int index] { get => (Panel)List[index]; set => List[index] = value; } + + public int Add(Panel value) => List.Add(value); + + public void AddRange(Panel[] pages) => Array.ForEach(pages, x => this.Add(x)); + + public bool Contains(Panel value) => List.Contains(value); + + public int IndexOf(Panel value) => List.IndexOf(value); + + public void Insert(int index, Panel value) => List.Insert(index, value); + + public void Remove(Panel value) => List.Remove(value); + + protected override void OnInsertComplete(int index, object value) + { + base.OnInsertComplete(index, value); + + if (panelBook != null) + { + panelBook.PageIndex = index; + } + } + + protected override void OnRemoveComplete(int index, object value) + { + base.OnRemoveComplete(index, value); + + if (panelBook != null) + { + if (panelBook.PageIndex == index) + { + if (index < InnerList.Count) + { + panelBook.PageIndex = index; + } + else + { + panelBook.PageIndex = InnerList.Count - 1; + } + } + } + } + + } + + private System.ComponentModel.IContainer components = null; + + protected PanelCollection panelCollection = null; + + public TPanelBook() + { + InitializeComponent(); + + panelCollection = new PanelCollection(this); + } + + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + + base.Dispose(disposing); + } + + protected void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public Panel ActivePanel { get; protected set; } = null; + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override bool AutoScroll { get => base.AutoScroll; set => base.AutoScroll = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Size AutoScrollMargin { get => base.AutoScrollMargin; set => base.AutoScrollMargin = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Size AutoScrollMinSize { get => base.AutoScrollMinSize; set => base.AutoScrollMinSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Image BackgroundImage { get => base.BackgroundImage; set => base.BackgroundImage = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override ImageLayout BackgroundImageLayout { get => base.BackgroundImageLayout; set => base.BackgroundImageLayout = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new ImeMode ImeMode { get => base.ImeMode; set => base.ImeMode = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override RightToLeft RightToLeft { get => base.RightToLeft; set => base.RightToLeft = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool UseWaitCursor { get => base.UseWaitCursor; set => base.UseWaitCursor = value; } + + [Category("Collection")] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] + public PanelCollection Pages => panelCollection; + + [Category("Collection")] + public int SelectedIndex + { + get => (panelCollection.Count <= 0) ? -1 : panelCollection.IndexOf(this.ActivePanel); + set + { + if (panelCollection.Count <= 0) return; + if (value < 0) return; + if (value > (panelCollection.Count - 1)) return; + if (value == this.SelectedIndex) return; + + ActivatePage(value); + } + } + + protected internal int PageIndex + { + get => panelCollection.IndexOf(this.ActivePanel); + set + { + if (panelCollection.Count <= 0) + { + ActivatePage(-1); + return; + } + + if ((value < -1) || (value >= panelCollection.Count)) + { + throw new ArgumentOutOfRangeException("PageIndex", value, "The page index must be between 0 and " + Convert.ToString(panelCollection.Count - 1)); + } + + ActivatePage(value); + } + } + + protected internal void ActivatePage(int index) + { + if ((panelCollection.Count == 0) && (index >= panelCollection.Count) && (index <= 0)) + { + return; + } + + Panel p = (Panel)panelCollection[index]; + + ActivatePage(p); + } + + protected internal void ActivatePage(Panel page) + { + if (this.ActivePanel != null) + { + if (this.ActivePanel.InvokeRequired) + { + this.ActivePanel.Invoke(new MethodInvoker(() => { + this.ActivePanel.Visible = false; + })); + } + else + { + this.ActivePanel.Visible = false; + } + } + + this.ActivePanel = page; + if (this.ActivePanel != null) + { + this.ActivePanel.Parent = this; + if (!this.Contains(this.ActivePanel)) + { + this.Container.Add(this.ActivePanel); + } + + if (this.ActivePanel.InvokeRequired) + { + this.ActivePanel.Invoke(new MethodInvoker(() => { + this.ActivePanel.Dock = DockStyle.Fill; + this.ActivePanel.Visible = true; + this.ActivePanel.BringToFront(); + })); + } + else + { + this.ActivePanel.Dock = DockStyle.Fill; + this.ActivePanel.Visible = true; + this.ActivePanel.BringToFront(); + } + } + + if (this.ActivePanel != null) + { + if (this.ActivePanel.InvokeRequired) + { + this.ActivePanel.Invoke(new MethodInvoker(() => { + this.ActivePanel.Invalidate(); + })); + } + else + { + this.ActivePanel.Invalidate(); + } + } + else + { + this.Invalidate(); + } + } + +#if DEBUG + + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + + if (this.DesignMode) + { + this.Invalidate(); + } + } + +#endif + + protected override void DestroyHandle() + { + base.DestroyHandle(); + + foreach (Panel p in panelCollection) + { + p.Dispose(); + } + } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/Forms/TUserControl.cs b/RyzStudio/Windows/Forms/TUserControl.cs new file mode 100644 index 0000000..8a22585 --- /dev/null +++ b/RyzStudio/Windows/Forms/TUserControl.cs @@ -0,0 +1,73 @@ +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace RyzStudio.Windows.Forms +{ + public class TUserControl : UserControl + { + + public TUserControl() : base() + { + + } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Image BackgroundImage { get => base.BackgroundImage; set => base.BackgroundImage = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override ImageLayout BackgroundImageLayout { get => base.BackgroundImageLayout; set => base.BackgroundImageLayout = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new BorderStyle BorderStyle { get => base.BorderStyle; set => base.BorderStyle = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Cursor Cursor { get => base.Cursor; set => base.Cursor = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Font Font { get => base.Font; set => base.Font = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Color ForeColor { get => base.ForeColor; set => base.ForeColor = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override RightToLeft RightToLeft { get => base.RightToLeft; set => base.RightToLeft = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool UseWaitCursor { get => base.UseWaitCursor; set => base.UseWaitCursor = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override bool AllowDrop { get => base.AllowDrop; set => base.AllowDrop = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override AutoValidate AutoValidate { get => base.AutoValidate; set => base.AutoValidate = value; } + + //[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + //public override ContextMenuStrip ContextMenuStrip { get => base.ContextMenuStrip; set => base.ContextMenuStrip = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new ImeMode ImeMode { get => base.ImeMode; set => base.ImeMode = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override bool AutoScroll { get => base.AutoScroll; set => base.AutoScroll = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Size AutoScrollMargin { get => base.AutoScrollMargin; set => base.AutoScrollMargin = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Size AutoScrollMinSize { get => base.AutoScrollMinSize; set => base.AutoScrollMinSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override bool AutoSize { get => base.AutoSize; set => base.AutoSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new AutoSizeMode AutoSizeMode { get => base.AutoSizeMode; set => base.AutoSizeMode = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Size MaximumSize { get => base.MaximumSize; set => base.MaximumSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Size MinimumSize { get => base.MinimumSize; set => base.MinimumSize = value; } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/Forms/ThreadControl.cs b/RyzStudio/Windows/Forms/ThreadControl.cs new file mode 100644 index 0000000..21e2eae --- /dev/null +++ b/RyzStudio/Windows/Forms/ThreadControl.cs @@ -0,0 +1,815 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace RyzStudio.Windows.Forms +{ + public class ThreadControl + { + public static void Add(Control control, Control value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => + { + control.Controls.Add(value); + })); + } + else + { + control.Controls.Add(value); + } + } + + public static void Add(ListBox control, string value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Items.Add(value); + })); + } + else + { + control.Items.Add(value); + } + } + + public static void Add(ComboBox control, string value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Items.Add(value); + })); + } + else + { + control.Items.Add(value); + } + } + + //public static void Add(FlowLayoutPanel control, Control value) + //{ + // if (control.InvokeRequired) + // { + // control.Invoke(new MethodInvoker(() => { + // control.Controls.Add(value); + // })); + // } + // else + // { + // control.Controls.Add(value); + // } + //} + + public static int Add(TreeView control, TreeNode value) + { + int n = -1; + + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + n = control.Nodes.Add(value); + })); + } + else + { + n = control.Nodes.Add(value); + } + + return n; + } + + public static int Add(TreeNode control, TreeNode value) + { + int n = -1; + + if (control.TreeView.InvokeRequired) + { + control.TreeView.Invoke(new MethodInvoker(() => { + n = control.Nodes.Add(value); + })); + } + else + { + n = control.Nodes.Add(value); + } + + return n; + } + + public static int Add(DataGridView control, object[] value) + { + int n = -1; + + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + n = control.Rows.Add(value); + })); + } + else + { + n = control.Rows.Add(value); + } + + return n; + } + + public static int Add(DataGridView control, object[] value, object tag) + { + int n = -1; + + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + n = control.Rows.Add(value); + control.Rows[n].Tag = tag; + })); + } + else + { + n = control.Rows.Add(value); + control.Rows[n].Tag = tag; + } + + return n; + } + + public static TreeNode Add(TreeView control, string key, string text) + { + TreeNode rv = null; + + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + rv = control.Nodes.Add(key, text); + })); + } + else + { + rv = control.Nodes.Add(key, text); + } + + return rv; + } + + public static TreeNode Add(TreeNode control, string key, string text) + { + TreeNode rv = null; + + if (control.TreeView.InvokeRequired) + { + control.TreeView.Invoke(new MethodInvoker(() => { + rv = control.Nodes.Add(key, text); + })); + } + else + { + rv = control.Nodes.Add(key, text); + } + + return rv; + } + + public static TreeNode Add(TreeView parentControl, TreeNodeCollection control, string key, string text, int imageIndex, int selectedImageIndex) + { + TreeNode rv = null; + + if (parentControl.InvokeRequired) + { + parentControl.Invoke(new MethodInvoker(() => { + rv = control.Add(key, text, imageIndex, selectedImageIndex); + })); + } + else + { + rv = control.Add(key, text, imageIndex, selectedImageIndex); + } + + return rv; + } + + public static TreeNode Add(TreeNode control, string key, string text, int imageIndex, int selectedImageIndex) + { + TreeNode rv = null; + + if (control.TreeView.InvokeRequired) + { + control.TreeView.Invoke(new MethodInvoker(() => { + rv = control.Nodes.Add(key, text, imageIndex, selectedImageIndex); + })); + } + else + { + rv = control.Nodes.Add(key, text, imageIndex, selectedImageIndex); + } + + return rv; + } + + public static TreeNode Add(TreeView control, string key, string text, int imageIndex, int selectedImageIndex) + { + TreeNode rv = null; + + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + rv = control.Nodes.Add(key, text, imageIndex, selectedImageIndex); + })); + } + else + { + rv = control.Nodes.Add(key, text, imageIndex, selectedImageIndex); + } + + return rv; + } + + public static void Add(TreeView parentControl, ImageList control, Image value) + { + if (parentControl.InvokeRequired) + { + parentControl.Invoke(new MethodInvoker(() => { + control.Images.Add(value); + })); + } + else + { + control.Images.Add(value); + } + } + + public static void Add(Control parentControl, ImageList control, string key, Image value) + { + if (parentControl.InvokeRequired) + { + parentControl.Invoke(new MethodInvoker(() => { + control.Images.Add(key, value); + })); + } + else + { + control.Images.Add(key, value); + } + } + + public static void AddLine(RichTextBox control, string text) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => + { + control.Text += text + Environment.NewLine; + })); + } + else + { + control.Text += text + Environment.NewLine; + } + } + + public static void Clear(ListBox control) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Items.Clear(); + })); + } + else + { + control.Items.Clear(); + } + } + + public static void Clear(ComboBox control) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Items.Clear(); + })); + } + else + { + control.Items.Clear(); + } + } + + public static void Clear(TreeView parentControl, ImageList control) + { + if (parentControl.InvokeRequired) + { + parentControl.Invoke(new MethodInvoker(() => { + control.Images.Clear(); + })); + } + else + { + control.Images.Clear(); + } + } + + public static void Clear(FlowLayoutPanel control) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Controls.Clear(); + })); + } + else + { + control.Controls.Clear(); + } + } + + public static void Clear(TreeView control) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Nodes.Clear(); + })); + } + else + { + control.Nodes.Clear(); + } + } + + public static void Clear(Label control) => SetText(control, string.Empty); + + public static void Clear(PictureBox control) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => + { + control.Image = null; + })); + } + else + { + control.Image = null; + } + } + + public static void Clear(DataGridView control) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => + { + control.Rows.Clear(); + })); + } + else + { + control.Rows.Clear(); + } + } + + public static void Expand(TreeNode control) + { + if (control.TreeView.InvokeRequired) + { + control.TreeView.Invoke(new MethodInvoker(() => { + control.Expand(); + })); + } + else + { + control.Expand(); + } + } + + public static List FindChildControl(Control control) where T : Control + { + List rs = new List(); + + foreach (Control item in control.Controls) + { + var ctr = item as T; + if (ctr == null) + { + rs.AddRange(FindChildControl(item)); + } + else + { + rs.Add(ctr); + } + } + + return rs; + } + + public static string GetSelectedValue(ListBox sender) + { + string rv = string.Empty; + + if (sender.InvokeRequired) + { + sender.Invoke(new MethodInvoker(() => { + rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString(); + })); + } + else + { + rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString(); + } + + return rv; + } + + public static string GetText(Control control, bool doTrim = true) + { + string rv = string.Empty; + + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + rv = (doTrim ? control.Text?.Trim() : control.Text); + })); + } + else + { + rv = (doTrim ? control.Text?.Trim() : control.Text); + } + + return rv; + } + + public static int GetValue(NumericUpDown sender) + { + int rv = 0; + + if (sender.InvokeRequired) + { + sender.Invoke(new MethodInvoker(() => { + rv = (int)sender.Value; + })); + } + else + { + rv = (int)sender.Value; + } + + return rv; + } + + public static bool IsChild(TreeNode dragNode, TreeNode dropNode) + { + TreeNode tn = dropNode; + while (true) + { + if (tn.Parent == null) + { + break; + } + + if (tn.Equals(dragNode)) + { + return true; + } + + tn = tn.Parent; + } + + return false; + } + + public static void SetChecked(ToolStripMenuItem control, bool value) + { + if (control.GetCurrentParent().InvokeRequired) + { + control.GetCurrentParent().Invoke(new MethodInvoker(() => + { + control.Checked = value; + })); + } + else + { + control.Checked = value; + } + } + + public static void SetClientHeight(Control control, int value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.ClientSize = new Size(control.ClientSize.Width, value); + })); + } + else + { + control.ClientSize = new Size(control.ClientSize.Width, value); + } + } + + public static void SetClientSize(Control control, int width, int height) => SetClientSize(control, new Size(width, height)); + + public static void SetClientSize(Control control, Size value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.ClientSize = value; + })); + } + else + { + control.ClientSize = value; + } + } + + public static void SetClientWidth(Control control, int value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.ClientSize = new Size(value, control.ClientSize.Height); + })); + } + else + { + control.ClientSize = new Size(value, control.ClientSize.Height); + } + } + + public static void SetEnable(Control control, bool value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => + { + control.Enabled = value; + })); + } + else + { + control.Enabled = value; + } + } + + public static void SetEnable(ToolStripMenuItem control, bool value) + { + if (control.GetCurrentParent() == null) + { + control.Enabled = value; + return; + } + + if (control.GetCurrentParent().InvokeRequired) + { + control.GetCurrentParent().Invoke(new MethodInvoker(() => + { + control.Enabled = value; + })); + } + else + { + control.Enabled = value; + } + } + + public static void SetFocus(Control control) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => + { + control.Focus(); + })); + } + else + { + control.Focus(); + } + } + + public static void SetHeight(Control control, int value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Height = value; + })); + } + else + { + control.Height = value; + } + } + + public static void SetLocation(Control control, Point value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Location = value; + })); + } + else + { + control.Location = value; + } + } + + public static void SetSize(Control control, int width, int height) => SetSize(control, new Size(width, height)); + + public static void SetSize(Control control, Size value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Size = value; + })); + } + else + { + control.Size = value; + } + } + + public static void SetText(Control control, string text) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => + { + control.Text = text; + })); + } + else + { + control.Text = text; + } + } + + public static void SetTopMost(Form control, bool value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.TopMost = value; + })); + } + else + { + control.TopMost = value; + } + } + + public static void SetValue(Control control, string value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Text = value; + })); + } + else + { + control.Text = value; + } + } + + public static void SetValue(ComboBox control, int value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.SelectedIndex = value; + })); + } + else + { + control.SelectedIndex = value; + } + } + + public static void SetValue(PictureBox control, Image value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => + { + control.Image = value; + })); + } + else + { + control.Image = value; + } + } + + public static string GetValue(ListBox sender) + { + string rv = string.Empty; + + if (sender.InvokeRequired) + { + sender.Invoke(new MethodInvoker(() => { + rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString(); + })); + } + else + { + rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString(); + } + + return rv; + } + + public static int GetValue(ComboBox sender) + { + int rv = -1; + + if (sender.InvokeRequired) + { + sender.Invoke(new MethodInvoker(() => { + rv = sender.SelectedIndex; + })); + } + else + { + rv = sender.SelectedIndex; + } + + return rv; + } + + public static void SetVisible(Control control, bool value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Visible = value; + })); + } + else + { + control.Visible = value; + } + } + + public static void SetVisible(Form control, bool value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + if (value) + { + //control.ShowInTaskbar = value; + //control.Opacity = 100; + control.Visible = value; + } + else + { + control.Visible = value; + //control.ShowInTaskbar = value; + //control.Opacity = 0; + } + })); + } + else + { + if (value) + { + //control.ShowInTaskbar = value; + //control.Opacity = 100; + control.Visible = value; + } + else + { + control.Visible = value; + //control.ShowInTaskbar = value; + //control.Opacity = 0; + } + } + } + + public static void SetWidth(Control control, int value) + { + if (control.InvokeRequired) + { + control.Invoke(new MethodInvoker(() => { + control.Width = value; + })); + } + else + { + control.Width = value; + } + } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/PickerBox/TNumericPickerBox.cs b/RyzStudio/Windows/ThemedForms/PickerBox/TNumericPickerBox.cs new file mode 100644 index 0000000..fdb0413 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/PickerBox/TNumericPickerBox.cs @@ -0,0 +1,52 @@ +using RyzStudio.Windows.Forms; +using System.Windows.Forms; + +namespace RyzStudio.Windows.ThemedForms +{ + public class TNumericPickerBox : TPickerBox + { + protected int minimumValue = 0; + protected int maximumValue = 50; + + + public TNumericPickerBox() : base() + { + this.ComboBox.MaxDropDownItems = 10; + + this.Clear(); + } + + + public ComboBox InnerControl { get => this.ComboBox; } + + public int Value + { + get => (ThreadControl.GetValue(this.ComboBox) + minimumValue); + set => ThreadControl.SetValue(this.ComboBox, (value - minimumValue)); + } + + + public void Clear() + { + ThreadControl.Clear(this.ComboBox); + ThreadControl.Add(this.ComboBox, "0"); + ThreadControl.SetValue(this.ComboBox, 0); + } + + public void Clear(int min, int max, int value) + { + minimumValue = min; + maximumValue = max; + + ThreadControl.Clear(this.ComboBox); + + for (int i=min; i< max; i++) + { + ThreadControl.Add(this.ComboBox, i.ToString()); + } + + this.Value = value; + } + + } +} diff --git a/RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.cs b/RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.cs new file mode 100644 index 0000000..255f98c --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.cs @@ -0,0 +1,98 @@ +namespace RyzStudio.Windows.ThemedForms +{ + using RyzStudio.Drawing; + using System; + using System.ComponentModel; + using System.Drawing; + using System.Windows.Forms; + + public partial class TPickerBox : RyzStudio.Windows.ThemedForms.TUserControl + { + protected readonly Padding textboxPadding = new Padding(6, 2, 4, 2); + + public TPickerBox() : base() + { + InitializeComponent(); + + this.Font = new Font(this.Font, FontStyle.Regular); + this.Margin = new Padding(10, 4, 10, 4); + + comboBox1.Font = this.Font; + comboBox1.DropDownStyle = ComboBoxStyle.DropDownList; + comboBox1.PreviewKeyDown += textBox_PreviewKeyDown; + } + + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Height = comboBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom); + } + + protected override void OnGotFocus(EventArgs e) + { + base.OnGotFocus(e); + + comboBox1.Focus(); + } + + protected void textBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Enter: + if (this.SubmitButton != null) + { + this.SubmitButton.PerformClick(); + } + + break; + case Keys.Escape: + close(); + break; + default: break; + } + } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public System.Windows.Forms.ComboBox ComboBox { get => comboBox1; set => comboBox1 = value; } + + //[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + //[Category("Appearance")] + //public new string Text + //{ + // get => textBox1.Text; + // set + // { + // textBox1.Text = value; + // textBox1.SelectionStart = textBox1.Text.Length; + // } + //} + + //[Browsable(true)] + //[Category("Appearance")] + //public ComboBox.ObjectCollection Items { get => comboBox1.Items; set => comboBox1.Items = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public TButton SubmitButton { get; set; } = null; + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Margin { get => base.Margin; set => base.Margin = value; } + + protected override void updateBackground(Graphics g, ThemeStyle style) + { + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom)); + + Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth); + g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath()); + g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath()); + } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.designer.cs b/RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.designer.cs new file mode 100644 index 0000000..760329f --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.designer.cs @@ -0,0 +1,59 @@ +namespace RyzStudio.Windows.ThemedForms +{ + partial class TPickerBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.SuspendLayout(); + // + // comboBox1 + // + this.comboBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.comboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(4, 4); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(121, 21); + this.comboBox1.TabIndex = 0; + // + // PickerBox + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.comboBox1); + this.Name = "PickerBox"; + this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.Size = new System.Drawing.Size(128, 32); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ComboBox comboBox1; + } +} diff --git a/RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.resx b/RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/PickerBox/TPickerBox.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/PickerBox/TYesNoPickerBox.cs b/RyzStudio/Windows/ThemedForms/PickerBox/TYesNoPickerBox.cs new file mode 100644 index 0000000..e9b0557 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/PickerBox/TYesNoPickerBox.cs @@ -0,0 +1,27 @@ +using RyzStudio.Windows.Forms; +using System.Windows.Forms; + +namespace RyzStudio.Windows.ThemedForms +{ + public class TYesNoPickerBox : TPickerBox + { + + public TYesNoPickerBox() : base() + { + this.ComboBox.Items.Clear(); + + this.ComboBox.Items.AddRange(new string[] { "No", "Yes" }); + if (this.ComboBox.Items.Count > 0) this.ComboBox.SelectedIndex = 0; + } + + + public ComboBox InnerControl { get => this.ComboBox; } + + public bool Value + { + get => (ThreadControl.GetValue(this.ComboBox) == 1); + set => ThreadControl.SetValue(this.ComboBox, (value ? 1 : 0)); + } + + } +} diff --git a/RyzStudio/Windows/ThemedForms/TButton.cs b/RyzStudio/Windows/ThemedForms/TButton.cs new file mode 100644 index 0000000..aff4fd2 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TButton.cs @@ -0,0 +1,183 @@ +namespace RyzStudio.Windows.ThemedForms +{ + using RyzStudio.Windows.Forms; + using System; + using System.ComponentModel; + using System.Drawing; + using System.Windows.Forms; + + public partial class TButton : RyzStudio.Windows.ThemedForms.TUserControl + { + public class ButtonStyle + { + public Color BackColour { get; set; } = Color.Transparent; + public Color PenColour { get; set; } = Color.Transparent; + public Image ForeImage { get; set; } = null; + } + + public enum ButtonState + { + Idle = 0, + Hover, + Down + } + + protected ButtonState controlState = ButtonState.Idle; + protected bool isSelected = false; + + public TButton() + { + InitializeComponent(); + + this.Margin = new Padding(10); + + label1.ImageAlign = ContentAlignment.MiddleCenter; + label1.Click += label1_Click; + label1.MouseClick += label1_MouseClick; + label1.MouseEnter += delegate { this.VisualState = ButtonState.Hover; }; + label1.MouseLeave += delegate { this.VisualState = ButtonState.Idle; }; + label1.MouseDown += delegate { this.VisualState = ButtonState.Down; }; + label1.MouseUp += delegate { this.VisualState = ButtonState.Idle; }; + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.StyleDefault = new ButtonStyle() + { + BackColour = Color.White, + PenColour = Color.Black, + ForeImage = this.DefaultImage + }; + this.StyleDown = new ButtonStyle() + { + BackColour = Color.FromArgb(60, 53, 148), + PenColour = Color.White, + ForeImage = this.DownImage + }; + this.StyleOver = new ButtonStyle() + { + BackColour = Color.FromArgb(108, 101, 196), + PenColour = Color.White, + ForeImage = this.OverImage + }; + this.StyleSelected = new ButtonStyle() + { + BackColour = Color.FromArgb(51, 51, 51), + PenColour = Color.White, + ForeImage = this.OverImage + }; + + this.VisualState = ButtonState.Idle; + } + + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Margin { get => base.Margin; set => base.Margin = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Padding { get => base.Padding; set => base.Padding = value; } + + + protected ButtonState VisualState + { + get { return controlState; } + set + { + switch (value) + { + case ButtonState.Idle: + if (this.VisualState == ButtonState.Down) + { + updateButton(StyleOver); + } + else + { + if (this.IsSelected) + { + updateButton(StyleSelected); + } + else + { + updateButton(StyleDefault); + } + } + + break; + case ButtonState.Hover: + updateButton(StyleOver); + break; + case ButtonState.Down: + updateButton(StyleDown); + break; + default: + if (this.IsSelected) + { + updateButton(StyleSelected); + } + else + { + updateButton(StyleDefault); + } + + break; + } + + controlState = value; + } + } + + protected void updateButton(ButtonStyle style) + { + label1.ForeColor = style.PenColour; + label1.BackColor = style.BackColour; + label1.Image = style.ForeImage; + } + + [Browsable(true)] + [Category("Appearance")] + public string LabelText { get => ThreadControl.GetText(label1); set => ThreadControl.SetText(label1, value); } + + [Browsable(true)] + [Category("Appearance")] + public Image OverImage { get; set; } = null; + + [Browsable(true)] + [Category("Appearance")] + public Image DownImage { get; set; } = null; + + [Browsable(true)] + [Category("Appearance")] + public Image DefaultImage { get; set; } = null; + + public bool IsSelected + { + get => isSelected; + set + { + isSelected = value; + + this.VisualState = this.VisualState; + } + } + + + protected ButtonStyle StyleOver { get; set; } = new ButtonStyle(); + + protected ButtonStyle StyleDown { get; set; } = new ButtonStyle(); + + protected ButtonStyle StyleDefault { get; set; } = new ButtonStyle(); + + protected ButtonStyle StyleSelected { get; set; } = new ButtonStyle(); + + + private void label1_MouseClick(object sender, MouseEventArgs e) => this.OnMouseClick(e); + + private void label1_Click(object sender, EventArgs e) => this.OnClick(e); + + + public void PerformClick() => this.OnClick(null); + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TButton.designer.cs b/RyzStudio/Windows/ThemedForms/TButton.designer.cs new file mode 100644 index 0000000..687d7a0 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TButton.designer.cs @@ -0,0 +1,62 @@ +namespace RyzStudio.Windows.ThemedForms +{ + partial class TButton + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Location = new System.Drawing.Point(4, 4); + this.label1.Margin = new System.Windows.Forms.Padding(0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(142, 30); + this.label1.TabIndex = 0; + this.label1.Text = "label1"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // TButton + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label1); + this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.Name = "TButton"; + this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.Size = new System.Drawing.Size(149, 37); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label1; + } +} diff --git a/RyzStudio/Windows/ThemedForms/TButton.resx b/RyzStudio/Windows/ThemedForms/TButton.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TButton.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TDialogForm.Designer.cs b/RyzStudio/Windows/ThemedForms/TDialogForm.Designer.cs new file mode 100644 index 0000000..0133a0e --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TDialogForm.Designer.cs @@ -0,0 +1,47 @@ +namespace RyzStudio.Windows.ThemedForms +{ + partial class TDialogForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // TDialogForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(249)))), ((int)(((byte)(250))))); + this.ClientSize = new System.Drawing.Size(340, 600); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MinimumSize = new System.Drawing.Size(40, 0); + this.Name = "TDialogForm"; + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TDialogForm.cs b/RyzStudio/Windows/ThemedForms/TDialogForm.cs new file mode 100644 index 0000000..23d11df --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TDialogForm.cs @@ -0,0 +1,117 @@ +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace RyzStudio.Windows.ThemedForms +{ + public partial class TDialogForm : Form + { + public TDialogForm() + { + this.InitializeComponent(); + + this.BackColor = Color.FromArgb(254, 254, 254); + this.FormBorderStyle = FormBorderStyle.Sizable; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Padding = new Padding(5, 10, 5, 10); + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = FormStartPosition.WindowsDefaultLocation; + this.TopMost = true; + this.SizeGripStyle = SizeGripStyle.Hide; + this.AutoScaleMode = AutoScaleMode.None; + } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Color BackColor { get => base.BackColor; set => base.BackColor = value; } + + [Browsable(false)] + public override Image BackgroundImage { get => base.BackgroundImage; set => base.BackgroundImage = value; } + + [Browsable(false)] + public override ImageLayout BackgroundImageLayout { get => base.BackgroundImageLayout; set => base.BackgroundImageLayout = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new FormBorderStyle FormBorderStyle { get => base.FormBorderStyle; set => base.FormBorderStyle = value; } + + //[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + //public override Size MaximumSize { get => base.MaximumSize; set => base.MaximumSize = value; } + + //[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + //public override Size MinimumSize { get => base.MinimumSize; set => base.MinimumSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Padding { get => base.Padding; set => base.Padding = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool ShowIcon { get => base.ShowIcon; set => base.ShowIcon = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool ShowInTaskbar { get => base.ShowInTaskbar; set => base.ShowInTaskbar = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new FormStartPosition StartPosition { get => base.StartPosition; set => base.StartPosition = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool TopMost { get => base.TopMost; set => base.TopMost = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override Cursor Cursor { get => base.Cursor; set => base.Cursor = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override RightToLeft RightToLeft { get => base.RightToLeft; set => base.RightToLeft = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override bool RightToLeftLayout { get => base.RightToLeftLayout; set => base.RightToLeftLayout = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool UseWaitCursor { get => base.UseWaitCursor; set => base.UseWaitCursor = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new ImeMode ImeMode { get => base.ImeMode; set => base.ImeMode = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public override bool AutoSize { get => base.AutoSize; set => base.AutoSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new AutoSizeMode AutoSizeMode { get => base.AutoSizeMode; set => base.AutoSizeMode = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool MinimizeBox { get => base.MinimizeBox; set => base.MinimizeBox = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool MaximizeBox { get => base.MaximizeBox; set => base.MaximizeBox = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool ControlBox { get => base.ControlBox; set => base.ControlBox = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool HelpButton { get => base.HelpButton; set => base.HelpButton = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new MenuStrip MainMenuStrip { get => base.MainMenuStrip; set => base.MainMenuStrip = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new SizeGripStyle SizeGripStyle { get => base.SizeGripStyle; set => base.SizeGripStyle = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new AutoScaleMode AutoScaleMode { get => base.AutoScaleMode; set => base.AutoScaleMode = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new bool AutoScroll { get => base.AutoScroll; set => base.AutoScroll = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Size AutoScrollMargin { get => base.AutoScrollMargin; set => base.AutoScrollMargin = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Size AutoScrollMinSize { get => base.AutoScrollMinSize; set => base.AutoScrollMinSize = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Point AutoScrollOffset { get => base.AutoScrollOffset; set => base.AutoScrollOffset = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new FormWindowState WindowState { get => base.WindowState; set => base.WindowState = value; } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TDialogForm.resx b/RyzStudio/Windows/ThemedForms/TDialogForm.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TDialogForm.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TListBox.cs b/RyzStudio/Windows/ThemedForms/TListBox.cs new file mode 100644 index 0000000..3f84e9c --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TListBox.cs @@ -0,0 +1,385 @@ +using RyzStudio.Drawing; +using System; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; +using UIResource = BookmarkManager.UIResource; + +namespace RyzStudio.Windows.ThemedForms +{ + public partial class TListBox : RyzStudio.Windows.ThemedForms.TUserControl + { + protected readonly Padding textboxPadding = new Padding(6, 2, 4, 2); + + public TListBox() : base() + { + InitializeComponent(); + + this.Font = new Font(this.Font, FontStyle.Regular); + this.Margin = new Padding(10, 4, 10, 4); + + listBox1.Font = this.Font; + listBox1.BorderStyle = BorderStyle.None; + } + + //protected override void OnResize(EventArgs e) + //{ + // base.OnResize(e); + + // //int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + // //this.Height = comboBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom); + //} + + protected override void OnGotFocus(EventArgs e) + { + base.OnGotFocus(e); + + listBox1.Focus(); + } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public System.Windows.Forms.ListBox ListBox { get => listBox1; set => listBox1 = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public TButton SubmitButton { get; set; } = null; + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Margin { get => base.Margin; set => base.Margin = value; } + + [Browsable(false)] + public event EventHandler OnAdd; + + [Browsable(false)] + public event EventHandler OnEdit; + + protected override void updateBackground(Graphics g, ThemeStyle style) + { + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom)); + + Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth); + g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath()); + g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath()); + } + + /// + /// Add + /// + /// + /// + private void imageBox1_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + { + return; + } + + this.OnAdd?.Invoke(sender, e); + } + + /// + /// Edit + /// + /// + /// + private void tImageBox1_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + { + return; + } + + editToolStripMenuItem_Click(sender, e); + } + + /// + /// Menu + /// + /// + /// + private void imageBox5_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + { + return; + } + + contextMenuStrip1.Show(Cursor.Position); + } + + /// + /// Move up + /// + /// + /// + private void imageBox3_MouseClick(object sender, MouseEventArgs e) + { + if (e != null) + { + if (e.Button != MouseButtons.Left) + { + return; + } + } + + moveUpToolStripMenuItem_Click(sender, e); + } + + /// + /// Move down + /// + /// + /// + private void imageBox4_MouseClick(object sender, MouseEventArgs e) + { + if (e != null) + { + if (e.Button != MouseButtons.Left) + { + return; + } + } + + moveDownToolStripMenuItem_Click(sender, e); + } + + private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) + { + editToolStripMenuItem_Click(sender, e); + } + + private void listBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Enter: + if (this.SubmitButton != null) + { + this.SubmitButton.PerformClick(); + } + + break; + case Keys.Escape: + close(); + break; + case Keys.Up: + if (e.Alt) + { + imageBox3_MouseClick(sender, null); + } + + break; + case Keys.Down: + if (e.Alt) + { + imageBox4_MouseClick(sender, null); + } + + break; + default: break; + } + } + + #region context menu + + /// + /// Add + /// + /// + /// + private void addItemToolStripMenuItem_Click(object sender, EventArgs e) + { + this.OnAdd?.Invoke(sender, e); + } + + /// + /// Copy + /// + /// + /// + private void toolStripMenuItem2_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex <= 0) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + + listBox1.Items.Add(item); + listBox1.SelectedIndex = (listBox1.Items.Count- 1); + } + + /// + /// Edit + /// + /// + /// + private void editToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex < 0) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + this.OnEdit?.Invoke(sender, e); + } + + /// + /// Remove + /// + /// + /// + private void removeToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex < 0) + { + return; + } + + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + + if (pos > (listBox1.Items.Count - 1)) + { + pos = (listBox1.Items.Count - 1); + } + + listBox1.SelectedIndex = pos; + } + + /// + /// Remove all + /// + /// + /// + private void toolStripMenuItem1_Click(object sender, EventArgs e) + { + listBox1.Items.Clear(); + } + + /// + /// Move to top + /// + /// + /// + private void moveToTopToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex <= 0) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + listBox1.Items.Insert(0, item); + + listBox1.SelectedIndex = 0; + } + + /// + /// Move up + /// + /// + /// + private void moveUpToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex <= 0) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + listBox1.Items.Insert((pos - 1), item); + + listBox1.SelectedIndex = (pos - 1); + } + + /// + /// Move down + /// + /// + /// + private void moveDownToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex >= (listBox1.Items.Count - 1)) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + listBox1.Items.Insert((pos + 1), item); + + listBox1.SelectedIndex = (pos + 1); + } + + /// + /// Move to bottom + /// + /// + /// + private void moveToBottomToolStripMenuItem_Click(object sender, EventArgs e) + { + int n = (listBox1.Items.Count - 1); + + if (listBox1.SelectedIndex >= (listBox1.Items.Count - 1)) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + listBox1.Items.Insert(n, item); + + listBox1.SelectedIndex = n; + } + + #endregion + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TListBox.designer.cs b/RyzStudio/Windows/ThemedForms/TListBox.designer.cs new file mode 100644 index 0000000..af75f87 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TListBox.designer.cs @@ -0,0 +1,358 @@ +using System.Drawing; + +namespace RyzStudio.Windows.ThemedForms +{ + partial class TListBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.imageBox5 = new RyzStudio.Windows.Forms.TImageBox(); + this.imageBox4 = new RyzStudio.Windows.Forms.TImageBox(); + this.imageBox3 = new RyzStudio.Windows.Forms.TImageBox(); + this.imageBox1 = new RyzStudio.Windows.Forms.TImageBox(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.addItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.moveToTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.moveUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.moveDownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.moveToBottomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tImageBox1 = new RyzStudio.Windows.Forms.TImageBox(); + ((System.ComponentModel.ISupportInitialize)(this.imageBox5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageBox4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageBox3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageBox1)).BeginInit(); + this.contextMenuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tImageBox1)).BeginInit(); + this.SuspendLayout(); + // + // listBox1 + // + this.listBox1.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.listBox1.BackColor = System.Drawing.SystemColors.Window; + this.listBox1.FormattingEnabled = true; + this.listBox1.ItemHeight = 15; + this.listBox1.Location = new System.Drawing.Point(4, 4); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(98, 214); + this.listBox1.TabIndex = 0; + this.listBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDoubleClick); + this.listBox1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.listBox1_PreviewKeyDown); + // + // imageBox5 + // + this.imageBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.imageBox5.BackColor = System.Drawing.Color.Transparent; + this.imageBox5.BackColorHover = System.Drawing.Color.Transparent; + this.imageBox5.BackColorNormal = System.Drawing.Color.Transparent; + this.imageBox5.BackColorSelected = System.Drawing.Color.Transparent; + this.imageBox5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.imageBox5.ErrorImage = null; + this.imageBox5.HoverImage = global::BookmarkManager.UIResource.circle_menu2; + this.imageBox5.Image = global::BookmarkManager.UIResource.circle_menu; + this.imageBox5.ImageHover = global::BookmarkManager.UIResource.circle_menu2; + this.imageBox5.ImageNormal = global::BookmarkManager.UIResource.circle_menu; + this.imageBox5.ImageSelected = null; + this.imageBox5.InitialImage = null; + this.imageBox5.IsSelected = false; + this.imageBox5.Location = new System.Drawing.Point(106, 48); + this.imageBox5.Name = "imageBox5"; + this.imageBox5.NormalImage = global::BookmarkManager.UIResource.circle_menu; + this.imageBox5.SelectedImage = null; + this.imageBox5.Size = new System.Drawing.Size(18, 18); + this.imageBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.imageBox5.TabIndex = 6; + this.imageBox5.TabStop = false; + this.toolTip1.SetToolTip(this.imageBox5, "Menu"); + this.imageBox5.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick); + this.imageBox5.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick); + // + // imageBox4 + // + this.imageBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.imageBox4.BackColor = System.Drawing.Color.Transparent; + this.imageBox4.BackColorHover = System.Drawing.Color.Transparent; + this.imageBox4.BackColorNormal = System.Drawing.Color.Transparent; + this.imageBox4.BackColorSelected = System.Drawing.Color.Transparent; + this.imageBox4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.imageBox4.ErrorImage = null; + this.imageBox4.HoverImage = global::BookmarkManager.UIResource.arrow_down2; + this.imageBox4.Image = global::BookmarkManager.UIResource.arrow_down; + this.imageBox4.ImageHover = global::BookmarkManager.UIResource.arrow_down2; + this.imageBox4.ImageNormal = global::BookmarkManager.UIResource.arrow_down; + this.imageBox4.ImageSelected = null; + this.imageBox4.InitialImage = null; + this.imageBox4.IsSelected = false; + this.imageBox4.Location = new System.Drawing.Point(106, 92); + this.imageBox4.Name = "imageBox4"; + this.imageBox4.NormalImage = global::BookmarkManager.UIResource.arrow_down; + this.imageBox4.SelectedImage = null; + this.imageBox4.Size = new System.Drawing.Size(18, 18); + this.imageBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.imageBox4.TabIndex = 5; + this.imageBox4.TabStop = false; + this.toolTip1.SetToolTip(this.imageBox4, "Move Down"); + this.imageBox4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick); + this.imageBox4.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick); + // + // imageBox3 + // + this.imageBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.imageBox3.BackColor = System.Drawing.Color.Transparent; + this.imageBox3.BackColorHover = System.Drawing.Color.Transparent; + this.imageBox3.BackColorNormal = System.Drawing.Color.Transparent; + this.imageBox3.BackColorSelected = System.Drawing.Color.Transparent; + this.imageBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.imageBox3.ErrorImage = null; + this.imageBox3.HoverImage = global::BookmarkManager.UIResource.arrow_up2; + this.imageBox3.Image = global::BookmarkManager.UIResource.arrow_up; + this.imageBox3.ImageHover = global::BookmarkManager.UIResource.arrow_up2; + this.imageBox3.ImageNormal = global::BookmarkManager.UIResource.arrow_up; + this.imageBox3.ImageSelected = null; + this.imageBox3.InitialImage = null; + this.imageBox3.IsSelected = false; + this.imageBox3.Location = new System.Drawing.Point(106, 72); + this.imageBox3.Name = "imageBox3"; + this.imageBox3.NormalImage = global::BookmarkManager.UIResource.arrow_up; + this.imageBox3.SelectedImage = null; + this.imageBox3.Size = new System.Drawing.Size(18, 18); + this.imageBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.imageBox3.TabIndex = 4; + this.imageBox3.TabStop = false; + this.toolTip1.SetToolTip(this.imageBox3, "Move Up"); + this.imageBox3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick); + this.imageBox3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick); + // + // imageBox1 + // + this.imageBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.imageBox1.BackColor = System.Drawing.Color.Transparent; + this.imageBox1.BackColorHover = System.Drawing.Color.Transparent; + this.imageBox1.BackColorNormal = System.Drawing.Color.Transparent; + this.imageBox1.BackColorSelected = System.Drawing.Color.Transparent; + this.imageBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.imageBox1.ErrorImage = null; + this.imageBox1.HoverImage = global::BookmarkManager.UIResource.plus2; + this.imageBox1.Image = global::BookmarkManager.UIResource.plus; + this.imageBox1.ImageHover = global::BookmarkManager.UIResource.plus2; + this.imageBox1.ImageNormal = global::BookmarkManager.UIResource.plus; + this.imageBox1.ImageSelected = null; + this.imageBox1.InitialImage = null; + this.imageBox1.IsSelected = false; + this.imageBox1.Location = new System.Drawing.Point(106, 4); + this.imageBox1.Name = "imageBox1"; + this.imageBox1.NormalImage = global::BookmarkManager.UIResource.plus; + this.imageBox1.SelectedImage = null; + this.imageBox1.Size = new System.Drawing.Size(18, 18); + this.imageBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.imageBox1.TabIndex = 2; + this.imageBox1.TabStop = false; + this.toolTip1.SetToolTip(this.imageBox1, "Add"); + this.imageBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick); + this.imageBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick); + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addItemToolStripMenuItem, + this.toolStripMenuItem2, + this.toolStripSeparator3, + this.editToolStripMenuItem, + this.toolStripSeparator2, + this.removeToolStripMenuItem, + this.toolStripMenuItem1, + this.toolStripSeparator1, + this.moveToTopToolStripMenuItem, + this.moveUpToolStripMenuItem, + this.moveDownToolStripMenuItem, + this.moveToBottomToolStripMenuItem}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(163, 220); + // + // addItemToolStripMenuItem + // + this.addItemToolStripMenuItem.Name = "addItemToolStripMenuItem"; + this.addItemToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.addItemToolStripMenuItem.Text = "&Add"; + this.addItemToolStripMenuItem.Click += new System.EventHandler(this.addItemToolStripMenuItem_Click); + // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(162, 22); + this.toolStripMenuItem2.Text = "&Copy"; + this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(159, 6); + // + // editToolStripMenuItem + // + this.editToolStripMenuItem.Name = "editToolStripMenuItem"; + this.editToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.editToolStripMenuItem.Text = "&Edit"; + this.editToolStripMenuItem.Click += new System.EventHandler(this.editToolStripMenuItem_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(159, 6); + // + // removeToolStripMenuItem + // + this.removeToolStripMenuItem.Name = "removeToolStripMenuItem"; + this.removeToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.removeToolStripMenuItem.Text = "&Remove"; + this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click); + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(162, 22); + this.toolStripMenuItem1.Text = "Remove A&ll"; + this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(159, 6); + // + // moveToTopToolStripMenuItem + // + this.moveToTopToolStripMenuItem.Name = "moveToTopToolStripMenuItem"; + this.moveToTopToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.moveToTopToolStripMenuItem.Text = "Move To &Top"; + this.moveToTopToolStripMenuItem.Click += new System.EventHandler(this.moveToTopToolStripMenuItem_Click); + // + // moveUpToolStripMenuItem + // + this.moveUpToolStripMenuItem.Name = "moveUpToolStripMenuItem"; + this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.moveUpToolStripMenuItem.Text = "Move &Up"; + this.moveUpToolStripMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click); + // + // moveDownToolStripMenuItem + // + this.moveDownToolStripMenuItem.Name = "moveDownToolStripMenuItem"; + this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.moveDownToolStripMenuItem.Text = "Move &Down"; + this.moveDownToolStripMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click); + // + // moveToBottomToolStripMenuItem + // + this.moveToBottomToolStripMenuItem.Name = "moveToBottomToolStripMenuItem"; + this.moveToBottomToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.moveToBottomToolStripMenuItem.Text = "Move To &Bottom"; + this.moveToBottomToolStripMenuItem.Click += new System.EventHandler(this.moveToBottomToolStripMenuItem_Click); + // + // tImageBox1 + // + this.tImageBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.tImageBox1.BackColor = System.Drawing.Color.Transparent; + this.tImageBox1.BackColorHover = System.Drawing.Color.Transparent; + this.tImageBox1.BackColorNormal = System.Drawing.Color.Transparent; + this.tImageBox1.BackColorSelected = System.Drawing.Color.Transparent; + this.tImageBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.tImageBox1.ErrorImage = null; + this.tImageBox1.HoverImage = global::BookmarkManager.UIResource.edit2; + this.tImageBox1.Image = global::BookmarkManager.UIResource.edit; + this.tImageBox1.ImageHover = global::BookmarkManager.UIResource.edit2; + this.tImageBox1.ImageNormal = global::BookmarkManager.UIResource.edit; + this.tImageBox1.ImageSelected = null; + this.tImageBox1.InitialImage = null; + this.tImageBox1.IsSelected = false; + this.tImageBox1.Location = new System.Drawing.Point(106, 24); + this.tImageBox1.Name = "tImageBox1"; + this.tImageBox1.NormalImage = global::BookmarkManager.UIResource.edit; + this.tImageBox1.SelectedImage = null; + this.tImageBox1.Size = new System.Drawing.Size(18, 18); + this.tImageBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.tImageBox1.TabIndex = 7; + this.tImageBox1.TabStop = false; + this.toolTip1.SetToolTip(this.tImageBox1, "Edit"); + this.tImageBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.tImageBox1_MouseClick); + this.tImageBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.tImageBox1_MouseClick); + // + // TListBox + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.tImageBox1); + this.Controls.Add(this.imageBox5); + this.Controls.Add(this.imageBox4); + this.Controls.Add(this.imageBox3); + this.Controls.Add(this.imageBox1); + this.Controls.Add(this.listBox1); + this.Name = "TListBox"; + this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.Size = new System.Drawing.Size(128, 225); + ((System.ComponentModel.ISupportInitialize)(this.imageBox5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageBox4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageBox3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.imageBox1)).EndInit(); + this.contextMenuStrip1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.tImageBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListBox listBox1; + private Forms.TImageBox imageBox1; + private Forms.TImageBox imageBox3; + private Forms.TImageBox imageBox4; + private Forms.TImageBox imageBox5; + private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem addItemToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem moveToTopToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem moveUpToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem moveDownToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem moveToBottomToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private Forms.TImageBox tImageBox1; + } +} diff --git a/RyzStudio/Windows/ThemedForms/TListBox.resx b/RyzStudio/Windows/ThemedForms/TListBox.resx new file mode 100644 index 0000000..34628c2 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TListBox.resx @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + + 17, 17 + + + 114, 17 + + \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TMemoBox.cs b/RyzStudio/Windows/ThemedForms/TMemoBox.cs new file mode 100644 index 0000000..cc2b320 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TMemoBox.cs @@ -0,0 +1,59 @@ +namespace RyzStudio.Windows.ThemedForms +{ + using RyzStudio.Drawing; + using System; + using System.ComponentModel; + using System.Drawing; + using System.Windows.Forms; + + public partial class TMemoBox : RyzStudio.Windows.ThemedForms.TUserControl + { + protected readonly Padding textboxPadding = new Padding(6, 6, 0, 6); + + public TMemoBox() : base() + { + InitializeComponent(); + + this.Margin = new Padding(10, 6, 10, 6); + } + + //protected override void OnResize(EventArgs e) + //{ + // base.OnResize(e); + + // int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + // this.Height = textBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom); + //} + + protected override void OnGotFocus(EventArgs e) + { + base.OnGotFocus(e); + + textBox1.Focus(); + } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public System.Windows.Forms.TextBox InnerTextBox { get => textBox1; set => textBox1 = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public new string Text { get => textBox1.Text; set => textBox1.Text = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Margin { get { return base.Margin; } set { base.Margin = value; } } + + protected override void updateBackground(Graphics g, ThemeStyle style) + { + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom)); + + Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth); + g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath()); + g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath()); + } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TMemoBox.designer.cs b/RyzStudio/Windows/ThemedForms/TMemoBox.designer.cs new file mode 100644 index 0000000..52800af --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TMemoBox.designer.cs @@ -0,0 +1,63 @@ +namespace RyzStudio.Windows.ThemedForms +{ + partial class TMemoBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.textBox1 = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.AcceptsReturn = true; + this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBox1.HideSelection = false; + this.textBox1.Location = new System.Drawing.Point(4, 4); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.textBox1.Size = new System.Drawing.Size(121, 25); + this.textBox1.TabIndex = 0; + // + // MemoBox + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.textBox1); + this.Name = "MemoBox"; + this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.Size = new System.Drawing.Size(128, 32); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + } +} diff --git a/RyzStudio/Windows/ThemedForms/TNumericBox.cs b/RyzStudio/Windows/ThemedForms/TNumericBox.cs new file mode 100644 index 0000000..76a1f7e --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TNumericBox.cs @@ -0,0 +1,99 @@ +using RyzStudio.Drawing; +using System; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace RyzStudio.Windows.ThemedForms +{ + public partial class TNumericBox : RyzStudio.Windows.ThemedForms.TUserControl + { + protected readonly Padding textboxPadding = new Padding(4, 4, 4, 4); + + + public TNumericBox() : base() + { + InitializeComponent(); + + this.Margin = new Padding(10, 6, 10, 6); + this.Font = new Font(this.Font, FontStyle.Regular); + + numericUpDown1.Font = this.Font; + numericUpDown1.PreviewKeyDown += textBox_PreviewKeyDown; + } + + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Height = numericUpDown1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom); + + this.Invalidate(); + } + + protected override void OnGotFocus(EventArgs e) + { + base.OnGotFocus(e); + + numericUpDown1.Focus(); + } + + protected void textBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Enter: + if (this.SubmitButton != null) + { + this.SubmitButton.PerformClick(); + } + + break; + case Keys.Escape: + close(); + break; + default: break; + } + } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public System.Windows.Forms.NumericUpDown InnerControl { get => numericUpDown1; set => numericUpDown1 = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public int Value + { + get => (int)numericUpDown1.Value; + set + { + numericUpDown1.Value = value; + } + } + + //[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + //[Category("Appearance")] + //public bool UseSystemPasswordChar { get => textBox1.UseSystemPasswordChar; set => textBox1.UseSystemPasswordChar = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public TButton SubmitButton { get; set; } = null; + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Margin { get { return base.Margin; } set { base.Margin = value; } } + + protected override void updateBackground(Graphics g, ThemeStyle style) + { + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom)); + + Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth); + g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath()); + g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath()); + } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TNumericBox.designer.cs b/RyzStudio/Windows/ThemedForms/TNumericBox.designer.cs new file mode 100644 index 0000000..799db24 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TNumericBox.designer.cs @@ -0,0 +1,60 @@ +namespace RyzStudio.Windows.ThemedForms +{ + partial class TNumericBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + this.SuspendLayout(); + // + // numericUpDown1 + // + this.numericUpDown1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.numericUpDown1.Dock = System.Windows.Forms.DockStyle.Fill; + this.numericUpDown1.Location = new System.Drawing.Point(4, 4); + this.numericUpDown1.Name = "numericUpDown1"; + this.numericUpDown1.Size = new System.Drawing.Size(121, 19); + this.numericUpDown1.TabIndex = 0; + // + // TNumericBox + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.numericUpDown1); + this.Name = "TNumericBox"; + this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.Size = new System.Drawing.Size(128, 32); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.NumericUpDown numericUpDown1; + } +} diff --git a/RyzStudio/Windows/ThemedForms/TNumericBox.resx b/RyzStudio/Windows/ThemedForms/TNumericBox.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TNumericBox.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TProgressBar.cs b/RyzStudio/Windows/ThemedForms/TProgressBar.cs new file mode 100644 index 0000000..d30a566 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TProgressBar.cs @@ -0,0 +1,50 @@ +using RyzStudio.Drawing; +using System; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace RyzStudio.Windows.ThemedForms +{ + public partial class TProgressBar : RyzStudio.Windows.ThemedForms.TUserControl + { + protected readonly Padding textboxPadding = new Padding(2, 2, 2, 2); + + + public TProgressBar() : base() + { + InitializeComponent(); + + this.Margin = new Padding(10, 6, 10, 6); + this.Font = new Font(this.Font, FontStyle.Regular); + + customProgressBar1.Font = this.Font; + } + + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + + this.Invalidate(); + } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public RyzStudio.Windows.Forms.TCustomProgressBar InnerControl { get => customProgressBar1; set => customProgressBar1 = value; } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Margin { get => base.Margin; set => base.Margin = value; } + + protected override void updateBackground(Graphics g, ThemeStyle style) + { + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom)); + + Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth); + g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath()); + g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath()); + } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TProgressBar.designer.cs b/RyzStudio/Windows/ThemedForms/TProgressBar.designer.cs new file mode 100644 index 0000000..a1bc39f --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TProgressBar.designer.cs @@ -0,0 +1,65 @@ +namespace RyzStudio.Windows.ThemedForms +{ + partial class TProgressBar + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.customProgressBar1 = new RyzStudio.Windows.Forms.TCustomProgressBar(); + this.SuspendLayout(); + // + // customProgressBar1 + // + this.customProgressBar1.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.customProgressBar1.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.customProgressBar1.BarColour = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(225)))), ((int)(((byte)(249))))); + this.customProgressBar1.BarTextColour = System.Drawing.SystemColors.ControlText; + this.customProgressBar1.Dock = System.Windows.Forms.DockStyle.Fill; + this.customProgressBar1.Location = new System.Drawing.Point(4, 4); + this.customProgressBar1.Margin = new System.Windows.Forms.Padding(0); + this.customProgressBar1.Maximum = 100; + this.customProgressBar1.Minimum = 0; + this.customProgressBar1.Name = "customProgressBar1"; + this.customProgressBar1.Size = new System.Drawing.Size(121, 25); + this.customProgressBar1.TabIndex = 0; + this.customProgressBar1.Value = 50; + // + // TProgressBar + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.customProgressBar1); + this.Name = "TProgressBar"; + this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.Size = new System.Drawing.Size(128, 32); + this.ResumeLayout(false); + + } + + #endregion + + private Forms.TCustomProgressBar customProgressBar1; + } +} diff --git a/RyzStudio/Windows/ThemedForms/TProgressBar.resx b/RyzStudio/Windows/ThemedForms/TProgressBar.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TProgressBar.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TUserControl.cs b/RyzStudio/Windows/ThemedForms/TUserControl.cs new file mode 100644 index 0000000..56bea24 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TUserControl.cs @@ -0,0 +1,106 @@ +using System; +using System.Drawing; +using System.Windows.Forms; +using RyzStudio.Drawing; +using System.ComponentModel; + +namespace RyzStudio.Windows.ThemedForms +{ + public partial class TUserControl : System.Windows.Forms.UserControl + { + public class ThemeStyle + { + public int BorderWidth; + public int BorderRadius; + public int BorderPadding; + public Color BorderColour; + public Color BackColour; + public Color ForeColour; + + public ThemeStyle(int borderWidth, int borderRadius, int borderPadding, Color borderColour, Color backColour) + { + this.BorderWidth = borderWidth; + this.BorderRadius = borderRadius; + this.BorderPadding = borderPadding; + this.BorderColour = borderColour; + this.BackColour = backColour; + this.ForeColour = Color.Black; + } + + public ThemeStyle(int borderWidth, int borderRadius, int borderPadding, Color borderColour, Color backColour, Color foreColour) + { + this.BorderWidth = borderWidth; + this.BorderRadius = borderRadius; + this.BorderPadding = borderPadding; + this.BorderColour = borderColour; + this.BackColour = backColour; + this.ForeColour = foreColour; + } + } + + protected ThemeStyle styleActive = new ThemeStyle(1, 3, 2, Color.FromArgb(212, 212, 212), Color.White); + + public TUserControl() + { + InitializeComponent(); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.BackColor = Color.Transparent; + } + + protected override void OnPaintBackground(PaintEventArgs e) + { + base.OnPaintBackground(e); + + Graphics g = e.Graphics; + //g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic; + //g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; + //g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; + //g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; + + updateBackground(g, styleActive); + } + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Padding { get => base.Padding; set => base.Padding = value; } + + protected virtual void updateBackground(Graphics g, ThemeStyle style) + { + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Padding = new Padding(b, b, (b - 1), (b - 1)); + + Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth); + g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath()); + g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath()); + } + + protected virtual void close() + { + if (this.Parent == null) + { + return; + } + + if (this.Parent is Form) + { + (this.Parent as Form).Close(); + return; + } + + if (this.Parent.GetType().IsSubclassOf(typeof(System.Windows.Forms.Form))) + { + System.Windows.Forms.Form parentForm = (System.Windows.Forms.Form)this.Parent; + if (parentForm != null) + { + parentForm.Close(); + } + } + } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TUserControl.designer.cs b/RyzStudio/Windows/ThemedForms/TUserControl.designer.cs new file mode 100644 index 0000000..6f57544 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TUserControl.designer.cs @@ -0,0 +1,37 @@ +namespace RyzStudio.Windows.ThemedForms +{ + partial class TUserControl + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.cs b/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.cs new file mode 100644 index 0000000..9f8f168 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.cs @@ -0,0 +1,139 @@ +namespace RyzStudio.Windows.ThemedForms +{ + using RyzStudio.Drawing; + using System; + using System.ComponentModel; + using System.Drawing; + using System.Windows.Forms; + + public partial class TButtonTextBox : RyzStudio.Windows.ThemedForms.TUserControl + { + protected readonly Padding textboxPadding = new Padding(6, 6, 6, 6); + + public TButtonTextBox() : base() + { + InitializeComponent(); + + //this.Margin = new Padding(10, 6, 10, 6); + this.Margin = new Padding(10, 3, 3, 3); + this.Font = new Font(this.Font, FontStyle.Regular); + + textBox1.Font = this.Font; + textBox1.Left = this.Margin.Left; + textBox1.PreviewKeyDown += textBox_PreviewKeyDown; + + imageBox1.MouseClick += imageBox1_MouseClick; + + OnResize(null); + } + + protected virtual void imageBox1_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + OnButtonClick?.Invoke(sender, e); + } + } + + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Height = textBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom); + + imageBox1.Width = 18; + imageBox1.Height = textBox1.Height + textboxPadding.Top + textboxPadding.Bottom; + imageBox1.Left = this.Width - (this.Margin.Right + b + imageBox1.Width); + + textBox1.Left = this.Margin.Left; + textBox1.Width = imageBox1.Left - textBox1.Left - 3; + textBox1.Top = (int)Math.Ceiling(decimal.Divide((this.Height - textBox1.Height), 2)); + } + + protected override void OnGotFocus(EventArgs e) + { + base.OnGotFocus(e); + + textBox1.Focus(); + } + + protected void textBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Enter: + if (this.SubmitButton != null) + { + this.SubmitButton.PerformClick(); + } + + break; + case Keys.Escape: + close(); + break; + default: break; + } + } + + [Category("Action")] + [Browsable(true)] + public event EventHandler OnButtonClick; + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public Forms.TImageBox InnerImageBox { get => imageBox1; set => imageBox1 = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public System.Windows.Forms.TextBox InnerTextBox { get => textBox1; set => textBox1 = value; } + + [Category("Appearance"), Browsable(true)] + public Image NormalImage { get => imageBox1.ImageNormal; set => imageBox1.ImageNormal = value; } + + [Category("Appearance"), Browsable(true)] + public Image HighlightImage { get => imageBox1.ImageHover; set => imageBox1.ImageHover = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public new string Text + { + get => textBox1.Text; + set + { + textBox1.Text = value; + textBox1.SelectionStart = textBox1.Text.Length; + } + } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public bool UseSystemPasswordChar { get => textBox1.UseSystemPasswordChar; set => textBox1.UseSystemPasswordChar = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public TButton SubmitButton { get; set; } = null; + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Margin { get => base.Margin; set => base.Margin = value; } + + + public void SetTooltipText(ToolTip toolTip, string text) + { + toolTip.SetToolTip(imageBox1, text); + } + + protected override void updateBackground(Graphics g, ThemeStyle style) + { + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom)); + + Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth); + g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath()); + g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath()); + } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.designer.cs b/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.designer.cs new file mode 100644 index 0000000..6a37b71 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.designer.cs @@ -0,0 +1,81 @@ +namespace RyzStudio.Windows.ThemedForms +{ + partial class TButtonTextBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.textBox1 = new System.Windows.Forms.TextBox(); + this.imageBox1 = new RyzStudio.Windows.Forms.TImageBox(); + ((System.ComponentModel.ISupportInitialize)(this.imageBox1)).BeginInit(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.BackColor = System.Drawing.SystemColors.Window; + this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBox1.HideSelection = false; + this.textBox1.Location = new System.Drawing.Point(7, 7); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(68, 13); + this.textBox1.TabIndex = 0; + // + // imageBox1 + // + this.imageBox1.BackColor = System.Drawing.Color.Transparent; + this.imageBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.imageBox1.ErrorImage = null; + this.imageBox1.ImageHover = null; + this.imageBox1.Image = null; + this.imageBox1.InitialImage = null; + this.imageBox1.Location = new System.Drawing.Point(107, 4); + this.imageBox1.Name = "imageBox1"; + this.imageBox1.ImageNormal = null; + this.imageBox1.Size = new System.Drawing.Size(18, 25); + this.imageBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.imageBox1.TabIndex = 1; + this.imageBox1.TabStop = false; + // + // TextBox2 + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.imageBox1); + this.Controls.Add(this.textBox1); + this.Name = "TextBox2"; + this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.Size = new System.Drawing.Size(128, 32); + ((System.ComponentModel.ISupportInitialize)(this.imageBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + private Forms.TImageBox imageBox1; + } +} diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.resx b/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TFolderTextBox.cs b/RyzStudio/Windows/ThemedForms/TextBox/TFolderTextBox.cs new file mode 100644 index 0000000..dbf3830 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TFolderTextBox.cs @@ -0,0 +1,46 @@ +using System.IO; +using System.Windows.Forms; +using UIResources = BookmarkManager.UIResource; + +namespace RyzStudio.Windows.ThemedForms +{ + public class TFolderTextBox : TButtonTextBox + { + public TFolderTextBox() : base() + { + this.NormalImage = UIResources.folder; + this.HighlightImage = UIResources.folder2; + this.Text = string.Empty; + } + + public FolderBrowserDialog FolderDialog { get; set; } = null; + + protected override void imageBox1_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + { + return; + } + + if (this.FolderDialog == null) + { + this.FolderDialog = new FolderBrowserDialog(); + this.FolderDialog.Description = "Choose a directory"; + } + + if (!string.IsNullOrWhiteSpace(this.Text)) + { + if (Directory.Exists(this.Text)) + { + this.FolderDialog.SelectedPath = this.Text; + } + } + + if (this.FolderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + this.Text = this.FolderDialog.SelectedPath; + } + } + + } +} diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TFolderTextBox.resx b/RyzStudio/Windows/ThemedForms/TextBox/TFolderTextBox.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TFolderTextBox.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TKeyCodeTextBox.cs b/RyzStudio/Windows/ThemedForms/TextBox/TKeyCodeTextBox.cs new file mode 100644 index 0000000..aae9cbb --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TKeyCodeTextBox.cs @@ -0,0 +1,96 @@ +using System.Text; +using System.Windows.Forms; +using UIResources = BookmarkManager.UIResource; + +namespace RyzStudio.Windows.ThemedForms +{ + public class TKeyCodeTextBox : TButtonTextBox + { + public class Results + { + public bool IsCtrl { get; set; } = false; + public bool IsAlt { get; set; } = false; + public bool IsShift { get; set; } = false; + public Keys Key { get; set; } = Keys.None; + + public int ModifierCode => ((this.IsAlt ? 1 : 0) + (this.IsCtrl ? 2 : 0) + (this.IsShift ? 4 : 0)); + + public int KeyCode => (int)this.Key; + + public string DisplayText + { + get + { + StringBuilder sb = new StringBuilder(); + + if (this.IsCtrl) sb.Append("Ctrl+"); + if (this.IsShift) sb.Append("Shift+"); + if (this.IsAlt) sb.Append("Alt+"); + + sb.Append(this.Key.ToString()); + + return sb.ToString(); + } + } + + public void Clear() + { + this.IsCtrl = false; + this.IsAlt = false; + this.IsShift = false; + this.Key = Keys.None; + } + } + + + public Results KeyCodeResults { get; set; } = new Results(); + + + public TKeyCodeTextBox() : base() + { + this.NormalImage = UIResources.trash; + this.HighlightImage = UIResources.trash2; + this.Text = string.Empty; + + this.InnerTextBox.ReadOnly = true; + this.InnerTextBox.PreviewKeyDown += textBox1_PreviewKeyDown; + } + + private void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) + { + if (e.KeyCode == Keys.ControlKey) return; + if (e.KeyCode == Keys.ShiftKey) return; + if (e.KeyCode == Keys.Menu) return; + + this.KeyCodeResults.IsCtrl = e.Control; + this.KeyCodeResults.IsAlt = e.Alt; + this.KeyCodeResults.IsShift = e.Shift; + this.KeyCodeResults.Key = e.KeyCode; + + this.Text = this.KeyCodeResults.DisplayText; + } + + protected override void imageBox1_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + { + return; + } + + this.KeyCodeResults.Clear(); + + this.Text = this.KeyCodeResults.DisplayText; + } + + public void UpdateKeyCode(bool isCtrl, bool isAlt, bool isShift, Keys key) + { + this.KeyCodeResults.IsCtrl = isCtrl; + this.KeyCodeResults.IsAlt = isAlt; + this.KeyCodeResults.IsShift = isShift; + this.KeyCodeResults.Key = key; + + this.Text = this.KeyCodeResults.DisplayText; + } + + } +} diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TOpenFileTextBox.cs b/RyzStudio/Windows/ThemedForms/TextBox/TOpenFileTextBox.cs new file mode 100644 index 0000000..832228b --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TOpenFileTextBox.cs @@ -0,0 +1,48 @@ +using System; +using System.IO; +using System.Windows.Forms; +using UIResources = VideoPreview.UIResource; + +namespace RyzStudio.Windows.ThemedForms +{ + public class TOpenFileTextBox : TButtonTextBox + { + public TOpenFileTextBox() : base() + { + this.NormalImage = UIResources.file; + this.HighlightImage = UIResources.file2; + this.Text = string.Empty; + } + + public OpenFileDialog FileDialog { get; set; } = null; + + protected override void imageBox1_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) + { + return; + } + + if (this.FileDialog == null) + { + this.FileDialog = new OpenFileDialog(); + this.FileDialog.Title = "Choose a file"; + this.FileDialog.Filter = "All files|*"; + } + + if (!string.IsNullOrWhiteSpace(this.Text)) + { + if (File.Exists(this.Text)) + { + this.FileDialog.InitialDirectory = Path.GetDirectoryName(this.Text); + } + } + + if (this.FileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + this.Text = this.FileDialog.FileName; + } + } + + } +} diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TTextBox.cs b/RyzStudio/Windows/ThemedForms/TextBox/TTextBox.cs new file mode 100644 index 0000000..be72ccd --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TTextBox.cs @@ -0,0 +1,100 @@ +using RyzStudio.Drawing; +using System; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace RyzStudio.Windows.ThemedForms +{ + public partial class TTextBox : RyzStudio.Windows.ThemedForms.TUserControl + { + protected readonly Padding textboxPadding = new Padding(6, 6, 6, 6); + + + public TTextBox() : base() + { + InitializeComponent(); + + this.Margin = new Padding(10, 6, 10, 6); + this.Font = new Font(this.Font, FontStyle.Regular); + + textBox1.Font = this.Font; + textBox1.PreviewKeyDown += textBox_PreviewKeyDown; + } + + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Height = textBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom); + + this.Invalidate(); + } + + protected override void OnGotFocus(EventArgs e) + { + base.OnGotFocus(e); + + textBox1.Focus(); + } + + protected void textBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Enter: + if (this.SubmitButton != null) + { + this.SubmitButton.PerformClick(); + } + + break; + case Keys.Escape: + close(); + break; + default: break; + } + } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public System.Windows.Forms.TextBox InnerTextBox { get => textBox1; set => textBox1 = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public new string Text + { + get => textBox1.Text; + set + { + textBox1.Text = value; + textBox1.SelectionStart = textBox1.Text.Length; + } + } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public bool UseSystemPasswordChar { get => textBox1.UseSystemPasswordChar; set => textBox1.UseSystemPasswordChar = value; } + + [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)] + [Category("Appearance")] + public TButton SubmitButton { get; set; } = null; + + [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] + public new Padding Margin { get { return base.Margin; } set { base.Margin = value; } } + + protected override void updateBackground(Graphics g, ThemeStyle style) + { + int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + + this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom)); + + Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth); + g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath()); + g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath()); + } + + } +} \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TTextBox.designer.cs b/RyzStudio/Windows/ThemedForms/TextBox/TTextBox.designer.cs new file mode 100644 index 0000000..752557d --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TTextBox.designer.cs @@ -0,0 +1,60 @@ +namespace RyzStudio.Windows.ThemedForms +{ + partial class TTextBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.textBox1 = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBox1.HideSelection = false; + this.textBox1.Location = new System.Drawing.Point(4, 4); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(121, 13); + this.textBox1.TabIndex = 0; + // + // TextBox + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.textBox1); + this.Name = "TextBox"; + this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); + this.Size = new System.Drawing.Size(128, 32); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + } +} diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TTextBox.resx b/RyzStudio/Windows/ThemedForms/TextBox/TTextBox.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RyzStudio/Windows/ThemedForms/TextBox/TTextBox.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/UIResource.Designer.cs b/UIResource.Designer.cs new file mode 100644 index 0000000..511d9c7 --- /dev/null +++ b/UIResource.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace VideoPreview { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class UIResource { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal UIResource() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VideoPreview.UIResource", typeof(UIResource).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap cog { + get { + object obj = ResourceManager.GetObject("cog", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap cog2 { + get { + object obj = ResourceManager.GetObject("cog2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap file { + get { + object obj = ResourceManager.GetObject("file", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap file2 { + get { + object obj = ResourceManager.GetObject("file2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/UIResource.resx b/UIResource.resx new file mode 100644 index 0000000..2803227 --- /dev/null +++ b/UIResource.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Resources\UI\cog.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\UI\cog2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\UI\file.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\UI\file2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/VideoPreview.csproj b/VideoPreview.csproj new file mode 100644 index 0000000..b626724 --- /dev/null +++ b/VideoPreview.csproj @@ -0,0 +1,97 @@ + + + + WinExe + net5.0-windows + true + videopreview + Ray Lam + Hi, I'm Ray + Video Preview + Ray Lam + favicon.ico + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UserControl + + + + + + + + + + + + + + + True + True + AppResource.resx + + + True + True + UIResource.resx + + + + + + ResXFileCodeGenerator + AppResource.Designer.cs + + + ResXFileCodeGenerator + UIResource.Designer.cs + + + + \ No newline at end of file diff --git a/VideoPreview.csproj.user b/VideoPreview.csproj.user new file mode 100644 index 0000000..75435ab --- /dev/null +++ b/VideoPreview.csproj.user @@ -0,0 +1,50 @@ + + + + false + + + + Form + + + Form + + + UserControl + + + Component + + + UserControl + + + UserControl + + + UserControl + + + UserControl + + + Form + + + UserControl + + + UserControl + + + UserControl + + + UserControl + + + UserControl + + + \ No newline at end of file diff --git a/VideoPreview.sln b/VideoPreview.sln new file mode 100644 index 0000000..5b98466 --- /dev/null +++ b/VideoPreview.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31702.278 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VideoPreview", "VideoPreview.csproj", "{5F301DDB-6E01-4492-BABC-E134722EF0AC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5F301DDB-6E01-4492-BABC-E134722EF0AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F301DDB-6E01-4492-BABC-E134722EF0AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F301DDB-6E01-4492-BABC-E134722EF0AC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F301DDB-6E01-4492-BABC-E134722EF0AC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {07C35049-4E29-477E-84DD-ED9E52F0F257} + EndGlobalSection +EndGlobal diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5c732404795bffb10c6e5097a232c7e5cc0a8c5b GIT binary patch literal 17542 zcmeHOd3=pm`hPQ_K|5uBGr#^i)3HoPXXaN^wM8~rZW6H-2_k7i#L`O85}F2$CYFYX z(5O}sv=k9RXzazcZ*5|!WvoF<5d>{SB=^ks`^vd;u(7bu`S6jAhc>*B^A^paI72z*wyF^)+N{-Xiv0x-7m}vsMiMFhS`2{ma-7 z29&$jqD6}Zcn`+hJpXIx3$P4DFa(E&mhC!zLL9zXC=TAZX$-jq*G2Z;ePUc%n&=i9 zYMd9;DMnv5u|B4z{*&%YaB#3A=zjv*V(`$RhTIDm#lLRdHsUtzgX#M>$Bv7%g$qT$ z!Gnd1tE;g;n44qh%Or$0=*w>&XMcQrd}@JCrkk6ah#xo3@cosm;`Hr1;(N{5o8mV2 zzW?%1Mn3ax+t!rN3LY1qVQv1tMXOf3JUu-{a@urp;^s{i`zhczhtb|Nd-x1v)}Si$ z(yUptS1`|Kbvm7xn~@<--M+12=hz=Fyj3Oq+J0_2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