[longomatch/redesign: 1/11] Add brthday, height and weight properties to Players



commit 17f6ce2518ee0868840738ca72a56e6b201f1779
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Oct 8 17:47:09 2010 +0200

    Add brthday, height and weight properties to Players

 LongoMatch/DB/TeamTemplate.cs |    2 +-
 LongoMatch/Time/Player.cs     |   55 ++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 55 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch/DB/TeamTemplate.cs b/LongoMatch/DB/TeamTemplate.cs
index 61feca2..aac6397 100644
--- a/LongoMatch/DB/TeamTemplate.cs
+++ b/LongoMatch/DB/TeamTemplate.cs
@@ -47,7 +47,7 @@ namespace LongoMatch.DB
 
 		public void CreateDefaultTemplate(int playersCount) {
 			for (int i=0; i<playersCount;i++) {
-				playersList.Add(new Player("Player "+i,"",i,null));
+				playersList.Add(new Player("Player "+i, new DateTime(),0,0,"",i,null));
 			}
 		}
 
diff --git a/LongoMatch/Time/Player.cs b/LongoMatch/Time/Player.cs
index 495ee4f..26b2333 100644
--- a/LongoMatch/Time/Player.cs
+++ b/LongoMatch/Time/Player.cs
@@ -31,6 +31,10 @@ namespace LongoMatch.TimeNodes
 		private string position;
 		private int number;
 		private byte[] photo;
+		/* Added in 0.16.1 */
+		private float height;
+		private int weight;
+		private DateTime birthday;
 
 		/// <summary>
 		/// Creates a new player
@@ -38,6 +42,15 @@ namespace LongoMatch.TimeNodes
 		/// <param name="name">
 		/// A <see cref="System.String"/> with my name
 		/// </param>
+		/// <param name="birthday">
+		/// A <see cref="DateTime"/> with my name
+		/// </param>
+		/// <param name="height">
+		/// A <see cref="System.Float"/> with my height
+		/// </param>
+		/// <param name="weight">
+		/// A <see cref="System.Int32"/> with my weight
+		/// </param>
 		/// <param name="position">
 		/// A <see cref="System.String"/> with my position in the field
 		/// </param>
@@ -48,9 +61,13 @@ namespace LongoMatch.TimeNodes
 		/// A <see cref="Pixbuf"/> with my photo
 		/// </param>
 		#region Constructors
-		public Player(string name, string position, int number, Pixbuf photo)
+		public Player(string name, DateTime birthday, float height, int weight,
+		              string position, int number, Pixbuf photo)
 		{
 			this.name = name;
+			this.birthday = birthday;
+			this.height = height;
+			this.weight = weight;
 			this.position = position;
 			this.number = number;
 			Photo = photo;
@@ -111,6 +128,42 @@ namespace LongoMatch.TimeNodes
 					photo=null;
 			}
 		}
+		
+		/// <value>
+		/// My birthdayt
+		/// </value>
+		public DateTime Birthday{
+			get {
+				return birthday;
+			}
+			set {
+				birthday = value;
+			}
+		}
+		
+		/// <value>
+		/// My height
+		/// </value>
+		public float Height{
+			get {
+				return height;
+			}
+			set {
+				height = value;
+			}
+		}
+
+		/// <value>
+		/// My Weight
+		/// </value>
+		public int Weight{
+			get {
+				return weight;
+			}
+			set {
+				weight = value;
+			}
+		}
 		#endregion
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]