From 6639b451e326fa852b4d73da44ecdb9e28cb1ad7 Mon Sep 17 00:00:00 2001 From: hololu Date: Mon, 6 Jul 2026 12:35:30 +0300 Subject: [PATCH] Fix build errors by migrating to SDK-style project and resolving missing/hidden form controls --- hMarkdown/Form1.Designer.cs | 4 +- hMarkdown/Form1.cs | 16 ++- hMarkdown/hMarkdown.csproj | 203 +++++++----------------------------- hMarkdown/packages.config | 10 -- 4 files changed, 46 insertions(+), 187 deletions(-) delete mode 100644 hMarkdown/packages.config diff --git a/hMarkdown/Form1.Designer.cs b/hMarkdown/Form1.Designer.cs index 06edbaa..5872e1d 100644 --- a/hMarkdown/Form1.Designer.cs +++ b/hMarkdown/Form1.Designer.cs @@ -1,4 +1,4 @@ -namespace hMarkdown +namespace hMarkdown { partial class Form1 { @@ -154,7 +154,7 @@ this.Controls.Add(this.rtbEditor); this.Controls.Add(this.toolStrip1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.IsMdiContainer = true; + this.IsMdiContainer = false; this.Name = "Form1"; this.Text = "hOLOlu Markdown Viewer"; this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); diff --git a/hMarkdown/Form1.cs b/hMarkdown/Form1.cs index 1f6eca5..549e2e0 100644 --- a/hMarkdown/Form1.cs +++ b/hMarkdown/Form1.cs @@ -119,15 +119,7 @@ namespace hMarkdown "; - if (webBrowser.Document != null) - { - webBrowser.Document.OpenNew(true); - webBrowser.Document.Write(result); - } - else - { - webBrowser.DocumentText = result; - } + webBrowser.DocumentText = result; //webBrowser.Document.Body.Style.font = "font-family: Tahoma, Threbucet, Verdana; font-size: large;"; //webBrowser.Document.ExecCommand("SelectAll", false, "null"); @@ -223,6 +215,8 @@ namespace hMarkdown } // --- CUSTOM IMPLEMENTATION --- + private StatusStrip statusStrip1; + private ToolStrip toolStripEditor; private ToolStripStatusLabel lblCharCount; private ToolStripStatusLabel lblFormat; private ToolStripStatusLabel lblEncoding; @@ -236,6 +230,8 @@ namespace hMarkdown private void InitializeCustomControls() { // 1. StatusStrip + statusStrip1 = new StatusStrip(); + this.Controls.Add(statusStrip1); statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); lblCharCount = new ToolStripStatusLabel(); @@ -291,6 +287,8 @@ namespace hMarkdown }); // 2. toolStripEditor + toolStripEditor = new ToolStrip(); + this.Controls.Add(toolStripEditor); toolStripEditor.ImageScalingSize = new System.Drawing.Size(24, 24); toolStripEditor.RenderMode = ToolStripRenderMode.Professional; toolStripEditor.Visible = false; diff --git a/hMarkdown/hMarkdown.csproj b/hMarkdown/hMarkdown.csproj index b0b617e..7146029 100644 --- a/hMarkdown/hMarkdown.csproj +++ b/hMarkdown/hMarkdown.csproj @@ -1,167 +1,38 @@ - - - - - - Debug - AnyCPU - {A8E10C05-F985-4702-8AE2-B5D95E9AED83} - WinExe - hMarkdown - hMarkdown - v4.8 - 512 - true - false - false - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 1 - 1.0.1.%2a - false - true - true - - - - - AnyCPU - true - embedded - true - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - hMarkdown.ico - - - 30C74CF3F4C04AC892558ECE90FE433BE8797724 - - - hMarkdown_TemporaryKey.pfx - - - true - - - true - - - - ..\packages\Costura.Fody.6.0.0\lib\netstandard2.0\Costura.dll - - - ..\packages\Markdig.0.41.3\lib\net462\Markdig.dll - - - - ..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll - - - - ..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll - - - - ..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - - - - - - - - - - - - - Form - - - Form1.cs - - - Form - - - - - Form1.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - - - - - False - Microsoft .NET Framework 4.8 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - + + + + WinExe + net48 + true + false + hMarkdown.ico + false + true + + 30C74CF3F4C04AC892558ECE90FE433BE8797724 + hMarkdown_TemporaryKey.pfx + true + true + + + + + + + + + all + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + \ No newline at end of file diff --git a/hMarkdown/packages.config b/hMarkdown/packages.config deleted file mode 100644 index 51d5991..0000000 --- a/hMarkdown/packages.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file