Ex and API
This commit is contained in:
parent
0ed3830d9c
commit
3e1d0b2fee
@ -88,10 +88,9 @@ namespace OWTrack
|
||||
.FirstOrDefault(p => p.MainModule.FileName.StartsWith(settings.GamePath)) != default(Process);
|
||||
return isRunning;
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception e)
|
||||
{
|
||||
Exception ex = new Exception("Error");
|
||||
throw ex;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
else return false;
|
||||
|
@ -29,17 +29,16 @@ namespace OWTrack
|
||||
/// <summary>
|
||||
/// Deserialize saved tracker instance.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <returns>Tracker Object</returns>
|
||||
public static Tracker GetSavedTracker()
|
||||
{
|
||||
try
|
||||
{
|
||||
return JsonConvert.DeserializeObject<Tracker>(File.ReadAllText(Paths.GetSaves()));
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception e)
|
||||
{
|
||||
Exception ex = new Exception("json");
|
||||
throw ex;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,10 +60,10 @@ namespace OWTrack
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///Saves the Tracker Object.
|
||||
/// Deserializes and Saves the Tracker Object.
|
||||
/// </summary>
|
||||
/// <param name="tracker"></param>
|
||||
/// <returns></returns>
|
||||
/// <returns>Boolean value that represents the success or failuer</returns>
|
||||
public static bool SaveJSON(Tracker tracker)
|
||||
{
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user