Fix B2013-125: crash when adding SHE procedures

Modify 'AND' range transition to actual selection of user
This commit is contained in:
Kathy Ruffing 2013-06-27 12:51:55 +00:00
parent f77ebed326
commit 45fdbc4fe3
3 changed files with 16 additions and 32 deletions

View File

@ -50,11 +50,12 @@ namespace Volian.Controls.Library
private void FillInControls() private void FillInControls()
{ {
_Initializing = true;
// for this iteminfo, get the procedure and then the list of sections. For any section, starting with // for this iteminfo, get the procedure and then the list of sections. For any section, starting with
// Foldout, add it to list: // Foldout, add it to list:
if (MyItemInfo != null) if (MyItemInfo != null)
{ {
if (MyItemInfo.MyProcedure.Sections == null || MyItemInfo.MyProcedure.Sections.Count == 0) return;
_Initializing = true;
ProcedureInfo pi = MyItemInfo.MyProcedure; ProcedureInfo pi = MyItemInfo.MyProcedure;
listBoxFoldouts.Items.Clear(); listBoxFoldouts.Items.Clear();
lstCBSteps.Items.Clear(); lstCBSteps.Items.Clear();

View File

@ -83,7 +83,6 @@ namespace Volian.Controls.Library
this.groupPanelBtns.Style.BorderRightWidth = 1; this.groupPanelBtns.Style.BorderRightWidth = 1;
this.groupPanelBtns.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelBtns.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelBtns.Style.BorderTopWidth = 1; this.groupPanelBtns.Style.BorderTopWidth = 1;
this.groupPanelBtns.Style.Class = "";
this.groupPanelBtns.Style.CornerDiameter = 4; this.groupPanelBtns.Style.CornerDiameter = 4;
this.groupPanelBtns.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelBtns.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelBtns.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelBtns.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
@ -92,12 +91,10 @@ namespace Volian.Controls.Library
// //
// //
// //
this.groupPanelBtns.StyleMouseDown.Class = "";
this.groupPanelBtns.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelBtns.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
// //
// //
// //
this.groupPanelBtns.StyleMouseOver.Class = "";
this.groupPanelBtns.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelBtns.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.groupPanelBtns.TabIndex = 25; this.groupPanelBtns.TabIndex = 25;
// //
@ -158,7 +155,6 @@ namespace Volian.Controls.Library
this.groupPanelTranFmt.Style.BorderRightWidth = 1; this.groupPanelTranFmt.Style.BorderRightWidth = 1;
this.groupPanelTranFmt.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTranFmt.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTranFmt.Style.BorderTopWidth = 1; this.groupPanelTranFmt.Style.BorderTopWidth = 1;
this.groupPanelTranFmt.Style.Class = "";
this.groupPanelTranFmt.Style.CornerDiameter = 4; this.groupPanelTranFmt.Style.CornerDiameter = 4;
this.groupPanelTranFmt.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTranFmt.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTranFmt.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTranFmt.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
@ -167,12 +163,10 @@ namespace Volian.Controls.Library
// //
// //
// //
this.groupPanelTranFmt.StyleMouseDown.Class = "";
this.groupPanelTranFmt.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTranFmt.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
// //
// //
// //
this.groupPanelTranFmt.StyleMouseOver.Class = "";
this.groupPanelTranFmt.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTranFmt.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.groupPanelTranFmt.TabIndex = 27; this.groupPanelTranFmt.TabIndex = 27;
this.groupPanelTranFmt.Text = "Select Format"; this.groupPanelTranFmt.Text = "Select Format";
@ -217,7 +211,6 @@ namespace Volian.Controls.Library
this.groupPanelTransitionSets.Style.BorderRightWidth = 1; this.groupPanelTransitionSets.Style.BorderRightWidth = 1;
this.groupPanelTransitionSets.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTransitionSets.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTransitionSets.Style.BorderTopWidth = 1; this.groupPanelTransitionSets.Style.BorderTopWidth = 1;
this.groupPanelTransitionSets.Style.Class = "";
this.groupPanelTransitionSets.Style.CornerDiameter = 4; this.groupPanelTransitionSets.Style.CornerDiameter = 4;
this.groupPanelTransitionSets.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTransitionSets.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTransitionSets.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTransitionSets.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
@ -226,12 +219,10 @@ namespace Volian.Controls.Library
// //
// //
// //
this.groupPanelTransitionSets.StyleMouseDown.Class = "";
this.groupPanelTransitionSets.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTransitionSets.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
// //
// //
// //
this.groupPanelTransitionSets.StyleMouseOver.Class = "";
this.groupPanelTransitionSets.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTransitionSets.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.groupPanelTransitionSets.TabIndex = 31; this.groupPanelTransitionSets.TabIndex = 31;
this.groupPanelTransitionSets.Text = "Select Procedure Set"; this.groupPanelTransitionSets.Text = "Select Procedure Set";
@ -273,7 +264,6 @@ namespace Volian.Controls.Library
this.groupPanelTransitionProcs.Style.BorderRightWidth = 1; this.groupPanelTransitionProcs.Style.BorderRightWidth = 1;
this.groupPanelTransitionProcs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTransitionProcs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTransitionProcs.Style.BorderTopWidth = 1; this.groupPanelTransitionProcs.Style.BorderTopWidth = 1;
this.groupPanelTransitionProcs.Style.Class = "";
this.groupPanelTransitionProcs.Style.CornerDiameter = 4; this.groupPanelTransitionProcs.Style.CornerDiameter = 4;
this.groupPanelTransitionProcs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTransitionProcs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTransitionProcs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTransitionProcs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
@ -282,12 +272,10 @@ namespace Volian.Controls.Library
// //
// //
// //
this.groupPanelTransitionProcs.StyleMouseDown.Class = "";
this.groupPanelTransitionProcs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTransitionProcs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
// //
// //
// //
this.groupPanelTransitionProcs.StyleMouseOver.Class = "";
this.groupPanelTransitionProcs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTransitionProcs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.groupPanelTransitionProcs.TabIndex = 32; this.groupPanelTransitionProcs.TabIndex = 32;
this.groupPanelTransitionProcs.Text = "Select Procedure"; this.groupPanelTransitionProcs.Text = "Select Procedure";
@ -329,7 +317,6 @@ namespace Volian.Controls.Library
this.groupPanelTransitionSect.Style.BorderRightWidth = 1; this.groupPanelTransitionSect.Style.BorderRightWidth = 1;
this.groupPanelTransitionSect.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTransitionSect.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTransitionSect.Style.BorderTopWidth = 1; this.groupPanelTransitionSect.Style.BorderTopWidth = 1;
this.groupPanelTransitionSect.Style.Class = "";
this.groupPanelTransitionSect.Style.CornerDiameter = 4; this.groupPanelTransitionSect.Style.CornerDiameter = 4;
this.groupPanelTransitionSect.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTransitionSect.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTransitionSect.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTransitionSect.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
@ -338,12 +325,10 @@ namespace Volian.Controls.Library
// //
// //
// //
this.groupPanelTransitionSect.StyleMouseDown.Class = "";
this.groupPanelTransitionSect.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTransitionSect.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
// //
// //
// //
this.groupPanelTransitionSect.StyleMouseOver.Class = "";
this.groupPanelTransitionSect.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTransitionSect.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.groupPanelTransitionSect.TabIndex = 33; this.groupPanelTransitionSect.TabIndex = 33;
this.groupPanelTransitionSect.Text = "Select Section"; this.groupPanelTransitionSect.Text = "Select Section";
@ -387,7 +372,6 @@ namespace Volian.Controls.Library
this.groupPanelTranstionSteps.Style.BorderRightWidth = 1; this.groupPanelTranstionSteps.Style.BorderRightWidth = 1;
this.groupPanelTranstionSteps.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTranstionSteps.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTranstionSteps.Style.BorderTopWidth = 1; this.groupPanelTranstionSteps.Style.BorderTopWidth = 1;
this.groupPanelTranstionSteps.Style.Class = "";
this.groupPanelTranstionSteps.Style.CornerDiameter = 4; this.groupPanelTranstionSteps.Style.CornerDiameter = 4;
this.groupPanelTranstionSteps.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTranstionSteps.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTranstionSteps.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTranstionSteps.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
@ -396,12 +380,10 @@ namespace Volian.Controls.Library
// //
// //
// //
this.groupPanelTranstionSteps.StyleMouseDown.Class = "";
this.groupPanelTranstionSteps.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTranstionSteps.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
// //
// //
// //
this.groupPanelTranstionSteps.StyleMouseOver.Class = "";
this.groupPanelTranstionSteps.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.groupPanelTranstionSteps.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.groupPanelTranstionSteps.TabIndex = 34; this.groupPanelTranstionSteps.TabIndex = 34;
this.groupPanelTranstionSteps.Text = "Select Step"; this.groupPanelTranstionSteps.Text = "Select Step";
@ -436,7 +418,6 @@ namespace Volian.Controls.Library
// //
// //
// //
this.cbIncStepNum.BackgroundStyle.Class = "";
this.cbIncStepNum.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.cbIncStepNum.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbIncStepNum.Location = new System.Drawing.Point(10, 15); this.cbIncStepNum.Location = new System.Drawing.Point(10, 15);
this.cbIncStepNum.Name = "cbIncStepNum"; this.cbIncStepNum.Name = "cbIncStepNum";
@ -451,7 +432,6 @@ namespace Volian.Controls.Library
// //
// //
// //
this.lblxTranRangeTip.BackgroundStyle.Class = "";
this.lblxTranRangeTip.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.lblxTranRangeTip.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.lblxTranRangeTip.Dock = System.Windows.Forms.DockStyle.Right; this.lblxTranRangeTip.Dock = System.Windows.Forms.DockStyle.Right;
this.lblxTranRangeTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblxTranRangeTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

View File

@ -195,7 +195,7 @@ namespace Volian.Controls.Library
// figure out whether at same level, have same parent and have same HLS: // figure out whether at same level, have same parent and have same HLS:
ItemInfo itm1 = _CurTrans.MyItemToID; ItemInfo itm1 = _CurTrans.MyItemToID;
ItemInfo itm2 = _CurTrans.MyItemRangeID; ItemInfo itm2 = _CurTrans.MyItemRangeID;
if (_CurTrans.TranType == 2 && itm1.ItemID == itm2.ItemID) itm2 = itm1.LastSibling; //if (_CurTrans.TranType == 2 && itm1.ItemID == itm2.ItemID) itm2 = itm1.LastSibling;
bool samHLS = itm1.MyHLS.ItemID == itm2.MyHLS.ItemID; bool samHLS = itm1.MyHLS.ItemID == itm2.MyHLS.ItemID;
int lev1 = 0; int lev1 = 0;
int lev2 = 0; int lev2 = 0;
@ -914,21 +914,24 @@ namespace Volian.Controls.Library
} }
if (_RangeNode2 == null) _RangeNode2 = (VETreeNode)tvTran.SelectedNode; if (_RangeNode2 == null) _RangeNode2 = (VETreeNode)tvTran.SelectedNode;
rangeItem = (ItemInfo)_RangeNode2.VEObject; rangeItem = (ItemInfo)_RangeNode2.VEObject;
// The following code was commented out in June 2013 based on a discussion with
// HVJ & PAL stating that the range transition should be specific as to what they
// enter, not set to end of list.
// If this is Transition type 2, then make 'rangenode2' same as rangenode1 // If this is Transition type 2, then make 'rangenode2' same as rangenode1
// This will get resolved when transition text is resolved. This case represents // This will get resolved when transition text is resolved. This case represents
// range from rangenode1 to last sibling. Note that this is only done if within // range from rangenode1 to last sibling. Note that this is only done if within
// the same sibling group. Otherwise, get the second item in the // the same sibling group. Otherwise, get the second item in the
// range, based on current tree view selection. // range, based on current tree view selection.
if (listBoxTranFmt.SelectedIndex == 2) //if (listBoxTranFmt.SelectedIndex == 2)
{ //{
// if type 2 and not a HLS and the range is within the same hls, then set // // if type 2 and not a HLS and the range is within the same hls, then set
// to and range to be equal. When text gets resolved, this case generates // // to and range to be equal. When text gets resolved, this case generates
// a list represent the toid,,,lastsibling. // // a list represent the toid,,,lastsibling.
if (!toItem.IsHigh && toItem.MyHLS.ItemID == rangeItem.MyHLS.ItemID) // if (!toItem.IsHigh && toItem.MyHLS.ItemID == rangeItem.MyHLS.ItemID)
rangeItem = toItem; // rangeItem = toItem;
else // else
rangeItem = rangeItem.MyHLS; // rangeItem = rangeItem.MyHLS;
} //}
// Check that the two items are of the below the section type. // Check that the two items are of the below the section type.
if (toItem.MyContent.Type < 20000 || rangeItem.MyContent.Type < 20000) if (toItem.MyContent.Type < 20000 || rangeItem.MyContent.Type < 20000)
{ {