[longomatch] Override ToString() in some more places
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Override ToString() in some more places
- Date: Thu, 23 Apr 2015 15:22:24 +0000 (UTC)
commit f7247234484cace41f3e357f5e61beb582c5d4a8
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Apr 23 13:47:18 2015 +0200
Override ToString() in some more places
LongoMatch.Core/Common/Area.cs | 2 +-
LongoMatch.Core/Store/CameraConfig.cs | 5 +++++
LongoMatch.Core/Store/MediaFile.cs | 9 +++++++--
3 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Area.cs b/LongoMatch.Core/Common/Area.cs
index 07023d4..a946548 100644
--- a/LongoMatch.Core/Common/Area.cs
+++ b/LongoMatch.Core/Common/Area.cs
@@ -190,7 +190,7 @@ namespace LongoMatch.Core.Common
public override string ToString ()
{
- return string.Format ("[Area: Start={0}, Width={1}, Height={2}]", Start, Width,
Height);
+ return string.Format ("{0}-{1} {2}x{3}", Start.X, Start.Y, Width, Height);
}
}
}
diff --git a/LongoMatch.Core/Store/CameraConfig.cs b/LongoMatch.Core/Store/CameraConfig.cs
index 5fca0ba..a109420 100644
--- a/LongoMatch.Core/Store/CameraConfig.cs
+++ b/LongoMatch.Core/Store/CameraConfig.cs
@@ -84,6 +84,11 @@ namespace LongoMatch.Core.Store
{
return !(c1 == c2);
}
+
+ public override string ToString ()
+ {
+ return string.Format ("{0}, {1}", Index, RegionOfInterest);
+ }
}
}
diff --git a/LongoMatch.Core/Store/MediaFile.cs b/LongoMatch.Core/Store/MediaFile.cs
index 1c75fc7..52d4905 100644
--- a/LongoMatch.Core/Store/MediaFile.cs
+++ b/LongoMatch.Core/Store/MediaFile.cs
@@ -18,7 +18,7 @@
//
//
using System;
-using Mono.Unix;
+using System.IO;
using LongoMatch.Core.Common;
using Newtonsoft.Json;
@@ -139,9 +139,14 @@ namespace LongoMatch.Core.Store
}
}
+ public override string ToString ()
+ {
+ return string.Format ("{0} {1}", Path.GetFileName (FilePath), ShortDescription);
+ }
+
public bool Exists ()
{
- return System.IO.File.Exists (FilePath);
+ return File.Exists (FilePath);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]