コード例 #1
0
ファイル: Game.cs プロジェクト: nccgroup/44Con2013Game
        /// <summary>
        /// How we start asking questions
        /// </summary>
        public void PlayGame()
        {
            try
            {
                string strFile = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + "\\NCCSounds\\ShallPlay.wav";
                Console.WriteLine(strFile);
                System.Media.SoundPlayer player = new System.Media.SoundPlayer(@strFile);
                player.Play();
            }
            catch (Exception)
            {
            }
            Window winName = new Name(this);

            winName.ShowDialog();

            if (this.PlayerStarted == false)
            {
                return;
            }

            //PlayerEMail
            MyMain.button1.IsEnabled = true;
            MyMain.button2.IsEnabled = true;
            MyMain.button3.IsEnabled = true;
            MyMain.button4.IsEnabled = true;
            MyMain.button5.IsEnabled = false;
            thisBackdoor             = new PiBackdoor(this, MyMain);
            AskQuestion();
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: nccgroup/44Con2013Game
        /// <summary>
        /// How we start asking questions
        /// </summary>
        public void PlayGame()
        {
            try
            {
                string strFile = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + "\\NCCSounds\\ShallPlay.wav";
                Console.WriteLine(strFile);
                System.Media.SoundPlayer player = new System.Media.SoundPlayer(@strFile);
                player.Play();
            }
            catch (Exception)
            {

            }
            Window winName = new Name(this);
            winName.ShowDialog();

            if (this.PlayerStarted == false) return;

            //PlayerEMail
            MyMain.button1.IsEnabled = true;
            MyMain.button2.IsEnabled = true;
            MyMain.button3.IsEnabled = true;
            MyMain.button4.IsEnabled = true;
            MyMain.button5.IsEnabled = false;
            thisBackdoor = new PiBackdoor(this, MyMain);
            AskQuestion();
        }