From ae699a04a0bde78521718df6483141c119a36b50 Mon Sep 17 00:00:00 2001 From: fyf Date: Mon, 5 Dec 2022 13:32:05 +0800 Subject: [PATCH] 11 --- BPASmartClient.ScreenLib/Helper/Main.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/BPASmartClient.ScreenLib/Helper/Main.cs b/BPASmartClient.ScreenLib/Helper/Main.cs index c376e510..47a8eb5f 100644 --- a/BPASmartClient.ScreenLib/Helper/Main.cs +++ b/BPASmartClient.ScreenLib/Helper/Main.cs @@ -259,6 +259,25 @@ namespace BPASmartClient.ScreenLib { } } + else + { + string text = System.IO.File.ReadAllText(name); + if (text.Replace("\r\n", "") != html) + { + try + { + using (StreamWriter sw = new StreamWriter(name, false, System.Text.Encoding.GetEncoding("UTF-8"))) //保存地址 + { + sw.WriteLine(html); + sw.Flush(); + sw.Close(); + } + } + catch + { + } + } + } view2.Source = new Uri(name); } ///