Made UpdateStatusChanged a week event.

Fixed a typo in help.
This commit is contained in:
larsbrubaker 2014-08-08 10:40:01 -07:00
parent bbca065e18
commit 2af2997818
4 changed files with 33 additions and 7 deletions

View file

@ -40,7 +40,7 @@ using MatterHackers.MatterControl.VersionManagement;
namespace MatterHackers.MatterControl
{
public class UpdateControlView : FlowLayoutWidget
public class UpdateControlView : FlowLayoutWidget, IReceiveRootedWeakEvent
{
Button downloadUpdateLink;
Button checkUpdateLink;
@ -89,13 +89,26 @@ namespace MatterHackers.MatterControl
AddChild(installUpdateLink);
}
UpdateControlData.Instance.UpdateStatusChanged.RegisterEvent(UpdateStatusChanged, ref unregisterEvents);
UpdateControlData.Instance.UpdateStatusChanged.Register(this, "UpdateStatusChanged");
MinimumSize = new VectorMath.Vector2(0, 50);
UpdateStatusChanged(null, null);
}
public void RootedEvent(string eventType, EventArgs e)
{
switch (eventType)
{
case "UpdateStatusChanged":
this.UpdateStatusChanged(null, null);
break;
default:
throw new NotImplementedException();
}
}
public void CheckForUpdate(object sender, MouseEventArgs e)
{
UpdateControlData.Instance.CheckForUpdateUserRequested();