Skip to content

Commit

Permalink
Improve proxies test
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Jun 26, 2022
1 parent 96cc6fe commit aa8369a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions clashN/clashN/Forms/ProxiesForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ private void GetClashProxies(bool refreshUI)

this.BeginInvoke(new Action(() =>
{
tsbSpeedtest.Enabled = true;
tsbReload.Enabled =
tsbSpeedtest.Enabled =
tsbSelectActivity.Enabled = true;
}));
}
});
Expand Down Expand Up @@ -178,6 +180,12 @@ private void RefreshProxies()
}
lvProxies.EndUpdate();

if (index >= 0 && index < lvProxies.Items.Count && lvProxies.Items.Count > 0)
{
lvProxies.Items[index].Selected = true;
lvProxies.EnsureVisible(index);
}

}));

lvDetail.BeginInvoke(new Action(() =>
Expand Down Expand Up @@ -370,7 +378,9 @@ private void tsbSpeedtest_Click(object sender, EventArgs e)
{
return;
}
tsbSpeedtest.Enabled = false;
tsbReload.Enabled =
tsbSpeedtest.Enabled =
tsbSelectActivity.Enabled = false;

MainFormHandler.Instance.ClashProxiesDelayTest(it =>
{
Expand Down

0 comments on commit aa8369a

Please sign in to comment.