Пример #1
0
    private void update_log()
    {
        List <BuildLogVO> log = null;

        if (shipcheck.Checked == true)
        {
            var r = ServerRequestManager.instance.GetShipBuildLog();
            log = GameData.instance.GetShipBuildLogs();
        }
        else
        {
            var r = ServerRequestManager.instance.GetEquipBuildLog();
            log = GameData.instance.GetEquipBuildLogs();
        }

        GridPanel panel = recipelist.PrimaryGrid;

        panel.Rows.Clear();

        if (log == null)
        {
            return;
        }
        int i = 0;

        foreach (var l in log)
        {
            object[] vals = new object[9];

            vals[0] = getbuildtitle(l);
            vals[1] = getbuildstar(l);
            vals[2] = getbuildicon(l);
            vals[3] = l.res.oil;
            vals[4] = l.res.ammo;
            vals[5] = l.res.steel;
            vals[6] = l.res.aluminium;
            vals[7] = TimeFormatter.Get6DTimeFormat(l.createTime);
            vals[8] = "套用";

            GridRow gr = new GridRow(vals);
            gr.RowHeight = 64;

            panel.Rows.Add(gr);
            i++;
        }
    }