Exemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }
            disposed = true;

            if (disposing)
            {
                Preferences.SettingChanged -= OnPreferencesChanged;
                // free managed resources
                if (rating != null)
                {
                    rating.Dispose();
                    rating = null;
                }
                if (description_entry != null)
                {
                    description_entry.Dispose();
                    description_entry = null;
                }
                if (tag_view != null)
                {
                    tag_view.Dispose();
                    tag_view = null;
                }
                if (photo_view_scrolled != null)
                {
                    photo_view_scrolled.Dispose();
                    photo_view_scrolled = null;
                }
                if (filmstrip != null)
                {
                    filmstrip.Dispose();
                    filmstrip = null;
                }
                if (inner_vbox != null)
                {
                    inner_vbox.Dispose();
                    inner_vbox = null;
                }
                if (inner_hbox != null)
                {
                    inner_hbox.Dispose();
                    inner_hbox = null;
                }
            }
            // free unmanaged resources
        }
Exemplo n.º 2
0
 /// <summary>Main widget destroyed handler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MainWidgetDestroyed(object sender, EventArgs e)
 {
     try
     {
         btnJumpToSimLog.Clicked -= OnJumpToSimulationLog;
         topBox.Dispose();
         SummaryCheckBox.MainWidget.Dispose();
         WarningCheckBox.MainWidget.Dispose();
         ErrorCheckBox.MainWidget.Dispose();
         middleBox.Dispose();
         SimulationDropDown.MainWidget.Dispose();
         mainControl.Dispose();
         ((ViewBase)SummaryDisplay).MainWidget.Dispose();
         mainWidget.Destroyed -= MainWidgetDestroyed;
         owner = null;
     }
     catch (Exception err)
     {
         ShowError(err);
     }
 }