Beispiel #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;
     }
 }
Beispiel #2
0
 public void Reset()
 {
     if (TopContour != null)
     {
         TopContour.Dispose();
         TopContour = null;
     }
     if (BottomContour != null)
     {
         BottomContour.Dispose();
         BottomContour = null;
     }
     foreach (var part in Parts)
     {
         part.Dispose();
     }
     Parts.Clear();
     foreach (var pin in Pins)
     {
         pin.Dispose();
     }
     Pins.Clear();
     foreach (var nail in Nails)
     {
         nail.Dispose();
     }
     Nails.Clear();
     TopObjectSpace.Clear();
     BottomObjectSpace.Clear();
     SearchResults.Clear();
     SelectedObject = null;
 }