Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void _objPlayer1_OnShotBoxControllerStatus(object sender, SHOTBOXARGS e)
        {
            if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PREPARED)
            {
                isInitialized = true;
                isSceneLoaded = true;

                if (sender != null)
                {
                    IPlayer playerobj = sender as IPlayer;
                    if (playerobj != null)
                    {
                        playerobj.Play();
                    }
                }
            }
            else if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PLAYCOMPLETE)
            {
                IPlayer playerobj = sender as IPlayer;
                if (playerobj.Equals(objBGPlayer) || playerobj.Equals(objScorePlayer))
                {
                    playerobj.DeleteSg();
                }
            }
        }
 /// <summary>
 /// this event fires when scenegraph is loaded
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void objShotBox_OnShotBoxStatus(object sender, SHOTBOXARGS e)
 {
     if (Equals(e.SHOTBOXRESPONSE, SHOTBOXMSG.PREPARED))
     {
         btnProgram.BackColor = Color.DarkGreen;
         btnPlayDefaultController.BackColor = Color.DarkGreen;
     }
 }
 /// <summary>
 /// fires when controller send the pageout status
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void objShotBox_OnShotBoxControllerStatus(object sender, SHOTBOXARGS e)
 {
     switch (e.SHOTBOXRESPONSE)
     {
     case SHOTBOXMSG.PAGEOUT: HandlePageOut();
         break;
     }
 }
Exemple #4
0
        }     //end (btnLoadScene_Click_1)

        /// <summary>
        /// this event fires when scenegraph is loaded
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void m_objShotBox_OnShotBoxStatus(object sender, SHOTBOXARGS e)
        {
            if (Equals(e.SHOTBOXRESPONSE, SHOTBOXMSG.PREPARED))
            {
                btnPlay.BackColor    = Color.DarkGreen;
                btnProgram.BackColor = Color.DarkGreen;
            } //end (if)
        }     //end (m_objShotBox_OnShotBoxStatus)
Exemple #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void objPlayer1_OnShotBoxStatus(object sender, SHOTBOXARGS e)
        {
            if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PREPARED)
            {
                IsInitialized = true;
                IsSceneLoaded = true;

                if (sender != null)
                {
                    ShotBox shotboxobj = sender as ShotBox;
                    if (shotboxobj != null)
                    {
                        if (shotboxobj.Equals(objScorePlayer))
                        {
                            WriteTrace("objPlayer1_OnShotBoxStatus Scoreplayer Scene prepared,Calling SetMatchUdt...");
                            SetMatchUdt();
                        }
                        WriteTrace("objPlayer1_OnShotBoxStatus Scoreplayer Scene prepared,Calling Play..");
                        shotboxobj.Play(true, true);
                    }
                    else
                    {
                        if (sender is IPlayer)
                        {
                            IPlayer playerobj = sender as IPlayer;
                            if (playerobj != null)
                            {
                                WriteTrace("objPlayer1_OnShotBoxStatus BackGround Scene prepared,Calling Play...");
                                playerobj.Play(true, true);
                            }
                        }
                    }
                }
            }
            else if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PLAYCOMPLETE)
            {
                WriteTrace("objPlayer1_OnShotBoxStatus SHOTBOXMSG.PLAYCOMPLETE event..");
                if (sender is ShotBox)
                {
                    ShotBox shotboxobj = sender as ShotBox;
                    if (shotboxobj.Equals(objScorePlayer))
                    {
                        WriteTrace("objPlayer1_OnShotBoxStatus Scoreplayer Scene playcomplete,Calling DeleteSg...");
                        shotboxobj.DeleteSg();
                    }
                }
                else if (sender is IPlayer)
                {
                    IPlayer playerobj = sender as IPlayer;
                    if (playerobj.Equals(objBGPlayer))
                    {
                        WriteTrace("objPlayer1_OnShotBoxStatus BackGround Scene playcomplete,Calling DeleteSg...");
                        playerobj.DeleteSg();
                    }
                }
            }
        }
