Ejemplo n.º 1
0
 public void fromSFSObject(SFSObject dailyMeeting)
 {
     this.id_proyecto = dailyMeeting.GetLong("id_proyecto");
     this.nick = dailyMeeting.GetUtfString("nick");
     this.ayer = dailyMeeting.GetUtfString("ayer");
     this.hoy = dailyMeeting.GetUtfString("hoy");
     this.inconvenientes = dailyMeeting.GetUtfString("inconvenientes");
     this.fecha = dailyMeeting.GetLong("fecha");
 }
Ejemplo n.º 2
0
 public override void fromSFSObject(SFSObject item)
 {
     this.id_criterio = item.GetLong ("Id_Criteria");
     this.id_test= item.GetLong("Id_Test");
     this.metodo= item.GetUtfString("Metodo");
     this.clase = item.GetUtfString("Clase");
     this.estado= item.GetUtfString("Estado");
     this.descripcion = item.GetUtfString("Descripcion");
 }
Ejemplo n.º 3
0
    public void agregarAsociacion(SFSObject dataObject)
    {
        long id_tarea = dataObject.GetLong ("Id_Task");
        long id_test = dataObject.GetLong ("Id_Test");

        foreach (Sprint s in listaSprints) {
            foreach (UserStory u in s.getListaStories())
                foreach (Task t in u.getListaTareas())
                    if (t.getId_Task ().Equals (id_tarea)){
                        t.addIdTest(id_test);
                }
        }
    }
Ejemplo n.º 4
0
	private void initPacketFromHost(SFSObject aObject) {
		long id = aObject.GetLong("i");
		for(int i = 0;i<this.sortedHorses.Count;i++) {
			if(sortedHorses[i].horseID==id) {
				sortedHorses[i].initFromPackage(aObject);
			}
		}
	}
Ejemplo n.º 5
0
	public void handlePacketFromHost(SFSObject aObject) {
		long id = aObject.GetLong("i");
		for(int i = 0;i<this.sortedHorses.Count;i++) {
			if(sortedHorses[i].horseID==id) {
				sortedHorses[i].dataPackage = aObject;
			}
		}
	}
Ejemplo n.º 6
0
 public override void fromSFSObject(SFSObject item)
 {
     associatedTests = new List<Test> ();
     this.id_Criteria = item.GetLong("Id_Criteria");
     this.id_Story	 = item.GetLong("Id_Story");
     this.descripcion = item.GetUtfString ("Descripcion");
     this.titulo = item.GetUtfString ("Titulo");
     this.prioridad = item.GetLong("Prioridad");
     ISFSArray tests=item.GetSFSArray("listaTests");
     if(tests != null)
         foreach(SFSObject test in tests)
     {
         Test t=new Test();
         t.fromSFSObject(test);
         associatedTests.Add(t);
     }
 }
Ejemplo n.º 7
0
    public override void fromSFSObject(SFSObject item)
    {
        this.id_Task = item.GetLong ("id_Task");
        this.id_Story=item.GetLong("id_Story");
        this.descripcion = item.GetUtfString ("descripcion");
        this.prioridad = item.GetInt ("prioridad");
        this.responsable = item.GetUtfString ("responsable");
        this.estado = item.GetUtfString ("estado");
        this.t_Total = item.GetInt ("t_Total");
        this.t_Estimado = item.GetInt ("t_Estimado");
        this.titulo = item.GetUtfString ("titulo");
        ISFSArray t = item.GetSFSArray ("testsAsociados");

        foreach (SFSObject s in t) {
            this.idTests.Add (s.GetLong ("Id_Test"));
        }
        // falta el burndownchart
    }
