Esempio n. 1
0
 private static void OnTimeEvent(object source, ElapsedEventArgs e)
 {
     MacroDropMgr.counter++;
     if (MacroDropMgr.counter % 12 == 0)
     {
         MacroDropMgr.MacroDropReset();
     }
     MacroDropMgr.MacroDropSync();
 }
Esempio n. 2
0
 public static bool Reload()
 {
     try
     {
         Dictionary <int, DropInfo> dictionary = new Dictionary <int, DropInfo>();
         MacroDropMgr.m_DropInfo = new Dictionary <int, DropInfo>();
         dictionary = MacroDropMgr.LoadDropInfo();
         if (dictionary != null && dictionary.Count > 0)
         {
             Interlocked.Exchange <Dictionary <int, DropInfo> >(ref MacroDropMgr.m_DropInfo, dictionary);
         }
         return(true);
     }
     catch (Exception exception)
     {
         if (MacroDropMgr.log.IsErrorEnabled)
         {
             MacroDropMgr.log.Error("DropInfoMgr", exception);
         }
     }
     return(false);
 }
Esempio n. 3
0
 public static bool Init()
 {
     MacroDropMgr.m_lock   = new ReaderWriterLock();
     MacroDropMgr.FilePath = Directory.GetCurrentDirectory() + "\\macrodrop\\macroDrop.ini";
     return(MacroDropMgr.Reload());
 }