Skip to content

Commit 96bfcf5

Browse files
committed
fix links for .net core
1 parent 6676caa commit 96bfcf5

File tree

11 files changed

+41
-34
lines changed

11 files changed

+41
-34
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System.Diagnostics;
2+
3+
namespace Intersect.Utilities;
4+
public static class BrowserUtils
5+
{
6+
public static void Open(string url)
7+
{
8+
Process.Start(new ProcessStartInfo(url)
9+
{
10+
UseShellExecute = true,
11+
});
12+
}
13+
14+
public static void Open(Uri uri) => Open(uri.AbsoluteUri);
15+
}

Intersect.Client/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using Intersect.Logging;
2-
1+
using Intersect.Logging;
2+
using Intersect.Utilities;
33
using System;
44
using System.Diagnostics;
55
using System.Globalization;
@@ -52,7 +52,7 @@ static void Main(string[] args)
5252

5353
if (!string.IsNullOrEmpty(OpenGLLink))
5454
{
55-
Process.Start(OpenGLLink);
55+
BrowserUtils.Open(OpenGLLink);
5656
}
5757

5858
Environment.Exit(-1);
@@ -63,7 +63,7 @@ static void Main(string[] args)
6363
{
6464
if (!string.IsNullOrEmpty(OpenALLink))
6565
{
66-
Process.Start(OpenALLink);
66+
BrowserUtils.Open(OpenALLink);
6767
}
6868

6969
Environment.Exit(-1);

Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_ChangePlayerLabel.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
using System;
1+
using System;
22
using System.Windows.Forms;
33

44
using Intersect.Editor.Localization;
55
using Intersect.GameObjects.Events.Commands;
6+
using Intersect.Utilities;
67

78
namespace Intersect.Editor.Forms.Editors.Events.Event_Commands
89
{
@@ -81,9 +82,7 @@ private void btnSelectLightColor_Click(object sender, EventArgs e)
8182

8283
private void lblStringTextVariables_Click(object sender, EventArgs e)
8384
{
84-
System.Diagnostics.Process.Start(
85-
"http://www.ascensiongamedev.com/community/topic/749-event-text-variables/"
86-
);
85+
BrowserUtils.Open("http://www.ascensiongamedev.com/community/topic/749-event-text-variables/");
8786
}
8887

8988
}

Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_ChatboxText.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
using System;
1+
using System;
22
using System.Windows.Forms;
33

44
using Intersect.Editor.General;
55
using Intersect.Editor.Localization;
66
using Intersect.Enums;
77
using Intersect.GameObjects.Events.Commands;
8+
using Intersect.Utilities;
89

910
namespace Intersect.Editor.Forms.Editors.Events.Event_Commands
1011
{
@@ -73,9 +74,7 @@ private void btnCancel_Click(object sender, EventArgs e)
7374

7475
private void lblCommands_Click(object sender, EventArgs e)
7576
{
76-
System.Diagnostics.Process.Start(
77-
"http://www.ascensiongamedev.com/community/topic/749-event-text-variables/"
78-
);
77+
BrowserUtils.Open("http://www.ascensiongamedev.com/community/topic/749-event-text-variables/");
7978
}
8079

8180
}

Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_ConditionalBranch.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Intersect.GameObjects;
88
using Intersect.GameObjects.Events;
99
using Intersect.GameObjects.Events.Commands;
10+
using Intersect.Utilities;
1011

1112
namespace Intersect.Editor.Forms.Editors.Events.Event_Commands
1213
{
@@ -1090,9 +1091,7 @@ private void cmbVariable_SelectedIndexChanged(object sender, EventArgs e)
10901091

10911092
private void lblStringTextVariables_Click(object sender, EventArgs e)
10921093
{
1093-
System.Diagnostics.Process.Start(
1094-
"http://www.ascensiongamedev.com/community/topic/749-event-text-variables/"
1095-
);
1094+
BrowserUtils.Open("http://www.ascensiongamedev.com/community/topic/749-event-text-variables/");
10961095
}
10971096

10981097
private void NudItemAmount_ValueChanged(object sender, System.EventArgs e)

Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_Input.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Intersect.Enums;
66
using Intersect.GameObjects;
77
using Intersect.GameObjects.Events.Commands;
8+
using Intersect.Utilities;
89

910
namespace Intersect.Editor.Forms.Editors.Events.Event_Commands
1011
{
@@ -185,9 +186,7 @@ private void btnCancel_Click(object sender, EventArgs e)
185186

186187
private void lblCommands_Click(object sender, EventArgs e)
187188
{
188-
System.Diagnostics.Process.Start(
189-
"http://www.ascensiongamedev.com/community/topic/749-event-text-variables/"
190-
);
189+
BrowserUtils.Open("http://www.ascensiongamedev.com/community/topic/749-event-text-variables/");
191190
}
192191

193192
private void rdoGlobalVariables_CheckedChanged(object sender, EventArgs e)

Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_Options.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Drawing;
33
using System.IO;
44
using System.Windows.Forms;
@@ -89,9 +89,7 @@ private void cmbFace_SelectedIndexChanged(object sender, EventArgs e)
8989

9090
private void lblCommands_Click(object sender, EventArgs e)
9191
{
92-
System.Diagnostics.Process.Start(
93-
"http://www.ascensiongamedev.com/community/topic/749-event-text-variables/"
94-
);
92+
BrowserUtils.Open("http://www.ascensiongamedev.com/community/topic/749-event-text-variables/");
9593
}
9694

9795
}

Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_Text.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Drawing;
33
using System.IO;
44
using System.Windows.Forms;
@@ -74,9 +74,7 @@ private void cmbFace_SelectedIndexChanged(object sender, EventArgs e)
7474

7575
private void lblCommands_Click(object sender, EventArgs e)
7676
{
77-
System.Diagnostics.Process.Start(
78-
"http://www.ascensiongamedev.com/community/topic/749-event-text-variables/"
79-
);
77+
BrowserUtils.Open("http://www.ascensiongamedev.com/community/topic/749-event-text-variables/");
8078
}
8179

8280
}

Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_Variable.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Intersect.GameObjects;
77
using Intersect.GameObjects.Events;
88
using Intersect.GameObjects.Events.Commands;
9+
using Intersect.Utilities;
910
using VariableMod = Intersect.Enums.VariableMod;
1011

1112
namespace Intersect.Editor.Forms.Editors.Events.Event_Commands
@@ -1006,9 +1007,7 @@ private StringVariableMod GetStringVariableMod()
10061007

10071008
private void lblStringTextVariables_Click(object sender, EventArgs e)
10081009
{
1009-
System.Diagnostics.Process.Start(
1010-
"http://www.ascensiongamedev.com/community/topic/749-event-text-variables/"
1011-
);
1010+
BrowserUtils.Open("http://www.ascensiongamedev.com/community/topic/749-event-text-variables/");
10121011
}
10131012

10141013
private void UpdateStringFormElements()

Intersect.Editor/Forms/frmAbout.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
using System;
1+
using System;
22
using System.Windows.Forms;
33

44
using Intersect.Editor.Localization;
5+
using Intersect.Utilities;
56

67
namespace Intersect.Editor.Forms
78
{
@@ -17,7 +18,7 @@ public FrmAbout()
1718

1819
private void lblWebsite_Click(object sender, EventArgs e)
1920
{
20-
System.Diagnostics.Process.Start("http://ascensiongamedev.com");
21+
BrowserUtils.Open("http://ascensiongamedev.com");
2122
}
2223

2324
private void frmAbout_Load(object sender, EventArgs e)

0 commit comments

Comments
 (0)