diff --git a/Form1.Designer.cs b/Form1.Designer.cs index c56656a..a5d10dd 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -42,21 +42,17 @@ systemToolStripMenuItem = new ToolStripMenuItem(); lightToolStripMenuItem = new ToolStripMenuItem(); darkToolStripMenuItem = new ToolStripMenuItem(); + fullUIToolStripMenuItem = new ToolStripMenuItem(); helpToolStripMenuItem = new ToolStripMenuItem(); aboutToolStripMenuItem = new ToolStripMenuItem(); Opener = new OpenFileDialog(); Saver = new SaveFileDialog(); - groupBox4 = new GroupBox(); chromiumWebBrowser1 = new CefSharp.WinForms.ChromiumWebBrowser(); button4 = new Button(); button3 = new Button(); - groupBox3 = new GroupBox(); button2 = new Button(); textBox2 = new TextBox(); - fullUIToolStripMenuItem = new ToolStripMenuItem(); menuStrip1.SuspendLayout(); - groupBox4.SuspendLayout(); - groupBox3.SuspendLayout(); SuspendLayout(); // // menuStrip1 @@ -141,23 +137,32 @@ systemToolStripMenuItem.CheckState = CheckState.Checked; systemToolStripMenuItem.ForeColor = SystemColors.ControlText; systemToolStripMenuItem.Name = "systemToolStripMenuItem"; - systemToolStripMenuItem.Size = new Size(180, 22); + systemToolStripMenuItem.Size = new Size(161, 22); systemToolStripMenuItem.Text = "System (Default)"; systemToolStripMenuItem.Click += systemToolStripMenuItem_Click; // // lightToolStripMenuItem // lightToolStripMenuItem.Name = "lightToolStripMenuItem"; - lightToolStripMenuItem.Size = new Size(180, 22); + lightToolStripMenuItem.Size = new Size(161, 22); lightToolStripMenuItem.Text = "Light"; // // darkToolStripMenuItem // darkToolStripMenuItem.Name = "darkToolStripMenuItem"; - darkToolStripMenuItem.Size = new Size(180, 22); + darkToolStripMenuItem.Size = new Size(161, 22); darkToolStripMenuItem.Text = "Dark"; darkToolStripMenuItem.Click += darkToolStripMenuItem_Click; // + // fullUIToolStripMenuItem + // + fullUIToolStripMenuItem.Checked = true; + fullUIToolStripMenuItem.CheckOnClick = true; + fullUIToolStripMenuItem.CheckState = CheckState.Checked; + fullUIToolStripMenuItem.Name = "fullUIToolStripMenuItem"; + fullUIToolStripMenuItem.Size = new Size(140, 22); + fullUIToolStripMenuItem.Text = "Full UI"; + // // helpToolStripMenuItem // helpToolStripMenuItem.Alignment = ToolStripItemAlignment.Right; @@ -185,28 +190,13 @@ Saver.DefaultExt = "html"; Saver.Filter = "HTML websites|*.html|All files|*.*"; // - // groupBox4 - // - groupBox4.Controls.Add(chromiumWebBrowser1); - groupBox4.Controls.Add(button4); - groupBox4.Dock = DockStyle.Fill; - groupBox4.FlatStyle = FlatStyle.System; - groupBox4.Location = new Point(0, 91); - groupBox4.Name = "groupBox4"; - groupBox4.Size = new Size(800, 378); - groupBox4.TabIndex = 3; - groupBox4.TabStop = false; - groupBox4.Text = "Preview"; - groupBox4.UseCompatibleTextRendering = true; - groupBox4.Enter += groupBox4_Enter; - // // chromiumWebBrowser1 // chromiumWebBrowser1.ActivateBrowserOnCreation = false; chromiumWebBrowser1.Dock = DockStyle.Fill; - chromiumWebBrowser1.Location = new Point(3, 42); + chromiumWebBrowser1.Location = new Point(0, 86); chromiumWebBrowser1.Name = "chromiumWebBrowser1"; - chromiumWebBrowser1.Size = new Size(794, 333); + chromiumWebBrowser1.Size = new Size(800, 383); chromiumWebBrowser1.TabIndex = 3; chromiumWebBrowser1.AddressChanged += chromiumWebBrowser1_AddressChanged; // @@ -215,9 +205,10 @@ button4.Dock = DockStyle.Top; button4.Enabled = false; button4.FlatStyle = FlatStyle.System; - button4.Location = new Point(3, 19); + button4.ForeColor = SystemColors.ControlText; + button4.Location = new Point(0, 63); button4.Name = "button4"; - button4.Size = new Size(794, 23); + button4.Size = new Size(800, 23); button4.TabIndex = 1; button4.Text = "Render preview"; button4.UseVisualStyleBackColor = true; @@ -236,26 +227,13 @@ button3.UseVisualStyleBackColor = false; button3.Click += button3_Click; // - // groupBox3 - // - groupBox3.Controls.Add(button2); - groupBox3.Controls.Add(textBox2); - groupBox3.Dock = DockStyle.Top; - groupBox3.FlatStyle = FlatStyle.System; - groupBox3.Location = new Point(0, 24); - groupBox3.Name = "groupBox3"; - groupBox3.Size = new Size(800, 67); - groupBox3.TabIndex = 2; - groupBox3.TabStop = false; - groupBox3.Text = "Input file"; - // // button2 // - button2.Dock = DockStyle.Fill; + button2.Dock = DockStyle.Top; button2.FlatStyle = FlatStyle.System; - button2.Location = new Point(3, 35); + button2.Location = new Point(0, 40); button2.Name = "button2"; - button2.Size = new Size(794, 29); + button2.Size = new Size(800, 23); button2.TabIndex = 3; button2.Text = "Select file"; button2.UseVisualStyleBackColor = true; @@ -265,29 +243,22 @@ // textBox2.BorderStyle = BorderStyle.None; textBox2.Dock = DockStyle.Top; - textBox2.Location = new Point(3, 19); + textBox2.Location = new Point(0, 24); textBox2.Name = "textBox2"; textBox2.PlaceholderText = "Type path or select file below. "; - textBox2.Size = new Size(794, 16); + textBox2.Size = new Size(800, 16); textBox2.TabIndex = 2; textBox2.TextChanged += textBox2_TextChanged; // - // fullUIToolStripMenuItem - // - fullUIToolStripMenuItem.Checked = true; - fullUIToolStripMenuItem.CheckOnClick = true; - fullUIToolStripMenuItem.CheckState = CheckState.Checked; - fullUIToolStripMenuItem.Name = "fullUIToolStripMenuItem"; - fullUIToolStripMenuItem.Size = new Size(140, 22); - fullUIToolStripMenuItem.Text = "Full UI"; - // // Form1 // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(800, 492); - Controls.Add(groupBox4); - Controls.Add(groupBox3); + Controls.Add(chromiumWebBrowser1); + Controls.Add(button4); + Controls.Add(button2); + Controls.Add(textBox2); Controls.Add(button3); Controls.Add(menuStrip1); Icon = (Icon)resources.GetObject("$this.Icon"); @@ -299,9 +270,6 @@ Load += Form1_Load; menuStrip1.ResumeLayout(false); menuStrip1.PerformLayout(); - groupBox4.ResumeLayout(false); - groupBox3.ResumeLayout(false); - groupBox3.PerformLayout(); ResumeLayout(false); PerformLayout(); } @@ -313,13 +281,11 @@ private ToolStripMenuItem aboutToolStripMenuItem; private OpenFileDialog Opener; private SaveFileDialog Saver; - private GroupBox groupBox4; private Button button3; private Button button4; private ToolStripMenuItem renderToolStripMenuItem; private ToolStripMenuItem openDevToolsToolStripMenuItem; private ToolStripMenuItem exitToolStripMenuItem; - private GroupBox groupBox3; private Button button2; private TextBox textBox2; private CefSharp.WinForms.ChromiumWebBrowser chromiumWebBrowser1; diff --git a/Form1.cs b/Form1.cs index 81fc150..c6ef467 100644 --- a/Form1.cs +++ b/Form1.cs @@ -2,6 +2,7 @@ using CefSharp; using CefSharp.WinForms; using Markdig; using System.Diagnostics; +using System.Drawing.Drawing2D; namespace MintHTML { @@ -9,7 +10,7 @@ namespace MintHTML { string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string markfile; - string htmlfile = "
Open a markdown file and press \"Render preview\" to see the output here.
"; + string htmlfile = "Open a markdown file and press \"Render preview\" to see the output here.
"; string logo = @"