Ejemplo n.º 1
0
        public void onConnectHandler(object sender, ConnectEventArgs args)
        {
            AppendTextBox("Device connected (Callback " + args.GetHashCode() + ")");
            AppendTextBox("");
            if (iDevice.Exists("/usr/libexec/afc2d"))
            {
                // Continue...
                bool         AFC2_installed = iDevice.Exists("/usr/libexec/afc2d");
                DialogResult dr             = MessageBox.Show("A new device connected.\nName: " + iDevice.GetDeviceName + "\niOS: " + iDevice.GetDeviceVersion + "\nJailbroken: " + iDevice.IsJailbreak + "\nAFC2 installed: " + AFC2_installed + "\nDo you want to edit the hosts file?", "New device!", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                switch (dr)
                {
                case DialogResult.Yes:
                    HostsForm hf = new HostsForm();
                    hf.gimmedatdevice(iDevice);
                    hf.ShowDialog();
                    break;

                default:
                    // ?
                    break;
                }
            }
            else
            {
                MessageBox.Show("AFC2 is required to continue! \nYou can download it at Cydia. \nSearch \"Apple File Conduit 2\"", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 2
0
        public void onConnectHandler(object sender, ConnectEventArgs args)
        {
            AppendTextBox("Device connected (Callback " + args.GetHashCode() + ")");
            AppendTextBox("");
            if (iDevice.Exists("/usr/libexec/afc2d"))
            {
                // Continue...
                    bool AFC2_installed = iDevice.Exists("/usr/libexec/afc2d");
                    DialogResult dr = MessageBox.Show("A new device connected.\nName: " + iDevice.GetDeviceName + "\niOS: " + iDevice.GetDeviceVersion + "\nJailbroken: " + iDevice.IsJailbreak + "\nAFC2 installed: " + AFC2_installed + "\nDo you want to edit the hosts file?", "New device!", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    switch (dr)
                    {
                        case DialogResult.Yes:
                              HostsForm hf = new HostsForm();
                              hf.gimmedatdevice(iDevice);
                              hf.ShowDialog();
                              break;
                        default:
                              // ?
                              break;
                    }

            }
            else
            {
                MessageBox.Show("AFC2 is required to continue! \nYou can download it at Cydia. \nSearch \"Apple File Conduit 2\"", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }