/// <summary>
        /// Initialize a new instance of the MenuCheckBoxController class.
        /// </summary>
        /// <param name="viewManager">Owning view manager instance.</param>
        /// <param name="target">Target for state changes.</param>
        /// <param name="checkBox">Drawing element that owns check box display.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public MenuCheckBoxController(ViewContextMenuManager viewManager,
                                      ViewBase target,
                                      ViewDrawMenuCheckBox checkBox,
                                      NeedPaintHandler needPaint)
        {
            Debug.Assert(viewManager != null);
            Debug.Assert(target != null);
            Debug.Assert(checkBox != null);
            Debug.Assert(needPaint != null);

            _viewManager = viewManager;
            _target = target;
            _menuCheckBox = checkBox;
            NeedPaint = needPaint;
        }
Exemple #2
0
        /// <summary>
        /// Initialize a new instance of the MenuCheckBoxController class.
        /// </summary>
        /// <param name="viewManager">Owning view manager instance.</param>
        /// <param name="target">Target for state changes.</param>
        /// <param name="checkBox">Drawing element that owns check box display.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public MenuCheckBoxController(ViewContextMenuManager viewManager,
                                      ViewBase target,
                                      ViewDrawMenuCheckBox checkBox,
                                      NeedPaintHandler needPaint)
        {
            Debug.Assert(viewManager != null);
            Debug.Assert(target != null);
            Debug.Assert(checkBox != null);
            Debug.Assert(needPaint != null);

            ViewManager   = viewManager;
            _target       = target;
            _menuCheckBox = checkBox;
            NeedPaint     = needPaint;
        }