Пример #1
0
        private async Task ProjectItemsEvents_ItemRenamedAsync(AfterRenameProjectItemEventArgs obj)
        {
            var options = await OptionsHelper.GetOptions();

            if (!options.OnItemRenamedRenameInSVN)
            {
                return;
            }

            for (var i = 0; i < obj.ProjectItemRenames.Length - 1; i++)
            {
                var newPath = obj.ProjectItemRenames[i].SolutionItem.FullPath;
                var oldPath = obj.ProjectItemRenames[i].OldName;

                // Temporarily rename the new file to the old file
                File.Move(newPath, oldPath);

                // So that we can svn rename it properly
                await CommandHelper.StartProcess(FileHelper.GetSvnExec(), $"mv {oldPath} {newPath}");
            }
        }
Пример #2
0
        private void ProjectItemsEvents_AfterRenameProjectItems(AfterRenameProjectItemEventArgs obj)
        {
            string info = string.Join(",", obj.ProjectItemRenames.Select(x => $"{x.SolutionItem.Name}:{x.OldName}"));

            VS.MessageBox.ShowConfirm(info);
        }
Пример #3
0
 private void ProjectItemsEvents_AfterRenameProjectItems(AfterRenameProjectItemEventArgs obj)
 {
     ProjectItemsEvents_ItemRenamedAsync(obj).FireAndForget();
 }