Skip to content

Commit

Permalink
Added a default browser setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Mar 28, 2023
1 parent 9e3a8d1 commit b9cc51f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion JexusManager.Shared/DialogHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,18 @@ public static string GetPrivateKeyFile(string file)

public static void ProcessStart(string url)
{
var browser = Environment.GetEnvironmentVariable("JEXUSMANAGER_BROWSER");
var useDefault = string.IsNullOrWhiteSpace(browser);
try
{
using var process = new Process
{
StartInfo = new ProcessStartInfo { FileName = url, UseShellExecute = true }
StartInfo = new ProcessStartInfo
{
FileName = useDefault ? url: browser,
Arguments = useDefault ? string.Empty : url,
UseShellExecute = true
}
};
process.Start();
}
Expand Down
8 changes: 4 additions & 4 deletions JexusManager/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,17 @@ private void LoadIisExpressQuick(List<string> files)
if (!IisExpressServerManager.ServerInstalled)
{
var result = UIService.ShowMessage(
"Didn't find IIS Express on this machine. Do you want to install it now?",
"Didn't find IIS Express on this machine. Do you want to go and download it now?",
"IIS Express not found",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1);
if (result != DialogResult.Yes)
if (result == DialogResult.Yes)
{
return;
DialogHelper.ProcessStart("https://www.microsoft.com/download/details.aspx?id=48264");
}

DialogHelper.ProcessStart("https://www.microsoft.com/download/details.aspx?id=48264");
IisExpressRoot.Text = "IIS Express (Disabled)";
return;
}

Expand Down

0 comments on commit b9cc51f

Please sign in to comment.