protected override void OnLoad(EventArgs e) { base.OnLoad(e); DebugLogConfig config = ConfigManager.Config.Debug.DebugLog; RestoreLocation(config.WindowLocation, config.WindowSize); UpdateLog(); }
protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); DebugLogConfig config = ConfigManager.Config.Debug.DebugLog; config.WindowSize = this.WindowState != FormWindowState.Normal ? this.RestoreBounds.Size : this.Size; config.WindowLocation = this.WindowState != FormWindowState.Normal ? this.RestoreBounds.Location : this.Location; ConfigManager.ApplyChanges(); }
private static object GetLogMessage(object message) { if (_logConfig == null) { _logConfig = XCore.GetMainInstance().Services.Get <IXILRuntime>().DebugLogConfig; } if (_logConfig.EnablePrefix) { return($"{_logConfig.PrefixText}{message}"); } else { return(message); } }