The latest cactbot update included the following commit which switched to using OverlayPlugin's ILogger interface rather than its own.
quisquous/cactbot@d07965a
Normally I'd PR a fix for this issue, but to be honest I have no idea what's going on in the corresponding button handler.
|
private void btnCactbotUpdate_Click(object sender, EventArgs e) |
|
{ |
|
try |
|
{ |
|
var asm = Assembly.Load("CactbotEventSource"); |
|
var checkerType = asm.GetType("Cactbot.VersionChecker"); |
|
var loggerType = asm.GetType("Cactbot.ILogger"); |
|
var configType = asm.GetType("Cactbot.CactbotEventSourceConfig"); |
|
|
|
var esList = container.Resolve<Registry>().EventSources; |
|
IEventSource cactbotEs = null; |
|
|
|
foreach (var es in esList) |
|
{ |
|
if (es.Name == "Cactbot Config" || es.Name == "Cactbot") |
|
{ |
|
cactbotEs = es; |
|
break; |
|
} |
|
} |
|
|
|
if (cactbotEs == null) |
|
{ |
|
MessageBox.Show("Cactbot is loaded but it never registered with OverlayPlugin!", "Error"); |
|
return; |
|
} |
|
|
|
var cactbotConfig = cactbotEs.GetType().GetProperty("Config").GetValue(cactbotEs); |
|
configType.GetField("LastUpdateCheck").SetValue(cactbotConfig, DateTime.MinValue); |
|
|
|
var checker = checkerType.GetConstructor(new Type[] { loggerType }).Invoke(new object[] { cactbotEs }); |
|
checkerType.GetMethod("DoUpdateCheck", new Type[] {configType}).Invoke(checker, new object[] { cactbotConfig }); |
|
} catch(FileNotFoundException) |
|
{ |
|
MessageBox.Show("Could not find Cactbot!", "Error"); |
|
} catch(Exception ex) |
|
{ |
|
MessageBox.Show("Failed: " + ex.ToString(), "Error"); |
|
} |
|
} |
cc @ngld @quisquous
The latest cactbot update included the following commit which switched to using OverlayPlugin's ILogger interface rather than its own.
quisquous/cactbot@d07965a
Normally I'd PR a fix for this issue, but to be honest I have no idea what's going on in the corresponding button handler.
OverlayPlugin/OverlayPlugin.Core/Controls/GeneralConfigTab.cs
Lines 129 to 168 in 1a4232e
cc @ngld @quisquous