From 99530bfb5f7552795eade14a5ad040c986709958 Mon Sep 17 00:00:00 2001 From: Swee Date: Tue, 14 May 2024 00:40:35 -0700 Subject: [PATCH] Done for today --- Form1.Designer.cs | 15 ++++++++++++++ Form1.cs | 52 ++++++++++++++++++++++++++--------------------- MintHTML.csproj | 3 ++- 3 files changed, 46 insertions(+), 24 deletions(-) diff --git a/Form1.Designer.cs b/Form1.Designer.cs index 26becb4..41755c6 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -42,6 +42,7 @@ Opener = new OpenFileDialog(); Saver = new SaveFileDialog(); groupBox4 = new GroupBox(); + chromiumWebBrowser1 = new CefSharp.WinForms.ChromiumWebBrowser(); progressBar1 = new ProgressBar(); button4 = new Button(); button3 = new Button(); @@ -72,6 +73,7 @@ // // openDevToolsToolStripMenuItem // + openDevToolsToolStripMenuItem.Enabled = false; openDevToolsToolStripMenuItem.Name = "openDevToolsToolStripMenuItem"; openDevToolsToolStripMenuItem.Size = new Size(154, 22); openDevToolsToolStripMenuItem.Text = "Open DevTools"; @@ -149,6 +151,7 @@ // // groupBox4 // + groupBox4.Controls.Add(chromiumWebBrowser1); groupBox4.Controls.Add(progressBar1); groupBox4.Controls.Add(button4); groupBox4.Dock = DockStyle.Fill; @@ -160,12 +163,23 @@ groupBox4.Text = "Preview"; groupBox4.Enter += groupBox4_Enter; // + // chromiumWebBrowser1 + // + chromiumWebBrowser1.ActivateBrowserOnCreation = false; + chromiumWebBrowser1.Dock = DockStyle.Fill; + chromiumWebBrowser1.Location = new Point(3, 47); + chromiumWebBrowser1.Name = "chromiumWebBrowser1"; + chromiumWebBrowser1.Size = new Size(794, 328); + chromiumWebBrowser1.TabIndex = 3; + chromiumWebBrowser1.LoadingStateChanged += chromiumWebBrowser1_LoadingStateChanged; + // // progressBar1 // progressBar1.Dock = DockStyle.Top; progressBar1.Location = new Point(3, 42); progressBar1.Name = "progressBar1"; progressBar1.Size = new Size(794, 5); + progressBar1.Style = ProgressBarStyle.Marquee; progressBar1.TabIndex = 2; // // button4 @@ -274,5 +288,6 @@ private GroupBox groupBox3; private Button button2; private TextBox textBox2; + private CefSharp.WinForms.ChromiumWebBrowser chromiumWebBrowser1; } } diff --git a/Form1.cs b/Form1.cs index 9bf3041..2cc85e2 100644 --- a/Form1.cs +++ b/Form1.cs @@ -5,7 +5,6 @@ namespace MintHTML { public partial class Form1 : Form { - ChromiumWebBrowser chromiumWebBrowser1; string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string markfile; string htmlfile = "

Welcome to MintHTML

Open a markdown file and press \"Render preview\" to see the output here.

"; @@ -16,7 +15,8 @@ background-color: #F3F3F3; border: solid; border-width: 1px } -"; + +