public LockBoxGameEditorControl(LockBoxGameCommand command)
        {
            InitializeComponent();

            this.existingCommand = command;
            this.viewModel       = new LockBoxGameEditorControlViewModel(command);
        }
        public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements)
        {
            GameCommandBase newCommand = new LockBoxGameCommand(name, triggers, requirements, this.StatusArgument, this.StatusCommand, this.CombinationLength,
                                                                this.InitialAmount, this.SuccessfulGuessCommand, this.FailedGuessCommand, this.InspectionArgument.ToLower(), this.InspectionCost, this.InspectionCommand);

            this.SaveGameCommand(newCommand, this.existingCommand);
        }
Esempio n. 3
0
        public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements)
        {
            GameCommandBase newCommand = new LockBoxGameCommand(name, triggers, requirements, this.StatusArgument, this.StatusCommand, this.CombinationLength,
                                                                this.InitialAmount, this.SuccessfulGuessCommand, this.FailedGuessCommand, this.InspectionArgument.ToLower(), this.InspectionCost, this.InspectionCommand);

            if (this.existingCommand != null)
            {
                ChannelSession.Settings.GameCommands.Remove(this.existingCommand);
                newCommand.ID = this.existingCommand.ID;
            }
            ChannelSession.Settings.GameCommands.Add(newCommand);
        }
Esempio n. 4
0
        public LockBoxGameEditorControlViewModel(LockBoxGameCommand command)
        {
            this.existingCommand = command;

            this.CombinationLength  = this.existingCommand.CombinationLength;
            this.InitialAmount      = this.existingCommand.InitialAmount;
            this.StatusArgument     = this.existingCommand.StatusArgument;
            this.InspectionArgument = this.existingCommand.InspectionArgument;
            this.InspectionCost     = this.existingCommand.InspectionCost;

            this.FailedGuessCommand     = this.existingCommand.FailedGuessCommand;
            this.SuccessfulGuessCommand = this.existingCommand.SuccessfulGuessCommand;
            this.StatusCommand          = this.existingCommand.StatusCommand;
            this.InspectionCommand      = this.existingCommand.InspectionCommand;
        }
Esempio n. 5
0
        public override void SaveGameCommand()
        {
            int.TryParse(this.CombinationLengthTextBox.Text, out int comboLength);
            int.TryParse(this.InitialAmountTextBox.Text, out int initialAmount);
            int.TryParse(this.InspectionCostTextBox.Text, out int inspectionCost);

            GameCommandBase newCommand = new LockBoxGameCommand(this.CommandDetailsControl.GameName, this.CommandDetailsControl.ChatTriggers, this.CommandDetailsControl.GetRequirements(),
                                                                this.StatusArgumentTextBox.Text.ToLower(), this.statusCommand, comboLength, initialAmount, this.successfulGuessCommand, this.failedGuessCommand,
                                                                this.InspectionArgumentTextBox.Text.ToLower(), inspectionCost, this.inspectionCommand);

            if (this.existingCommand != null)
            {
                ChannelSession.Settings.GameCommands.Remove(this.existingCommand);
                newCommand.ID = this.existingCommand.ID;
            }
            ChannelSession.Settings.GameCommands.Add(newCommand);
        }
Esempio n. 6
0
 public LockBoxGameEditorControl(LockBoxGameCommand command)
     : this()
 {
     this.existingCommand = command;
 }