Beispiel #1
0
        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);
        }
Beispiel #2
0
 public void Setup(ViewModelEditorToolMapSettings settingsViewModel)
 {
     this.DataContext = settingsViewModel;
 }