public App() : base() { AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Hierarchy hier = log4net.LogManager.GetRepository() as Hierarchy; if (hier != null) { DataGridViewAppender dgva = (DataGridViewAppender)hier.GetAppenders().FirstOrDefault(appender => appender.Name.Equals("DataGridViewAppender")); dgva.DgEventLog = fel.evv.ListLogEntries; } }
public App() { AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; if (log4net.LogManager.GetRepository() is Hierarchy hier) { DataGridViewAppender dgva = (DataGridViewAppender)hier.GetAppenders().FirstOrDefault(appender => appender.Name.Equals("DataGridViewAppender")); dgva.DgEventLog = EventLog.Instance.ListLogs; } Log.Info($"Loading language {WinHueSettings.settings.Language}"); if (!string.IsNullOrEmpty(WinHueSettings.settings.Language) && !string.IsNullOrWhiteSpace(WinHueSettings.settings.Language)) { var culture = new CultureInfo(WinHueSettings.settings.Language); Thread.CurrentThread.CurrentUICulture = culture; Thread.CurrentThread.CurrentCulture = culture; } }
public App() { //AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Hierarchy hier = log4net.LogManager.GetRepository() as Hierarchy; if (hier != null) { DataGridViewAppender dgva = (DataGridViewAppender)hier.GetAppenders().FirstOrDefault(appender => appender.Name.Equals("DataGridViewAppender")); dgva.DgEventLog = _fel.ViewModel.EventViewerModel.ListLogEntries; } Log.Info(WinHueSettings.settings.Language); if (!string.IsNullOrEmpty(WinHueSettings.settings.Language) && !string.IsNullOrWhiteSpace(WinHueSettings.settings.Language)) { var culture = new CultureInfo(WinHueSettings.settings.Language); Thread.CurrentThread.CurrentUICulture = culture; Thread.CurrentThread.CurrentCulture = culture; } }