if(textEdit1.Text.Length < 32 || textEdit1.Text.Length > 32)
{
XtraMessageBox.Show("Error. Console ID length is invalid.", "An Error Occured.");
}
else
{
string req = new WebClient().DownloadString("https://google.com/search?q="+ textEdit1.Text);
if(req.Contains("- did not match"))
{
XtraMessageBox.Show("Console I "+textEdit1.Text+Environment.NewLine+"Status: Private");
}
else
{
XtraMessageBox.Show("Console I " + textEdit1.Text + Environment.NewLine + "Status: Public");
}
}
if (textEdit1.Text.Length == 32)
{
string req = new WebClient().DownloadString("https://google.com/search?q=" + textEdit1.Text);
XtraMessageBox.Show("Console I " + textEdit1.Text + Environment.NewLine + "Status: " + req.Contains("- did not match") ? "Private" : "Public");
// If using C#6 you can use the below.
//XtraMessageBox.Show($"Console I {textEdit1.Text} {Environment.NewLine} Status: {(req.Contains("- did not match") ? "Private" : "Public")}");
}
else
{
XtraMessageBox.Show("Error. Console ID length is invalid.", "An Error Occured.");
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.