aboutsummaryrefslogtreecommitdiff
path: root/source/WindowsFormsApplication1/Apps
diff options
context:
space:
mode:
authorMichaelTheShifter <[email protected]>2016-07-23 15:25:46 -0400
committerMichaelTheShifter <[email protected]>2016-07-23 15:25:46 -0400
commitdcb7c04de1ac07f7004af7d5af8450308ba2e29d (patch)
tree15d583841b3a0484e690188c59e579a21ebac428 /source/WindowsFormsApplication1/Apps
parentf8b13cfa2a571e982d8e52423b4d217ff79f62f6 (diff)
downloadshiftos-c--dcb7c04de1ac07f7004af7d5af8450308ba2e29d.tar.gz
shiftos-c--dcb7c04de1ac07f7004af7d5af8450308ba2e29d.tar.bz2
shiftos-c--dcb7c04de1ac07f7004af7d5af8450308ba2e29d.zip
Fix panel buttons
Diffstat (limited to 'source/WindowsFormsApplication1/Apps')
-rw-r--r--source/WindowsFormsApplication1/Apps/Shifter.cs24
1 files changed, 22 insertions, 2 deletions
diff --git a/source/WindowsFormsApplication1/Apps/Shifter.cs b/source/WindowsFormsApplication1/Apps/Shifter.cs
index ff618cb..3e16184 100644
--- a/source/WindowsFormsApplication1/Apps/Shifter.cs
+++ b/source/WindowsFormsApplication1/Apps/Shifter.cs
@@ -36,14 +36,14 @@ select new { Type = t, Attributes = attributes.Cast<ShifterCategoryAttribute>()
btn.Text = type.Attributes.First().Name;
btn.Click += (o, a) =>
{
- ShowAllPropertyGridsInCategory(btn.Text);
+ ShowAllPropertyGridsInCategory(Activator.CreateInstance(type.Type));
};
pnlcategories.Widgets.Add(btn);
btn.Show();
}
}
- public void ShowAllPropertyGridsInCategory(string cat)
+ public void ShowAllPropertyGridsInCategory(object cls)
{
}
@@ -53,13 +53,33 @@ select new { Type = t, Attributes = attributes.Cast<ShifterCategoryAttribute>()
[ShifterPropertyGrid("Desktop")]
public class ShifterDesktopSettings
{
+ [Upgrade("skinning")]
[SkinMap("images/desktopbackground")]
public Image DesktopBackground { get; set; }
+ [Upgrade("shiftdesktopbackground")]
[SkinMap("skin/desktopbackgroundcolour")]
public Color DesktopBackgroundColor { get; set; }
}
+ public class UpgradeAttribute : Attribute
+ {
+ public UpgradeAttribute(string upgrade)
+ {
+ upg = upgrade;
+ }
+
+ private string upg = "";
+
+ public bool UpgradeInstalled
+ {
+ get
+ {
+ return API.Upgrades[upg];
+ }
+ }
+ }
+
public class SkinMapAttribute : Attribute
{
public SkinMapAttribute(string varName)