public static InputDataObject CheckInput(UserWindow uWindow) { var inpDObj = new InputDataObject(); var checkPassed = true; // Проверка геометрических параметров var geomVector = new GeometryVector(); geomVector.L = CheckTextBox(uWindow.lengthTextBox); if (geomVector.L == 0) checkPassed = false; geomVector.W = CheckTextBox(uWindow.widthTextBox); if (geomVector.W == 0) checkPassed = false; geomVector.H = CheckTextBox(uWindow.heightTextBox); if (geomVector.H == 0) checkPassed = false; // Добавление во входной объект inpDObj.GeometryVector = geomVector; // Проверка режимных параметров var modeVector = new ModeVector(); modeVector.Tu = CheckTextBox(uWindow.temperatureTextBox); if (modeVector.Tu == 0) checkPassed = false; modeVector.Vu = CheckTextBox(uWindow.velocityTextBox); if (modeVector.Vu == 0) checkPassed = false; // Добавление во входной объект inpDObj.ModeVector = modeVector; inpDObj.DiscretizationStep = CheckTextBox(uWindow.stepTextBox); if (inpDObj.DiscretizationStep == 0) checkPassed = false; return !checkPassed ? null : inpDObj; }
public void initProcessController() { uWindow = new UserWindow(); uWindow.Show(); processControllerCycleThread = new Thread(processControllerCycle); processControllerCycleThread.SetApartmentState(ApartmentState.STA); processControllerCycleThread.Start(); }