Event arguments for a FloatingWindowAdding/FloatingWindowRemoved event.
Inheritance: System.EventArgs
Example #1
0
        private void OnFloatingWindowDisposed(object sender, EventArgs e)
        {
            // Unhook from events so the control can be garbage collected
            FloatingWindow.Disposed -= new EventHandler(OnFloatingWindowDisposed);

            // Events are generated from the parent docking manager
            KryptonDockingManager dockingManager = DockingManager;

            if (dockingManager != null)
            {
                // Generate event so the floating window customization can be reversed.
                FloatingWindowEventArgs floatingWindowArgs = new FloatingWindowEventArgs(FloatingWindow, this);
                dockingManager.RaiseFloatingWindowRemoved(floatingWindowArgs);
            }

            // Remove the child floatspace control as it is no longer required
            InternalRemove(FloatspaceElement);

            // Generate event so interested parties know this element and associated window have been disposed
            Dispose();
        }
Example #2
0
        private KryptonDockingFloatingWindow CreateFloatingWindow(string name)
        {
            // Create a floatspace and floating window for hosting the floatspace
            KryptonDockingFloatspace     floatSpaceElement     = new KryptonDockingFloatspace("Floatspace");
            KryptonDockingFloatingWindow floatingWindowElement = new KryptonDockingFloatingWindow(name, OwnerForm, floatSpaceElement);

            floatingWindowElement.Disposed += OnDockingFloatingWindowDisposed;
            InternalAdd(floatingWindowElement);

            // Events are generated from the parent docking manager
            KryptonDockingManager dockingManager = DockingManager;

            if (dockingManager != null)
            {
                // Generate events so the floating window/dockspace appearance can be customized
                FloatingWindowEventArgs floatingWindowArgs = new FloatingWindowEventArgs(floatingWindowElement.FloatingWindow, floatingWindowElement);
                FloatspaceEventArgs     floatSpaceArgs     = new FloatspaceEventArgs(floatSpaceElement.FloatspaceControl, floatSpaceElement);
                dockingManager.RaiseFloatingWindowAdding(floatingWindowArgs);
                dockingManager.RaiseFloatspaceAdding(floatSpaceArgs);
            }

            return(floatingWindowElement);
        }
        private void OnFloatingWindowDisposed(object sender, EventArgs e)
        {
            // Unhook from events so the control can be garbage collected
            FloatingWindow.Disposed -= new EventHandler(OnFloatingWindowDisposed);

            // Events are generated from the parent docking manager
            KryptonDockingManager dockingManager = DockingManager;
            if (dockingManager != null)
            {
                // Generate event so the floating window customization can be reversed.
                FloatingWindowEventArgs floatingWindowArgs = new FloatingWindowEventArgs(FloatingWindow, this);
                dockingManager.RaiseFloatingWindowRemoved(floatingWindowArgs);
            }

            // Remove the child floatspace control as it is no longer required
            InternalRemove(FloatspaceElement);

            // Generate event so interested parties know this element and associated window have been disposed
            Dispose();
        }
Example #4
0
        private KryptonDockingFloatingWindow CreateFloatingWindow(string name)
        {
            // Create a floatspace and floating window for hosting the floatspace
            KryptonDockingFloatspace floatSpaceElement = new KryptonDockingFloatspace("Floatspace");
            KryptonDockingFloatingWindow floatingWindowElement = new KryptonDockingFloatingWindow(name, OwnerForm, floatSpaceElement);
            floatingWindowElement.Disposed += new EventHandler(OnDockingFloatingWindowDisposed);
            InternalAdd(floatingWindowElement);

            // Events are generated from the parent docking manager
            KryptonDockingManager dockingManager = DockingManager;
            if (dockingManager != null)
            {
                // Generate events so the floating window/dockspace appearance can be customized
                FloatingWindowEventArgs floatingWindowArgs = new FloatingWindowEventArgs(floatingWindowElement.FloatingWindow, floatingWindowElement);
                FloatspaceEventArgs floatSpaceArgs = new FloatspaceEventArgs(floatSpaceElement.FloatspaceControl, floatSpaceElement);
                dockingManager.RaiseFloatingWindowAdding(floatingWindowArgs);
                dockingManager.RaiseFloatspaceAdding(floatSpaceArgs);
            }

            return floatingWindowElement;
        }
Example #5
0
 /// <summary>
 /// Raises the FloatingWindowRemoved event.
 /// </summary>
 /// <param name="e">An FloatingWindowEventArgs containing the event args.</param>
 protected virtual void OnFloatingWindowRemoved(FloatingWindowEventArgs e)
 {
     if (FloatingWindowRemoved != null)
         FloatingWindowRemoved(this, e);
 }
Example #6
0
 /// <summary>
 /// Raises the FloatingWindowAdding event.
 /// </summary>
 /// <param name="e">An FloatingWindowEventArgs containing the event args.</param>
 protected virtual void OnFloatingWindowAdding(FloatingWindowEventArgs e)
 {
     if (FloatingWindowAdding != null)
         FloatingWindowAdding(this, e);
 }
Example #7
0
 internal void RaiseFloatingWindowRemoved(FloatingWindowEventArgs e)
 {
     OnFloatingWindowRemoved(e);
 }
Example #8
0
 internal void RaiseFloatingWindowAdding(FloatingWindowEventArgs e)
 {
     OnFloatingWindowAdding(e);
 }
Example #9
0
 private void kryptonDockingManager_FloatingWindowAdding(object sender, FloatingWindowEventArgs e)
 {
     // Set all new floating windows to a larger than default size
     e.FloatingWindow.ClientSize = new Size(400, 400);
 }