Esempio n. 1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
     using (AIR_ERPWindowsFormsApplication winApplication = new AIR_ERPWindowsFormsApplication {
         Security = new SecurityComplex <User, Role>(new MyAuthentication())
     })
     {
         winApplication.CreateCustomLogonWindowObjectSpace += application_CreateCustomLogonWindowObjectSpace;
         if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
         {
             winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
         }
         try
         {
             winApplication.Setup();
             winApplication.Start();
         }
         catch (Exception e)
         {
             winApplication.HandleException(e);
         }
     }
 }
Esempio n. 2
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
     using (AIR_ERPWindowsFormsApplication winApplication = new AIR_ERPWindowsFormsApplication { Security = new SecurityComplex<User, Role>(new MyAuthentication()) })
     {
         winApplication.CreateCustomLogonWindowObjectSpace += application_CreateCustomLogonWindowObjectSpace;
         if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
             winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
         try
         {
             winApplication.Setup();
             winApplication.Start();
         }
         catch (Exception e)
         {
             winApplication.HandleException(e);
         }
     }
 }