diff --git a/PROMS/DataLoader/PROMSFixes.Sql b/PROMS/DataLoader/PROMSFixes.Sql index cf3e4216..7da7c213 100644 --- a/PROMS/DataLoader/PROMSFixes.Sql +++ b/PROMS/DataLoader/PROMSFixes.Sql @@ -4415,10 +4415,22 @@ UPDATE NN set NN.NewContentID = CC.ContentID From Contents CC Join @Children NN on NN.ContentID = CC.Type AND CC.DTS = @DTS and CC.UserID = @UserID -- Reset the Type column in the Contents table with the Type column from the original Records. +DECLARE @SourceType INT +Select @SourceType = Type from Contents where ContentID = @StartContentID +if @SourceType = 0 + BEGIN + UPDATE CC set CC.Type = CC2.Type, CC.DTS = CC2.DTS, CC.UserID = CC2.UserID + From Contents CC + Join @Children NN on NN.NewContentID = CC.ContentID + Join Contents CC2 on NN.ContentID = CC2.ContentID + END +else + BEGIN UPDATE CC set CC.Type = CC2.Type From Contents CC Join @Children NN on NN.NewContentID = CC.ContentID Join Contents CC2 on NN.ContentID = CC2.ContentID + END -- Contents are done -- SELECT * From Contents where DTS = @DTS and UserID = @UserID -- <<< Copy Grids >>> @@ -4459,6 +4471,14 @@ SELECT @NewStartItemID = NewItemID from @Children where ItemID = @StartItemID -- Set the PreviousID for the starting Item to null temporarily. -- This will be adjusted based upon where the step is inserted. Update Items Set PreviousID = null where ItemID = @NewStartItemID +if @SourceType = 0 + BEGIN + UPDATE II SET II.DTS = II2.DTS, II.UserID = II2.UserID + From Items II + Join @Children NN on NN.NewItemID = II.ItemID + Join Items II2 on NN.ItemID = II2.ItemID + WHERE NN.ItemID = @StartItemID + END -- Items are done --SELECT * From Items where DTS = @DTS and UserID = @UserID -- <<< Copy Parts >>> diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index 56e181a5..0ad7600a 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -118,12 +118,14 @@ namespace Volian.Controls.Library _FieldToEdit = fieldToEdit; _MyItemInfo = itemInfo; OriginalText = InfoText; + if (OriginalText.Contains("Prerequisite")) + OriginalText = Regex.Replace(OriginalText, @"\\{Prerequisite Step: .*?\\}", ""); TextFont = itemInfo.GetItemFont();//GetItemFont(); // if in print mode, and this is the HLS of a smart template (checklist formats), add a space before and // after the HLS text - this allows for the vertical bar characters to be added. //if (itemInfo.IsStep && itemInfo.FormatStepData.UseSmartTemplate && epMode == E_EditPrintMode.Print) Console.WriteLine("here"); string addSpace = (itemInfo.IsStep && itemInfo.FormatStepData.UseSmartTemplate && epMode == E_EditPrintMode.Print) ? " " : ""; - string text = prefix + addSpace + InfoText + addSpace + suffix; + string text = prefix + addSpace + OriginalText + addSpace + suffix; _MyFormat = itemInfo.ActiveFormat; bool tableShouldBeOutlined = (epMode == E_EditPrintMode.Print || vwMode == E_ViewMode.View || noEdit) && diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index 0a94ca25..ac0d32a4 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -1043,6 +1043,12 @@ namespace Volian.Controls.Library MessageBox.Show(sb.ToString()); return; } + if(listBoxTranFmt.Text.Contains("{Step Text}") && toItem.ItemID == MyRTB.MyItemInfo.ItemID) + { + MessageBox.Show("You cannot add a transition to itself for a transition that includes Step Text", + "Cannot add recusive transition", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return; + } bool doTranmod = cbPageNum.Visible && cbPageNum.Checked; trantxt = TransitionText.GetResolvedText(MyRTB.MyItemInfo, listBoxTranFmt.SelectedIndex, toItem, rangeItem ?? toItem, doTranmod); int ss = MyRTB.SelectionStart;// Remember where the link is being added diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 5dec24d4..862f5c1b 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -2846,7 +2846,7 @@ namespace Volian.Controls.Library } private void btnSaveChgId_Click(object sender, EventArgs e) { - //(this.Parent as StepTabPanel).MyDisplayTabControl.ChgId = txtBxChgId.Text; + (this.Parent as StepTabPanel).MyDisplayTabControl.ChgId = txtBxChgId.Text; (this.Parent as StepTabPanel).MyDisplayTabControl.ItemsChangeIds.Remove(_MyEditItem.MyStepRTB.MyItemInfo.MyProcedure.ItemID); (this.Parent as StepTabPanel).MyDisplayTabControl.ItemsChangeIds.Add(_MyEditItem.MyStepRTB.MyItemInfo.MyProcedure.ItemID, txtBxChgId.Text); } diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 37e2f1c8..5011ee97 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -409,6 +409,9 @@ namespace Volian.Print.Library } cb.SetLineWidth(.1F); cb.Rectangle((float)layout.LeftMargin, yTop, (float)layout.PageWidth - (float)layout.LeftMargin, yBottom - yTop); + float yFooter = yBottom+(float)layout.FooterLength; + cb.MoveTo((float)layout.LeftMargin,yFooter); + cb.LineTo((float)layout.PageWidth, yFooter); float yRuler = 612; cb.MoveTo(0, yRuler); cb.LineTo(612, yRuler); @@ -465,7 +468,7 @@ namespace Volian.Print.Library foreach (PageBookmark pb in PageBookmarks) { if (!pb.MyItemInfo.IsSection && MyPdfOutline != null) - new PdfOutline(MyPdfOutline, pb.PdfDestination, pb.Title, false); + new PdfOutline(MyPdfOutline, pb.PdfDestination,Regex.Replace(pb.Title, @"\\{Prerequisite Step: .*?\\}", ""), false); else { PdfDestination dest = new PdfDestination(PdfDestination.FIT); @@ -1015,7 +1018,7 @@ namespace Volian.Print.Library } if (val != null && val != "" && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null); //if (val == null || val == "") - //val = " "; + //val = " "; if (val == null) val = ""; plstr = plstr.Replace(token, val); diff --git a/PROMS/fmtxml/Form1.cs b/PROMS/fmtxml/Form1.cs index 64fd60f4..c80a4834 100644 --- a/PROMS/fmtxml/Form1.cs +++ b/PROMS/fmtxml/Form1.cs @@ -46,7 +46,12 @@ namespace fmtxml // Required for Windows Form Designer support // InitializeComponent(); - tbFmtPath.Text = @"c:\16bit\ve-proms\format"; + if (Directory.Exists(@"c:\16bit\ve-proms\format")) + tbFmtPath.Text = @"c:\16bit\ve-proms\format"; + else if (Directory.Exists(@"c:\16-bit\ve-proms\format")) + tbFmtPath.Text = @"c:\16-bit\ve-proms\format"; + else + MessageBox.Show("Specify Path for format files.", "Cannot find 16 Bit Formats", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); tbGenmacPath.Text = @"C:\16bit\promsnt\genmac"; tbResultPath.Text = @"c:\development\"; //