public State(int stateNumber, EnterDelegate enter, DuringDelegate during, ExitDelegate exit) { this.stateNumber = stateNumber; enterMethod = enter; duringMethod = during; exitMethod = exit; }
public BT_BehaviorDelegator(NodeDescription.BT_NodeType type, UpdateDelegate onUpdate, InitDelegate onInit = null, EnterDelegate onEnter = null, ExitDelegate onExit = null, TerminateDelegate onTerm = null) { Description.Type = type; initDel = onInit; enterDel = onEnter; updateDel = onUpdate; exitDel = onExit; terminateDel = onTerm; }
public MainWindow() { InitializeComponent(); //3.将相应函数注册到委托事件中 ReadStdOutput += new DelReadStdOutput(ReadStdOutputAction); ReadErrOutput += new DelReadErrOutput(ReadErrOutputAction); ExitHandler += new ExitDelegate(ExitAction); button1.Content = "生成excel数据"; InitMenus(); }
public MainForm() : base() { InitializeComponent(); Alert = new AlertDelegate(AlertMethod); Exit = new ExitDelegate(ExitMethod); FatalExit = new FatalExitDelegate(FatalExitMethod); Log = new LogDelegate(LogMethod); ReportProgress = new ReportProgressDelegate(ReportProgressMethod); Info = new InfoDelegate(InfoMethod); logfile = File.OpenWrite(Path.GetDirectoryName(Application.ExecutablePath) + "\\cuetoogg.log.txt"); }
public SilentForm() : base() { InitializeComponent(); Alert = new AlertDelegate(AlertMethod); Exit = new ExitDelegate(ExitMethod); FatalExit = new FatalExitDelegate(FatalExitMethod); Log = new LogDelegate(LogMethod); ReportProgress = new ReportProgressDelegate(ReportProgressMethod); Info = new InfoDelegate(InfoMethod); logfile=File.OpenWrite(Path.GetDirectoryName(Application.ExecutablePath)+"\\cuetoogg.log.txt"); }
///<summary> ///Initialize the library using delegates to hook back to the ///application ///</summary> ///<param name="engine">Torque engine component</param> ///<param name="soundBank">sound bank</param> ///<param name="exit">game exit</param> ///<param name="gamePausedGetter"> ///getter for <see cref="GamePaused"/> property ///</param> ///<param name="gamePausedSetter"> ///setter for <see cref="GamePaused"/> property ///</param> public static void Initialize( TorqueEngineComponent engine, SoundBank soundBank, ExitDelegate exit, Getter<bool> gamePausedGetter, Setter<bool> gamePausedSetter) { _engine = engine; _soundBank = soundBank; _exit = exit; _gamePausedGetter = gamePausedGetter; _gamePausedSetter = gamePausedSetter; }