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(); FL.RegisterPresentationTracing(); 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(); }
private static void Main() { FL.AcceptLogFileBasePath(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }
/// <summary> /// Runs the tests. /// </summary> private void Run() { Console.WriteLine("Log benchmark"); Console.WriteLine(); // Delete all files in the log directory Console.WriteLine("Deleting old log files..."); Console.WriteLine(); string logPath = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "log"); if (Directory.Exists(logPath)) { foreach (string file in Directory.GetFiles(logPath)) { File.Delete(file); } } FL.AcceptLogFileBasePath(); // Wait a bit for the system to calm down from starting this program System.Threading.Thread.Sleep(1000); // For correct-in-context number formatting, if used //Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); RunEmptyLoop(100000000); RunLock(100000000); PressEnterToContinue(); // This test setup can either test text messages or scopes. if (!flScope) { RunFieldLogText(1000000); PressEnterToContinue(); } else { RunFieldLogScope(500000); PressEnterToContinue(); } //RunDebugOutputString(100000); PressEnterToContinue(); RunFileAppend(1000000); PressEnterToContinue(); RunFileOpenAppend(2000); #if WITH_NLOG PressEnterToContinue(); RunNLog(1000000); #endif Console.WriteLine("Benchmark finished. Press the Enter key to quit."); Console.ReadLine(); }
static void Main() { // Set up FieldLog FL.AcceptLogFileBasePath(); // Keep the setup away GlobalMutex.Create("Unclassified.EasyPdfSigning"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new EasyForm()); }
private static void Main(string[] args) { FL.AcceptLogFileBasePath(); Console.WriteLine("FieldLog writer demo application"); Console.WriteLine(); //LoadTest(); //ConstantFlow(); NormalActivity(); //BatchActivity(); //TestTimerPrecision(); //TestOutputDebugString(); //TestTaskLogging(); //NestTest(null); //GenericTest<string>(""); //GenericClass<int>.Method<string>(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(); }