Commit 0e716f3e authored by 潘栩锋's avatar 潘栩锋 🚴

添加 组件保存参数 找不到layout文件夹时,会自动创建

parent ae1970a9
......@@ -69,6 +69,13 @@ namespace MultiLayout.UiModule
{
try
{
string dirPath = System.IO.Path.GetDirectoryName(FilePath);
if (!System.IO.Directory.Exists(dirPath))
{
System.IO.Directory.CreateDirectory(dirPath);
}
string json = Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
File.WriteAllText(FilePath, json);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment