using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace OTSExtremum { public partial class LmaxForm : Form { List parameters { get; set; } public LmaxForm(List come) { parameters = come; InitializeComponent(); } private void LmaxForm_Load(object sender, EventArgs e) { for (int i = 0; i < 11; i++) { int add_rowindex = dtgrid.Rows.Add(); dtgrid.Rows[add_rowindex].Cells[0].Value = parameters[0][i]; dtgrid.Rows[add_rowindex].Cells[1].Value = parameters[1][i]; dtgrid.Rows[add_rowindex].Cells[2].Value = Math.Round(parameters[2][i],3); dtgrid.Rows[add_rowindex].Cells[3].Value = Math.Round(parameters[3][i],2); } //画data for (int i = 0; i < parameters[0].Length; i++) { chart1.Series[0].Points.AddXY(Math.Round(parameters[3][i], 2), Math.Round(parameters[2][i], 3)); } } } }