Exemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            #region
            using (var db = new MyContext())
            {
                try
                {
                    db.Database.Initialize(true);
                }

                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }

            #endregion
            //var current = System.Threading.Thread.CurrentThread.CurrentCulture;
            //var culture = System.Globalization.CultureInfo.CreateSpecificCulture(current.Name);
            //culture.NumberFormat.DigitSubstitution = System.Globalization.DigitShapes.Context;
            //System.Threading.Thread.CurrentThread.CurrentCulture = culture;
            //System.Threading.Thread.CurrentThread.CurrentUICulture = culture;

            //System.Globalization.CultureInfo cinfo = (System.Globalization.CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();
            //Thread.CurrentThread.CurrentCulture.ClearCachedData();
            //Application.CurrentCulture.ClearCachedData();
            //cinfo.NumberFormat.DigitSubstitution = System.Globalization.DigitShapes.Context;
            //Thread.CurrentThread.CurrentCulture = cinfo;
            //Thread.CurrentThread.CurrentUICulture = cinfo;
            //Application.CurrentCulture = cinfo;

            BonusSkins.Register();
            //new FrmLogin().Show();
            if (HelpClass1.IsSetGregorianCalendar())
            {
                Cultures.InitializePersianCulture();
                Application.Run(new AppContext());
            }
            else
            {
                Application.Exit();
            }
        }