-
Notifications
You must be signed in to change notification settings - Fork 0
/
CheckConnection.cs
43 lines (40 loc) · 1.06 KB
/
CheckConnection.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Decompiled with JetBrains decompiler
// Type: OculusTrayTool.CheckConnection
// Assembly: OculusTrayTool, Version=0.87.8.0, Culture=neutral, PublicKeyToken=null
// MVID: E8946A27-16D6-4BF6-9D7B-70CB25A977E0
// Assembly location: C:\Program Files (x86)\Oculus Tray Tool\OculusTrayTool.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Net;
#nullable disable
namespace OculusTrayTool
{
[StandardModule]
internal sealed class CheckConnection
{
public static bool HaveiConnection;
public static bool CheckForInternetConnection()
{
bool flag;
try
{
using (WebClient webClient = new WebClient())
{
using (webClient.OpenRead("http://www.google.com"))
{
CheckConnection.HaveiConnection = true;
flag = true;
}
}
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
CheckConnection.HaveiConnection = false;
flag = false;
ProjectData.ClearProjectError();
}
return flag;
}
}
}