Skip to content

Commit

Permalink
Version 8.2.1.2404
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Apr 15, 2024
1 parent 5e3ffcb commit b203d6b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions InternetTest/InternetTest/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public static class Global
#if NIGHTLY
private static DateTime Date => System.IO.File.GetLastWriteTime(System.Reflection.Assembly.GetEntryAssembly().Location);

Check warning on line 48 in InternetTest/InternetTest/Classes/Global.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.

public static string Version => $"8.2.0.2404-nightly{Date:yyMM.dd@HHmm}";
public static string Version => $"8.2.1.2404-nightly{Date:yyMM.dd@HHmm}";

#else
public static string Version => "8.2.0.2404";
public static string Version => "8.2.1.2404";
#endif
public static string LastVersionLink => "https://raw.githubusercontent.com/Leo-Corporation/LeoCorp-Docs/master/Liens/Update%20System/InternetTest/7.0/Version.txt";
internal static string SynethiaPath => $@"{FileSys.AppDataPath}\Léo Corporation\InternetTest Pro\NewSynethiaConfig.json";
Expand Down
2 changes: 1 addition & 1 deletion InternetTest/InternetTest/InternetTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<UseWindowsForms>True</UseWindowsForms>
<Version>8.2.0.2404</Version>
<Version>8.2.1.2404</Version>
<Copyright>© 2024</Copyright>
<Company>Léo Corporation</Company>
<Description>Taking you to another level. InternetTest can locate IP addresses, send ping request, recover your WiFi passwords and more!</Description>
Expand Down
33 changes: 19 additions & 14 deletions InternetTest/InternetTest/Pages/RequestsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ private void SendBtn_Click(object sender, RoutedEventArgs e)
{
try
{
if (!UrlTxt.Text.Contains("http")) return;
ExecuteRequest();
}
catch (Exception ex)
Expand All @@ -74,25 +75,29 @@ private void SendBtn_Click(object sender, RoutedEventArgs e)
string _baseUrl = "";
private async void ExecuteRequest()
{
var options = new RestClientOptions(UrlTxt.Text);
var client = new RestClient(options);
var request = new RestRequest("", (Method)RequestTypeComboBox.SelectedIndex);
try
{
var options = new RestClientOptions(UrlTxt.Text);
var client = new RestClient(options);
var request = new RestRequest("", (Method)RequestTypeComboBox.SelectedIndex);

var response = await client.ExecuteAsync(request);
ResponseTxt.Text = response.Content;
var response = await client.ExecuteAsync(request);
ResponseTxt.Text = response.Content;

HeadersPanel.Children.Clear();
_headers = "";
HeadersPanel.Children.Clear();
_headers = "";

foreach (var item in response.Headers)
{
_headers += item.ToString() + "\n";
var header = item.ToString().Split("=", 2);
if (header.Length < 2) continue;
foreach (var item in response.Headers)
{
_headers += item.ToString() + "\n";
var header = item.ToString().Split("=", 2);
if (header.Length < 2) continue;

HeadersPanel.Children.Add(new TextBlock() { Text = header[0], FontWeight = FontWeights.Bold, TextWrapping = TextWrapping.Wrap, Margin = new(0, 5, 0, 0) });
HeadersPanel.Children.Add(new TextBlock() { Text = header[1], TextWrapping = TextWrapping.Wrap });
HeadersPanel.Children.Add(new TextBlock() { Text = header[0], FontWeight = FontWeights.Bold, TextWrapping = TextWrapping.Wrap, Margin = new(0, 5, 0, 0) });
HeadersPanel.Children.Add(new TextBlock() { Text = header[1], TextWrapping = TextWrapping.Wrap });
}
}
catch { }
}

private void UrlTxt_KeyUp(object sender, KeyEventArgs e)
Expand Down

0 comments on commit b203d6b

Please sign in to comment.