public SlotMachineGameEditorControl(SlotMachineGameCommand command)
        {
            InitializeComponent();

            this.existingCommand = command;
            this.viewModel       = new SlotMachineGameEditorControlViewModel(command);
        }
Exemplo n.º 2
0
        public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements)
        {
            List <string> symbolsList = new List <string>(this.Symbols.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries));

            GameCommandBase newCommand = new SlotMachineGameCommand(name, triggers, requirements, this.Outcomes.Select(o => o.GetGameOutcome()), symbolsList, this.FailureOutcomeCommand);

            this.SaveGameCommand(newCommand, this.existingCommand);
        }
Exemplo n.º 3
0
        public SlotMachineGameEditorControlViewModel(SlotMachineGameCommand command)
            : this()
        {
            this.existingCommand = command;

            this.Symbols = string.Join(" ", this.existingCommand.AllSymbols);
            this.FailureOutcomeCommand = this.existingCommand.FailureOutcomeCommand;

            foreach (GameOutcome outcome in this.existingCommand.Outcomes)
            {
                this.Outcomes.Add(new SlotMachineOutcome((SlotsGameOutcome)outcome));
            }
        }
Exemplo n.º 4
0
        public override void SaveGameCommand()
        {
            List <string> symbolsList = new List <string>(this.SymbolsTextBox.Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries));

            GameCommandBase newCommand = new SlotMachineGameCommand(this.CommandDetailsControl.GameName, this.CommandDetailsControl.ChatTriggers,
                                                                    this.CommandDetailsControl.GetRequirements(), this.outcomes.Select(o => o.GetGameOutcome()), symbolsList, this.failureOutcomeCommand);

            if (this.existingCommand != null)
            {
                ChannelSession.Settings.GameCommands.Remove(this.existingCommand);
                newCommand.ID = this.existingCommand.ID;
            }
            ChannelSession.Settings.GameCommands.Add(newCommand);
        }
Exemplo n.º 5
0
 public SlotMachineGameEditorControl(SlotMachineGameCommand command)
     : this()
 {
     this.existingCommand = command;
 }