private void saveDifferenceToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog odf = new SaveFileDialog(); odf.Filter = "(*.dcf)|*.dcf"; if (odf.ShowDialog() == DialogResult.OK) { // System.IO.StreamWriter file = new System.IO.StreamWriter(odf.FileName); //file.WriteLine("Object\tSub Index\tName\tDefault\tCurrent\t"); foreach (ListViewItem lvi in listView1.Items) { string index = lvi.SubItems[0].Text; string sub = lvi.SubItems[1].Text; string name = lvi.SubItems[2].Text; sdocallbackhelper help = (sdocallbackhelper)lvi.Tag; string defaultstring = help.od.defaultvalue; string currentstring = help.od.actualvalue; UInt16 key = Convert.ToUInt16(index, 16); UInt16 subi = Convert.ToUInt16(sub, 16); if (subi == 0) { eds.ods[key].actualvalue = currentstring; } else { ODentry subod = eds.ods[key].Getsubobject(subi); if (subod != null) { subod.actualvalue = currentstring; } } // file.WriteLine(string.Format("{0}\t{1}\t{2}\t{3}\t{4}",index,sub,name,defaultstring,currentstring)); } eds.Savefile(odf.FileName, InfoSection.Filetype.File_DCF); //file.Close(); } }