Exemplo n.º 1
0
 protected virtual void RaiseOnInitialized()
 {
     try
     {
         if (!Initialized && !Unloaded)
         {
             Initialized = true;
             OnInitialized.RaiseEvent(this, null);
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemplo n.º 2
0
 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));
     }
 }