示例#1
0
        public void SaveState(string header, TConfig state)
        {
            int    nCol = ColumnCount;
            int    i;
            string buff;

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

                buff = String.Format("width{0}", i);
                state.PutInt(buff, w);
            }
        }
示例#2
0
        public void LoadState(string header, TConfig state)
        {
            int    nCols;
            int    i;
            int    w;
            string buff;

            if (!state.FindSection(header))
            {
                return;
            }
            state.GetInt(("nCols"), out nCols);
            for (i = 0; i < nCols; ++i)
            {
                buff = String.Format("width{0}", i);
                if (state.GetInt(buff, out w))
                {
                    SetColumnWidth(i, w);
                }
            }
        }
示例#3
0
        //
        //
        //

        void LoadState(string header, TConfig state)
        {
            int res;

            this.LoadState(header, state);
            if (state.GetInt(wxPorting.T("show_canceled"), out res))
            {
                GlobalVariables.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))
            {
                GlobalVariables.show_arrived = res != 0;
            }
        }