Added code to handle when GoTo is clicked on an invalid transition
This commit is contained in:
		| @@ -6,6 +6,7 @@ using System.Text; | |||||||
| using System.Drawing; | using System.Drawing; | ||||||
| using VEPROMS.CSLA.Library; | using VEPROMS.CSLA.Library; | ||||||
| using Volian.Controls.Library; | using Volian.Controls.Library; | ||||||
|  | using System.Windows.Forms; | ||||||
|  |  | ||||||
| namespace Volian.Controls.Library | namespace Volian.Controls.Library | ||||||
| { | { | ||||||
| @@ -249,7 +250,15 @@ namespace Volian.Controls.Library | |||||||
| 		void _MyStepPanel_LinkClicked(object sender, StepPanelLinkEventArgs args) | 		void _MyStepPanel_LinkClicked(object sender, StepPanelLinkEventArgs args) | ||||||
| 		{ | 		{ | ||||||
| 			if (args.MyLinkText.LinkInfoText.IndexOf("Transition") > -1) | 			if (args.MyLinkText.LinkInfoText.IndexOf("Transition") > -1) | ||||||
| 				_MyDisplayTabControl.OpenItem(args.MyLinkText.MyTranToItemInfo); | 			{ | ||||||
|  | 				ItemInfo item = args.MyLinkText.MyTranToItemInfo; | ||||||
|  | 				if (item.PreviousID == null && item.ItemPartCount == 0 && item.ItemDocVersionCount == 0) | ||||||
|  | 				{ | ||||||
|  | 					MessageBox.Show("This transition is invalid", "Invalid Transition", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); | ||||||
|  | 					return; // Not a valid transition | ||||||
|  | 				} | ||||||
|  | 				_MyDisplayTabControl.OpenItem(item); | ||||||
|  | 			} | ||||||
| 			else | 			else | ||||||
| 				Console.WriteLine("Bring Up roeditor");  //TODO: Need to bring up roeditor or infopanel | 				Console.WriteLine("Bring Up roeditor");  //TODO: Need to bring up roeditor or infopanel | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Rich
					Rich