Пример #1
0
        private void OnProjectAdded(Project project)
        {
            Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();

            P4Operations.EditFile(m_plugin.App.Solution.FullName, false);
            P4Operations.AddFile(project.FullName);
            // TODO: [jt] We should if the operation is not a add new project but rather a add existing project
            //       step through all the project items and add them to perforce. Or maybe we want the user
            //       to do this herself?
        }
Пример #2
0
        private void OnItemAdded(ProjectItem item)
        {
            Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();

            P4Operations.EditFile(item.ContainingProject.FullName, false);

            if (item.ProjectItems != null)
            {
                for (int i = 0; i < item.FileCount; i++)
                {
                    string name = item.get_FileNames((short)i);
                    P4Operations.AddFile(name);
                }
            }
            else
            {
                if (System.IO.File.Exists(item.Name))
                {
                    P4Operations.AddFile(item.Name);
                }
            }
        }