/// <summary>
        /// Clean up all child objects here, unlink all events and dispose
        /// </summary>
        protected override void DisposeChildObjects()
        {
            base.DisposeChildObjects();

            if (_tool != null)
            {
                _tool.Dispose();
                _tool = null;
            }
            _button       = null;
            _parentButton = null;
            _toolBox      = null;
        }
Beispiel #2
0
 private PlugInToolStripButton CreateButton()
 {
     _button = new PlugInToolStripButton()
     {
         CheckOnClick    = true,
         DisplayStyle    = ToolStripItemDisplayStyle.Image,
         Name            = this.ToString() + "_Tool",
         Size            = new Size(30, 20),
         Text            = this.ToString(),
         PlugInToolGroup = this,
         Image           = Flyout(this.ToolBoxImage)
     };
     return(_button);
 }
Beispiel #3
0
        /// <summary>
        /// Clean up all child objects here, unlink all events and dispose
        /// </summary>
        protected override void DisposeChildObjects()
        {
            base.DisposeChildObjects();

            if (_toolGroup != null)
            {
                _toolGroup.Dispose();
                _toolGroup = null;
            }
            try
            {
                if (_childToolBox != null)
                {
                    _childToolBox.Dispose();
                    _childToolBox = null;
                }
            }
            catch
            { }
            _button  = null;
            _toolBox = null;
        }