private static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (ProcessUtility.CheckInstance("nbooks")) { return; } ResourceUtility.Manager = new ResourceManager("NBooks.ApplicationResource", Assembly.GetExecutingAssembly()); var config = new Configuration(); config.Configure(); config.AddAssembly(typeof(NBooks.Core.Models.Company).Assembly); NHibernateHelper.Configuration = config; ReadDefaultCompany(); InitializeWorkbench(); new ShowHomePage().Run(); Application.Run(WorkbenchSingleton.MainForm); NHibernateHelper.CloseSession(); }