private void dragContainerControl_DragControlRemoved(DragContainerControl container, DragControl dragControl) { if (dragControl.ControlContained == _checkedControl) { ChangeCheckedControl(null); return; } if (dragControl.ControlContained == null) { return; } DialogResult result = MessageBox.Show("Remove component?" + Environment.NewLine + "- Click [Yes] to Remove" + Environment.NewLine + "- Click [No] to Send to Tabbed", "Open Forex Platform", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) {// Remove. CommonBaseControl control = (CommonBaseControl)dragControl.ControlContained; dragControl.ControlContained = null; RemoveControl(control); } else if (result == DialogResult.No) {// Send to tabbed. DoRemoveControl((CommonBaseControl)dragControl.ControlContained); AddTabbedControl((CommonBaseControl)dragControl.ControlContained); } }
void dragContainerControl1_DragControlAdded(DragContainerControl container, DragControl control) { }
/// <summary> /// Destroy sessionInformation upon closing its UI component. /// </summary> void dragContainerControl1_DragControlRemoved(DragContainerControl container, DragControl control) { if (control.ControlContained is PlatformExpertSessionControl) { _expert.Manager.UnRegisterExpertSession(((PlatformExpertSessionControl)control.ControlContained).Session); } }