/// <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> /// 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_autoTranslateAdapter = control.As <IAutoTranslateAdapter>(); control.ContextChanged += control_ContextChanged; control.Paint += control_Paint; 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_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> /// 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; }
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> /// 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> /// 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); }