public void RemoveEvent(TimeEventModel model) { if (!removeList.Contains(model)) { removeList.Add(model); } }
public void AddEvent(TimeEventModel model) { if (!addList.Contains(model)) { model.InitData(); addList.Add(model); } }
public void AddEvent(TimeEventModel model) { lock (models) { mutexLock.WaitOne(); model.Excute_time = DateTime.Now.Ticks + model.Wait_time; models.Add(model); mutexLock.ReleaseMutex(); } }
public void RemoveEvent(TimeEventModel model) { lock (models) { mutexLock.WaitOne(); if (models.Contains(model)) { models.Remove(model); } mutexLock.ReleaseMutex(); } }