Esempio n. 1
0
 void FirstLaunch()
 {
     if (!File.Exists("OMCLC\\FirstLaunchInfo.json"))
     {
         Task t = new Task(() =>
         {
             MainWindow.Current.Dispatcher.BeginInvoke((Action) delegate()
             {
                 PreLoadingArea.Visibility = Visibility.Visible;
                 PreLoadingProg.Content    = "搜索Java中...";
             }).Wait();
             Java.SearchJava();
             MainWindow.Current.Dispatcher.BeginInvoke((Action) delegate()
             {
                 if (Java.JavaList.Count == 0)
                 {
                     PreLoadingStatus.SelectedIndex = 1;
                     PreLoadingProg.Content         = "没有搜索到Java,请安装Java后再打开启动器";
                 }
                 else
                 {
                     PreLoadingArea.Visibility = Visibility.Collapsed;
                 }
             }).Wait();
         });
         t.Start();
     }
     else
     {
         Java.LoadFromProfile();
     }
 }