public override void HandleMouseHoverOut(LTSCanvas canvas) { try { PNArc route = this.FindSelectedRouteBasedOnTransition(canvas); route.HandleMouseHoverOut(canvas); } catch { } }
public override void LoadFromXml(XmlElement elem) { Node.Text = elem.GetAttribute(NAME_PROCESS_NODE_NAME, ""); Console.Write(Node.Text); Parameters = elem.GetAttribute(PARAMETER_NODE_NAME, ""); Console.Write(Parameters); Zoom = float.Parse(elem.GetAttribute(ZOOM_PROCESS_NODE_NAME, "")); PlaceCounter = int.Parse(elem.GetAttribute(PLACE_COUNTER)); TransitionCounter = int.Parse(elem.GetAttribute(TRANSITION_COUNTER)); XmlElement placesElement = (XmlElement)elem.ChildNodes[0]; foreach (XmlElement element in placesElement.ChildNodes) { PNPlace place = new PNPlace(string.Empty, 0); place.LoadFromXml(element); this.AddSingleCanvasItem(place); this.AddSingleCanvasItem(place.labelItems); } XmlElement transitionsElement = (XmlElement)elem.ChildNodes[1]; foreach (XmlElement element in transitionsElement.ChildNodes) { PNTransition transition = new PNTransition(string.Empty); transition.LoadFromXml(element); this.AddSingleCanvasItem(transition); this.AddSingleCanvasItem(transition.labelItems); } XmlElement linksElement = (XmlElement)elem.ChildNodes[2]; foreach (XmlElement element in linksElement.ChildNodes) { PNArc arc = new PNArc(null, null); arc.LoadFromXML(element, this); this.AddSingleLink(arc); foreach (NailItem nailItem in arc.Nails) { this.AddSingleCanvasItem(nailItem); } this.AddSingleCanvasItem(arc.Label); } }
public override void RemovedFromCanvas(LTSCanvas canvas) { PNArc route = this.FindSelectedRouteBasedOnTransition(canvas); route.RemovedFromCanvas(canvas); }
public override void HandleSelected(LTSCanvas canvas) { PNArc route = this.FindSelectedRouteBasedOnTransition(canvas); route.CurrentState = ItemState.Selected; }