Esempio n. 1
0
        public static void Main()
        {
            // Set the image file's build action to "Resource" and "Never copy" for this to work.
            if (!Debugger.IsAttached)
            {
                App.SplashScreen = new SplashScreen("Images/TxFlag_256.png");
                App.SplashScreen.Show(false, true);
            }

            // Set up FieldLog
            FL.AcceptLogFileBasePath();
            FieldLogTraceListener.Start();
            TaskHelper.UnhandledTaskException = ex => FL.Critical(ex, "TaskHelper.UnhandledTaskException", true);

            // Keep the setup away
            GlobalMutex.Create("Unclassified.TxEditor");

            App.InitializeSettings();

            // Make sure the settings are properly saved in the end
            AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit;

            // Setup logging
            //Tx.LogFileName = "tx.log";
            //Tx.LogFileName = "";
            //Environment.SetEnvironmentVariable("TX_LOG_UNUSED", "1", EnvironmentVariableTarget.User);
            //Environment.SetEnvironmentVariable("TX_LOG_UNUSED", null, EnvironmentVariableTarget.User);

            InitializeLocalisation();

            App app = new App();

            app.InitializeComponent();
            app.Run();
        }
Esempio n. 2
0
        public static void Main()
        {
            // Set up FieldLog
            FL.AcceptLogFileBasePath();
            FieldLogTraceListener.Start();
            TaskHelper.UnhandledTaskException = ex => FL.Critical(ex, "TaskHelper.UnhandledTaskException", true);

            App.InitializeSettings();

            // Make sure the settings are properly saved in the end
            AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit;
            // Keep the setup away
            GlobalMutex.Create("Unclassified.FieldLogViewer");


            App app = new App();

            app.InitializeComponent();
            app.Run();
        }