private void mInsertWildOnClick(object sender, EventArgs ea) { //insert wildcard bool dbPro = false; if (exeType.Items[exeType.SelectedIndex].Equals("DbPro")) dbPro = true; insertWild iw = new insertWild(exeName.Text, dbPro); if (iw.ShowDialog() == DialogResult.OK) { //insert files Cursor.Current = Cursors.WaitCursor; contents.BeginUpdate(); string prefix, path; if (iw.MediaPrefix == true) prefix = "media\\"; else prefix = ""; path = iw.SelectedDirectory; if (iw.SelectedDirectory.EndsWith(Path.DirectorySeparatorChar.ToString()) == false) path += Path.DirectorySeparatorChar.ToString(); foreach (string str in iw.SelectedFiles) { InsertFile(path + str, prefix + str, false, false); } contents.EndUpdate(); Cursor.Current = Cursors.Default; } //enable menu items if (contents.Items.Count > 0) { contents.ContextMenu.MenuItems[MENU_SAVE].Enabled = true; contents.ContextMenu.MenuItems[MENU_TOOLS].MenuItems[MENU_DECOMPRESS].Enabled = true; contents.ContextMenu.MenuItems[MENU_TOOLS].MenuItems[MENU_COMPRESS].Enabled = true; } }
private void mInsertWildOnClick(object sender, EventArgs ea) { //insert wildcard bool dbPro = false; if (exeType.Items[exeType.SelectedIndex].Equals("DbPro")) dbPro = true; insertWild iw = new insertWild(exeName.Text, dbPro); if (iw.ShowDialog() == DialogResult.OK) { //insert files Cursor.Current = Cursors.WaitCursor; string prefix, path; if (iw.MediaPrefix == true) prefix = "media\\"; else prefix = ""; path = iw.SelectedDirectory; if (iw.SelectedDirectory.EndsWith(Path.DirectorySeparatorChar.ToString()) == false) path += Path.DirectorySeparatorChar.ToString(); foreach (string str in iw.SelectedFiles) { InsertFile(path + str, prefix + str, false, false); } Cursor.Current = Cursors.Default; } }