UserAgent change.
This commit is contained in:
parent
93380b7a19
commit
47167f2be5
|
|
@ -109,7 +109,9 @@ class Downloader
|
|||
| SecurityProtocolType.Ssl3;
|
||||
// Create a request for the specified remote file name
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(remoteFilename);
|
||||
request.UserAgent = "Roblox/WinINet";
|
||||
//changing it to just "roblox" since roblox is breaking everything.
|
||||
//request.UserAgent = "Roblox/WinINet";
|
||||
request.UserAgent = "Roblox";
|
||||
request.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate");
|
||||
request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
|
||||
if (request != null)
|
||||
|
|
|
|||
|
|
@ -1229,40 +1229,48 @@ namespace NovetusLauncher
|
|||
private void SearchButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string searchText = SearchBar.Text;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(searchText))
|
||||
{
|
||||
return;
|
||||
};
|
||||
|
||||
if (LastSearchText != searchText)
|
||||
try
|
||||
{
|
||||
//It's a new Search
|
||||
CurrentNodeMatches.Clear();
|
||||
LastSearchText = searchText;
|
||||
LastNodeIndex = 0;
|
||||
SearchNodes(searchText, treeView1.Nodes[0]);
|
||||
}
|
||||
if (LastSearchText != searchText)
|
||||
{
|
||||
//It's a new Search
|
||||
CurrentNodeMatches.Clear();
|
||||
LastSearchText = searchText;
|
||||
LastNodeIndex = 0;
|
||||
SearchNodes(searchText, treeView1.Nodes[0]);
|
||||
}
|
||||
|
||||
if (LastNodeIndex >= 0 && CurrentNodeMatches.Count > 0 && LastNodeIndex < CurrentNodeMatches.Count)
|
||||
{
|
||||
TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex];
|
||||
LastNodeIndex++;
|
||||
treeView1.SelectedNode = selectedNode;
|
||||
treeView1.SelectedNode.Expand();
|
||||
treeView1.Select();
|
||||
if (LastNodeIndex >= 0 && CurrentNodeMatches.Count > 0 && LastNodeIndex < CurrentNodeMatches.Count)
|
||||
{
|
||||
TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex];
|
||||
LastNodeIndex++;
|
||||
treeView1.SelectedNode = selectedNode;
|
||||
treeView1.SelectedNode.Expand();
|
||||
treeView1.Select();
|
||||
}
|
||||
else
|
||||
{
|
||||
//It's a new Search
|
||||
CurrentNodeMatches.Clear();
|
||||
LastSearchText = searchText;
|
||||
LastNodeIndex = 0;
|
||||
SearchNodes(searchText, treeView1.Nodes[0]);
|
||||
TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex];
|
||||
LastNodeIndex++;
|
||||
treeView1.SelectedNode = selectedNode;
|
||||
treeView1.SelectedNode.Expand();
|
||||
treeView1.Select();
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (Exception)
|
||||
{
|
||||
//It's a new Search
|
||||
CurrentNodeMatches.Clear();
|
||||
LastSearchText = searchText;
|
||||
LastNodeIndex = 0;
|
||||
SearchNodes(searchText, treeView1.Nodes[0]);
|
||||
TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex];
|
||||
LastNodeIndex++;
|
||||
treeView1.SelectedNode = selectedNode;
|
||||
treeView1.SelectedNode.Expand();
|
||||
treeView1.Select();
|
||||
MessageBox.Show("The map '" + searchText + "' cannot be found. Please try another term.");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -1386,40 +1386,48 @@ namespace NovetusLauncher
|
|||
private void SearchButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string searchText = SearchBar.Text;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(searchText))
|
||||
{
|
||||
return;
|
||||
};
|
||||
|
||||
if (LastSearchText != searchText)
|
||||
try
|
||||
{
|
||||
//It's a new Search
|
||||
CurrentNodeMatches.Clear();
|
||||
LastSearchText = searchText;
|
||||
LastNodeIndex = 0;
|
||||
SearchNodes(searchText, treeView1.Nodes[0]);
|
||||
}
|
||||
if (LastSearchText != searchText)
|
||||
{
|
||||
//It's a new Search
|
||||
CurrentNodeMatches.Clear();
|
||||
LastSearchText = searchText;
|
||||
LastNodeIndex = 0;
|
||||
SearchNodes(searchText, treeView1.Nodes[0]);
|
||||
}
|
||||
|
||||
if (LastNodeIndex >= 0 && CurrentNodeMatches.Count > 0 && LastNodeIndex < CurrentNodeMatches.Count)
|
||||
{
|
||||
TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex];
|
||||
LastNodeIndex++;
|
||||
treeView1.SelectedNode = selectedNode;
|
||||
treeView1.SelectedNode.Expand();
|
||||
treeView1.Select();
|
||||
if (LastNodeIndex >= 0 && CurrentNodeMatches.Count > 0 && LastNodeIndex < CurrentNodeMatches.Count)
|
||||
{
|
||||
TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex];
|
||||
LastNodeIndex++;
|
||||
treeView1.SelectedNode = selectedNode;
|
||||
treeView1.SelectedNode.Expand();
|
||||
treeView1.Select();
|
||||
}
|
||||
else
|
||||
{
|
||||
//It's a new Search
|
||||
CurrentNodeMatches.Clear();
|
||||
LastSearchText = searchText;
|
||||
LastNodeIndex = 0;
|
||||
SearchNodes(searchText, treeView1.Nodes[0]);
|
||||
TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex];
|
||||
LastNodeIndex++;
|
||||
treeView1.SelectedNode = selectedNode;
|
||||
treeView1.SelectedNode.Expand();
|
||||
treeView1.Select();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//It's a new Search
|
||||
CurrentNodeMatches.Clear();
|
||||
LastSearchText = searchText;
|
||||
LastNodeIndex = 0;
|
||||
SearchNodes(searchText, treeView1.Nodes[0]);
|
||||
TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex];
|
||||
LastNodeIndex++;
|
||||
treeView1.SelectedNode = selectedNode;
|
||||
treeView1.SelectedNode.Expand();
|
||||
treeView1.Select();
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("The map '" + searchText + "' cannot be found. Please try another term.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue