예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     AppPropertys.mainWindow = this;
     AppPropertys.Initialize();
     PlayController.Initialize();
     LrcController.Initialize();
     LoadSongList("");
 }
예제 #2
0
 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();
     //  }));
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
        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("保存用户配置…");
        }
예제 #5
0
        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;
            }
        }
예제 #6
0
 private void btnLrcShow_MouseDown(object sender, MouseButtonEventArgs e)
 {
     AppPropertys.SetLrcShow();
 }
예제 #7
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     AppPropertys.SetLrcShow();
 }
예제 #8
0
 private void btnExit_Click(object sender, RoutedEventArgs e)
 {
     AppPropertys.setFreeNotifyIcon();
     //Environment.Exit(0);
     Application.Current.Shutdown(-1);
 }