Suprcode / Zircon

Legend of Mir 3 - Official Public Zircon Source
337 stars 256 forks source link

Net7 upgrade MarketPlaceDialog.cs to spawn gamegold.txt in browser #79

Closed Pergatory-TR closed 1 year ago

Pergatory-TR commented 1 year ago

Client -> Scenes -> Views MarketPlaceDialog.cs

Line 4 `Using System.Diagnostics;

Line 1200

 box.YesButton.MouseClick += (o1, e1) =>
                {
                    if (string.IsNullOrEmpty(CEnvir.BuyAddress)) return;

                    System.Diagnostics.Process.Start(new ProcessStartInfo
                    {
                        FileName = (CEnvir.BuyAddress + MapObject.User.Name),
                        UseShellExecute = true
                    });

Explanation for code change. For desktop versions of .NET:

System.Diagnostics.Process.Start("http://www.webpage.com/");

For .NET Core, the default for ProcessStartInfo.UseShellExecute has changed from true to false, and so you have to explicitly set it to true for this to work:

System.Diagnostics.Process.Start(new ProcessStartInfo { FileName = "http://www.webpage.com/", UseShellExecute = true });