Exemplo n.º 1
0
	public Superstition(Superstition s) {
		this.type = s.type;
		this.metric = s.metric;
		this.letters = s.letters;
		this.weight = s.weight;
		this.maxValue = s.maxValue;
		this.checkValue = s.checkValue;
	}
        private void ListBoxItem_Selected_22(object sender, RoutedEventArgs e)
        {
            StopAllMusic();
            Superstition.Play();
            BitmapImage newIm = new BitmapImage();

            newIm.BeginInit();
            newIm.UriSource = new Uri(@"C:\Users\admin\Desktop\VirtualOrchestra\GUI\Resources\Wonder.jpg");
            newIm.EndInit();
            PreviewImage.Source = newIm;
            ArtistName.Content  = "Stevie Wonder";
            SongName.Content    = "Superstition";
            YearText.Content    = "1972";
            songFile            = @"C:\Users\admin\Desktop\VirtualOrchestra\Sample MIDIs\superstition.mid";
            songName            = "Wonder: Superstition";
        }
        private void StopAllMusic()
        {
            bool parAndPause = ParaAnd.CanPause;

            if (parAndPause == true)
            {
                ParaAnd.Stop();
            }
            bool fallPause = Fall.CanPause;

            if (fallPause == true)
            {
                Fall.Stop();
            }
            bool prayerPause = Prayer.CanPause;

            if (prayerPause == true)
            {
                Prayer.Stop();
            }
            bool hardDayPause = HardDay.CanPause;

            if (hardDayPause == true)
            {
                HardDay.Stop();
            }
            bool sym5Pause = Sym5.CanPause;

            if (sym5Pause == true)
            {
                Sym5.Stop();
            }
            bool rockAmadeusPause = RockAmadeus.CanPause;

            if (rockAmadeusPause == true)
            {
                RockAmadeus.Stop();
            }
            bool getLuckyPause = GetLucky.CanPause;

            if (getLuckyPause == true)
            {
                GetLucky.Stop();
            }
            bool mtKingPause = MtKing.CanPause;

            if (mtKingPause == true)
            {
                MtKing.Stop();
            }
            bool alwaysPause = Always.CanPause;

            if (alwaysPause == true)
            {
                Always.Stop();
            }
            bool airGPause = AirG.CanPause;

            if (airGPause == true)
            {
                AirG.Stop();
            }
            bool newWorldPause = NewWorld.CanPause;

            if (newWorldPause == true)
            {
                NewWorld.Stop();
            }
            bool swanLakePause = SwanLake.CanPause;

            if (swanLakePause == true)
            {
                SwanLake.Stop();
            }
            bool bohemianPause = Bohemian.CanPause;

            if (bohemianPause == true)
            {
                Bohemian.Stop();
            }
            bool dovesPause = Doves.CanPause;

            if (dovesPause == true)
            {
                Doves.Stop();
            }
            bool canHeatPause = CanHeat.CanPause;

            if (canHeatPause == true)
            {
                CanHeat.Stop();
            }
            bool flashPause = Flash.CanPause;

            if (flashPause == true)
            {
                Flash.Stop();
            }
            bool heyYaPause = HeyYa.CanPause;

            if (heyYaPause == true)
            {
                HeyYa.Stop();
            }
            bool lifePause = Life.CanPause;

            if (lifePause == true)
            {
                Life.Stop();
            }
            bool mansWorldPause = MansWorld.CanPause;

            if (mansWorldPause == true)
            {
                MansWorld.Stop();
            }
            bool stairwayPause = Stairway.CanPause;

            if (stairwayPause == true)
            {
                Stairway.Stop();
            }
            bool superstitionPause = Superstition.CanPause;

            if (superstitionPause == true)
            {
                Superstition.Stop();
            }
        }
 private void SuperstitionLoop(object sender, RoutedEventArgs e)
 {
     Superstition.Position = TimeSpan.Zero;
     Superstition.Play();
 }
Exemplo n.º 5
0
	private static Superstition Create(Type type, int checkValue) {
		var s = new Superstition ();
		s.type = type;
		s.maxValue = 1;
		s.value = 0;
		s.checkValue = checkValue;
		return s;
	}