示例#1
0
 private void degenerateChoice_MouseDown(object sender, MouseEventArgs e)
 {
     if (!degenerateClod)
     {
         try
         {
             string text = StringProcessing.StepUp(mainform.pathToFile) + "\\Mods";
             if (File.Exists(text))
             {
                 text += "\\ModCFG.txt";
                 if (mainform.Lang == "eng")
                 {
                     mainform.CopyResource(SRHDLauncher.Properties.Resources.ModCFGen, text);
                 }
                 if (mainform.Lang == "ru")
                 {
                     mainform.CopyResource(SRHDLauncher.Properties.Resources.ModCFGru, text);
                 }
             }
             Process.Start(mainform.pathToFile);
             if (turnOffLauncher)
             {
                 mainform.Close();
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.ToString(), "");
         }
         degenerateChoice.Image = Resources._2ContinueD;
     }
     else
     {
         try
         {
             Process.Start(mainform.pathToFile);
             if (turnOffLauncher)
             {
                 mainform.Close();
             }
         }
         catch (Exception ex2)
         {
             MessageBox.Show(ex2.ToString(), "");
         }
     }
     Close();
     mainform.playForm = null;
 }
示例#2
0
        public void InitialiseFont()
        {
            string text = Path.GetTempPath() + "updaterFont.otf";

            if (!File.Exists(text))
            {
                form.CopyResource("SRHDLauncher.Resources.updaterFont.otf", text);
            }
            Fonts.AddFontFile(text);
        }