Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 private void buttonClearAll_Click(object sender, EventArgs e)
 {
     textBoxPopulationSize.Enabled = true;
     progressBar1.Value            = 0;
     ZedGraphResult.GraphPane.CurveList.Clear();
     ZedGraphResult.GraphPane.GraphObjList.Clear();
     ZedGraphResult.Invalidate();
     zedGraphIterations.GraphPane.CurveList.Clear();
     zedGraphIterations.GraphPane.GraphObjList.Clear();
     zedGraphIterations.Invalidate();
     richTextBoxIncoming.Text = "";
     richTextBoxResolve.Text  = "";
     SelectionManager         = null;
 }