mirror of
https://gitee.com/wang-yin1/wpf-visual-process-framework
synced 2026-03-03 00:00:56 +08:00
2025-07-15 15:16
This commit is contained in:
@@ -46,7 +46,8 @@ namespace VisionFrame.ViewModels
|
||||
public ICommand SaveFlowCommand { get; set; }
|
||||
public ICommand OpenFlowCommand { get; set; }
|
||||
|
||||
|
||||
public ICommand MaximizeCommand { get; }
|
||||
public ICommand MinimizeCommand { get; }
|
||||
public MainViewModel()
|
||||
{
|
||||
#region 组件列表数据初始化
|
||||
@@ -184,6 +185,26 @@ namespace VisionFrame.ViewModels
|
||||
SaveFlowCommand = new RelayCommand(DoSaveFlow);
|
||||
|
||||
OpenFlowCommand = new RelayCommand(DoOpenFlow);
|
||||
|
||||
MaximizeCommand = new RelayCommand(() =>
|
||||
{
|
||||
var window = Application.Current.MainWindow;
|
||||
if (window.WindowState==WindowState.Normal)
|
||||
{
|
||||
window.WindowState = WindowState.Maximized;
|
||||
}
|
||||
else
|
||||
{
|
||||
window.WindowState = WindowState.Normal;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
MinimizeCommand = new RelayCommand(() =>
|
||||
{
|
||||
var window = Application.Current.MainWindow;
|
||||
window.WindowState = WindowState.Minimized;
|
||||
});
|
||||
}
|
||||
|
||||
private void OnComponentItem(object obj)
|
||||
|
||||
Reference in New Issue
Block a user