Ejemplo n.º 1
0
        private void removeDriverFromDevice_Click(object sender, EventArgs e)
        {
            int i = listOfDrivers.SelectedIndex;
            int j = listOfDevices.SelectedIndex;

            if (i == -1 || j == -1)
            {
                return;
            }
            else
            {
                int index1 = listOfDevices.SelectedIndex;

                string value = listOfDrivers.SelectedItem.ToString();

                string[] separators = { ",", " " };
                string[] words      = value.Split(separators, StringSplitOptions.RemoveEmptyEntries);
                string   name       = words[0];
                string   type       = words[1];

                controller.RemoveDriverFromDevice(index1, name, type);
            }
        }