예제 #1
0
파일: Points.cs 프로젝트: Lewiohan/Cursov
 private void AddPoints(Phisics phisics)
 {
     for (double time = 0; time < phisics.time; time += phisics.time_interval)
     {
         listPoints.Add(new Points(time, phisics.q(time)));
     }
 }
예제 #2
0
        public List <DataGridViewRow> CreateTableRow(Phisics phisics, Settings settings)
        {
            List <DataGridViewRow> dataTable = new List <DataGridViewRow>();

            for (double t = 0; t < phisics.time; t += phisics.time_interval)
            {
                DataGridViewRow row = new DataGridViewRow();
                if (settings.time_Check)
                {
                    DataGridViewCell columnValue = new DataGridViewTextBoxCell();
                    columnValue.Value = t;
                    row.Cells.Add(columnValue);
                }
                if (settings.mass_Check)
                {
                    DataGridViewCell columnValue = new DataGridViewTextBoxCell();
                    columnValue.Value = phisics.m;
                    row.Cells.Add(columnValue);
                }
                if (settings.q_Check)
                {
                    DataGridViewCell columnValue = new DataGridViewTextBoxCell();
                    columnValue.Value = phisics.q(t);
                    row.Cells.Add(columnValue);
                }
                if (settings.dq0_Check)
                {
                    DataGridViewCell columnValue = new DataGridViewTextBoxCell();
                    columnValue.Value = phisics.dq0;
                    row.Cells.Add(columnValue);
                }
                if (settings.c_Check)
                {
                    DataGridViewCell columnValue = new DataGridViewTextBoxCell();
                    columnValue.Value = phisics.c;
                    row.Cells.Add(columnValue);
                }
                if (settings.w_Check)
                {
                    DataGridViewCell columnValue = new DataGridViewTextBoxCell();
                    columnValue.Value = phisics.w;
                    row.Cells.Add(columnValue);
                }
                if (settings.E_Check)
                {
                    DataGridViewCell columnValue = new DataGridViewTextBoxCell();
                    columnValue.Value = phisics.E;
                    row.Cells.Add(columnValue);
                }

                dataTable.Add(row);
            }

            return(dataTable);
        }
예제 #3
0
파일: Points.cs 프로젝트: Lewiohan/Cursov
 public List <Points> PointsList(Phisics phisics)
 {
     AddPoints(phisics);
     return(listPoints);
 }