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

Commit ef77552

Browse files
committed
.
1 parent a2d430b commit ef77552

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/LXLDevHelper/Views/EditFunctionWIndow.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
<StackPanel>
7272
<TextBlock Text="选择或手动输入类型"/>
7373
<TextBlock Text="右键下拉框箭头位置编辑匿名函数"/>
74+
<TextBlock Text="当前内容:"/>
75+
<TextBlock Text="{Binding ParamType,Mode=OneWay}" TextWrapping="Wrap"/>
7476
</StackPanel>
7577
</ComboBox.ToolTip>
7678
<ComboBox.ContextMenu>

src/LXLDevHelper/Views/EditFunctionWIndow.xaml.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public string Result
4343
if (edited)
4444
{
4545
try
46-
{
46+
{
4747
//ShowWarn("Function@" + Newtonsoft.Json.JsonConvert.SerializeObject(Data, Newtonsoft.Json.Formatting.None));
48-
return "Function@" + JsonConvert.SerializeObject(Data, Formatting.None);
48+
return "Function@" + JsonConvert.SerializeObject(Data, Formatting.None);
4949
}
5050
catch (System.Exception ex) { ShowWarn("保存方法参数出错\n" + ex.ToString()); }
5151
}
@@ -86,6 +86,7 @@ private void SelectTypeMenuItem_Click(object sender, RoutedEventArgs e)
8686
var text = ((ViewModels.LXLFuncParamsBase)me.Tag).ParamType;
8787
var result = EditFunction(text);
8888
((ViewModels.LXLFuncParamsBase)me.Tag).ParamType = result;
89+
Dispatcher.InvokeAsync(() => ((ViewModels.LXLFuncParamsBase)me.Tag).ParamType = result);
8990
}
9091
private void SelectTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
9192
{
@@ -94,6 +95,7 @@ private void SelectTypeComboBox_SelectionChanged(object sender, SelectionChanged
9495
{
9596
var result = EditFunction(me.Text);
9697
((ViewModels.LXLFuncParamsBase)me.Tag).ParamType = result;
98+
Dispatcher.InvokeAsync(() => ((ViewModels.LXLFuncParamsBase)me.Tag).ParamType = result);
9799
}
98100
}
99101
private string EditFunction(string text)

0 commit comments

Comments
 (0)