aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-04-02 14:37:59 -0400
committerMichael <[email protected]>2017-04-02 14:37:59 -0400
commita3f3e03569e0268ddc70c699d49bc70331f60ab2 (patch)
treeeff8859336762d3e87eda05b38e46051a035261a
parentf89cd092830a8e88bd9aaf8048c18b0dda7dea25 (diff)
downloadshiftos_thereturn-a3f3e03569e0268ddc70c699d49bc70331f60ab2.tar.gz
shiftos_thereturn-a3f3e03569e0268ddc70c699d49bc70331f60ab2.tar.bz2
shiftos_thereturn-a3f3e03569e0268ddc70c699d49bc70331f60ab2.zip
Call OnUpgrade() when upgrade installed.
-rw-r--r--ShiftOS.WinForms/WindowBorder.cs8
-rw-r--r--ShiftOS.WinForms/WinformsWindowManager.cs7
2 files changed, 14 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs
index 0308f8a..4fba470 100644
--- a/ShiftOS.WinForms/WindowBorder.cs
+++ b/ShiftOS.WinForms/WindowBorder.cs
@@ -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);
diff --git a/ShiftOS.WinForms/WinformsWindowManager.cs b/ShiftOS.WinForms/WinformsWindowManager.cs
index 40177be..494c572 100644
--- a/ShiftOS.WinForms/WinformsWindowManager.cs
+++ b/ShiftOS.WinForms/WinformsWindowManager.cs
@@ -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();
}