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); } } }
// // // public override void LoadState(String header, TConfig state) { int res; base.LoadState(header, state); if (state.GetInt(wxPorting.T("show_canceled"), out res)) { Globals.show_canceled = res != 0; } if (state.GetInt(wxPorting.T("track_first"), out res)) { m_bTrackFirst = res != 0; } if (state.GetInt(wxPorting.T("track_last"), out res)) { m_bTrackLast = res != 0; } if (state.GetInt(wxPorting.T("show_arrived"), out res)) { Globals.show_arrived = res != 0; } }
public void LoadState(String header, TConfig state) { String ttheader; String tabhdr; int nTabs; int nt; ttheader = String.Format(wxPorting.T("%s-%s"), header, m_name); state.PushSection(ttheader); state.GetInt(wxPorting.T("nPages"), out nTabs); for (nt = 0; nt < nTabs; ++nt) { tabhdr = String.Format(wxPorting.T("%s-%s-%d"), header, m_name, nt); String name = ""; ReportBase pReport; if (!state.PushSection(tabhdr)) { continue; } state.GetString(wxPorting.T("type"), out name); if (name == wxPorting.T("timetable")) { // state.GetString(wxPorting.T("name"), name); name = wxPorting.T("Schedule"); // TimeTableView *pTimeTable = Globals.traindir.m_frame.m_timeTableManager.GetNewTimeTableView(this, name); // pReport = pTimeTable; pReport = Globals.traindir.m_frame.m_timeTable; // } else if(name == wxPorting.T("itinerary")) { // state.GetString(wxPorting.T("name"), name); // ItineraryView *pItinerary = Globals.traindir.m_frame.m_itineraryView; // pReport = pItinerary; } else if (name == wxPorting.T("alerts")) { // state.GetString(wxPorting.T("name"), name); name = wxPorting.T("Alerts"); pReport = Globals.traindir.m_frame.m_alertList; } else if (name == wxPorting.T("traininfo")) { // state.GetString(wxPorting.T("name"), name); name = wxPorting.T("Train Info"); pReport = Globals.traindir.m_frame.m_trainInfo; } else { continue; } if (FindPage(pReport) < 0) { AddPage(pReport, wxPorting.LV(name), false, -1); } String name1; name1 = String.Format(wxPorting.T("%s-%s"), ttheader, name); pReport.LoadState(tabhdr, state); state.PopSection(); } state.PopSection(); }