示例#1
0
        private void WindowsMediaPlayer_DoubleClickEvent(object sender, _WMPOCXEvents_DoubleClickEvent e)
        {
            int kliklocY = WindowsMediaPlayer.Location.Y + e.fY;

            if (kliklocY > 40)
            {
                return;
            }

            if (_miniMode == false)
            {
                _miniMode   = true;
                MinimumSize = new Size(270, 165);
                Screen s = Screen.FromPoint(Location);
                Location                = new Point(s.WorkingArea.Right - 280, s.WorkingArea.Bottom - 165 - 10);
                GroupCopy.Visible       = false;
                GroupMP3.Visible        = false;
                chkShuffle.Visible      = false;
                chkKeepPlayList.Visible = false;
                btnLoadPlayList.Visible = false;
                FormBorderStyle         = FormBorderStyle.FixedToolWindow;
                Height = 165;
                Width  = 270;
                WindowsMediaPlayer.Top    = 6;
                WindowsMediaPlayer.Height = 85;
            }
            else
            {
                _miniMode   = false;
                MinimumSize = new Size(460, 520);
                Screen s = Screen.FromPoint(Location);
                Location                = new Point(s.WorkingArea.Right - 470, s.WorkingArea.Bottom - 520 - 10);
                GroupCopy.Visible       = true;
                GroupMP3.Visible        = true;
                chkShuffle.Visible      = true;
                chkKeepPlayList.Visible = true;
                btnLoadPlayList.Visible = true;
                FormBorderStyle         = FormBorderStyle.Sizable;
                Height = 520;
                Width  = 460;
                WindowsMediaPlayer.Top    = 344;
                WindowsMediaPlayer.Height = 85;
            }
        }
示例#2
0
 internal void RaiseOnDoubleClickEvent(object sender, _WMPOCXEvents_DoubleClickEvent e)
 {
     if ((this.DoubleClickEvent != null)) {
         this.DoubleClickEvent(sender, e);
     }
 }
示例#3
0
 public virtual void DoubleClick(short nButton, short nShiftState, int fX, int fY)
 {
     _WMPOCXEvents_DoubleClickEvent doubleclickEvent = new _WMPOCXEvents_DoubleClickEvent(nButton, nShiftState, fX, fY);
     this.parent.RaiseOnDoubleClickEvent(this.parent, doubleclickEvent);
 }