Ejemplo n.º 8
0
 public void fromSFSObject(SFSObject item)
 {
     this.id_test = item.GetLong("id_test");
         this.fecha_hora = System.DateTime.Parse(item.GetUtfString("fecha_hora"));
         this.info_ejecucion = item.GetUtfString("info_ejecucion");
         if (info_ejecucion != null && !info_ejecucion.Equals ("")) {
             string m = info_ejecucion.Split ('^') [0];
             string s = info_ejecucion.Split ('^') [1];
             this.setMensaje (m.Substring (0, m.Length - 11));
             this.setStackTrace (s);
         }
         this.estado = item.GetUtfString("estado");
         this.entorno = item.GetUtfString("entorno");
         this.time = item.GetUtfString("time");
 }
Ejemplo n.º 9
0
	public Brand(SFSObject aObject) {
		id = aObject.GetInt("ID");
		owner = aObject.GetInt("Ow");
		Debug.Log (aObject.ToJson()); 
		try {
			fb = (long) Convert.ToInt64(aObject.GetFloat("FB"));
		} catch(Exception e) {
			try {
				fb = aObject.GetLong("FB");
			} catch(Exception e2) {
				fb = (long) aObject.GetDouble("FB");
			}
		}
		brand = aObject.GetUtfString("B"); 		
	}
Ejemplo n.º 10
0
	public void onLoggedIn(SFSObject aLoginData,SFSArray aHorses) {
		string challengeGoals = aLoginData.GetUtfString("ChallengeGoals");
		this.appleID = aLoginData.GetUtfString("AppleID");
		this.facebookID = Convert.ToString(aLoginData.GetLong("FacebookID"));
		this.googleID = aLoginData.GetUtfString("GoogleID");
		this.playerID = aLoginData.GetInt("ID");
		this.lastLogin = aLoginData.GetInt("LastLogin");
		this.playerName = aLoginData.GetUtfString("Username");
		this.referralRewardsReceived = aLoginData.GetInt("RewardsReceived");
		this.softCurrency = aLoginData.GetInt("SoftCurrency");
		this.hardCurrency = aLoginData.GetInt("HardCurrency");
		this.privilege = aLoginData.GetInt("Privilege");
		unpackHorses(aHorses); 
		this.selectedRaceHorse = this.horses[0];
		this.loggedIn = true;
		SFSObject obj = new SFSObject();
		obj.PutInt("l",selectedRaceHorse.level);
		SmartfoxConnectionHandler.REF.setMyName(this.playerName);
		SmartfoxConnectionHandler.REF.setMyHorseUserVar(selectedRaceHorse.compressedString(0));
		SmartfoxConnectionHandler.REF.sendMessage("rf2",obj);
	}
Ejemplo n.º 11
0
    private void ScoresResponse(SFSObject sfsdata)
    {
        Dictionary<string, long> scores = new Dictionary<string, long>();
        Dictionary<string, string> names = new Dictionary<string, string>();
        long myscore = sfsdata.GetLong("my.score");

        int size = sfsdata.GetInt("size");
        for (int i = 0; i < size; ++i) {
            scores.Add("score" + i.ToString(), sfsdata.GetLong("score" + i.ToString()));
            names.Add("player" + i.ToString(), sfsdata.GetUtfString("player" + i.ToString()));
        }

        Dictionary<string, object> package = new Dictionary<string,object>();
        package.Add("scores", scores);
        package.Add("names", names);
        package.Add("my.score", myscore);

        OnEvent("scores", package);
    }
Ejemplo n.º 12
0
 public void fromSFSObjectSinUS(SFSObject us)
 {
     this.id_sprint=us.GetLong("Id_Sprint");
     this.id_proyecto=us.GetLong("id_Proyecto");
     this.estado=us.GetUtfString("estado");
     this.fechaInicio=System.DateTime.Parse(us.GetUtfString("fechaInicio"));//new System.DateTime(us.GetLong ("fechaInicio"));
     this.fechaFin=System.DateTime.Parse(us.GetUtfString("fechaFin"));//new System.DateTime(us.GetLong ("fechaFin"));
     this.titulo=us.GetUtfString("titulo");
     this.cerrado = us.GetBool("cerrado");
     string s = us.GetUtfString ("fecha_ultimo_cambio");
     if(!s.Equals(""))
         this.fecha_ultimo_cambio = System.DateTime.Parse(s);
     Debug.Log (this.fecha_ultimo_cambio.ToString ());
 }
