Esempio n. 1
0
        public static void Nest(IEnumerable <ProjectItem> items)
        {
            ItemSelector selector = new ItemSelector(items);

            if (!selector.ShowDialog().Value)
            {
                return;
            }

            foreach (ProjectItem item in items)
            {
                string      path   = item.FileNames[0];
                ProjectItem parent = item.DTE.Solution.FindProjectItem(selector.SelectedFile);
                if (parent == null)
                {
                    continue;
                }

                bool mayNeedAttributeSet = item.ContainingProject.IsKind(ProjectTypes.DOTNET_Core, ProjectTypes.UNIVERSAL_APP);
                if (mayNeedAttributeSet)
                {
                    SetDependentUpon(item, parent.Name);
                }
                else
                {
                    item.Remove();
                    parent.ProjectItems.AddFromFile(path);
                }
            }
        }
Esempio n. 2
0
        public static void Nest(IEnumerable<ProjectItem> items)
        {
            ItemSelector selector = new ItemSelector(items);

            if (!selector.ShowDialog().Value)
            {
              return;
            }

            foreach (ProjectItem item in items)
            {
                string path = item.FileNames[0];
                ProjectItem parent = item.DTE.Solution.FindProjectItem(selector.SelectedFile);
                if (parent == null) continue;

                bool mayNeedAttributeSet = item.ContainingProject.Kind.Equals(CordovaKind, System.StringComparison.OrdinalIgnoreCase);
                if (mayNeedAttributeSet)
                {
                    SetDependentUpon(item, parent.Name);
                }
                else
                {
                    item.Remove();
                    parent.ProjectItems.AddFromFile(path);
                }
            }
        }
        public static void Nest(IEnumerable <ProjectItem> items)
        {
            ItemSelector selector = new ItemSelector(items);

            if (!selector.ShowDialog().Value)
            {
                return;
            }

            foreach (ProjectItem item in items)
            {
                string      path   = item.FileNames[0];
                ProjectItem parent = item.DTE.Solution.FindProjectItem(selector.SelectedFile);
                if (parent == null)
                {
                    continue;
                }

                bool mayNeedAttributeSet = item.ContainingProject.Kind.Equals(CordovaKind, System.StringComparison.OrdinalIgnoreCase);
                if (mayNeedAttributeSet)
                {
                    SetDependentUpon(item, parent.Name);
                }
                else
                {
                    item.Remove();
                    parent.ProjectItems.AddFromFile(path);
                }
            }
        }
Esempio n. 4
0
        public static void Nest(IEnumerable<ProjectItem> items)
        {
            ItemSelector selector = new ItemSelector(items);

            if (!selector.ShowDialog().Value)
                return;

            foreach (ProjectItem item in items)
            {
                string path = item.Properties.Item("FullPath").Value.ToString();
                ProjectItem parent = item.DTE.Solution.FindProjectItem(selector.SelectedFile);

                if (parent != null)
                    parent.ProjectItems.AddFromFile(path);
            }
        }
Esempio n. 5
0
        public static void Nest(IEnumerable <ProjectItem> items)
        {
            ItemSelector selector = new ItemSelector(items);

            if (!selector.ShowDialog().Value)
            {
                return;
            }

            foreach (ProjectItem item in items)
            {
                string      path   = item.FileNames[0];
                ProjectItem parent = item.DTE.Solution.FindProjectItem(selector.SelectedFile);

                if (parent != null)
                {
                    parent.ProjectItems.AddFromFile(path);
                }
            }
        }
Esempio n. 6
0
        public static void Nest(IEnumerable<ProjectItem> items)
        {
            ItemSelector selector = new ItemSelector(items);

            if (!selector.ShowDialog().Value)
                return;

            foreach (ProjectItem item in items)
            {
                string path = item.FileNames[0];
                ProjectItem parent = item.DTE.Solution.FindProjectItem(selector.SelectedFile);
                if (parent == null) continue;

                bool mayNeedAttributeSet = item.ContainingProject.Kind == CordovaKind;
                if (mayNeedAttributeSet)
                {
                    SetDependentUpon(item, parent.Name);
                }
                else
                {
                    parent.ProjectItems.AddFromFile(path);
                }
            }
        }