Exemplo n.º 1
0
        // IDisposable
        protected virtual void Dispose(bool disposing)
        {
            System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType() + ". ****** ");
            if (IsDisposed)
            {
                return;
            }

            if (disposing)
            {
                // free managed and unmanaged resources when explicitly called
                if (_disposeOwner && _owner != null)
                {
                    _owner.Dispose();
                }
                if (_disposeImage && _Image != null)
                {
                    _Image.Dispose();
                }
            }

            // free unmanaged resources
            _owner = null;
            _Image = null;

            IsDisposed = true;
        }
Exemplo n.º 2
0
 public void SetUp()
 {
     _outlookBar = new OutlookBar();
     _tab1       = new OutlookBarButton("tab1", null);
     _tab2       = new OutlookBarButton("tab2", null);
     _tab3       = new OutlookBarButton("tab3", null);
     _tabs       = new OutlookBarButtonCollection(_outlookBar);
     _tabs.Add(_tab1);
     _tabs.Add(_tab2);
     _tabs.Add(_tab3);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Set up this SidePane for use, adding its components to containingControl.
        /// </summary>
        private void Init(Control containingControl)
        {
            _containingControl = containingControl;

            _banner = new Banner
            {
                Text = "",
                Dock = DockStyle.Top,
                //Padding = new Padding(0), // TODO not magic number
                Font = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Bold,
                                               System.Drawing.GraphicsUnit.Point, ((byte)(0))),
                Height = 24,                         // TODO not magic number
            };

            _itemAreaContainer = new Panel
            {
                Dock = DockStyle.Fill,
            };

            _itemAreas = new Dictionary <Tab, IItemArea>();

            _tabArea = new OutlookBar
            {
                Dock = DockStyle.Bottom,
                Font = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Bold,
                                               System.Drawing.GraphicsUnit.World),
                Name = "outlookBar",
            };
            _tabArea.Size           = _tabArea.MinimumSize;
            _tabArea.ButtonClicked += new OutlookBar.ButtonClickedEventHandler(HandleTabAreaButtonClicked);

            // Controls must be added in the right order to lay out properly
            _containingControl.Controls.Add(_itemAreaContainer);
            _containingControl.Controls.Add(_banner);
            _containingControl.Controls.Add(_tabArea);
        }
Exemplo n.º 4
0
 public OutlookBarButtonCollection(OutlookBar owner)     : base()
 {
     Owner = owner;
 }
Exemplo n.º 5
0
 internal OutlookBarButton(OutlookBar owner)
 {
     _owner = owner;
 }
Exemplo n.º 6
0
        //Includes a constructor without parameters so the control can be configured during design-time.

        public OutlookBarButton()
        {
            _owner        = new OutlookBar();
            _disposeOwner = true;
        }