aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/Clock.cs
diff options
context:
space:
mode:
authorwilliam341 <[email protected]>2017-06-24 10:53:22 -0700
committerGitHub <[email protected]>2017-06-24 10:53:22 -0700
commitbae34710cf86240b2744196c4b95e569fb161c90 (patch)
treed5ff99e5cc8f3db8a9236b247886866601b915b9 /ShiftOS.WinForms/Applications/Clock.cs
parentb4b19e7a4d203b58537f5b98214296ab52c49b2d (diff)
parent1661f9a5bd46dbd7d2586787c55bfc407c027629 (diff)
downloadshiftos_thereturn-bae34710cf86240b2744196c4b95e569fb161c90.tar.gz
shiftos_thereturn-bae34710cf86240b2744196c4b95e569fb161c90.tar.bz2
shiftos_thereturn-bae34710cf86240b2744196c4b95e569fb161c90.zip
Merge pull request #5 from shiftos-game/master
merge
Diffstat (limited to 'ShiftOS.WinForms/Applications/Clock.cs')
-rw-r--r--ShiftOS.WinForms/Applications/Clock.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/Clock.cs b/ShiftOS.WinForms/Applications/Clock.cs
new file mode 100644
index 0000000..b4f6793
--- /dev/null
+++ b/ShiftOS.WinForms/Applications/Clock.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using ShiftOS.Engine;
+using ShiftOS.WinForms.Tools;
+
+namespace ShiftOS.WinForms.Applications
+{
+ [RequiresUpgrade("clock")]
+ [WinOpen("clock")]
+ [Launcher("Clock", false, null, "Accessories")]
+ [DefaultTitle("Clock")]
+ public partial class Clock : UserControl, IShiftOSWindow
+ {
+ public Clock()
+ {
+ InitializeComponent();
+ clocktimer = new Timer();
+ clocktimer.Interval = 100;
+ clocktimer.Tick += (o, a) =>
+ {
+ lbheader.CenterParent();
+ lbheader.Top = 15;
+ lbcurrenttime.Text = Terminal.GetTime();
+ lbcurrenttime.CenterParent();
+ };
+ }
+
+ private Timer clocktimer = null;
+
+ public void OnLoad()
+ {
+ clocktimer.Start();
+ }
+
+ public void OnSkinLoad()
+ {
+ }
+
+ public bool OnUnload()
+ {
+ return true;
+ }
+
+ public void OnUpgrade()
+ {
+ }
+ }
+}