コード例 #1
0
        public void NotifyGlyphsChanged()
        {
            if (ExcludedFromScc || DontAddToProjectWindow)
            {
                return;
            }

            try
            {
                if (!PerNodeGlyphChange)
                {
                    SccProject.SccGlyphChanged(0, null, null, null);
                }
                else
                {
                    ForceGlyphChanges();
                }
            }
            catch { }
        }
コード例 #2
0
        internal void ForceGlyphChanges()
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            uint[]   idsArray;
            string[] namesArray;
            {
                List <uint>   ids   = new List <uint>(_files.Count);
                List <string> names = new List <string>(_files.Count);

                foreach (SccProjectFileReference r in _files)
                {
                    uint id = r.ProjectItemId;
                    if (id == VSItemId.Nil)
                    {
                        continue;
                    }

                    string name = r.ProjectFile.FullPath;
                    if (string.IsNullOrEmpty(name))
                    {
                        continue;
                    }

                    ids.Add(id);
                    names.Add(name);
                }
                idsArray   = ids.ToArray();
                namesArray = names.ToArray();
            }

            VsStateIcon[] newGlyphs = new VsStateIcon[idsArray.Length];
            uint[]        sccState  = new uint[idsArray.Length];

            if (VSErr.Succeeded(Map.GetSccGlyph(namesArray, newGlyphs, sccState)))
            {
                SccProject.SccGlyphChanged(idsArray.Length, idsArray, newGlyphs, sccState);
            }
        }