コード例 #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);
            }
        }
コード例 #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);
            }
        }
コード例 #3
0
        protected void OnDisconnect(ConnectEventArgs args)
        {
            ConnectEventHandler disconnect = this.Disconnect;

            if (disconnect != null)
            {
                disconnect(this, args);
            }
        }
コード例 #4
0
        protected void OnConnect(ConnectEventArgs args)
        {
            ConnectEventHandler connect = this.Connect;

            if (connect != null)
            {
                connect(this, args);
            }
        }
コード例 #5
0
 protected void OnDisconnect(ConnectEventArgs args)
 {
     ConnectEventHandler disconnect = this.Disconnect;
     if (disconnect != null)
     {
         disconnect(this, args);
     }
 }
コード例 #6
0
 protected void OnConnect(ConnectEventArgs args)
 {
     ConnectEventHandler connect = this.Connect;
     if (connect != null)
     {
         connect(this, args);
     }
 }
コード例 #7
0
 public void onDisconnectHandler(object sender, ConnectEventArgs args)
 {
 }
コード例 #8
0
 public void onDisconnectHandler(object sender, ConnectEventArgs args)
 {
 }