Пример #1
0
 private void FreeResources()//资源销毁还原
 {
     this.isAreaSelected = false;
     this.Screenshots.Dispose();
     this.Screenshots_Grey.Dispose();
     this.RectangleSelected = null;
     GC.Collect();
 }
Пример #2
0
        private void Main_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                GC.Collect();

                isAreaSelected    = false;
                PointStart        = e.Location;
                PointEnd          = new Point(PointStart.X + 1, PointStart.Y + 1);//至少1个像素
                RectangleSelected = new RectangleSelector(PointStart, PointEnd);
            }
        }