public InnerProperty() { if (WpfUtil.IsInDesignMode) { return; } this.Vm = new InnerPropertyViewModel(); this.DataContext = this.Vm; InitializeComponent(); this.OnLoaded(window => { window.AddEventPath <ServerJsonVersionChangedEvent>("刷新展示的ServerJsonVersion", LogEnum.DevConsole, action: message => { Vm.ServerJsonVersion = NTMinerContext.Instance.GetServerJsonVersion(); }, location: this.GetType()); }); }
public InnerProperty() { if (WpfUtil.IsInDesignMode) { return; } this.Vm = new InnerPropertyViewModel(); this.DataContext = this.Vm; InitializeComponent(); this.OnLoaded(window => { window.BuildEventPath <ServerJsonVersionChangedEvent>("刷新展示的ServerJsonVersion", LogEnum.DevConsole, location: this.GetType(), PathPriority.Normal, path: message => { if (message.IsChagned) { Vm.ServerJsonVersion = message.NewVersion; } }); }); }