private void ComboBoxItem3(object sender, RoutedEventArgs e) { MusicChoice m = new MusicChoice(); mc.FileName = m.Waves(); bg.Source = new BitmapImage(new Uri(m.WavesPicture())); }
private void ComboBoxItem4(object sender, RoutedEventArgs e) { MusicChoice m = new MusicChoice(); mc.FileName = System.IO.Directory.GetCurrentDirectory() + @"\Music\Forest2.mp3"; bg.Source = new BitmapImage(new Uri(m.DefaultPicture())); TimerPhoto = null; }
private void ComboBoxItem2(object sender, RoutedEventArgs e) { MusicChoice m = new MusicChoice(); mc.FileName = m.Rain(); bg.Source = new BitmapImage(new Uri(m.RainPicture())); TimerPhoto = new BitmapImage(new Uri(m.RainTimer())); }
private void ComboBoxItem3(object sender, RoutedEventArgs e) { if (lock2) { MusicChoice m = new MusicChoice(); mc.FileName = m.Waves(); //---------------=-----------------------------------------------------------修改 bg.Source = new BitmapImage(new Uri(m.WavesPicture())); TimerPhoto = new BitmapImage(new Uri(m.WavesTimer())); } else { Buy buy = new Buy(coin); buy.ShowDialog(); if (buy.DialogResult == true) { coin -= 50; buy.Close(); lock2 = true; MusicChoice m = new MusicChoice(); mc.FileName = m.Waves(); bg.Source = new BitmapImage(new Uri(m.WavesPicture())); TimerPhoto = new BitmapImage(new Uri(m.WavesTimer())); StreamWriter sw2 = new StreamWriter(@"1.txt", false, Encoding.UTF8); sw2.WriteLine(coin); sw2.WriteLine(lock1); sw2.WriteLine(lock2); sw2.Close(); MoneyL.Content = "当前金币数:" + coin; } else { buy.Close(); } } }