/// <summary> /// Initialize a new instance of the MenuColorBlockController class. /// </summary> /// <param name="viewManager">Owning view manager instance.</param> /// <param name="target">Target for state changes.</param> /// <param name="colorBlock">Drawing element that owns color block display.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public MenuColorBlockController(ViewContextMenuManager viewManager, ViewBase target, ViewDrawMenuColorBlock colorBlock, NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); Debug.Assert(colorBlock != null); Debug.Assert(needPaint != null); _viewManager = viewManager; _target = target; _menuColorBlock = colorBlock; NeedPaint = needPaint; // Set initial display state UpdateTarget(); }
/// <summary> /// Initialize a new instance of the MenuColorBlockController class. /// </summary> /// <param name="viewManager">Owning view manager instance.</param> /// <param name="target">Target for state changes.</param> /// <param name="colorBlock">Drawing element that owns color block display.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public MenuColorBlockController(ViewContextMenuManager viewManager, ViewBase target, ViewDrawMenuColorBlock colorBlock, NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); Debug.Assert(colorBlock != null); Debug.Assert(needPaint != null); _viewManager = viewManager; _target = target; _menuColorBlock = colorBlock; NeedPaint = needPaint; // Set initial display state UpdateTarget(); }