示例#1
0
 private void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             Background.Dispose();
             Background = null;
             if (TopContour != null)
             {
                 TopContour.Dispose();
             }
             TopContour = null;
             if (BottomContour != null)
             {
                 BottomContour.Dispose();
             }
             BottomContour = null;
             foreach (var nail in Nails)
             {
                 nail.Dispose();
             }
         }
         DisposeHelper.OnDispose <Scene>(disposing);
         disposed = true;
     }
 }
示例#2
0
 public Scene()
 {
     Options           = new SceneOptions();
     Colors            = new SceneColors();
     Brushes           = new SceneBrushes();
     Background        = new SceneObjects.Background(Color.Black);
     Parts             = new List <SceneObjects.Part>();
     Pins              = new List <SceneObjects.Pin>();
     Nails             = new List <SceneObjects.Nail>();
     Side              = BoardSide.Top;
     TopObjectSpace    = new Core.QuadTree <SceneObject>(new Vector2(40, 40), 8);
     BottomObjectSpace = new Core.QuadTree <SceneObject>(new Vector2(40, 40), 8);
     SearchResults     = new List <SceneObject>();
     SelectedObject    = null;
 }