修复聊天框打字时自动消失

This commit is contained in:
ZouJin 2023-08-16 16:55:36 +10:00
parent a0d58ca7b6
commit ac30fe6b98
3 changed files with 35 additions and 3 deletions

View File

@ -354,17 +354,25 @@ namespace VPet_Simulator.Core
return FindResource("DangerProgressBarForeground") as Brush; return FindResource("DangerProgressBarForeground") as Brush;
} }
} }
public void MenuPanel_MouseEnter()
private void MenuPanel_MouseEnter(object sender, MouseEventArgs e)
{ {
BdrPanel.Visibility = Visibility.Visible; BdrPanel.Visibility = Visibility.Visible;
M_TimeUIHandle(m); M_TimeUIHandle(m);
} }
private void MenuPanel_MouseLeave(object sender, MouseEventArgs e) public void MenuPanel_MouseLeave()
{ {
closePanelTimer.Start(); closePanelTimer.Start();
} }
private void MenuPanel_MouseEnter(object sender, MouseEventArgs e)
{
MenuPanel_MouseEnter();
}
private void MenuPanel_MouseLeave(object sender, MouseEventArgs e)
{
MenuPanel_MouseLeave();
}
public void Dispose() public void Dispose()
{ {

View File

@ -273,5 +273,17 @@ namespace VPet_Simulator.Windows
lastopeningtime = DateTime.Now; lastopeningtime = DateTime.Now;
Task.Run(TalkChatInfoDisplay); Task.Run(TalkChatInfoDisplay);
} }
private void tbTalk_TextChanged(object sender, TextChangedEventArgs e)
{
if (tbTalk.Text.Length > 0)
{
mw.Main.ToolBar.MenuPanel_MouseEnter();
}
else
{
mw.Main.ToolBar.MenuPanel_MouseLeave();
}
}
} }
} }

View File

@ -83,5 +83,17 @@ namespace VPet_Simulator.Windows
e.Handled = true; e.Handled = true;
} }
} }
private void tbTalk_TextChanged(object sender, TextChangedEventArgs e)
{
if (tbTalk.Text.Length > 0)
{
mw.Main.ToolBar.MenuPanel_MouseEnter();
}
else
{
mw.Main.ToolBar.MenuPanel_MouseLeave();
}
}
} }
} }