2018-07-13 03:24:05 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
2018-07-13 03:57:29 +02:00
|
|
|
|
using System.Drawing;
|
2018-07-13 03:24:05 +02:00
|
|
|
|
|
|
|
|
|
namespace OWTrack
|
|
|
|
|
{
|
|
|
|
|
public partial class Form1 : Form
|
|
|
|
|
{
|
2018-07-13 03:57:29 +02:00
|
|
|
|
Tracker tr = new Tracker();
|
|
|
|
|
private const string IS_RUNNING = "Running";
|
|
|
|
|
private const string NOT_RUNNING = " Not running";
|
|
|
|
|
|
|
|
|
|
|
2018-07-13 03:24:05 +02:00
|
|
|
|
public Form1()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2018-07-13 03:57:29 +02:00
|
|
|
|
checkStatus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void timer1_Tick(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
checkStatus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void checkStatus()
|
|
|
|
|
{
|
|
|
|
|
Time.Text = DateTime.Now.ToString("h:mm tt");
|
|
|
|
|
if (tr.owRunning())
|
|
|
|
|
{
|
|
|
|
|
status.Text = IS_RUNNING;
|
|
|
|
|
status.ForeColor = Color.FromArgb(128, 255, 128);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
status.Text = NOT_RUNNING;
|
|
|
|
|
status.ForeColor = Color.Red;
|
|
|
|
|
}
|
2018-07-13 03:24:05 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|