private void HostsForm_Shown(object sender, EventArgs e) { int count = 0; this.deviceName.Text = iDevice.GetDeviceName; this.iOSVersion.Text = iDevice.GetDeviceVersion; this.cpuArch.Text = iDevice.GetCPUArchitecture; try { foreach (var folder in iDevice.GetDirectories("/var/mobile/Containers/Bundle/Application")) { count++; } if (count != 0) { this.installedApps.Text = count.ToString(); } } catch (Exception foldersNotFound) { MessageBox.Show("Failed to retrieve application path,\nyou're under iOS 8.\nThis will be optimized in in the future.", "Hmm.", MessageBoxButtons.OK, MessageBoxIcon.Warning); } string deviceType = iDevice.GetProductType.Remove(iDevice.GetProductType.Length - 3); switch (deviceType) { case "iPad": this.iPadPicture.Visible = true; break; case "iPhone": this.iPhonePicture.Visible = true; break; case "iPod": this.iPodPicture.Visible = true; break; } hostsBox.AppendText(iPhoneFileHelper.ReadFromDevice(iDevice, "/etc/hosts") + Environment.NewLine); }