public DrawingZone(int index = -1) { InitializeComponent(); saveRegion = new SaveRegion(); StartPosition = FormStartPosition.CenterScreen; //TopMost = true; TopLevel = true; ShowIcon = false; ShowInTaskbar = false; FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; AllowTransparency = true; BackColor = Color.Black; Opacity = 0.65; AutoScaleMode = AutoScaleMode.None; Size resolution = Screen.PrimaryScreen.Bounds.Size; _drawing = new Drawing(resolution.Width, resolution.Height); if (index != -1) { LoadingAreasEditing(index); select = true; } }
/// <summary> /// Очистка проекта /// </summary> private void DisposeProject() { _drawing.Dispose(); selectPointActions.Dispose(); saveRegion = null; _listPoints = null; Close(); Dispose(); GC.Collect(); }