public override FrameworkElement CreateSettingsControl() { var control = new EditorToolMapSettings(); if (this.settingsViewModel == null) { this.commandClientSaveWorld = new ActionCommandWithCondition( this.ClientSaveWorldLastFile, () => lastMapPath != null); this.settingsViewModel = new ViewModelEditorToolMapSettings( new ActionCommand(this.ClientNewWorld), new ActionCommand(this.ClientOpenWorld), new ActionCommand(this.ClientSaveWorldAs), this.commandClientSaveWorld, new ActionCommand(this.ClientLoadSavegame), new ActionCommand(this.ClientSaveSavegameAs)); } control.Setup(this.settingsViewModel); return(control); }
public void Setup(ViewModelEditorToolMapSettings settingsViewModel) { this.DataContext = settingsViewModel; }