Compare commits

..

1 commit

Author SHA1 Message Date
DHR60
ea7ea5a0bf
Merge c88bf796f4 into a652fd879b 2025-09-26 16:43:17 +08:00
4 changed files with 11 additions and 3 deletions

View file

@ -46,6 +46,8 @@ public partial class MsgView : ReactiveUserControl<MsgViewModel>
private void ShowMsg(object msg) private void ShowMsg(object msg)
{ {
txtMsg.BeginChange();
//var lineCount = txtMsg.LineCount; //var lineCount = txtMsg.LineCount;
//if (lineCount > ViewModel?.NumMaxMsg) //if (lineCount > ViewModel?.NumMaxMsg)
//{ //{
@ -62,11 +64,13 @@ public partial class MsgView : ReactiveUserControl<MsgViewModel>
{ {
txtMsg.ScrollToEnd(); txtMsg.ScrollToEnd();
} }
txtMsg.EndChange();
} }
public void ClearMsg() public void ClearMsg()
{ {
txtMsg.Clear(); txtMsg.Text = string.Empty;
txtMsg.AppendText("----- Message cleared -----\n"); txtMsg.AppendText("----- Message cleared -----\n");
} }

View file

@ -10,7 +10,7 @@
mc:Ignorable="d"> mc:Ignorable="d">
<UserControl.Resources> <UserControl.Resources>
<sys:Double x:Key="QrcodeWidth">400</sys:Double> <sys:Double x:Key="QrcodeWidth">500</sys:Double>
</UserControl.Resources> </UserControl.Resources>
<Grid Margin="32" RowDefinitions="Auto,Auto"> <Grid Margin="32" RowDefinitions="Auto,Auto">

View file

@ -47,6 +47,8 @@ public partial class MsgView
private void ShowMsg(object msg) private void ShowMsg(object msg)
{ {
txtMsg.BeginChange();
if (txtMsg.LineCount > ViewModel?.NumMaxMsg) if (txtMsg.LineCount > ViewModel?.NumMaxMsg)
{ {
ClearMsg(); ClearMsg();
@ -57,6 +59,8 @@ public partial class MsgView
{ {
txtMsg.ScrollToEnd(); txtMsg.ScrollToEnd();
} }
txtMsg.EndChange();
} }
public void ClearMsg() public void ClearMsg()

View file

@ -12,7 +12,7 @@
Style="{StaticResource ViewGlobal}" Style="{StaticResource ViewGlobal}"
mc:Ignorable="d"> mc:Ignorable="d">
<UserControl.Resources> <UserControl.Resources>
<sys:Double x:Key="QrcodeWidth">400</sys:Double> <sys:Double x:Key="QrcodeWidth">500</sys:Double>
</UserControl.Resources> </UserControl.Resources>
<Grid Margin="32"> <Grid Margin="32">