/// <summary>
 /// Initialize a new instance of the FloatspaceCellEventArgs class.
 /// </summary>
 /// <param name="floatspace">Reference to existing floatspace control instance.</param>
 /// <param name="element">Reference to docking floatspace element that is managing the floatspace control.</param>
 /// <param name="cell">Reference tofloatspace control cell instance.</param>
 public FloatspaceCellEventArgs(KryptonFloatspace floatspace,
                                KryptonDockingFloatspace element,
                                KryptonWorkspaceCell cell)
 {
     _floatspace = floatspace;
     _element    = element;
     _cell       = cell;
 }
 /// <summary>
 /// Initialize a new instance of the FloatspaceCellEventArgs class.
 /// </summary>
 /// <param name="floatspace">Reference to existing floatspace control instance.</param>
 /// <param name="element">Reference to docking floatspace element that is managing the floatspace control.</param>
 /// <param name="cell">Reference tofloatspace control cell instance.</param>
 public FloatspaceCellEventArgs(KryptonFloatspace floatspace,
                                KryptonDockingFloatspace element,
                                KryptonWorkspaceCell cell)
 {
     FloatspaceControl = floatspace;
     FloatspaceElement = element;
     CellControl       = cell;
 }
 /// <summary>
 /// Initialize a new instance of the FloatspaceCellEventArgs class.
 /// </summary>
 /// <param name="floatspace">Reference to existing floatspace control instance.</param>
 /// <param name="element">Reference to docking floatspace element that is managing the floatspace control.</param>
 /// <param name="cell">Reference tofloatspace control cell instance.</param>
 public FloatspaceCellEventArgs(KryptonFloatspace floatspace,
                                KryptonDockingFloatspace element,
                                KryptonWorkspaceCell cell)
 {
     _floatspace = floatspace;
     _element = element;
     _cell = cell;
 }
 /// <summary>
 /// Initialize a new instance of the KryptonDockingFloatspace class.
 /// </summary>
 /// <param name="name">Initial name of the element.</param>
 public KryptonDockingFloatspace(string name)
     : base(name, "Floating")
 {
     // Create a new floatspace that will be a host for docking pages
     SpaceControl           = new KryptonFloatspace();
     FloatspaceControl.Dock = DockStyle.Fill;
     FloatspaceControl.CellPageInserting   += OnSpaceCellPageInserting;
     FloatspaceControl.PageCloseClicked    += OnFloatspacePageCloseClicked;
     FloatspaceControl.PagesDoubleClicked  += OnFloatspacePagesDoubleClicked;
     FloatspaceControl.PageDropDownClicked += OnFloatspaceDropDownClicked;
     FloatspaceControl.BeforePageDrag      += OnFloatspaceBeforePageDrag;
 }
Пример #5
0
 /// <summary>
 /// Initialize a new instance of the KryptonDockingFloatspace class.
 /// </summary>
 /// <param name="name">Initial name of the element.</param>
 public KryptonDockingFloatspace(string name)
     : base(name, "Floating")
 {
     // Create a new floatspace that will be a host for docking pages
     SpaceControl           = new KryptonFloatspace();
     FloatspaceControl.Dock = DockStyle.Fill;
     FloatspaceControl.CellPageInserting   += new EventHandler <KryptonPageEventArgs>(OnSpaceCellPageInserting);
     FloatspaceControl.PageCloseClicked    += new EventHandler <UniqueNameEventArgs>(OnFloatspacePageCloseClicked);
     FloatspaceControl.PagesDoubleClicked  += new EventHandler <UniqueNamesEventArgs>(OnFloatspacePagesDoubleClicked);
     FloatspaceControl.PageDropDownClicked += new EventHandler <CancelDropDownEventArgs>(OnFloatspaceDropDownClicked);
     FloatspaceControl.BeforePageDrag      += new EventHandler <PageDragCancelEventArgs>(OnFloatspaceBeforePageDrag);
 }
 /// <summary>
 /// Initialize a new instance of the KryptonDockingFloatspace class.
 /// </summary>
 /// <param name="name">Initial name of the element.</param>
 public KryptonDockingFloatspace(string name)
     : base(name, "Floating")
 {
     // Create a new floatspace that will be a host for docking pages
     SpaceControl = new KryptonFloatspace();
     FloatspaceControl.Dock = DockStyle.Fill;
     FloatspaceControl.CellPageInserting += new EventHandler<KryptonPageEventArgs>(OnSpaceCellPageInserting);
     FloatspaceControl.PageCloseClicked += new EventHandler<UniqueNameEventArgs>(OnFloatspacePageCloseClicked);
     FloatspaceControl.PagesDoubleClicked += new EventHandler<UniqueNamesEventArgs>(OnFloatspacePagesDoubleClicked);
     FloatspaceControl.PageDropDownClicked += new EventHandler<CancelDropDownEventArgs>(OnFloatspaceDropDownClicked);
     FloatspaceControl.BeforePageDrag += new EventHandler<PageDragCancelEventArgs>(OnFloatspaceBeforePageDrag);
 }
