Esempio n. 1
0
 private void RefreshNLInstallButtonState()
 {
     if (Launcher.IsNLPack())
     {
         NLInstallButton.IsEnabled   = false;
         NLUnInstallButton.IsEnabled = true;
     }
     else
     {
         NLInstallButton.IsEnabled   = true;
         NLUnInstallButton.IsEnabled = false;
     }
 }
Esempio n. 2
0
        private void BrowseHLFolderButton_Click(object sender, RoutedEventArgs e)
        {
            // BROWSE AND CHANGE THE FOLDER FILE. DONT FORGET TO UPDATE THE GLOBAL VARIABLE
            bool   IsItNLPack = Launcher.IsNLPack();
            string folderPath = Util.AskForHLFolder();

            if (folderPath != null)
            {
                XmlBuilder.CreateConfigXml();
                Launcher.HLFolder = folderPath;
                Launcher.NSFolder = folderPath + System.IO.Path.DirectorySeparatorChar + "ns";
            }
            else
            {
                // throw new FileNotFoundException("Could not find HL folder"); // no need to crash the launcher for this
            }

            MainWindowReference.CallUpdateGame();
        }