public InterventionPin(Intervention intervention, MapSectionPage mapSection) : base(intervention, mapSection, size) { this.intervention = intervention; //Providing a link to the team that this pin represents //Setting the image and text of the pin base.setImage(TechnicalServices.getImage("intervention")); base.setText(intervention.getInterventionNumber().ToString()); //Setting the intervention pin of all team pins that are intervening on this pin foreach (TeamPin teamPin in getInterveningTeamsPin()) { teamPin.setInterventionPin(this); } //Register as an observer to the intervention instance so that any modification to it are reflected on the map, e.g. addition of a team intervention.RegisterInstanceObserver(this); }
public InterventionFormPage(InterventionSectionPage interventionSection, Intervention intervention) { InitializeComponent(); this.interventionSection = interventionSection; this.intervention = intervention; setInterventionNumber(intervention.getInterventionNumber()); //Set the intervention type RED if it is of code 1 //dispatcherTimer.Tick += new EventHandler(PersistencyUpdate); //dispatcherTimer.Interval += new TimeSpan(0, 0, 30); //dispatcherTimer.Start(); BuildComponents(); details.Focus(); intervention.RegisterInstanceObserver(this); }