2018-07-13 03:57:29 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Linq;
|
2018-07-20 02:28:26 +02:00
|
|
|
|
|
2018-07-13 03:57:29 +02:00
|
|
|
|
|
|
|
|
|
namespace OWTrack
|
|
|
|
|
{
|
|
|
|
|
class Tracker
|
|
|
|
|
{
|
2018-07-13 04:13:05 +02:00
|
|
|
|
private int wins, losses = 0;
|
2018-07-13 03:57:29 +02:00
|
|
|
|
|
|
|
|
|
public void Track()
|
|
|
|
|
{
|
2018-07-13 04:13:05 +02:00
|
|
|
|
|
2018-07-13 03:57:29 +02:00
|
|
|
|
}
|
2018-07-15 21:22:02 +02:00
|
|
|
|
|
2018-07-13 03:57:29 +02:00
|
|
|
|
public bool owRunning()
|
2018-07-15 21:22:02 +02:00
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
bool isRunning = Process.GetProcessesByName("Overwatch")
|
|
|
|
|
.FirstOrDefault(p => p.MainModule.FileName.StartsWith(@"D:\Hesham\installed Games\Overwatch")) != default(Process);
|
|
|
|
|
return isRunning;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
Exception ex = new Exception("Error in tracking Overwatch.exe");
|
|
|
|
|
throw ex;
|
|
|
|
|
}
|
2018-07-13 03:57:29 +02:00
|
|
|
|
}
|
2018-07-13 04:13:05 +02:00
|
|
|
|
|
|
|
|
|
public void addWin() { wins++; }
|
|
|
|
|
public void addLoss() { losses++; }
|
|
|
|
|
public int GetWins() { return wins; }
|
|
|
|
|
public int GetLosses() { return losses; }
|
2018-07-13 03:57:29 +02:00
|
|
|
|
}
|
|
|
|
|
}
|