示例#1
0
        public ContextPanel()
        {
            PopUpContextMenu = new ContextMenuStrip
            {
                BackColor = LayoutColors.ColorControlBack,
                ForeColor = LayoutColors.ColorControlText
            };
            PopUpContextMenu.MouseEnter += ContextMenuMouseEnter;
            PopUpContextMenu.MouseLeave += ContextMenuMouseLeave;

            contextMenuTimer       = new Timer();
            contextMenuTimer.Tick += ContextMenuTimerTick;

            contextButton = new ContextButton {
                Parent = this, Visible = false
            };
            contextButton.MouseClick       += ContextButtonOnMouseClick;
            contextButton.MouseDoubleClick += ContextButtonOnMouseClick;
            contextButton.MouseEnter       += ContextButtonMouseEnter;
            contextButton.MouseLeave       += ContextButtonMouseLeave;

            closeButton = new CloseButton {
                Parent = this, Visible = false
            };
        }
        public ContextPanel()
        {
            PopUpContextMenu = new ContextMenuStrip
                {
                    BackColor = LayoutColors.ColorControlBack,
                    ForeColor = LayoutColors.ColorControlText
                };
            PopUpContextMenu.MouseEnter += ContextMenuMouseEnter;
            PopUpContextMenu.MouseLeave += ContextMenuMouseLeave;

            contextMenuTimer = new Timer();
            contextMenuTimer.Tick += ContextMenuTimerTick;

            contextButton = new ContextButton {Parent = this, Visible = false};
            contextButton.MouseClick += ContextButtonOnMouseClick;
            contextButton.MouseDoubleClick += ContextButtonOnMouseClick;
            contextButton.MouseEnter += ContextButtonMouseEnter;
            contextButton.MouseLeave += ContextButtonMouseLeave;

            closeButton = new CloseButton {Parent = this, Visible = false};
        }