Пример #1
0
        void exitBtn_OnButtonClick(UIElement button)
        {
            GameFacade.Kill();

            /*var exitDialog = new UIExitDialog();
             * Parent.Add(exitDialog);*/
        }
Пример #2
0
        public void RestartGame()
        {
            try
            {
                if (FSOEnvironment.Linux)
                {
                    System.Diagnostics.Process.Start("mono", "FreeSO.exe " + FSOEnvironment.Args);
                }
                else
                {
                    var args = new ProcessStartInfo(".\\FreeSO.exe", FSOEnvironment.Args);
                    try
                    {
                        System.Diagnostics.Process.Start(args);
                    }
                    catch (Exception)
                    {
                        args.FileName = "FreeSO.exe";
                        System.Diagnostics.Process.Start(args);
                    }
                }
            } catch
            {
            }

            GameFacade.Kill();
        }
Пример #3
0
 public void RestartGamePatch()
 {
     if (FSOEnvironment.Linux)
     {
         System.Diagnostics.Process.Start("mono", "update.exe");
     }
     else
     {
         System.Diagnostics.Process.Start("update.exe");
     }
     GameFacade.Kill();
 }
Пример #4
0
 public void RestartGamePatch()
 {
     try
     {
         if (FSOEnvironment.Linux)
         {
             var fsoargs = FSOEnvironment.Args;
             if (fsoargs.Length > 0)
             {
                 fsoargs = " " + fsoargs;
             }
             var args = new ProcessStartInfo("mono", "update.exe" + fsoargs);
             args.UseShellExecute = false;
             System.Diagnostics.Process.Start(args);
         }
         else
         {
             var args = new ProcessStartInfo(".\\update.exe", FSOEnvironment.Args);
             try
             {
                 System.Diagnostics.Process.Start(args);
             }
             catch (Exception)
             {
                 args.FileName = "update.exe";
                 System.Diagnostics.Process.Start(args);
             }
         }
         GameFacade.Kill();
         if (FSOEnvironment.Linux)
         {
             Environment.Exit(0);                       //we're serious
         }
     }
     catch (Exception e)
     {
         //something terrible happened :(
         _UpdaterAlert = UIScreen.GlobalShowAlert(new UIAlertOptions
         {
             Title   = GameFacade.Strings.GetString("f101", "30"),
             Message = GameFacade.Strings.GetString("f101", "31", new string[] { e.Message }),
             Buttons = UIAlertButton.Ok(y =>
             {
                 UIScreen.RemoveDialog(_UpdaterAlert);
                 Continue(false);
             })
         }, true);
     }
 }
Пример #5
0
 public void RestartGamePatch()
 {
     if (FSOEnvironment.Linux)
     {
         Process.Start("mono", "update.exe " + FSOEnvironment.Args);
     }
     else
     {
         var args = new ProcessStartInfo(".\\update.exe", FSOEnvironment.Args);
         try
         {
             Process.Start(args);
         }
         catch (Exception)
         {
             args.FileName = "update.exe";
             Process.Start(args);
         }
     }
     GameFacade.Kill();
 }
Пример #6
0
 private void m_ExitButton_OnButtonClick(UIElement button)
 {
     GameFacade.Kill();
 }