Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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 + "号矩形已创建");
 }
Exemplo n.º 3
0
 /// <summary>
 /// 执行一次信号循环,进行一次信号处理
 /// </summary>
 public static void DoSignal() => RectThread.FromCurrent().StartLoop(2, null);
Exemplo n.º 4
0
 /// <summary>
 /// 开启信号循环
 /// </summary>
 /// <param name="rect">主rect</param>
 public static void Start(Rect rect) => RectThread.FromCurrent().StartLoop(1, rect);