private static void addDataHandle(ThreadProperty tp) { if (fts.Count == 0) { init(); } for (int i = 1; i < fts.Count; i++) { if (fts[i].Contains(tp)) { return; } } bool hasAdd = false; for (int i = 1; i < fts.Count; i++) { if (fts[i].isWorking == false) { hasAdd = true; fts[i].addAction(tp); break; } } if (hasAdd == false) { fts[1].addAction(tp); } }
private static void addUIHandle(ThreadProperty tp) { if (fts.Count == 0) { init(); } fts[0].addAction(tp); }
public void removeAction(ThreadProperty ap) { lock (locker) { if (values.Contains(ap)) { values.Remove(ap); } } }
public void addAction(ThreadProperty ap) { lock (locker) { if (values.Contains(ap) == false) { values.Add(ap); } } }
public static void add(ThreadProperty tp) { if (tp.srcUI == null) { addDataHandle(tp); } else { addUIHandle(tp); } }
public static void startInput(KeyDown input, Action delete, Action clear, Action ok, Action cancel, UIElement u) { if (!init()) { return; } if (ui == null) { ui = new ThreadProperty(50, true, false, uiHandle, u); } Input = input; Delete = delete; Clear = clear; Ok = ok; Cancel = cancel; tp.start(); }
public bool Contains(ThreadProperty ap) { return(values.Contains(ap)); }