static void Main(string[] args) { if (Environment.OSVersion.Version.Major >= 6) { SetProcessDPIAware(); } if (!CheckSqlCe()) { return; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { // Debugger.Launch(); GetDummyUser(); SetupTrace.SetupTraceListners(Information.EventLogSource, Information.EventLogName); EncryptConfigs(); Application.Run(new MainWindow(args)); //Application.Run(new Test()); //GetDummyUser(); //Application.Run(new SreEnvironmentWindow()); } catch (Exception ex) { MessageBox.Show(ex.Message); Trace.TraceError(ex.ToString()); Trace.Flush(); } }
public string ClearLog() { ExtensionMethods.TraceInformation("Cleaing log!"); Trace.Flush(); SetupTrace.Clear(Information.EventLogSource, Information.EventLogName); ExtensionMethods.TraceInformation("New log created."); Trace.Flush(); return("true"); }
void HandleQueryParams(HttpContext context) { if (context.Request.QueryString["pullers"] != null) { switch (context.Request.QueryString["pullers"]) { case "0": new Idpe().StartPullers(); break; case "1": new Idpe().StopPullers(); break; case "2": Idpe psc = new Idpe(); psc.StopPullers(); psc.StartPullers(); break; } } if (context.Request.QueryString["log"] != null) { switch (context.Request.QueryString["log"]) { case "1": //Registry.Instance.ClearLog(); SetupTrace.Clear(Information.EventLogSource, Information.EventLogName); break; } } if (context.Request.QueryString["cache"] != null) { var configuration = WebConfigurationManager.OpenWebConfiguration("~"); EyediaCoreConfigurationSection coreConfig = (EyediaCoreConfigurationSection)configuration.GetSection("eyediaCoreConfigurationSection"); coreConfig.Cache = context.Request.QueryString["cache"] == "1" ? true : false; configuration.Save(); } if (context.Request.QueryString["logname"] != null) { _ArchiveLogRelativePath = context.Request.QueryString["logname"]; } }
static void Init() { SetupTrace.SetupTraceListners(Information.EventLogSource, Information.EventLogName); LoadCodeSets(); }