Exemplo n.º 1
0
        public PresenterMin(
            IViewMin viewMin,
            IViewMain viewMain,
            IResourcesService resources)
        {
            _viewMin   = viewMin;
            _viewMain  = viewMain;
            _resources = resources;

            //set initial form settings
            if (_viewMin != null)
            {
                _viewMin.VisibilityFormIcon1(false);
                _viewMin.VisibilityFormIcon2(false);
                _viewMin.StartPosition = FormStartPosition.Manual;
                if (_resources != null)
                {
                    _viewMin.SetImageFormIcon3(_resources.Closed);
                }
                _viewMin.FormResizable    = false;
                _viewMin.FormMovable      = false;
                _viewMin.SnapToScreenEdge = false;

                //subscribe to events
                _viewMin.VisibleChanged          += OnVisibleChanged;
                _viewMin.MouseEntersFormIcon3    += OnMouseEntersFormIcon3;
                _viewMin.MouseLeavesFormIcon3    += OnMouseLeavesFormIcon3;
                _viewMin.MouseClicksFormIcon3    += OnMouseClicksFormIcon3;
                _viewMin.MouseEnterLabelTitleTop += OnMouseEnterLabelTitleTop;
            }

            _clipboard         = new Clipboard();
            Clipboard.Changed += Clipboard_Changed;
        }
Exemplo n.º 2
0
 private void OnMouseEntersFormIcon3(object sender, EventArgs e)
 {
     _viewMin.SetImageFormIcon3(_resources.ClosedSelected);
 }