Show TabletContentandUtil.cs syntax highlighted
using System;
using EStory;
using Whiteboard.MaseWS;
namespace Whiteboard
{
/// <summary>
/// Summary description for TabletContentandUtil.
/// </summary>
///
public class TabletContentandUtil
{
public long iterationId = -1;
public long responsibleAgentId = -1;
public long pairAgentId = -1;
public long projectId = -1;
public long parentId = -1;
public CardLocationVO horizontalCenter;
public int processType = -1;
public string storyname = "";
public string storydescription = "";
public float initialEffort = -1;
public int activityType = -1;
public string handwritten = "";
public bool complete = false;
public TabletVO tabletVO;
public TabletContentandUtil()
{
this.tabletVO = new TabletVO();
this.tabletVO.tabletProcess = new TabletProcessVO();
this.tabletVO.horizontalCenter = new CardLocationVO();
this.tabletVO.verticalCenter = new CardLocationVO();
cleanUpStoryVO();
}
public void cleanUpStoryVO()
{
this.tabletVO.iterationID = -1;
this.tabletVO.iterationName = "";
this.tabletVO.pairProgrammerID = -1;
this.tabletVO.pairProgrammerName = "";
this.tabletVO.parentID = -1;
this.tabletVO.projectID = -1;
this.tabletVO.projectName = "";
this.tabletVO.tabletProcess.initialEffort = -1.0f;
this.tabletVO.tabletProcess.name = "";
this.tabletVO.tabletProcess.processType = EStoryForm.USERSTORY;
this.tabletVO.tabletProcess.activityType = EStoryForm.FEATURE;
this.tabletVO.tabletProcess.complete = false;
this.tabletVO.tabletProcess.description = "";
this.tabletVO.tabletProcess.handWritten = null;
this.tabletVO.tabletProcess.id = Convert.ToInt64(EStoryForm.NotAssigned);
}
public TabletContentandUtil(TabletVO tabletVO)
{
this.tabletVO = tabletVO;
this.iterationId = tabletVO.iterationID;
this.responsibleAgentId = tabletVO.agentResponsibleID;
this.pairAgentId = tabletVO.pairProgrammerID;
this.tabletVO.parentID = tabletVO.parentID;
this.tabletVO.projectID = tabletVO.projectID;
this.tabletVO.horizontalCenter = tabletVO.horizontalCenter;
this.processType = tabletVO.tabletProcess.processType;
this.storyname = tabletVO.tabletProcess.name;
this.activityType = tabletVO.tabletProcess.activityType;
this.initialEffort = tabletVO.tabletProcess.initialEffort;
this.storydescription = tabletVO.tabletProcess.description;
if(tabletVO.tabletProcess.handWritten != null)
this.handwritten = tabletVO.tabletProcess.handWritten.ToString();
else
this.handwritten = "";
this.complete = tabletVO.tabletProcess.complete;
}
private void refToRefCopy(ref TabletVO tabVO_To, ref TabletVO tabVO_From)
{
tabVO_To.iterationID = tabVO_From.iterationID;
tabVO_To.iterationName = tabVO_From.iterationName;
tabVO_To.pairProgrammerID = tabVO_From.pairProgrammerID;
tabVO_To.pairProgrammerName = tabVO_From.pairProgrammerName;
tabVO_To.agentResponsibleID = tabVO_From.agentResponsibleID;
tabVO_To.agentResponsibleName = tabVO_From.agentResponsibleName;
if(tabVO_To.horizontalCenter==null)
tabVO_To.horizontalCenter = new CardLocationVO();
if(tabVO_From.horizontalCenter!=null)
{
tabVO_To.horizontalCenter.centerX = tabVO_From.horizontalCenter.centerX;
tabVO_To.horizontalCenter.centerY = tabVO_From.horizontalCenter.centerY;
}
tabVO_To.hostID = tabVO_From.hostID;
tabVO_To.parentID = tabVO_From.parentID;
tabVO_To.projectID = tabVO_From.projectID;
tabVO_To.projectName = tabVO_From.projectName;
if(tabVO_To.verticalCenter==null)
tabVO_To.verticalCenter = new CardLocationVO();
if(tabVO_From.verticalCenter!=null)
{
tabVO_To.verticalCenter.centerX = tabVO_From.verticalCenter.centerX;
tabVO_To.verticalCenter.centerY = tabVO_From.verticalCenter.centerY;
}
tabVO_To.tabletProcess.accepted = tabVO_From.tabletProcess.accepted;
tabVO_To.tabletProcess.activityType = tabVO_From.tabletProcess.activityType;
tabVO_To.tabletProcess.actualEffort = tabVO_From.tabletProcess.actualEffort;
tabVO_To.tabletProcess.complete = tabVO_From.tabletProcess.complete;
tabVO_To.tabletProcess.complex = tabVO_From.tabletProcess.complex;
tabVO_To.tabletProcess.description = tabVO_From.tabletProcess.description;
tabVO_To.tabletProcess.endDate = tabVO_From.tabletProcess.endDate;
tabVO_To.tabletProcess.estimatedEffort = tabVO_From.tabletProcess.estimatedEffort;
tabVO_To.tabletProcess.handWritten = tabVO_From.tabletProcess.handWritten;
tabVO_To.tabletProcess.id = tabVO_From.tabletProcess.id;
tabVO_To.tabletProcess.initialEffort = tabVO_From.tabletProcess.initialEffort;
tabVO_To.tabletProcess.initiallyEstimated = tabVO_From.tabletProcess.initiallyEstimated;
tabVO_To.tabletProcess.name = tabVO_From.tabletProcess.name;
tabVO_To.tabletProcess.priority = tabVO_From.tabletProcess.priority;
tabVO_To.tabletProcess.processType = tabVO_From.tabletProcess.processType;
tabVO_To.tabletProcess.processTypeIDInEB = tabVO_From.tabletProcess.processTypeIDInEB;
tabVO_To.tabletProcess.mostLikelyEstimate = tabVO_From.tabletProcess.mostLikelyEstimate;
tabVO_To.tabletProcess.bestCaseEstimate = tabVO_From.tabletProcess.bestCaseEstimate;
tabVO_To.tabletProcess.worstCaseEstimate = tabVO_From.tabletProcess.worstCaseEstimate;
}
public TabletVO updateReference(TabletVO newTabletVO)
{
refToRefCopy(ref tabletVO, ref newTabletVO);
return tabletVO;
}
public TabletVO makeDeepCopy()
{
TabletVO newTabletVO = new TabletVO();
newTabletVO.tabletProcess = new TabletProcessVO();
newTabletVO.horizontalCenter = new CardLocationVO();
newTabletVO.verticalCenter = new CardLocationVO();
refToRefCopy(ref newTabletVO, ref tabletVO);
return newTabletVO;
}
public override bool Equals(Object a)
{
bool comparingResult = false;
TabletContentandUtil compaingObj = null;
if(a is TabletContentandUtil || a is TabletVO)
{
if(a is TabletVO)
compaingObj = new TabletContentandUtil((TabletVO)a);
else
compaingObj = (TabletContentandUtil)a;
if(this.iterationId == compaingObj.iterationId)
if(this.responsibleAgentId == compaingObj.responsibleAgentId)
if(this.pairAgentId == compaingObj.pairAgentId)
if(this.storyname == compaingObj.storyname)
{
if(this.storydescription == compaingObj.storydescription)
{
if(this.activityType == compaingObj.activityType)
if(this.initialEffort == compaingObj.initialEffort)
if(this.handwritten == compaingObj.handwritten)
if(this.complete.Equals(compaingObj.complete))
if(this.processType == compaingObj.processType)
if(this.parentId == compaingObj.parentId)
if(this.projectId == compaingObj.projectId)
comparingResult = true;
}
}
}
return comparingResult;
}
}
}
See more files for this project here