예제 #1
0
        static void Main()
        {
            //if (!isAdmin())
            //{
            //    MessageBox.Show("اجرا نمایید Run As Adminstrator لطفا برنامه را در حالت");
            //    return;
            //}

            DepartmentDal.Utilities.NEVER_EAT_POISON_Disable_CertificateValidation();
            var currentVersion = AccGlobalSettings.AppVersion.ParseToInt();

            ErrorHandler.AddHandler(currentVersion.ToString(), ENSource.Department, Application.StartupPath, "");


            clsNotification.Init(Color.Silver);


            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            var logForm = new frmLogin();

            if (logForm.ShowDialog() != DialogResult.OK)
            {
                return;
            }



            Application.Run(new frmMain());
        }
예제 #2
0
 private static void InitConfigs()
 {
     try
     {
         ErrorHandler.AddHandler(Assembly.GetExecutingAssembly().GetName().Version.ToString(), ENSource.Building,
                                 Application.StartupPath, clsRegistery.GetRegistery("U1001ML"));
         ClsCache.Init(AppSettings.DefaultConnectionString, clsGlobalSetting.HardDriveSerial);
         Logger.init(Application.StartupPath, "BuidlingEventLog.txt", true);
         ErrorManager.Init(ENSource.Building, null);
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }