public void Run(string[] args) { _view.PrintTitleText(MessagesResources.ApplicationName); try { _inboxParams = new MainParamValidator(args).GetMainParameters(); } catch (Exception ex) { _view.PrintErrorText(ex.Message); return; } if (_inboxParams.WorkMode == WorkMode.HelpMode) { _view.PrintInstructionText(MessagesResources.Instruction); } do { _triangles = new List <IFigure>(); do { try { _view.AskInputTriangle(MessagesResources.AskInputTriangle); } catch (Exception ex) { _view.PrintErrorText(ex.Message); } _view.AskAddTrianglesFlag(MessagesResources.AskAddTriangle); } while (_addNextTriangleFlag); _triangles.Sort(new TriangleComparerByAreaDesc()); _view.PrintResult(_triangles); _view.AskContinueFlag(MessagesResources.AskContunue); } while (_continueFlag); }