示例#1
0
文件: Form1.cs 项目: rajeshwarn/racer
        private void Form1_Load(object sender, EventArgs e)
        {
            GetAppList(1);
            GetAppList(2);
            GetPackList();
            AndoridDeviceManger.GetShareInstance().OnListDeviceChangeComplete += Form1_OnListDeviceChangeComplete;
            AndoridDeviceManger.GetShareInstance().ListDevice(true);
            if (IOSDeviceManger.GetShareInstance().CheckItunes())
            {
                if (!IOSDeviceManger.GetShareInstance().CheckVCRuntime())
                {
                    MessageBox.Show("VC++运行库未安装,请安装");
                    IOSDeviceManger.GetShareInstance().InstallVCRuntime();
                }

                if (IOSDeviceManger.GetShareInstance().StatrListenDeviceChange())
                {
                    IOSDeviceManger.GetShareInstance().OnIOSDeviceChangeComplete += Form1_OnIOSDeviceChangeComplete;
                }
                else
                {
                    MessageBox.Show("苹果监听服务启动失败");
                }
            }
            else
            {
                MessageBox.Show("iTunes未安装,请安装iTunes,安装完后请重启程序");
                Process.Start("explorer", "http://www.apple.com/cn/itunes/download/");
            }
        }
示例#2
0
 public static IOSDeviceManger GetShareInstance()
 {
     lock (lockHelper)
     {
         if (instance == null)
         {
             instance = new IOSDeviceManger();
         }
         return(instance);
     }
 }
示例#3
0
 public Devices(IOSDevice device, AppImageListPanel iosAppImageListPanel, string uid, string username)
 {
     InitializeComponent();
     this.uid                  = uid;
     this.username             = username;
     platform                  = Platform.IOS;
     this.iosDevice            = device;
     this.iosAppImageListPanel = iosAppImageListPanel;
     this.label1.Text          = device.Name;
     label2.Text               = "手机连接成功,请安装应用";
     IOSDeviceManger.GetShareInstance().OnInstallAppComplete += Devices_OnInstallAppComplete1;
     player = new System.Media.SoundPlayer(Config.GetShareInstance().GetValue("Wav"));
 }
示例#4
0
 public void InstallIOSApp(ImageApp[] apps)
 {
     if (imageButton1.Enabled)
     {
         if (apps.Length > 0)
         {
             imageButton1.Enabled = false;
             label2.Text          = "应用安装中,请稍后..";
             progressBar1.Maximum = apps.Length;
             progressBar1.Value   = 0;
             List <string> appList = new List <string>();
             foreach (ImageApp i in apps)
             {
                 appList.Add(i.appPath);
             }
             IOSDeviceManger.GetShareInstance().InstallApp(iosDevice.Device, appList.ToArray());
         }
     }
 }