Beispiel #1
0
 public void Save(IniFile af, Int32 iRowKey)
 {
     foreach (short ColKey in Owner.Columns.ColKeys) // for each column
     {
         CColumn c = Owner.Columns[ColKey];
         af["R" + iRowKey.toString()][c.Name] = Owner.Rows[iRowKey][c.Name].Value; // lookup value from file
     }
 }
Beispiel #2
0
 public CColumn Add(CColumn column)
 {
     column.Owner = this;
     Nonce--;
     base[Nonce] = column;
     column.Key  = Nonce;
     ColKeys     = Keys.OrderByDescending(x => x);
     return((CColumn)column);
 }
Beispiel #3
0
 public CRow(CRows aOwner) : base()
 {
     Owner = aOwner;
     foreach (short key in Owner.Cols.ColKeys)
     {
         CColumn aCol   = Owner.Cols[key];
         CField  aField = Add(new CField(this, aCol, ""));
     }
 }
Beispiel #4
0
        public CColumn First()
        {
            CColumn c = null;

            if (Keys.Count > 0)
            {
                short k = base.Keys.OrderBy(x => x).First();
                c = (CColumn)this[k];
            }
            return(c);
        }
Beispiel #5
0
        public CRow Load(IniFile af, Int32 iRowKey)
        {
            CRow r = Add(new CRow(this));

            foreach (short ColKey in Owner.Columns.ColKeys) // for each column
            {
                CColumn c = Owner.Columns[ColKey];
                Owner.Rows[r.Key][c.Name].Value = af["R" + iRowKey.toString()][c.Name].toString(); // lookup value from file
            }
            return(r);
        }
Beispiel #6
0
 public CField(CRow aRow, CColumn aCol, string aValue) : base()
 {
     Owner  = aRow;
     Column = aCol;
     Value  = aValue;
 }