Example #1
0
        private void BckGWStati_DoWork(object sender, DoWorkEventArgs e)
        {
            //X86_64
            int           Suc            = 0;
            int           Building       = 0;
            int           Dis            = 0;
            int           scheduled      = 0;
            int           excluded       = 0;
            int           broken         = 0;
            int           failed         = 0;
            int           expansionerror = 0;
            StringBuilder XmlDt          = new StringBuilder();
            List <string> Result         = new List <string>();

            if (GrpBxX86_64.Visible)
            {
                XmlDt = BuildRepoArchResultStatus.GetBuildRepoArchResultStatus(LblDistro.Text,
                                                                               "x86_64");
                Result = ReadXml.GetAllAttrValueByName(XmlDt.ToString(), "code");
                foreach (string item in Result)
                {
                    //if(!VarGlobal.LessVerbose)Console.WriteLine(item);
                    switch (item)
                    {
                    case "succeeded":
                        Suc += 1;
                        break;

                    case "building":
                        Building += 1;
                        break;

                    case "disabled":
                        Dis += 1;
                        break;

                    case "scheduled":
                        scheduled += 1;
                        break;

                    case "excluded":
                        excluded += 1;
                        break;

                    case "broken":
                        broken += 1;
                        break;

                    case "failed":
                        failed += 1;
                        break;

                    case "expansion error":
                        expansionerror += 1;
                        break;

                    default:
                        break;
                    }
                }

                SetLblText(LblX86_64Suc, Suc.ToString());
                SetLblText(LblX86_64Build, Building.ToString());
                SetLblText(LblX86_64Dis, Dis.ToString());
                SetTxtBxText(TxtX86_64Other, FormatStatus(scheduled, excluded, broken, failed, expansionerror));
            }

            System.Threading.Thread.Sleep(500);

            //i586
            if (GrpBxI586.Visible)
            {
                Suc            = 0;
                Building       = 0;
                Dis            = 0;
                scheduled      = 0;
                excluded       = 0;
                broken         = 0;
                failed         = 0;
                expansionerror = 0;
                XmlDt          = BuildRepoArchResultStatus.GetBuildRepoArchResultStatus(LblDistro.Text,
                                                                                        "i586");
                Result = new List <string>();
                Result = ReadXml.GetAllAttrValueByName(XmlDt.ToString(), "code");
                foreach (string item in Result)
                {
                    switch (item)
                    {
                    case "succeeded":
                        Suc += 1;
                        break;

                    case "building":
                        Building += 1;
                        break;

                    case "disabled":
                        Dis += 1;
                        break;

                    case "scheduled":
                        scheduled += 1;
                        break;

                    case "excluded":
                        excluded += 1;
                        break;

                    case "broken":
                        broken += 1;
                        break;

                    case "failed":
                        failed += 1;
                        break;

                    case "expansion error":
                        expansionerror += 1;
                        break;

                    default:
                        break;
                    }
                }

                SetLblText(Lbli586Suc, Suc.ToString());
                SetLblText(Lbli586Build, Building.ToString());
                SetLblText(Lbli586Dis, Dis.ToString());
                SetTxtBxText(Txti586Other, FormatStatus(scheduled, excluded, broken, failed, expansionerror));
            }
        }