public MainWindow() { InitializeComponent(); AppPropertys.mainWindow = this; AppPropertys.Initialize(); PlayController.Initialize(); LrcController.Initialize(); LoadSongList(""); }
public static void ReSet() { // AppPropertys.mainWindow.Dispatcher.BeginInvoke(new Action(() => { DT.Stop(); startPosition = 0; duringTime = 0; playControl.thumb2.Dispatcher.Invoke(new Action(() => Canvas.SetLeft(playControl.thumb2, 0))); LrcController.offsetTime = 0; AppPropertys.FlushMemory(); // })); }
public MainPage(string arge) { InitializeComponent(); AppPropertys.mainWindow = this; AppPropertys.Initialize(); PlayController.Initialize(); LrcController.Initialize(AppPropertys.appSetting.LrcFont, AppPropertys.appSetting.SkinIndex); LoadSongList(""); if (arge != "") { AddFileAndPlay(arge); } }
private void Window_Closed(object sender, EventArgs e) { new TaskFactory().StartNew(new Action(() => { PlayController.bassEng.Stop(); if (AppPropertys.HotKeys != null) { AppPropertys.HotKeys.UnRegister(); } AppPropertys.setFreeNotifyIcon(); //一般配置 AppPropertys.appSetting.LrcFont = LrcController.DefaultFont; AppPropertys.appSetting.SkinIndex = LrcController.SkinIndex; AppPropertys.appSetting.Volume = PlayController.bassEng.Volume; AppPropertys.appSetting.Save(); //下载模块的配置 SaveDownloadConfig(); })); Console.WriteLine("保存用户配置…"); }
private static void LrcController_ButtonChanged(object sender, LrcController.ButtonChangeEventArgs e) { switch (e.ButtonIndex) { case 0: AppPropertys.notifyIcon_MouseDoubleClick(sender, null); break; case 1: PlayPrevent(); break; case 2: Pause(); break; case 3: if (bassEng.CanPlay) { Play(); } else { PlayMusic(); } break; case 4: PlayNext(); break; case -1: AppPropertys.isLrcShow = false; LrcController.CloseLrc(); break; } }
private void btnLrcShow_MouseDown(object sender, MouseButtonEventArgs e) { AppPropertys.SetLrcShow(); }
private void Button_Click(object sender, RoutedEventArgs e) { AppPropertys.SetLrcShow(); }
private void btnExit_Click(object sender, RoutedEventArgs e) { AppPropertys.setFreeNotifyIcon(); //Environment.Exit(0); Application.Current.Shutdown(-1); }