Пример #1
0
        /// <summary>
        /// baraye enteghale file ha az pc va upliad ruye device
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void uploadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (Clipboard.GetFileDropList().Count != 0)
            {
                if (IsTransfer)
                {
                    MessageBox.Show("Please Wait For Last Proccess And Then Try Agin...", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
                List <string> fdList = new List <string>();
                foreach (string item in Clipboard.GetFileDropList())
                {
                    fdList.Add(item);
                }
                TransferForm transferform = new TransferForm(TransferType.Uploading, fdList, currentPath, device);
                IsTransfer = true;
                transferform.Show();

                transferform.FormClosed += Transferform_FormClosed;
            }
        }
Пример #2
0
        /// <summary>
        /// file hayi ke select shode backup gerefte mishavad...
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void backupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listView_files.SelectedItems.Count > 0)
            {
                if (IsTransfer)
                {
                    MessageBox.Show("Please Wait For Last Proccess And Then Try Agin...", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
                List <ADBFile> listFilesTmp = new List <ADBFile>();
                foreach (ListViewItem item in listView_files.SelectedItems)
                {
                    listFilesTmp.Add(ReturnAdbFileFromLVSelectItem(item));
                }
                TransferForm transferform = new TransferForm(TransferType.BackingUp, listFilesTmp, backupPath, fm);
                IsTransfer = true;
                transferform.Show();

                transferform.FormClosed += Transferform_FormClosed;
                fileOrDirectoryForCopyCut.Clear();
            }
        }
Пример #3
0
        private void listView_files_DragDrop(object sender, DragEventArgs e)
        {
            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false);
            if (files.Length != 0)
            {
                if (IsTransfer)
                {
                    MessageBox.Show("Please Wait For Last Proccess And Then Try Agin...", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
                List <string> fdList = new List <string>();
                foreach (string item in files)
                {
                    fdList.Add(item);
                }
                TransferForm transferform = new TransferForm(TransferType.Uploading, fdList, currentPath, device);
                IsTransfer = true;
                transferform.Show();

                transferform.FormClosed += Transferform_FormClosed;
            }
        }