示例#1
0
        public SpinGameEditorControl(SpinGameCommand command)
        {
            InitializeComponent();

            this.existingCommand = command;
            this.viewModel       = new SpinGameEditorControlViewModel(command);
        }
 public SpinGameEditorControlViewModel(SpinGameCommand command)
     : this()
 {
     this.existingCommand = command;
     foreach (GameOutcome outcome in this.existingCommand.Outcomes)
     {
         this.Outcomes.Add(new SpinOutcome(outcome));
     }
 }
示例#3
0
        public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements)
        {
            GameCommandBase newCommand = new SpinGameCommand(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);
        }
示例#4
0
        public override void SaveGameCommand()
        {
            GameCommandBase newCommand = new SpinGameCommand(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);
        }
        public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements)
        {
            GameCommandBase newCommand = new SpinGameCommand(name, triggers, requirements, this.Outcomes.Select(o => o.GetGameOutcome()));

            this.SaveGameCommand(newCommand, this.existingCommand);
        }
示例#6
0
 public SpinGameEditorControl(SpinGameCommand command)
     : this()
 {
     this.existingCommand = command;
 }