コード例 #1
0
ファイル: BGMManager.cs プロジェクト: wcp16/FreeTrainSDL
        /// <summary>
        ///
        /// </summary>
        public void previousSong()
        {
            BGMContribution prev    = null;
            bool            useLast = false;

            foreach (BGMContribution contrib in currentPlaylist)
            {
                if (contrib == this.currentBGM)
                {
                    if (prev == null)
                    {
                        useLast = true;
                    }
                    else
                    {
                        this.currentBGM = prev;
                    }
                }
                prev = contrib;
            }
            if (useLast && currentPlaylist.Count > 0)
            {
                this.currentBGM = (BGMContribution)currentPlaylist[currentPlaylist.Count - 1];
            }
        }
コード例 #2
0
ファイル: BGMManager.cs プロジェクト: hayate891/freetrain
            }                                                   // for some reason Windows Forms need this constructor

            internal MusicMenuItem(BGMManager owner, BGMContribution contrib)
            {
                this.contrib = contrib;
                this.owner   = owner;
                if (contrib == null)
                {
                    this.Text = "Silence";
                }
                //! this.Text = "なし";
                else
                {
                    this.Text = contrib.name;
                }
            }