public static void ShowDialog(RestartWindowsViewModel vm) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "重启电脑", Width = 400, Height = 200, IsMaskTheParent = true, CloseVisible = System.Windows.Visibility.Collapsed, IconName = "Icon_Restart" }, ucFactory: (window) => { RestartWindows uc = new RestartWindows(vm); window.AddCloseWindowOnecePath(uc.Vm.Id); return(uc); }, fixedSize: true); }
public static void ShowDialog() { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Width = 400, Height = 200, IsDialogWindow = true, CloseVisible = System.Windows.Visibility.Collapsed, IconName = "Icon_Restart" }, ucFactory: (window) => { RestartWindows uc = new RestartWindows(); uc.CloseWindow = () => { window.Close(); }; return(uc); }, fixedSize: true); }
public static void ShowDialog() { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "重启电脑", Width = 400, Height = 200, IsMaskTheParent = true, CloseVisible = System.Windows.Visibility.Collapsed, IconName = "Icon_Restart" }, ucFactory: (window) => { RestartWindows uc = new RestartWindows(); window.AddOnecePath <CloseWindowCommand>("处理关闭窗口命令", LogEnum.DevConsole, action: message => { window.Close(); }, pathId: uc.Id, location: typeof(RestartWindows)); return(uc); }, fixedSize: true); }