private void button_readAndCompare_Click(object sender, EventArgs e) { var path1 = this.fileOpenControl1.FilePath; FcbFileReader reader = new FcbFileReader(path1); FcbFile FcbFile = reader.Read(); this.bindingSource1.DataSource = FcbFile.FcbInfos; var path2 = this.fileOpenControl2.FilePath; FcbFileReader reader2 = new FcbFileReader(path2); FcbFile FcbFile2 = reader2.Read(); this.bindingSource2.DataSource = FcbFile2.FcbInfos; FcbFile newFile = new FcbFile(); //foreach (var item in FcbFile) //{ // var item2 = FcbFile2.GetFcbValue( item.Prn, item.Time); // if(item2 ==null){continue;} // var newVal = item.Value - item2.Value; // var newRms = item.Rms - item2.Rms; // var newItem = new FcbValue(item.Prn, item.Time,newVal,newRms); // newFile.FcbInfos.Add(newItem); //} this.bindingSource3.DataSource = newFile.FcbInfos; }
private void button_read_Click(object sender, EventArgs e) { var path = this.fileOpenControl1.FilePath; FcbFileReader reader = new FcbFileReader(path); FcbFile = reader.Read(); this.bindingSource1.DataSource = FcbFile.FcbInfos; var wl = FcbFile.Header.WideLaneValue; if (wl != null) { List <FcbValue> newFile = new List <FcbValue>(); foreach (var item in wl.Data) { var newItem = new FcbValue(item.Key, wl.Time, item.Value.Value, item.Value.Rms); newFile.Add(newItem); } this.bindingSource2.DataSource = newFile; } }