// returns are special - we need to make sure the keyword gets in there private static string GetXmlGotoFromData(string data) { if (data == null || data.Length == 0) { return(""); } Shadow targetShadow = Common.GetGotoTargetFromData(data); if (targetShadow == null) { return(data); } else { ReturnShadow returnShadow = targetShadow as ReturnShadow; if (returnShadow != null) { return(Strings.ReturnKeyword); } else { return(targetShadow.GetGotoName()); } } }
// returns are special - we need to make sure the keyword gets in there private static string GetXmlGotoFromShadow(Shadow targetShadow) { if (targetShadow == null) { return(Strings.DisconnectedConnectorTarget); } ReturnShadow returnShadow = targetShadow as ReturnShadow; if (returnShadow != null) { return(Strings.ReturnKeyword); } else { return(targetShadow.GetGotoName()); } }
// Creates a shadow from a shape. Should only be called from PathMaker // event handlers when things are loaded, added, etc. public static Shadow MakeShapeShadow(Shape shape) { ShapeTypes shapeType = Common.GetShapeType(shape); Shadow shadow = null; switch (shapeType) { case ShapeTypes.CallSubDialog: shadow = new CallSubDialogShadow(shape); break; case ShapeTypes.ChangeLog: shadow = new ChangeLogShadow(shape); break; case ShapeTypes.AppDesc: shadow = new AppDescShadow(shape); break; case ShapeTypes.PrefixList: shadow = new PrefixListShadow(shape); break; case ShapeTypes.Comment: shadow = new IgnoredShadow(shape); break; case ShapeTypes.Connector: shadow = new ConnectorShadow(shape); break; case ShapeTypes.Data: shadow = new DataShadow(shape); break; case ShapeTypes.Decision: shadow = new DecisionShadow(shape); break; case ShapeTypes.DocTitle: shadow = new DocTitleShadow(shape); break; case ShapeTypes.HangUp: shadow = new HangUpShadow(shape); break; case ShapeTypes.Interaction: shadow = new InteractionShadow(shape); break; case ShapeTypes.None: break; case ShapeTypes.OffPageRef: shadow = new OffPageRefShadow(shape); break; case ShapeTypes.OnPageRefIn: shadow = new OnPageRefInShadow(shape); break; case ShapeTypes.OnPageRefOut: shadow = new OnPageRefOutShadow(shape); break; case ShapeTypes.Page: break; case ShapeTypes.Placeholder: shadow = new IgnoredShadow(shape); break; case ShapeTypes.Play: shadow = new PlayShadow(shape); break; case ShapeTypes.Return: shadow = new ReturnShadow(shape); break; case ShapeTypes.Start: shadow = new StartShadow(shape); break; case ShapeTypes.SubDialog: shadow = new SubDialogShadow(shape); break; case ShapeTypes.Transfer: shadow = new TransferShadow(shape); break; } return shadow; }
// Creates a shadow from a shape. Should only be called from PathMaker // event handlers when things are loaded, added, etc. public static Shadow MakeShapeShadow(Shape shape) { ShapeTypes shapeType = Common.GetShapeType(shape); Shadow shadow = null; switch (shapeType) { case ShapeTypes.CallSubDialog: shadow = new CallSubDialogShadow(shape); break; case ShapeTypes.ChangeLog: shadow = new ChangeLogShadow(shape); break; case ShapeTypes.AppDesc: shadow = new AppDescShadow(shape); break; case ShapeTypes.PrefixList: shadow = new PrefixListShadow(shape); break; case ShapeTypes.Comment: shadow = new IgnoredShadow(shape); break; case ShapeTypes.Connector: shadow = new ConnectorShadow(shape); break; case ShapeTypes.Data: shadow = new DataShadow(shape); break; case ShapeTypes.Decision: shadow = new DecisionShadow(shape); break; case ShapeTypes.DocTitle: shadow = new DocTitleShadow(shape); break; case ShapeTypes.HangUp: shadow = new HangUpShadow(shape); break; case ShapeTypes.Interaction: shadow = new InteractionShadow(shape); break; case ShapeTypes.None: break; case ShapeTypes.OffPageRef: shadow = new OffPageRefShadow(shape); break; case ShapeTypes.OnPageRefIn: shadow = new OnPageRefInShadow(shape); break; case ShapeTypes.OnPageRefOut: shadow = new OnPageRefOutShadow(shape); break; case ShapeTypes.Page: break; case ShapeTypes.Placeholder: shadow = new IgnoredShadow(shape); break; case ShapeTypes.Play: shadow = new PlayShadow(shape); break; case ShapeTypes.Return: shadow = new ReturnShadow(shape); break; case ShapeTypes.Start: shadow = new StartShadow(shape); break; case ShapeTypes.SubDialog: shadow = new SubDialogShadow(shape); break; case ShapeTypes.Transfer: shadow = new TransferShadow(shape); break; } return(shadow); }