Hi I have written a program in WPF C# to scan for robot controllers, display their data then start and stop running when the specific button is pressed.
I can scan and display the information but when I double click on the listview item, its information is not assigned to controller.
private void listView1_DoubleClick(object sender, MouseButtonEventArgs e)
{
ListViewItem item = sender as ListViewItem; //this.listView1.SelectedItems[0];
if (item != null)
{
ControllerInfo controllerInfo = (ControllerInfo)item.Tag;
if (controllerInfo.Availability == Availability.Available)
{
if (controllerInfo.IsVirtual)
{
this.controller = ControllerFactory.CreateFrom(controllerInfo);
this.controller.Logon(UserInfo.DefaultUser);
listView1.Items.Clear();
listView1.Items.Add(item);
EnableControllerFunctionality();
}
thanks