コード例 #1
0
 public void RemoveEvent(TimeEventModel model)
 {
     if (!removeList.Contains(model))
     {
         removeList.Add(model);
     }
 }
コード例 #2
0
 public void AddEvent(TimeEventModel model)
 {
     if (!addList.Contains(model))
     {
         model.InitData();
         addList.Add(model);
     }
 }
コード例 #3
0
        public void AddEvent(TimeEventModel model)
        {
            lock (models) {
                mutexLock.WaitOne();

                model.Excute_time = DateTime.Now.Ticks + model.Wait_time;
                models.Add(model);

                mutexLock.ReleaseMutex();
            }
        }
コード例 #4
0
        public void RemoveEvent(TimeEventModel model)
        {
            lock (models) {
                mutexLock.WaitOne();

                if (models.Contains(model))
                {
                    models.Remove(model);
                }

                mutexLock.ReleaseMutex();
            }
        }