Example #1
0
 void umsg_Closed1(object sender, EventArgs e)
 {
     if (umsg.DialogResult.Value == true)
     {
         CommHelper.BaseNavigate(this, PanelType.StartPanel);
         umsg.Closed -= new EventHandler(umsg_Closed1);
         this.UpdateLayout();
     }
 }
 private void btnStart_Click(object sender, RoutedEventArgs e)
 {
     if (lbMusicList.SelectedItem != null)
     {
         CommHelper.CurrnetSelectMusic = lbMusicList.SelectedItem as MusicInfo;
     }
     else if (lbLocalMusicList.SelectedItem != null)
     {
         CommHelper.CurrnetSelectMusic = lbLocalMusicList.SelectedItem as MusicInfo;
     }
     if (CommHelper.CurrnetSelectMusic != null)
     {
         CommHelper.BaseNavigate(this, PanelType.GamePanel);
     }
 }
Example #3
0
        /// <summary>
        /// 音乐播放完毕
        /// </summary>
        void cpSignPanel_OnPlayEnd()
        {
            tbEnd.Visibility = System.Windows.Visibility.Visible;
            //计算相关信息
            double percent = (double)(currentGri.CoolHits + currentGri.NormalHits) / cpSignPanel.CadenceCount;

            currentGri.HitPercent = (int)Math.Floor(percent * 100);
            CalcPingJia();
            currentGri.MusicName = CommHelper.CurrnetSelectMusic.MusicName;
            currentGri.SignCount = cpSignPanel.CadenceCount;
            //模拟计算
            tr = new Timer((state) =>
            {
                currentGri.ScoreSum           = spScore.NowTotalScore;
                CommHelper.LastGameResultInfo = currentGri;
                ((GameEndPanel)ResourceMgr.CachePanel[PanelType.GameEndPanel]).DisplayGameEndInfo();
                CommHelper.BaseNavigate(this, PanelType.GameEndPanel);
                tr.Dispose();
            }, null, 2000, 999999);
        }
 private void btnBackMenu_Click(object sender, RoutedEventArgs e)
 {
     mebg.Stop();
     CommHelper.BaseNavigate(this, PanelType.StartPanel);
 }
Example #5
0
 private void btnRecordSign_Click(object sender, RoutedEventArgs e)
 {
     RelaseSomething();
     CommHelper.BaseNavigate(this, PanelType.MusicRecordSignPanel);
 }
Example #6
0
 /// <summary>
 /// 选择音乐界面
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSelectMusic_Click(object sender, RoutedEventArgs e)
 {
     CommHelper.BaseNavigate(this, PanelType.MusicListPanel);
 }