parent
225f9e00bf
commit
b947a5fba9
After Width: | Height: | Size: 15 KiB |
@ -0,0 +1,10 @@ |
|||||||
|
<head> |
||||||
|
<style> |
||||||
|
ul { margin: 0 0 1em 20px ; } |
||||||
|
</style> |
||||||
|
</head> |
||||||
|
|
||||||
|
{{UNUSED-CONFIGS}} |
||||||
|
{{UNCONFIGURED-IMAGES}} |
||||||
|
{{BAD-SHORTCUTS}} |
||||||
|
{{OTHER-MESSAGES}} |
@ -0,0 +1,15 @@ |
|||||||
|
<head> |
||||||
|
<style> |
||||||
|
table { width: 100% ; height: 80% ; } |
||||||
|
td { text-align: center ; vertical-align: middle ; } |
||||||
|
img { height: 50px ; margin-bottom: 10px ; } |
||||||
|
</style> |
||||||
|
</head> |
||||||
|
|
||||||
|
<body> |
||||||
|
|
||||||
|
<table> <tr> <td> |
||||||
|
<div> <img src="{{SPINNER-URL}}"> <br> Loading... </div> |
||||||
|
</table> |
||||||
|
|
||||||
|
</body> |
@ -0,0 +1,57 @@ |
|||||||
|
using System.Security ; |
||||||
|
using System.Text ; |
||||||
|
using System.Windows.Forms ; |
||||||
|
using System.Collections.Generic ; |
||||||
|
|
||||||
|
using log4net ; |
||||||
|
|
||||||
|
// -------------------------------------------------------------------- |
||||||
|
|
||||||
|
public static partial class Program |
||||||
|
{ |
||||||
|
|
||||||
|
private class MyMessageFilter : IMessageFilter { |
||||||
|
public bool PreFilterMessage( ref Message msg ) { |
||||||
|
// check if we should filter this message |
||||||
|
if ( Program.mainForm.preFilterMessage( ref msg ) ) |
||||||
|
return true ; |
||||||
|
return false ; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public static void logStartupMsg( string key, string msg ) |
||||||
|
{ |
||||||
|
// log the startup message |
||||||
|
List<string> msgs ; |
||||||
|
if ( ! mStartupMsgs.TryGetValue( key, out msgs ) ) |
||||||
|
mStartupMsgs[key] = msgs = new List<string>() ; |
||||||
|
msgs.Add( msg ) ; |
||||||
|
} |
||||||
|
|
||||||
|
public static string getStartupMsgs( string key, string caption ) |
||||||
|
{ |
||||||
|
// check if there were any startup messages of the specified type |
||||||
|
List<string> msgs ; |
||||||
|
if ( ! mStartupMsgs.TryGetValue( key, out msgs ) || msgs.Count == 0 ) |
||||||
|
return "" ; |
||||||
|
|
||||||
|
// NOTE: WebBrowser isn't really available with Mono, so we just log startup messages normally. |
||||||
|
ILog logger = LogManager.GetLogger( "startup" ) ; |
||||||
|
|
||||||
|
// generate a report for the specified startup messages |
||||||
|
StringBuilder buf = new StringBuilder() ; |
||||||
|
if ( caption != "" ) { |
||||||
|
buf.Append( caption ) ; |
||||||
|
logger.Warn( caption ) ; |
||||||
|
} |
||||||
|
buf.Append( "<ul>" ) ; |
||||||
|
foreach ( string msg in msgs ) { |
||||||
|
buf.Append( "<li> " + SecurityElement.Escape(msg) ) ; |
||||||
|
logger.Warn( (caption != "") ? $"- {msg}" : msg ) ; |
||||||
|
} |
||||||
|
buf.Append( "</ul>" ) ; |
||||||
|
|
||||||
|
return buf.ToString() ; |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue