diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index f282b01c..13933954 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -9,6 +9,7 @@ using System.Windows.Forms; using System.Text.RegularExpressions; using AT.STO.UI.Win; using VEPROMS.CSLA.Library; +using Volian.Base.Library; namespace Volian.Controls.Library { @@ -990,6 +991,17 @@ namespace Volian.Controls.Library linktxt = string.Format("#Link:Transition:{0} {1}", listBoxTranFmt.SelectedIndex, toItem.ItemID); } // Can I build the text right now? + ProposedTransition pt = CanTransitionBeCreatedCommand.Execute(MyRTB.MyItemInfo.ItemID, toItem.ItemID); + if (pt.Status == 0) + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("Applicability of source and destination steps will not allow transistion to be created."); + sb.AppendLine(); + sb.AppendLine(string.Format("Source step {0} has applicability of {1}", pt.FromStep, pt.FromAppl)); + sb.AppendLine(string.Format("Destination step {0} has applicability of {1}", pt.ToStep, pt.ToAppl)); + MessageBox.Show(sb.ToString()); + return; + } trantxt = TransitionText.GetResolvedText(MyRTB.MyItemInfo, listBoxTranFmt.SelectedIndex,toItem,rangeItem ?? toItem); int ss = MyRTB.SelectionStart;// Remember where the link is being added int sl = MyRTB.SelectionLength;