public Rect() { Id = int.Parse(DateTime.Today.ToString("yyddmmss")); Text = string.Empty; Size = new Size(100, 100); Location = new Point(100, 100); Alive = true; RectThread.FromCurrent().AddRect(this); }
public Rect(int id, string text, Size size, Point location) { Id = id; Text = text; Size = size; Location = location; Alive = true; RectThread.FromCurrent().AddRect(this); Console.WriteLine(Id + "号矩形已创建"); }
/// <summary> /// 执行一次信号循环,进行一次信号处理 /// </summary> public static void DoSignal() => RectThread.FromCurrent().StartLoop(2, null);
/// <summary> /// 开启信号循环 /// </summary> /// <param name="rect">主rect</param> public static void Start(Rect rect) => RectThread.FromCurrent().StartLoop(1, rect);