Fixed CopyItemAndChildren so that change bars are not changed for copied procedures.

Changed logic so that VE-PROMS source code can be located in either 16Bit or 16-Bit folders
This strips prerequisite step references from procedure text when printing
Recursive transitions cannot be added to procedure text.  If you try to add a transition to a step that contains the text of the step, you will be told that this is not permitted.
Default Change IDs were not being properly updated.
Added footer line to the debug rulers when creating a PDF.
Removed Prerequisite Step references in the PDF bookmarks
This commit is contained in:
Rich 2014-07-22 00:05:06 +00:00
parent b5bf9e85f0
commit a16ea8a6ac
6 changed files with 41 additions and 5 deletions

View File

@ -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 >>>

View File

@ -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) &&

View File

@ -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

View File

@ -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);
}

View File

@ -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);

View File

@ -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\";
//