-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm1.cs
More file actions
117 lines (108 loc) · 3.9 KB
/
Form1.cs
File metadata and controls
117 lines (108 loc) · 3.9 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
using AutoUpdaterDotNET;
using CefSharp;
using CefSharp.WinForms;
using LeagueHelperClass;
using System;
using System.Drawing;
using System.Net.NetworkInformation;
using System.Reflection;
using System.Windows.Forms;
namespace LeagueBuildHelper
{
public partial class Form1 : Form, LeagueApplicationVer
{
public Form1()
{
InitializeComponent();
this.label1.Text = this.ApplicationAssembly.GetName().Version.ToString();
}
public Assembly ApplicationAssembly => Assembly.GetExecutingAssembly();
ChromiumWebBrowser chrome;
private void Form1_Load(object sender, EventArgs e)
{
CefSettings settings = new CefSettings();
Cef.Initialize(settings);
//txtUrl.Text = "www.google.com";
//chrome = new ChromiumWebBrowser(txtUrl.Text);
this.pContainer.Controls.Add(chrome);
chrome = new ChromiumWebBrowser("https://www.vedapanchakarma.com/sharpUpdate/downloads/changelog/preview.html");
this.pContainer.Controls.Add(chrome);
chrome.Dock = DockStyle.Fill;
chrome.AddressChanged += Chrome_AddressChanged;
txtUrl.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
txtUrl.AutoCompleteSource = AutoCompleteSource.ListItems;
}
private void Chrome_AddressChanged(object sender, AddressChangedEventArgs e)
{
this.Invoke(new MethodInvoker(() =>
{
txtUrl.Text = txtUrl.Text.ToString();
}));
}
private void btnBuild_Click(object sender, EventArgs e)
{
if (txtUrl.Text == "wukong")
{
var url = "https://app.mobalytics.gg/lol/champions/monkeyking/build";
chrome.Load(url);
}
else
{
var url = "https://app.mobalytics.gg/lol/champions/" + txtUrl.Text.ToString() + "/build";
chrome.Load(url);
}
}
private void btnCounter_Click(object sender, EventArgs e)
{
var url = "http://www.championcounter.com/" + txtUrl.Text.ToString();
chrome.Load(url);
}
private void button2_Click(object sender, EventArgs e)
{
var summoner = "https://euw.op.gg/summoner/userName=" + txtSummoner.Text.ToString();
chrome.Load(summoner);
}
private void btnEuw_Click(object sender, EventArgs e)
{
txtPing.Text = "";
Ping ping = new Ping();
PingReply reply = ping.Send("185.82.209.9");
txtPing.AppendText(reply.RoundtripTime.ToString());
if (reply.RoundtripTime > 120)
{
txtPing.BackColor = Color.Yellow;
}
else
{
txtPing.BackColor = Color.LawnGreen;
}
if (reply.RoundtripTime > 210)
{
txtPing.BackColor = Color.Red;
}
else
{
txtPing.BackColor = Color.Yellow;
}
}
private void btnGarena_Click(object sender, EventArgs e)
{
txtPing.Text = "";
Ping ping = new Ping();
PingReply reply = ping.Send("dynamodb.ap-southeast-1.amazonaws.com");
txtPing.AppendText(reply.RoundtripTime.ToString());
if (reply.RoundtripTime < 120)
{
txtPing.BackColor = Color.LawnGreen;
}
else
{
txtPing.BackColor = Color.Yellow;
}
}
private void button1_Click(object sender, EventArgs e)
{
AutoUpdater.Start("https://www.vedapanchakarma.com/sharpUpdate/downloads/AutoUpdater.xml");
}
}
}