/// <summary> /// Binds the adapter to the adaptable control. Called in the order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control. Must be a D2dAdaptableControl.</param> protected override void Bind(AdaptableControl control) { m_transformAdapter = control.As <ITransformAdapter>(); m_autoTranslateAdapter = control.As <IAutoTranslateAdapter>(); base.Bind(control); }
/// <summary> /// Binds the adapter to the adaptable control. Called in the order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control</param> protected override void Bind(AdaptableControl control) { m_transformAdapter = control.As <ITransformAdapter>(); m_canvasAdapter = control.As <ICanvasAdapter>(); control.Paint += control_Paint; }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { control.Painting -= control_BeforePaint; control.Controls.Remove(m_vScrollBar); control.Controls.Remove(m_hScrollBar); }
/// <summary> /// Binds the adapter to the adaptable control. Called in the order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control</param> protected override void Bind(AdaptableControl control) { control.Painting += control_BeforePaint; control.Controls.Add(m_vScrollBar); control.Controls.Add(m_hScrollBar); }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { control.ContextChanged -= control_ContextChanged; control.Paint -= control_Paint; base.Unbind(control); }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { var d2dControl = (D2dAdaptableControl)control; d2dControl.DrawingD2d -= control_DrawingD2d; base.Unbind(control); }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { control.ContextChanged -= control_ContextChanged; control.Invalidated -= control_Invalidated; control.KeyDown -= control_KeyDown; control.Controls.Remove(m_textBox); }
/// <summary> /// Binds the adapter to the adaptable control. Called in the order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control</param> protected override void Bind(AdaptableControl control) { m_transformAdapter = control.As <ITransformAdapter>(); SetGridColor(); var d2dControl = control as D2dAdaptableControl; d2dControl.DrawingD2d += control_DrawingD2d; control.BackColorChanged += control_BackColorChanged; }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { if (m_transformAdapter != null) { m_transformAdapter.TransformChanged -= transformAdapter_TransformChanged; } control.ClientSizeChanged -= control_ClientSizeChanged; }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { StopHover(); m_pickingAdapters = null; control.MouseDown -= control_MouseDown; control.MouseMove -= control_MouseMove; control.MouseLeave -= control_MouseLeave; control.ContextChanged -= control_ContextChanged; }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { control.MouseDown -= MouseDownHandler; control.MouseMove -= MouseMoveHandler; control.MouseUp -= MouseUpHandler; control.MouseClick -= OnMouseClick; control.MouseDoubleClick -= OnMouseDoubleClick; control.MouseLeave -= MouseLeaveHandler; }
/// <summary> /// Binds the adapter to the adaptable control. Called in the reverse order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control</param> protected override void BindReverse(AdaptableControl control) { control.MouseDown += MouseDownHandler; control.MouseMove += MouseMoveHandler; control.MouseUp += MouseUpHandler; control.MouseClick += OnMouseClick; control.MouseDoubleClick += OnMouseDoubleClick; control.MouseLeave += MouseLeaveHandler; }
/// <summary> /// Binds the adapter to the adaptable control; called in the order that the adapters /// were defined on the control</summary> /// <param name="control">Adaptable control</param> protected override void Bind(AdaptableControl control) { m_transformAdapter = control.As <ITransformAdapter>(); m_autoTranslateAdapter = control.As <IAutoTranslateAdapter>(); control.ContextChanged += control_ContextChanged; control.Paint += control_Paint; base.Bind(control); }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { StopHover(); // control.Invalidated -= control_Invalidated; control.MouseDown -= control_MouseDown; control.MouseMove -= control_MouseMove; control.MouseLeave -= control_MouseLeave; control.ContextChanged -= control_ContextChanged; }
public Color SelectionFillColor = Color.FromArgb(64, Color.DodgerBlue);//25% opaque /// <summary> /// Binds the adapter to the adaptable control. Called in the order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control. Must be a D2dAdaptableControl.</param> protected override void Bind(AdaptableControl control) { m_transformAdapter = control.As <ITransformAdapter>(); var d2dControl = (D2dAdaptableControl)control; d2dControl.DrawingD2d += control_DrawingD2d; base.Bind(control); }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { if (control is D2dAdaptableControl) { ((D2dAdaptableControl)control).DrawingD2d -= control_DrawingD2d; } else { control.Paint -= control_Paint; } }
/// <summary> /// Binds the adapter to the adaptable control; called in the order that the adapters /// were defined on the control</summary> /// <param name="control">Adaptable control</param> protected override void Bind(AdaptableControl control) { m_transformAdapter = control.As <ITransformAdapter>(); control.Controls.Add(m_columnHeaders); m_columnHeaders.Height = control.Font.Height; control.ContextChanged += new EventHandler(control_ContextChanged); control.FontChanged += new EventHandler(control_FontChanged); }
/// <summary> /// Binds the adapter to the adaptable control. Called in the order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control</param> protected override void Bind(AdaptableControl control) { m_windowBounds = control.ClientRectangle; m_transformAdapter = control.As <ITransformAdapter>(); if (m_transformAdapter != null) { m_transformAdapter.TransformChanged += transformAdapter_TransformChanged; } control.ClientSizeChanged += control_ClientSizeChanged; }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { if (m_dragSelector != null) { m_dragSelector.Selected -= dragSelector_Selected; } control.ContextChanged -= control_ContextChanged; control.MouseUp -= control_MouseUp; control.MouseDown -= control_MouseDown; control.DragDrop -= control_DragDrop; m_pickingAdapters2 = null; m_pickingAdapters = null; }
/// <summary> /// Binds the adapter to the adaptable control. Called in the order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control</param> protected override void Bind(AdaptableControl control) { m_transformAdapter = control.As <ITransformAdapter>(); m_selectionAdapter = control.As <ISelectionAdapter>(); if (m_selectionAdapter != null) { m_selectionAdapter.SelectedItemHit += selectionAdapter_SelectedItemHit; } control.ContextChanged += control_ContextChanged; control.Invalidated += control_Invalidated; control.KeyDown += control_KeyDown; control.Controls.Add(m_textBox); }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { control.ContextChanged -= control_ContextChanged; var d2dControl = control as D2dAdaptableControl; if (d2dControl != null) { d2dControl.DrawingD2d -= d2dControl_DrawingD2d; } else { control.Paint -= control_Paint; } base.Unbind(control); }
/// <summary> /// Binds the adapter to the adaptable control. Called in the order that the adapters /// were defined on the control</summary> /// <param name="control">Adaptable control</param> protected override void Bind(AdaptableControl control) { // get picking adapters in reverse order on the control m_pickingAdapters = control.AsAll <IPickingAdapter>().ToArray(); Array.Reverse(m_pickingAdapters); m_pickingAdapters2 = control.AsAll <IPickingAdapter2>().ToArray(); Array.Reverse(m_pickingAdapters2); m_dragSelector = control.As <IDragSelector>(); if (m_dragSelector != null) { m_dragSelector.Selected += dragSelector_Selected; } control.ContextChanged += control_ContextChanged; }
/// <summary> /// Binds the adapter to the adaptable control. Called in the order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control</param> protected override void Bind(AdaptableControl control) { m_autoTranslateAdapter = control.As <IAutoTranslateAdapter>(); control.ContextChanged += control_ContextChanged; var d2dControl = control as D2dAdaptableControl; if (d2dControl != null) { d2dControl.DrawingD2d += d2dControl_DrawingD2d; } else { control.Paint += control_Paint; } base.Bind(control); }
/// <summary> /// Binds the adapter to the adaptable control. Called in the reverse order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control</param> protected override void BindReverse(AdaptableControl control) { control.MouseDown += control_MouseDown; control.MouseMove += control_MouseMove; control.MouseUp += control_MouseUp; }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { var d2dControl = control as D2dAdaptableControl; d2dControl.DrawingD2d -= control_DrawingD2d; }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { control.MouseDown -= control_MouseDown; control.MouseMove -= control_MouseMove; control.MouseUp -= control_MouseUp; }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { control.Paint -= control_Paint; base.Unbind(control); }
/// <summary> /// Unbinds the adapter from the adaptable control</summary> /// <param name="control">Adaptable control</param> protected override void Unbind(AdaptableControl control) { control.MouseWheel -= control_MouseWheel; }
/// <summary> /// Binds the adapter to the adaptable control. Called in the reverse order that the adapters /// were defined on the control.</summary> /// <param name="control">Adaptable control</param> protected override void BindReverse(AdaptableControl control) { control.MouseWheel += control_MouseWheel; }
/// <summary> /// Binds the adapter to the adaptable control.Called in the reverse order that the adapters /// were defined on the control</summary> /// <param name="control">Adaptable control</param> protected override void BindReverse(AdaptableControl control) { control.MouseUp += control_MouseUp; control.MouseDown += control_MouseDown; control.DragDrop += control_DragDrop; }