public Controller(ProblemDescription problem) { if (problem.Solver is HohmannSolver) { vm = new HohmannsEngine(117, problem.ScenarioNumber); } else if (problem.Solver is MeetAndGreetSolver) { vm = new MeetAndGreetEngine(117, problem.ScenarioNumber, problem.ScenarioNumber); } else if (problem.Solver is EccentricMeetAndGreetSolver) { vm = new EccentricMeetAndGreetEngine(117, problem.ScenarioNumber); } else { throw new ArgumentException("неизвестный солвер!"); } solverDriver = new Driver(problem.Solver); simulationThread = new Thread(Simulate) { Name = "Симулятор", IsBackground = true }; simulationThread.Start(); }
public Controller(ProblemDescription problem) { if (problem.Solver is HohmannSolver) vm = new HohmannsEngine(117, problem.ScenarioNumber); else if(problem.Solver is MeetAndGreetSolver) vm = new MeetAndGreetEngine(117, problem.ScenarioNumber, problem.ScenarioNumber); else if(problem.Solver is EccentricMeetAndGreetSolver) vm = new EccentricMeetAndGreetEngine(117, problem.ScenarioNumber); else throw new ArgumentException("неизвестный солвер!"); solverDriver = new Driver(problem.Solver); simulationThread = new Thread(Simulate) { Name = "Симулятор", IsBackground = true }; simulationThread.Start(); }