Compare commits

..

28 Commits

Author SHA1 Message Date
1170822dad F2023-138 For all of the used Barakah formats, set the color of the ECI footer text to Red and changed the font size to 12pt and font style to Bold 2023-10-25 09:36:38 -04:00
168fa1da10 Merge pull request 'GenWork' (#141) from GenWork into Development
Merging into Development after successful code review
2023-10-23 13:45:24 -04:00
9792c7b900 Merge branch 'GenWork' of https://git.volian.com/Volian/SourceCode into GenWork 2023-10-19 09:14:27 -04:00
f1aa365958 B2023-103: Improve User Interface for Incoming Transitions 2023-10-19 09:14:09 -04:00
621ec356fd B2023-103: Incoming transition User Interface Improvements 2023-10-19 08:41:58 -04:00
7e3ffffd9a Merge pull request 'B2021-089' (#140) from B2021-089_Approve_PC_RO into Development
Reviewed-on: #140
Code review completed successfully.
2023-10-19 06:30:46 -04:00
266667a6df B2021-089
Depending on how Parent/Child Applicability was set up, the Child Applicability Names were not being sent to the RO Editor.  This prevented adding Child specific RO field values.
2023-10-18 15:28:08 -04:00
22e70d03ad Merge pull request '~Fixed ALTER TABLE statement that adds the ApplicablePlant column to the Formats table so that it checks if the column exists' (#137) from C2023-017 into Development
Merging into Development.  No code review needed.
2023-10-18 09:07:25 -04:00
f320c8a865 ~Fixed ALTER TABLE statement that adds the ApplicablePlant column to the Formats table so that it checks if the column exists 2023-10-18 09:06:08 -04:00
bf3ddcc122 Merge pull request 'C2023-019 Added a message box to install the latest PROMSFixes for when PROMS opens a database that does not have the needed Stored Procedures that allow for displaying only the formats related to that plant.' (#135) from C2023-019_Cant_Load_db_Old_PROMSFixes into Development
Merging C2023-019 into Development after successful code review.
2023-10-17 09:25:14 -04:00
a94fb328de Merge pull request 'B2023-104 Import procedure and Go To RO' (#136) from B2023-104_GoTo_RO_Crash into Development
Reviewed-on: #136
Code review completed successfully.
2023-10-17 07:47:48 -04:00
a79819bb65 B2023-104 Import procedure and Go To RO
Added a check for a bad RO link when trying to do a Go To RO. A message box pops up telling the user to re-link that RO.

Fixed the Import logic so that an old RO link reference can be replaced with the new one that is generated when a procedure is processed during the Import function.  The Import caused the Bad RO link reported in this bug.  This bug was introduced when the ROID was standardized in length and formatting (new RO logic in 2022).
2023-10-16 15:33:45 -04:00
fedbb698ab C2023-019 Added a message box to install the latest PROMSFixes for when PROMS opens a database that does not have the needed Stored Procedures that allow for displaying only the formats related to that plant. 2023-10-13 14:03:39 -04:00
928fba3b37 Merge pull request 'B2023-101 & 102: Incoming Transition & Copy/Paste Replace with Incoming Transitionis crashes' (#134) from GenWork into Development
Passed code review.  OK to generate test executable.
2023-10-12 09:12:16 -04:00
3b88b78b34 B2023-101 & 102: Incoming Transition & Copy/Paste Replace with Incoming Transitionis crashes 2023-10-12 08:29:21 -04:00
4e064786e0 Merge pull request 'C2023-018 Upgrade: sub-step pagination' (#132) from GenWork into Development
code changes look good to proceed with testing.
2023-10-10 08:22:32 -04:00
447c6ce343 C2023-018 Upgrade: sub-step pagination 2023-10-10 07:05:12 -04:00
8ce9380afe Merge pull request 'C2023-016 – Expanded Find/Replace to search through all of the step editor sections in the same procedure.' (#129) from C2023-016_Find-Replace-all-step-sections into Development
Merging C2023-016 into development after successful code review
2023-10-06 10:13:07 -04:00
d275e9353f Merge pull request '~Modified PROMSFixes.sql to update ApplicablePlant formats that are Generic before updating plant-specific due to potential for a plant-specific format description to have the word generic in it.' (#130) from C2023-017 into Development
Merging into Development.  No code review needed.
2023-10-05 15:31:16 -04:00
8f17b49287 ~Modified PROMSFixes.sql to update ApplicablePlant formats that are Generic before updating plant-specific due to potential for a plant-specific format description to have the word generic in it. 2023-10-05 15:29:50 -04:00
f37872e209 C2023-016 – Expanded Find/Replace to search through all of the step editor sections in the same procedure. 2023-10-04 11:38:00 -04:00
b34fb42f94 Merge pull request 'C2023-017: Added logic to filter the format list when selecting a format to be applied to a section' (#126) from C2023-017 into Development
Code review completed.  Merging into Development.
2023-10-03 11:34:24 -04:00
cbcf7c845d ~Restructured PROMSFixes.sql to add updates above section that lists RevDate and RevDescription 2023-10-03 11:09:47 -04:00
4be7cdc6c7 ~Added database changes to PROMSFixes.sql 2023-10-03 09:18:53 -04:00
55a78eb845 C2023-017:
~Moved original code for populating the filtered list to a separate static class named FormatUtility in Volian.Controls.Library
~Renamed method to GetFilteredFormatList
~Updated code to reference new static class and method
~Added logic to other applicable forms
2023-10-03 09:03:06 -04:00
52a1e0dd5b Merge pull request 'F2023-137 Added a top continue message to the alarm point pages' (#127) from GeneralDebugging into Development
format only change
2023-10-02 11:19:14 -04:00
b83ec3520b C2023-017: Added logic to filter the format list when selecting a format to be applied to a section 2023-10-02 09:03:15 -04:00
0cd54eb2e4 Merge pull request 'B2023-100 Fixed the positioning of the header box for the Introduction section to match all of the other section types' (#125) from GeneralDebugging into Development
format only changes.
2023-09-29 11:01:49 -04:00
30 changed files with 1303 additions and 952 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -21941,6 +21941,214 @@ GO
========================================================================================================== ==========================================================================================================
*/ */
/****** Add the ApplicablePlant field to the Formats table ******/
/****** Add the ApplicablePlant field to the Formats table ******/
IF COL_LENGTH('Formats', 'ApplicablePlant') IS NULL
BEGIN
ALTER TABLE Formats ADD ApplicablePlant int NULL;
END
GO
/****** Update the Formats table with the appropriate ApplicablePlant value ******/
--This update statement corrects a typo in the name of one of the format records
UPDATE Formats SET [Description] = REPLACE([Description], 'Robimson', 'Robinson') WHERE [Description] LIKE '%Robimson%';
UPDATE Formats SET ApplicablePlant = 1000 WHERE [Description] LIKE '%Proms%' OR [Description] LIKE '%Generic%' OR [Name] LIKE 'EXP%' OR [Name] LIKE 'Proms%' OR [Name] LIKE 'base%';
UPDATE Formats SET ApplicablePlant = 1 WHERE [Description] LIKE '%DC Cook%' OR [Name] LIKE 'AEP%';
UPDATE Formats SET ApplicablePlant = 2 WHERE [Description] LIKE '%Calvert%' OR [Name] LIKE 'BGE%';
UPDATE Formats SET ApplicablePlant = 3 WHERE [Description] LIKE '%BNPP%' OR [Name] LIKE 'BNPP%';
UPDATE Formats SET ApplicablePlant = 4 WHERE [Description] LIKE '%Beaver Valley%' OR [Name] LIKE 'BVPS%';
UPDATE Formats SET ApplicablePlant = 5 WHERE [Description] LIKE '%Byr-Bwd%' OR ([Name] LIKE 'EXC%' OR [Name] LIKE 'EXEB%' OR [Name] LIKE 'CWE%');
UPDATE Formats SET ApplicablePlant = 6 WHERE [Description] LIKE '%Callaway%' OR [Name] LIKE 'CAL%';
UPDATE Formats SET ApplicablePlant = 7 WHERE [Description] LIKE '%Catawba%' OR [Name] LIKE 'CAT%';
UPDATE Formats SET ApplicablePlant = 8 WHERE [Description] LIKE '%Comanche%' OR ([Name] LIKE 'CAT%' OR [Name] LIKE 'ComPeak%' OR [Name] LIKE 'CPD%' OR [Name] LIKE 'CPF%' OR [Name] LIKE 'CPS%' OR [Name] LIKE 'TUEC%');
UPDATE Formats SET ApplicablePlant = 9 WHERE [Description] LIKE '%Robinson%' OR [Name] LIKE 'AEP%' OR [Name] LIKE 'RNP%';
UPDATE Formats SET ApplicablePlant = 10 WHERE [Description] LIKE '%Harris%' OR ([Name] LIKE 'CPLS%' OR [Name] LIKE 'SHE%');
UPDATE Formats SET ApplicablePlant = 11 WHERE [Description] LIKE '%IP%' OR [Name] LIKE 'IP%';
UPDATE Formats SET ApplicablePlant = 12 WHERE [Description] LIKE '%Farley%' OR [Name] LIKE 'FNP%';
UPDATE Formats SET ApplicablePlant = 13 WHERE [Description] LIKE '%Turkey%' OR [Name] LIKE 'FPL%' OR [Name] LIKE 'TP%';
UPDATE Formats SET ApplicablePlant = 14 WHERE [Description] LIKE '%Ginna%' OR [Name] LIKE 'Ginna%' OR [Name] LIKE 'RGE%';
UPDATE Formats SET ApplicablePlant = 15 WHERE [Description] LIKE '%Vogtle%' OR [Name] LIKE 'GPC%' OR [Name] LIKE 'VEGP%';
UPDATE Formats SET ApplicablePlant = 16 WHERE [Description] LIKE '%South Texas%' OR [Name] LIKE 'HLP%' OR [Name] LIKE 'OHLP%';
UPDATE Formats SET ApplicablePlant = 17 WHERE [Description] LIKE '%McGuire%' OR [Name] LIKE 'MCG%';
UPDATE Formats SET ApplicablePlant = 18 WHERE [Description] LIKE '%PI%' OR [Name] LIKE 'NSP%';
UPDATE Formats SET ApplicablePlant = 19 WHERE [Description] LIKE '%Southern Nuclear%' OR [Name] LIKE 'STHN%';
UPDATE Formats SET ApplicablePlant = 20 WHERE [Description] LIKE '%VC Summer%' OR [Name] LIKE 'SUM%' OR [Name] LIKE 'VCB%' OR [Name] LIKE 'VCS%';
UPDATE Formats SET ApplicablePlant = 21 WHERE [Description] LIKE '%TVA%' OR [Name] LIKE 'TVA%';
UPDATE Formats SET ApplicablePlant = 22 WHERE [Description] LIKE '%Wolf%' OR [Name] LIKE 'WCN%';
UPDATE Formats SET ApplicablePlant = 23 WHERE [Description] LIKE '%Westinghouse%' OR [Name] LIKE 'WST%';
/****** Object: StoredProcedure [dbo].[getFormats] Script Date: 9/28/2023 8:42:56 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2018 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
ALTER PROCEDURE [dbo].[getFormats]
WITH EXECUTE AS OWNER
AS
BEGIN
with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged],[ApplicablePlant]) as
(select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged],[ApplicablePlant]
FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5
union all -- Child formats
select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged], fs.[ApplicablePlant]
from formats fs
join formatz fz on fz.FormatID = fs.ParentID
where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml)
select * from (
select *,
(SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount],
(SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount],
(SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount],
(SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz) t1
where Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0)
END
RETURN
/****** Object: StoredProcedure [dbo].[getAllFormats] Script Date: 9/28/2023 8:32:15 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2018 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
ALTER PROCEDURE [dbo].[getAllFormats]
WITH EXECUTE AS OWNER
AS
SELECT * From (SELECT
[FormatID],
[ParentID],
[Name],
[Description],
[Data],
[Config],
[GenMac],
[DTS],
[UserID],
[LastChanged],
[ApplicablePlant],
(SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formats].[FormatID]) [ContentCount],
(SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formats].[FormatID]) [DocVersionCount],
(SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formats].[FormatID]) [FolderCount],
(SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formats].[FormatID]) [ChildCount]
FROM [Formats] ) T1
RETURN
/****** Object: StoredProcedure [dbo].[getFormatByName] Script Date: 9/29/2023 12:16:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[getFormatByName]
(
@Name varchar(255)
)
WITH EXECUTE AS OWNER
AS
DECLARE @FormatID INT
Set @FormatID = (select FormatID from Formats where Name = @Name)
BEGIN
with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged],[ApplicablePlant]) as
(select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged],[ApplicablePlant]
FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5
union all -- Child formats
select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged], fs.[ApplicablePlant]
from formats fs
join formatz fz on fz.FormatID = fs.ParentID
where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml)
select *,
(SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount],
(SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount],
(SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount],
(SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz
WHERE [FormatID]=@FormatID
END
SELECT
[Contents].[ContentID],
[Contents].[Number],
[Contents].[Text],
[Contents].[Type],
[Contents].[FormatID],
[Contents].[Config],
[Contents].[DTS],
[Contents].[UserID],
[Contents].[LastChanged]
FROM [Contents]
WHERE
[Contents].[FormatID]=@FormatID
SELECT
[DocVersions].[VersionID],
[DocVersions].[FolderID],
[DocVersions].[VersionType],
[DocVersions].[Name],
[DocVersions].[Title],
[DocVersions].[ItemID],
[DocVersions].[FormatID],
[DocVersions].[Config],
[DocVersions].[DTS],
[DocVersions].[UserID],
[DocVersions].[LastChanged],
[Folders].[ParentID] [Folder_ParentID],
[Folders].[DBID] [Folder_DBID],
[Folders].[Name] [Folder_Name],
[Folders].[Title] [Folder_Title],
[Folders].[ShortName] [Folder_ShortName],
[Folders].[FormatID] [Folder_FormatID],
[Folders].[ManualOrder] [Folder_ManualOrder],
[Folders].[Config] [Folder_Config],
[Folders].[DTS] [Folder_DTS],
[Folders].[UsrID] [Folder_UsrID]
FROM [DocVersions]
JOIN [Folders] ON
[Folders].[FolderID]=[DocVersions].[FolderID]
WHERE
[DocVersions].[FormatID]=@FormatID
SELECT
[Folders].[FolderID],
[Folders].[ParentID],
[Folders].[DBID],
[Folders].[Name],
[Folders].[Title],
[Folders].[ShortName],
[Folders].[FormatID],
[Folders].[ManualOrder],
[Folders].[Config],
[Folders].[DTS],
[Folders].[UsrID],
[Folders].[LastChanged],
[Connections].[Name] [Connection_Name],
[Connections].[Title] [Connection_Title],
[Connections].[ConnectionString] [Connection_ConnectionString],
[Connections].[ServerType] [Connection_ServerType],
[Connections].[Config] [Connection_Config],
[Connections].[DTS] [Connection_DTS],
[Connections].[UsrID] [Connection_UsrID]
FROM [Folders]
JOIN [Connections] ON
[Connections].[DBID]=[Folders].[DBID]
WHERE
[Folders].[FormatID]=@FormatID
RETURN
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
/* /*
@ -21976,8 +22184,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255) DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255) DECLARE @RevDescription varchar(255)
set @RevDate = '10/03/2022 2:00 PM' set @RevDate = '10/03/2023 11:00 AM'
set @RevDescription = 'B2022-124: [JPR] Blank RO Values (All Spaces) printing as ?' set @RevDescription = 'C2023-017: Added logic to filter the format list when selecting a format to be applied to a section'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
@ -21995,3 +22203,6 @@ ELSE PRINT 'StoredProcedure [vesp_GetSQLCodeRevision] Error on Creation'
go go
Exec vesp_GetSQLCodeRevision; Exec vesp_GetSQLCodeRevision;

View File

@ -4116,6 +4116,11 @@ namespace VEPROMS
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
// B2023-104 use this to replace RO Link information in the imported text
// FormatRoidKey() was creating the roid with the new formatting introduce with B2022-088 & B2022-098
// We need to save the ROID from the imported text in order to update it with the new RO link information
string contentROID = roid;
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections // B2022-088: [JPR] Find Doc Ro button not working in Word Sections
// B2022-098: [JPR] ROs not being resolved in Word Sections // B2022-098: [JPR] ROs not being resolved in Word Sections
roid = ROFSTLookup.FormatRoidKey(roid, true); roid = ROFSTLookup.FormatRoidKey(roid, true);
@ -4135,7 +4140,8 @@ namespace VEPROMS
rou.Save(); rou.Save();
RoUsageInfo roui = RoUsageInfo.Get(rou.ROUsageID); RoUsageInfo roui = RoUsageInfo.Get(rou.ROUsageID);
string lookFor = string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rousageid, roid, oldRODbID.ToString()); //B2023-104 use the ROID from the imported text (contentROID) to create the lookFor string
string lookFor = string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rousageid, contentROID, oldRODbID.ToString());
string replaceWith = string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rou.ROUsageID.ToString(), roid, newRODbID.ToString()); string replaceWith = string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rou.ROUsageID.ToString(), roid, newRODbID.ToString());
_DidProcessROs = content.Text.Contains(lookFor); // B2017-076 RO link in the text so we will be processing it _DidProcessROs = content.Text.Contains(lookFor); // B2017-076 RO link in the text so we will be processing it

View File

@ -13,6 +13,7 @@ using DevComponents.DotNetBar.Controls;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using VEPROMS.Properties; using VEPROMS.Properties;
using DescriptiveEnum; using DescriptiveEnum;
using Volian.Controls.Library;
namespace VEPROMS namespace VEPROMS
{ {
@ -150,8 +151,8 @@ namespace VEPROMS
ppCmbxFormat.DataSource = null; ppCmbxFormat.DataSource = null;
ppCmbxFormat.DisplayMember = "FullName"; ppCmbxFormat.DisplayMember = "FullName";
ppCmbxFormat.ValueMember = "FullName"; ppCmbxFormat.ValueMember = "FullName";
ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList; ppCmbxFormat.DataSource = FormatUtility.GetFilteredFormatList(FormatInfoList.SortedFormatInfoList);
if (_FolderConfig != null && _FolderConfig.MyFolder != null) _cmbxformatOriginal = _FolderConfig.MyFolder.FormatID; if (_FolderConfig != null && _FolderConfig.MyFolder != null) _cmbxformatOriginal = _FolderConfig.MyFolder.FormatID;
if (_FolderConfig.FormatSelection != null) if (_FolderConfig.FormatSelection != null)
{ {
ppCmbxFormat.SelectedValue = _FolderConfig.FormatSelection; ppCmbxFormat.SelectedValue = _FolderConfig.FormatSelection;

View File

@ -324,8 +324,10 @@ namespace VEPROMS
{ {
if (UserInfo.CanEdit(frmVEPROMS.SMyUserInfo, MyPromsPrinter.MyItem.MyDocVersion)) if (UserInfo.CanEdit(frmVEPROMS.SMyUserInfo, MyPromsPrinter.MyItem.MyDocVersion))
{ {
if (FlexibleMessageBox.Show(this, "The procedure PDF file was created by removing certain hard returns,\r\ntrailing spaces, and manual page breaks that could affect the\r\n"+ // C2023-018: Clarify message on temporary/permanent removal of returns/spaces & page breaks
"pagination of the procedure.\r\n\r\nAfter reviewing the PDF file, do you want to save the changes made?", if (FlexibleMessageBox.Show(this, "The procedure PDF file was created by temporarily removing certain hard returns,\r\ntrailing spaces, and/or manual page breaks that could affect the pagination\r\n"+
"of the procedure.\r\n\r\nAfter reviewing the PDF file, do you want to permanently remove the deleted hard returns, \r\nspaces and/or manual page breaks?\r\n\r\n"+
"An annotation will be added to every location where data has been deleted. The locations \r\ncan be found by performing a Global Search for the \"Manual Pagination Issues\" annotation type.",
"Confirm Pagination Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) "Confirm Pagination Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{ {
MyPromsPrinter.SavePaginationFixes(); MyPromsPrinter.SavePaginationFixes();

File diff suppressed because it is too large Load Diff

View File

@ -364,7 +364,7 @@ namespace VEPROMS
ppCmbxFormat.DataSource = null; ppCmbxFormat.DataSource = null;
ppCmbxFormat.DisplayMember = "FullName"; ppCmbxFormat.DisplayMember = "FullName";
ppCmbxFormat.ValueMember = "FullName"; ppCmbxFormat.ValueMember = "FullName";
ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList; ppCmbxFormat.DataSource = FormatUtility.GetFilteredFormatList(FormatInfoList.SortedFormatInfoList);
if (_SectionConfig.MySection.MySectionInfo.ActiveFormat != null) _cmbxformatOriginal = (int)_SectionConfig.MySection.MySectionInfo.ActiveFormat.FormatID; if (_SectionConfig.MySection.MySectionInfo.ActiveFormat != null) _cmbxformatOriginal = (int)_SectionConfig.MySection.MySectionInfo.ActiveFormat.FormatID;
if (_SectionConfig.FormatSelection != null) if (_SectionConfig.FormatSelection != null)
ppCmbxFormat.SelectedValue = _SectionConfig.FormatSelection; ppCmbxFormat.SelectedValue = _SectionConfig.FormatSelection;

View File

@ -168,7 +168,7 @@ namespace VEPROMS
ppCmbxFormat.DataSource = null; ppCmbxFormat.DataSource = null;
ppCmbxFormat.DisplayMember = "FullName"; ppCmbxFormat.DisplayMember = "FullName";
ppCmbxFormat.ValueMember = "FullName"; ppCmbxFormat.ValueMember = "FullName";
ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList; ppCmbxFormat.DataSource = FormatUtility.GetFilteredFormatList(FormatInfoList.SortedFormatInfoList);
_cmbxformatOriginal = _DocVersionConfig.MyDocVersion.FormatID; _cmbxformatOriginal = _DocVersionConfig.MyDocVersion.FormatID;
if (_DocVersionConfig.FormatSelection != null) if (_DocVersionConfig.FormatSelection != null)

View File

@ -2508,11 +2508,28 @@ namespace VEPROMS.CSLA.Library
firstTrans = false; firstTrans = false;
if (!CanDeleteObject()) if (!CanDeleteObject())
throw new System.Security.SecurityException("User not authorized to remove a Item"); throw new System.Security.SecurityException("User not authorized to remove a Item");
// B2016-009 check source and desintation types and display message box if needed
// C2022-017 moved the CheckSourceDestinationType call to btnPasteReplace_Click in StepTabRibbon
// B2023-101 Handle Paste Replace when procedure to be replaced has Incoming Transitions, i.e. do a separate try/catch for this case
ItemInfo newItemInfo = null;
try
{
newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo); //itemInfo.ItemID, itemInfo.MyContent.Type, itemInfo.MyContent.Type);
if (newItemInfo == null) return null;
}
catch (Exception ex1)
{
if (ex1.Message.Contains("has External Transitions and has no next step")
|| ex1.Message.Contains("has External Transitions to Procedure")
|| ex1.Message.Contains("has External Transitions to it's children"))
{
FlexibleMessageBox.Show("This procedure has external transition references to it that must be resolved before doing the Paste/Replace.\r\nRight Click on the procedure and select the Incoming Transitions menu option to find these references and resolve them.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return null;
}
}
try try
{ {
// B2016-009 check source and desintation types and display message box if needed
// C2022-017 moved the CheckSourceDestinationType call to btnPasteReplace_Click in StepTabRibbon
ItemInfo newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo); //itemInfo.ItemID, itemInfo.MyContent.Type, itemInfo.MyContent.Type);
// Delete business objects, including remove from tree // Delete business objects, including remove from tree
ItemInfo.DeleteItemInfoAndChildren(itemInfo.ItemID); // Dispose ItemInfo and Children ItemInfo.DeleteItemInfoAndChildren(itemInfo.ItemID); // Dispose ItemInfo and Children
using (Item item = Get(newItemInfo.ItemID)) ItemInfo.Refresh(item); using (Item item = Get(newItemInfo.ItemID)) ItemInfo.Refresh(item);

View File

@ -192,6 +192,16 @@ namespace VEPROMS.CSLA.Library
return _UserID; return _UserID;
} }
} }
private int _ApplicablePlant = 0;
public int ApplicablePlant
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty("ApplicablePlant", true);
return _ApplicablePlant;
}
}
private int _FormatContentCount = 0; private int _FormatContentCount = 0;
/// <summary> /// <summary>
/// Count of FormatContents for this Format /// Count of FormatContents for this Format
@ -518,6 +528,7 @@ namespace VEPROMS.CSLA.Library
_FormatDocVersionCount = dr.GetInt32("DocVersionCount"); _FormatDocVersionCount = dr.GetInt32("DocVersionCount");
_FormatFolderCount = dr.GetInt32("FolderCount"); _FormatFolderCount = dr.GetInt32("FolderCount");
_ChildFormatCount = dr.GetInt32("ChildCount"); _ChildFormatCount = dr.GetInt32("ChildCount");
_ApplicablePlant = dr.GetInt32("ApplicablePlant");
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -160,6 +160,14 @@ namespace VEPROMS.CSLA.Library
catch (Exception ex) catch (Exception ex)
{ {
if (_MyLog.IsErrorEnabled) _MyLog.Error("FormatInfoList.DataPortal_Fetch", ex); if (_MyLog.IsErrorEnabled) _MyLog.Error("FormatInfoList.DataPortal_Fetch", ex);
System.Text.StringBuilder sbMsg = new System.Text.StringBuilder();
sbMsg.Append("The SQL Stored Procedures may need updating.");
sbMsg.Append("\n\nPlease have your DBA update the database with the PROMSFixes.sql script file that was delivered with this PROMS executable.");
sbMsg.Append("\n\nThe PROMSFixes.sql file is included with the PROMS installation download.");
sbMsg.Append("\n\nIt can also be found in your PROMS executable folder:");
sbMsg.AppendFormat("\n\t{0}", Volian.Base.Library.ExeInfo.PROMSExecutableFolderPath());
System.Windows.Forms.MessageBox.Show(sbMsg.ToString(), "Update Stored Procedures", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
throw new DbCslaException("FormatInfoList.DataPortal_Fetch", ex); throw new DbCslaException("FormatInfoList.DataPortal_Fetch", ex);
} }
this.RaiseListChangedEvents = true; this.RaiseListChangedEvents = true;

View File

@ -544,7 +544,7 @@ namespace Volian.Controls.Library
foreach (DocVersionInfo dvi in dvil) foreach (DocVersionInfo dvi in dvil)
{ {
DocVersionConfig dvc = dvi.DocVersionConfig; DocVersionConfig dvc = dvi.DocVersionConfig;
if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Name != "0") if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Count > 1) // B2021-089 only pass in applicability info if defined for more than one unit
{ {
args += " \"PC=" + dvc.Unit_Name + "\""; args += " \"PC=" + dvc.Unit_Name + "\"";
break; break;
@ -1018,7 +1018,7 @@ namespace Volian.Controls.Library
{ {
DocVersionConfig jdvc = dvi.DocVersionConfig; DocVersionConfig jdvc = dvi.DocVersionConfig;
if (jdvc != null && jdvc.Unit_Name != "" && jdvc.Unit_Name != "0") if (jdvc != null && jdvc.Unit_Name != "" && jdvc.Unit_Count > 1) // B2021-089 only pass in applicability info if defined for more than one unit
{ {
args += " \"PC=" + jdvc.Unit_Name + "\""; args += " \"PC=" + jdvc.Unit_Name + "\"";
break; break;

View File

@ -733,7 +733,7 @@ namespace Volian.Controls.Library
foreach (DocVersionInfo dvi in dvil) foreach (DocVersionInfo dvi in dvil)
{ {
DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig; DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig;
if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Name != "0") if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Count > 1) // B2021-089 only pass in applicability info if defined for more than one unit
roloc += " \"/PC=" + dvc.Unit_Name + "\""; roloc += " \"/PC=" + dvc.Unit_Name + "\"";
break; break;
} }

View File

@ -1094,20 +1094,6 @@ namespace Volian.Controls.Library
// cbxSrchTypeUsage // cbxSrchTypeUsage
// //
this.cbxSrchTypeUsage.BackColor = System.Drawing.Color.Transparent; this.cbxSrchTypeUsage.BackColor = System.Drawing.Color.Transparent;
//
this.btnTranCvtAllToTxt.Enabled = false;
this.btnTranCvtAllToTxt.Location = new System.Drawing.Point(6, 63);
this.btnTranCvtAllToTxt.Name = "btnTranCvtAllToTxt";
this.btnTranCvtAllToTxt.Size = new System.Drawing.Size(109, 22);
this.superTooltip1.SetSuperTooltip(this.btnTranCvtAllToTxt, new DevComponents.DotNetBar.SuperTooltipInfo("Convert All Incoming Transitions To Text", "", "Converts all of the transitions in the results list to text unless the user does " +
"not have permission to change text.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(170, 90)));
this.btnTranCvtAllToTxt.TabIndex = 1;
this.btnTranCvtAllToTxt.Text = "Convert All To Text";
this.btnTranCvtAllToTxt.UseVisualStyleBackColor = true;
this.btnTranCvtAllToTxt.Click += new System.EventHandler(this.btnTranCvtAllToTxt_Click);
//
// lblSrchIncTran
//
this.cbxSrchTypeUsage.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.cbxSrchTypeUsage.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbxSrchTypeUsage.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; this.cbxSrchTypeUsage.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.cbxSrchTypeUsage.Dock = System.Windows.Forms.DockStyle.Bottom; this.cbxSrchTypeUsage.Dock = System.Windows.Forms.DockStyle.Bottom;

View File

@ -628,6 +628,11 @@ namespace Volian.Controls.Library
AddMessageForEmptyAnnotations(); AddMessageForEmptyAnnotations();
cmbResultsStyle.SelectedIndex = 1; //display step locations in results cmbResultsStyle.SelectedIndex = 1; //display step locations in results
DisplayResults(); DisplayResults();
//If any transitions are listed after the Convert, Admin Tools/Links/Refresh Transitions can be used to fix incorrect links. This will eliminate any in the list.
// B2023-103 if any items are left in search list, there may be bad transition link data - put out a message box
if (fromTranCvtBtn)
FlexibleMessageBox.Show(this, "If items remain in the list after performing Convert All to Text, running Admin Tools/Links/Refresh Transitions will clear the list.",
"Convert Transitions to Text", MessageBoxButtons.OK);
} }
else else
{ {
@ -1134,6 +1139,9 @@ namespace Volian.Controls.Library
// C2020-033: Before allowing conversion of Incoming Transitions to text, get list of results that the user has permission edit. // C2020-033: Before allowing conversion of Incoming Transitions to text, get list of results that the user has permission edit.
private List<int> TranCvtCheckPermission(bool all) private List<int> TranCvtCheckPermission(bool all)
{ {
// B2023-102 Don't crash on converting incoming transitions to text if there are none (can happen if 2nd pass occurs)
if (_SearchResults == null) return null;
// check if a non-reader can convert transitions to text even if a reader - this is set by an administrator on the top // check if a non-reader can convert transitions to text even if a reader - this is set by an administrator on the top
// folder properties dialog // folder properties dialog
bool allowNonAdmin = IncTranCvtPerm(); bool allowNonAdmin = IncTranCvtPerm();
@ -1175,8 +1183,11 @@ namespace Volian.Controls.Library
} }
else else
{ {
DialogResult ans = FlexibleMessageBox.Show("Are you sure you want to convert the transitions to text?", // B2023-103 add spinner (WaitCursor) and also, change FlexibleMessageBox to regular MessageBox since restore of cursor to
"Convert Transition to Text", MessageBoxButtons.YesNo, MessageBoxIcon.Question); // wait cursor did not work after FlexibleMessageBox
Cursor savcursor = Cursor;
DialogResult ans = MessageBox.Show(this, "Are you sure you want to convert the transitions to text?", "Convert Transitions to Text", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
this.Cursor = savcursor;
if (ans == DialogResult.No) return null; if (ans == DialogResult.No) return null;
} }
@ -1251,6 +1262,8 @@ namespace Volian.Controls.Library
// C2020-033: For items in list, do the actual conversion of the Incoming Transition to text // C2020-033: For items in list, do the actual conversion of the Incoming Transition to text
private void TranCvtToTxt(List<int> itmsEditable) private void TranCvtToTxt(List<int> itmsEditable)
{ {
// B2023-103 Add wait cursor (and remove at end)
this.Cursor = Cursors.WaitCursor;
ItemInfo trII = SearchIncTransII; ItemInfo trII = SearchIncTransII;
if (trII != null) if (trII != null)
@ -1298,6 +1311,7 @@ namespace Volian.Controls.Library
} }
} }
this.Cursor = Cursors.Default;
} }
#region (ProgressBar) #region (ProgressBar)
@ -3319,9 +3333,15 @@ namespace Volian.Controls.Library
// C2020-033: Convert All (that have permissions) Incoming Transitions to text // C2020-033: Convert All (that have permissions) Incoming Transitions to text
private void btnTranCvtAllToTxt_Click(object sender, EventArgs e) private void btnTranCvtAllToTxt_Click(object sender, EventArgs e)
{ {
Cursor = Cursors.WaitCursor;
List<int> itmsEditable = TranCvtCheckPermission(true); // Get list based on permissions List<int> itmsEditable = TranCvtCheckPermission(true); // Get list based on permissions
if (itmsEditable == null || itmsEditable.Count == 0) return; if (itmsEditable == null || itmsEditable.Count == 0)
{
Cursor = Cursors.Default;
return;
}
TranCvtToTxt(itmsEditable); TranCvtToTxt(itmsEditable);
Cursor = Cursors.Default;
fromTranCvtBtn = true; fromTranCvtBtn = true;
UpdateSearchIncTransResults(); // B2021-009: Research after convert transitions to text UpdateSearchIncTransResults(); // B2021-009: Research after convert transitions to text
fromTranCvtBtn = false; fromTranCvtBtn = false;

View File

@ -570,7 +570,9 @@ namespace Volian.Controls.Library
/// </summary> /// </summary>
/// <param name="myItemInfo"></param> /// <param name="myItemInfo"></param>
/// <returns></returns> /// <returns></returns>
public DisplayTabItem OpenItem(ItemInfo myItemInfo2, bool setFocus) // C2023-016 Added doingFindReplace where if true Word section will not be opened - used only when doing Find/Replace
// We are not opening and searching inside Word sections, instead we just stop on the section title in the procedure editor (if a match is found in the title)
public DisplayTabItem OpenItem(ItemInfo myItemInfo2, bool setFocus, bool doingFindReplace=false)
{ {
ItemInfo myItemInfo = myItemInfo2; ItemInfo myItemInfo = myItemInfo2;
@ -649,7 +651,8 @@ namespace Volian.Controls.Library
_MyBar = GetParentBar(myItemInfo); // Get the docking bar associated with this item. _MyBar = GetParentBar(myItemInfo); // Get the docking bar associated with this item.
if (myItemInfo.MyContent.MyEntry == null) // If it is not a Word document open in step editor // C2023-016 if a Word section and doing Find/Replace don't open Word section, position to section title in step editor instead
if (myItemInfo.MyContent.MyEntry == null || doingFindReplace) // If it is not a Word document open in step editor
{ {
return OpenStepTabPage(myItemInfo, setFocus); return OpenStepTabPage(myItemInfo, setFocus);
} }

View File

@ -30,7 +30,6 @@ namespace Volian.Controls.Library
{ {
this.groupPanelPaginate = new DevComponents.DotNetBar.Controls.GroupPanel(); this.groupPanelPaginate = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbPrefPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.cbPrefPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbSubStepPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.cbPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbCAS = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.cbCAS = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cmbCheckoff = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.cmbCheckoff = new DevComponents.DotNetBar.Controls.ComboBoxEx();
@ -75,7 +74,6 @@ namespace Volian.Controls.Library
this.groupPanelPaginate.BackColor = System.Drawing.Color.Transparent; this.groupPanelPaginate.BackColor = System.Drawing.Color.Transparent;
this.groupPanelPaginate.CanvasColor = System.Drawing.SystemColors.Control; this.groupPanelPaginate.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelPaginate.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; this.groupPanelPaginate.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelPaginate.Controls.Add(this.cbSubStepPageBreak);
this.groupPanelPaginate.Controls.Add(this.cbPrefPageBreak); this.groupPanelPaginate.Controls.Add(this.cbPrefPageBreak);
this.groupPanelPaginate.Controls.Add(this.cbPageBreak); this.groupPanelPaginate.Controls.Add(this.cbPageBreak);
this.groupPanelPaginate.DisabledBackColor = System.Drawing.Color.Empty; this.groupPanelPaginate.DisabledBackColor = System.Drawing.Color.Empty;
@ -132,23 +130,6 @@ namespace Volian.Controls.Library
this.cbPrefPageBreak.Text = "Preferred Page Break (for Sup Info)"; this.cbPrefPageBreak.Text = "Preferred Page Break (for Sup Info)";
this.cbPrefPageBreak.CheckedChanged += new System.EventHandler(this.cbPrefPageBreak_CheckedChanged); this.cbPrefPageBreak.CheckedChanged += new System.EventHandler(this.cbPrefPageBreak_CheckedChanged);
// //
// cbSubStepPageBreak
//
this.cbSubStepPageBreak.AutoSize = true;
//
//
//
this.cbSubStepPageBreak.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbSubStepPageBreak.Location = new System.Drawing.Point(3, 19);
this.cbSubStepPageBreak.Margin = new System.Windows.Forms.Padding(2);
this.cbSubStepPageBreak.Name = "cbSubStepPageBreak";
this.cbSubStepPageBreak.Size = new System.Drawing.Size(195, 15);
this.superTooltipTags.SetSuperTooltip(this.cbSubStepPageBreak, new DevComponents.DotNetBar.SuperTooltipInfo("Page Break for Sub-Steps", "", "When set, starts this step at the top of a page.\r\n\r\nkeyboard command: <Ctrl><Ente" +
"r>", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbSubStepPageBreak.TabIndex = 1;
this.cbSubStepPageBreak.Text = "Substep Page Break";
this.cbSubStepPageBreak.CheckedChanged += new System.EventHandler(this.cbSubStepPageBreak_CheckedChanged);
//
// cbPageBreak // cbPageBreak
// //
this.cbPageBreak.AutoSize = true; this.cbPageBreak.AutoSize = true;
@ -789,7 +770,6 @@ namespace Volian.Controls.Library
private System.Windows.Forms.TrackBar trBarFS; private System.Windows.Forms.TrackBar trBarFS;
private System.Windows.Forms.Button btnFSrestore; private System.Windows.Forms.Button btnFSrestore;
private DevComponents.DotNetBar.Controls.CheckBoxX cbPrefPageBreak; private DevComponents.DotNetBar.Controls.CheckBoxX cbPrefPageBreak;
private DevComponents.DotNetBar.Controls.CheckBoxX cbSubStepPageBreak;
private DevComponents.DotNetBar.Controls.CheckBoxX cbIncludeInTOC; private DevComponents.DotNetBar.Controls.CheckBoxX cbIncludeInTOC;
private DevComponents.DotNetBar.Controls.CheckBoxX cbTCAS; private DevComponents.DotNetBar.Controls.CheckBoxX cbTCAS;
} }

View File

@ -110,7 +110,6 @@ namespace Volian.Controls.Library
cmbCheckoff.Enabled = false; cmbCheckoff.Enabled = false;
cbPageBreak.Enabled = false; cbPageBreak.Enabled = false;
cbPrefPageBreak.Enabled = false; cbPrefPageBreak.Enabled = false;
cbSubStepPageBreak.Enabled = false;
cbPlaceKeeper.Enabled = false; cbPlaceKeeper.Enabled = false;
cbPlaceKeeperCont.Enabled = false; cbPlaceKeeperCont.Enabled = false;
cbIncludeInTOC.Enabled = false; cbIncludeInTOC.Enabled = false;
@ -179,11 +178,12 @@ namespace Volian.Controls.Library
public void UpdatePageBreakCheckBox() // for use with shortcut keystroke <Ctrl><Enter> public void UpdatePageBreakCheckBox() // for use with shortcut keystroke <Ctrl><Enter>
{ {
StepConfig sc = CurItemInfo.MyConfig as StepConfig; StepConfig sc = CurItemInfo.MyConfig as StepConfig;
if (CurItemInfo.IsHigh) cbPageBreak.Checked = false; // Page Break is set to false // C2023-018: if high, check oringinal flag, otherwise check sub-step flag for setting checkbox
if (sc != null && CurItemInfo.IsHigh) // otherwise, get data from config cbPageBreak.Checked = false; // Page Break is set to false
cbPageBreak.Checked = sc.Step_NewManualPagebreak; // High Level Step has a manual page break if (sc != null && CurItemInfo.IsHigh) // otherwise, get data from config
else cbPageBreak.Checked = sc.Step_NewManualPagebreak; // High Level Step has a manual page break
cbPageBreak.Checked = false; // Page Break is set to false else if (sc != null && !CurItemInfo.IsCautionOrNotePart)
cbPageBreak.Checked = sc.Step_SubStepPagebreak;
} }
public DocVersionInfo Mydvi = null; // this is initialized in vlnTreeComboSetsFillIn() public DocVersionInfo Mydvi = null; // this is initialized in vlnTreeComboSetsFillIn()
@ -245,13 +245,23 @@ namespace Volian.Controls.Library
groupPanelFigSize.Style.BackColor = Color.Cornsilk; groupPanelFigSize.Style.BackColor = Color.Cornsilk;
cbPageBreak.Checked = false; // will be set below if HLS & config has it on cbPageBreak.Checked = false; // will be set below if HLS & config has it on
cbPrefPageBreak.Checked = false; cbPrefPageBreak.Checked = false;
cbSubStepPageBreak.Checked = false;
cbPlaceKeeper.Checked = false; // will be set below if HLS & config has this set cbPlaceKeeper.Checked = false; // will be set below if HLS & config has this set
cbPlaceKeeperCont.Checked = false; // will be set below if substep & config has this set cbPlaceKeeperCont.Checked = false; // will be set below if substep & config has this set
cbPageBreak.Enabled = CurItemInfo.IsHigh;
// C2023-018: upgrade for 2023, allow page break setting on non-HLS under certain conditions as listed here:
// - HLS only (original)
// - Upgrade for sub-steps: Not in supplemental info (original)
// - Upgrade for sub-steps: Not in Enhanced document
// - Upgrade for sub-steps: Only for single column procedure
// - Upgrade for sub-steps: Sequential sub-steps only
// - Upgrade for sub-steps: First level sub-steps only (CurItemInfo.MyParent.IsHigh)
SectionConfig secConfig = (SectionConfig)CurItemInfo.ActiveSection.MyConfig;
bool isSingleColumn = secConfig != null && secConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One;
bool allowPageBreak = CurItemInfo.IsHigh || (!CurItemInfo.MyDocStyle.SupplementalInformation && !CurItemInfo.IsEnhancedStep
&& isSingleColumn && CurItemInfo.IsSequential && CurItemInfo.MyParent.IsHigh);
cbPageBreak.Enabled = allowPageBreak;
cbPrefPageBreak.Visible = cbPrefPageBreak.Enabled = (!CurItemInfo.IsInSupInfo && CurItemInfo.MyDocStyle.SupplementalInformation); cbPrefPageBreak.Visible = cbPrefPageBreak.Enabled = (!CurItemInfo.IsInSupInfo && CurItemInfo.MyDocStyle.SupplementalInformation);
// C2023-015: Pagination on a sub-step
cbSubStepPageBreak.Visible = cbSubStepPageBreak.Enabled = CurItemInfo.IsSubStep && CurItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AlarmPagination;
if (!CurItemInfo.IsFigure && !CurItemInfo.IsRtfRaw) if (!CurItemInfo.IsFigure && !CurItemInfo.IsRtfRaw)
{ {
cbPlaceKeeper.Enabled = (((SectionConfig)CurItemInfo.ActiveSection.MyConfig).Section_Placekeeper == "Y"); cbPlaceKeeper.Enabled = (((SectionConfig)CurItemInfo.ActiveSection.MyConfig).Section_Placekeeper == "Y");
@ -297,7 +307,7 @@ namespace Volian.Controls.Library
} }
else if (sc == null) // if there is no config data ... else if (sc == null) // if there is no config data ...
{ {
if (CurItemInfo.IsHigh)cbPageBreak.Checked = false; // Page Break is set to false cbPageBreak.Checked = false; // Page Break is set to false
cbCAS.Checked = CurItemInfo.IncludeOnContActSum; // set based on step type format flag cbCAS.Checked = CurItemInfo.IncludeOnContActSum; // set based on step type format flag
cbTCAS.Checked = CurItemInfo.IncludeOnTimeCriticalActionSum; // set based on step type format flag cbTCAS.Checked = CurItemInfo.IncludeOnTimeCriticalActionSum; // set based on step type format flag
cbPlaceKeeper.Checked = false; cbPlaceKeeper.Checked = false;
@ -305,10 +315,12 @@ namespace Volian.Controls.Library
} }
else // otherwise, get data from config else // otherwise, get data from config
{ {
// C2023-018: if high, use original config setting for page break, otherwise you sub-step setting
if (CurItemInfo.IsHigh) if (CurItemInfo.IsHigh)
cbPageBreak.Checked = sc.Step_NewManualPagebreak; // High Level Step has a manual page break cbPageBreak.Checked = sc.Step_NewManualPagebreak; // High Level Step has a manual page break
else
cbPageBreak.Checked = sc.Step_SubStepPagebreak;
if (cbPrefPageBreak.Enabled) cbPrefPageBreak.Checked = sc.Step_PreferredPagebreak; if (cbPrefPageBreak.Enabled) cbPrefPageBreak.Checked = sc.Step_PreferredPagebreak;
if (cbSubStepPageBreak.Enabled) cbSubStepPageBreak.Checked = sc.Step_SubStepPagebreak;
cbPlaceKeeper.Checked = (sc.Step_Placekeeper == "Y"); // step text to be included on PlaceKeeper (Calvert Cliffs) cbPlaceKeeper.Checked = (sc.Step_Placekeeper == "Y"); // step text to be included on PlaceKeeper (Calvert Cliffs)
cbPlaceKeeperCont.Checked = (sc.Step_Placekeeper == "C"); // step is included on Placekeeper and marked as continuous action (Calvert Cliffs) cbPlaceKeeperCont.Checked = (sc.Step_Placekeeper == "C"); // step is included on Placekeeper and marked as continuous action (Calvert Cliffs)
// set the Continuous Action Summary check box to the saved setting in the config or, if nothing in config, set to format flag setting // set the Continuous Action Summary check box to the saved setting in the config or, if nothing in config, set to format flag setting
@ -547,7 +559,10 @@ namespace Volian.Controls.Library
StepConfig sc = CurItemInfo.MyConfig as StepConfig; StepConfig sc = CurItemInfo.MyConfig as StepConfig;
if (sc == null) return; if (sc == null) return;
MyEditItem.ChangeBarForConfigItemChange = false; MyEditItem.ChangeBarForConfigItemChange = false;
sc.Step_NewManualPagebreak = cbPageBreak.Checked; if (CurItemInfo.IsHigh)
sc.Step_NewManualPagebreak = cbPageBreak.Checked;
else // C2023-018: allow for sub-step page breaks
sc.Step_SubStepPagebreak = cbPageBreak.Checked;
MyEditItem.ChangeBarForConfigItemChange = true; MyEditItem.ChangeBarForConfigItemChange = true;
} }
private void cbCAS_CheckedChanged(object sender, EventArgs e) private void cbCAS_CheckedChanged(object sender, EventArgs e)
@ -896,18 +911,6 @@ namespace Volian.Controls.Library
sc.Step_PreferredPagebreak = cbPrefPageBreak.Checked; sc.Step_PreferredPagebreak = cbPrefPageBreak.Checked;
MyEditItem.ChangeBarForConfigItemChange = true; MyEditItem.ChangeBarForConfigItemChange = true;
} }
// C2023-015: Pagination on a sub-step
private void cbSubStepPageBreak_CheckedChanged(object sender, EventArgs e)
{
if (_Initalizing) return;
MyEditItem.SaveContents();
StepConfig sc = CurItemInfo.MyConfig as StepConfig;
if (sc == null) return;
MyEditItem.ChangeBarForConfigItemChange = false;
sc.Step_SubStepPagebreak = cbSubStepPageBreak.Checked;
MyEditItem.ChangeBarForConfigItemChange = true;
}
//private void txbxAltConActSumText_Leave(object sender, EventArgs e) //private void txbxAltConActSumText_Leave(object sender, EventArgs e)
//{ //{
// // User left Atlernate Continuous Action Text field. If text changed, then prompt // // User left Atlernate Continuous Action Text field. If text changed, then prompt

View File

@ -183,7 +183,6 @@ namespace Volian.Controls.Library
this.cmboFindText.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmboFindText.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmboFindText.WatermarkText = "Enter text to find"; this.cmboFindText.WatermarkText = "Enter text to find";
this.cmboFindText.TextChanged += new System.EventHandler(this.cmboFindText_TextChanged); this.cmboFindText.TextChanged += new System.EventHandler(this.cmboFindText_TextChanged);
this.cmboFindText.Leave += new System.EventHandler(this.cmboFindText_Leave);
// //
// labelX3 // labelX3
// //
@ -349,6 +348,7 @@ namespace Volian.Controls.Library
this.cbxReverse.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.cbxReverse.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxReverse.TabIndex = 5; this.cbxReverse.TabIndex = 5;
this.cbxReverse.Text = "Reverse Find"; this.cbxReverse.Text = "Reverse Find";
this.cbxReverse.CheckedChanged += new System.EventHandler(this.cbxReverse_CheckedChanged);
// //
// cbxWholeWord // cbxWholeWord
// //
@ -363,6 +363,7 @@ namespace Volian.Controls.Library
this.cbxWholeWord.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.cbxWholeWord.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxWholeWord.TabIndex = 4; this.cbxWholeWord.TabIndex = 4;
this.cbxWholeWord.Text = "Whole Word"; this.cbxWholeWord.Text = "Whole Word";
this.cbxWholeWord.CheckedChanged += new System.EventHandler(this.cbxWholeWord_CheckedChanged);
// //
// cbxCaseSensitive // cbxCaseSensitive
// //
@ -377,6 +378,7 @@ namespace Volian.Controls.Library
this.cbxCaseSensitive.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.cbxCaseSensitive.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxCaseSensitive.TabIndex = 3; this.cbxCaseSensitive.TabIndex = 3;
this.cbxCaseSensitive.Text = "Case Sensitive"; this.cbxCaseSensitive.Text = "Case Sensitive";
this.cbxCaseSensitive.CheckedChanged += new System.EventHandler(this.cbxCaseSensitive_CheckedChanged);
// //
// cmbScope // cmbScope
// //

View File

@ -11,11 +11,13 @@ using JR.Utils.GUI.Forms;
namespace Volian.Controls.Library namespace Volian.Controls.Library
{ {
// C2023-016 - Upgrade - have Find/Replace spin through all of the Step Editor sections within the current procedure
public partial class FindReplace : DevComponents.DotNetBar.Office2007Form public partial class FindReplace : DevComponents.DotNetBar.Office2007Form
{ {
private bool doingfind = false; private bool doingfind = false;
private bool findingbookmarks = false; private bool findingbookmarks = false;
private bool _FoundIt = false; private bool _FoundIt = false;
private ItemInfo _StartingItemInfo = null;// C2023-016 used to remember where we started doing the Find/Replace
public bool FoundIt public bool FoundIt
{ {
get { return _FoundIt; } get { return _FoundIt; }
@ -25,7 +27,7 @@ namespace Volian.Controls.Library
{ {
get get
{ {
// B2022-067 get display text version to convert 8209 dash to nornal (keyboard) dash // B2022-067 get display text version to convert 8209 dash to normal (keyboard) dash
string selStr = ItemInfo.ConvertToDisplayText(MyEditItem.MyStepRTB.SelectedText); string selStr = ItemInfo.ConvertToDisplayText(MyEditItem.MyStepRTB.SelectedText);
if (!cbxCaseSensitive.Checked) if (!cbxCaseSensitive.Checked)
return selStr.ToUpper() == cmboFindText.Text.ToUpper(); return selStr.ToUpper() == cmboFindText.Text.ToUpper();
@ -33,7 +35,6 @@ namespace Volian.Controls.Library
return selStr == cmboFindText.Text; return selStr == cmboFindText.Text;
} }
} }
//private bool _offsetStartPos = false;
private EditItem _MyEditItem; private EditItem _MyEditItem;
public EditItem MyEditItem public EditItem MyEditItem
{ {
@ -44,25 +45,13 @@ namespace Volian.Controls.Library
if (_MyEditItem == null) return; if (_MyEditItem == null) return;
_MyDocVersion = _MyEditItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; _MyDocVersion = _MyEditItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
SetupContextMenu(); SetupContextMenu();
//_offsetStartPos = false; // in a different rtf box, don't offset find position first time around
} }
} }
private DocVersionInfo _MyDocVersion; private DocVersionInfo _MyDocVersion;
public DocVersionInfo Mydocversion public DocVersionInfo Mydocversion
{ {
get { return _MyDocVersion; } get { return _MyDocVersion; }
set set {_MyDocVersion = value; }
{
_MyDocVersion = value;
//if (_MyDocVersion != null)
//{
// if (_MyDocVersion.DocVersionAssociationCount > 0)
// {
// MyROFSTLookup = _MyDocVersion.DocVersionAssociations[0].MyROFst.ROFSTLookup;
// _MyRODbID = _MyDocVersion.DocVersionAssociations[0].MyROFst.RODbID;
// }
//}
}
} }
private DisplayBookMarks _myDisplayBookMarks; private DisplayBookMarks _myDisplayBookMarks;
@ -83,17 +72,12 @@ namespace Volian.Controls.Library
{ {
InitializeComponent(); InitializeComponent();
LoadFindReplaceTextListBox(); LoadFindReplaceTextListBox();
//if (dvi != null && dvi.VersionType > 127)
// InApproved = false; // in approved
cmbScope.SelectedIndex = 0; cmbScope.SelectedIndex = 0;
btnBookMrkAll.Enabled = false; btnBookMrkAll.Enabled = false;
btnFindNext.Enabled = false; btnFindNext.Enabled = false;
btnReplace.Enabled = false; btnReplace.Enabled = false;
btnRplAll.Enabled = false; btnRplAll.Enabled = false;
//if (MyRTBItem.MyStepRTB.SelectionLength > 0)
// cmboFindText.Text = MyRTBItem.MyStepRTB.SelectedText;
cmboFindText.Focus(); cmboFindText.Focus();
//SetupContextMenu();
} }
private void LoadFindReplaceTextListBox() private void LoadFindReplaceTextListBox()
{ {
@ -113,51 +97,34 @@ namespace Volian.Controls.Library
} }
} }
//public FindReplace(RTBItem stpitm)
//{
// MyRTBItem = stpitm;
// DocVersionInfo dvi = MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
// InitializeComponent();
// if (dvi != null && dvi.VersionType > 127)
// InApproved = false; // in approved
// cmbScope.SelectedIndex = 0;
// btnBookMrkAll.Enabled = false;
// btnFindNext.Enabled = false;
// btnReplace.Enabled = false;
// btnRplAll.Enabled = false;
// if (MyRTBItem.MyStepRTB.SelectionLength > 0)
// cmboFindText.Text = MyRTBItem.MyStepRTB.SelectedText;
// cmboFindText.Focus();
//}
// bug fix: B2016-107, when Find/Replace is initially opened, set the cursor focus to the Find Text box (called from frmVEPROMS.cs) // bug fix: B2016-107, when Find/Replace is initially opened, set the cursor focus to the Find Text box (called from frmVEPROMS.cs)
public void SetFocusToTextBox() public void SetFocusToTextBox()
{ {
cmboFindText.Focus(); cmboFindText.Focus();
} }
private bool DoingClick = false; // Don't allow a button to be clicked until processing is complete for the last button private bool DoingClick = false; // Don't allow a button to be clicked until processing is complete for the last button
private void btnReplace_Click(object sender, EventArgs e) private void btnReplace_Click(object sender, EventArgs e)
{ {
if (DoingClick) return;// Don't allow a button to be clicked until processing is complete for the last button if (DoingClick) return;// Don't allow a button to be clicked until processing is complete for the last button
DoingClick = true;// Don't allow a button to be clicked until processing is complete for the last button DoingClick = true;// We started processing a click
DoReplace(); DoReplace();
DoingClick = false;// Don't allow a button to be clicked until processing is complete for the last button DoingClick = false;// we're done processing the click
} }
private void DoReplace() private void DoReplace()
{ {
if (!IsFound) if (!IsFound)
DoFindNext(); DoFindNext();
else else
{
MyEditItem.ReplaceText(cmboReplaceText.Text, cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked, false, null); MyEditItem.ReplaceText(cmboReplaceText.Text, cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked, false, null);
}
} }
private void btnRplAll_Click(object sender, EventArgs e) private void btnRplAll_Click(object sender, EventArgs e)
{ {
if (DoingClick) return;// Don't allow a button to be clicked until processing is complete for the last button if (DoingClick) return;// Don't allow a button to be clicked until processing is complete for the last button
DoingClick = true;// Don't allow a button to be clicked until processing is complete for the last button DoingClick = true; // We started processing a click
DoRplAll(); DoRplAll();
DoingClick = false;// Don't allow a button to be clicked until processing is complete for the last button DoingClick = false; // we're done processing the click
} }
private void DoRplAll() private void DoRplAll()
{ {
@ -172,9 +139,9 @@ namespace Volian.Controls.Library
private void btnBookMrkAll_Click(object sender, EventArgs e) private void btnBookMrkAll_Click(object sender, EventArgs e)
{ {
if (DoingClick) return;// Don't allow a button to be clicked until processing is complete for the last button if (DoingClick) return;// Don't allow a button to be clicked until processing is complete for the last button
DoingClick = true;// Don't allow a button to be clicked until processing is complete for the last button DoingClick = true; // We started processing a click
DoBookMrkAll(); DoBookMrkAll();
DoingClick = false;// Don't allow a button to be clicked until processing is complete for the last button DoingClick = false; // we're done processing the click
} }
private void DoBookMrkAll() private void DoBookMrkAll()
{ {
@ -193,7 +160,6 @@ namespace Volian.Controls.Library
} }
private void btnFndRplDone_Click(object sender, EventArgs e) private void btnFndRplDone_Click(object sender, EventArgs e)
{ {
//this.Close();
doingfind = false; doingfind = false;
this.Visible = false; this.Visible = false;
} }
@ -229,10 +195,48 @@ namespace Volian.Controls.Library
private void btnFindNext_Click(object sender, EventArgs e) private void btnFindNext_Click(object sender, EventArgs e)
{ {
if (DoingClick) return;// Don't allow a button to be clicked until processing is complete for the last button if (DoingClick) return;// Don't allow a button to be clicked until processing is complete for the last button
DoingClick = true;// Don't allow a button to be clicked until processing is complete for the last button DoingClick = true;// We started processing a click
DoFindNext(); DoFindNext();
DoingClick = false;// Don't allow a button to be clicked until processing is complete for the last button DoingClick = false;// we're done processing the click
} }
// C2023-016 Find the next element, but stay in the same procedure
private ItemInfo FindNextStepElement(ItemInfo curStepElem, string fndStr)
{
ItemInfo nxtStepElem = curStepElem;
if (_StartingItemInfo == null)
_StartingItemInfo = MyEditItem.MyItemInfo;
if (cbxReverse.Checked)
{
if (curStepElem.IsProcedure)
nxtStepElem = curStepElem.MyProcedure.SearchBottom; // at the top of the procedure, so next step would be the last step of the last section (or the section title if the last section is a Word section)
else
nxtStepElem = curStepElem.SearchPrev;
}
else if (curStepElem.SearchNext.IsProcedure) // searching(finding) forward but next is the next procedure, so jump to the top of the procedure (the procedure title in the step editor)
nxtStepElem = curStepElem.MyProcedure;
else
nxtStepElem = curStepElem.SearchNext;
// B2015-131 Find was not finding series of words when one or more of the words were bolded or underlined (ex finding "Any SG" where Any was bolded)
while (nxtStepElem != null && nxtStepElem.ItemID != _StartingItemInfo.ItemID)
{
if (nxtStepElem.MyContent != null && ContainsFndStr(RtfTools.RTFConvertedSymbolsToUnicode(nxtStepElem.MyContent.Text).ToUpper(), fndStr.ToUpper()))
break;
if (cbxReverse.Checked)
{
if (nxtStepElem.IsProcedure)
nxtStepElem = nxtStepElem.MyProcedure.SearchBottom;// at the top of the procedure, so next step would be the last step of the last section (or the section title if the last section is a Word section)
else
nxtStepElem = nxtStepElem.SearchPrev;
}
else if (nxtStepElem.SearchNext.IsProcedure)
nxtStepElem = nxtStepElem.MyProcedure;// searching(finding) forward but next is the next procedure, so jump to the top of the procedure(the procedure title in the step editor)
else
nxtStepElem = nxtStepElem.SearchNext;
}
return nxtStepElem;
}
private void DoFindNext() private void DoFindNext()
{ {
AddToComboLists(); AddToComboLists();
@ -240,32 +244,21 @@ namespace Volian.Controls.Library
string fndStr = FixSymbol(cmboFindText.Text.Replace(@"\", @"\u9586?").Replace("-", @"\u8209?").Replace("\xa0", @"\u160?")); string fndStr = FixSymbol(cmboFindText.Text.Replace(@"\", @"\u9586?").Replace("-", @"\u8209?").Replace("\xa0", @"\u160?"));
while (!MyEditItem.FindText(cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked)) while (!MyEditItem.FindText(cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked))
{ {
ItemInfo next = (cbxReverse.Checked) ? MyEditItem.MyItemInfo.SearchPrev : MyEditItem.MyItemInfo.SearchNext; ItemInfo next = FindNextStepElement(MyEditItem.MyItemInfo, fndStr);
// B2015-131 Find was not finding series of words when one or more of the words were bolded or underlined (ex finding "Any SG" where Any was bolded) MyEditItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next,true,true);// C2023-016 open item (next), set focus (true), doing Find/Replace so don't open Word section (true)
while ((next != null) && !next.IsSection && !ContainsFndStr(RtfTools.RTFConvertedSymbolsToUnicode(next.MyContent.Text).ToUpper(), fndStr.ToUpper()))
{
next = (cbxReverse.Checked) ? next.SearchPrev : next.SearchNext;
}
//if (next != null) Console.WriteLine("next {0} {1}", next.ItemID, next.MyContent.Text);
if ((next == null) || next.IsSection)
{
if (!findingbookmarks)
{
// C2020-015: Improve dialog messaging
if (cbxReverse.Checked)
FlexibleMessageBox.Show(this, "Nothing found here to beginning of this section", "End of Find/Replace");
else
FlexibleMessageBox.Show(this, "Nothing found here to end of this section", "End of Find/Replace");
}
FoundIt = false;
return;
}
MyEditItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
if (cbxReverse.Checked) if (cbxReverse.Checked)
MyEditItem.PositionToEnd(); MyEditItem.PositionToEnd();
if (next.IsTable && !cbxReverse.Checked) MyEditItem.PositionToStart(); if (next.IsTable && !cbxReverse.Checked) MyEditItem.PositionToStart();
//C2023-016 if we spun through all of the step editor sections, stop and display a message
if (MyEditItem.MyItemInfo.ItemID == _StartingItemInfo.ItemID)
{
FoundIt = false;
string msg = string.Format("Back to the starting point of the Find/Replace.{0}",(findingbookmarks)?"\n\n The Tools Panel will display showing the locations.":"");
FlexibleMessageBox.Show(this, msg, "Find/Replace Completed");
_StartingItemInfo = null;
return;
}
} }
if (MyEditItem.MyStepRTB != null && !MyEditItem.MyStepRTB.Visible) if (MyEditItem.MyStepRTB != null && !MyEditItem.MyStepRTB.Visible)
{ {
@ -286,7 +279,7 @@ namespace Volian.Controls.Library
{ {
if (cmboFindText.Items.Count >= 10) if (cmboFindText.Items.Count >= 10)
cmboFindText.Items.RemoveAt(9); cmboFindText.Items.RemoveAt(9);
cmboFindText.Items.Insert(0, cmboFindText.Text);//.Add(cmboFindText.Text); cmboFindText.Items.Insert(0, cmboFindText.Text);
} }
hastext = this.cmboReplaceText.Text.Length > 0; hastext = this.cmboReplaceText.Text.Length > 0;
if (hastext && btnReplace.Enabled && !cmboReplaceText.Items.Contains(cmboReplaceText.Text)) if (hastext && btnReplace.Enabled && !cmboReplaceText.Items.Contains(cmboReplaceText.Text))
@ -302,11 +295,13 @@ namespace Volian.Controls.Library
btnFindNext.Enabled = hastext; btnFindNext.Enabled = hastext;
btnBookMrkAll.Enabled = hastext; btnBookMrkAll.Enabled = hastext;
btnReplace.Enabled = btnRplAll.Enabled = hastext && !InApproved; btnReplace.Enabled = btnRplAll.Enabled = hastext && !InApproved;
_StartingItemInfo = null; //C2023-016 reset the starting position
} }
private void cmboReplaceText_TextChanged(object sender, EventArgs e) private void cmboReplaceText_TextChanged(object sender, EventArgs e)
{ {
btnReplace.Enabled = btnRplAll.Enabled = !InApproved && cmboFindText.Text.Length > 0; btnReplace.Enabled = btnRplAll.Enabled = !InApproved && cmboFindText.Text.Length > 0;
_StartingItemInfo = null;//C2023-016 reset the starting position
} }
public void PerformFindNext() public void PerformFindNext()
@ -336,17 +331,6 @@ namespace Volian.Controls.Library
e.Cancel = true; // cancel the form close event - the Done_Click() will hide it instead e.Cancel = true; // cancel the form close event - the Done_Click() will hide it instead
} }
private void cmboFindText_Leave(object sender, EventArgs e)
{
//bool hastext = this.cmboFindText.Text.Length > 0;
//if (hastext && !cmboFindText.Items.Contains(cmboFindText.Text))
//{
// if (cmboFindText.Items.Count >= 10)
// cmboFindText.Items.RemoveAt(9);
// cmboFindText.Items.Insert(0, cmboFindText.Text);//.Add(cmboFindText.Text);
//}
}
private void btnCmCut_Click(object sender, EventArgs e) private void btnCmCut_Click(object sender, EventArgs e)
{ {
Clipboard.Clear(); Clipboard.Clear();
@ -456,6 +440,22 @@ namespace Volian.Controls.Library
tabReplace.Visible = true; tabReplace.Visible = true;
Text = "Find and Replace";//C2021-021 change the dialog title Text = "Find and Replace";//C2021-021 change the dialog title
} }
_StartingItemInfo = null;//C2023-016 reset the starting position
}
private void cbxCaseSensitive_CheckedChanged(object sender, EventArgs e)
{
_StartingItemInfo = null;//C2023-016 reset the starting position
}
private void cbxWholeWord_CheckedChanged(object sender, EventArgs e)
{
_StartingItemInfo = null;//C2023-016 reset the starting position
}
private void cbxReverse_CheckedChanged(object sender, EventArgs e)
{
_StartingItemInfo = null;//C2023-016 reset the starting position
} }
} }
} }

View File

@ -0,0 +1,61 @@
using Csla;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using VEPROMS.CSLA.Library;
namespace Volian.Controls.Library
{
public static class FormatUtility
{
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
//C2023-017: Remove any formats that are not applicable to the current plant
public static IList<FormatInfo> GetFilteredFormatList(SortedBindingList<FormatInfo> RawList)
{
List<FormatInfo> result = new List<FormatInfo>();
try
{
//Get the top folder configuration XML of the PROMS treeview and load
//the Formats node to retrieve the available formats for this plant
FolderInfo fi = FolderInfo.GetTop();
System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument();
xDoc.LoadXml(fi.Config);
XmlNodeList fList = xDoc.GetElementsByTagName("Formats");
//We need to check to see if the current database has been updated with the necessary changes
//to the folder configuration value. If so then build the list of available to be returned
//to the calling code
if (fList == null)
{
_MyLog.InfoFormat("Filtered format list not available: Database update needed for config value of top folder record");
return RawList;
}
else
{
//Create a string array that we can use to filter the raw list and add the format to the return value
string[] availableFormats = fList[0].Attributes["Active"].Value.Split(',');
foreach (FormatInfo item in RawList)
{
if (Array.IndexOf(availableFormats, item.ApplicablePlant.ToString()) > -1)
{
result.Add(item);
}
}
}
}
catch (Exception ex)
{
//On any exception simply return the original list that was passed in
_MyLog.ErrorFormat("Error loading filtered format list - PopulateFormatList(): {0}", ex.Message);
return RawList;
}
return result;
}
}
}

View File

@ -3112,8 +3112,17 @@ namespace Volian.Controls.Library
else else
{ {
LinkText lt = new LinkText(_MyStepRTB.MyLinkText); LinkText lt = new LinkText(_MyStepRTB.MyLinkText);
myROID = lt.MyRoUsageInfo.ROID.ToLower(); //B2023-104 If we could not get the MyRoUsageInfo then we have a bad RO Link. Tell user to re-link the RO
myRODB = lt.MyRoUsageInfo.MyRODb; if (lt.MyRoUsageInfo != null)
{
myROID = lt.MyRoUsageInfo.ROID.ToLower();
myRODB = lt.MyRoUsageInfo.MyRODb;
}
else
{
FlexibleMessageBox.Show("Invalid RO link information.\n\n Please re-link this RO value.", "Invalid RO Reference", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
} }
if (myROID == null) return; if (myROID == null) return;
if (myROID.StartsWith("ffff")) if (myROID.StartsWith("ffff"))
@ -3139,7 +3148,7 @@ namespace Volian.Controls.Library
foreach (DocVersionInfo dvi in dvil) foreach (DocVersionInfo dvi in dvil)
{ {
DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig; DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig;
if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Name != "0") if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Count > 1) // B2021-089 only pass in applicability info if defined for more than one unit
{ {
args += " \"PC=" + dvc.Unit_Name + "\""; args += " \"PC=" + dvc.Unit_Name + "\"";
break; break;
@ -3309,7 +3318,7 @@ namespace Volian.Controls.Library
foreach (DocVersionInfo dvi in dvil) foreach (DocVersionInfo dvi in dvil)
{ {
DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig; DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig;
if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Name != "0") if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Count > 1) // B2021-089 only pass in applicability info if defined for more than one unit
{ {
roloc += " \"PC=" + dvc.Unit_Name + "\""; roloc += " \"PC=" + dvc.Unit_Name + "\"";
break; break;

View File

@ -240,6 +240,7 @@
<Compile Include="FindReplace.designer.cs"> <Compile Include="FindReplace.designer.cs">
<DependentUpon>FindReplace.cs</DependentUpon> <DependentUpon>FindReplace.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FormatUtility.cs" />
<Compile Include="frmEnhanced.cs"> <Compile Include="frmEnhanced.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>

View File

@ -1942,7 +1942,12 @@ namespace Volian.Controls.Library
case "Incoming Transitions": // C2020-033: Support the menu item to bring up Search/Incoming Transitions panel case "Incoming Transitions": // C2020-033: Support the menu item to bring up Search/Incoming Transitions panel
VETreeNode tnx = SelectedNode as VETreeNode; VETreeNode tnx = SelectedNode as VETreeNode;
ItemInfo iii = tnx.VEObject as ItemInfo; ItemInfo iii = tnx.VEObject as ItemInfo;
if (iii != null) OnSearchIncTransIn(this, new vlnTreeItemInfoEventArgs(iii)); if (iii != null)
{
this.Cursor = Cursors.WaitCursor; // B2023-103 add spinner when searching for incoming transitions
OnSearchIncTransIn(this, new vlnTreeItemInfoEventArgs(iii));
this.Cursor = Cursors.Default;
}
break; break;
case "Properties..."://Show the properties for the selected node case "Properties..."://Show the properties for the selected node
SetLastValues((VETreeNode)SelectedNode); SetLastValues((VETreeNode)SelectedNode);
@ -2246,7 +2251,7 @@ namespace Volian.Controls.Library
foreach (DocVersionInfo dvi in dvil) foreach (DocVersionInfo dvi in dvil)
{ {
DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig; DocVersionConfig dvc = dvi.DocVersionConfig as DocVersionConfig;
if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Name != "0") if (dvc != null && dvc.Unit_Name != "" && dvc.Unit_Count > 1) // B2021-089 only pass in applicability info if defined for more than one unit
{ {
roloc += " \"PC=" + dvc.Unit_Name + "\""; roloc += " \"PC=" + dvc.Unit_Name + "\"";
break; break;

View File

@ -100,14 +100,16 @@ namespace Volian.Print.Library
return retval; return retval;
} }
// C2023-015: Pagination on a sub-step added. Do the code if supplemental info or if format supports sub-step pagination // C2023-015: Pagination on a sub-step added. Do the code if supplemental info or if format supports sub-step pagination
else if ((MyItemInfo.MyDocStyle.SupplementalInformation || MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AlarmPagination) && MyItemInfo.IsStep) // C2023-018: Pagination on sub-step (changed from C2023-015), do this code if on a step... will check for config flags in this code
else if (MyItemInfo.IsStep)
{ {
// C2023-018: only do the following if in supplemental info, doing checks on cautions/notes off substep
// if this is the first caution or note from a substep, if the substep has preferred page break, break at the first caution or note: // if this is the first caution or note from a substep, if the substep has preferred page break, break at the first caution or note:
if ((MyItemInfo.IsCaution || MyItemInfo.IsNote) && MyItemInfo.MyParent.IsSubStep) if ((MyItemInfo.MyDocStyle.SupplementalInformation && (MyItemInfo.IsCaution || MyItemInfo.IsNote) && MyItemInfo.MyParent.IsSubStep))
{ {
StepConfig scs = MyItemInfo.MyParent.MyConfig as StepConfig; StepConfig scs = MyItemInfo.MyParent.MyConfig as StepConfig;
// C2023-015: Pagination on a sub-step added on this check // C2023-015: Pagination on a sub-step added on this check, C2023-018: removed substep check since this cannot occur
if (MyItemInfo.MyPrevious == null && (scs.Step_PreferredPagebreak || scs.Step_SubStepPagebreak)) if (MyItemInfo.MyPrevious == null && scs.Step_PreferredPagebreak)
{ {
// B2018-103: The following flags a break within the step. Before returning a '2' (flags break within step), clear it out of the // B2018-103: The following flags a break within the step. Before returning a '2' (flags break within step), clear it out of the
// ParaBreaks. Without the 'RemoveAt', a page break will occur after this step also. // ParaBreaks. Without the 'RemoveAt', a page break will occur after this step also.
@ -121,26 +123,35 @@ namespace Volian.Print.Library
} }
} }
// Now see if there is a preferred page break on this step. // Now see if there is a preferred page break on this step.
// C2023-018: Added check for sub-step
StepConfig sci = MyItemInfo.MyConfig as StepConfig; StepConfig sci = MyItemInfo.MyConfig as StepConfig;
if (sci.Step_PreferredPagebreak || sci.Step_SubStepPagebreak) if (sci.Step_PreferredPagebreak || sci.Step_SubStepPagebreak)
{ {
if (MyItemInfo.IsHigh) return 1; // C2023-018: if removing manual page breaks - add to list for permanent removal if selected and do not put a page break
// if this is the top caution/note return 1 also. Cautions always are first, that is why the check does not need to know if on a // on the sub-step (do not execute the 'else' code)
// caution that there are notes, but check does need if on a note, are there cautions: if (sci.Step_SubStepPagebreak && MyPageHelper.MyPromsPrinter.RemoveManualPageBreaks != null &&
if (MyItemInfo.MyParent.IsHigh && MyItemInfo.IsCaution && MyItemInfo.MyPrevious == null) return 1; !MyPageHelper.MyPromsPrinter.RemoveManualPageBreaks.Contains(MyItemInfo.ItemID))
if (MyItemInfo.MyParent.IsHigh && MyItemInfo.IsNote && (MyItemInfo.MyParent.Cautions == null || MyItemInfo.MyParent.Cautions.Count == 0) && MyItemInfo.MyPrevious == null) return 1; MyPageHelper.MyPromsPrinter.RemoveManualPageBreaks.Add(MyItemInfo.ItemID);
// if this is a substep that has a preferredpage break, and it has caution/note that is where the page break had to go else
if (MyItemInfo.IsSubStep && ChildrenAbove != null && ChildrenAbove.Count > 0) return 0;
// B2017-228: The following flags a break within the step. Before returning a '2' (flags break within step), clear it out of the
// ParaBreaks. Without the 'RemoveAt', a page break will occur after this step also.
string reason = "Unknown";
if (MyPageHelper.ParaBreaks != null && MyPageHelper.ParaBreaks.Count > 0 && this == MyPageHelper.ParaBreaks[0])
{ {
MyPageHelper.ParaBreaks.RemoveAt(0); if (MyItemInfo.IsHigh) return 1;
reason = AddReason("Partial Step - Case 1"); // if this is the top caution/note return 1 also. Cautions always are first, that is why the check does not need to know if on a
ShowPageBreak(1, reason, "Yes", YSize, yPageSize, yWithinMargins, ManualPageBreak); // caution that there are notes, but check does need if on a note, are there cautions:
if (MyItemInfo.MyParent.IsHigh && MyItemInfo.IsCaution && MyItemInfo.MyPrevious == null) return 1;
if (MyItemInfo.MyParent.IsHigh && MyItemInfo.IsNote && (MyItemInfo.MyParent.Cautions == null || MyItemInfo.MyParent.Cautions.Count == 0) && MyItemInfo.MyPrevious == null) return 1;
// if this is a substep that has a preferredpage break, and it has caution/note that is where the page break had to go
if (MyItemInfo.IsSubStep && ChildrenAbove != null && ChildrenAbove.Count > 0) return 0;
// B2017-228: The following flags a break within the step. Before returning a '2' (flags break within step), clear it out of the
// ParaBreaks. Without the 'RemoveAt', a page break will occur after this step also.
string reason = "Unknown";
if (MyPageHelper.ParaBreaks != null && MyPageHelper.ParaBreaks.Count > 0 && this == MyPageHelper.ParaBreaks[0])
{
MyPageHelper.ParaBreaks.RemoveAt(0);
reason = AddReason("Partial Step - Case 1");
ShowPageBreak(1, reason, "Yes", YSize, yPageSize, yWithinMargins, ManualPageBreak);
}
return 2;
} }
return 2;
} }
} }
// if the EndForSingle format flag is set to false, then we do not print an End message if the section // if the EndForSingle format flag is set to false, then we do not print an End message if the section
@ -1475,7 +1486,8 @@ namespace Volian.Print.Library
private SortedList<float, vlnParagraph> GetMyPreferredBreaks(StepLevelList myList) private SortedList<float, vlnParagraph> GetMyPreferredBreaks(StepLevelList myList)
{ {
// C2023-015: Pagination on a sub-step added. Do the code if supplemental info or if format supports sub-step pagination // C2023-015: Pagination on a sub-step added. Do the code if supplemental info or if format supports sub-step pagination
if (!MyItemInfo.MyDocStyle.SupplementalInformation && !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AlarmPagination) return null; // C2023-018: Remove the supplemental info & alarm check, doing the possible page breaks on sub-steps
//if (!MyItemInfo.MyDocStyle.SupplementalInformation && !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AlarmPagination) return null;
SortedList<float, vlnParagraph> sdpara = null; SortedList<float, vlnParagraph> sdpara = null;
foreach (int stepLevel in myList.Keys) // loop thru StepLevels, starting with lowest. foreach (int stepLevel in myList.Keys) // loop thru StepLevels, starting with lowest.
{ {
@ -1485,9 +1497,17 @@ namespace Volian.Print.Library
StepConfig sci = myPara.MyItemInfo.MyConfig as StepConfig; StepConfig sci = myPara.MyItemInfo.MyConfig as StepConfig;
if (sci != null && sci.Step_PreferredPagebreak || sci.Step_SubStepPagebreak) if (sci != null && sci.Step_PreferredPagebreak || sci.Step_SubStepPagebreak)
{ {
if (sdpara == null) sdpara = new SortedList<float, vlnParagraph>(); // C2023-018: if removing manual page breaks - add to list for permanent removal if selected and do not add a possible page break
if (myPara.ChildrenAbove != null && myPara.ChildrenAbove.Count > 0) sdpara.Add(-yLocation, myPara.ChildrenAbove[0]); // on the sub-step (do not execute the 'else' code)
else sdpara.Add(-yLocation, myPara); if (sci.Step_SubStepPagebreak && MyPageHelper.MyPromsPrinter.RemoveManualPageBreaks != null &&
!MyPageHelper.MyPromsPrinter.RemoveManualPageBreaks.Contains(MyItemInfo.ItemID))
MyPageHelper.MyPromsPrinter.RemoveManualPageBreaks.Add(MyItemInfo.ItemID);
else
{
if (sdpara == null) sdpara = new SortedList<float, vlnParagraph>();
if (myPara.ChildrenAbove != null && myPara.ChildrenAbove.Count > 0) sdpara.Add(-yLocation, myPara.ChildrenAbove[0]);
else sdpara.Add(-yLocation, myPara);
}
} }
} }
} }

View File

@ -2746,6 +2746,7 @@ namespace Volian.Print.Library
{ {
if (!HasManPagAnnot(ii, "Removed Manual Page Break")) VEPROMS.CSLA.Library.Annotation.MakeAnnotation(itm, AnnotationType.GetByNameOrCreate("Manual Pagination Issues"), null, "Removed Manual Page Break", null); if (!HasManPagAnnot(ii, "Removed Manual Page Break")) VEPROMS.CSLA.Library.Annotation.MakeAnnotation(itm, AnnotationType.GetByNameOrCreate("Manual Pagination Issues"), null, "Removed Manual Page Break", null);
sc.Step_NewManualPagebreak = false; // reset the flag that was set in the config sc.Step_NewManualPagebreak = false; // reset the flag that was set in the config
if (sc.Step_SubStepPagebreak) sc.Step_SubStepPagebreak = false; // C2023-018: remove substep page break flags
itm.MyContent.Config = sc.ToString(); itm.MyContent.Config = sc.ToString();
itm.MyContent.DTS = DateTime.Now; itm.MyContent.DTS = DateTime.Now;
itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID; itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID;