dev_split_view_vm
DESKTOP-3BO4HSG\ksat 2 years ago
parent b8c28da3d6
commit 60cc864fa8

@ -142,7 +142,7 @@ namespace STranslate
HotkeysHelper.InitialHook(this); HotkeysHelper.InitialHook(this);
HotkeysHelper.Register(HotkeysHelper.InputTranslateId, () => HotkeysHelper.Register(HotkeysHelper.InputTranslateId, () =>
{ {
InputTranslateMenuItem_Click(null, null); vm.InputTranslate();
}); });
HotkeysHelper.Register(HotkeysHelper.CrosswordTranslateId, () => HotkeysHelper.Register(HotkeysHelper.CrosswordTranslateId, () =>

@ -38,8 +38,7 @@ namespace STranslate.ViewModel
//输入翻译 //输入翻译
InputTranslateCmd = new RelayCommand((_) => true, (_) => InputTranslateCmd = new RelayCommand((_) => true, (_) =>
{ {
ClearAll(); InputTranslate();
OpenMainWin();
}); });
//显示主界面 //显示主界面
@ -138,12 +137,21 @@ namespace STranslate.ViewModel
/// <summary> /// <summary>
/// 打开主窗口 /// 打开主窗口
/// </summary> /// </summary>
private void OpenMainWin() public void OpenMainWin()
{ {
mainwin.Show(); mainwin.Show();
mainwin.Activate(); mainwin.Activate();
//TODO: add textbox focus //TODO: add textbox focus
} }
public void InputTranslate()
{
ClearAll();
OpenMainWin();
}
public void CrossWordTranslate()
{
}
/// <summary> /// <summary>
/// 初始化配置文件 /// 初始化配置文件

Loading…
Cancel
Save