Esempio n. 1
0
 private void axWindowsMediaPlayer1_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     if (collapse == 1)
     {
         for (int i = 374; i <= 414; i++)
         {
             //Thread.Sleep(25);
             //Application.OpenForms[1].Height += 5;
             this.Height++;
         }
         button1.Visible = true;
         button2.Visible = true;
         button3.Visible = true;
         collapse        = 0;
     }
     else
     {
         for (int i = 414; i >= 374; i--)
         {
             //Thread.Sleep(25);
             //Application.OpenForms[1].Height += 5;
             this.Height--;
         }
         button1.Visible = false;
         button2.Visible = false;
         button3.Visible = false;
         collapse        = 1;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Mausklick schliesst das Formular
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Animation_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     //linker Mausklick
     try
     {
         if (Form.MouseButtons == MouseButtons.Left)
         {
             this.player.controls.stop();
             GameOver gameover = new GameOver(highscore);
             gameover.ShowDialog();
             this.Dispose(true);
         }
         //rechter Mausklick
         if (Form.MouseButtons == MouseButtons.Right)
         {
             this.player.controls.stop();
             GameOver gameover = new GameOver(highscore);
             gameover.ShowDialog();
             this.Dispose(true);
         }
     }
     catch (Exception ex)
     {
         this.Dispose(true);
     }
 }
Esempio n. 3
0
 private void DragMainWindow(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     if (e.nButton == 1)
     {
         ReleaseCapture();
         SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
     }
 }
Esempio n. 4
0
 private void _WMPOCXEvents_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     if (playstopThread.IsAlive)
     {
         playstopThread.Abort();
         playstopThread.DisableComObjectEagerCleanup();
     }
     Application.Exit();
 }
Esempio n. 5
0
 private void VideoPlayer_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     if (pause)
     {
         VideoPlayer.Ctlcontrols.play();
         pause = false;
     }
     else
     {
         VideoPlayer.Ctlcontrols.pause();
         pause = true;
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Dieses Event wird ausgelöst, sobald die linke oder rechte Maustaste gedrückt wird. Es beendet das Spiel
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Endanimation_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     //linker Mausklick
     if (Form.MouseButtons == MouseButtons.Left)
     {
         this.player.controls.stop();
         //Programm wird beendet
         Application.Exit();
     }
     //rechter Mausklick
     if (Form.MouseButtons == MouseButtons.Right)
     {
         this.player.controls.stop();
         //Programm wird beendet
         Application.Exit();
     }
 }
Esempio n. 7
0
 /**
  * 获取按键按下动作,透传至底层窗体
  * */
 private void axWindowsMediaPlayer1_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     //Debug.WriteLine(e.fX.ToString());
     if (e.nButton == 1)
     {
         PostMessage(h2, WM_LBUTTONDOWN, 0, (e.fX & 0xFFFF) + (e.fY & 0xFFFF) * 0x10000);
         typ = 3;
         //PostMessage(h2, WM_LBUTTONDOWN, 0, (e.fX & 0xFFFF) + (e.fY & 0xFFFF) * 0x10000);
         //SendMessage(h2, WM_PARENTNOTIFY, WM_LBUTTONDOWN, (e.fX & 0xFFFF) + (e.fY & 0xFFFF) * 0x10000);
         //SendMessage(h2, WM_SETCURSOR, h3, (WM_LBUTTONDOWN<<16) |0x0001);
     }
     else
     {
         PostMessage(h2, WM_RBUTTONDOWN, 0, (e.fX & 0xFFFF) + (e.fY & 0xFFFF) * 0x10000);
         typ = 4;
         //PostMessage(h2, WM_RBUTTONDOWN, 0, (e.fX & 0xFFFF) + (e.fY & 0xFFFF) * 0x10000);
         //SendMessage(h2, WM_PARENTNOTIFY, WM_RBUTTONDOWN, (e.fX & 0xFFFF) + (e.fY & 0xFFFF) * 0x10000);
         //SendMessage(h2, WM_SETCURSOR, h3, (WM_RBUTTONDOWN<<16) |0x0001);
     }
 }
Esempio n. 8
0
 /// <summary>
 /// Dieses Event wird ausgelöst, sobald die linke oder rechte Maustaste gedrückt wird. Es schließt die Eingangsanimation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Eingangsanimation_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     //linker Mausklick
     try
     {
         if (Form.MouseButtons == MouseButtons.Left)
         {
             this.Dispose(true);
         }
         //rechter Mausklick
         if (Form.MouseButtons == MouseButtons.Right)
         {
             this.Dispose(true);
         }
     }
     catch (Exception ex)
     {
         this.Dispose(true);
     }
 }
Esempio n. 9
0
 private void Player_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     ScreenSaverForm_MouseDown(null, new MouseEventArgs(e.nButton == 1 ? MouseButtons.Left : MouseButtons.Right, 0, e.fX, e.fY, 0));
 }
Esempio n. 10
0
        private void Player_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
        {
            Trace.WriteLine("Player_MouseDownEvent() e.nButton=" + e.nButton);

            DoMouseDown(null, new MouseEventArgs(e.nButton == 1 ? MouseButtons.Left : MouseButtons.Right, 0, e.fX, e.fY, 0));
        }
Esempio n. 11
0
 private void axWindowsMediaPlayer1_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     ReleaseCapture();
     SendMessage(this.Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
 }
Esempio n. 12
0
 private void Vid_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     Application.Exit();
 }
Esempio n. 13
0
 private void wmpVideo_MouseDownEvent(object sender, AxWMPLib._WMPOCXEvents_MouseDownEvent e)
 {
     ReleaseCapture();
     SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
 }