コード例 #1
0
        private void SetupSupportInfo(SupportInfo[] info, string name)
        {
            bool inUse = false;

            bool has09Support = true;
            bool has10Support = true;
            bool has11Support = true;
            bool has12Support = true;
            bool has14Support = true;
            bool has15Support = true;

            foreach (XElement item in _report.Element("Document").Element("Assembly").Element("Classes").Elements("Class"))
            {

                var supportNodes = (from a in item.Descendants("SupportByLibrary")
                                    where a.Attribute("Api").Value.Equals(name, StringComparison.InvariantCultureIgnoreCase)
                                    select a);
                
                if ((null == supportNodes) || (supportNodes.Count() == 0))
                    continue;

                inUse = true;

                foreach (XElement typeNodeItem in supportNodes)
                {
                    bool find09Support = IncludesVersion(typeNodeItem, "9");
                    bool find10Support = IncludesVersion(typeNodeItem, "10");
                    bool find11Support = IncludesVersion(typeNodeItem, "11");
                    bool find12Support = IncludesVersion(typeNodeItem, "12");
                    bool find14Support = IncludesVersion(typeNodeItem, "14");
                    bool find15Support = IncludesVersion(typeNodeItem, "15");

                    if (!find09Support)
                        has09Support = false;
                    if (!find10Support)
                        has10Support = false;
                    if (!find11Support)
                        has11Support = false;
                    if (!find12Support)
                        has12Support = false;
                    if (!find14Support)
                        has14Support = false;
                    if (!find15Support)
                        has15Support = false;
                }
            }

            if (inUse)
            {
                info[0] = new SupportInfo(BoolToSupportVersion(has09Support), name, 9);
                info[1] = new SupportInfo(BoolToSupportVersion(has10Support), name, 10);
                info[2] = new SupportInfo(BoolToSupportVersion(has11Support), name, 11);
                info[3] = new SupportInfo(BoolToSupportVersion(has12Support), name, 12);
                info[4] = new SupportInfo(BoolToSupportVersion(has14Support), name, 14);
                info[5] = new SupportInfo(BoolToSupportVersion(has15Support), name, 15);
            }
            else
            {
                info[0] = new SupportInfo(SupportVersion.NotUse, name, 9);
                info[1] = new SupportInfo(SupportVersion.NotUse, name, 10);
                info[2] = new SupportInfo(SupportVersion.NotUse, name, 11);
                info[3] = new SupportInfo(SupportVersion.NotUse, name, 12);
                info[4] = new SupportInfo(SupportVersion.NotUse, name, 14);
                info[5] = new SupportInfo(SupportVersion.NotUse, name, 15);
            }
        }
コード例 #2
0
        private void SetupSupportInfo(SupportInfo[] info, string name)
        {
            bool inUse = false;

            bool has09Support = true;
            bool has10Support = true;
            bool has11Support = true;
            bool has12Support = true;
            bool has14Support = true;
            bool has15Support = true;

            foreach (XElement item in _report.Element("Document").Element("Assembly").Element("Classes").Elements("Class"))
            {
                var supportNodes = (from a in item.Descendants("SupportByLibrary")
                                    where a.Attribute("Api").Value.Equals(name, StringComparison.InvariantCultureIgnoreCase)
                                    select a);

                if ((null == supportNodes) || (supportNodes.Count() == 0))
                {
                    continue;
                }

                inUse = true;

                foreach (XElement typeNodeItem in supportNodes)
                {
                    bool find09Support = IncludesVersion(typeNodeItem, "9");
                    bool find10Support = IncludesVersion(typeNodeItem, "10");
                    bool find11Support = IncludesVersion(typeNodeItem, "11");
                    bool find12Support = IncludesVersion(typeNodeItem, "12");
                    bool find14Support = IncludesVersion(typeNodeItem, "14");
                    bool find15Support = IncludesVersion(typeNodeItem, "15");

                    if (!find09Support)
                    {
                        has09Support = false;
                    }
                    if (!find10Support)
                    {
                        has10Support = false;
                    }
                    if (!find11Support)
                    {
                        has11Support = false;
                    }
                    if (!find12Support)
                    {
                        has12Support = false;
                    }
                    if (!find14Support)
                    {
                        has14Support = false;
                    }
                    if (!find15Support)
                    {
                        has15Support = false;
                    }
                }
            }

            if (inUse)
            {
                info[0] = new SupportInfo(BoolToSupportVersion(has09Support), name, 9);
                info[1] = new SupportInfo(BoolToSupportVersion(has10Support), name, 10);
                info[2] = new SupportInfo(BoolToSupportVersion(has11Support), name, 11);
                info[3] = new SupportInfo(BoolToSupportVersion(has12Support), name, 12);
                info[4] = new SupportInfo(BoolToSupportVersion(has14Support), name, 14);
                info[5] = new SupportInfo(BoolToSupportVersion(has15Support), name, 15);
            }
            else
            {
                info[0] = new SupportInfo(SupportVersion.NotUse, name, 9);
                info[1] = new SupportInfo(SupportVersion.NotUse, name, 10);
                info[2] = new SupportInfo(SupportVersion.NotUse, name, 11);
                info[3] = new SupportInfo(SupportVersion.NotUse, name, 12);
                info[4] = new SupportInfo(SupportVersion.NotUse, name, 14);
                info[5] = new SupportInfo(SupportVersion.NotUse, name, 15);
            }
        }
コード例 #3
0
        private void SetupVersionInfo(SupportInfo[] info, string name)
        {
            PictureBox box09 = tableLayoutResult.Controls["pictureBox" + name + "09"] as PictureBox;
            PictureBox box10 = tableLayoutResult.Controls["pictureBox" + name + "10"] as PictureBox;
            PictureBox box11 = tableLayoutResult.Controls["pictureBox" + name + "11"] as PictureBox;
            PictureBox box12 = tableLayoutResult.Controls["pictureBox" + name + "12"] as PictureBox;
            PictureBox box14 = tableLayoutResult.Controls["pictureBox" + name + "14"] as PictureBox;
            PictureBox box15 = tableLayoutResult.Controls["pictureBox" + name + "15"] as PictureBox;

            if (name != "Project" && name != "Visio")
            { 
                SetImage(box09, info[0].Support);
                SetImage(box10, info[1].Support);
            }
            SetImage(box11, info[2].Support);
            SetImage(box12, info[3].Support);
            SetImage(box14, info[4].Support);
            SetImage(box15, info[5].Support);
        }