public ContainerWindowViewModel() { this.ShowWindow = new DelegateCommand(() => { ContainerWindow window = ContainerWindow.GetWindow(this); window?.ShowWindow(); }); }
public static void ShowWindow(FormType formType, UserViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "用户", FormType = formType, IsDialogWindow = true, CloseVisible = System.Windows.Visibility.Visible, IconName = "Icon_User" }, ucFactory: (window) => { UserViewModel vm = new UserViewModel(source) { CloseWindow = () => window.Close() }; return(new UserEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(FormType formType, CoinViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "币种", FormType = formType, IsMaskTheParent = true, Width = 500, CloseVisible = Visibility.Visible, IconName = "Icon_Coin", }, ucFactory: (window) => { CoinViewModel vm = new CoinViewModel(source); window.AddCloseWindowOnecePath(vm.Id); return(new CoinEdit(vm)); }, fixedSize: true); }
public static void ShowWindow() { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "群控服务器", IsDialogWindow = true, IconName = "Icon_Server", Width = 400, Height = 120, CloseVisible = System.Windows.Visibility.Visible }, ucFactory: (window) => { var uc = new ControlCenterHostConfig(); var vm = (ControlCenterHostConfigViewModel)uc.DataContext; vm.CloseWindow = () => window.Close(); return(uc); }, fixedSize: true); }
public static void ShowWindow(CoinKernelViewModel coinKernelVm, EnvironmentVariable environmentVariable) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "环境变量", IsMaskTheParent = true, Width = 500, CloseVisible = System.Windows.Visibility.Visible }, ucFactory: (window) => { EnvironmentVariableEditViewModel vm = new EnvironmentVariableEditViewModel(coinKernelVm, environmentVariable); window.AddOnecePath <CloseWindowCommand>("处理关闭窗口命令", LogEnum.DevConsole, action: message => { window.Close(); }, pathId: vm.Id, location: typeof(EnvironmentVariableEdit)); return(new EnvironmentVariableEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(FormType formType, KernelOutputViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "内核输出", FormType = formType, IsMaskTheParent = true, Width = 900, CloseVisible = System.Windows.Visibility.Visible, IconName = "Icon_KernelOutput" }, ucFactory: (window) => { KernelOutputViewModel vm = new KernelOutputViewModel(source); window.AddCloseWindowOnecePath(vm.Id); return(new KernelOutputEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(FormType formType, GroupViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "组", FormType = formType, IsMaskTheParent = true, Width = 380, CloseVisible = System.Windows.Visibility.Visible, IconName = "Icon_Group" }, ucFactory: (window) => { GroupViewModel vm = new GroupViewModel(source); window.BuildCloseWindowOnecePath(vm.Id); return(new GroupEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(CoinKernelViewModel coinKernelVm, InputSegmentViewModel segment) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "片段", IsMaskTheParent = true, Width = 500, CloseVisible = System.Windows.Visibility.Visible }, ucFactory: (window) => { InputSegmentEditViewModel vm = new InputSegmentEditViewModel(coinKernelVm, segment) { CloseWindow = window.Close }; return(new InputSegmentEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(FormType formType, KernelViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "内核", FormType = formType, IconName = "Icon_Kernel", IsMaskTheParent = true, Width = 620, CloseVisible = Visibility.Visible, FooterVisible = Visibility.Collapsed }, ucFactory: (window) => { KernelViewModel vm = new KernelViewModel(source); window.AddCloseWindowOnecePath(vm.Id); return(new KernelEdit(vm)); }, fixedSize: false); }
public static void ShowWindow(FormType formType, PoolViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "矿池", FormType = formType, IconName = "Icon_Pool", IsMaskTheParent = true, Width = 540, CloseVisible = Visibility.Visible }, ucFactory: (window) => { PoolViewModel vm = new PoolViewModel(source); window.BuildCloseWindowOnecePath(vm.Id); return(new PoolEdit(vm)); }, fixedSize: true); }
public static void ShowWindow() { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "升级器版本", IconName = "Icon_Update", Width = 500, Height = 180, IsMaskTheParent = false, IsChildWindow = true, CloseVisible = System.Windows.Visibility.Visible }, ucFactory: (window) => { var uc = new NTMinerUpdaterConfig(); window.BuildCloseWindowOnecePath(uc.Vm.Id); return(uc); }, fixedSize: true); }
public static void ShowWindow(FormType formType, KernelInputViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "内核输入", FormType = formType, IconName = "Icon_KernelInput", Width = 660, IsMaskTheParent = true, CloseVisible = System.Windows.Visibility.Visible }, ucFactory: (window) => { KernelInputViewModel vm = new KernelInputViewModel(source) { CloseWindow = window.Close }; return(new KernelInputEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(FormType formType, KernelOutputKeywordViewModel data) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = $"内核输出关键字({(DevMode.IsDevMode ? "服务器" : "自定义")})", IsMaskTheParent = true, Width = 540, FormType = formType, CloseVisible = System.Windows.Visibility.Visible }, ucFactory: (window) => { KernelOutputKeywordViewModel vm = new KernelOutputKeywordViewModel(data); window.AddOnecePath <CloseWindowCommand>("处理关闭窗口命令", LogEnum.DevConsole, action: message => { window.Close(); }, pathId: vm.Id, location: typeof(KernelOutputKeywordEdit)); return(new KernelOutputKeywordEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(RemoteDesktopLoginViewModel vm) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = vm.Title, IconName = "Icon_RemoteDesktop", Width = 400, Height = 190, IsMaskTheParent = true, CloseVisible = System.Windows.Visibility.Visible, FooterVisible = System.Windows.Visibility.Collapsed }, ucFactory: (window) => { window.AddCloseWindowOnecePath(vm.Id); return(new RemoteDesktopLogin(vm)); }, beforeShow: (window, uc) => { uc.DoFocus(); }, fixedSize: true); }
public static void ShowWindow(FormType formType, OverClockDataViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "超频菜谱", FormType = formType, IsDialogWindow = true, Width = 220, CloseVisible = System.Windows.Visibility.Visible, IconName = "Icon_OverClock" }, ucFactory: (window) => { OverClockDataViewModel vm = new OverClockDataViewModel(source) { CloseWindow = () => window.Close() }; return(new OverClockDataEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(FormType formType, KernelViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "内核", FormType = formType, IconName = "Icon_Kernel", IsDialogWindow = true, Width = 620, CloseVisible = Visibility.Visible }, ucFactory: (window) => { KernelViewModel vm = new KernelViewModel(source) { CloseWindow = () => window.Close() }; return(new KernelEdit(vm)); }, fixedSize: false); }
public static void ShowWindow() { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "创建账号", IconName = "Icon_SignUp", Width = 370, IsMaskTheParent = true, CloseVisible = System.Windows.Visibility.Visible, FooterVisible = System.Windows.Visibility.Collapsed }, ucFactory: (window) => { SignUpPageViewModel vm = new SignUpPageViewModel(); window.BuildCloseWindowOnecePath(vm.Id); return(new SignUpPage(vm)); }, beforeShow: (window, uc) => { uc.DoFocus(); }, fixedSize: true); }
public static void ShowDialog() { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "自动挖矿倒计时", Width = 400, Height = 200, IsDialogWindow = true, CloseVisible = System.Windows.Visibility.Collapsed, IconName = "Icon_Logo" }, ucFactory: (window) => { AutoStartCountdown uc = new AutoStartCountdown(); uc.CloseWindow = () => { window.Close(); }; return(uc); }, fixedSize: true); }
public static void ShowWindow(FormType formType, KernelViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "内核", FormType = formType, IconName = "Icon_Kernel", IsMaskTheParent = true, Width = 620, CloseVisible = Visibility.Visible }, ucFactory: (window) => { KernelViewModel vm = new KernelViewModel(source); window.AddOnecePath <CloseWindowCommand>("处理关闭窗口命令", LogEnum.DevConsole, action: message => { window.Close(); }, pathId: vm.Id, location: typeof(KernelEdit)); return(new KernelEdit(vm)); }, fixedSize: false); }
public static void ShowWindow(FormType formType, KernelOutputKeywordViewModel data) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = $"内核输出关键字({(DevMode.IsDevMode ? "服务器" : "自定义")})", IsMaskTheParent = true, Width = 540, FormType = formType, CloseVisible = System.Windows.Visibility.Visible }, ucFactory: (window) => { KernelOutputKeywordViewModel vm = new KernelOutputKeywordViewModel(data) { CloseWindow = window.Close }; return(new KernelOutputKeywordEdit(vm)); }, fixedSize: true); }
public static void ShowWindow() { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "属性", IconName = "Icon_Property", Width = 700, Height = AppStatic.MainWindowHeight, CloseVisible = Visibility.Visible }, ucFactory: (window) => { var uc = new OuterProperty(); var vm = (OuterPropertyViewModel)uc.DataContext; window.Activated += (object sender, System.EventArgs e) => { vm.OnPropertyChanged(nameof(vm.IsAutoAdminLogon)); }; return(uc); }, fixedSize: false); }
public static void ShowWindow(string title, string helpText) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "内核帮助", IconName = "Icon_Help", Width = 700, Height = 500, CloseVisible = System.Windows.Visibility.Visible, FooterVisible = System.Windows.Visibility.Collapsed }, ucFactory: (window) => { return(new KernelHelpPage(new KernelHelpPageViewModel() { HelpText = helpText })); }, fixedSize: false); }
public static void ShowWindow(FormType formType, MinerGroupViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "矿工分组", FormType = formType, IsMaskTheParent = true, Width = 520, CloseVisible = System.Windows.Visibility.Visible, IconName = "Icon_MinerGroup" }, ucFactory: (window) => { MinerGroupViewModel vm = new MinerGroupViewModel(source); window.AddCloseWindowOnecePath(vm.Id); return(new MinerGroupEdit(vm)); }, beforeShow: (window, uc) => { uc.DoFocus(); }, fixedSize: true); }
public static void ShowWindow(FormType formType, PoolKernelViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "矿池级参数", FormType = formType, IsDialogWindow = true, IconName = "Icon_Kernel", CloseVisible = System.Windows.Visibility.Visible }, ucFactory: (window) => { PoolKernelViewModel vm = new PoolKernelViewModel(source) { CloseWindow = () => window.Close() }; return(new PoolKernelEdit(vm)); }, fixedSize: true); }
public static void ShowDialog() { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "Windows系统重启倒计时", 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 ShowWindow(FormType formType, ColumnsShowViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "列显", FormType = formType, IsMaskTheParent = true, CloseVisible = System.Windows.Visibility.Visible, IconName = "Icon_ColumnsShow", }, ucFactory: (window) => { ColumnsShowViewModel vm = new ColumnsShowViewModel(source) { CloseWindow = window.Close }; return(new ColumnsShowEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(FormType formType, SysDicViewModel source) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "系统字典", FormType = formType, Width = 500, IsMaskTheParent = true, CloseVisible = System.Windows.Visibility.Visible, IconName = "Icon_SysDic" }, ucFactory: (window) => { SysDicViewModel vm = new SysDicViewModel(source); window.AddOnecePath <CloseWindowCommand>("处理关闭窗口命令", LogEnum.DevConsole, action: message => { window.Close(); }, pathId: vm.Id, location: typeof(SysDicEdit)); return(new SysDicEdit(vm)); }, fixedSize: true); }
public static void ShowWindow(FormType formType, ServerMessageViewModel data) { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "服务器消息", IsDialogWindow = true, Width = 540, FormType = formType, CloseVisible = System.Windows.Visibility.Visible }, ucFactory: (window) => { ServerMessageViewModel vm = new ServerMessageViewModel(data) { CloseWindow = () => window.Close() }; return(new ServerMessageEdit(vm)); }, fixedSize: true); }
public static void ShowWindow() { ContainerWindow.ShowWindow(new ContainerWindowViewModel { Title = "修改密码", IsMaskTheParent = true, Width = 300, CloseVisible = Visibility.Visible, FooterVisible = Visibility.Collapsed, IconName = "Icon_Password" }, ucFactory: (window) => { var uc = new ChangePassword(); window.AddCloseWindowOnecePath(uc.Vm.Id); return(uc); }, beforeShow: (window, uc) => { uc.DoFocus(); }, fixedSize: true); }
public static void ShowWindow( string downloadFileUrl, string fileTitle, // window, isSuccess, message, saveFileFullName, etagValue Action <ContainerWindow, bool, string, string> downloadComplete) { UIThread.Execute(() => { ContainerWindow.ShowWindow(new ContainerWindowViewModel { IconName = "Icon_Download", CloseVisible = System.Windows.Visibility.Visible, }, ucFactory: (window) => { FileDownloaderViewModel vm = new FileDownloaderViewModel(downloadFileUrl, (isSuccess, message, saveFileFullName) => { downloadComplete(window, isSuccess, message, saveFileFullName); }); return(new FileDownloader(vm)); }, fixedSize: true); }); }