public void richTextBoxIncoming_DoubleClick(object sender, EventArgs e) { ClearNullStr(richTextBoxIncoming); int fxIndex = richTextBoxIncoming.Lines[0].Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries).Length; var list = new PointPairList(); try { ZedGraphResult.GraphPane.CurveList["Исходная"].Color = Color.Green; } catch { ZedGraphHlp.DrawGraph(ZedGraphResult, "Исходная", list, Color.Red, checkBoxHaveDept.Checked); } ZedGraphResult.GraphPane.CurveList["Исходная"].Clear(); foreach (string line in richTextBoxIncoming.Lines) { string[] parts = line.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries); ZedGraphResult.GraphPane.CurveList["Исходная"].AddPoint(ConvertExt.ToDbl(parts[fxIndex - 1]), ConvertExt.ToDbl(parts[0])); } ZedGraphResult.AxisChange(); ZedGraphResult.Invalidate(); }