mirror of https://github.com/quasar/Quasar.git
Fixed #398
This commit is contained in:
parent
9bc2b34012
commit
9d88eb6eb1
|
@ -240,24 +240,24 @@ private void renameToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
|
||||
private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (ListViewItem files in lstDirectory.SelectedItems)
|
||||
int count = lstDirectory.SelectedItems.Count;
|
||||
if (count == 0) return;
|
||||
if (MessageBox.Show(string.Format("Are you sure you want to delete {0} file(s)?", count),
|
||||
"Delete Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
PathType type = (PathType)files.Tag;
|
||||
|
||||
switch (type)
|
||||
foreach (ListViewItem files in lstDirectory.SelectedItems)
|
||||
{
|
||||
case PathType.Directory:
|
||||
case PathType.File:
|
||||
string path = GetAbsolutePath(files.SubItems[0].Text);
|
||||
string text = string.Format("Are you sure you want to delete this {0}?", type);
|
||||
PathType type = (PathType)files.Tag;
|
||||
|
||||
if (MessageBox.Show(text, "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) ==
|
||||
DialogResult.Yes)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case PathType.Directory:
|
||||
case PathType.File:
|
||||
string path = GetAbsolutePath(files.SubItems[0].Text);
|
||||
if (_connectClient != null)
|
||||
new Core.Packets.ServerPackets.DoPathDelete(path, type).Execute(_connectClient);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue