|
|
|
@ -7,6 +7,7 @@ using SlnMesnac.WPF.Page;
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Threading;
|
|
|
|
|
|
|
|
|
|
namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
{
|
|
|
|
@ -17,6 +18,13 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
private HomePage homePage = new HomePage();
|
|
|
|
|
private LaminatePage laminatePage = new LaminatePage();
|
|
|
|
|
|
|
|
|
|
private string _TimeNow;
|
|
|
|
|
public string TimeNow
|
|
|
|
|
{
|
|
|
|
|
get => _TimeNow;
|
|
|
|
|
set { _TimeNow = value; RaisePropertyChanged(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 参数定义
|
|
|
|
|
/// <summary>
|
|
|
|
@ -88,7 +96,26 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
ControlOnClickCommand = new RelayCommand<object>(obj => ControlOnClick(obj));
|
|
|
|
|
FormControlCommand = new RelayCommand<object>(x => FormControl(x));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DispatcherTimer timer = new DispatcherTimer(DispatcherPriority.Send)
|
|
|
|
|
{
|
|
|
|
|
Interval = new TimeSpan(0, 0, 0, 1)
|
|
|
|
|
};
|
|
|
|
|
timer.Tick += timer_Tick;
|
|
|
|
|
timer.IsEnabled = true;
|
|
|
|
|
|
|
|
|
|
//监听键盘按键事件,如果按ESC则关闭该窗口
|
|
|
|
|
// this.KeyDown += Esc_Exit_KeyDown;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*事件处理器*/
|
|
|
|
|
private void timer_Tick(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
TimeNow = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 窗体控制
|
|
|
|
@ -150,6 +177,10 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
_logger.LogError("界面跳转逻辑异常", ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|