private void button1_Click(object sender, EventArgs e) { libimobiledevice_dotnet.device_searcher searcher = new libimobiledevice_dotnet.device_searcher(); int number_of_devices; string[] list = searcher.get_device_list(out number_of_devices); if (number_of_devices > 0) { device = new libimobiledevice_dotnet.device(list[0]); if (device != null) { button1.Enabled = false; button2.Enabled = true; button3.Enabled = true; } } }
private void button1_Click(object sender, EventArgs e) { libimobiledevice_dotnet.device_searcher searcher = new libimobiledevice_dotnet.device_searcher(); int number_of_devices; string[] list = searcher.get_device_list(out number_of_devices); if(number_of_devices > 0) { device= new libimobiledevice_dotnet.device(list[0]); if (device != null) { button1.Enabled = false; button2.Enabled = true; button3.Enabled = true; } } }