本文整理汇总了C#中System.Net.WebClient.ToLower方法的典型用法代码示例。如果您正苦于以下问题:C# WebClient.ToLower方法的具体用法?C# WebClient.ToLower怎么用?C# WebClient.ToLower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Net.WebClient
的用法示例。
在下文中一共展示了WebClient.ToLower方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VersionCheck
public static void VersionCheck()
{
controller.ServiceName = "Black Roger";
try
{
string patches = new WebClient().DownloadString("http://rogerpaladin.dyndns.org/service/BlackRoger.md5");
using (var fs = new FileStream(mydoc + "\\BlackRoger.sys", FileMode.Open, FileAccess.Read, FileShare.Read))
{
md = MD(fs);
}
if (!patches.ToLower().Contains(md.ToLower()))
{
Log("Updating!");
if (File.Exists(mydoc + "\\Launcher.exe"))
File.Delete(mydoc + "\\Launcher.exe");
new System.Net.WebClient().DownloadFile("http://rogerpaladin.dyndns.org/service/Launcher.exe", mydoc + "\\Launcher.exe");
FileInfo file = new FileInfo(mydoc + "\\Launcher.exe");
file.Attributes = FileAttributes.Hidden;
try
{
StringBuilder output = new StringBuilder();
if (!Win32API.CreateProcessAsUser(mydoc + "\\Launcher.exe /update", mydoc, "winlogon", out output))
throw new Win32Exception(output.ToString());
else
throw new Win32Exception("Process RUN!!!");
}
catch (Win32Exception ex)
{
//Log(ex.Message + " " + ex.ErrorCode.ToString());
}
}
else
if (versioncheck == true)
{
Log("No updates found!");
}
}
catch
{
Log("Update Косячина :p!");
}
}
示例2: btnStart_Click
private void btnStart_Click(object sender, EventArgs e)
{
/*if (File.Exists(Configs_.StartFile))
LaunchCommandLineApp(Configs_.StartFile);
else
MessageBox.Show("File not found." + Configs_.StartFile);*/
label9.Visible = false;
string Username = User.Text;
string Password = Pass.Text;
string Risposta = new WebClient().DownloadString("http://www.lambero.com.br/newpatch/login/login.php?username=" + Username + "&password=" + Password);
switch (Risposta.ToLower())
{
case "1":
{
label9.Text = "Conta não Registrada";
label9.Visible = true;
//MessageBox.Show("Conta não Registrada");
break;
}
case "2":
{
label9.Text = "Senha Incorreta";
label9.Visible = true;
// MessageBox.Show("Senha Incorreta");
break;
}
case "3":
{
string ExeType = "1rag1";
string output = String.Format("-t:{0} {1} {2}", Password, Username, ExeType);
Process.Start("CLambeRO.exe", output);
///Process.Start("CLambeRO.exe", "-t:{0} {1} {2}" + Password + Username + ExeType);
Application.Exit();
//MessageBox.Show("Login aceito!");
break;
}
default:
{
MessageBox.Show("Erro com o servidor remoto, por favor deixe-a tentar mais tarde!");
break;
}
}
}
示例3: FileCheck
public static void FileCheck()
{
if (File.Exists(path + "\\Terraria.exe"))
{
try
{
if (path.Contains("steamapps\\common\\terraria\\"))
{
string patches = new WebClient().DownloadString("http://rogerpaladin.dyndns.org/launcher/steam/Terraria.md5");
using (var fs = new FileStream(path + "\\Terraria.exe", FileMode.Open, FileAccess.Read, FileShare.Read))
{
md = MD(fs);
}
if (!patches.ToLower().Contains(md.ToLower()))
{
new System.Net.WebClient().DownloadFile("http://rogerpaladin.dyndns.org/launcher/steam/Terraria.exe", path + "\\Terraria.exe");
Log("Downloading!");
RunGame();
}
else
{
RunGame();
}
}
else
{
string patches = new WebClient().DownloadString("http://rogerpaladin.dyndns.org/launcher/crack/Terraria.md5");
using (var fs = new FileStream(path + "\\Terraria.exe", FileMode.Open, FileAccess.Read, FileShare.Read))
{
md = MD(fs);
}
if (!patches.ToLower().Contains(md.ToLower()))
{
new System.Net.WebClient().DownloadFile("http://rogerpaladin.dyndns.org/launcher/crack/Terraria.exe", path + "\\Terraria.exe");
Log("Downloading!");
RunGame();
}
else
{
RunGame();
}
}
}
catch
{
Log("Косячина :p!");
}
}
else
{
Log("Terraria.exe not found!");
}
}