public static MagFile Variations(MagFile Basa, double VarLev) { MagRecord buf; MagFile res = new MagFile(); if ((this.magRecordList[0].DT > Basa.magRecordList[0].DT) && (this.magRecordList[this.magRecordList.Count - 1].DT < Basa.magRecordList[Basa.magRecordList.Count - 1].DT)) { foreach (MagRecord lr in this.magRecordList) { int i = 0; MagRecord lb; while (((lb = Basa.magRecordList[i]).DT < lr.DT) && (i < Basa.magRecordList.Count)) { i++; } lr.Data = lr.Data - VarLev + lb.Data - VarLev; res.magRecordList.Add(lr); } } else { throw new Exception("Ну пизда короч"); } return(res); }
private void openFileDialog2_FileOk(object sender, CancelEventArgs e) { try { MVR = new MagFile(openFileDialog2.FileName, keyf); } catch (Exception ex) { MessageBox.Show("ОШИБКА " + ex.Message); } }
private void button5_Click(object sender, EventArgs e) { VAR = MagFile.Variations(MFV, 20000); VAR.DrawData(zedGraphControl3); }