Skip to content

Commit

Permalink
Fixed quasar#398
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxXor committed Sep 17, 2015
1 parent 9bc2b34 commit 9d88eb6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Server/Forms/FrmFileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
Expand Down

0 comments on commit 9d88eb6

Please sign in to comment.