public configRecord LoadItem(string name) { configRecord record = new configRecord(); record.SrcID = ini.ReadString(name, "SrcID", ""); record.SrcAddr = ini.ReadString(name, "SrcAddr", ""); record.DstID = ini.ReadString(name, "DstID", ""); record.DstAddr = ini.ReadString(name, "DstAddr", ""); record.OpType = ini.ReadString(name, "OpType", ""); record.Cmd = ini.ReadString(name, "Cmd", ""); record.Data = ini.ReadString(name, "Data", ""); //record.RepeatCount = int.Parse(ini.ReadString(name, "RepeatCount", "")); return record; }
public void SaveItem(string name, configRecord value) { ini.WriteString(name, "SrcID", value.SrcID); ini.WriteString(name, "SrcAddr", value.SrcAddr); ini.WriteString(name, "DstID", value.DstID); ini.WriteString(name, "DstAddr", value.DstAddr); ini.WriteString(name, "OpType", value.OpType); ini.WriteString(name, "Cmd", value.Cmd); ini.WriteString(name, "Data", value.Data); //ini.WriteString(name, "RepeatCount", value.RepeatCount.ToString()); }
private configRecord GetCurRecord() { configRecord record = new configRecord(); record.SrcID = txtSrcID.Text.Trim(); record.SrcAddr = txtSrcAddr.Text.Trim(); record.DstID = txtDstID.Text.Trim(); record.DstAddr = txtDstAddr.Text.Trim(); record.OpType = txtType.Text.Trim(); record.Cmd = txtCmd.Text.Trim(); record.Data = txtData.Text.Trim(); //record.RepeatCount = (int)numCount.Value; return record; }