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