|
|
@ -61,33 +61,31 @@ namespace STranslate.ViewModel
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//置顶
|
|
|
|
//置顶
|
|
|
|
TopmostCmd = new RelayCommand((_) => true, (_) =>
|
|
|
|
TopmostCmd = new RelayCommand((_) => true, (o) =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var button = o as System.Windows.Controls.Button;
|
|
|
|
if (IsTopmost)
|
|
|
|
if (IsTopmost)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
(Mainwin.FindName("TopmostBtn") as System.Windows.Controls.Button)
|
|
|
|
button.SetResourceReference(System.Windows.Controls.Control.TemplateProperty, _UnTopmostTemplateName);
|
|
|
|
.SetResourceReference(System.Windows.Controls.Control.TemplateProperty, _UnTopmostTemplateName);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
(Mainwin.FindName("TopmostBtn") as System.Windows.Controls.Button)
|
|
|
|
button.SetResourceReference(System.Windows.Controls.Control.TemplateProperty, _TopmostTemplateName);
|
|
|
|
.SetResourceReference(System.Windows.Controls.Control.TemplateProperty, _TopmostTemplateName);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
IsTopmost = !IsTopmost;
|
|
|
|
IsTopmost = !IsTopmost;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//ESC
|
|
|
|
//ESC
|
|
|
|
EscCmd = new RelayCommand((_) => true, (_) =>
|
|
|
|
EscCmd = new RelayCommand((_) => true, (o) =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Mainwin.Hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//取消置顶
|
|
|
|
//取消置顶
|
|
|
|
if (IsTopmost)
|
|
|
|
if (IsTopmost)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
(Mainwin.FindName("TopmostBtn") as System.Windows.Controls.Button)
|
|
|
|
(o as System.Windows.Controls.Button)
|
|
|
|
.SetResourceReference(System.Windows.Controls.Control.TemplateProperty, _UnTopmostTemplateName);
|
|
|
|
.SetResourceReference(System.Windows.Controls.Control.TemplateProperty, _UnTopmostTemplateName);
|
|
|
|
IsTopmost = !IsTopmost;
|
|
|
|
IsTopmost = !IsTopmost;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Mainwin.Hide();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//切换语言
|
|
|
|
//切换语言
|
|
|
|