private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AutoMapper.Mapper.CreateMap<Drawing, HierarchyNumberDrawing>(); CompositionRoot.Wire(new ApplicationModule()); var uppyFactory = CompositionRoot.Resolve<IUppyControllersFactory>(); var mainForm = new MainForm(uppyFactory); Application.Run(mainForm); }
private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Mapper.CreateMap<Drawing, HierarchyNumberDrawing>(); Mapper.CreateMap<HierarchyNumberDrawing, Drawing>(); CompositionRoot.Wire(new ApplicationModule()); var uppyFactory = CompositionRoot.Resolve<IUppyControllersFactory>(); var rolesChecker = CompositionRoot.Resolve<IRolesChecker>(); var autService = CompositionRoot.Resolve<IAuthorizationService>(); if (autService.GetCredential() != null) { uppyFactory.RoleChecker = rolesChecker; var mainForm = new MainForm(uppyFactory); Application.Run(mainForm); } else { MessageBox.Show("Вы не авторизованы для работы с данной программой."); } }