Beispiel #1
0
        public VendingMachineGameEditorControl(VendingMachineGameCommand command)
        {
            InitializeComponent();

            this.existingCommand = command;
            this.viewModel       = new VendingMachineGameEditorControlViewModel(command);
        }
        public VendingMachineGameEditorControlViewModel(VendingMachineGameCommand command)
            : this()
        {
            this.existingCommand = command;

            foreach (GameOutcome outcome in this.existingCommand.Outcomes)
            {
                this.Outcomes.Add(new VendingMachineOutcome(outcome));
            }
        }
        public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements)
        {
            GameCommandBase newCommand = new VendingMachineGameCommand(name, triggers, requirements, this.Outcomes.Select(o => o.GetGameOutcome()));

            if (this.existingCommand != null)
            {
                ChannelSession.Settings.GameCommands.Remove(this.existingCommand);
                newCommand.ID = this.existingCommand.ID;
            }
            ChannelSession.Settings.GameCommands.Add(newCommand);
        }
        public override void SaveGameCommand()
        {
            GameCommandBase newCommand = new VendingMachineGameCommand(this.CommandDetailsControl.GameName, this.CommandDetailsControl.ChatTriggers,
                                                                       this.CommandDetailsControl.GetRequirements(), this.outcomes.Select(o => o.GetGameOutcome()));

            if (this.existingCommand != null)
            {
                ChannelSession.Settings.GameCommands.Remove(this.existingCommand);
                newCommand.ID = this.existingCommand.ID;
            }
            ChannelSession.Settings.GameCommands.Add(newCommand);
        }
Beispiel #5
0
        public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements)
        {
            GameCommandBase newCommand = new VendingMachineGameCommand(name, triggers, requirements, this.Outcomes.Select(o => o.GetGameOutcome()));

            this.SaveGameCommand(newCommand, this.existingCommand);
        }
 public VendingMachineGameEditorControl(VendingMachineGameCommand command)
     : this()
 {
     this.existingCommand = command;
 }