mirror of
https://github.com/BluePointLilac/ContextMenuManager.git
synced 2026-01-15 06:03:50 +08:00
xml空白符问题修复
This commit is contained in:
@@ -32,8 +32,8 @@ namespace ContextMenuManager.Controls
|
||||
if(!File.Exists(xmlPath)) return;
|
||||
this.AddItem(groupItem);
|
||||
XmlDocument doc = new XmlDocument();
|
||||
try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath))); }
|
||||
catch { return; }
|
||||
try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath)).Trim()); }
|
||||
catch(Exception e) { MessageBoxEx.Show(e.Message); return; }
|
||||
foreach(XmlNode xn in doc.DocumentElement.ChildNodes)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -512,7 +512,7 @@ namespace ContextMenuManager.Controls
|
||||
private void LoadUwpModeItem(string xmlPath)
|
||||
{
|
||||
XmlDocument doc = new XmlDocument();
|
||||
try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath))); }
|
||||
try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath)).Trim()); }
|
||||
catch { return; }
|
||||
foreach(XmlElement sceneXE in doc.DocumentElement.ChildNodes)
|
||||
{
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace ContextMenuManager.Controls
|
||||
if(!File.Exists(xmlPath)) return;
|
||||
this.AddItem(groupItem);
|
||||
XmlDocument doc = new XmlDocument();
|
||||
try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath))); }
|
||||
catch { return; }
|
||||
try { doc.LoadXml(File.ReadAllText(xmlPath, EncodingType.GetType(xmlPath)).Trim()); }
|
||||
catch(Exception e) { MessageBoxEx.Show(e.Message); return; }
|
||||
foreach(XmlElement groupXE in doc.DocumentElement.ChildNodes)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user