Пример #7
0
        /// <summary>
        /// Initialize a new instance of the KryptonFloatingWindow class.
        /// </summary>
        /// <param name="owner">Reference to form that will own all the floating window.</param>
        /// <param name="floatspace">Reference to owning floatspace instance.</param>
        public KryptonFloatingWindow(Form owner, KryptonFloatspace floatspace)
        {
            // Set the owner of the window so that minimizing the owner will do the same to this
            Owner = owner;

            // Set correct form settings for a floating window
            TopLevel = true;
            ShowIcon = false;
            ShowInTaskbar = false;
            MinimizeBox = false;
            StartPosition = FormStartPosition.Manual;
            ButtonSpecMin.ImageStates.ImageDisabled = EMPTY_IMAGE;

            // Hook into floatspace events and add as the content of the floating window
            _floatspace = floatspace;
            _floatspace.CellCountChanged += new EventHandler(OnFloatspaceCellCountChanged);
            _floatspace.CellVisibleCountChanged += new EventHandler(OnFloatspaceCellVisibleCountChanged);
            _floatspace.WorkspaceCellAdding += new EventHandler<WorkspaceCellEventArgs>(OnFloatspaceCellAdding);
            _floatspace.WorkspaceCellRemoved += new EventHandler<WorkspaceCellEventArgs>(OnFloatspaceCellRemoved);
            Controls.Add(_floatspace);
        }
Пример #8
0
        /// <summary>
        /// Initialize a new instance of the KryptonFloatingWindow class.
        /// </summary>
        /// <param name="owner">Reference to form that will own all the floating window.</param>
        /// <param name="floatspace">Reference to owning floatspace instance.</param>
        public KryptonFloatingWindow(Form owner, KryptonFloatspace floatspace)
        {
            // Set the owner of the window so that minimizing the owner will do the same to this
            Owner = owner;

            // Set correct form settings for a floating window
            TopLevel      = true;
            ShowIcon      = false;
            ShowInTaskbar = false;
            MinimizeBox   = false;
            StartPosition = FormStartPosition.Manual;
            ButtonSpecMin.ImageStates.ImageDisabled = EMPTY_IMAGE;

            // Hook into floatspace events and add as the content of the floating window
            FloatspaceControl = floatspace;
            FloatspaceControl.CellCountChanged        += OnFloatspaceCellCountChanged;
            FloatspaceControl.CellVisibleCountChanged += OnFloatspaceCellVisibleCountChanged;
            FloatspaceControl.WorkspaceCellAdding     += OnFloatspaceCellAdding;
            FloatspaceControl.WorkspaceCellRemoved    += OnFloatspaceCellRemoved;
            Controls.Add(FloatspaceControl);
        }
Пример #9
0
        /// <summary>
        /// Occurs when a page is added to a cell in the workspace.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">A KryptonPageEventArgs containing the event data.</param>
        protected override void OnSpaceCellPageInserting(object sender, KryptonPageEventArgs e)
        {
            // Remove any store page for the unique name of this page being added. In either case of adding a store
            // page or a regular page we want to ensure there does not exist a store page for that same unique name.
            KryptonDockingManager dockingManager = DockingManager;

            if (dockingManager != null)
            {
                if (e.Item is KryptonStorePage)
                {
                    KryptonFloatspace floatspace = sender as KryptonFloatspace;
                    if ((floatspace != null) && (floatspace.CellForPage(e.Item) != null))
                    {
                        // Prevent this existing store page from being removed due to the Propogate action below. This can
                        // occur because a cell with pages is added in one go and so insert events are generated for the
                        // existing pages inside the cell to ensure that the event is always fired consistently.
                        IgnoreStorePage = (KryptonStorePage)e.Item;
                    }
                }

                dockingManager.PropogateAction(ClearStoreAction, new string[] { e.Item.UniqueName });
                IgnoreStorePage = null;
            }
        }
Пример #10
0
 /// <summary>
 /// Initialize a new instance of the FloatspaceEventArgs class.
 /// </summary>
 /// <param name="floatspace">Reference to new floatspace control instance.</param>
 /// <param name="element">Reference to docking floatspace element that is managing the floatspace control.</param>
 public FloatspaceEventArgs(KryptonFloatspace floatspace,
                            KryptonDockingFloatspace element)
 {
     FloatspaceControl = floatspace;
     FloatspaceElement = element;
 }
 /// <summary>
 /// Initialize a new instance of the FloatspaceEventArgs class.
 /// </summary>
 /// <param name="floatspace">Reference to new floatspace control instance.</param>
 /// <param name="element">Reference to docking floatspace element that is managing the floatspace control.</param>
 public FloatspaceEventArgs(KryptonFloatspace floatspace,
                            KryptonDockingFloatspace element)
 {
     _floatspace = floatspace;
     _element = element;
 }
Пример #12
0
 /// <summary>
 /// Initialize a new instance of the FloatspaceEventArgs class.
 /// </summary>
 /// <param name="floatspace">Reference to new floatspace control instance.</param>
 /// <param name="element">Reference to docking floatspace element that is managing the floatspace control.</param>
 public FloatspaceEventArgs(KryptonFloatspace floatspace,
                            KryptonDockingFloatspace element)
 {
     _floatspace = floatspace;
     _element    = element;
 }