Call OnUpgrade() when upgrade installed.

This commit is contained in:
Michael 2017-04-02 14:37:59 -04:00
parent f89cd09283
commit a3f3e03569
2 changed files with 14 additions and 1 deletions

View file

@ -124,7 +124,6 @@ namespace ShiftOS.WinForms
}
};
this.Width = LoadedSkin.LeftBorderWidth + _parentWindow.Width + LoadedSkin.RightBorderWidth;
this.Height = LoadedSkin.TitlebarHeight + _parentWindow.Height + LoadedSkin.BottomBorderWidth;
@ -133,6 +132,13 @@ namespace ShiftOS.WinForms
this._parentWindow.Show();
ControlManager.SetupControls(this._parentWindow);
ParentWindow.OnSkinLoad();
ParentWindow.OnUpgrade();
Shiftorium.Installed += () =>
{
Setup();
ParentWindow.OnUpgrade();
};
Desktop.ShowWindow(this);

View file

@ -197,6 +197,13 @@ namespace ShiftOS.WinForms
var wb = new WindowBorder(form as UserControl);
FormClosedEventHandler onClose = (o,a)=> { };
onClose = (o, a) =>
{
SetupWindows();
wb.FormClosed -= onClose;
};
wb.FormClosed += onClose;
SetupWindows();
}