Exemple #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void _objPlayer1_OnShotBoxStatus(object sender, SHOTBOXARGS e)
        {
            if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PREPARED)
            {
                isInitialized = true;
                isSceneLoaded = true;

                if (sender != null)
                {
                    IPlayer playerobj = sender as IPlayer;
                    if (playerobj != null)
                    {
                        playerobj.Play();
                    }
                }
            }
        }
 /// <summary>
 /// this event fires when scenegraph is loaded
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void m_objShotBox_OnShotBoxStatus(object sender, SHOTBOXARGS e)
 {
     if (Equals(e.SHOTBOXRESPONSE, SHOTBOXMSG.PREPARED))
     {
         btnPlay.BackColor = Color.DarkGreen;
         btnProgram.BackColor = Color.DarkGreen;
     }//end (if)
 }
Exemple #8
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void objPlayer1_OnShotBoxStatus(object sender, SHOTBOXARGS e)
        {
            if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PREPARED)
            {
                IsInitialized = true;
                IsSceneLoaded = true;

                if (sender != null)
                {
                    ShotBox shotboxobj = sender as ShotBox;
                    if (shotboxobj != null)
                    {
                        if (shotboxobj.Equals(objScorePlayer))
                        {
                            System.Diagnostics.Debug.WriteLine("objPlayer1_OnShotBoxStatus Scoreplayer Scene prepared,Calling SetMatchUdt...");
                            SetMatchUdt();
                        }
                        System.Diagnostics.Debug.WriteLine("objPlayer1_OnShotBoxStatus Scoreplayer Scene prepared,Calling Play..");
                        shotboxobj.Play(true, true);
                    }
                    else
                    {
                        if (sender is IPlayer)
                        {
                            IPlayer playerobj = sender as IPlayer;
                            if (playerobj != null)
                            {
                                System.Diagnostics.Debug.WriteLine("objPlayer1_OnShotBoxStatus BackGround Scene prepared,Calling Play...");
                                playerobj.Play(true, true);
                            }
                        }
                    }
                }
            }
            else if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PLAYCOMPLETE)
            {
                System.Diagnostics.Debug.WriteLine("objPlayer1_OnShotBoxStatus SHOTBOXMSG.PLAYCOMPLETE event..");
                if (sender is ShotBox)
                {
                    ShotBox shotboxobj = sender as ShotBox;
                    if (shotboxobj.Equals(objScorePlayer))
                    {
                        System.Diagnostics.Debug.WriteLine("objPlayer1_OnShotBoxStatus Scoreplayer Scene playcomplete,Calling DeleteSg...");
                        shotboxobj.DeleteSg();
                    }
                }
                else if (sender is IPlayer)
                {
                    IPlayer playerobj = sender as IPlayer;
                    if (playerobj.Equals(objBGPlayer))
                    {
                        System.Diagnostics.Debug.WriteLine("objPlayer1_OnShotBoxStatus BackGround Scene playcomplete,Calling DeleteSg...");
                        playerobj.DeleteSg();
                    }
                }
            }
        }
        /// <summary>
        /// fires when controller send the pageout status
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void m_objShotBox_OnShotBoxControllerStatus(object sender, SHOTBOXARGS e)
        {
            switch (e.SHOTBOXRESPONSE)
            {
                case SHOTBOXMSG.PAGEOUT: HandlePageOut();
                    break;

            }//end (switch)
        }
Exemple #10
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void objPlayer_OnShotBoxControllerStatus(object sender, SHOTBOXARGS e)
 {
     switch (e.SHOTBOXRESPONSE)
     {
         case SHOTBOXMSG.PLAYCOMPLETE:
             m_objplayertodelete = sender as IPlayer;
             if (m_objplayertodelete != null && BtnLoadBG.Text != "Unload BG")
             {
                 m_objplayertodelete.DeleteSg();
             }
             break;
         case SHOTBOXMSG.SGDELETED:
             if (m_objplayertodelete != null && m_objplayertodelete.Equals(sender as IPlayer))
             {
                 TableLayoutPanelCellPosition position = tableLayoutPanel1.GetPositionFromControl(m_objplayertodelete as Form);
                 tableLayoutPanel1.Controls.Remove(m_objplayertodelete as Form);
                 switch (position.Column)
                 {
                     case 0:
                         foreach (DataGridViewRow dr in dgvSelectPlayer.Rows)
                         {
                             dr.Cells[1].Value = false;
                         }
                         break;
                     case 1:
                         foreach (DataGridViewRow dr in dgvSelectPlayer.Rows)
                         {
                             dr.Cells[2].Value = false;
                         }
                         break;
                 }
                 break;
             }
             break;
     }
 }