public static MessageWindow FromCommand(AsmCommand command) { switch (command.NativeOperation.Command) { case JsmCommand.MES: return(FromCommand((AsmMessageCommand)command)); case JsmCommand.AMES: return(FromCommand((AsmAppearMessageCommand)command)); case JsmCommand.AMESW: return(FromCommand((AsmAppearMessageAndWaitCommand)command)); case JsmCommand.RAMESW: return(FromCommand((AsmResumeScriptAppearMessageAndWaitCommand)command)); case JsmCommand.ASK: return(FromCommand((AsmAskCommand)command)); case JsmCommand.AASK: return(FromCommand((AsmAppearAskCommand)command)); default: throw new NotImplementedException(); } }
public List <AsmCommand> FindAll(params JsmCommand[] commands) { List <AsmCommand> result = new List <AsmCommand>(); for (int i = 0; i < _length; i++) { foreach (JsmCommand command in commands) { AsmCommand cmd = TryCreate <AsmCommand>(i, command); if (cmd != null) { result.Add(cmd); break; } } } return(result); }
private void OnMessageWindowCommandCreated(AsmCommand command) { MessageWindow window = MessageWindow.FromCommand(command); MessageWindows.Add(window); }