Skip to content

Commit

Permalink
resolves #66
Browse files Browse the repository at this point in the history
  • Loading branch information
FN-FAL113 committed Sep 15, 2024
1 parent 45cea56 commit 4240f14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CS2ServerPicker/App.vb
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,22 @@
Environment.NewLine +
"Author: FN-FAL113 (github username)" + Environment.NewLine +
"License: GNU General Public License V3" + Environment.NewLine +
"App Version: 2.2.1",
"App Version: 2.2.2",
"App Info"
)
End Sub

Private Sub MainDataGridView_SortCompare(sender As Object, e As DataGridViewSortCompareEventArgs) Handles MainDataGridView.SortCompare
' sort latency column by splitting "ms" and parsing numeric value
e.Handled = True

If e.CellValue1 Is Nothing Or e.CellValue2 Is Nothing Then Return

If e.Column.Index = 2 Then
Dim cell1Val As Integer = Integer.Parse(IIf(e.CellValue1.ToString().Contains("ms"), e.CellValue1.ToString().Split("ms")(0), "999999"))
Dim cell2Val As Integer = Integer.Parse(IIf(e.CellValue2.ToString().Contains("ms"), e.CellValue2.ToString().Split("ms")(0), "999999"))

e.SortResult = cell1Val.CompareTo(cell2Val)
e.Handled = True
End If
End Sub

Expand Down
4 changes: 2 additions & 2 deletions CS2ServerPicker/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2.2.1.0")>
<Assembly: AssemblyFileVersion("2.2.1.0")>
<Assembly: AssemblyVersion("2.2.2.0")>
<Assembly: AssemblyFileVersion("2.2.2.0")>
<Assembly: NeutralResourcesLanguage("en")>

0 comments on commit 4240f14

Please sign in to comment.