How to Rename the Group
[Visual Basic]
Private Sub EditGroupToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditGroupToolStripMenuItem.Click
Dim frmg As New FrmRenameGroup
For i As Integer = 0 To IMCUser.Groups.Count - 1
Dim lt As New ListViewItem
With lt
.Text = IMCUser.Groups.Item(i).GroupName
.Tag = IMCUser.Groups.Item(i).UID
End With
frmg.lv1.Items.Add(lt)
Next
frmg.ShowDialog()
If frmg.DialogResult = Windows.Forms.DialogResult.OK Then
IMC.BeginRenameGroup(frmg.lv1.SelectedItems.Item(0).Tag.ToString, frmg.TextBox1.Text)
End If
frmg.Close()
frmg.Dispose()
End Sub
[Visual Basic]
Private Sub IMC_OnRenameGroupCompleted(ByVal OldGroupName As String, ByVal NewGroupName As String) Handles IMC.OnRenameGroupCompleted
Debug.WriteLine("Group Renamed from " & OldGroupName & " to " & NewGroupName)
End Sub