/// <summary> /// Do not call this constructor. Use SxLib.InitializeOffscreen instead. /// </summary> /// <param name="_Current"></param> /// <param name="_SynapseDir"></param> protected internal SxLibOffscreen(string _SynapseDir) : base(_SynapseDir) { LoadEventInternal += delegate(SynLoadEvents LEvent, object Param) { LoadEvent?.Invoke(LEvent, Param); }; AttachEventInternal += delegate(SynAttachEvents AEvent, object Param) { AttachEvent?.Invoke(AEvent, Param); }; HubEventInternal += delegate(List <SynHubEntry> Entries) { ScriptHubMarkAsClosedInternal(); ScriptHubEvent?.Invoke(Entries); }; }
/// <summary> /// Do not call this constructor. Use SxLib.InitializeWinForms instead. /// </summary> /// <param name="_Current"></param> /// <param name="_SynapseDir"></param> protected internal SxLibWinForms(Form _Current, string _SynapseDir) : base(_SynapseDir) { Current = _Current; LoadEventInternal += delegate(SynLoadEvents LEvent, object Param) { Current.Invoke(new Action(() => { LoadEvent?.Invoke(LEvent, Param); })); }; AttachEventInternal += delegate(SynAttachEvents AEvent, object Param) { Current.Invoke(new Action(() => { AttachEvent?.Invoke(AEvent, Param); })); }; HubEventInternal += delegate(List <SynHubEntry> Entries) { Current.Invoke(new Action(() => { ScriptHubEvent?.Invoke(Entries); })); }; }
/// <summary> /// Do not call this constructor. Use SxLib.InitializeWPF instead. /// </summary> /// <param name="_Current"></param> /// <param name="_SynapseDir"></param> protected internal SxLibWPF(Window _Current, string _SynapseDir) : base(_SynapseDir) { Current = _Current; LoadEventInternal += delegate(SynLoadEvents LEvent, object Param) { Current.Dispatcher.Invoke(() => { LoadEvent?.Invoke(LEvent, Param); }); }; AttachEventInternal += delegate(SynAttachEvents AEvent, object Param) { Current.Dispatcher.Invoke(() => { AttachEvent?.Invoke(AEvent, Param); }); }; HubEventInternal += delegate(List <SynHubEntry> Entries) { Current.Dispatcher.Invoke(() => { ScriptHubEvent?.Invoke(Entries); }); }; }