Ejemplo n.º 13
0
    public override void fromSFSObject(SFSObject item)
    {
        this.id_sprint=item.GetLong("Id_Sprint");
        this.id_proyecto=item.GetLong("id_Proyecto");
        this.estado=item.GetUtfString("estado");
        this.fechaInicio=System.DateTime.Parse(item.GetUtfString("fechaInicio"));//new System.DateTime(us.GetLong ("fechaInicio"));
        this.fechaFin=System.DateTime.Parse(item.GetUtfString("fechaFin"));//new System.DateTime(us.GetLong ("fechaFin"));
        this.titulo=item.GetUtfString("titulo");
        this.cerrado = item.GetBool("cerrado");
        string s = item.GetUtfString ("fecha_ultimo_cambio");
        if(!s.Equals(""))
            this.fecha_ultimo_cambio = System.DateTime.Parse(s);
        ISFSArray stories=item.GetSFSArray("listaStories");
        foreach(SFSObject story in stories)
        {
            UserStory UserStory=new UserStory();
            UserStory.fromSFSObject(story);

            listaStories.Add(UserStory);
        }
        Debug.Log (this.fecha_ultimo_cambio.ToString ());
    }
Ejemplo n.º 14
0
	public void loadFromSFSObject(SFSObject aSFSObject) {
		if(aSFSObject.GetSFSObject("horses")!=null)
		{ 
			aSFSObject = aSFSObject.GetSFSObject("horses") as SFSObject;
		} 
		this.accelerationBase = aSFSObject.GetLong("Acceleration");
		this.baseLayer = aSFSObject.GetInt("BaseLayer");
		this.blanket = aSFSObject.GetInt("Blanket");
		this.cadence = aSFSObject.GetLong("Cadence");
		this.determination = aSFSObject.GetLong("Determination");
		this.fatigue = aSFSObject.GetInt("Fatigue");
		this.salePrice = aSFSObject.GetInt("ForSale");
		this.happiness = aSFSObject.GetInt("Happiness");
		this.headwear = aSFSObject.GetInt("Headwear");
		Debug.LogError("TODO: Make this load health data");
		//	this.HealthDataFromString(aSFSObject.GetUtfString("HealthData"));
		this.height = aSFSObject.GetInt("Height");
		
		Debug.LogError("TODO: Make this load horse record data");
		//this.horseRecordFromString(aSFSObject.GetUtfString("HorseRecord"));
		this.horseScore = aSFSObject.GetInt("HorseScore");
		this.hunger = aSFSObject.GetInt("Hunger");
		this.horseID = aSFSObject.GetInt("ID");
		this.jumping = aSFSObject.GetLong("Jumping");
		this.lastUpdated = aSFSObject.GetInt("LastUpdate");
		this.legWear = aSFSObject.GetInt("LegWear1");
		this.legWear2 = aSFSObject.GetInt("LegWear2");
		this.level = aSFSObject.GetInt("Level");
		this.mane = aSFSObject.GetInt("Mane");
		try {
			this.maxMPH = (float) aSFSObject.GetDouble("MaxSpeed");
		} catch(Exception e) {
			try {
				this.maxMPH = aSFSObject.GetFloat("MaxSpeed");
			} catch(Exception e2) {
				this.maxMPH = 0.0f;
			}
		}
		string nameStr = aSFSObject.GetUtfString("Name");
		this._baseName = nameStr;
		
		try {
		if(aSFSObject.GetDouble("OriginalOwner")>0)
			this.originalOwnerID = (long) aSFSObject.GetDouble("OriginalOwner");
		} catch(Exception e) { 
			if(aSFSObject.GetLong("OriginalOwner")>0)
				this.originalOwnerID = aSFSObject.GetLong("OriginalOwner");
		}
		
		if(aSFSObject.GetInt("OwnerID")>0)
			this.ownerID = (long) aSFSObject.GetInt("OwnerID");
		
		
		//this.setPassportFromString(aSFSObject.GetUtfString("PassportString"));
		this.overlay = aSFSObject.GetInt("PatternLayer1");
		this.potential = aSFSObject.GetInt("Potential");
		this.birthTime = aSFSObject.GetInt("PregnantReturnTime");
		this.recovery = aSFSObject.GetLong("Recovery");
		this.reintype = aSFSObject.GetInt("ReinType"); 
		this.trainingReturnTime = aSFSObject.GetInt("ReturnFromTrainingTime");
		this.saddle = aSFSObject.GetInt("SaddleType");
		this.gender= (EGender) aSFSObject.GetInt("Sex");
		this.speed = aSFSObject.GetLong("Speed");
		this._stamina = aSFSObject.GetLong("Stamina");
		this.stridelength = aSFSObject.GetLong("StrideLength");
		this.surfacePreference = (ESurfaceType) aSFSObject.GetInt("SurfacePreference");
		this.tail = aSFSObject.GetInt("Tail");
		if(tail>0&&tail<12300) {
			tail = 12300;
		}
		if(mane>0&&mane<12200) {
			mane = 12200;
		}
		this.horseTalents.talents = (aSFSObject.GetUtfString("Talents"));
		this.dateborn = aSFSObject.GetInt("TimeCreated");
		
		Debug.LogError("TODO: Make this load trophies owned");
		//this.trophiesOwned(aSFSObject.GetUtfString("Trophies"));
		this.xp = aSFSObject.GetLong("XP");
		this.studFee = (long) aSFSObject.GetInt("StudFee");
		
		this.personalityBigRacer = aSFSObject.GetInt("PersonalityBigRacer");
		this.personalityProfessional = aSFSObject.GetInt("PersonalityProfessional");
		this.personalityAdaptable = aSFSObject.GetInt("PersonalityAdaptable");
		this.personalityJumper = aSFSObject.GetInt("PersonalityA");
		this.personalityChaser = aSFSObject.GetInt("PersonalityB");
		
		this.motherID = aSFSObject.GetInt("Mother");
		this.fatherID = aSFSObject.GetInt("Father");
		
	}
