Rename TcpStatusLabel to HTTPStatusLabel

This commit is contained in:
ChsBuffer
2021-09-20 19:08:01 +08:00
parent e46eef17d0
commit 04d6933319
2 changed files with 17 additions and 17 deletions

View File

@@ -73,7 +73,7 @@
this.DownloadSpeedLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.UploadSpeedLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.blankToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.TcpStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.HttpStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.NatTypeStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.NatTypeStatusLightLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.ControlButton = new System.Windows.Forms.Button();
@@ -522,7 +522,7 @@
this.DownloadSpeedLabel,
this.UploadSpeedLabel,
this.blankToolStripStatusLabel,
this.TcpStatusLabel,
this.HttpStatusLabel,
this.NatTypeStatusLabel,
this.NatTypeStatusLightLabel});
this.StatusStrip.Location = new System.Drawing.Point(0, 272);
@@ -565,14 +565,14 @@
this.blankToolStripStatusLabel.Size = new System.Drawing.Size(240, 17);
this.blankToolStripStatusLabel.Spring = true;
//
// TcpStatusLabel
// HttpStatusLabel
//
this.TcpStatusLabel.Name = "TcpStatusLabel";
this.TcpStatusLabel.Size = new System.Drawing.Size(33, 17);
this.TcpStatusLabel.Text = "TCP:";
this.TcpStatusLabel.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
this.TcpStatusLabel.Visible = false;
this.TcpStatusLabel.Click += new System.EventHandler(this.TcpStatusLabel_Click);
this.HttpStatusLabel.Name = "HttpStatusLabel";
this.HttpStatusLabel.Size = new System.Drawing.Size(41, 17);
this.HttpStatusLabel.Text = "HTTP:";
this.HttpStatusLabel.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
this.HttpStatusLabel.Visible = false;
this.HttpStatusLabel.Click += new System.EventHandler(this.TcpStatusLabel_Click);
//
// NatTypeStatusLabel
//
@@ -803,6 +803,6 @@
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.ContainerControl ButtomControlContainerControl;
private System.Windows.Forms.ToolStripMenuItem ShowHideConsoleToolStripMenuItem;
private System.Windows.Forms.ToolStripStatusLabel TcpStatusLabel;
private System.Windows.Forms.ToolStripStatusLabel HttpStatusLabel;
}
}

View File

@@ -1126,9 +1126,9 @@ namespace Netch.Forms
private void ConnectivityStatusVisible(bool visible)
{
if (!visible)
TcpStatusLabel.Text = NatTypeStatusLabel.Text = "";
HttpStatusLabel.Text = NatTypeStatusLabel.Text = "";
TcpStatusLabel.Visible = NatTypeStatusLabel.Visible = NatTypeStatusLightLabel.Visible = visible;
HttpStatusLabel.Visible = NatTypeStatusLabel.Visible = NatTypeStatusLightLabel.Visible = visible;
}
/// <summary>
@@ -1210,7 +1210,7 @@ namespace Netch.Forms
private async Task HttpConnectAsync()
{
TcpStatusLabel.Enabled = false;
HttpStatusLabel.Enabled = false;
_httpConnectCts = new CancellationTokenSource();
@@ -1221,17 +1221,17 @@ namespace Netch.Forms
return;
if (res != null)
TcpStatusLabel.Text = $"TCP{i18N.Translate(": ")}{res}ms";
HttpStatusLabel.Text = $"HTTP{i18N.Translate(": ")}{res}ms";
else
TcpStatusLabel.Text = $"TCP{i18N.Translate(": ", "Timeout")}";
HttpStatusLabel.Text = $"HTTP{i18N.Translate(": ", "Timeout")}";
TcpStatusLabel.Visible = true;
HttpStatusLabel.Visible = true;
}
finally
{
_httpConnectCts.Dispose();
_httpConnectCts = null;
TcpStatusLabel.Enabled = true;
HttpStatusLabel.Enabled = true;
}
}