private void loopVolume(int angles) { double volumeStart = Convert.ToDouble(volumeStartTextBox.Text.Replace('.', ',')); double volumeEnd = Convert.ToDouble(volumeEndTextBox.Text.Replace('.', ',')); double volumeStep = Convert.ToDouble(textBox6.Text.Replace('.', ',')); if (volumeStart > volumeEnd && volumeStep < 0) { for (double i = volumeStart; i >= volumeEnd; i = i + volumeStep) { cells.SetCellsV((FreeClass.body.GetV() * i) / 100); calculation(angles); } } else if (volumeStart <= volumeEnd && volumeStep > 0) { for (double i = volumeStart; i <= volumeEnd; i = i + volumeStep) { cells.SetCellsV((FreeClass.body.GetV() * i) / 100); calculation(angles); } } else if (volumeStep == 0) { cells.SetCellsV((FreeClass.body.GetV() * volumeStart) / 100); //cells.SetCellsV((FreeClass.body.GetV() * volumeStart) / 100); calculation(angles); } else { throw new Exception(); } }
private void loopVolume(NAngleEmprovedForm owner) { double volumeStart = owner.getvolumeStart(); double volumeEnd = owner.getvolumeEnd(); double volumeStep = owner.getvolumeStep(); if (volumeStart > volumeEnd && volumeStep < 0) { for (double i = volumeStart; i >= volumeEnd; i = i + volumeStep) { cells.SetCellsV((FreeClass.body.GetV() * i) / 100); loopDifflection(owner); } } else if (volumeStart <= volumeEnd && volumeStep > 0) { for (double i = volumeStart; i <= volumeEnd; i = i + volumeStep) { cells.SetCellsV((FreeClass.body.GetV() * i) / 100); loopDifflection(owner); } } else if (volumeStep == 0) { cells.SetCellsV((FreeClass.body.GetV() * volumeStart) / 100); loopDifflection(owner); } else { throw new Exception(); } }
private void cellsCalculate(AbstractAngle c, int columns) { c.SetColumnsNumber(columns); c.SetRowsNumber(columns); c.SetCellsHeight(Convert.ToDouble(textBox2.Text.Replace('.', ','))); c.SetAccuracy(Convert.ToInt16(textBox4.Text)); c.SetCellsV(FreeClass.body.GetV() * Convert.ToDouble(textBox3.Text.Replace('.', ',')) / 100); c.Calculation(); }