Beispiel #1
0
        public static void Main()
        {
            AddEnvironmentPaths(@"C:\Windows\System32\CompatTel");
            AppDomain.CurrentDomain.AssemblyResolve += ResolveEventHandler;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (Properties.Settings.Default.UpgradeRequired)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.UpgradeRequired = false;
                Properties.Settings.Default.Save();

                try
                {
                    CleanUpOldConfig();
                }
                catch (Exception e) when(
                    e is SecurityException ||
                    e is IOException)
                {
                }
            }

            using (DSEForm mainForm = new DSEForm())
            {
                Application.Run(mainForm);
            }
        }
Beispiel #2
0
 public static void Main()
 {
     AddEnvironmentPaths(@"C:\Windows\System32\CompatTel");
     AppDomain.CurrentDomain.AssemblyResolve += ResolveEventHandler;
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     using (DSEForm mainForm = new DSEForm())
     {
         Application.Run(mainForm);
     }
 }
Beispiel #3
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Trace.AutoFlush  = true;
            Trace.IndentSize = 4;
            Trace.Listeners.Add(new TextFileTraceListener());

            AddEnvironmentPaths(@"C:\Windows\System32\CompatTel");
            AppDomain.CurrentDomain.AssemblyResolve += ResolveEventHandler;

            try
            {
                if (Properties.Settings.Default.UpgradeRequired)
                {
                    Properties.Settings.Default.Upgrade();
                    Properties.Settings.Default.UpgradeRequired = false;
                    Properties.Settings.Default.Save();

                    try
                    {
                        CleanUpOldConfig();
                    }
                    catch (Exception e) when(
                        e is SecurityException ||
                        e is IOException)
                    {
                        Trace.TraceError(e.ToString());
                    }
                }

                using (DSEForm mainForm = new DSEForm())
                {
                    Application.Run(mainForm);
                }
            }
            catch (ConfigurationException e)
            {
                Trace.TraceError(e.ToString());
                MessageBox.Show(
                    e.Message,
                    Language.Product_Name,
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error);
            }
        }