public PMForm(DeviceData device) { InitializeComponent(); TotalPackage = c = 0; MyPackages = new List <KeyValuePair <string, string> >(); PackagesTempFiles = new List <FileInfo>(); Device = device; am = new ApkManager(Device); packageKeys = new Stack <string>(); RefreshDataGridView(); ClosedForm = false; }
private void panel_upLeftSide_DragDrop(object sender, DragEventArgs e) { if (backgroundWorker_installApk.IsBusy) { panel_upLeftSide.BackColor = Color.LightSteelBlue; MessageBox.Show("Please Wait,Another Packages are installing...", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } else { panel_upLeftSide.BackgroundImage = AndroidManager_SHW.Properties.Resources.walpapernew6; } if (currentDevice == null) { return; } string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false); listTmpApks = new List <FileInfo>(); AM = new ApkManager(currentDevice); foreach (string itemFile in files) { if ((new FileInfo(itemFile).Extension.ToLower() == ".apk")) { FileInfo fi = new FileInfo(itemFile); listTmpApks.Add(fi); } } if (listTmpApks.Count == 0) { return; } lastLableState = label_state.Text; panel_downLeftSide.BackColor = Color.SkyBlue; panel_upLeftSide.BackgroundImage = null; panel_upLeftSide.BackColor = Color.LightSteelBlue; pictureBox_onMobileState.Image = AndroidManager_SHW.Properties.Resources.installing; pictureBox_onMobileState.Visible = true; label_state.Text = "installing Package..."; backgroundWorker_installApk.RunWorkerAsync(); }