Ejemplo n.º 15
0
    public override void fromSFSObject(SFSObject item)
    {
        listaTareas = new ArrayList();
        listaEstimacion = new ArrayList();
        listaCriterios = new ArrayList ();
        this.id_UserStory=item.GetLong("id_UserStory");
        this.id_Sprint = item.GetLong ("Id_Sprint");
        this.descripcion=item.GetUtfString("descripcion");
        this.prioridad=item.GetInt("prioridad");
        this.titulo=item.GetUtfString("Titulo");
        this.estadoEstimacion=item.GetInt("estadoEstimacion");
        this.id_proyecto=item.GetLong("id_proyecto");
        string s = item.GetUtfString ("fecha_ultimo_cambio");
        this.cerrada = item.GetBool("cerrada");
        if(!s.Equals(""))
            this.fecha_ultimo_cambio = System.DateTime.Parse(s);
        this.valorEstimacion = item.GetFloat("valorEstimacion");
        ISFSArray tareas=item.GetSFSArray("listaTareas");

        foreach(SFSObject tarea in tareas)
        {
            Task task=new Task();
            task.fromSFSObject(tarea);

            listaTareas.Add(task);
        }
        ISFSArray estimaciones=item.GetSFSArray("listaEstimacion");

        foreach(SFSObject estimacion in estimaciones)
        {
            Estimacion est=new Estimacion();
            est.fromSFSObject(estimacion);
            listaEstimacion.Add(est);
        }

        ISFSArray criterios=item.GetSFSArray("listaCriterios");
        if(criterios !=null)
        foreach(SFSObject criteria in criterios)
        {
            AcceptanceCriteria ac=new AcceptanceCriteria();
            ac.fromSFSObject(criteria);
            listaCriterios.Add(ac);
        }
    }