private void toolStripNewFile_Click(object sender, EventArgs e) { StaticFileUploadInput staticFileUploadInput = new StaticFileUploadInput(); staticFileUploadInput.inputAddOrRename = "ADD"; staticFileUploadInput.inputFileOrFolder = "FILE"; staticFileUploadInput.inputCurrPath = localPath; staticFileUploadInput.Owner = this; staticFileUploadInput.ShowDialog(); LoadListViewByLocalPath(); }
private void menuItemNewFolder4Remote_Click(object sender, EventArgs e) { StaticFileUploadInput staticFileUploadInput = new StaticFileUploadInput(); staticFileUploadInput.inputCurrPath = remotePath; staticFileUploadInput.inputFileOrFolder = "FOLDER"; staticFileUploadInput.inputAddOrRename = "ADD"; staticFileUploadInput.inputOperaType = "REMOTE"; staticFileUploadInput.Owner = this; staticFileUploadInput.ShowDialog(); LoadListViewByRemotePath(); }
private void menuItemRename4Local_Click(object sender, EventArgs e) { Point listView4LocalPoint = listView4Local.PointToClient(tempPoint); ListViewItem selectedItem = listView4Local.GetItemAt(listView4LocalPoint.X, listView4LocalPoint.Y); string selectedItemText = selectedItem.Text; bool isFolder = Directory.Exists(Path.Combine(localPath, selectedItemText)); StaticFileUploadInput staticFileUploadInput = new StaticFileUploadInput(); staticFileUploadInput.inputAddOrRename = "RENAME"; staticFileUploadInput.inputFileOrFolder = isFolder ? "FOLDER" : "FILE"; staticFileUploadInput.inputOriName = selectedItemText; staticFileUploadInput.inputCurrPath = localPath; staticFileUploadInput.Owner = this; staticFileUploadInput.ShowDialog(); LoadListViewByLocalPath(); }