' ########## Search Categories #############
Sub SearchCategories
If TextboxCategories.Text <> "" Then
Dim i As Int = ListviewCategories.Items.IndexOf(TextboxCategories.Text)
If i = -1 Then
'Log("Not found")
FXnotify.ShowNotification4("Mindcraft", "Category " & TextboxCategories.Text & " was added.", NotifyIcon, "CENTER", 3000)
' Add new item to Categories listview
ListviewCategories.Items.Add(TextboxCategories.Text)
ListviewCategories.ScrollTo(ListviewCategories.Items.size - 1)
ListviewCategories.SelectedIndex = ListviewCategories.Items.size - 1
ListviewCategories.Items.Sort(True)
Else
'Log("Found!")
FXnotify.ShowNotification4("Mindcraft", "Category " & TextboxCategories.Text & " was located.", NotifyIcon, "CENTER", 3000)
ListviewCategories.SelectedIndex = i
End If
Else
FXnotify.ShowNotification4("Mindcraft", "Please enter a category name.", NotifyIcon, "CENTER", 3000)
End If
End Sub