Пример #1
0
        private void button123_Click(object sender, EventArgs e)
        {
            noteD_Med[0].Play();
            sp.AddNote(8); if (CheckSong(0) > 0) { noteD_Med[0].PlaySync(); }

            if (CheckSong(0) > 0)
            {

                silence.PlaySync();songForm = new SongForm(CheckSong());songForm.Show();
                PlaySong();sp = new Song();
            }
        }
Пример #2
0
        private void WiimoteListener()
        {
            pullNunchukJoystick(p1);
            if (Home_Pressed(p1))
            {
                if (About.ActiveForm.Equals(null) == false)
                    About.ActiveForm.Close();
                else if (SongForm.ActiveForm.Equals(null) == false)
                    SongForm.ActiveForm.Close();
                else
                    this.Close();
            }
            if (nunchuk_Y > 30)
            {
                if (A_Pressed(p1))
                {
                    noteD2_Loop[0].PlayLooping();
                    sp.AddNote(1);

                    if (CheckSong(0) > 0)
                    {
                        noteD2_Loop[0].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (B_Pressed(p1)) // (B)
                {
                    noteB_Loop[0].PlayLooping();
                    sp.AddNote(3);

                    if (CheckSong(0) > 0)
                    {
                        noteB_Loop[0].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                        sp = new Song();
                    }
                }
                if (Minus_Pressed(p1)) // (A)
                {
                    noteA_Loop[0].PlayLooping();
                    sp.AddNote(4);

                    if (CheckSong(0) > 0)
                    {
                        noteA_Loop[0].PlaySync();
                        silence.PlaySync();
                        songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song(); sp = new Song();
                    }
                }
                if (Plus_Pressed(p1)) // (F)
                {
                    noteF_Loop[0].PlayLooping();
                    sp.AddNote(6);

                    if (CheckSong(0) > 0)
                    {
                        noteF_Loop[0].PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (Z_Pressed(p1)) // (D)
                {
                    noteD_Loop[0].PlayLooping();
                    sp.AddNote(8);

                    if (CheckSong(0) > 0)
                    {
                        noteD_Loop[0].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
            }
            if (nunchuk_Y > 10 && nunchuk_Y <= 30)
            {
                if (A_Pressed(p1))
                {
                    noteD2_Loop[1].PlayLooping();
                    sp.AddNote(1);

                    if (CheckSong(0) > 0)
                    {
                        noteD2_Loop[1].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (B_Pressed(p1)) // (B)
                {
                    noteB_Loop[1].PlayLooping();
                    sp.AddNote(3);

                    if (CheckSong(0) > 0)
                    {
                        noteB_Loop[1].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                        sp = new Song();
                    }
                }
                if (Minus_Pressed(p1)) // (A)
                {
                    noteA_Loop[1].PlayLooping();
                    sp.AddNote(4);

                    if (CheckSong(0) > 0)
                    {
                        noteA_Loop[1].PlaySync();
                        silence.PlaySync();
                        songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song(); sp = new Song();
                    }
                }
                if (Plus_Pressed(p1)) // (F)
                {
                    noteF_Loop[1].PlayLooping();
                    sp.AddNote(6);

                    if (CheckSong(0) > 0)
                    {
                        noteF_Loop[1].PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (Z_Pressed(p1)) // (D)
                {
                    noteD_Loop[1].PlayLooping();
                    sp.AddNote(8);

                    if (CheckSong(0) > 0)
                    {
                        noteD_Loop[1].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
            }
            if (nunchuk_Y > -10 && nunchuk_Y <= 10)
            {
                if (A_Pressed(p1))
                {
                    noteD2_Loop[2].PlayLooping();
                    sp.AddNote(1);

                    if (CheckSong(0) > 0)
                    {
                        noteD2_Loop[2].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (B_Pressed(p1)) // (B)
                {
                    noteB_Loop[2].PlayLooping();
                    sp.AddNote(3);

                    if (CheckSong(0) > 0)
                    {
                        noteB_Loop[2].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                        sp = new Song();
                    }
                }
                if (Minus_Pressed(p1)) // (A)
                {
                    noteA_Loop[2].PlayLooping();
                    sp.AddNote(4);

                    if (CheckSong(0) > 0)
                    {
                        noteA_Loop[2].PlaySync();
                        silence.PlaySync();
                        songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song(); sp = new Song();
                    }
                }
                if (Plus_Pressed(p1)) // (F)
                {
                    noteF_Loop[2].PlayLooping();
                    sp.AddNote(6);

                    if (CheckSong(0) > 0)
                    {
                        noteF_Loop[2].PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (Z_Pressed(p1)) // (D)
                {
                    noteD_Loop[2].PlayLooping();
                    sp.AddNote(8);

                    if (CheckSong(0) > 0)
                    {
                        noteD_Loop[2].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
            }
            if (nunchuk_Y > -30 && nunchuk_Y <= -10)
            {
                if (A_Pressed(p1))
                {
                    noteD2_Loop[3].PlayLooping();
                    sp.AddNote(1);

                    if (CheckSong(0) > 0)
                    {
                        noteD2_Loop[3].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (B_Pressed(p1)) // (B)
                {
                    noteB_Loop[3].PlayLooping();
                    sp.AddNote(3);

                    if (CheckSong(0) > 0)
                    {
                        noteB_Loop[3].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                        sp = new Song();
                    }
                }
                if (Minus_Pressed(p1)) // (A)
                {
                    noteA_Loop[3].PlayLooping();
                    sp.AddNote(4);

                    if (CheckSong(0) > 0)
                    {
                        noteA_Loop[3].PlaySync();
                        silence.PlaySync();
                        songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song(); sp = new Song();
                    }
                }
                if (Plus_Pressed(p1)) // (F)
                {
                    noteF_Loop[3].PlayLooping();
                    sp.AddNote(6);

                    if (CheckSong(0) > 0)
                    {
                        noteF_Loop[3].PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (Z_Pressed(p1)) // (D)
                {
                    noteD_Loop[3].PlayLooping();
                    sp.AddNote(8);

                    if (CheckSong(0) > 0)
                    {
                        noteD_Loop[3].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
            }
            if (nunchuk_Y <= -30)
            {
                if (A_Pressed(p1))
                {
                    noteD2_Loop[4].PlayLooping();
                    sp.AddNote(1);

                    if (CheckSong(0) > 0)
                    {
                        noteD2_Loop[4].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (B_Pressed(p1)) // (B)
                {
                    noteB_Loop[4].PlayLooping();
                    sp.AddNote(3);

                    if (CheckSong(0) > 0)
                    {
                        noteB_Loop[4].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                        sp = new Song();
                    }
                }
                if (Minus_Pressed(p1)) // (A)
                {
                    noteA_Loop[4].PlayLooping();
                    sp.AddNote(4);

                    if (CheckSong(0) > 0)
                    {
                        noteA_Loop[4].PlaySync();
                        silence.PlaySync();
                        songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song(); sp = new Song();
                    }
                }
                if (Plus_Pressed(p1)) // (F)
                {
                    noteF_Loop[4].PlayLooping();
                    sp.AddNote(6);

                    if (CheckSong(0) > 0)
                    {
                        noteF_Loop[4].PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
                if (Z_Pressed(p1)) // (D)
                {
                    noteD_Loop[4].PlayLooping();
                    sp.AddNote(8);

                    if (CheckSong(0) > 0)
                    {
                        noteD_Loop[4].PlaySync();
                        silence.PlaySync();
                        silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                        PlaySong(); sp = new Song();
                    }
                }
            }
            // A button is D2
            // B button is B
            // Minus is A
            // Plus is F
            // Z is D
        }
Пример #3
0
        private void button11_Click(object sender, EventArgs e)
        {
            noteA_Long[1].Play();
               sp.AddNote(4); if (CheckSong(0) > 0) { noteA_Short[1].PlaySync(); }

               {

               }
               if (CheckSong(0) > 0)
               {
               silence.PlaySync();songForm = new SongForm(CheckSong());songForm.Show();
               PlaySong();sp = new Song();
               }
        }
Пример #4
0
 private void ShowSongForm(string s)
 {
     songForm = new SongForm(s);songForm.Show();
 }
Пример #5
0
        private void button79_Click(object sender, EventArgs e)
        {
            noteB_Short[2].Play();
               sp.AddNote(3); if (CheckSong(0) > 0) { noteB_Short[2].PlaySync(); }
            if (CheckSong(0) > 0)
            {

                silence.PlaySync();songForm = new SongForm(CheckSong());songForm.Show();
                PlaySong();sp = new Song();
            }
        }
Пример #6
0
        private void button50_Click(object sender, EventArgs e)
        {
            noteF_Long[8].Play();
            sp.AddNote(6); if (CheckSong(0) > 0) { noteF_Loop[4].PlaySync(); }

            if (CheckSong(0) > 0)
            {

                silence.PlaySync(); songForm = new SongForm(CheckSong()); songForm.Show();
                PlaySong(); sp = new Song();
            }
        }
Пример #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            noteA_Frog.Play();
            sp.AddNote(4);if(CheckSong(0) > 0){noteA_Frog.PlaySync();}

            if (CheckSong(0) > 0)
            {

                songForm = new SongForm(CheckSong()); songForm.Show();
                PlaySong(); sp = new Song();
            }
        }
Пример #8
0
        private void button150_Click(object sender, EventArgs e)
        {
            noteA_Loop[0].PlayLooping();
            sp.AddNote(4);

            if (CheckSong(0) > 0)
            {
                noteA_Loop[0].PlaySync();
                silence.PlaySync();
                songForm = new SongForm(CheckSong());songForm.Show();
                PlaySong();sp = new Song();sp = new Song();
            }
        }