Ejemplo n.º 1
0
        public LightweightRow GetHeaders()
        {
            LightweightRow ret = new LightweightRow();

            ret.Cells.Add(new PlaintextCell("Тест №"));
            ret.Cells.Add(new PlaintextCell("Максимальное время"));
            ret.Cells.Add(new PlaintextCell("Максимальная память"));

            return(ret);
        }
        static HtmlTableRow CreateHtmlRow(LightweightRow row, string cssClass)
        {
            HtmlTableRow ret = new HtmlTableRow();

            ret.Style.Add("class", cssClass);

            foreach (LightweightCell cell in row)
            {
                HtmlTableCell htmlCell = new HtmlTableCell();
                htmlCell.InnerHtml = CellToHtml(cell);
                htmlCell.ColSpan   = cell.ColSpan;
                ret.Cells.Add(htmlCell);
            }

            return(ret);
        }
Ejemplo n.º 3
0
        public LightweightRow GetInformation(int submissionID)
        {
            if (cache.GetSubmissionInfo(submissionID) == null)
            {
                cache.AddSubmissionInfo(submissionID);
            }

            ICPCSubmissionInfo info = cache.GetSubmissionInfo(submissionID);
            LightweightRow     ret  = new LightweightRow();

            ret.Cells.Add(new PlaintextCell(info.StopTest > 0 ? info.StopTest.ToString() : string.Empty));
            ret.Cells.Add(new PlaintextCell(Math.Round(info.MaxTime / 1000.0, 4) + " сек"));
            ret.Cells.Add(new PlaintextCell(info.MaxMemory / 1024 + " КБ"));

            return(ret);
        }