示例#1
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);
            }
        }
示例#2
0
        public virtual void LoadState(String header, TConfig state)
        {
            int    nCols;
            int    i;
            int    w;
            String buff;

            if (!state.FindSection(header))
            {
                return;
            }
            state.GetInt(wxPorting.T("nCols"), out nCols);
            for (i = 0; i < nCols; ++i)
            {
                buff = String.Format(wxPorting.T("width%d"), i);
                if (state.GetInt(buff, out w))
                {
                    SetColumnWidth(i, w);
                }
            }
        }
示例#3
0
        public void SaveState(String header, TConfig state)
        {
            throw new NotImplementedException();
            //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);
            //  }
            //}
        }