public void UpdateCALLM() { if (Dialog == null || !InstructionName.Equals("CALLM")) { return; } IEnumerable <string[]> fit = Dialog.Functions.Where( (string[] _msg) => { return(ValueString1.Equals(_msg[1])); }); if (fit.Count() > 0) { string[] msg = fit.First(); Count = msg.Length / 2; } }
/// <summary> /// Utility method allowing to return an instruction with different type, but keeping all compatible parameters /// </summary> /// <param name="instruction"></param> /// <param name="newInstructionName"></param> /// <returns></returns> public static PatchInstruction ChangeInstruction(PatchInstruction instruction, InstructionName newInstructionName) { PatchInstruction changedInstruction = null; if (instruction != null) { changedInstruction = MakeInstruction(newInstructionName.ToString()); changedInstruction._Order = instruction._Order; changedInstruction._Parameters = instruction._CloneParameters(); changedInstruction._Comment = instruction._Comment; changedInstruction._Group = instruction._Group; changedInstruction.RemoveUnsupportedParameters(); } return(changedInstruction); }
private Instruction(InstructionName instructionName, string argumentA, string argumentB) { InstructionName = instructionName; ArgumentA = argumentA; ArgumentB = argumentB; }