Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

Commit 6fbc449

Browse files
committed
Update EditFunctionWIndow.xaml.cs
1 parent a3f4bac commit 6fbc449

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/LXLDevHelper/Views/EditFunctionWIndow.xaml.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ public static string ShowEditFunctionDialog(string target)
2020
public EditFunctionWindow(string text)
2121
{
2222
input = text;
23+
const string prefix = "Function@";
24+
if (text.StartsWith(prefix))
25+
{
26+
try
27+
{
28+
Data = Newtonsoft.Json.JsonConvert.DeserializeObject<ViewModels.EditFunctionWindowViewModel>(text.Substring(prefix.Length));
29+
}
30+
catch (System.Exception ex) { ShowWarn($"加载数据失败!\n{text}\n{ex}"); }
31+
}
2332
InitializeComponent();
2433
DataContext = Data;
2534
}

0 commit comments

Comments
 (0)