private static string GetCommandText(ConditionalBranchCommand command, MapInstance map) { if (command.Condition.Negated) { return(Strings.EventCommandList.conditionalbranch.ToString( Strings.EventConditionDesc.negated.ToString( Strings.GetEventConditionalDesc((dynamic)command.Condition) ) )); } else { return(Strings.EventCommandList.conditionalbranch.ToString( Strings.GetEventConditionalDesc((dynamic)command.Condition) )); } }
public EventCommandConditionalBranch( Condition refCommand, EventPage refPage, FrmEvent editor, ConditionalBranchCommand command ) { InitializeComponent(); mLoading = true; if (refCommand == null) { refCommand = new VariableIsCondition(); } Condition = refCommand; mEventEditor = editor; mEventCommand = command; mCurrentPage = refPage; UpdateFormElements(refCommand.Type); InitLocalization(); var typeIndex = 0; foreach (var itm in Strings.EventConditional.conditions) { if (itm.Key == (int)Condition.Type) { cmbConditionType.SelectedIndex = typeIndex; break; } typeIndex++; } nudVariableValue.Minimum = long.MinValue; nudVariableValue.Maximum = long.MaxValue; chkNegated.Checked = refCommand.Negated; chkHasElse.Checked = refCommand.ElseEnabled; SetupFormValues((dynamic)refCommand); mLoading = false; }