public VolcanoGameEditorControlViewModel(VolcanoGameCommand command) { this.existingCommand = command; this.StatusArgument = this.existingCommand.StatusArgument; this.Stage1DepositCommand = this.existingCommand.Stage1DepositCommand; this.Stage1StatusCommand = this.existingCommand.Stage1StatusCommand; this.Stage2MinimumAmount = this.existingCommand.Stage2MinimumAmount; this.Stage2DepositCommand = this.existingCommand.Stage2DepositCommand; this.Stage2StatusCommand = this.existingCommand.Stage2StatusCommand; this.Stage3MinimumAmount = this.existingCommand.Stage3MinimumAmount; this.Stage3DepositCommand = this.existingCommand.Stage3DepositCommand; this.Stage3StatusCommand = this.existingCommand.Stage3StatusCommand; this.PayoutProbability = this.existingCommand.PayoutProbability; this.PayoutPercentageMinimum = (this.existingCommand.PayoutPercentageMinimum * 100); this.PayoutPercentageMaximum = (this.existingCommand.PayoutPercentageMaximum * 100); this.PayoutCommand = this.existingCommand.PayoutCommand; this.CollectArgument = this.existingCommand.CollectArgument; this.CollectTimeLimit = this.existingCommand.CollectTimeLimit; this.CollectPayoutPercentageMinimum = (this.existingCommand.CollectPayoutPercentageMinimum * 100); this.CollectPayoutPercentageMaximum = (this.existingCommand.CollectPayoutPercentageMaximum * 100); this.CollectCommand = this.existingCommand.CollectCommand; }
public override void SaveGameCommand() { int.TryParse(this.Stage2MinimumAmountTextBox.Text, out int stage2Minimum); int.TryParse(this.Stage3MinimumAmountTextBox.Text, out int stage3Minimum); int.TryParse(this.PayoutProbabilityTextBox.Text, out int payoutProbability); double.TryParse(this.PayoutPercentageMinimumLimitTextBox.Text, out double minPayoutPercentage); double.TryParse(this.PayoutPercentageMaximumLimitTextBox.Text, out double maxPayoutPercentage); int.TryParse(this.CollectTimeLimitTextBox.Text, out int collectTime); double.TryParse(this.CollectPayoutPercentageMinimumLimitTextBox.Text, out double collectMinPayoutPercentage); double.TryParse(this.CollectPayoutPercentageMaximumLimitTextBox.Text, out double collectMaxPayoutPercentage); minPayoutPercentage = minPayoutPercentage / 100.0; maxPayoutPercentage = maxPayoutPercentage / 100.0; collectMinPayoutPercentage = collectMinPayoutPercentage / 100.0; collectMaxPayoutPercentage = collectMaxPayoutPercentage / 100.0; GameCommandBase newCommand = new VolcanoGameCommand(this.CommandDetailsControl.GameName, this.CommandDetailsControl.ChatTriggers, this.CommandDetailsControl.GetRequirements(), this.StatusArgumentTextBox.Text.ToLower(), this.stage1DepositCommand, this.stage1StatusCommand, stage2Minimum, this.stage2DepositCommand, this.stage2StatusCommand, stage3Minimum, this.stage3DepositCommand, this.stage3StatusCommand, payoutProbability, minPayoutPercentage, maxPayoutPercentage, this.payoutCommand, this.CollectArgumentTextBox.Text, collectTime, collectMinPayoutPercentage, collectMaxPayoutPercentage, this.collectCommand); if (this.existingCommand != null) { ChannelSession.Settings.GameCommands.Remove(this.existingCommand); newCommand.ID = this.existingCommand.ID; } ChannelSession.Settings.GameCommands.Add(newCommand); }
public VolcanoGameEditorControl(VolcanoGameCommand command) { InitializeComponent(); this.existingCommand = command; this.viewModel = new VolcanoGameEditorControlViewModel(command); }
public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements) { this.PayoutPercentageMinimum = this.PayoutPercentageMinimum / 100.0; this.PayoutPercentageMaximum = this.PayoutPercentageMaximum / 100.0; this.CollectPayoutPercentageMinimum = this.CollectPayoutPercentageMinimum / 100.0; this.CollectPayoutPercentageMaximum = this.CollectPayoutPercentageMaximum / 100.0; GameCommandBase newCommand = new VolcanoGameCommand(name, triggers, requirements, this.StatusArgument.ToLower(), this.Stage1DepositCommand, this.Stage1StatusCommand, this.Stage2MinimumAmount, this.Stage2DepositCommand, this.Stage2StatusCommand, this.Stage3MinimumAmount, this.Stage3DepositCommand, this.Stage3StatusCommand, this.PayoutProbability, this.PayoutPercentageMinimum, this.PayoutPercentageMaximum, this.PayoutCommand, this.CollectArgument, this.CollectTimeLimit, this.CollectPayoutPercentageMinimum, this.CollectPayoutPercentageMaximum, this.CollectCommand); this.SaveGameCommand(newCommand, this.existingCommand); }
public VolcanoGameEditorControl(VolcanoGameCommand command) : this() { this.existingCommand = command; }