From 4c831a7b2ce66add192142f761d785c32401f692 Mon Sep 17 00:00:00 2001 From: Swee Date: Sun, 12 May 2024 16:42:49 -0700 Subject: [PATCH] Done for an hour or two --- Form1.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Form1.cs b/Form1.cs index dfbfe90..a68accb 100644 --- a/Form1.cs +++ b/Form1.cs @@ -76,7 +76,21 @@ font-family: sans-serif private void button3_Click(object sender, EventArgs e) { - + Saver.FileName = textBox2.Text.Split("\\").Last()[0..^3] + ".html"; + DialogResult result = Saver.ShowDialog(); + if (result == DialogResult.OK) + { + if (MessageBox.Show("Do you want to keep the current CSS settings?","Converter",MessageBoxButtons.YesNo,MessageBoxIcon.Question) == DialogResult.Yes) + { + convert(); + File.WriteAllText(Saver.FileName,css + htmlfile); + } else { + convert(); + File.WriteAllText(Saver.FileName, htmlfile); + } + MessageBox.Show("Save complete.","Converter",MessageBoxButtons.OK,MessageBoxIcon.Information); + chromiumWebBrowser1.LoadHtml(css + htmlfile); + } } private void Form1_FormClosed(object sender, FormClosedEventArgs e)