optimize OW status

This commit is contained in:
HeshamTB 2018-08-16 07:50:08 +03:00
parent e23d9eebe5
commit 77fefa6812

View File

@ -23,20 +23,17 @@ namespace OWTrack
} }
private void checkStatus() private void checkStatus()
{ {
Time.Text = DateTime.Now.ToString("h:mm tt");
status.Text = NOT_RUNNING;
status.ForeColor = Color.Red;
try try
{ {
Time.Text = DateTime.Now.ToString("h:mm tt");
if (tr.owRunning()) if (tr.owRunning())
{ {
status.Text = IS_RUNNING; status.Text = IS_RUNNING;
status.ForeColor = Color.FromArgb(128, 255, 128); status.ForeColor = Color.FromArgb(128, 255, 128);
} }
else
{
status.Text = NOT_RUNNING;
status.ForeColor = Color.Red;
}
} }
catch (Exception e) catch (Exception e)
{ {