Ejemplo n.º 1
0
        public void SaveState(String header, TConfig state)
        {
            int    i;
            int    pageCnt = 0;
            String ttheader;

            ttheader = String.Format(wxPorting.T("%s-%s"), header, m_name);
            state.StartSection(ttheader);
            state.PutInt(wxPorting.T("nPages"), PageCount);

            for (i = 0; i < PageCount; ++i)
            {
                Window pPage = GetPage(i);
                String type  = pPage.Name;

                ttheader = String.Format(wxPorting.T("%s-%s-%d"), header, m_name, pageCnt++);

                if (type == wxPorting.T("timetable") || type == wxPorting.T("itinerary") ||
                    type == wxPorting.T("alerts") || type == wxPorting.T("traininfo"))
                {
                    ReportBase pReport = (ReportBase)pPage;
                    pReport.SaveState(ttheader, state);
                }
            }
        }
Ejemplo n.º 2
0
        public virtual void SaveState(String header, TConfig state)
        {
            int    nCol = this.ColumnCount;
            int    i;
            String buff;

            state.StartSection(header);
            state.PutString(wxPorting.T("name"), m_name);
            state.PutString(wxPorting.T("type"), this.Name);
            state.PutInt(wxPorting.T("nCols"), nCol);
            for (i = 0; i < nCol; ++i)
            {
                int w = GetColumnWidth(i);

                buff = String.Format(wxPorting.T("width%d"), i);
                state.PutInt(buff, w);
            }
        }