static void MoveFile(string fileName) { MoveDialog dialog = new MoveDialog(fileName); if (dialog.ShowDialog() != DialogResult.OK) return; Dictionary<string, string> oldPathToNewPath = new Dictionary<string, string>(); foreach (string file in dialog.MovingFiles) { oldPathToNewPath[file] = dialog.SelectedDirectory; } MovingHelper.AddToQueue(oldPathToNewPath, true, false, dialog.FixPackages); }
/// <summary> /// Invoked when the user selects the "Move" command /// </summary> static void MoveClicked(object sender, EventArgs e) { MoveDialog dialog = new MoveDialog(PluginBase.MainForm.CurrentDocument.FileName); if (dialog.ShowDialog() != DialogResult.OK) return; Dictionary<string, string> oldPathToNewPath = new Dictionary<string, string>(); foreach (string file in dialog.MovingFiles) { oldPathToNewPath[file] = dialog.SelectedDirectory; } MovingHelper.AddToQueue(oldPathToNewPath, true, false, dialog.FixPackages); }