protected virtual void RaiseOnInitialized() { try { if (!Initialized && !Unloaded) { Initialized = true; OnInitialized.RaiseEvent(this, null); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
protected virtual void OnInitialize() { try { if (!Initialized && !Unloaded) { Initialized = true; OnInitialized.RaiseEvent(this, null); var map = Utility.Map.GetMap().Type; if (BlacklistedMaps.Any(m => m.Equals(map))) { OnUnload(null, new UnloadEventArgs(true)); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }