public FrmKartaEVCC(BaseParams baseParams) { _baseParams = baseParams; _kartaEvcc = new KartaEvcc(_baseParams); _kartaEvcc = new KartaEvcc(_baseParams); _kartaEvcc.ChangePerc += val => { if (InvokeRequired) { BeginInvoke(new Global.IntHandler(ChangePrBarVal), val); } else { ChangePrBarVal(val); } }; _kartaEvcc.ChangeText += val => MessageBox.Show(val); InitializeComponent(); }
private void listBoxEvcc_SelectedIndexChanged(object sender, EventArgs e) { double d = Convert.ToDouble(numericUpDownDEvcc.Value); KartaEvcc kartaEvcc = new KartaEvcc(new BaseParams(Path.Combine(_sds.GetPathByD(d), lBoxFile.Text))); kartaEvcc.DirPath = _sds.GetPathByD(d); kartaEvcc.CalcUclLcl(); chartKartaEvcc.Series[0].Points.Clear(); chartKartaEvcc.Series[1].Points.Clear(); chartKartaEvcc.Series[2].Points.Clear(); for (var t = 0; t < kartaEvcc.ArrEt.GetLength(0); t++) { chartKartaEvcc.Series[0].Points.AddXY(t + 1, kartaEvcc.Ucl[t]); chartKartaEvcc.Series[1].Points.AddXY(t + 1, kartaEvcc.Lcl[t]); chartKartaEvcc.Series[2].Points.AddXY(t + 1, kartaEvcc.ArrEt[t]); } Global.ShowArrayInDataGrid(kartaEvcc.ArrEt, dataGridViewKartaEvcc); }