public override void DisposeScreen() { if (AnimatedThreadWorker.IsBusy) { AnimatedThreadWorker.CancelAsync(); } AnimatedThreadWorker.Dispose(); _initialDirectiveArray.Clear(); _initialDirectiveArray = null; if (_toolStripMenuItemsWorkPackages != null) { foreach (RadMenuItem item in _toolStripMenuItemsWorkPackages) { item.Dispose(); } } if (_toolStripMenuItemOpen != null) { _toolStripMenuItemOpen.Dispose(); } if (_toolStripMenuItemHighlight != null) { _toolStripMenuItemHighlight.Dispose(); } if (_toolStripMenuItemPublish != null) { _toolStripMenuItemPublish.Dispose(); } if (_toolStripSeparator1 != null) { _toolStripSeparator1.Dispose(); } if (_toolStripSeparator2 != null) { _toolStripSeparator2.Dispose(); } if (_toolStripMenuItemEdit != null) { _toolStripMenuItemEdit.Dispose(); } if (_toolStripMenuItemClose != null) { _toolStripMenuItemClose.Dispose(); } if (_toolStripMenuItemPrintWP != null) { _toolStripMenuItemPrintWP.Dispose(); } if (_toolStripMenuItemPrintWorkscope != null) { _toolStripMenuItemPrintWorkscope.Dispose(); } if (_directivesViewer != null) { _directivesViewer.Dispose(); } Dispose(true); }
public override void DisposeScreen() { if (AnimatedThreadWorker.IsBusy) { AnimatedThreadWorker.CancelAsync(); } AnimatedThreadWorker.DoWork -= AnimatedThreadWorkerDoWork; AnimatedThreadWorker.RunWorkerCompleted -= AnimatedThreadWorkerRunWorkerCompleted; AnimatedThreadWorker.Dispose(); _resultDirectiveArray.Clear(); _resultDirectiveArray = null; _initialDirectiveArray.Clear(); _initialDirectiveArray = null; _openPubWorkPackages.Clear(); _openPubWorkPackages = null; _openPubQuotations.Clear(); _openPubQuotations = null; if (_currentForecast != null) { _currentForecast.Dispose(); _currentForecast = null; } if (_currentForecast != null) { _currentForecast.Clear(); } _currentForecast = null; if (_toolStripMenuItemShowADFile != null) { _toolStripMenuItemShowADFile.Dispose(); } if (_toolStripMenuItemShowSBFile != null) { _toolStripMenuItemShowSBFile.Dispose(); } if (_toolStripMenuItemShowEOFile != null) { _toolStripMenuItemShowEOFile.Dispose(); } if (_toolStripMenuItemOpen != null) { _toolStripMenuItemOpen.Dispose(); } if (_toolStripMenuItemHighlight != null) { foreach (RadMenuItem ttmi in _toolStripMenuItemHighlight.Items) { ttmi.Click -= HighlightItemClick; } _toolStripMenuItemHighlight.Items.Clear(); _toolStripMenuItemHighlight.Dispose(); } if (_toolStripSeparator1 != null) { _toolStripSeparator1.Dispose(); } if (_toolStripSeparator2 != null) { _toolStripSeparator2.Dispose(); } if (_toolStripSeparator4 != null) { _toolStripSeparator4.Dispose(); } if (_directivesViewer != null) { _directivesViewer.Dispose(); } Dispose(true); }