Compare commits

...
Author SHA1 Message Date
mschill 0c3e4bb3e9 VEPROMS_UI / remove BouncyCastle 2026-08-21 06:11:06 -04:00
mschill 23a296df86 Bring branch up to date 2026-08-19 06:26:18 -04:00
jjenko dbea4abafb Merge pull request 'F2026-020 Added the missing Layout settings to "Attachments - Separate Page Numbers" document style in the Farley FSG format.' (#806) from F2026-20_Farley_FSG_Format into Development
format only change - good for testing
2026-08-14 11:01:17 -04:00
jjenko 57622931a5 F2026-020 Added the missing Layout settings to "Attachments - Separate Page Numbers" document style in the Farley FSG format. 2026-08-14 11:02:13 -04:00
mschill 75368c2fe0 Merge pull request 'F2026-018 Changed the font to Arial 11pt in all Farley formats B2026-072 Fixed bug where a Caution or Note in the RNO column would sometimes print on top of text in the AER column' (#805) from F2026-018_B2026-072_Farely_Arial_Print_Fix into Development
Looks Good to me. Ready for QA.
2026-08-13 14:31:33 -04:00
jjenko 5e071bd35a F2026-018 Changed the font to Arial 11pt in all Farley formats B2026-072 Fixed bug where a Caution or Note in the RNO column would sometimes print on top of text in the AER column 2026-08-13 14:28:55 -04:00
jjenko 77639318c6 Merge pull request 'F2026-019 FixedlLinked attachments that were showing a double attachment number prefixed to the step number Added a unlinked background step type that includes the attachment number' (#804) from F2026-019_CallawayBackgrounds into Development
format only change - good for testing
2026-08-12 10:37:04 -04:00
jjenko 1a890b11cb F2026-019 FixedlLinked attachments that were showing a double attachment number prefixed to the step number Added a unlinked background step type that includes the attachment number 2026-08-12 10:38:02 -04:00
mschill f2e01803bc Additional XYPlot cleanup 2026-08-11 14:24:32 -04:00
mschill 752d30ba8f Bring Up To Date with Dev 2026-08-11 09:50:41 -04:00
jjenko 795f21f04b Merge pull request 'B2026-039-Error-sequence-contains-no-elements' (#802) from B2026-039-Error-sequence-contains-no-elements into Development
good for testing
2026-08-11 08:46:39 -04:00
mschill b1427f4997 Volian.Base.Library & Baseline 2026-08-11 07:33:32 -04:00
plarsen c95e86c2a6 Merge branch 'Development' into B2026-039-Error-sequence-contains-no-elements 2026-08-10 21:37:25 -04:00
plarsen 18d2aa3b51 B2026-039-Error-sequence-contains-no-elements 2026-08-10 21:28:29 -04:00
jjenko 7ba3ea8b13 Merge pull request 'B2026 056 syntax problem in x/y plot' (#801) from B2026-056-Syntax-problem-in-X/Y-plot into Development
good for testing
2026-08-10 11:11:07 -04:00
plarsen 30b34c3a50 B2026-056-Syntax-problem-in-XY-Plot 2026-08-10 10:02:16 -04:00
plarsen 6a42800d2c B2026-056-Syntax-problem-in-XY-Plot 2026-08-09 22:54:27 -04:00
plarsen 70f132540f B2026-056-Syntax-problem-in-XY-plot 2026-08-07 12:15:52 -04:00
plarsen cd9eaaaba1 B2026-056-Syntac-problem-in-XY-Plot 2026-08-05 21:42:44 -04:00
plarsen 70aa1f4024 B2026-056-Syntax-problem-in-XY-plot 2026-08-05 17:23:13 -04:00
plarsen 1d634d96fe Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-08-05 17:15:54 -04:00
mschill 6d7d127b63 Updates to DropDownPanel, Baseline, & Controls 2026-08-05 15:16:53 -04:00
mschill 6f0fcdded2 Bring Up to Date 2026-08-04 11:07:38 -04:00
jjenko 4eb5254d96 Merge pull request 'B2026-070 –Barakah Word Section with less than sign' (#800) from B2026-070 into Development
good for testing
2026-08-04 09:14:05 -04:00
mschill 6c2eee0cbc B2026-070 –Barakah Word Section with less than sign 2026-08-04 07:57:01 -04:00
plarsen 3c5265cecf Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-08-03 10:31:24 -04:00
mschill 9c97394f5e Bring Branch up to date 2026-08-03 06:27:46 -04:00
mschill 478d35890d Merge pull request 'C2026-047 Improved the efficiency of retrieving Alarm Point Table information.' (#799) from C2026-047_AlarmPointTableProcessing into Development
Looks Good - Ready for QA.
2026-08-03 05:36:26 -04:00
jjenko 1b9b63412c C2026-047 Improved the efficiency of retrieving Alarm Point Table information. 2026-07-31 13:44:19 -04:00
mschill 3bb8fff3a1 Merge pull request 'B2026 053 find unlinked values of selected' (#795) from B2026-053-Find-Unlinked-Values-of-Selected into Development
Looks Good. Ready For QA.
FYI - Branch was out of date so I updated it.

Would be sure to test both Searches that changed.
2026-07-30 15:29:18 -04:00
mschill 694bc0ead4 Merge branch 'Development' into B2026-053-Find-Unlinked-Values-of-Selected 2026-07-30 15:27:52 -04:00
plarsen cfc324d31e B2026-053-Find-Unlinked-Values-of-Selected 2026-07-30 15:22:32 -04:00
plarsen 43b63e2843 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-30 12:51:24 -04:00
jjenko f2ec510a70 Merge pull request 'B2026-069 – Updated Messaging related to Checking out working Drafts when ROs are being checked if they need updated.' (#798) from B2026-069 into Development
good for testing
2026-07-30 10:54:23 -04:00
mschill 453edbb28e B2026-069 – Updated Messaging related to Checking out working Drafts when ROs are being checked if they need updated. 2026-07-30 10:54:24 -04:00
mschill e492f12602 AdjustBuildRevision, FlexMsgBx, Formats, LBWordLib, VlnStatus, RoAccessToSql, TablePicker, VG 2026-07-30 08:15:47 -04:00
plarsen bc9407f52f B2026-053-Find-Unlinked-Values-of-Selected 2026-07-29 13:48:05 -04:00
plarsen 954cc5918f B2026-053-Find-Unlinked-Values-of-Selected 2026-07-29 12:34:20 -04:00
plarsen 4ef16e7856 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-28 15:46:43 -04:00
plarsen 1eb3c3e725 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-28 15:39:17 -04:00
plarsen a89c2d3d22 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-28 15:37:37 -04:00
plarsen 914837a5a2 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-28 10:57:55 -04:00
plarsen 9643a71ba5 Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-07-28 08:35:53 -04:00
mschill aa7e0528f8 Merge branch 'Development' into B2026-053-Find-Unlinked-Values-of-Selected 2026-07-28 06:34:08 -04:00
plarsen 57bd8d569e B2026-053-Find-Unlinked-Values-of-Selected 2026-07-27 13:45:20 -04:00
plarsen b49d8871a2 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-27 12:25:46 -04:00
plarsen b90d419bc5 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-27 12:14:55 -04:00
jjenko 1f48d498e1 Merge pull request 'B2026-067 – Corrected specific instance where a crash would occur when multiple Word Sections open and were closed in a specific order.' (#797) from B2026-067 into Development
good for testing
2026-07-27 11:54:21 -04:00
mschill da6139c932 B2026-067 – Corrected specific instance where a crash would occur when multiple Word Sections open and were closed in a specific order. 2026-07-27 11:47:36 -04:00
plarsen be744b40a3 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-27 11:35:42 -04:00
plarsen 780ce657ca B2026-053-Find-Unlinked-Values-of-Selected 2026-07-27 11:28:40 -04:00
plarsen 464be0f803 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-27 11:22:49 -04:00
plarsen 58a6cb9a24 Development 2026-07-27 11:19:47 -04:00
plarsen 9bf7b2ffde B2026-053-Find-Unlinked-Values-of-Selected 2026-07-27 11:14:19 -04:00
mschill cde1f28215 Merge pull request 'B2026-066 Fixed issue of the Update RO Values button and Working Draft context menu item, not being disabled after Updating RO Values.' (#796) from B2026-066_UpdateROsButtonFix into Development
Looks Good. Ready for QA.
2026-07-27 11:09:42 -04:00
jjenko db198cb7d0 B2026-066 Fixed issue of the Update RO Values button and Working Draft context menu item, not being disabled after Updating RO Values. 2026-07-27 11:08:35 -04:00
plarsen 99fe567e78 Development 2026-07-27 09:13:34 -04:00
mschill f67d37801a Print Library, Svg Library, Utils Library, XYPlots 2026-07-24 13:36:46 -04:00
plarsen 2261c8f0f5 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-24 10:47:25 -04:00
plarsen f93b16fc52 B2026-053-Find-Unlinked-Values-of-Selected 2026-07-23 09:21:09 -04:00
plarsen 7c3a43749c B2026-053-Find-Unlinked-Values-of-Selected 2026-07-23 09:09:22 -04:00
plarsen ecec7b9f1a Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-07-23 08:17:55 -04:00
plarsen 1aca7335f7 Development 2026-07-23 08:15:18 -04:00
plarsen ba5aee6640 Development 2026-07-21 11:33:58 -04:00
mschill 06c3136566 Merge branch 'Development' into C2026-043-Tech-Debt_v1 2026-07-21 10:38:53 -04:00
jjenko abaf55e9b1 Merge pull request 'C2026-046 - Decrease check if need to update ROs.' (#793) from C2026-046 into Development
good for testing
2026-07-21 10:32:30 -04:00
mschill 3a2dd0b0aa C2026-046 - Decrease check if need to update ROs. 2026-07-21 10:24:46 -04:00
mschill 9486b37300 C2026-043-Tech-Debt_v1 - Stash 1 2026-07-21 06:49:28 -04:00
jjenko 0fed1acfd8 Merge pull request 'F2026-017 Blank line was sometimes missing after the Note and Caution text. This was a 64-bit build difference that affected the text width calculations.' (#792) from F2026-017_SummerCautionNoteAdj into Development
Format only change - good for testing phase
2026-07-17 10:11:25 -04:00
jjenko d7c2300021 F2026-017 Blank line was sometimes missing after the Note and Caution text. This was a 64-bit build difference that affected the text width calculations. 2026-07-17 10:11:43 -04:00
jjenko fca333299d Merge pull request 'C2026 044' (#791) from C2026-044 into Development
good for testing phase
2026-07-16 08:53:54 -04:00
mschill a13b03a136 C2026-044 – ve_GetParentItem Performance Improvement
Added Included columns to Index
2026-07-16 08:48:11 -04:00
mschill 48054f5bf1 C2026-044 – ve_GetParentItem Performance Improvement 2026-07-16 08:26:52 -04:00
mschill 51f2897a33 C2026-044 – ve_GetParentItem Performance Improvement 2026-07-16 08:26:07 -04:00
plarsen 7a3a07b0da Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-07-16 08:25:16 -04:00
jjenko 7c3cfca86c Merge pull request 'B2026-055 – Transition Search Improvements' (#790) from B2026-055 into Development
good for testing
2026-07-15 13:54:03 -04:00
mschill 352af15984 B2026-055 – Transition Search Improvements 2026-07-15 12:43:38 -04:00
jjenko 2c42933d58 Merge pull request 'F2026-016 Robinson- created a new sub-format for a Foldout section that uses a smaller font size.' (#789) from F2026-016_Robinson_Foldout_Format into Development
format only change. good for testing
2026-07-10 09:57:15 -04:00
jjenko 2e68362836 F2026-016 Robinson- created a new sub-format for a Foldout section that uses a smaller font size. 2026-07-10 09:56:58 -04:00
jjenko c6736db7ea Merge pull request 'B2026-065 Adjusted the Callaway Two Column format for the position of RNO tables.' (#788) from B2026-065_RNO_TablePositionAdjustment into Development
format only change.  Good for testing
2026-07-09 10:41:42 -04:00
jjenko c005f03af8 B2026-065 Adjusted the Callaway Two Column format for the position of RNO tables. 2026-07-09 10:41:46 -04:00
jjenko 459aabcc86 Merge pull request 'B2026-064 – Updating ROs from Display ROs should not error' (#787) from B2026-064 into Development
good for testing
2026-07-07 11:01:30 -04:00
mschill ad33097d5e B2026-064 – Updating ROs from Display ROs should not error 2026-07-07 10:59:51 -04:00
jjenko 8d7735735e Merge pull request 'F2026_015 Moved the change bar position to the right one space to accommodate the wider Caution and Note boxes' (#786) from F2026-015_SouthTexas_ChgBars into Development
format only change.  Ready for testing
2026-07-01 09:15:24 -04:00
jjenko 25bbc46925 F2026_015 Moved the change bar position to the right one space to accommodate the wider Caution and Note boxes 2026-07-01 09:17:23 -04:00
jjenko 5a26b0ee35 Merge pull request 'B2026-054 - When performing a Transition search, the Formats dropdown list is repeating several times.' (#785) from B2026-054 into Development
good for testing phase
2026-07-01 08:19:38 -04:00
mschill 09a397bed2 B2026-054 - When performing a Transition search, the Formats dropdown list is repeating several times. 2026-07-01 07:21:25 -04:00
jjenko a33039bcae Merge pull request 'F2026-014 South Texas EOP format – adjusted the Caution and Note box width. Also remove the extra space between bullets and multiple Caution/Note text' (#784) from F2026-014_SouthTexas_Caution_Box_Width into Development
format only changes - ready for testing
2026-06-30 14:34:22 -04:00
jjenko 0ebd125266 F2026-014 South Texas EOP format – adjusted the Caution and Note box width. Also remove the extra space between bullets and multiple Caution/Note text 2026-06-30 14:35:28 -04:00
jjenko fd16a6b6c3 Merge pull request 'B2026-063 - Issue Deleting Steps with Grids' (#783) from B2026-063 into Development
good for testing
2026-06-30 13:50:22 -04:00
mschill cf19f764c7 Copy / Paste Error when updating Revision Comment 2026-06-30 13:49:37 -04:00
jjenko 88850d6c25 Merge pull request 'B2026-063 - Issue Deleting Steps with Grids' (#782) from B2026-063 into Development
good for testing phase
2026-06-30 09:28:28 -04:00
mschill b173c61575 B2026-063 - Issue Deleting Steps with Grids 2026-06-30 09:11:43 -04:00
jjenko 3b866f0952 Merge pull request 'B2026-057 - Issue when ROs are out of date and swapping between sets – sometimes asked if want to update ROs twice if said no the first time.' (#781) from B2026-057 into Development
good for testing phase
2026-06-29 10:00:42 -04:00
mschill 94db524a11 B2026-057 - Issue when ROs are out of date and swapping between sets – sometimes asked if want to update ROs twice if said no the first time. 2026-06-29 09:51:48 -04:00
jjenko f27616ce1f Merge pull request 'B2026-052 - Issue when parens inside a Hardspaced Multi-RO Return Values.' (#780) from B2026-052 into Development
good for testing phase
2026-06-29 08:47:11 -04:00
mschill 7f75af7119 B2026-052 - Issue when parens inside a Hardspaced Multi-RO Return Values.
PROMS crashes when doing an update ROFst.
2026-06-25 15:46:25 -04:00
plarsen 05ab48cdc5 Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-06-24 09:49:07 -04:00
mschill 38e42723af Merge pull request 'B2026-060, B2026-061, Fixed issue where change bars were printing when they should not have been.' (#778) from B2026-60_B2026-61 into Development
Looks Good. Ready for QA!
2026-06-18 14:18:24 -04:00
jjenko f4ec60c9e0 B2026-060, B2026-061, Fixed issue where change bars were printing when they should not have been. 2026-06-18 14:06:30 -04:00
plarsen fd51c209a3 Development 2026-06-15 15:18:03 -04:00
jjenko 01394b1978 Merge pull request 'B2026 058' (#777) from B2026-058 into Development
good for testing
2026-06-12 15:15:39 -04:00
mschill 9b7db08fcf update unicode 2026-06-12 15:02:01 -04:00
mschill 6d7cdef223 B2026-058 – If approving multiple procedures at the same time with a multiunit set and one of the procedures is open, PROMS sometimes loses that it is set for an individual unit. 2026-06-12 14:57:42 -04:00
jjenko d9c35fe02a Merge pull request 'C2026 021 b2026 048' (#775) from C2026-021_B2026-048 into Development
good for testing
2026-05-29 09:47:07 -04:00
mschill 250b3fa406 Remove commented out code 2026-05-29 06:33:37 -04:00
mschill a5a3f16177 C2026-021_B2026-048 Expand Functionality of Viewing Mode 2026-05-29 06:06:58 -04:00
jjenko ffa7e21c18 Merge pull request 'B2026-050 Problem when Approval with Duplicate Rev Numbers' (#773) from B2026-050 into Development
good for testing phase
2026-05-26 08:38:20 -04:00
mschill 4608c05df0 B2026-050 Problem when Approval with Duplicate Rev Numbers 2026-05-26 07:01:43 -04:00
jjenko 56ff5a0213 Merge pull request 'B2026-051 Fix Error loading Display Ros when cannot find RO lookup' (#772) from B2026-051 into Development
good for testing phase
2026-05-22 11:34:31 -04:00
mschill 014fde301c B2026-051 Fix Error loading Display Ros when cannot find RO lookup 2026-05-22 11:07:57 -04:00
jjenko 0080a42423 Merge pull request 'C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST' (#756) from C2026-008 into Development
Reviewed-on: #756
Reviewed-by: John Jenko <jjenko@volian.com>

This was pre-tested prior to  this merge.
2026-05-19 09:24:09 -04:00
mschill 2035a4c855 Merge branch 'Development' into C2026-008 2026-05-19 08:59:34 -04:00
jjenko 4dc6a190fa Merge pull request 'C2026-037 Change History Deleted Items to 24-hour clock' (#771) from C2026-037 into Development
good for testing
2026-05-19 08:56:47 -04:00
mschill e0db322262 C2026-037 Change History Deleted Items to 24-hour clock 2026-05-19 06:56:31 -04:00
mschill 8f1bb45e42 C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST
--Fix for Blank popup box when completes updating ROs through Admin Tool & fix for updating ROs when fails part way through (if network error, etc…)
2026-05-15 07:09:21 -04:00
mschill f39aefd28f Merge branch 'Development' into C2026-008 2026-05-14 10:40:00 -04:00
jjenko 2cfc43dbfd Merge pull request 'B2026-045 Issue with Refreshing Changebars when Approval is done multiple times in a row on Multi-unit. Printing was ok but the UI required leaving PROMS and going back in.' (#769) from B2026-045 into Development
good for testing
2026-05-13 15:38:26 -04:00
mschill f4168b5202 B2026-045 Issue with Refreshing Changebars when Approval is done multiple times in a row on Multi-unit. Printing was ok but the UI required leaving PROMS and going back in. 2026-05-13 15:02:52 -04:00
jjenko 2d93b652e8 Merge pull request 'B2026-046-RO-symbols-and-Annotations' (#768) from B2026-046-RO-symbols-and-Annotations into Development
good for testing
2026-05-13 13:43:12 -04:00
plarsen 70782cd655 B2026-046-RO-symbols-and-Annotations 2026-05-13 13:37:12 -04:00
mschill 768fcc4f05 Fix Bug in Dotnet Bar related to multiple events and closing display tabs 2026-05-12 08:54:26 -04:00
mschill 727491f99b Merge branch 'C2026-008' of https://git.volian.com/Volian/SourceCode into C2026-008 2026-05-11 14:43:49 -04:00
mschill c5f1c3a340 C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST
Update ProgressBar & fix Already Checked out popup multiple times
2026-05-11 14:42:48 -04:00
mschill a78311104a Merge branch 'Development' into C2026-008 2026-05-11 14:41:01 -04:00
plarsen 4b5b06210c B2026-046-RO-symbols-and-Annotations 2026-05-08 23:20:38 -04:00
jjenko 333645b044 Merge pull request 'F2026_013 Fixed typo in Vogtle format title' (#767) from F2026-013_Vogtle_3_4_Format into Development
format only change - good for testing phase
2026-05-07 15:23:01 -04:00
jjenko 23173074aa F2026_013 Fixed typo in Vogtle format title 2026-05-07 15:21:48 -04:00
jjenko be8bb9c4e1 Merge pull request 'B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function' (#765) from B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function into Development
good for testing phase
2026-05-07 15:07:27 -04:00
plarsen d07e132216 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-07 14:55:44 -04:00
plarsen 401fa12851 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-07 13:29:55 -04:00
plarsen 194ca84d38 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-07 11:34:16 -04:00
plarsen 7bbf62d735 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-07 11:27:36 -04:00
plarsen 3924e2fca5 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-06 07:54:39 -04:00
plarsen 2e39102e7c Merge branch 'Development' into B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-05 22:26:21 -04:00
plarsen 2a0849fae5 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-05 22:08:27 -04:00
jjenko 9f4e8f6eef Merge pull request 'C2026-014 Set Changebar date with multi-unit' (#766) from C2026-014 into Development
good for testing
2026-05-05 09:05:23 -04:00
mschill d0fe36f86e C2026-014 Set Changebar date with multi-unit 2026-05-05 08:50:39 -04:00
jjenko 10da22cd77 Merge pull request 'C2026-015 Set overall Changebar date when approving multi-unit' (#764) from C2026-015 into Development
good for testing
2026-05-05 08:44:47 -04:00
mschill 6dacc2d515 Merge branch 'Development' into C2026-015 2026-05-05 06:08:19 -04:00
mschill 7baa9628d6 C2026-015 Set overall Changebar date when approving multi-unit 2026-05-05 06:00:43 -04:00
plarsen ec5229101f B2026-043-Fix-Error-for-Set_At_AAll_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-04 17:00:42 -04:00
plarsen a0e0b1e788 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-04 16:33:08 -04:00
jjenko f1e04396de Merge pull request 'B2026-042-Fix-Null-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-4' (#762) from B2026-042-Fix-Null-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-4 into Development
good for testing
2026-05-04 09:11:33 -04:00
plarsen d0cae8c2fc B2026-042-Fix-Null-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-4 2026-05-04 08:48:51 -04:00
plarsen 90c215d4c1 B2026-042-Fix-Null-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-4 2026-05-01 16:26:04 -04:00
plarsen 1b1dc78548 C2026-027-New-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-4 2026-04-30 16:37:10 -04:00
jjenko a112163f85 Merge pull request 'C2026-015 Set overall Changebar date when approving multi-unit' (#761) from C2026-015 into Development
ready for testing
2026-04-30 14:01:58 -04:00
mschill 2a9f2e188d C2026-015 Set overall Changebar date when approving multi-unit 2026-04-30 13:53:02 -04:00
jjenko 652e0cb06f Merge pull request 'C2026-027-New-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-3' (#760) from C2026-027-New-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-3 into Development
ready for testing
2026-04-30 08:41:01 -04:00
plarsen 123b1b08c2 C2026-027-New-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-3 2026-04-30 08:20:41 -04:00
plarsen b321bc354b C2026-027-New-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-3 2026-04-28 18:09:15 -04:00
plarsen 03d7397242 Merge remote-tracking branch 'origin/Development' into Development 2026-04-28 14:39:52 -04:00
mschill 45e78ef184 Merge branch 'Development' into C2026-008 2026-04-28 13:43:35 -04:00
jjenko fe7c5893bb Merge pull request 'B2026-040 - Signoff/Checkoffs not printing unless set to Section Default' (#758) from B2026-040 into Development
good for testing
2026-04-28 11:11:45 -04:00
mschill 2b57c552d1 B2026-040 - Signoff/Checkoffs not printing unless set to Section Default 2026-04-28 11:03:04 -04:00
mschill 7f0d39b684 C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST 2026-04-28 09:13:17 -04:00
plarsen 7273a8b13b Development 2026-04-27 15:43:38 -04:00
jjenko a544a5cd4f Merge pull request 'B2026-037 - Remove Fix Symbol Font' (#755) from B2026-037 into Development
good for testing phase
2026-04-16 14:02:42 -04:00
mschill ff9ade75d4 B2026-037 - Remove Fix Symbol Font 2026-04-16 09:32:02 -04:00
mschill cfd5498521 Merge pull request 'C2026-033 Added logic to not display the Empty Procedure message box if we are printing via baseline print testing.' (#754) from C2026-033_Baseline_Printing into Development
Looks Good. Ready for QA.
2026-04-15 11:55:19 -04:00
jjenko 9b7c30e1cd C2026-033 Added logic to not display the Empty Procedure message box if we are printing via baseline print testing. 2026-04-15 11:28:21 -04:00
mschill 670e5d7fa9 Merge pull request 'Baseline Application fixes' (#753) from baseline into Development
Looks good. Ready for QA.
2026-04-13 11:13:50 -04:00
jjenko 8258235611 Baseline Application fixes 2026-04-13 11:06:50 -04:00
jjenko 4d97f29943 Merge pull request 'B2026-035_fix_RO_Preview_for_X_Y_Plots' (#751) from B2026-035_fix_RO_Preview_for_X_Y_Plots into Development
good for testing
2026-03-31 08:53:49 -04:00
plarsen ab8d59eb2d Merge branch 'Development' into B2026-035_fix_RO_Preview_for_X_Y_Plots 2026-03-31 08:48:01 -04:00
plarsen c324fa69b2 B2026-035_fix_RO_Preview_for_X_Y_Plots 2026-03-31 08:47:43 -04:00
plarsen 1cdb9b4cc2 Development 2026-03-31 08:43:41 -04:00
plarsen f47fa49b80 B2026-035_fix_RO_Preview_for_X_Y_Plots 2026-03-30 16:12:37 -04:00
plarsen 6ade96c7ef B2026-035_fix_RO_Preview_for_X_Y_Plots 2026-03-30 13:41:03 -04:00
plarsen 61d31a3c67 Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-03-30 13:05:08 -04:00
mschill 014509ea30 Merge pull request 'B2026-036 Fixed issue where if a RO return value and a dash followed by numbers, the numbers following the dash would be truncated when inserting in step editor text.' (#750) from General_Debugging into Development
Looks Good. Ready for QA.
2026-03-27 15:32:54 -04:00
jjenko 1ce1a45ca6 B2026-036 Fixed issue where if a RO return value and a dash followed by numbers, the numbers following the dash would be truncated when inserting in step editor text. 2026-03-27 15:26:06 -04:00
plarsen b6da13a653 Development 2026-03-26 11:49:54 -04:00
jjenko 604b4d1751 Merge pull request 'C2026-031 - BNPP Cover Page Consolidation' (#748) from BNPP_CoverPage_Consolidation into Development
good for testing phase
2026-03-26 09:28:07 -04:00
mschill 874aaf2857 Merge branch 'Development' into BNPP_CoverPage_Consolidation 2026-03-26 09:15:23 -04:00
mschill 17a28def4e Update Copyright date 2026-03-26 09:17:13 -04:00
jjenko e72a1aa9e7 Merge pull request 'B2026-018_The_Disable_Initial_Line_check_box' (#747) from B2026-018_The_Disable_Initial_Line_check_box into Development
good for testing phase
2026-03-26 09:11:20 -04:00
mschill 7b96ef1b4c BNPP Cover Page Consolidation 2026-03-26 09:02:14 -04:00
plarsen ea048e6d82 B2026-018_The_Disable_Initial_Line_check_box 2026-03-26 07:55:27 -04:00
plarsen 109abfb4ad Merge branch 'Development' into B2026-018_The_Disable_Initial_Line_check_box 2026-03-26 07:53:21 -04:00
plarsen 3f662ab19d B2026-018_The_Disable_Initial_Line_check_box 2026-03-25 22:55:52 -04:00
jjenko b0de38909a Merge pull request 'B2026-023-Adding-RO-Editor-symbols-to-RO-X_Y_plots' (#746) from B2026-023-Adding-RO-Editor-symbols-to-RO-X_Y_plots into Development
good for testing phase
2026-03-25 13:26:02 -04:00
plarsen 267de44103 Merge branch 'Development' into B2026-023-Adding-RO-Editor-symbols-to-RO-X_Y_plots 2026-03-25 11:54:12 -04:00
plarsen b7b0e55d94 B2026-023-Adding-RO-Editor-symbols-to-RO-X_Y_plots 2026-03-25 11:41:39 -04:00
plarsen c0d12f5721 B2026-023-Adding-RO-Editor-symbols-to-RO-X_Y_plots 2026-03-25 11:34:58 -04:00
mschill 27a945485f Merge pull request 'B2026-034 Fixed issue where import of procedure set failed when it was deleting the temporary folders that are created during the process, preventing the importing code to try and fix transitions and foldout information (link).' (#745) from B2026-034 into Development
Looks Good. Ready for QA.
2026-03-25 06:04:23 -04:00
jjenko d76c81a9d8 B2026-034 Fixed issue where import of procedure set failed when it was deleting the temporary folders that are created during the process, preventing the importing code to try and fix transitions and foldout information (link). 2026-03-24 16:27:22 -04:00
jjenko 143a3622dd Merge pull request 'C2026-007_B2026-027' (#744) from C2026-007_B2026-027 into Development
good for continued  testing
2026-03-24 08:56:31 -04:00
mschill 75992293c6 Merge branch 'Development' into C2026-007_B2026-027 2026-03-24 08:45:28 -04:00
mschill 0e004828b3 Merge branch 'C2026-007_B2026-027' of https://git.volian.com/Volian/SourceCode into C2026-007_B2026-027 2026-03-24 08:46:04 -04:00
mschill 714751f404 C2026-007 Admin Tool Generate Word Attachments 2026-03-24 08:45:55 -04:00
jjenko 27576e946e Merge pull request 'C2026-007 - Handle case for Step Progress when all switchboxes are turned off and then Regen Word Attachments is turned back on.' (#743) from C2026-007_B2026-027 into Development
good for testing
2026-03-23 08:13:48 -04:00
mschill e548dddcbd Merge branch 'Development' into C2026-007_B2026-027 2026-03-23 08:04:33 -04:00
mschill 8cbc8c497e C2026-007 - Handle case for Step Progress when all switchboxes are turned off and then Regen Word Attachments is turned back on. 2026-03-23 06:30:41 -04:00
jjenko c328140441 Merge pull request 'B2026-033 Tooltip for Generate Word Attachments' (#742) from B2026-033 into Development
good for testing
2026-03-20 15:37:05 -04:00
mschill a10798c983 B2026-033 Tooltip for Generate Word Attachments 2026-03-20 15:30:51 -04:00
jjenko 06909e260f Merge pull request 'B2026-030 GoTo sometimes requires being pressed twice for ROs' (#741) from B2026-030 into Development
good for testing
2026-03-18 14:47:28 -04:00
mschill 5eca8a5150 B2026-030 GoTo sometimes requires being pressed twice for ROs 2026-03-18 14:44:45 -04:00
jjenko 88a13f9864 Merge pull request 'C2026-028 Update Tooltip for “Set All at Level” in Applicability.' (#740) from C2026-028 into Development
good for testing
2026-03-18 08:21:01 -04:00
mschill e03ae6195a C2026-028 Update Tooltip for “Set All at Level” in Applicability. 2026-03-18 07:53:17 -04:00
jjenko c3cacaf407 Merge pull request 'B2026-022-Adding-RO-Editor-symbols-to-RO-Tables' (#738) from B2026-022-Adding-RO-Editor-symbols-to-RO-Tables into Development
good for testing
2026-03-17 16:09:54 -04:00
plarsen 4b479b3ceb B2026-022-Adding-RO-Editor-symbols-to-RO-Tables 2026-03-17 15:30:35 -04:00
jjenko c78cb805fb Merge pull request 'C2026-030 corrected the Alarm format cover page' (#739) from C2026-030_BNPP_CoverAdjustments into Development
format only change. good for tesing
2026-03-17 11:25:24 -04:00
jjenko d17688fc9d C2026-030 corrected the Alarm format cover page 2026-03-17 11:24:24 -04:00
plarsen fd59b9d5f0 Merge branch 'Development' into B2026-022-Adding-RO-Editor-symbols-to-RO-Tables 2026-03-17 08:39:28 -04:00
jjenko 0e71c9f5f5 Merge pull request 'C2026-007 Upgrade - Generate Missing Word Attachments/B2026-027 Update Refresh Tables For Search Tooltip' (#737) from C2026-007_B2026-027 into Development
good for testing phase
2026-03-16 14:55:39 -04:00
mschill bc3c14589e C2026-007 Upgrade - Generate Missing Word Attachments/B2026-027 Update Refresh Tables For Search Tooltip 2026-03-16 14:45:04 -04:00
jjenko 4331f49f6f Merge pull request 'C2026-030 Barakah asked that the white space between the procedure number and procedure title be reduced when the KEPCO number is not printed' (#736) from C2026-030_BNPP_CoverAdjustments into Development
Format only changes -ready for testing
2026-03-16 14:33:07 -04:00
jjenko 294d19e9d1 C2026-030 Barakah asked that the white space between the procedure number and procedure title be reduced when the KEPCO number is not printed 2026-03-16 14:32:57 -04:00
plarsen ed615dbb31 B2026-022-Adding-RO-Editor-symbols-to-RO-Tables 2026-03-16 13:30:36 -04:00
plarsen e9ad57f588 B2026-022-Adding-RO-Editor-symbols-to-RO-Tables 2026-03-16 12:44:04 -04:00
jjenko 7fee639b53 Merge pull request 'B2026-032 Revert Clipboard B2025-064' (#734) from Revert-Clipboard-B2025-064 into Development
Reviewed-on: #734
Reviewed-by: John Jenko <jjenko@volian.com>
2026-03-12 14:49:45 -04:00
mschill c2a5a8ec7d Revert Clipboard B2025-064 2026-03-12 14:35:32 -04:00
jjenko ec823cab97 Merge pull request 'B2026-031 PROMS Crash in Admin Tools Maintenance - Purge Change History' (#733) from B2026-031 into Development
good for testing
2026-03-12 11:22:06 -04:00
mschill 83f88b6df3 B2026-031 PROMS Crash in Admin Tools Maintenance - Purge Change History 2026-03-12 11:10:04 -04:00
plarsen 7636fe7686 B2026-022-Adding-RO-Editor-symbols-to-RO-Tables 2026-03-11 20:26:01 -04:00
jjenko 1e12c82be4 Merge pull request 'B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview' (#729) from B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview into Development
good for testing phase
2026-03-10 13:23:59 -04:00
plarsen 9879a80569 Merge branch 'Development' into B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview 2026-03-10 11:56:10 -04:00
plarsen 13b03f4f89 B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview 2026-03-10 11:50:21 -04:00
jjenko 331de6ecfe Merge pull request 'B2026-029 Update the Clipboard Copying in PROMS StepTabRibbon to retry' (#731) from B2026-029 into Development
good for testing
2026-03-10 08:39:11 -04:00
plarsen 7b649c4a62 B2026-018_The_Disable_Initial_Line_check_box 2026-03-10 08:24:28 -04:00
mschill 9ccdaef354 B2026-029 Update the Clipboard Copying in PROMS StepTabRibbon to retry 2026-03-10 07:02:50 -04:00
jjenko fa114f4467 Merge pull request 'B2026-028_Selecting_to_Go_To_on_an_RO_causes_PROMS_to_crash' (#730) from B2026-028_Selecting_to_Go_To_on_an_RO_causes_PROMS_to_crash into Development
good for testing
2026-03-09 14:41:03 -04:00
plarsen 33cc650871 B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview 2026-03-09 14:26:19 -04:00
plarsen 95737d05e1 B2026-028 Selecting to Go To on an RO causes PROMS to crash. 2026-03-09 13:43:18 -04:00
plarsen 955ffc48d3 B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview 2026-03-09 11:41:13 -04:00
plarsen d79dd908f6 B2026-028 Selecting to Go To on an RO causes PROMS to crash 2026-03-08 22:28:23 -04:00
plarsen 4656ec30af Development 2026-03-08 22:06:02 -04:00
plarsen a0be60a1b9 B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview 2026-03-07 22:38:18 -05:00
jjenko d296d6f000 Merge pull request 'B2026-026_RO_Values_in_the_RO_value_textbox_at_the_top_Step_Properties_panel_now_displays_symbols' (#728) from B2026-026_RO_Values_in_the_RO_value_textbox_at_the_top_Step_Properties_panel_now_displays_symbols into Development
good for testing
2026-03-03 08:35:21 -05:00
plarsen 8df4bd2537 B2026-026_RO_Values_in_the_RO_value_textbox_at_the_top_Step_Properties_panel_now_displays_symbols 2026-03-02 23:23:47 -05:00
jjenko cc5cdb88ff Merge pull request 'B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open' (#727) from B2026-019 into Development
good for testing phase
2026-03-02 14:18:13 -05:00
mschill f66c6a93c5 Merge branch 'Development' into B2026-019 2026-03-02 14:12:12 -05:00
mschill a7b5ee33e2 B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open 2026-03-02 14:12:26 -05:00
jjenko fe90af5aa4 Merge pull request 'B2026-021-some-symbols-not-being-displayed-correctly' (#726) from B2026-021-some-symbols-not-being-displayed-correctly into Development
good for testing phase
2026-02-27 13:34:23 -05:00
plarsen 7e672d91e9 Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-02-27 12:07:26 -05:00
jjenko 09f472bee2 Merge pull request 'F2026-011 Vogtle Units 3&4 Backgrounds. Adjusted the section title text for the section 5.0 continue message so that it aligns with the background text on the page' (#725) from F2026-011_VogtleBackgrounds_sect_title_adj into Development
format only change
2026-02-27 10:35:25 -05:00
jjenko 30da0c5105 F2026-011 Vogtle Units 3&4 Backgrounds. Adjusted the section title text for the section 5.0 continue message so that it aligns with the background text on the page 2026-02-27 10:35:46 -05:00
jjenko d2082cdbea Merge pull request 'B2026-019' (#724) from B2026-019 into Development
good for testing
2026-02-27 10:11:28 -05:00
mschill c42596811e Merge branch 'Development' into B2026-019 2026-02-27 10:05:26 -05:00
mschill d095a19187 Merge branch 'B2026-019' of https://git.volian.com/Volian/SourceCode into B2026-019 2026-02-27 10:06:42 -05:00
mschill 8089e2c898 B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open 2026-02-27 10:06:24 -05:00
jjenko a657d03fb0 Merge pull request 'F2026-012 Vogtle Units 3&4 Background format. Fixed the step tab for FOP Criteria (foldout background information).' (#723) from F2026-012_VogtleBackgroundFOP into Development
format only change
2026-02-27 09:34:25 -05:00
jjenko 4e829200f5 F2026-012 Vogtle Units 3&4 Background format. Fixed the step tab for FOP Criteria (foldout background information). 2026-02-27 09:01:34 -05:00
plarsen bef9be5cbe Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-02-26 15:44:46 -05:00
jjenko 56f14323d1 Merge pull request 'B2026-017 Use Pre-typed in information when adding New Applicability' (#722) from B2026-017 into Development
good for testing phase
2026-02-26 15:07:15 -05:00
mschill 4fcd22ca68 B2026-017 Use Pre-typed in information when adding New Applicability 2026-02-26 14:49:06 -05:00
plarsen 21890e74fe Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-02-26 14:33:59 -05:00
jjenko ef32564fba Merge pull request 'B2026-024 Change bars should not show when updating Applicability.' (#721) from B2026-024 into Development
good for testing phase
2026-02-26 14:04:16 -05:00
mschill d95505726f B2026-024 Change bars should not show when updating Applicability. 2026-02-26 13:14:25 -05:00
plarsen bb7b892f7c Merge branch 'Development' of https://git.volian.com/Volian/SourceCode into Development 2026-02-25 15:51:27 -05:00
jjenko 836cdaf087 Merge pull request 'B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open' (#719) from B2026-019 into Development
good for testing phase
2026-02-25 15:48:11 -05:00
mschill 6f5c41abb8 Merge branch 'Development' into B2026-019 2026-02-25 15:41:45 -05:00
jjenko 6379321785 Merge pull request 'F2026-010_VogtleBack_fontsize' (#720) from F2026-010_VogtleBack_fontsize into Development
format only change.
2026-02-25 15:40:41 -05:00
mschill e4c6e4393e B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open 2026-02-25 15:36:44 -05:00
jjenko 3e6bb81e39 F2025-010 Vogtle Units 3&4 Backgrounds. Made the font size of the hard-coded section 5.0 title and the linked step tab and step number consistent with the rest of the document. 2026-02-25 15:34:19 -05:00
plarsen ded6f18dd5 Development 2026-02-25 15:27:25 -05:00
jjenko 81643e2aef Merge pull request 'C2026-023 Change "Applicability - Set All at Level" to check the transitions at each level for steps that would be changed.' (#718) from C2026-023 into Development
good for testing
2026-02-25 11:30:15 -05:00
mschill 8a186f9f0c C2026-023 Change "Applicability - Set All at Level" to check the transitions at each level for steps that would be changed. 2026-02-25 08:37:29 -05:00
jjenko 14aa39976a Merge pull request 'B2025-064 PROMS clears the windows clipboard when closing PROMS with tabs open.' (#717) from B2025-064_v2 into Development
good for testing
2026-02-24 09:10:36 -05:00
jjenko c077e0ddc2 Merge pull request 'B2026-016 Fix Error Approving a Procedure without ROs set' (#716) from B2026-016 into Development
good for testing
2026-02-24 09:08:40 -05:00
mschill d198a7b63a B2025-064 PROMS clears the windows clipboard when closing PROMS with tabs open. 2026-02-24 08:22:18 -05:00
mschill 7f36a33dea B2026-016 Fix Error Approving a Procedure without ROs set 2026-02-24 07:08:07 -05:00
jjenko db3d9fc65f Merge pull request 'C2026-010 Add Audit History to Setting Change Bars' (#715) from C2026-010 into Development
good for testing
2026-02-23 15:40:15 -05:00
mschill f9738451db C2026-010 Add Audit History to Setting Change Bars 2026-02-23 15:25:32 -05:00
mschill ec73b5cbea Merge pull request 'C2022-003-Change-Textboxes-to-RTF-3' (#701) from C2022-003-Change-Textboxes-to-RTF-3 into Development
Ready for testing phase.
2026-02-20 10:31:50 -05:00
mschill f3bd6b6469 Merge branch 'Development' into C2022-003-Change-Textboxes-to-RTF-3 2026-02-20 10:28:29 -05:00
jjenko fd50993fb9 Merge pull request 'C024-039_Button_on_Applicability_Tab_to_change_all_at_same_level_for_setting_the_item_mode-2' (#714) from C024-039_Button_on_Applicability_Tab_to_change_all_at_same_level_for_setting_the_item_mode-2 into Development
good for testing phase
2026-02-20 09:06:00 -05:00
plarsen 079381dbb0 C024-039_Button_on_Applicability_Tab_to_change_all_at_same_level_for_setting_the_item_mode-2 2026-02-20 09:04:01 -05:00
plarsen 85bdc35342 C024-039_Button_on_Applicability_Tab_to_change_all_at_same_level_for_setting_the_item_mode-2 2026-02-19 16:18:31 -05:00
plarsen 2aaaa55e42 C024-039_Button_on_Applicability_Tab_to_change_all_at_same_level_for_setting_the_item_mode-2 2026-02-19 15:40:34 -05:00
plarsen e999bea228 C024-039_Button_on_Applicability_Tab_to_change_all_at_same_level_for_setting_the_item_mode-2 2026-02-19 13:44:37 -05:00
plarsen 287c06383b C024-039_Button_on_Applicability_Tab_to_change_all_at_same_level_for_setting_the_item_mode-2 2026-02-19 10:03:57 -05:00
jjenko 202409c140 Merge pull request 'B2026-015 Changing Formats for a Section' (#713) from B2026-015 into Development
good for testing
2026-02-16 16:27:04 -05:00
mschill 34886beccb B2026-015 Changing Formats for a Section
When changing the format for a section, the available section types sometimes requires the user to exit and get back in.

Noticed this with Vogle when changing for a format VEGBckStps to VEGP2 that the Landscape Attachment was not showing till exited and got back in.
2026-02-16 14:45:08 -05:00
jjenko 3d200cc34e Merge pull request 'F2026-007 - Added Landscape Attachment - Word Editor DocStyles/PageStyles to Background Document Formats / F2026-009 Vogtle Backgrounds Table of Contents adjustment' (#712) from F2026-007_F2026-009 into Development
merging into development
2026-02-13 15:20:40 -05:00
mschill b13883530a F2026-007 - Added Landscape Attachment - Word Editor DocStyles/PageStyles to Background Document Formats / F2026-009 Vogtle Backgrounds Table of Contents adjustment 2026-02-13 15:10:17 -05:00
jjenko 032e04bc50 Merge pull request 'B2026-014 Approved Procedure Export' (#711) from B2026-014 into Development
good for testing
2026-02-12 13:56:14 -05:00
mschill 625b715832 B2026-014 Approved Procedure Export 2026-02-12 13:51:06 -05:00
jjenko e1ac360271 Merge pull request 'F2064-008 Turned off pagination flags that caused bad pagination in the background steps' (#710) from F2026-008_VogtleBackgroundsPagination into Development
Format only change - good for testing
2026-02-12 11:49:57 -05:00
jjenko 7eda88bdbe F2064-008 Turned off pagination flags that caused bad pagination in the background steps 2026-02-12 11:49:40 -05:00
jjenko 90fdb94e95 Merge pull request 'C2026-009 Reset Change Bars to Date of Last Approval' (#709) from C2026-009 into Development
good for testing
2026-02-11 16:15:06 -05:00
mschill 15979203ce C2026-009 Reset Change Bars to Date of Last Approval 2026-02-11 16:07:33 -05:00
jjenko 53360a03af Merge pull request 'B2026-012 - Global Search for Caution Step Types when they are on a step with a Note shows the Caution listed as a Note 2 when Results Style is set to Step Path' (#707) from B2026-012 into Development
good for testing phase
2026-02-06 14:56:18 -05:00
mschill 9f6f7c23f6 B2026-012 - Global Search for Caution Step Types when they are on a step with a Note shows the Caution listed as a Note 2 when Results Style is set to Step Path 2026-02-06 14:54:22 -05:00
jjenko 7419f4e886 Merge pull request 'F2026-007 Set the Caution text font to not have any style set so that it is no longer italicized.' (#705) from F2026-006 into Development
format only change - good for testing
2026-02-05 15:09:45 -05:00
jjenko f90a80c366 F2026-007 Set the Caution text font to not have any style set so that it is no longer italicized. 2026-02-05 15:09:34 -05:00
jjenko d9ec756e22 Merge pull request 'C2026-013 Adjust wording of Tooltip for Check RO Links' (#704) from C2026-013 into Development
good for testing
2026-02-05 13:35:47 -05:00
mschill 9f7c24c540 C2026-013 Adjust wording of Tooltip for Check RO Links 2026-02-05 13:25:20 -05:00
jjenko fe2833395d Merge pull request 'F2026-004_F2026-005_VogtleBackgroundChanges' (#703) from F2026-004_F2026-005_VogtleBackgroundChanges into Development
format only changes- good for use in the cleanup of Vogtle Units 3&4 background data
2026-02-04 14:21:41 -05:00
jjenko a181cf3815 F2026-004 F2026-005 Vogte Units 3&4 Backgrounds. Adjusted the length of the box on the cover page
and pecified that Cautions come before Notes
2026-02-04 14:19:04 -05:00
jjenko dfce44a47a Merge pull request 'C2026-012 Manage Security - Remove cancel from the prompts related to deleting groups/users/members.' (#702) from C2026-012 into Development
good for testing
2026-02-04 13:42:31 -05:00
mschill 22280bf1e3 C2026-012 Manage Security - Remove cancel from the prompts related to deleting groups/users/members. 2026-02-04 13:25:17 -05:00
mschill 30aedb6eec C2022-003-Change-Textboxes-to-RTF-3
undoing the changes to: frmVEPROMS.Designer.cs, frmVEPROMS.resx, StepTabRibbon.designer.cs, & StepTabRibbon.resx
2026-02-04 10:47:29 -05:00
plarsen 12f175740f C2022-003-Change-Textboxes-to-RTF-3 2026-02-03 22:07:38 -05:00
plarsen 5c0f11aea1 Merge remote-tracking branch 'origin/Development' into C2022-003-Change-Textboxes-to-RTF-3 2026-02-03 22:05:31 -05:00
plarsen 879518c4a9 C2022-003-Change-Textboxes-to-RTF-3 2026-02-03 15:02:16 -05:00
jjenko 7afca6a254 Merge pull request 'B2026-011 Improve the resolution of unit numbers in multi-unit background documents when printing.' (#700) from B2026-011 into Development
good for testing
2026-02-03 13:57:46 -05:00
mschill 1c56aa2eb1 B2026-011 Improve the resolution of unit numbers in multi-unit background documents when printing.
Multi-Unit Background documents --- Found this while looking at background Documents for Vogtle 3/4 --- particularly AOP-101 -> Operator Actions -> Step 2: Note 2.

When there is a unit designator (like <U-NAME>-AOP-101. ) in the note's text, PROMS renders the text and pulls it over as text only to the background document.

This causes printing the background document to print as if both units instead of resolving if a specific unit is being printed.
2026-02-03 13:30:30 -05:00
305 changed files with 28182 additions and 41661 deletions
+2 -1
View File
@@ -401,4 +401,5 @@ FodyWeavers.xsd
/fmtall
/genmacall
*AssemblyInfo.cs
*AssemblyInfo.cs
/PROMS/Baseline/Baseline.sln
+4 -44
View File
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
using System.Windows.Forms;
@@ -35,31 +33,7 @@ namespace AdjustBuildRevision
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.4.yyMM.dHH") + "\")");
else
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.3.yyMM.dHH") + "\")");
// if (outline != line)
// {
// Console.WriteLine("Before: '{0}'", line);
// Console.WriteLine("After: '{0}'", outline);
// lines[i] = outline;
// changed = true;
// }
// else
// {
// Console.WriteLine("No change: '{0}'", line);
// }
// }
//}
//if (changed)
//{
// if (!fi.IsReadOnly) fi.IsReadOnly = false;
// StreamWriter sw = fi.CreateText();
// foreach (string line in lines)
// sw.WriteLine(line);
// sw.Close();
// string line = lines[i];
// string outline = line;
// if (line.Contains("AssemblyVersion") || line.Contains("AssemblyFileVersion"))
// {
//outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("1.1.yyMM.dHH") + "\")");
if (outline != line)
{
Console.WriteLine("Before: '{0}'", line);
@@ -84,7 +58,7 @@ namespace AdjustBuildRevision
}
else
{
MessageBox.Show("File " + fi.FullName + " does not exist");
MessageBox.Show($"File {fi.FullName} does not exist");
}
}
catch (Exception ex)
@@ -93,10 +67,6 @@ namespace AdjustBuildRevision
}
}
//private static DateTime GetLatestDateTime(string path)
//{
// return GetLatestDateTime(new DirectoryInfo(path));
//}
private static DateTime GetLatestDateTime(DirectoryInfo di, DateTime dtCheck)
{
DateTime dtMax = dtCheck;
@@ -104,24 +74,14 @@ namespace AdjustBuildRevision
foreach(FileInfo myFile in myFiles)
{
DateTime dt = myFile.LastWriteTime;
//if (dt > dtCheck)
//{
//Console.WriteLine("\"File\"\t\"{0}\"\t\"{1}\"\t{2}\t{3}",myFile.FullName,dt.ToString("1.1.yyMM.dHH"),dt,dtCheck);
if(dtMax < dt) dtMax = dt;
//}
if(dtMax < dt) dtMax = dt;
}
DirectoryInfo[] myFolders = di.GetDirectories();
foreach (DirectoryInfo diChild in myFolders)
{
DateTime dtChild = GetLatestDateTime(diChild,dtCheck);
//if (dtChild > dtCheck)
//{
//Console.WriteLine("\"SubFolder\"\t\"{0}\"\t\"{1}\"\t{2}\t{3}", diChild.FullName, dtChild.ToString("1.1.yyMM.dHH"),dtChild,dtCheck);
if(dtChild > dtMax) dtMax = dtChild;
//}
if(dtChild > dtMax) dtMax = dtChild;
}
//if(dtMax > dtCheck)
// Console.WriteLine("\"Folder\"\t\"{0}\"\t\"{1}\"", di.FullName, dtMax.ToString("1.1.yyMM.dHH"));
return dtMax;
}
}
+1
View File
@@ -67,6 +67,7 @@
<Compile Include="frmSettings.Designer.cs">
<DependentUpon>frmSettings.cs</DependentUpon>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmBaseline.resx">
+8
View File
@@ -0,0 +1,8 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Not modifying Naming Styles")]
-3
View File
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Baseline
+221 -266
View File
@@ -43,12 +43,9 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Collections.Specialized;
using System.IO;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
@@ -73,13 +70,8 @@ namespace Baseline
}
public partial class frmBaseline : Form
{
private IgnoreLines _MyIgnore = new IgnoreLines();
public IgnoreLines MyIgnore
{
get { return _MyIgnore; }
set { _MyIgnore = value; }
}
private LastWas myLast = LastWas.Search;
public IgnoreLines MyIgnore { get; set; } = new IgnoreLines();
private LastWas myLast = LastWas.Search;
private Settings MySettings;
public string MyStatus
{
@@ -151,9 +143,11 @@ namespace Baseline
this.WindowState = Properties.Settings.Default.WidnowState;
if(Properties.Settings.Default.Ignore != null && Properties.Settings.Default.Ignore != "")
MyIgnore = IgnoreLines.Get(Properties.Settings.Default.Ignore);
MySettings= new Settings();
MySettings.IgnoreLines = new BindingList<string>();
splitContainer1.SplitterDistance = Properties.Settings.Default.Split1;
MySettings = new Settings
{
IgnoreLines = new BindingList<string>()
};
splitContainer1.SplitterDistance = Properties.Settings.Default.Split1;
splitContainer2.SplitterDistance = Properties.Settings.Default.Split2;
splitContainer3.SplitterDistance = Properties.Settings.Default.Split3;
if (Properties.Settings.Default.MRU1 != null && Properties.Settings.Default.MRU1.Count > 0)
@@ -240,28 +234,27 @@ namespace Baseline
lbProcedures.Items.Clear();
lbResults1.Items.Clear();
lbResults2.Items.Clear();
FindFile ff = lbDifferent.SelectedItem as FindFile;
if (ff != null)
{
// Fill Procedure or Result ListBoxes
switch (myLast)
{
case LastWas.Pagination:
CompareContent(ff.File1, ff.File2);// Compare DebugPagination
break;
case LastWas.Baseline:
CompareContent3(ff.File1, ff.File2);// Compare DebugMeta
break;
case LastWas.Search:
ShowSearchResults(ff.File1, ff.File2);// Perform search on DebugMeta
break;
default:
CompareContent(ff.File1, ff.File2);//Default DebugPagination
break;
}
//CompareOneFile(ff.File1, ff.File2);
}
}
if (lbDifferent.SelectedItem is FindFile ff)
{
// Fill Procedure or Result ListBoxes
switch (myLast)
{
case LastWas.Pagination:
CompareContent(ff.File1, ff.File2);// Compare DebugPagination
break;
case LastWas.Baseline:
CompareContent3(ff.File1, ff.File2);// Compare DebugMeta
break;
case LastWas.Search:
ShowSearchResults(ff.File1, ff.File2);// Perform search on DebugMeta
break;
default:
CompareContent(ff.File1, ff.File2);//Default DebugPagination
break;
}
//CompareOneFile(ff.File1, ff.File2);
}
}
Procedures MyProcs1;
Procedures MyProcs2;
/// <summary>
@@ -361,13 +354,6 @@ namespace Baseline
lines1 = list1.AsEnumerable<string>();// Convert back to Enumerable to work with LINQ
return lines1;
}
private string GetProcNum(string line)
{
string retval = line.Substring(3, line.IndexOf(" | ") - 3);
if (retval.Contains("_"))
retval = retval.Substring(0, retval.IndexOf("_") - 1);
return retval;
}
/// <summary>
/// Include lines for Procedure or Page or Search is true
/// Account for Case Insensitive CheckBox
@@ -450,13 +436,13 @@ namespace Baseline
private void lbResults1_SelectedIndexChanged(object sender, EventArgs e)
{
string line=null;
if (lbResults1.SelectedItem is string)
line = (string)lbResults1.SelectedItem;
if (lbResults1.SelectedItem is string v)
line = v;
Line myLine = lbResults1.SelectedItem as Line;
switch (myLast)
{
case LastWas.Pagination:
line = OpenPDF(line);
OpenPDF(line);
break;
case LastWas.Baseline: // TODO: Need to add code here to open matching file
OpenOnePDF(myLine,1);
@@ -472,14 +458,14 @@ namespace Baseline
{
string line=null;
if(lbResults2.SelectedItem is string)
line = (string)lbResults2.SelectedItem;
if(lbResults2.SelectedItem is string v)
line = v;
Line myLine = lbResults2.SelectedItem as Line;
switch (myLast)
{
case LastWas.Pagination:
line = OpenPDF(line);
OpenPDF(line);
break;
case LastWas.Baseline: // TODO: Need to add code here to open matching file
OpenOnePDF(myLine,2);
@@ -491,34 +477,97 @@ namespace Baseline
break;
}
}
string exePath;
private string OpenPDF(string line)
/// <summary>
/// This will return the full path to the PDF file
/// </summary>
/// <param name="fi"></param>
/// <param name="patern"></param>
/// <returns></returns>
private string GetPFDFileAndPath(FileInfo fi, string patern)
{
int page = int.Parse(line.Substring(0, 6));
string[] fileList = Directory.GetFiles(fi.DirectoryName, patern);
// sort the list of file list
Array.Sort((string[])fileList);
return fileList.FirstOrDefault(); // the PDF file that we what should be top of the list then.
}
/// <summary>
/// This will parse out the procedure number for the PROMS ShortPath representation of a procedure section or step part
/// In the PROMS ShortPath, ".S" is used to delimit the procedure number, section then uses "..S" for the step parts
/// This method was written to handle cases where ".S" is used as part of the procedure number
/// </summary>
/// <param name="txt"></param>
/// <returns></returns>
private string ParseOutProcedureNumberFromLine(string txt)
{
// if the item is to a high levels step or sub-step the short path as "..S" for each part of the step
// so look for the last occurence of ".." which will be the end of the section information
int lidx = txt.LastIndexOf("..");
if (lidx > 0)
{
lidx = txt.LastIndexOf(".S", lidx); // this will position us to the end of the procedure number
}
else
{
lidx = txt.LastIndexOf(".S"); // this will position us to the end of the procedure number if there was no step information
}
// old logic was looking for the first occurence of ".S" in the txt string as the ending point of the procedure nuumber
// Beaver Valley has a procedure number "1.SBGEN" in which the old logic would not work
// 1.SBGEN.SC. ==> short path of attachment section "C"
// 1.SBGEN.SC..S1. ==> short path of Step 1 in attachment section "C"
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
string rtnstr = txt.Substring(8, lidx - 8).Replace("/", "_").Replace("\\", "_");
return rtnstr;
}
string exePath;
private void OpenPDF(string line)
{
int pageNum = int.Parse(line.Substring(0, 6));
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
line = line.Substring(8, line.IndexOf(".S") - 8).Replace("/", "_").Replace("\\", "_");
string ProcNum = ParseOutProcedureNumberFromLine(line);
string procPatern = string.Format("*{0}*.pdf", string.IsNullOrEmpty(line) ? "noProcNumber" : ProcNum);
FindFile ff = lbDifferent.SelectedItem as FindFile;
FileInfo fi1 = new FileInfo(ff.File1);
FileInfo fi2 = new FileInfo(ff.File2);
string PDFfileName1 = GetPFDFileAndPath(fi1,procPatern);
string PDFfileName2 = GetPFDFileAndPath(fi2,procPatern);
if (string.IsNullOrEmpty(PDFfileName1) || string.IsNullOrEmpty(PDFfileName2)) return;
// If you don't know where the Reader executable is for PDFs Open a PDF and Check to see where the path points
if (exePath == null)
{
System.Diagnostics.Process p = System.Diagnostics.Process.Start(fi1.DirectoryName + "\\" + line + ".pdf");
exePath = TryToGetPath(p);
p.Kill(); // No need to keep it open
try
{
System.Diagnostics.Process p = System.Diagnostics.Process.Start(PDFfileName1);
exePath = TryToGetPath(p);
p.Kill(); // No need to keep it open
}
catch (Exception ex)
{
Application.DoEvents();
string msg = string.Format("{0} - {1}", ex.GetType().Name, ex.Message);
Console.WriteLine(msg);
MessageBox.Show(msg, "Error opening default PDF Viewer");
return;
}
}
// Open the first PDF on a Specific Page
System.Diagnostics.ProcessStartInfo psi1 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A page={0} ", page) + fi1.DirectoryName + "\\" + line + ".pdf ");
System.Diagnostics.ProcessStartInfo psi1 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format(" /A \"page={0}\" \"{1}\" ", pageNum,PDFfileName1));
System.Diagnostics.Process p1 = System.Diagnostics.Process.Start(psi1);
// Move the PDF Reader window to 0,0
MoveProcess(p1, 0, 0);
// Open the first PDF on a Specific Page
System.Diagnostics.ProcessStartInfo psi2 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A page={0} ", page) + fi2.DirectoryName + "\\" + line + ".pdf ");
// Open the second PDF on a Specific Page
System.Diagnostics.ProcessStartInfo psi2 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format(" /A \"page={0}\" \"{1}\" ", pageNum, PDFfileName2));
System.Diagnostics.Process p2 = System.Diagnostics.Process.Start(psi2);
// Move the PDF Reader window to 960,0
// TODO: This Offset could be a Setting
MoveProcess(p2, 960, 0);
return line;
return;
}
/// <summary>
/// Try to get the location of the PDF Reader executable
@@ -530,7 +579,7 @@ namespace Baseline
p.WaitForInputIdle();
while (p.MainModule == null)
{
Console.WriteLine("{0} - {1}", p.MainWindowTitle,p.ProcessName);
Console.WriteLine("{0} - {1}", p.MainWindowTitle, p.ProcessName);
p.WaitForInputIdle();
Application.DoEvents();
}
@@ -551,10 +600,10 @@ namespace Baseline
progname = @"C:\Program Files (x86)\IDM Computer Solutions\UltraCompare\UC.exe";
System.Diagnostics.ProcessStartInfo psi =
new System.Diagnostics.ProcessStartInfo(progname, string.Format(@" -t ""{0}"" ""{1}""", compareFile, baseFile));
System.Diagnostics.Process prc = System.Diagnostics.Process.Start(psi);
}
_ = System.Diagnostics.Process.Start(psi);
}
private ProcessLocationQueue myQueue= new ProcessLocationQueue();
private readonly ProcessLocationQueue myQueue= new ProcessLocationQueue();
private Timer queueTimer = null;
/// <summary>
/// Move a Process to a specific screen location - This is done with a timer so
@@ -567,9 +616,11 @@ namespace Baseline
{
if (queueTimer == null)
{
queueTimer = new Timer();
queueTimer.Enabled = false;
queueTimer.Tick += queueTimer_Tick;
queueTimer = new Timer
{
Enabled = false
};
queueTimer.Tick += queueTimer_Tick;
queueTimer.Interval = 1000;
}
myQueue.Add(proc, x, y);
@@ -594,41 +645,55 @@ namespace Baseline
/// <param name="list"></param>
private void OpenOnePDF(Line myLine, int list)
{
if (myLine == null) return; // no PDF to open
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
string proc = myLine.MyProc.Number.Replace("/","_").Replace("\\","_");
// if no procedure number, PROMS creates pdf filename "NoProcNumber.pdf"
// create pattern to use to get the PDF from the directory
// add wildcards (*) to file the file if any prefix or suffix was added to the filename
string procPatern = string.Format("*{0}*.pdf", proc == string.Empty ? "noProcNumber" : proc);
int pagenum = myLine.MyPage.Number;
FindFile ff = lbDifferent.SelectedItem as FindFile;
FileInfo fi1 = new FileInfo(ff.File1);
FileInfo fi2 = new FileInfo(ff.File2);
string PDFfileName;
if (list == 1)
{
FileInfo fi1 = new FileInfo(ff.File1);
PDFfileName = GetPFDFileAndPath(fi1, procPatern);
}
else // list == 2
{
FileInfo fi2 = new FileInfo(ff.File2);
PDFfileName = GetPFDFileAndPath(fi2, procPatern);
}
if (string.IsNullOrEmpty(PDFfileName)) return; // no PDF to open
// if exePath is null, then open the found PDF with the default PDF viewer and
// capture/save the entire name and path of the default PDF viewer
if (exePath == null)
{
System.Diagnostics.Process p = System.Diagnostics.Process.Start(fi1.DirectoryName + "\\" + proc + ".pdf");
while (exePath == null)
try
{
try
{
exePath = p.MainModule.FileName;
}
catch (Exception ex)
{
Application.DoEvents();
Console.WriteLine("{0} - {1}", ex.GetType().Name, ex.Message);
}
System.Diagnostics.Process tp = System.Diagnostics.Process.Start(PDFfileName);
exePath = TryToGetPath(tp);
tp.Kill();
}
catch (Exception ex)
{
Application.DoEvents();
string msg = string.Format("{0} - {1}", ex.GetType().Name, ex.Message);
Console.WriteLine(msg);
MessageBox.Show(msg, "Error opening default PDF Viewer");
return;
}
p.Kill();
}
if (list == 1)
{
System.Diagnostics.ProcessStartInfo psi1 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A page={0} ", pagenum) + fi1.DirectoryName + "\\" + proc + ".pdf ");
System.Diagnostics.Process p1 = System.Diagnostics.Process.Start(psi1);
}
else
{
System.Diagnostics.ProcessStartInfo psi2 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A page={0} ", pagenum) + fi2.DirectoryName + "\\" + proc + ".pdf ");
System.Diagnostics.Process p1 = System.Diagnostics.Process.Start(psi2);
}
}
// open the PDF and jump to the page number
System.Diagnostics.ProcessStartInfo psi1 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A \"page={0}\" \"{1}\" ", pagenum, PDFfileName))
{
UseShellExecute = false
};
_ = System.Diagnostics.Process.Start(psi1);
}
/// <summary>
/// Perform Debug Meta file comparison for all of the folders within the automated testing folders
/// </summary>
@@ -708,12 +773,12 @@ namespace Baseline
}
private void lbProcedures_SelectedIndexChanged(object sender, EventArgs e)
{
//Initialize Results List Box
lbResults1.Items.Clear();
Procedure myProc = lbProcedures.SelectedItem as Procedure;
//TODO: May need to consider if there are duplicate procedure numers and titles
Procedure myProc1 = MyProcs1.Find(x => x.Number == myProc.Number && x.Title == myProc.Title);
//Initialize Results List Box
if (!(lbProcedures.SelectedItem is Procedure myProc)) return; // clicked on the white space (blank line) in the list of different procedures
//TODO: May need to consider if there are duplicate procedure numers and titles
Procedure myProc1 = MyProcs1.Find(x => x.Number == myProc.Number && x.Title == myProc.Title);
// Build the results ListBox for the left window
lbResults1.Items.Clear();
if (myProc1 != null)
{
foreach (Page myPage in myProc1.MyPages)
@@ -758,28 +823,13 @@ namespace Baseline
};
public class Settings
{
private BindingList<string> _IgnoreLines;
public BindingList<string> IgnoreLines
{
get { return _IgnoreLines; }
set { _IgnoreLines = value; }
}
}
public BindingList<string> IgnoreLines { get; set; }
}
public partial class FindFile
{
private string _File1;
public string File1
{
get { return _File1; }
set { _File1 = value; }
}
private string _File2;
public string File2
{
get { return _File2; }
set { _File2 = value; }
}
public FindFile(string file1, string file2)
public string File1 { get; set; }
public string File2 { get; set; }
public FindFile(string file1, string file2)
{
File1 = file1;
File2 = file2;
@@ -787,19 +837,16 @@ namespace Baseline
}
public partial class FindFiles : List<FindFile>
{
private string _FileName;
public string FileName
{
get { return _FileName; }
}
/// <summary>
/// Build list of DocVersion Folders with differences
/// </summary>
/// <param name="path1">Base path</param>
/// <param name="path2">Compare path</param>
/// <param name="fileName">filename</param>
/// <param name="myIgnore">Ignore list</param>
public FindFiles(string path1, string path2, string fileName,IgnoreLines myIgnore)
private readonly string _FileName;
public string FileName => _FileName;
/// <summary>
/// Build list of DocVersion Folders with differences
/// </summary>
/// <param name="path1">Base path</param>
/// <param name="path2">Compare path</param>
/// <param name="fileName">filename</param>
/// <param name="myIgnore">Ignore list</param>
public FindFiles(string path1, string path2, string fileName,IgnoreLines myIgnore)
{
DirectoryInfo di1 = new DirectoryInfo(path1);
DirectoryInfo di2 = new DirectoryInfo(path2);
@@ -1025,34 +1072,16 @@ namespace Baseline
// Text - the line of text
public partial class Procedure
{
private string _Number;
public string Number
public string Number { get; set; }
public string Title { get; set; }
public Pages MyPages { get; set; } = new Pages();
public Procedure(string number, string title)
{
get { return _Number; }
set { _Number = value; }
Number = number;
Title = title;
}
private string _Title;
public string Title
{
get { return _Title; }
set { _Title = value; }
}
private Pages _MyPages = new Pages();
public Pages MyPages
{
get { return _MyPages; }
set { _MyPages = value; }
}
public Procedure(string number, string title)
{
_Number = number;
_Title = title;
}
public override string ToString()
{
return string.Format("{0} - {1}", Number, Title);
}
}
public override string ToString() => string.Format("{0} - {1}", Number, Title);
}
public partial class Procedures : List<Procedure>
{
// Sample data for a Procedure Number line
@@ -1083,77 +1112,34 @@ namespace Baseline
}
public partial class Page
{
private int _Number;
public int Number
{
get { return _Number; }
set { _Number = value; }
}
private Lines _MyLines = new Lines();
public int Number { get; set; }
public Lines MyLines
{
get { return _MyLines; }
set { _MyLines = value; }
}
public Page(int number)
{
_Number = number;
}
public override string ToString()
{
return string.Format("Page {0}", Number);
}
}
public Lines MyLines { get; set; } = new Lines();
public Page(int number) => Number = number;
public override string ToString() => string.Format("Page {0}", Number);
}
public partial class Pages : List<Page>
{
public void Add(int number)
{
Add(new Page(number));
}
}
public void Add(int number) => Add(new Page(number));
}
public partial class Line
{
private Procedure _MyProc;
public Procedure MyProc
public Procedure MyProc { get; set; }
public Page MyPage { get; set; }
public string Text { get; set; }
public Line(string text) => Text = text;
public Line(string text, Procedure myProc, Page myPage)
{
get { return _MyProc; }
set { _MyProc = value; }
Text = text;
MyProc = myProc;
MyPage = myPage;
}
private Page _MyPage;
public Page MyPage
{
get { return _MyPage; }
set { _MyPage = value; }
}
private string _Text;
public string Text
{
get { return _Text; }
set { _Text = value; }
}
public Line(string text)
{
_Text = text;
}
public Line(string text, Procedure myProc, Page myPage)
{
_Text = text;
_MyProc = myProc;
_MyPage = myPage;
}
public override string ToString()
{
return Text;
}
}
public override string ToString() => Text;
}
public partial class Lines : List<Line>
{
public void Add(string text)
{
Add(new Line(text));
}
}
public void Add(string text) => Add(new Line(text));
}
[Serializable]
public partial class IgnoreLine
{
@@ -1191,21 +1177,12 @@ namespace Baseline
public IgnoreLines()
{
}
public void Add(string text, Relation searchType, bool active)
{
Add(new IgnoreLine(text, searchType, active));
}
// Convert IgnoreLines to string (XML)
public override string ToString()
{
return GenericSerializer<IgnoreLines>.StringSerialize(this);
}
// Convert string to IgnoreLines
public static IgnoreLines Get(string xml)
{
return GenericSerializer<IgnoreLines>.StringDeserialize(xml);
}
}
public void Add(string text, Relation searchType, bool active) => Add(new IgnoreLine(text, searchType, active));
// Convert IgnoreLines to string (XML)
public override string ToString() => GenericSerializer<IgnoreLines>.StringSerialize(this);
// Convert string to IgnoreLines
public static IgnoreLines Get(string xml) => GenericSerializer<IgnoreLines>.StringDeserialize(xml);
}
/// <summary>
/// This is a simple serializer that takes a class and converts it to and from string (XML)
/// </summary>
@@ -1233,7 +1210,7 @@ namespace Baseline
string ss = s.Replace("encoding=\"utf-16\"", "");
XmlSerializer xs = new XmlSerializer(typeof(T));
UTF8Encoding enc = new UTF8Encoding();
Byte[] arrBytData = enc.GetBytes(ss);
byte[] arrBytData = enc.GetBytes(ss);
using (MemoryStream ms = new MemoryStream(arrBytData))
{
t = (T)xs.Deserialize(ms);
@@ -1247,12 +1224,9 @@ namespace Baseline
public class NonXsiTextWriter : XmlTextWriter
{
public NonXsiTextWriter(TextWriter w) : base(w) { }
public NonXsiTextWriter(Stream w, Encoding encoding)
: base(w, encoding)
{
this.Formatting = Formatting.Indented;
}
public NonXsiTextWriter(string filename, Encoding encoding) : base(filename, encoding) { }
public NonXsiTextWriter(Stream w, Encoding encoding)
: base(w, encoding) => Formatting = Formatting.Indented;
public NonXsiTextWriter(string filename, Encoding encoding) : base(filename, encoding) { }
bool _skip = false;
public override void WriteStartAttribute(string prefix, string localName, string ns)
{
@@ -1294,32 +1268,16 @@ namespace Baseline
public const short SWP_NOZORDER = 0X4;
public const int SWP_SHOWWINDOW = 0x0040;
private System.Diagnostics.Process _Process;
public System.Diagnostics.Process Process
{
get { return _Process; }
set { _Process = value; }
}
private int _X;
public int X
{
get { return _X; }
set { _X = value; }
}
private int _Y;
public int Y
{
get { return _Y; }
set { _Y = value; }
}
public ProcessLocation(System.Diagnostics.Process process, int x, int y)
public System.Diagnostics.Process Process { get; set; }
public int X { get; set; }
public int Y { get; set; }
public ProcessLocation(System.Diagnostics.Process process, int x, int y)
{
Process = process;
X = x;
Y = y;
}
private static Boolean FoxitSettingInfo = true;
private static bool FoxitSettingInfo = true;
/// <summary>
/// MoveIt() moves the window containing the PDF viewer to the right so the two pdf viewer windows will not overlap.
@@ -1340,11 +1298,8 @@ namespace Baseline
}
public class ProcessLocationQueue: Queue<ProcessLocation>
{
public void Add(System.Diagnostics.Process process, int x, int y)
{
Enqueue(new ProcessLocation(process,x,y));
}
public void ProcessNext()
public void Add(System.Diagnostics.Process process, int x, int y) => Enqueue(new ProcessLocation(process, x, y));
public void ProcessNext()
{
ProcessLocation pl = Dequeue();
pl.MoveIt();
+6 -26
View File
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Baseline
@@ -19,17 +12,7 @@ namespace Baseline
set {
_MyIgnore = value;
dgv.DataSource=null;
//dgvcSearchType.ValueType = typeof(Relation);
//dgvcSearchType.ValueMember = "Value";
//dgvcSearchType.DisplayMember = "Display";
//dgvcSearchType.DataSource = new Relation[] { Relation.Contains, Relation.StartsWith, Relation.EndsWith, Relation.Regex }
//.Select(x => new { Display = x.ToString(), Value = x })
//.ToList();
dgv.DataSource=value;
//dgvcSearchType.DataSource =
//new List<Relation>((Relation[]) Enum.GetValues(typeof(Relation)))
//.Select(x => new { Display=x.ToString(), Value=(int)x })
//.ToList();;
}
}
public frmSettings(IgnoreLines myIgnore)
@@ -46,19 +29,16 @@ namespace Baseline
col.ValueType = typeof(Relation);
}
private void dgv_DataError(object sender, DataGridViewDataErrorEventArgs e)
private void dgv_DataError(object sender, DataGridViewDataErrorEventArgs e) => Console.WriteLine("Here");
private void btnOK_Click(object sender, EventArgs e)
{
Console.WriteLine("Here");
}
private void btnOK_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.OK;
this.Close();
DialogResult = System.Windows.Forms.DialogResult.OK;
Close();
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Close();
DialogResult = System.Windows.Forms.DialogResult.Cancel;
Close();
}
}
}
+32 -45
View File
@@ -1,6 +1,5 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
@@ -15,7 +14,7 @@ namespace AT.STO.UI.Win
{
#region Private Variable Declarations
private IDropDownAware _dropDownControl = null;
private DropDownWindowHelper _dropDownHelper = null;
private readonly DropDownWindowHelper _dropDownHelper = null;
private Form _owner = null;
#endregion
#region Constructor / Destructor
@@ -47,7 +46,7 @@ namespace AT.STO.UI.Win
/// <param name="e"></param>
protected override void OnHandleCreated(EventArgs e)
{
_owner = this.FindForm();
_owner = FindForm();
_dropDownHelper.ReleaseHandle();
if (_owner != null)
@@ -66,8 +65,8 @@ namespace AT.STO.UI.Win
{
base.OnResize(e);
combo.Location = new Point(0, 0);
combo.Width = this.ClientRectangle.Width;
this.Height = combo.Height;
combo.Width = ClientRectangle.Width;
Height = combo.Height;
}
#endregion
#region Event Handler
@@ -96,7 +95,7 @@ namespace AT.STO.UI.Win
else
{
_dropDownHelper.CloseDropDown();
this.Focus();
Focus();
}
}
@@ -115,7 +114,7 @@ namespace AT.STO.UI.Win
private void DropDownHelper_DropDownCancel(object sender, DropDownCancelEventArgs e)
{
if (this.Bounds.Contains(Parent.PointToClient(e.CursorLocation)))
if (Bounds.Contains(Parent.PointToClient(e.CursorLocation)))
{
e.Cancel = true;
}
@@ -137,31 +136,22 @@ namespace AT.STO.UI.Win
{
SetValue<long>(e.Value as ILookupItem<long>);
}
if (this.FinishEditing != null)
{
this.FinishEditing(this, e);
}
_dropDownControl.FinishEditing -= new DropDownValueChangedEventHandler(DropDown_FinishEditing);
FinishEditing?.Invoke(this, e);
_dropDownControl.FinishEditing -= new DropDownValueChangedEventHandler(DropDown_FinishEditing);
_dropDownControl.ValueChanged -= new DropDownValueChangedEventHandler(DropDown_ValueChanged);
_dropDownHelper.CloseDropDown();
}
private void DropDown_ValueChanged(object sender, DropDownValueChangedEventArgs e)
{
if (this.ValueChanged != null)
{
this.ValueChanged(this, e);
}
}
#endregion
#region Public Properties
/// <summary>
/// Get or set the control (has to implement IDropDownAware) that is to
/// be displayed as the dropdown portion of the combobox.
/// </summary>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
private void DropDown_ValueChanged(object sender, DropDownValueChangedEventArgs e) => ValueChanged?.Invoke(this, e);
#endregion
#region Public Properties
/// <summary>
/// Get or set the control (has to implement IDropDownAware) that is to
/// be displayed as the dropdown portion of the combobox.
/// </summary>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public IDropDownAware DropDownControl
{
get { return _dropDownControl; }
@@ -169,24 +159,21 @@ namespace AT.STO.UI.Win
{
_dropDownControl = value;
this.Controls.Add(_dropDownControl as Control);
Controls.Add(_dropDownControl as Control);
}
}
#endregion
#region Public Methods
public override string ToString()
{
return this.Name;
}
#endregion
#region Private Methods
/// <summary>
/// Calculate an acceptable position of the DropDownForm even in a
/// multi screen environment.
/// </summary>
/// <param name="DropDown"></param>
/// <returns></returns>
private Point GetDropDownPosition(DropDownForm DropDown)
#endregion
#region Public Methods
public override string ToString() => Name;
#endregion
#region Private Methods
/// <summary>
/// Calculate an acceptable position of the DropDownForm even in a
/// multi screen environment.
/// </summary>
/// <param name="DropDown"></param>
/// <returns></returns>
private Point GetDropDownPosition(DropDownForm DropDown)
{
Point lt = Parent.PointToScreen(new Point(Left, Top));
Point rb = Parent.PointToScreen(new Point(Right, Bottom));
+58 -83
View File
@@ -35,10 +35,9 @@ namespace AT.STO.UI.Win
/// </summary>
public class DropDownCancelEventArgs : EventArgs
{
#region Private Variable Declarations
private bool _cancel = false;
private Point _cursorLocation;
private Form _dropDown = null;
#region Private Variable Declarations
private Point _cursorLocation;
private readonly Form _dropDown = null;
#endregion
#region Constructor / Destructor
/// <summary>
@@ -51,36 +50,26 @@ namespace AT.STO.UI.Win
{
_dropDown = DropDown;
_cursorLocation = CursorLocation;
_cancel = false;
}
#endregion
#region Public Properties
/// <summary>
///
/// </summary>
public bool Cancel
{
get { return _cancel; }
set { _cancel = value; }
Cancel = false;
}
#endregion
#region Public Properties
/// <summary>
///
/// </summary>
public bool Cancel { get; set; } = false;
/// <summary>
///
/// </summary>
public Point CursorLocation
{
get { return _cursorLocation; }
}
/// <summary>
///
/// </summary>
public Point CursorLocation => _cursorLocation;
/// <summary>
///
/// </summary>
public Form DropDown
{
get { return _dropDown; }
}
#endregion
}
/// <summary>
///
/// </summary>
public Form DropDown => _dropDown;
#endregion
}
/// <summary>
/// Contains event information for a <see cref="DropDownClosed"/> event.
@@ -91,64 +80,50 @@ namespace AT.STO.UI.Win
public class DropDownClosedEventArgs : EventArgs
{
#region Private Variable Declarations
private Form _dropDown = null;
#endregion
#region Constructor / Destructor
/// <summary>
/// Constructs a new instance of this class for the specified
/// popup form.
/// </summary>
/// <param name="DropDown">DropDown Form which is being closed.</param>
public DropDownClosedEventArgs(Form DropDown)
{
_dropDown = DropDown;
}
#endregion
#region Public Properties
/// <summary>
/// Gets the dropdown form which is being closed.
/// </summary>
public Form DropDown
{
get { return _dropDown; }
}
#endregion
}
private readonly Form _dropDown = null;
#endregion
#region Constructor / Destructor
/// <summary>
/// Constructs a new instance of this class for the specified
/// popup form.
/// </summary>
/// <param name="DropDown">DropDown Form which is being closed.</param>
public DropDownClosedEventArgs(Form DropDown) => _dropDown = DropDown;
#endregion
#region Public Properties
/// <summary>
/// Gets the dropdown form which is being closed.
/// </summary>
public Form DropDown => _dropDown;
#endregion
}
/// <summary>
/// Contains event information for DropDownValueChangedEventHandler.
/// </summary>
public class DropDownValueChangedEventArgs : EventArgs
{
#region Private Variable Declarations
private object _value = null;
#endregion
#region Constructor / Destructor
/// <summary>
/// Default Constructor
/// </summary>
public DropDownValueChangedEventArgs()
#region Private Variable Declarations
#endregion
#region Constructor / Destructor
/// <summary>
/// Default Constructor
/// </summary>
public DropDownValueChangedEventArgs()
{
}
/// <summary>
/// Initialization with the control's value.
/// </summary>
/// <param name="Value"></param>
public DropDownValueChangedEventArgs(object Value)
{
_value = Value;
}
#endregion
#region Public Properties
/// <summary>
/// Gets or sets the control's value.
/// </summary>
public object Value
{
get { return _value; }
set { _value = value; }
}
#endregion
}
/// <summary>
/// Initialization with the control's value.
/// </summary>
/// <param name="Value"></param>
public DropDownValueChangedEventArgs(object Value) => this.Value = Value;
#endregion
#region Public Properties
/// <summary>
/// Gets or sets the control's value.
/// </summary>
public object Value { get; set; } = null;
#endregion
}
}
+28 -40
View File
@@ -13,22 +13,19 @@ namespace AT.STO.UI.Win
internal partial class DropDownForm : Form, IDropDownAware
{
#region Private Variable Declaration
private IDropDownAware _control = null;
#endregion
#region Constructor / Destructor
/// <summary>
/// Default Constructor
/// </summary>
public DropDownForm()
{
InitializeComponent();
}
private readonly IDropDownAware _control = null;
#endregion
#region Constructor / Destructor
/// <summary>
/// Default Constructor
/// </summary>
public DropDownForm() => InitializeComponent();
/// <summary>
/// Constructor to initialize the for with the control to display.
/// </summary>
/// <param name="Ctrl">The control to display.</param>
public DropDownForm(IDropDownAware Ctrl) : this()
/// <summary>
/// Constructor to initialize the for with the control to display.
/// </summary>
/// <param name="Ctrl">The control to display.</param>
public DropDownForm(IDropDownAware Ctrl) : this()
{
if (Ctrl != null)
{
@@ -41,7 +38,7 @@ namespace AT.STO.UI.Win
#region Form Events
protected override void OnClosing(CancelEventArgs e)
{
this.Controls.Remove(_control as Control);
Controls.Remove(_control as Control);
base.OnClosing(e);
}
@@ -58,29 +55,20 @@ namespace AT.STO.UI.Win
#region Event Handler
private void Ctrl_FinishEditing(object sender, DropDownValueChangedEventArgs e)
{
if (this.FinishEditing != null)
{
this.FinishEditing(this, e);
}
FinishEditing?.Invoke(this, e);
_control.FinishEditing -= new DropDownValueChangedEventHandler(Ctrl_FinishEditing);
_control.FinishEditing -= new DropDownValueChangedEventHandler(Ctrl_FinishEditing);
_control.ValueChanged -= new DropDownValueChangedEventHandler(Ctrl_ValueChanged);
}
private void Ctrl_ValueChanged(object sender, DropDownValueChangedEventArgs e)
{
if (this.ValueChanged != null)
{
this.ValueChanged(this, e);
}
}
#endregion
#region IDropDownAware Implementation
/// <summary>
/// Fired either on OK, Cancel or a click outside the control to indicate
/// that the user has finished editing.
/// </summary>
public event DropDownValueChangedEventHandler FinishEditing;
private void Ctrl_ValueChanged(object sender, DropDownValueChangedEventArgs e) => ValueChanged?.Invoke(this, e);
#endregion
#region IDropDownAware Implementation
/// <summary>
/// Fired either on OK, Cancel or a click outside the control to indicate
/// that the user has finished editing.
/// </summary>
public event DropDownValueChangedEventHandler FinishEditing;
/// <summary>
/// Fired on any change of the controls's value during the editing process.
@@ -100,15 +88,15 @@ namespace AT.STO.UI.Win
private void InitializeControl(Control Ctrl)
{
Size size = Ctrl.Size;
Size inner = this.ClientRectangle.Size;
Size outer = this.Size;
Size inner = ClientRectangle.Size;
Size outer = Size;
int gap = outer.Width - inner.Width;
size.Width += gap;
size.Height += gap;
this.Size = size;
this.Controls.Add(Ctrl);
Size = size;
Controls.Add(Ctrl);
Ctrl.Location = new Point(0, 0);
Ctrl.Visible = true;
Ctrl.Invalidate();
@@ -1,4 +1,3 @@
using System;
using System.Drawing;
using System.Windows.Forms;
@@ -21,59 +20,48 @@ namespace AT.STO.UI.Win
private const int WM_NCLBUTTONDOWN = 0x0A1;
private const int WM_NCRBUTTONDOWN = 0x0A4;
private const int WM_NCMBUTTONDOWN = 0x0A7;
#endregion
#region Private Variable Declarations
private Form _dropDown = null;
private DropDownWindowHelper _owner = null;
#endregion
#region Private Variable Declarations
private readonly DropDownWindowHelper _owner = null;
#endregion
#region Event Declarations
public event DropDownCancelEventHandler DropDownCancel;
#endregion
#region Constructor / Destructor
/// <summary>
/// Constructs a new instance of this class and sets the owning
/// object.
/// </summary>
/// <param name="Owner">The <see cref="DropDownWindowHelper"/> object
/// which owns this class.</param>
public DropDownMessageFilter(DropDownWindowHelper Owner)
{
_owner = Owner;
}
#endregion
#region Public Properties
/// <summary>
/// Gets/sets the dropdown form which is being displayed.
/// </summary>
public Form DropDown
{
get { return _dropDown; }
set { _dropDown = value; }
}
#endregion
#region Private Methods
private void OnMouseDown()
#endregion
#region Constructor / Destructor
/// <summary>
/// Constructs a new instance of this class and sets the owning
/// object.
/// </summary>
/// <param name="Owner">The <see cref="DropDownWindowHelper"/> object
/// which owns this class.</param>
public DropDownMessageFilter(DropDownWindowHelper Owner) => _owner = Owner;
#endregion
#region Public Properties
/// <summary>
/// Gets/sets the dropdown form which is being displayed.
/// </summary>
public Form DropDown { get; set; } = null;
#endregion
#region Private Methods
private void OnMouseDown()
{
Point cursorPos = Cursor.Position; // Get the cursor location
if (!_dropDown.Bounds.Contains(cursorPos)) // Check if it is within the popup form
if (!DropDown.Bounds.Contains(cursorPos)) // Check if it is within the popup form
{
OnDropDownCancel(new DropDownCancelEventArgs(_dropDown, cursorPos)); // If not, then call to see if it should be closed
OnDropDownCancel(new DropDownCancelEventArgs(DropDown, cursorPos)); // If not, then call to see if it should be closed
}
}
#endregion
#region DropDownCancelEvent Implementation
protected virtual void OnDropDownCancel(DropDownCancelEventArgs e)
{
if (this.DropDownCancel != null)
{
this.DropDownCancel(this, e);
}
DropDownCancel?.Invoke(this, e);
if (!e.Cancel)
if (!e.Cancel)
{
_owner.CloseDropDown();
_dropDown = null; // Clear reference for GC
DropDown = null; // Clear reference for GC
}
}
#endregion
@@ -90,7 +78,7 @@ namespace AT.STO.UI.Win
/// This implementation always returns <c>false</c>.</returns>
public bool PreFilterMessage(ref Message m)
{
if (_dropDown != null)
if (DropDown != null)
{
switch (m.Msg)
{
@@ -1,6 +1,5 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace AT.STO.UI.Win
@@ -22,7 +21,7 @@ namespace AT.STO.UI.Win
private Form _dropDown = null;
private bool _dropDownShowing = false;
private DropDownMessageFilter _filter = null;
private readonly DropDownMessageFilter _filter = null;
private Form _owner = null;
private bool _skipClose = false;
#endregion
@@ -42,31 +41,25 @@ namespace AT.STO.UI.Win
_filter.DropDownCancel -= new DropDownCancelEventHandler(Popup_Cancel);
_filter.DropDownCancel += new DropDownCancelEventHandler(Popup_Cancel);
}
#endregion
#region Event Handler
private void Popup_Cancel(object sender, DropDownCancelEventArgs e)
{
OnDropDownCancel(e);
}
#endregion
#region Event Handler
private void Popup_Cancel(object sender, DropDownCancelEventArgs e) => OnDropDownCancel(e);
/// <summary>
/// Responds to the <see cref="System.Windows.Forms.Form.Closed"/>
/// event from the popup form.
/// </summary>
/// <param name="sender">Popup form that has been closed.</param>
/// <param name="e">Not used.</param>
private void Popup_Closed(object sender, EventArgs e)
{
CloseDropDown();
}
/// <summary>
/// Subclasses the owning form's existing Window Procedure to enables the
/// title bar to remain active when a popup is show, and to detect if
/// the user clicks onto another application whilst the popup is visible.
/// </summary>
/// <param name="m">Window Procedure Message</param>
protected override void WndProc(ref Message m)
/// <summary>
/// Responds to the <see cref="System.Windows.Forms.Form.Closed"/>
/// event from the popup form.
/// </summary>
/// <param name="sender">Popup form that has been closed.</param>
/// <param name="e">Not used.</param>
private void Popup_Closed(object sender, EventArgs e) => CloseDropDown();
/// <summary>
/// Subclasses the owning form's existing Window Procedure to enables the
/// title bar to remain active when a popup is show, and to detect if
/// the user clicks onto another application whilst the popup is visible.
/// </summary>
/// <param name="m">Window Procedure Message</param>
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
@@ -76,7 +69,7 @@ namespace AT.STO.UI.Win
{
if (((int)m.WParam) == 0) // Check if the title bar will made inactive:
{ // Note it's no good to try and consume this message; if you try to do that you'll end up with windows
UIApiCalls.SendMessage(this.Handle, UIApiCalls.WM_NCACTIVATE, 1, IntPtr.Zero); // If so reactivate it.
UIApiCalls.SendMessage(Handle, UIApiCalls.WM_NCACTIVATE, 1, IntPtr.Zero); // If so reactivate it.
}
}
else if (m.Msg == UIApiCalls.WM_ACTIVATEAPP)
@@ -84,7 +77,7 @@ namespace AT.STO.UI.Win
if ((int)m.WParam == 0) // Check if the application is being deactivated.
{
CloseDropDown(); // It is so cancel the popup:
UIApiCalls.PostMessage(this.Handle, UIApiCalls.WM_NCACTIVATE, 0, IntPtr.Zero); // And put the title bar into the inactive state:
UIApiCalls.PostMessage(Handle, UIApiCalls.WM_NCACTIVATE, 0, IntPtr.Zero); // And put the title bar into the inactive state:
}
}
}
@@ -168,22 +161,19 @@ namespace AT.STO.UI.Win
_owner = null;
}
}
#endregion
#region Public Properties
/// <summary>
/// Indicator weither the DropDown is showing.
/// </summary>
public bool DropDownShowing
#endregion
#region Public Properties
/// <summary>
/// Indicator weither the DropDown is showing.
/// </summary>
public bool DropDownShowing => _dropDownShowing;
#endregion
#region Event Implementation
protected virtual void OnDropDownCancel(DropDownCancelEventArgs e)
{
get { return _dropDownShowing; }
}
#endregion
#region Event Implementation
protected virtual void OnDropDownCancel(DropDownCancelEventArgs e)
{
if (this.DropDownCancel != null)
if (DropDownCancel != null)
{
this.DropDownCancel(this, e);
DropDownCancel(this, e);
if (!e.Cancel)
{
@@ -191,14 +181,8 @@ namespace AT.STO.UI.Win
}
}
}
protected virtual void OnPDropDownClosed(DropDownClosedEventArgs e)
{
if (this.DropDownClosed != null)
{
this.DropDownClosed(this, e);
}
}
#endregion
}
protected virtual void OnPDropDownClosed(DropDownClosedEventArgs e) => DropDownClosed?.Invoke(this, e);
#endregion
}
}
@@ -1,5 +1,3 @@
using System;
namespace AT.STO.UI.Win
{
/// <summary>
@@ -1,5 +1,3 @@
using System;
namespace AT.STO.UI.Win
{
public interface ILookupItem<T> where T: struct
+37 -66
View File
@@ -1,8 +1,6 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
//using System.Linq;
using System.Windows.Forms;
@@ -121,10 +119,7 @@ namespace JR.Utils.GUI.Forms
/// </summary>
/// <param name="text">The text.</param>
/// <returns>The dialog result.</returns>
public static DialogResult Show(string text)
{
return FlexibleMessageBoxForm.Show(null, text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
}
public static DialogResult Show(string text) => FlexibleMessageBoxForm.Show(null, text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
/// <summary>
/// Shows the specified message box.
@@ -132,10 +127,7 @@ namespace JR.Utils.GUI.Forms
/// <param name="owner">The owner.</param>
/// <param name="text">The text.</param>
/// <returns>The dialog result.</returns>
public static DialogResult Show(IWin32Window owner, string text)
{
return FlexibleMessageBoxForm.Show(owner, text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
}
public static DialogResult Show(IWin32Window owner, string text) => FlexibleMessageBoxForm.Show(owner, text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
/// <summary>
/// Shows the specified message box.
@@ -143,10 +135,7 @@ namespace JR.Utils.GUI.Forms
/// <param name="text">The text.</param>
/// <param name="caption">The caption.</param>
/// <returns>The dialog result.</returns>
public static DialogResult Show(string text, string caption)
{
return FlexibleMessageBoxForm.Show(null, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
}
public static DialogResult Show(string text, string caption) => FlexibleMessageBoxForm.Show(null, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
/// <summary>
/// Shows the specified message box.
@@ -155,10 +144,7 @@ namespace JR.Utils.GUI.Forms
/// <param name="text">The text.</param>
/// <param name="caption">The caption.</param>
/// <returns>The dialog result.</returns>
public static DialogResult Show(IWin32Window owner, string text, string caption)
{
return FlexibleMessageBoxForm.Show(owner, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
}
public static DialogResult Show(IWin32Window owner, string text, string caption) => FlexibleMessageBoxForm.Show(owner, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
/// <summary>
/// Shows the specified message box.
@@ -167,10 +153,7 @@ namespace JR.Utils.GUI.Forms
/// <param name="caption">The caption.</param>
/// <param name="buttons">The buttons.</param>
/// <returns>The dialog result.</returns>
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons)
{
return FlexibleMessageBoxForm.Show(null, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
}
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons) => FlexibleMessageBoxForm.Show(null, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
/// <summary>
/// Shows the specified message box.
@@ -180,10 +163,7 @@ namespace JR.Utils.GUI.Forms
/// <param name="caption">The caption.</param>
/// <param name="buttons">The buttons.</param>
/// <returns>The dialog result.</returns>
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons)
{
return FlexibleMessageBoxForm.Show(owner, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
}
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons) => FlexibleMessageBoxForm.Show(owner, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
/// <summary>
/// Shows the specified message box.
@@ -193,10 +173,7 @@ namespace JR.Utils.GUI.Forms
/// <param name="buttons">The buttons.</param>
/// <param name="icon">The icon.</param>
/// <returns></returns>
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
{
return FlexibleMessageBoxForm.Show(null, text, caption, buttons, icon, MessageBoxDefaultButton.Button1);
}
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) => FlexibleMessageBoxForm.Show(null, text, caption, buttons, icon, MessageBoxDefaultButton.Button1);
/// <summary>
/// Shows the specified message box.
@@ -207,10 +184,7 @@ namespace JR.Utils.GUI.Forms
/// <param name="buttons">The buttons.</param>
/// <param name="icon">The icon.</param>
/// <returns>The dialog result.</returns>
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
{
return FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, MessageBoxDefaultButton.Button1);
}
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) => FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, MessageBoxDefaultButton.Button1);
/// <summary>
/// Shows the specified message box.
@@ -221,10 +195,7 @@ namespace JR.Utils.GUI.Forms
/// <param name="icon">The icon.</param>
/// <param name="defaultButton">The default button.</param>
/// <returns>The dialog result.</returns>
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
{
return FlexibleMessageBoxForm.Show(null, text, caption, buttons, icon, defaultButton);
}
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton) => FlexibleMessageBoxForm.Show(null, text, caption, buttons, icon, defaultButton);
/// <summary>
/// Shows the specified message box.
@@ -236,10 +207,7 @@ namespace JR.Utils.GUI.Forms
/// <param name="icon">The icon.</param>
/// <param name="defaultButton">The default button.</param>
/// <returns>The dialog result.</returns>
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
{
return FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, defaultButton);
}
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton) => FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, defaultButton);
/// <summary>
/// Shows the specified message box.
@@ -251,10 +219,8 @@ namespace JR.Utils.GUI.Forms
/// <param name="icon">The icon.</param>
/// <param name="defaultButton">The default button.</param>
/// <returns>The dialog result.</returns>
public static DialogResult ShowCustom(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
{
return FlexibleMessageBoxForm.ShowCustom(null, text, caption, buttons, icon);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Keeping owner for legacy reasons")]
public static DialogResult ShowCustom(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) => FlexibleMessageBoxForm.ShowCustom(null, text, caption, buttons, icon);
#endregion
@@ -341,7 +307,7 @@ namespace JR.Utils.GUI.Forms
this.richTextBoxMessage.TabIndex = 0;
this.richTextBoxMessage.TabStop = false;
this.richTextBoxMessage.Text = "<Message>";
this.richTextBoxMessage.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.richTextBoxMessage_LinkClicked);
this.richTextBoxMessage.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.RichTextBoxMessage_LinkClicked);
//
// panel1
//
@@ -431,8 +397,8 @@ namespace JR.Utils.GUI.Forms
#region Private constants
//These separators are used for the "copy to clipboard" standard operation, triggered by Ctrl + C (behavior and clipboard format is like in a standard MessageBox)
private static readonly String STANDARD_MESSAGEBOX_SEPARATOR_LINES = "---------------------------\n";
private static readonly String STANDARD_MESSAGEBOX_SEPARATOR_SPACES = " ";
private static readonly string STANDARD_MESSAGEBOX_SEPARATOR_LINES = "---------------------------\n";
private static readonly string STANDARD_MESSAGEBOX_SEPARATOR_SPACES = " ";
//These are the possible buttons (in a standard MessageBox)
private enum ButtonID { OK = 0, CANCEL, YES, NO, ABORT, RETRY, IGNORE, OVERWRITE, RENAME };
@@ -440,10 +406,10 @@ namespace JR.Utils.GUI.Forms
//These are the buttons texts for different languages.
//If you want to add a new language, add it here and in the GetButtonText-Function
private enum TwoLetterISOLanguageID { en, de, es, it };
private static readonly String[] BUTTON_TEXTS_ENGLISH_EN = { "OK", "Cancel", "&Yes", "&No", "&Abort", "&Retry", "&Ignore", "&Overwrite", "&Rename" }; //Note: This is also the fallback language
private static readonly String[] BUTTON_TEXTS_GERMAN_DE = { "OK", "Abbrechen", "&Ja", "&Nein", "&Abbrechen", "&Wiederholen", "&Ignorieren", "&Overwrite", "&Rename" };
private static readonly String[] BUTTON_TEXTS_SPANISH_ES = { "Aceptar", "Cancelar", "&Sí", "&No", "&Abortar", "&Reintentar", "&Ignorar", "&Overwrite", "&Rename" };
private static readonly String[] BUTTON_TEXTS_ITALIAN_IT = { "OK", "Annulla", "&Sì", "&No", "&Interrompi", "&Riprova", "&Ignora", "&Overwrite", "&Rename" };
private static readonly string[] BUTTON_TEXTS_ENGLISH_EN = { "OK", "Cancel", "&Yes", "&No", "&Abort", "&Retry", "&Ignore", "&Overwrite", "&Rename" }; //Note: This is also the fallback language
private static readonly string[] BUTTON_TEXTS_GERMAN_DE = { "OK", "Abbrechen", "&Ja", "&Nein", "&Abbrechen", "&Wiederholen", "&Ignorieren", "&Overwrite", "&Rename" };
private static readonly string[] BUTTON_TEXTS_SPANISH_ES = { "Aceptar", "Cancelar", "&Sí", "&No", "&Abortar", "&Reintentar", "&Ignorar", "&Overwrite", "&Rename" };
private static readonly string[] BUTTON_TEXTS_ITALIAN_IT = { "OK", "Annulla", "&Sì", "&No", "&Interrompi", "&Riprova", "&Ignora", "&Overwrite", "&Rename" };
#endregion
@@ -451,7 +417,7 @@ namespace JR.Utils.GUI.Forms
private MessageBoxDefaultButton defaultButton;
private int visibleButtonsCount;
private TwoLetterISOLanguageID languageID = TwoLetterISOLanguageID.en;
private readonly TwoLetterISOLanguageID languageID = TwoLetterISOLanguageID.en;
#endregion
@@ -758,9 +724,9 @@ namespace JR.Utils.GUI.Forms
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
private void FlexibleMessageBoxForm_Shown(object sender, EventArgs e)
{
int buttonIndexToFocus = 1;
Button buttonToFocus;
int buttonIndexToFocus;
//Set the default button...
switch (this.defaultButton)
{
@@ -799,7 +765,7 @@ namespace JR.Utils.GUI.Forms
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.Windows.Forms.LinkClickedEventArgs"/> instance containing the event data.</param>
private void richTextBoxMessage_LinkClicked(object sender, LinkClickedEventArgs e)
private void RichTextBoxMessage_LinkClicked(object sender, LinkClickedEventArgs e)
{
try
{
@@ -877,12 +843,14 @@ namespace JR.Utils.GUI.Forms
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
{
//Create a new instance of the FlexibleMessageBox form
var flexibleMessageBoxForm = new FlexibleMessageBoxForm();
flexibleMessageBoxForm.ShowInTaskbar = false;
var flexibleMessageBoxForm = new FlexibleMessageBoxForm
{
ShowInTaskbar = false,
//Bind the caption and the message text
flexibleMessageBoxForm.CaptionText = caption;
flexibleMessageBoxForm.MessageText = text;
//Bind the caption and the message text
CaptionText = caption,
MessageText = text
};
flexibleMessageBoxForm.FlexibleMessageBoxFormBindingSource.DataSource = flexibleMessageBoxForm;
//Set the buttons visibilities and texts. Also set a default button.
@@ -914,15 +882,18 @@ namespace JR.Utils.GUI.Forms
/// <param name="icon">The icon.</param>
/// <param name="defaultButton">The default button.</param>
/// <returns>The dialog result.</returns>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Keeping buttons for legacy reasons")]
public static DialogResult ShowCustom(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
{
//Create a new instance of the FlexibleMessageBox form
var flexibleMessageBoxForm = new FlexibleMessageBoxForm();
flexibleMessageBoxForm.ShowInTaskbar = false;
var flexibleMessageBoxForm = new FlexibleMessageBoxForm
{
ShowInTaskbar = false,
//Bind the caption and the message text
flexibleMessageBoxForm.CaptionText = caption;
flexibleMessageBoxForm.MessageText = text;
//Bind the caption and the message text
CaptionText = caption,
MessageText = text
};
flexibleMessageBoxForm.FlexibleMessageBoxFormBindingSource.DataSource = flexibleMessageBoxForm;
//Set the buttons visibilities and texts. Also set a default button.
+2
View File
@@ -66,6 +66,7 @@
<Compile Include="frmFormatCopy.Designer.cs">
<DependentUpon>frmFormatCopy.cs</DependentUpon>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmFormatCopy.resx">
@@ -179,6 +180,7 @@
<Content Include="fmtall\CPL_00all.xml" />
<Content Include="fmtall\CPL_01all.xml" />
<Content Include="fmtall\CPL_02all.xml" />
<Content Include="fmtall\CPL_04all.xml" />
<Content Include="fmtall\CPL_03all.xml" />
<Content Include="fmtall\CPSAMGDataall.xml" />
<Content Include="fmtall\CPSAMGDEVall.xml" />
+8
View File
@@ -0,0 +1,8 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Not modifying Naming Styles")]
-1
View File
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace Formats
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+14 -23
View File
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
@@ -28,7 +23,7 @@ namespace Formats
txbxPROMSFormatsPath.Text = savedFormatPath;
else
{
string curFolder = Environment.CurrentDirectory; // C:\development/PROMS/Formats/bin/debug
string curFolder = Environment.CurrentDirectory; // .../PROMS/Formats/bin/debug
int idx = curFolder.ToUpper().IndexOf(@"\PROMS\");
txbxPROMSFormatsPath.Text = curFolder.Substring(0, idx);
}
@@ -40,9 +35,8 @@ namespace Formats
DirectoryInfo di = new DirectoryInfo(path);
if (di.Exists == false) //return;
{
DialogResult dlgrslt = DialogResult.No;
dlgrslt = MessageBox.Show(string.Format("{0} does not exist. Create it?", path), "Create Folder?", MessageBoxButtons.YesNo);
if (dlgrslt == DialogResult.Yes)
DialogResult dlgrslt = MessageBox.Show(string.Format("{0} does not exist. Create it?", path), "Create Folder?", MessageBoxButtons.YesNo);
if (dlgrslt == DialogResult.Yes)
{
di.Create();
di.CreateSubdirectory("fmtall");
@@ -86,10 +80,11 @@ namespace Formats
private void btnBrowse_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.SelectedPath = txbxPROMSFormatsPath.Text;
if (fbd.ShowDialog() == DialogResult.OK)
FolderBrowserDialog fbd = new FolderBrowserDialog
{
SelectedPath = txbxPROMSFormatsPath.Text
};
if (fbd.ShowDialog() == DialogResult.OK)
{
if (Directory.Exists(fbd.SelectedPath)) txbxPROMSFormatsPath.Text = fbd.SelectedPath + @"\";
}
@@ -116,9 +111,9 @@ namespace Formats
if (!txbxPROMSFormatsPath.Text.EndsWith(@"\")) txbxPROMSFormatsPath.Text += @"\";
// There should be a "fmtall" and "genmacall" folder in the delelopment project folder
// ex: C:\development\PROMS\Formats\fmtall and C:\development\PROMS\Formats\genmacall
string destFmtallPath = txbxPROMSFormatsPath.Text + @"fmtall\";
string destGenmacallPath = txbxPROMSFormatsPath.Text + @"genmacall\";
// ex: ...\PROMS\Formats\fmtall and ...\PROMS\Formats\genmacall
string destFmtallPath = $@"{txbxPROMSFormatsPath.Text}fmtall\";
string destGenmacallPath = $@"{txbxPROMSFormatsPath.Text}genmacall\";
string srcFmtallPath = @"..\..\"; // up to levels from startup path
// clear the destination fmtall and genmacall folders
@@ -156,14 +151,10 @@ namespace Formats
}
Properties.Settings.Default.FormatPath = txbxPROMSFormatsPath.Text.Substring(0,txbxPROMSFormatsPath.Text.Length-1); // save the copy format path minus the ending backslash
Properties.Settings.Default.Save();
//if(MessageBox.Show("Do you want to end the Format Copier?","Formats Copied.", MessageBoxButtons.YesNo, MessageBoxIcon.Question)== DialogResult.Yes)
Application.Exit();
}
private void buttonX2_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
private void buttonX2_Click(object sender, EventArgs e) => Application.Exit();
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Not modifying Naming Styles")]
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1
View File
@@ -79,6 +79,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="LBComObject.cs" />
<Compile Include="LBObjectExtension.cs" />
<Compile Include="OutlookLBComObject.cs" />
+51 -148
View File
@@ -1,64 +1,45 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace LBOutlookLibrary
{
public abstract partial class LBComObject
{
private Object _Item;
internal Object Item
private object _Item;
internal object Item
{
get { return _Item; }
set
{
_Item = value;
if (value != null) _MyType = _Item.GetType();
if (value != null) MyType = _Item.GetType();
}
}
private Type _MyType;
public Type MyType
{
get { return _MyType; }
set { _MyType = value; }
}
protected LBComObject() { }
public Type MyType { get; set; }
protected LBComObject() { }
protected LBComObject(string ProgID)
{
Type objClassType;
objClassType = Type.GetTypeFromProgID(ProgID);
Item = Activator.CreateInstance(objClassType);
}
protected LBComObject(Object item)
{
Item = item;
}
private Object DoInvokeMember(string name, Object[] parameters, BindingFlags bf, Binder b)
protected LBComObject(object item) => Item = item;
private object DoInvokeMember(string name, object[] parameters, BindingFlags bf, Binder b)
{
try
{
return _MyType.InvokeMember(name, bf, b, _Item, parameters);
return MyType.InvokeMember(name, bf, b, _Item, parameters);
}
catch (Exception ex)
{
throw new Exception(string.Format("LBComObject.DoInvokeMember {0}.{1}", _MyType.Name, name), ex);
throw new Exception(string.Format("LBComObject.DoInvokeMember {0}.{1}", MyType.Name, name), ex);
}
return null;
}
protected void SetProperty(string propertyName, params Object[] parameters)
{
DoInvokeMember(propertyName, parameters, BindingFlags.SetProperty, null);
}
protected Object GetProperty(string propertyName)
{
return DoInvokeMember(propertyName, null, BindingFlags.GetProperty, null);
}
protected Object GetProperty(string propertyName, params Object[] parameters)
{
return DoInvokeMember(propertyName, parameters, BindingFlags.GetProperty, null);
}
protected Object InvokeMethod(string methodName, params Object[] parameters)
protected void SetProperty(string propertyName, params object[] parameters) => DoInvokeMember(propertyName, parameters, BindingFlags.SetProperty, null);
protected object GetProperty(string propertyName) => DoInvokeMember(propertyName, null, BindingFlags.GetProperty, null);
protected object GetProperty(string propertyName, params object[] parameters) => DoInvokeMember(propertyName, parameters, BindingFlags.GetProperty, null);
protected object InvokeMethod(string methodName, params object[] parameters)
{
if (parameters != null)
FixParameters(parameters);
@@ -71,45 +52,15 @@ namespace LBOutlookLibrary
if (parameters[i] is LBComObject)
parameters[i] = (parameters[i] as LBComObject).Item;
}
protected Object InvokeMethod(string methodName)
{
return InvokeMethod(methodName, null);
}
}
public class LBComObjectList<TList, TItem> : LBComObject
where TList : LBComObjectList<TList, TItem>
where TItem : LBComObject, new()
{
//public new(Object item):base(item){}
public TItem Add()
{
TItem tmp = new TItem();
tmp.Item = InvokeMethod("Add");
return tmp;
}
//public TItem this[int item]
//{
// get
// {
// TItem tmp = new TItem();
// tmp.Item = GetProperty("Item", item);
// return tmp;
// }
//}
}
protected object InvokeMethod(string methodName) => InvokeMethod(methodName, null);
}
public partial class LBApplicationClass : LBComObject
{
public LBApplicationClass() : base("Outlook.Application") { }
public LBApplicationClass(Object item) : base(item) { }
public System.Object CreateItem(LBOlItemType ItemType)
{
return InvokeMethod("CreateItem", ItemType);
}
public void Quit()
{
InvokeMethod("Quit");
}
}
public LBApplicationClass(object item) : base(item) { }
public object CreateItem(LBOlItemType ItemType) => InvokeMethod("CreateItem", ItemType);
public void Quit() => InvokeMethod("Quit");
}
public enum LBOlItemType
{
olMailItem = 0,
@@ -124,13 +75,13 @@ namespace LBOutlookLibrary
public partial class LBMailItem : LBComObject
{
public LBMailItem() { }
public LBMailItem(Object item) : base(item) { }
public LBMailItem(object item) : base(item) { }
}
public partial class LBMailItemClass : LBComObject
{
public LBMailItemClass() { }
public LBMailItemClass(Object item) : base(item) { }
public String Body
public LBMailItemClass(object item) : base(item) { }
public string Body
{
get { return (GetProperty("Body").ToString()); }
set { SetProperty("Body", value); }
@@ -140,29 +91,20 @@ namespace LBOutlookLibrary
get { return (LBOlBodyFormat)GetProperty("BodyFormat"); }
set { SetProperty("BodyFormat", value); }
}
public LBAttachments Attachments
{
get { return new LBAttachments(GetProperty("Attachments")); }
}
public String Subject
public LBAttachments Attachments => new LBAttachments(GetProperty("Attachments"));
public string Subject
{
get { return (GetProperty("Subject").ToString()); }
set { SetProperty("Subject", value); }
}
public LBRecipients Recipients
{
get { return new LBRecipients(GetProperty("Recipients")); }
}
public String To
public LBRecipients Recipients => new LBRecipients(GetProperty("Recipients"));
public string To
{
get { return (GetProperty("To").ToString()); }
set { SetProperty("To", value); }
}
public void Send()
{
InvokeMethod("Send");
}
}
public void Send() => InvokeMethod("Send");
}
public enum LBOlBodyFormat
{
olFormatUnspecified = 0,
@@ -173,79 +115,40 @@ namespace LBOutlookLibrary
public partial class LBAttachments : LBComObject
{
public LBAttachments() { }
public LBAttachments(Object item) : base(item) { }
public int Count
{
get { return (GetProperty("Count") as int? ?? 0); }
}
public LBAttachment Item
{
get { return new LBAttachment(GetProperty("Item")); }
}
public LBAttachment Add(object Source)
{
return new LBAttachment(InvokeMethod("Add", Source, Missing.Value, Missing.Value, Missing.Value));
}
public LBAttachment Add(object Source, object Type, object Position, object DisplayName)
public LBAttachments(object item) : base(item) { }
public int Count => (GetProperty("Count") as int? ?? 0);
public new LBAttachment Item => new LBAttachment(GetProperty("Item"));
public LBAttachment Add(object Source) => new LBAttachment(InvokeMethod("Add", Source, Missing.Value, Missing.Value, Missing.Value));
public LBAttachment Add(object Source, object Type, object Position, object DisplayName)
{
return new LBAttachment(InvokeMethod("Add", Source, Type, Position, DisplayName));
}
public void Remove(int Index)
{
InvokeMethod("Remove", Index);
}
}
public void Remove(int Index) => InvokeMethod("Remove", Index);
}
public partial class LBRecipients : LBComObject
{
public LBRecipients() { }
public LBRecipients(Object item) : base(item) { }
public int Count
{
get { return (GetProperty("Count") as int? ?? 0); }
}
public LBRecipient Item
{
get { return new LBRecipient(GetProperty("Item")); }
}
public LBRecipient Add(string Name)
{
return new LBRecipient(InvokeMethod("Add", Name));
}
public void Remove(int Index)
{
InvokeMethod("Remove", Index);
}
public Boolean ResolveAll()
{
return InvokeMethod("ResolveAll") as Boolean? ?? false;
}
}
public LBRecipients(object item) : base(item) { }
public int Count => (GetProperty("Count") as int? ?? 0);
public new LBRecipient Item => new LBRecipient(GetProperty("Item"));
public LBRecipient Add(string Name) => new LBRecipient(InvokeMethod("Add", Name));
public void Remove(int Index) => InvokeMethod("Remove", Index);
public bool ResolveAll() => InvokeMethod("ResolveAll") as bool? ?? false;
}
public partial class LBAttachment : LBComObject
{
public LBAttachment() { }
public LBAttachment(Object item) : base(item) { }
public LBOlAttachmentType Type
{
get { return (LBOlAttachmentType)GetProperty("Type"); }
}
}
public LBAttachment(object item) : base(item) { }
public LBOlAttachmentType Type => (LBOlAttachmentType)GetProperty("Type");
}
public partial class LBRecipient : LBComObject
{
public LBRecipient() { }
public LBRecipient(Object item) : base(item) { }
public String Address
{
get { return (GetProperty("Address").ToString()); }
}
public String Name
{
get { return (GetProperty("Name").ToString()); }
}
public Boolean Resolve()
{
return InvokeMethod("Resolve") as Boolean? ?? false;
}
}
public LBRecipient(object item) : base(item) { }
public string Address => (GetProperty("Address").ToString());
public string Name => (GetProperty("Name").ToString());
public bool Resolve() => InvokeMethod("Resolve") as bool? ?? false;
}
public enum LBOlAttachmentType
{
olByValue = 1,
+4 -12
View File
@@ -1,21 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace LBOutlookLibrary
{
public partial class LBApplicationClass
{
public LBMailItemClass CreateMailItem()
{
return new LBMailItemClass(CreateItem(LBOlItemType.olMailItem));
}
}
public LBMailItemClass CreateMailItem() => new LBMailItemClass(CreateItem(LBOlItemType.olMailItem));
}
public partial class LBMailItemClass
{
public void AddAttachment(string filename)
{
Attachments.Add(filename, LBOlAttachmentType.olByValue, Type.Missing, Type.Missing);
}
}
public void AddAttachment(string filename) => Attachments.Add(filename, LBOlAttachmentType.olByValue, Type.Missing, Type.Missing);
}
}
+10 -24
View File
@@ -49,19 +49,13 @@ namespace Read64bitRegistryFrom32bitApp
ref uint lpType,
System.Text.StringBuilder lpData,
ref uint lpcbData);
#endregion
#endregion
#endregion
#endregion
#region Functions
static public string GetRegKey64Value(UIntPtr inHive, String inKeyName, String inPropertyName)
{
return GetRegKey64Value(inHive, inKeyName, RegSAM.WOW64_64Key, inPropertyName);
}
static public string GetRegKey32Value(UIntPtr inHive, String inKeyName, String inPropertyName)
{
return GetRegKey64Value(inHive, inKeyName, RegSAM.WOW64_32Key, inPropertyName);
}
static public string GetRegKey64Value(UIntPtr inHive, String inKeyName, RegSAM in32or64key, String inPropertyName)
#region Functions
static public string GetRegKey64Value(UIntPtr inHive, string inKeyName, string inPropertyName) => GetRegKey64Value(inHive, inKeyName, RegSAM.WOW64_64Key, inPropertyName);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "inHive kept to match dll signature")]
static public string GetRegKey64Value(UIntPtr inHive, string inKeyName, RegSAM in32or64key, string inPropertyName)
{
int hkey = 0;
try
@@ -80,15 +74,10 @@ namespace Read64bitRegistryFrom32bitApp
if (0 != hkey) RegCloseKey(hkey);
}
}
static public bool CheckRegKey64Valid(UIntPtr inHive, String inKeyName)
{
return CheckRegKey64Valid(inHive, inKeyName, RegSAM.WOW64_64Key);
}
static public bool GetRegKey32Valid(UIntPtr inHive, String inKeyName)
{
return CheckRegKey64Valid(inHive, inKeyName, RegSAM.WOW64_32Key);
}
static public bool CheckRegKey64Valid(UIntPtr inHive, String inKeyName, RegSAM in32or64key)
static public bool CheckRegKey64Valid(UIntPtr inHive, string inKeyName) => CheckRegKey64Valid(inHive, inKeyName, RegSAM.WOW64_64Key);
static public bool GetRegKey32Valid(UIntPtr inHive, string inKeyName) => CheckRegKey64Valid(inHive, inKeyName, RegSAM.WOW64_32Key);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "inHive kept to match dll signature")]
static public bool CheckRegKey64Valid(UIntPtr inHive, string inKeyName, RegSAM in32or64key)
{
int hkey = 0;
try
@@ -103,8 +92,5 @@ namespace Read64bitRegistryFrom32bitApp
}
}
#endregion
#region Enums
#endregion
}
}
@@ -418,7 +418,7 @@ namespace ROEditor
// NOTE: not doing the "Using System.Threading;" statement at beginning of file because it conflicts with the declaration of the "Timer" variable
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
// The data path the was passed in.
// The data path the was passed in.
DbConnectPath = PassedInPath;
// Setup the context menu
@@ -2844,7 +2844,8 @@ namespace ROEditor
}
else
{
newt=null;
mnutitle = Regex.Replace(mnutitle, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022
newt =null;
success = myrodb.RODB_WriteRO((VlnXmlElement)roTreeView.SelectedNode.Tag);
if (success==true && mnutitle != "") roTreeView.SelectedNode.Text = mnutitle; //B2021-077 make sure mnutitle has text or it will clear the node's title in the tree
}
@@ -116,12 +116,12 @@ namespace ROEditor
public uint thisoff;
public string title;
public FstTmpSTRC(ushort type, uint offset, string tl)
public FstTmpSTRC(ushort type, uint offset, string tl)
{
thistype = type;
thisoff = offset;
title = tl;
}
}
void WriteString(BinaryWriter bw, string str)
{
@@ -150,7 +150,7 @@ namespace ROEditor
bw.Write(thisoff);
bw.Write(thistype);
WriteString(bw,title);
}
}
}
// The Sorted Array was not sorting via the ASCII value of each character in a given string.
@@ -565,8 +565,8 @@ namespace ROEditor
string RecIdStr = elem.GetAttribute("RecID");
curRecID = System.Convert.ToUInt32(RecIdStr,16);
// Get the current node's parent id
string ParIdStr = elem.GetAttribute("ParentID");
// Get the current node's parent id
string ParIdStr = elem.GetAttribute("ParentID");
elemParentID = Convert.ToUInt32(ParIdStr,16);
string HasKids = elem.GetAttribute("HasChild");
@@ -771,8 +771,8 @@ namespace ROEditor
private ushort SaveROToFST(XmlNode RONode,ArrayList InUseList,string RtnValTmplate, string AccPageIDTplate)
{
ushort RtnVal;
uint startFST = (uint)fhFST.BaseStream.Position;
uint RORecID;
uint startFST = (uint)fhFST.BaseStream.Position;
uint RORecID;
uint ParID;
byte nullbyte=0;
@@ -844,8 +844,12 @@ namespace ROEditor
AccPageID = " ";
WriteString(AccPageID);
// Save the ID and offset entry for the current ID
IdsAndOffsets.Add(RORecID,startFST);
//C2026-008 Re-Architect RO.FST to include RO Modification date/time
string moddt = ROdatabase.RODB_GetModDateTime(elem.GetAttribute("RecID"), elem.GetAttribute("Table"));
if (!string.IsNullOrEmpty(moddt)) WriteString(moddt);
// Save the ID and offset entry for the current ID
IdsAndOffsets.Add(RORecID, startFST);
// Save the RecID and Accessory Page id
IdsAndAccPgIds[AccPageID] = RORecID;
@@ -322,9 +322,9 @@ namespace RODBInterface
get { return _PCChildList; }
set { _PCChildList = value; }
}
#endregion
#region abstracts // need these for each method that must be defined for each database type
public abstract string RODB_GetNextGroupTable();
#endregion
#region abstracts // need these for each method that must be defined for each database type
public abstract string RODB_GetNextGroupTable();
public abstract string RODB_GetNextRecId(string table);
public abstract bool RODB_GetRootGroups(VlnXmlElement root);
public abstract bool RODB_DeleteGroup(XmlNode group, string tbname, string toprecid);
@@ -355,9 +355,10 @@ namespace RODBInterface
public abstract string RODB_GetDBServerForAbout();
public abstract string RODB_HasBeenConverted();
public abstract bool RODB_WriteSqlConnectToAccess(string newConectStr);
#endregion
public abstract string RODB_GetModDateTime(string Recid, string table);
#endregion
public RODB()
public RODB()
{
}
@@ -2142,7 +2143,20 @@ namespace RODBInterface
wraccid = accid;
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
string xmlstr = GenerateXmlString(ro, false);
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'";
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
char[] chrAry = xmlstr.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 166)
{
xmlstrTmp.Append($"\\u{(int)chr}?");
}
else
{
xmlstrTmp.Append((char)chr);
}
}
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp.ToString() + "'";
if (movedRO)
{
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
@@ -2186,6 +2200,20 @@ namespace RODBInterface
}
string xmlstr = GenerateXmlString(ro, false);
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
char[] chrAry = xmlstr.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 166)
{
xmlstrTmp.Append($"\\u{(int)chr}?");
}
else
{
xmlstrTmp.Append((char)chr);
}
}
string wraccid = null;
if (ro.HasAttribute("AccPageID"))
{
@@ -2209,13 +2237,13 @@ namespace RODBInterface
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
}
else
{
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
}
}
@@ -2223,7 +2251,7 @@ namespace RODBInterface
{
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
}
try
@@ -2355,9 +2383,9 @@ namespace RODBInterface
RecID = DBE.GetString(0);
MyRecID = RecID;
Info = DBE.GetString(1);
// it's defined in the local table if the first character is "<" which starts
// the schema definition string.
if ("<" == Info.Substring(0, 1))
// it's defined in the local table if the first character is "<" which starts
// the schema definition string.
if ("<" == Info.Substring(0, 1))
{
name = ParseEleName(Info);
if (name != null)
@@ -2398,7 +2426,7 @@ namespace RODBInterface
return retlist;
}
public override string RODB_GetSchemaPiece(string Recid, string table)
public override string RODB_GetSchemaPiece(string Recid, string table)
{
string strGetSchemaPiece;
string Info;
@@ -2631,7 +2659,21 @@ namespace RODBInterface
}
}
StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle");
StringBuilder tinfo2Tmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'";
char[] chrAry = tinfo2.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 166)
{
tinfo2Tmp.Append($"\\u{(int)chr}?");
}
else
{
tinfo2Tmp.Append((char)chr);
}
}
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp.ToString() + "'";
str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';";
DBE.Command(str);
DBE.Reader();
@@ -3041,7 +3083,28 @@ namespace RODBInterface
return GrpCnt;
}
}
//C2026-008 Re-Architect RO.FST to include RO Modification date/time
//Get the Modification Date / Time for the RO
public override string RODB_GetModDateTime(string Recid, string table)
{
using (System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection(strDatabaseConnectionCommand))
{
connection.Open();
using (System.Data.OleDb.OleDbCommand command = connection.CreateCommand())
{
//Unfortunately Access wont let you paramaterize the table name
command.CommandText = $"SELECT ModDateTime FROM {Regex.Replace(table, "[^a-zA-Z0-9]", "")} WHERE RecID = @Value";
command.Parameters.Add(new System.Data.OleDb.OleDbParameter
{
OleDbType = System.Data.OleDb.OleDbType.VarChar,
ParameterName = "@Value",
Value = Recid
});
return command.ExecuteScalar().ToString();
}
}
}
}
}
@@ -1803,9 +1803,9 @@ namespace RODBInterface
RecID = reader.GetString(0);
MyRecID = RecID;
Info = reader.GetString(1);
// it's defined in the local table if the first character is "<" which starts
// the schema definition string.
if ("<" == Info.Substring(0, 1))
// it's defined in the local table if the first character is "<" which starts
// the schema definition string.
if ("<" == Info.Substring(0, 1))
{
name = ParseEleName(Info);
if (name != null)
@@ -1859,9 +1859,9 @@ namespace RODBInterface
RecID = reader.GetString(0);
MyRecID = RecID;
Info = reader.GetString(1);
// it's defined in the local table if the first character is "<" which starts
// the schema definition string.
if ("<" == Info.Substring(0, 1))
// it's defined in the local table if the first character is "<" which starts
// the schema definition string.
if ("<" == Info.Substring(0, 1))
{
name = ParseEleName(Info);
if (name != null)
@@ -2653,8 +2653,36 @@ namespace RODBInterface
}
return GrpCnt;
}
#endregion
public static bool TestConnect(string constring)
//C2026-008 Re-Architect RO.FST to include RO Modification date/time
//Get the Modification Date / Time for the RO
public override string RODB_GetModDateTime(string Recid, string table)
{
using (SqlConnection connection = new SqlConnection(strDatabaseConnectionCommand))
{
connection.Open();
using (SqlCommand command = connection.CreateCommand())
{
command.CommandText = $"SELECT ModDateTime FROM ROALL WHERE RecID = @Value AND ROTable = @table";
command.Parameters.Add(new SqlParameter
{
SqlDbType = SqlDbType.VarChar,
ParameterName = "@Value",
Value = Recid
});
command.Parameters.Add(new SqlParameter
{
SqlDbType = SqlDbType.VarChar,
ParameterName = "@table",
Value = table
});
return command.ExecuteScalar().ToString();
}
}
}
#endregion
public static bool TestConnect(string constring)
{
bool success = false;
using (SqlConnection connection = new SqlConnection(constring))
@@ -96,6 +96,7 @@ using System.IO;
using System.Windows.Forms;
using ROFields;
using VlnStatus;
using System.Text.RegularExpressions;
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
namespace RODBInterface
@@ -517,7 +518,8 @@ namespace RODBInterface
strtmp.Append(" ");
cnt++;
}
if ((cnt + text.Length) > frmt2) // longer than the field length?
text = Regex.Replace(text, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); //B2026-025 Unicode removed from RO menu titles in treeview.
if ((cnt + text.Length) > frmt2) // longer than the field length?
strtmp.Append(text.Substring(0,frmt2-cnt));
else
strtmp.Append(text);
@@ -19,11 +19,6 @@
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
//using ROProfiler; //don't forget to add VlnProfiler to the reference list
namespace VlnStatus
{
@@ -35,11 +30,6 @@ namespace VlnStatus
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label lblBar;
private System.Windows.Forms.Label StatMsg;
// private string strLblLast="";
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public StatusBarFrm()
{
@@ -61,21 +51,6 @@ namespace VlnStatus
Text = StatusBoxTitle;
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
@@ -190,14 +165,6 @@ namespace VlnStatus
{
lblBar.Text = (Math.Round((decimal)(progressBar1.Value * 100) / progressBar1.Maximum)).ToString();
lblBar.Text += "% Complete";
// if( lblBar.Text != strLblLast)
// {
// Profiler.Start("UpdateLabel");
lblBar.Refresh();
// lblBar.Update();
// Profiler.End("UpdateLabel");
// }
// strLblLast = lblBar.Text;
}
public string StatusMessage
@@ -209,10 +176,7 @@ namespace VlnStatus
set
{
StatMsg.Text = value;
// Profiler.Start("StatusMessage");
StatMsg.Refresh();
// StatMsg.Update();
// Profiler.End("StatusMessage");
}
}
@@ -17,12 +17,6 @@
* Added overbounds check
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace VlnStatus
{
/// <summary>
@@ -31,10 +25,6 @@ namespace VlnStatus
public class StatusMessageFrm : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblStatMsg;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public StatusMessageFrm()
{
@@ -54,21 +44,6 @@ namespace VlnStatus
Text = StatTitle;
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
@@ -33,7 +33,7 @@ namespace VlnStatus
/// </summary>
public class VlnStatusBar
{
StatusBarFrm StatBar;
readonly StatusBarFrm StatBar;
private int Cnt;
// Create a status window with the default title of "Status"
@@ -53,8 +53,6 @@ namespace VlnStatus
// Increament the the status bar by the passed in value.
public void PerformStep(int val)
{
// StatBar.Value = val;
// Cnt = val;
BarValue = val;
StatBar.PerformStep();
}
@@ -62,7 +60,6 @@ namespace VlnStatus
// Increament the the status bar by one
public void PerformStep()
{
// StatBar.Value = StatBar.Value + 1;
Cnt++;
BarValue = Cnt;
StatBar.PerformStep();
@@ -13,8 +13,6 @@
* Added overbounds check
*********************************************************************************************/
using System;
namespace VlnStatus
{
/// <summary>
@@ -28,7 +26,7 @@ namespace VlnStatus
/// </summary>
public class VlnStatusMessage
{
StatusMessageFrm StatusMessageBox;
readonly StatusMessageFrm StatusMessageBox;
// Create a status window with the default title of "Status"
public VlnStatusMessage()
@@ -32,7 +32,7 @@ namespace ctlXMLEditLib
public void InsertSymbol( int symbcode)
{
int position = this.SelectionStart;
string sym = string.Format(symbcode < 256 ? "\'{0:X2}" : @"\u{0}", symbcode);
string sym = symbcode < 256 ? ((char)symbcode).ToString() : string.Format(@"\u{0}", symbcode);
this.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
Select(position, -1);
Select(position + 1, 0);
@@ -0,0 +1,8 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Not modifying Naming Styles")]
-3
View File
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RoAccessToSql
+96 -131
View File
@@ -1,16 +1,10 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data.OleDb;
using Volian.Base.Library;
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
@@ -33,25 +27,11 @@ namespace RoAccessToSql
public partial class RoAccessToSql : Form
{
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private string _MSAccessPath = null;
public string MSAccessPath
{
get { return _MSAccessPath; }
set { _MSAccessPath = value; }
}
private string _SqlServerName = null;
public string SqlServerName
{
get { return _SqlServerName; }
set { _SqlServerName = value; }
}
private string _SqlDatabaseName = null;
public string SqlDatabaseName
{
get { return _SqlDatabaseName; }
set { _SqlDatabaseName = value; }
}
bool _Initializing = false;
public string MSAccessPath { get; set; } = null;
public string SqlServerName { get; set; } = null;
public string SqlDatabaseName { get; set; } = null;
readonly bool _Initializing = false;
public RoAccessToSql(string[] args)
{
@@ -66,7 +46,7 @@ namespace RoAccessToSql
}
else if (parm.StartsWith("/sqldb="))
{
SqlDatabaseName = parm.Substring(7) + "_RO";
SqlDatabaseName = $"{parm.Substring(7)}_RO";
}
else if (parm.StartsWith("/server="))
{
@@ -92,7 +72,7 @@ namespace RoAccessToSql
if (UserInRoEditor()) this.Close();
tbSqlDbName.Text = SqlDatabaseName;
_TmpFileForConnectStr = Path.GetTempPath();
_TmpFileForConnectStr = _TmpFileForConnectStr + @"\PromsConnect.txt";
_TmpFileForConnectStr += @"\PromsConnect.txt";
File.Delete(_TmpFileForConnectStr);
_Initializing = false;
}
@@ -100,10 +80,10 @@ namespace RoAccessToSql
private bool UserInRoEditor()
{
FileInfo fiown = null;
FileStream fsown = null;
// The following code was taken from the roeditor. It uses the 'RoEditor.own' file to assure that
// no one is in the roeditor. This file is located in the microsoft access database directory.
try
FileStream fsown;
// The following code was taken from the roeditor. It uses the 'RoEditor.own' file to assure that
// no one is in the roeditor. This file is located in the microsoft access database directory.
try
{
string filename = MSAccessPath + @"\RoEditor.own";
fiown = new FileInfo(filename);
@@ -119,7 +99,7 @@ namespace RoAccessToSql
fsown = fiown.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
TextReader tr1 = new StreamReader(fsown);
string who1 = tr1.ReadToEnd();
MessageBox.Show(ex.Message + "\r\n\r\n" + who1, "RO Editor In Use", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
MessageBox.Show($"{ex.Message}\r\n\r\n{who1}", "RO Editor In Use", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
fsown = fiown.Open(FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite);
TextReader tr = new StreamReader(fsown);
@@ -142,8 +122,8 @@ namespace RoAccessToSql
tw.WriteLine("Current User: {0}, Date and Time Started: {1}", Environment.UserName.ToUpper(), DateTime.Now.ToString("MM/dd/yyyy @ hh:mm"));
tw.Flush();
}
catch (IOException ex)
{
catch (IOException)
{
fsown = fiown.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
TextReader tr = new StreamReader(fsown);
string who = tr.ReadToEnd();
@@ -154,25 +134,20 @@ namespace RoAccessToSql
}
return false;
}
static string _ErrorLogFileName;
public static string ErrorLogFileName
{
get { return _ErrorLogFileName; }
set { _ErrorLogFileName = value; }
}
// make error log file name (uses same logic as proms error log)
static bool ChangeLogFileName(string AppenderName, string NewFilename)
public static string ErrorLogFileName { get; set; }
// make error log file name (uses same logic as proms error log)
static bool ChangeLogFileName(string AppenderName, string NewFilename)
{
log4net.Repository.ILoggerRepository RootRep;
RootRep = log4net.LogManager.GetRepository();
foreach (log4net.Appender.IAppender iApp in RootRep.GetAppenders())
{
if (iApp.Name.CompareTo(AppenderName) == 0
&& iApp is log4net.Appender.FileAppender)
{
log4net.Appender.FileAppender fApp = (log4net.Appender.FileAppender)iApp;
&& iApp is log4net.Appender.FileAppender fApp)
{
string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
fApp.File = folderPath + @"\VEPROMS\" + (Volian.Base.Library.VlnSettings.GetCommand("prefix", "") + "_").TrimStart("_".ToCharArray()) + NewFilename;
fApp.File = $@"{folderPath}\VEPROMS\{($"{Volian.Base.Library.VlnSettings.GetCommand("prefix", "")}_").TrimStart("_".ToCharArray())}{NewFilename}";
ErrorLogFileName = fApp.File;
fApp.ActivateOptions();
return true;
@@ -189,7 +164,7 @@ namespace RoAccessToSql
if (Directory.Exists(fbd.SelectedPath))
tbAccessPath.Text = fbd.SelectedPath;
else
MessageBox.Show("Path doesn't exist " + tbAccessPath.Text);
MessageBox.Show($"Path doesn't exist {tbAccessPath.Text}");
}
}
// Convert the data
@@ -212,7 +187,7 @@ namespace RoAccessToSql
{
DateTime dtSunday = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek));
ChangeLogFileName("LogFileAppender", SqlDatabaseName + " " + dtSunday.ToString("yyyyMMdd") + " ErrorLog.txt");
ChangeLogFileName("LogFileAppender", $"{SqlDatabaseName} {dtSunday:yyyyMMdd} ErrorLog.txt");
_MyLog.InfoFormat("\r\nSession Beginning\r\n<===={0}[SQL:{1:yyMM.ddHH}]====== User: {2}/{3} Started {4} ===============>{5}"
, Application.ProductVersion, RevDate, DateTime.Now, Environment.UserDomainName, Environment.UserName, DateTime.Now.ToString("dddd MMMM d, yyyy h:mm:ss tt"), "");
}
@@ -229,7 +204,7 @@ namespace RoAccessToSql
if (sqlConnection.State == ConnectionState.Open)
{
// now try to open access db:
string strDatabaseConnectionCommand = "Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\";User ID=Admin;Data Source=" + MSAccessPath + "\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
string strDatabaseConnectionCommand = $"Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\";User ID=Admin;Data Source={MSAccessPath}\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
using (OleDbConnection accessConnection = new OleDbConnection(strDatabaseConnectionCommand))
{
try
@@ -251,13 +226,13 @@ namespace RoAccessToSql
}
else
{
_MyLog.Error("SQL Connection is not open. Check connection string: " + tbSqlDbName.Text);
MessageBox.Show("Check connection string: " + tbSqlDbName.Text, "SQL Connection is not open.");
_MyLog.Error($"SQL Connection is not open. Check connection string: {tbSqlDbName.Text}");
MessageBox.Show($"Check connection string: {tbSqlDbName.Text}", "SQL Connection is not open.");
}
}
catch (SqlException ex)
{
_MyLog.Error("SQL Connection is not open. Check connection string: " + tbSqlDbName.Text);
_MyLog.Error($"SQL Connection is not open. Check connection string: {tbSqlDbName.Text}");
MessageBox.Show(ex.Message, "Unknown error when migrating RO data from MS Access to SQL");
}
}
@@ -274,11 +249,10 @@ namespace RoAccessToSql
lastTimeDbs = ProgressBarUpdate(pBarDbs, null, 0, 1, 0, 0, lastTimeDbs, false);
lastTimeRos = ProgressBarUpdate(pBarROs, null, 0, maxCntRo, 0, 0, lastTimeRos, false);
lastTimeDbs = ProgressBarUpdate(pBarDbs, "ROMaster Table", 0, 5, 0, 1, lastTimeDbs, false);
OleDbDataReader reader = null;
OleDbCommand command = new OleDbCommand("select * from ROMaster", accessConnection);
reader = command.ExecuteReader();
// Do access's romaster table first so that the list of other tables to process is found. While doing this, migrate this table's data.
int cntRo = 0;
OleDbCommand command = new OleDbCommand("select * from ROMaster", accessConnection);
OleDbDataReader reader = command.ExecuteReader();
// Do access's romaster table first so that the list of other tables to process is found. While doing this, migrate this table's data.
int cntRo = 0;
int cntDb = 0;
int maxCntDb = 0;
while (reader.Read()) // reading from Access Database
@@ -303,13 +277,12 @@ namespace RoAccessToSql
maxCntDb++;
}
}
lastTimeRos = ProgressBarUpdate(pBarROs, "ROMaster", 0, maxCntRo, maxCntRo, 1, lastTimeRos, true);
ProgressBarUpdate(pBarROs, "ROMaster", 0, maxCntRo, maxCntRo, 1, lastTimeRos, true);
lastTimeDbs = ProgressBarUpdate(pBarDbs, null, 0, maxCntDb, 0, 0, lastTimeDbs, false);
reader.Close();
reader = null;
// now migrate all the tables that were found
foreach (string tableName in allTables)
// now migrate all the tables that were found
foreach (string tableName in allTables)
{
lastTimeRos = DateTime.Now;
cntRo = 0;
@@ -318,7 +291,7 @@ namespace RoAccessToSql
lastTimeRos = ProgressBarUpdate(pBarROs, null, 0, maxCntRo, 0, 0, lastTimeRos, true);
lastTimeDbs = ProgressBarUpdate(pBarDbs, allTablesText[cntDb], 0, maxCntDb, cntDb, 1, lastTimeDbs, false);
command = null;
command = new OleDbCommand("select * from " + tableName, accessConnection);
command = new OleDbCommand($"select * from {tableName}", accessConnection);
reader = command.ExecuteReader();
while (reader.Read()) // read all of the records from the current access table
{
@@ -338,7 +311,7 @@ namespace RoAccessToSql
reader = null;
lastTimeRos = ProgressBarUpdate(pBarROs, tableName, 0, maxCntRo, maxCntRo, 1, lastTimeRos, false);
}
lastTimeDbs = ProgressBarUpdate(pBarDbs, allTablesText[maxCntDb - 1], 0, maxCntDb, maxCntDb, 1, lastTimeDbs, false);
ProgressBarUpdate(pBarDbs, allTablesText[maxCntDb - 1], 0, maxCntDb, maxCntDb, 1, lastTimeDbs, false);
pBarDbs.Text = "Referenced Object Tables Migration Completed";
pBarROs.Text = "Referenced Objects Migration Completed";
btnConvert.Enabled = false;
@@ -357,7 +330,7 @@ namespace RoAccessToSql
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
string strInsert = "INSERT INTO ROMaster (RecID, RecType, ModDateTime, Info) ";
// note that '8' for rectype flags database converted:
strInsert = strInsert + " VALUES ('09999999', 8, '" + dt + "', '" + _SqlConnectStr + "');";
strInsert = $"{strInsert} VALUES ('09999999', 8, '{dt}', '{_SqlConnectStr}');";
OleDbCommand command = new OleDbCommand(strInsert, accessConnection);
reader = command.ExecuteReader();
if (reader.Read()) return;
@@ -367,7 +340,7 @@ namespace RoAccessToSql
MessageBox.Show(e.Message, "Error on insert to flag migration completed");
}
}
private string _TmpFileForConnectStr = null;
private readonly string _TmpFileForConnectStr = null;
private void WriteSqlPathToTempFile()
{
System.IO.File.WriteAllText(_TmpFileForConnectStr, _SqlConnectStr);
@@ -375,13 +348,12 @@ namespace RoAccessToSql
// the following is used to update the progress bars, it finds how many records are in a table.
private int GetRecordCountForTable(string tableName, OleDbConnection accessConnection)
{
OleDbDataReader reader = null;
int retcnt = 100;
int retcnt = 100;
try
{
OleDbCommand command = new OleDbCommand("SELECT COUNT (RecID) as cnt FROM " + tableName, accessConnection);
reader = command.ExecuteReader();
if (reader.Read())
OleDbCommand command = new OleDbCommand($"SELECT COUNT (RecID) as cnt FROM {tableName}", accessConnection);
OleDbDataReader reader = command.ExecuteReader();
if (reader.Read())
{
retcnt = reader.GetInt32(0);
}
@@ -393,7 +365,8 @@ namespace RoAccessToSql
}
return retcnt;
}
DateTime ProgressBarUpdate(DevComponents.DotNetBar.Controls.ProgressBarX pbi, string msg, int min, int max, int progress, int flag, DateTime lastUpdateDisplay, bool doTimeCheck)
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Keeping min for Debugging")]
DateTime ProgressBarUpdate(DevComponents.DotNetBar.Controls.ProgressBarX pbi, string msg, int min, int max, int progress, int flag, DateTime lastUpdateDisplay, bool doTimeCheck)
{
if (flag == 0) // setup
pbi.Maximum = max;
@@ -412,11 +385,13 @@ namespace RoAccessToSql
{
try
{
SqlCommand command = new SqlCommand();
command.Connection = sqlConnection;
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "insertAllRectypes";
command.Parameters.AddWithValue("@RecType", RecType);
SqlCommand command = new SqlCommand
{
Connection = sqlConnection,
CommandType = CommandType.StoredProcedure,
CommandText = "insertAllRectypes"
};
command.Parameters.AddWithValue("@RecType", RecType);
if (AccPageID == null || AccPageID == "")
command.Parameters.AddWithValue("@AccPageID", string.Empty);
else
@@ -428,9 +403,8 @@ namespace RoAccessToSql
command.Parameters.AddWithValue("@ModDateTime", ModDateTime);
using (SqlDataReader reader = command.ExecuteReader())
{
bool success = true;
}
command = null;
}
command = null;
}
catch (Exception ex)
{
@@ -438,32 +412,15 @@ namespace RoAccessToSql
_MyLog.Error(msg, ex);
}
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
// the user selected the button to test the sql connection string
private void btnTestConnect_Click(object sender, EventArgs e)
{
TestConnection(true);
}
// the RevDate & RevDescription are found in a stored procedure, vesp_GetSQLCodeRevision, in the sql database. These get updated each
// time a revision is made to the sql database using ROFixes.sql script.
private static DateTime _RevDate = DateTime.MinValue;
public static DateTime RevDate
{
get { return _RevDate; }
set { _RevDate = value; }
}
private static string _RevDescription = "Unknown";
public static string RevDescription
{
get { return _RevDescription; }
set { _RevDescription = value; }
}
// This is called to test the sql connection, either from the button when pressed by user, or from the convert button, before
// the conversion is done. See below for what is checked
private bool TestConnection(bool notifyUser)
private void btnExit_Click(object sender, EventArgs e) => this.Close();
// the user selected the button to test the sql connection string
private void btnTestConnect_Click(object sender, EventArgs e) => TestConnection(true);
public static DateTime RevDate { get; set; } = DateTime.MinValue;
public static string RevDescription { get; set; } = "Unknown";
// This is called to test the sql connection, either from the button when pressed by user, or from the convert button, before
// the conversion is done. See below for what is checked
private bool TestConnection(bool notifyUser)
{
// The following conditions must be true in order to migrate the ro data to sql. Only the first condition can be
// tested in this executable since the roall database is interfaced to by the roeditor & the program that migrates the data.
@@ -485,12 +442,14 @@ namespace RoAccessToSql
connection.Open();
if (connection.State == ConnectionState.Open)
{
// now see if there is an roall table
SqlCommand command = new SqlCommand();
command.Connection = connection;
command.CommandType = CommandType.Text;
command.CommandText = "(SELECT count(*) FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ROALL]') AND type in (N'U'))";
using (SqlDataReader reader = command.ExecuteReader())
// now see if there is an roall table
SqlCommand command = new SqlCommand
{
Connection = connection,
CommandType = CommandType.Text,
CommandText = "(SELECT count(*) FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ROALL]') AND type in (N'U'))"
};
using (SqlDataReader reader = command.ExecuteReader())
{
if (reader.Read())
{
@@ -509,11 +468,13 @@ namespace RoAccessToSql
{
// now see if there are stored procedures:
command = null; // reset command
command = new SqlCommand();
command.Connection = connection;
command.CommandType = CommandType.Text;
command.CommandText = "(SELECT count(*) FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[deleteByROTable]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)";
using (SqlDataReader reader = command.ExecuteReader())
command = new SqlCommand
{
Connection = connection,
CommandType = CommandType.Text,
CommandText = "(SELECT count(*) FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[deleteByROTable]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)"
};
using (SqlDataReader reader = command.ExecuteReader())
{
if (reader.Read())
{
@@ -533,11 +494,13 @@ namespace RoAccessToSql
{
// now test that the roall table is empty:
command = null; // reset command
command = new SqlCommand();
command.Connection = connection;
command.CommandType = CommandType.Text;
command.CommandText = "SELECT count(*) FROM roall";
using (SqlDataReader reader = command.ExecuteReader())
command = new SqlCommand
{
Connection = connection,
CommandType = CommandType.Text,
CommandText = "SELECT count(*) FROM roall"
};
using (SqlDataReader reader = command.ExecuteReader())
{
if (reader.Read())
{
@@ -557,16 +520,18 @@ namespace RoAccessToSql
{
// now test that the database version is ok
command = null; // reset command
command = new SqlCommand();
command.Connection = connection;
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "vesp_GetSQLCodeRevision";
using (SqlDataReader reader = command.ExecuteReader())
command = new SqlCommand
{
Connection = connection,
CommandType = CommandType.StoredProcedure,
CommandText = "vesp_GetSQLCodeRevision"
};
using (SqlDataReader reader = command.ExecuteReader())
{
if (reader.Read())
{
_RevDate = reader.GetDateTime(0);
_RevDescription = reader.GetString(1);
RevDate = reader.GetDateTime(0);
RevDescription = reader.GetString(1);
dbsuc = true;
}
else
@@ -582,13 +547,13 @@ namespace RoAccessToSql
}
catch (SqlException ex)
{
if (notifyUser) MessageBox.Show("Connection failed: " + ex, "Connection Failed");
if (notifyUser) MessageBox.Show($"Connection failed: {ex}", "Connection Failed");
}
}
}
catch (Exception ex)
{
if (notifyUser) MessageBox.Show("Connection failed: " + ex, "Connection Failed");
if (notifyUser) MessageBox.Show($"Connection failed: {ex}", "Connection Failed");
}
if (notifyUser && success) MessageBox.Show("You have been successfully connected to the database!", "Connection Succeeded");
+1
View File
@@ -66,6 +66,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="RoAccessToSql.cs">
<SubType>Form</SubType>
</Compile>
@@ -0,0 +1,147 @@
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2026 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
-- =============================================
-- Author: Matthew Schill
-- Create date: 03/20/2026
-- Description: Script to consolidate Cover Pages for Barakah
-- by Converting multi-unit procedures with Cover Pages
-- to use 1 Library Document Cover Page
-- =============================================
select Contents.ContentID
, Contenttext = Contents.Text
, Items.ItemID
, tblDocuments.DocID
, ParentContentID
, ParentItemID
, LibTitle = ISNULL(LibTitle,'')
, numLibCP
, numCP
,BaseFlag = 0
INTO #tmpUpdate
from Contents
inner join Entries on Contents.ContentID = Entries.ContentID
inner join tblDocuments on tblDocuments.DocID = Entries.DocID
inner join Items on Items.ContentID = Contents.ContentID
outer apply
(select ParentContentID=ContentID, ParentItemID = PItm.ItemID
FROM dbo.vefn_ParentItems(Items.ItemID) PItm
where PItm.ItemID <> Items.ItemID
) parent
outer apply
(select numLibCP = Count(*)
FROM dbo.vefn_ChildItems(ParentItemID) PItm
INNER JOIN Contents on Contents.ContentID = PItm.ContentID
INNER JOIN Entries on Contents.ContentID = Entries.ContentID
INNER JOIN tblDocuments on tblDocuments.DocID = Entries.DocID
where PItm.ItemID <> ParentItemID
AND Contents.text like 'Cover Page%' and ISNULL(tblDocuments.LibTitle,'') <> ''
) childWithLibTitle
outer apply
(select numCP = Count(*)
FROM dbo.vefn_ChildItems(ParentItemID) PItm
INNER JOIN Contents on Contents.ContentID = PItm.ContentID
where PItm.ItemID <> ParentItemID
AND Contents.text like 'Cover Page%'
) child
where Contents.text like 'Cover Page%'
order by ParentContentID asc, CASE WHEN ISNULL(LibTitle,'') <> '' THEN 1 ELSE 2 END asc, Contents.Text asc
UPDATE #tmpUpdate SET BaseFlag = 1 where LibTitle <> '' and numLibCP = 1
UPDATE #tmpUpdate SET BaseFlag = CASE WHEN tU.LibTitle <> '' THEN 1 ELSE 2 END FROM #tmpUpdate tU
where BaseFlag = 0 AND tU.ContentID IN
(
Select ContentID FROM
(SELECT sub.ContentID,
row_number() OVER(PARTITION BY sub.ParentContentID ORDER BY CASE WHEN ISNULL(sub.LibTitle,'') <> '' THEN 1 ELSE 2 END asc, sub.Contenttext asc) as pos
FROM #tmpUpdate sub
) x
WHERE x.pos = 1
)
declare @Cont TABLE
(
ContentID int,
ItemID int,
xConfig xml
)
insert into @Cont
SELECT tU.ContentID, ItemID, xConfig = CAST(tblContents.config AS xml) FROM
tblContents
INNER JOIN
#tmpUpdate tU ON tU.ContentID = tblContents.ContentID
where tU.BaseFlag > 0
Update @Cont Set xConfig.modify('delete //MasterSlave') From @Cont;
Update tblContents SET Text = 'Cover Page', Config = CAST(xConfig AS varchar(max)),
DTS = GETDATE(), UserID = 'CPVolian2026'
FROM
@Cont CNT INNER JOIN
tblContents ON CNT.ContentID = tblContents.ContentID;
--Update items PreviousIds
UPDATE tblItems Set PreviousID = IdToSwapTO.ItemID
FROM
tblItems
INNER JOIN
#tmpUpdate tU ON tblItems.PreviousID = tU.ItemID AND tU.BaseFlag = 0
INNER JOIN #tmpUpdate IdToSwapTO ON IdToSwapTO.ParentContentID = tU.ParentContentID AND IdToSwapTO.BaseFlag IN (1,2)
UPDATE tblItems Set DeleteStatus = 1, DTS = GETDATE(), UserID = 'CPVolian2026'
FROM
#tmpUpdate tU INNER JOIN
tblItems ON tU.ContentID = tblItems.ContentID
WHERE tU.BaseFlag = 0;
UPDATE tblContents Set DeleteStatus = 1, DTS = GETDATE(), UserID = 'CPVolian2026'
FROM
#tmpUpdate tU INNER JOIN
tblContents ON tU.ContentID = tblContents.ContentID
WHERE tU.BaseFlag = 0;
DELETE FROM
tblEntries
FROM
tblEntries
INNER JOIN
#tmpUpdate tU ON tU.ContentID = tblEntries.ContentID
WHERE tU.BaseFlag in (0,2);
INSERT INTO [dbo].[tblEntries]
([ContentID]
,[DocID]
,[DTS]
,[UserID]
,[DeleteStatus])
SELECT
DISTINCT tU.ContentID,
766, -- docid 766 "Cover Page 1"
GETDATE(),
'CPVolian2026',
0
FROM
#tmpUpdate tU
INNER JOIN
@Cont CNT ON tU.ContentID = CNT.ContentID
WHERE tU.BaseFlag = 2;
drop table #tmpUpdate;
IF (@@Error = 0) SELECT '[Barakah Cover Page Consolidation] Succeeded'
ELSE SELECT '[Barakah Cover Page Consolidation] Error'
go
@@ -0,0 +1,263 @@
-- =============================================
-- Author: Matthew Schill
-- Create date: 03/20/2026
-- Description: Script to consolidate Cover Pages for Barakah
-- by Converting multi-unit procedures with Cover Pages
-- to use 1 Library Document Cover Page
-- =============================================
----@isTest = 0 will change data
----@isTest = 1 for internal testing (no data will be changed)
DECLARE @isTest bit = 1;
----Per Cover Page, pull how many cover pages
----Each Cover Page's procedure has
----and how many of those are library documents
select Contents.ContentID
, Contenttext = Contents.Text
, Items.ItemID
, tblDocuments.DocID
, ParentContentID
, ParentItemID
, LibTitle = ISNULL(LibTitle,'')
, numLibCP
, numCP
,BaseFlag = 0
INTO #tmpUpdate
from Contents
inner join Entries on Contents.ContentID = Entries.ContentID
inner join tblDocuments on tblDocuments.DocID = Entries.DocID
inner join Items on Items.ContentID = Contents.ContentID
outer apply
(select ParentContentID=ContentID, ParentItemID = PItm.ItemID
FROM dbo.vefn_ParentItems(Items.ItemID) PItm
where PItm.ItemID <> Items.ItemID
) parent
outer apply
(select numLibCP = Count(*)
FROM dbo.vefn_ChildItems(ParentItemID) PItm
INNER JOIN Contents on Contents.ContentID = PItm.ContentID
INNER JOIN Entries on Contents.ContentID = Entries.ContentID
INNER JOIN tblDocuments on tblDocuments.DocID = Entries.DocID
where PItm.ItemID <> ParentItemID
AND Contents.text like 'Cover Page%' and ISNULL(tblDocuments.LibTitle,'') <> ''
) childWithLibTitle
outer apply
(select numCP = Count(*)
FROM dbo.vefn_ChildItems(ParentItemID) PItm
INNER JOIN Contents on Contents.ContentID = PItm.ContentID
where PItm.ItemID <> ParentItemID
AND Contents.text like 'Cover Page%'
) child
where Contents.text like 'Cover Page%'
order by ParentContentID asc, CASE WHEN ISNULL(LibTitle,'') <> '' THEN 1 ELSE 2 END asc, Contents.Text asc
--BaseFlag
-- 0 = a Cover Page that will be deleted
-- 1 = is base item (Cover Page will get renamed and applicability set to all)
-- 2 = would be base item but not linked to Lib document (Cover Page will get renamed and applicability set to all + will need linked to library doc)
---- If only 1 Library Doc CP for the CP's procedure and this is it, then mark this CP as the one we will keep
UPDATE #tmpUpdate SET BaseFlag = 1 where LibTitle <> '' and numLibCP = 1
---- If multiple Library Document CPs, pick the first one as the one we will keep (BaseFlag = 1)
---- If no Library Document CPs, pick the first one as the one we will repurpose (BaseFlag = 2)
UPDATE #tmpUpdate SET BaseFlag = CASE WHEN tU.LibTitle <> '' THEN 1 ELSE 2 END FROM #tmpUpdate tU
where BaseFlag = 0 AND tU.ContentID IN
(
Select ContentID FROM
(SELECT sub.ContentID,
row_number() OVER(PARTITION BY sub.ParentContentID ORDER BY CASE WHEN ISNULL(sub.LibTitle,'') <> '' THEN 1 ELSE 2 END asc, sub.Contenttext asc) as pos
FROM #tmpUpdate sub
) x
WHERE x.pos = 1
)
----BEGIN TESTS--
if(@isTest = 1)
BEGIN
select Count(*), 'Should be Zero - not exactly one BaseFlag set to non 0 for each Parent Item' FROM #tmpUpdate TU
OUTER APPLY
(select numBaseFlagSet = SUM(CASE WHEN sub.BaseFlag > 0 THEN 1 ELSE 0 END)
FROM #tmpUpdate sub
where sub.ParentContentID = TU.ParentContentID
) sub
where numBaseFlagSet <> 1
select Count(*), 'Should be Zero - 0 Lib Docs, BaseFlag is 1' FROM #tmpUpdate TU
where numLibCP = 0 and BaseFlag = 1
select Count(*), 'Should be Zero - at least 1 Lib Docs, BaseFlag is 2' FROM #tmpUpdate TU
where numLibCP > 0 and BaseFlag = 2
select Count(*), 'Should be Zero - 1 Lib Docs, BaseFlag not 1 for that Lib doc' FROM #tmpUpdate TU
where numLibCP = 1 and LibTitle <> '' and BaseFlag <> 1
select Count(*), 'Should be Zero - 1 Lib Docs, BaseFlag not 0 for ones without Lib Doc' FROM #tmpUpdate TU
where numLibCP = 1 and LibTitle = '' and BaseFlag <> 0
select Count(*), 'Should be Zero - 1 CP, no Lib Docs, BaseFlag not 2' FROM #tmpUpdate TU
where numLibCP = 0 and numCP = 1 and BaseFlag <> 2
select Count(*), 'Should be Zero - more than 1 Lib Docs, BaseFlag is 1' FROM #tmpUpdate TU
where numLibCP = 0 and BaseFlag = 1
select Count(*), 'Should be Zero - not exactly one BaseFlag set to non 0 for each Parent Item' FROM #tmpUpdate TU
OUTER APPLY
(select numBaseFlagSet = SUM(CASE WHEN sub.BaseFlag > 0 THEN 1 ELSE 0 END)
FROM #tmpUpdate sub
where sub.ParentContentID = TU.ParentContentID
) sub
where numBaseFlagSet <> 1
select Count(*), 'Should be Zero - 0 Lib Docs, BaseFlag is 1' FROM #tmpUpdate TU
where numLibCP = 0
and BaseFlag = 1
--all Parents should have exactly 1 Baseflag=1 or BaseFlage = 2
select 'Should be No Records where not a BaseFlag 1 or 2'
select NumNotBaseFlag12 = Count(*)
FROM #tmpUpdate TU
Group by ParentContentID
HAVING SUM(CASE WHEN BaseFlag in (1,2) THEN 1 ELSE 0 END) <> 1
select 'Should be No Records where with both a BaseFlag 1 and 2'
select NumBothBaseFlag12 = Count(*)
FROM #tmpUpdate TU
Group by ParentContentID
HAVING SUM(BaseFlag) > 2
END
--END TESTS--
--BaseFlag
-- 0 = a Cover Page that will be deleted
-- 1 = is base item (Cover Page will get renamed and applicability set to all)
-- 2 = would be base item but not linked to Lib document (Cover Page will get renamed and applicability set to all + will need linked to library doc)
----Update config for Coverpage 1 to remove <MasterSlave Applicability="1" />
----from that config
----cover page 1s
declare @Cont TABLE
(
ContentID int,
ItemID int,
xConfig xml
)
insert into @Cont
SELECT tU.ContentID, ItemID, xConfig = CAST(tblContents.config AS xml) FROM
tblContents
INNER JOIN
#tmpUpdate tU ON tU.ContentID = tblContents.ContentID
where tU.BaseFlag > 0
if(@isTest = 1)
BEGIN
select WRD='Have Masterslave in xconfig', NumwithMasterSlave = Count(*) FROM @Cont CNT
INNER JOIN
tblContents ON CNT.ContentID = tblContents.ContentID
where CAST(xConfig AS varchar(max)) like '%MasterSlave%'
END
Update @Cont Set xConfig.modify('delete //MasterSlave') From @Cont;
if(@isTest = 1)
BEGIN
select WRD='None should have Masterslave Removed in xconfig', NumwithMasterSlave = Count(*) FROM @Cont CNT
INNER JOIN
tblContents ON CNT.ContentID = tblContents.ContentID
where CAST(xConfig AS varchar(max)) like '%MasterSlave%'
select 'Show Records and how the ids will be re-linked'
Select tblItems.ItemID, tblItems.ContentID, tblItems.PreviousID, tblContents.Text,
PreviousItemID = tU.ItemID, PreviousContentID = tU.ContentID, PreviousText = tUCont.Text,
RelinkToItemID = IdToSwapTO.ItemID, RelinkToContentID = IdToSwapTO.ContentID, RelinkToText = IdToSwapTOCont.Text
FROM
tblItems
INNER JOIN
tblContents on tblContents.ContentID = tblItems.ContentID
INNER JOIN
#tmpUpdate tU ON tblItems.PreviousID = tU.ItemID AND tU.BaseFlag = 0
INNER JOIN
tblContents tUCont on tUCont.ContentID = tU.ContentID
LEFT OUTER JOIN #tmpUpdate IdToSwapTO ON IdToSwapTO.ParentContentID = tU.ParentContentID AND IdToSwapTO.BaseFlag IN (1,2)
LEFT OUTER JOIN tblContents IdToSwapTOCont on IdToSwapTOCont.ContentID = IdToSwapTO.ContentID
END
ELSE
BEGIN
--Update Config for Contents and set Text = 'Cover Page'
Update tblContents SET Text = 'Cover Page', Config = CAST(xConfig AS varchar(max)),
DTS = GETDATE(), UserID = 'CPVolian2026'
FROM
@Cont CNT INNER JOIN
tblContents ON CNT.ContentID = tblContents.ContentID;
--Update items PreviousIds
UPDATE tblItems Set PreviousID = IdToSwapTO.ItemID
FROM
tblItems
INNER JOIN
#tmpUpdate tU ON tblItems.PreviousID = tU.ItemID AND tU.BaseFlag = 0
INNER JOIN #tmpUpdate IdToSwapTO ON IdToSwapTO.ParentContentID = tU.ParentContentID AND IdToSwapTO.BaseFlag IN (1,2)
--delete where BaseFlag = 0 ---Items,Content,Entries, --set DeleteStatus = 1
--these are ones that will be replaced by a library document
UPDATE tblItems Set DeleteStatus = 1, DTS = GETDATE(), UserID = 'CPVolian2026'
FROM
#tmpUpdate tU INNER JOIN
tblItems ON tU.ContentID = tblItems.ContentID
WHERE tU.BaseFlag = 0;
UPDATE tblContents Set DeleteStatus = 1, DTS = GETDATE(), UserID = 'CPVolian2026'
FROM
#tmpUpdate tU INNER JOIN
tblContents ON tU.ContentID = tblContents.ContentID
WHERE tU.BaseFlag = 0;
--delete entries where Baseflag = 2
--create new entries where Baseflag = 2
DELETE FROM
tblEntries
FROM
tblEntries
INNER JOIN
#tmpUpdate tU ON tU.ContentID = tblEntries.ContentID
WHERE tU.BaseFlag in (0,2);
INSERT INTO [dbo].[tblEntries]
([ContentID]
,[DocID]
,[DTS]
,[UserID]
,[DeleteStatus])
SELECT
DISTINCT tU.ContentID,
766, -- docid 766 "Cover Page 1"
GETDATE(),
'CPVolian2026',
0
FROM
#tmpUpdate tU
INNER JOIN
@Cont CNT ON tU.ContentID = CNT.ContentID
WHERE tU.BaseFlag = 2;
END;
drop table #tmpUpdate;
+1 -1
View File
@@ -1817,7 +1817,7 @@ ALTER trigger [dbo].[tr_Contents_Delete] on [dbo].[Contents] instead of delete a
select ii.ContentID,ii.Number,ii.Text,ii.Type,ii.FormatID,ii.Config,ii.DTS,ii.UserID,ii.DeleteStatus,ii.ActionDTS
from tblContents ii inner join deleted dd on dd.ContentID = ii.ContentID
where ii.DeleteStatus > 0
update ga set ga.contentauditid = (select max(auditid) from contentaudits where contentid = ga.contentid and deletestatus = ga.deletestatus)
update ga set ga.contentauditid = (select ISNULL(max(auditid),0) from contentaudits where contentid = ga.contentid and deletestatus = ga.deletestatus)
from gridaudits ga join deleted dd on ga.contentid = dd.contentid where ga.contentauditid = 0
end
go
+34 -129
View File
@@ -1,7 +1,4 @@
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace Accentra.Controls
@@ -11,11 +8,6 @@ namespace Accentra.Controls
/// </summary>
public class TablePicker : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public TablePicker()
{
// Activates double buffering
@@ -29,21 +21,6 @@ namespace Accentra.Controls
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
@@ -75,82 +52,41 @@ namespace Accentra.Controls
}
#endregion
private Pen BeigePen = new Pen(Color.Beige, 1);
private Brush BeigeBrush = System.Drawing.Brushes.Beige;
private Brush GrayBrush = System.Drawing.Brushes.Gray;
private Brush BlackBrush = System.Drawing.Brushes.Black;
private Brush WhiteBrush = System.Drawing.Brushes.White;
private readonly Brush BlackBrush = System.Drawing.Brushes.Black;
private readonly Brush WhiteBrush = System.Drawing.Brushes.White;
private Brush Jbrush = System.Drawing.Brushes.LightBlue;
//private Brush Jbrush = System.Drawing.Brushes.LightSteelBlue;
//private Brush Jbrush = System.Drawing.Brushes.SteelBlue;
//private Brush Jbrush = System.Drawing.Brushes.PowderBlue;
private readonly Brush Jbrush = System.Drawing.Brushes.LightBlue;
private Pen BorderPen = new Pen(SystemColors.ControlDark);
private Pen BluePen = new Pen(Color.SlateGray, 1);
private readonly Pen BorderPen = new Pen(SystemColors.ControlDark);
private readonly Pen BluePen = new Pen(Color.SlateGray, 1);
private string DispText = "Esc to Cancel"; // Display text
private int DispHeight = 40;//20; // Display ("Table 1x1", "Cancel")
private Font DispFont = new Font("Tahoma", 8.25F);
private int SquareX = 20; // Width of squares
private int SquareY = 20; // Height of squares
private readonly int DispHeight = 40; // Display ("Table 1x1", "Cancel")
private readonly Font DispFont = new Font("Tahoma", 8.25F);
private readonly int SquareX = 20; // Width of squares
private readonly int SquareY = 20; // Height of squares
private int SquareQX = 3; // Number of visible squares (X)
private int SquareQY = 3; // Number of visible squares (Y)
private int SelQX = 1; // Number of selected squares (x)
private int SelQY = 1; // Number of selected squares (y)
private bool bHiding = false;
private bool bCancel = true; // Determines whether to Cancel
public int MaxRows { get; set; } = -1;
// Added my Volian 4/27/11
private int _MaxRows = -1;
public int MaxCols { get; set; } = -1;
public int MaxRows
{
get { return _MaxRows; }
set { _MaxRows = value; }
}
private int _MaxCols = -1;
/// <summary>
/// Returns the number of columns, or the horizontal / X count,
/// of the selection.
/// </summary>
public int SelectedColumns => SelQX;
public int MaxCols
{
get { return _MaxCols; }
set { _MaxCols = value; }
}
/// <summary>
/// Returns the number of rows, or the vertical / Y count,
/// of the selection.
/// </summary>
public int SelectedRows => SelQY;
/// <summary>
/// Similar to <code><see cref="DialogResult"/>
/// == <see cref="DialogResult.Cancel"/></code>,
/// but is used as a state value before the form
/// is hidden and cancellation is finalized.
/// </summary>
public bool Cancel {
get {
return bCancel;
}
}
/// <summary>
/// Returns the number of columns, or the horizontal / X count,
/// of the selection.
/// </summary>
public int SelectedColumns {
get {
return SelQX;
}
}
/// <summary>
/// Returns the number of rows, or the vertical / Y count,
/// of the selection.
/// </summary>
public int SelectedRows {
get {
return SelQY;
}
}
private void TablePicker_Paint(object sender, System.Windows.Forms.PaintEventArgs e) {
private void TablePicker_Paint(object sender, System.Windows.Forms.PaintEventArgs e) {
Graphics g = e.Graphics;
// First, increment the number of visible squares if the
@@ -162,8 +98,8 @@ namespace Accentra.Controls
if (SquareQX < 7) SquareQX = 7;
if (SquareQY < 5) SquareQY = 5;
if (_MaxRows > 0 && SquareQY > _MaxRows) SquareQY = _MaxRows;
if (_MaxCols > 0 && SquareQX > _MaxCols) SquareQX = _MaxCols;
if (MaxRows > 0 && SquareQY > MaxRows) SquareQY = MaxRows;
if (MaxCols > 0 && SquareQX > MaxCols) SquareQX = MaxCols;
// Second, expand the dimensions of this form according to the
// number of visible squares.
@@ -177,14 +113,7 @@ namespace Accentra.Controls
// the text is left-justified, only the Y (vertical) position
// is calculated.
int dispY = ((SquareY - 1) * SquareQY) + SquareQY + 4;
//if (this.Cancel) {
// DispText = "Esc Key to Cancel";
//} else {
// DispText = SelQX.ToString() + " by " + SelQY.ToString() + " Table";
//}
//DispText = SelQX.ToString() + " by " + SelQY.ToString() + " Table\nEsc Key to Cancel";
//DispText = SelQY.ToString() + " Row"+((SelQY>1)?"s by ":" by ") + SelQX.ToString() + " Column"+((SelQX>1)?"s\nEsc Key to Cancel":"\nEsc Key to Cancel");
DispText = SelQY.ToString() + " Row" + ((SelQY > 1) ? "s" : "") + " " + SelQX.ToString() + " Column" + ((SelQX > 1) ? "s" : "")+ "\nEsc to Cancel";
DispText = $"{SelQY} Row{((SelQY > 1) ? "s" : "")} {SelQX} Column{((SelQX > 1) ? "s" : "")}\nEsc to Cancel";
g.DrawString(DispText, DispFont, BlackBrush, 3, dispY + 2);
// Draw each of the squares and fill with the default color.
@@ -198,7 +127,6 @@ namespace Accentra.Controls
// Go back and paint the squares with selection colors.
for (int x=0; x<SelQX; x++) {
for (int y=0; y<SelQY; y++) {
//g.FillRectangle(BeigeBrush, (x*SquareX) + 3, (y*SquareY) + 3, SquareX - 2, SquareY - 2);
g.FillRectangle(Jbrush, (x * SquareX) + 3, (y * SquareY) + 3, SquareX - 2, SquareY - 2);
g.DrawRectangle(BluePen, (x * SquareX) + 3, (y * SquareY) + 3, SquareX - 2, SquareY - 2);
}
@@ -210,11 +138,6 @@ namespace Accentra.Controls
/// </summary>
private void TablePicker_Deactivate(object sender, System.EventArgs e) {
// bCancel = true
// and DialogResult = DialogResult.Cancel
// were previously already set in MouseLeave.
//this.Hide();
}
/// <summary>
@@ -242,42 +165,24 @@ namespace Accentra.Controls
/// escaped (canceling) state.
/// </summary>
private void TablePicker_MouseLeave(object sender, System.EventArgs e) {
//if (!bHiding) bCancel = true;
//this.DialogResult = DialogResult.Cancel;
//this.Invalidate();
if (this.DialogResult == DialogResult.None)
this.DialogResult = DialogResult.Cancel;
}
/// <summary>
/// Cancels the prior cancellation caused by MouseLeave.
/// </summary>
private void TablePicker_MouseEnter(object sender, System.EventArgs e) {
//bHiding = false;
//bCancel = false;
//this.DialogResult = DialogResult.OK;
this.Invalidate();
}
/// <summary>
/// Cancels the prior cancellation caused by MouseLeave.
/// </summary>
private void TablePicker_MouseEnter(object sender, System.EventArgs e) => this.Invalidate();
/// <summary>
/// Detects that the user made a selection by clicking.
/// </summary>
private void TablePicker_Click(object sender, System.EventArgs e) {
//bHiding = true; // Not the same as Visible == false
// // because bHiding suggests that the control
// // is still "active" (not canceled).
//this.Hide();
this.DialogResult = DialogResult.OK;
}
/// <summary>
/// Detects that the user made a selection by clicking.
/// </summary>
private void TablePicker_Click(object sender, System.EventArgs e) => this.DialogResult = DialogResult.OK;
private void TablePicker_KeyPress(object sender, KeyPressEventArgs e)
private void TablePicker_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Escape)
{
//bHiding = true; // Not the same as Visible == false
//// because bHiding suggests that the control
//// is still "active" (not canceled).
//this.Hide();
this.DialogResult = DialogResult.Cancel;
}
}
+25 -51
View File
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;
using Volian.Controls.Library;
@@ -24,7 +21,7 @@ namespace VEPROMS
string connectionString = Database.VEPROMS_Connection;
Match mServer = Regex.Match(connectionString, ".*Data Source=([^;]*).*");
_SQLServerName = (mServer.Success) ? mServer.Groups[1].Value : "unknown";
if (_SQLServerName.StartsWith(@".\")) _SQLServerName = @"Local \ " + _SQLServerName.Substring(2);
if (_SQLServerName.StartsWith(@".\")) _SQLServerName = $@"Local \ {_SQLServerName.Substring(2)}";
}
return _SQLServerName;
}
@@ -37,7 +34,7 @@ namespace VEPROMS
{
if (_DatabaseName == null)
{
_DatabaseName = string.Format("{0}[SQL:{1:yyMM.ddHH}]", Database.ActiveDatabase, Database.RevDate);
_DatabaseName = $"{Database.ActiveDatabase}[SQL:{Database.RevDate:yyMM.ddHH}]";
}
return _DatabaseName;
}
@@ -55,26 +52,16 @@ namespace VEPROMS
DateTime buildDateTime = new System.IO.FileInfo(Assembly.GetExecutingAssembly().Location).LastWriteTime;
// If the AssemblyConfiguration is "DEMO" then we are running a Demo version
string demoTxt = VlnSettings.DemoMode ? "(Demo)": VlnSettings.DebugMode ? "(Debug)" : "(Production)";
// C2018-015 made this information static so we can use in meta files
//string connectionString = Database.VEPROMS_Connection;
//Match mServer = Regex.Match(connectionString,".*Data Source=([^;]*).*");
//string server = (mServer.Success)?mServer.Groups[1].Value:"unknown";
//if (server.StartsWith(@".\")) server = @"Local \ " + server.Substring(2);
//string databaseName = string.Format("{0}[SQL:{1:yyMM.ddHH}]", Database.ActiveDatabase, Database.RevDate);
this.Text = String.Format("About {0}", AssemblyTitle + " " + demoTxt);
this.labelProductName.Text = AssemblyProduct;
this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
this.labelVersionDateTime.Text = String.Format("Build Date: {0}", buildDateTime.ToString());
this.labelCopyright.Text = String.Format("Copyright © {0}. All Rights Reserved.", buildDateTime.Year.ToString());
this.labelCompanyName.Text = AssemblyCompany;
// this.textBoxDescription.Text = AssemblyDescription;
this.labelCompanyName.Links[0].LinkData = "Volian Enterprises Inc.";
this.labelCompanyName.Links.Add(0,23,"www.volian.com");
//this.labelServer.Text = string.Format("SQL Server: {0}", server);
this.labelServer.Text = string.Format("SQL Server: {0}", SQLServerName); // C2018-015 use static for this info.
//if (databaseName == null) databaseName = Regex.Replace(connectionString, "^.*Initial Catalog=([^;]*);.*$", "$1", RegexOptions.IgnoreCase);
//this.labelDatabase.Text = string.Format("Database: {0}", databaseName);
this.labelDatabase.Text = string.Format("Database: {0}", DatabaseName); // C2018-015 use static for this info.
Text = $"About {AssemblyTitle} {demoTxt}";
labelProductName.Text = AssemblyProduct;
labelVersion.Text = $"Version {AssemblyVersion}";
labelVersionDateTime.Text = $"Build Date: {buildDateTime}";
labelCopyright.Text = $"Copyright © {buildDateTime.Year}. All Rights Reserved.";
labelCompanyName.Text = AssemblyCompany;
labelCompanyName.Links[0].LinkData = "Volian Enterprises Inc.";
labelCompanyName.Links.Add(0,23,"www.volian.com");
labelServer.Text = $"SQL Server: {SQLServerName}"; // C2018-015 use static for this info.
labelDatabase.Text = $"Database: {DatabaseName}"; // C2018-015 use static for this info.
}
#region Assembly Attribute Accessors
@@ -99,24 +86,12 @@ namespace VEPROMS
}
}
public string AssemblyVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
public string AssemblyVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
// C2018-009 used to print the PROMS version number at the top of each PDF page
public static string PROMSVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
// C2018-009 used to print the PROMS version number at the top of each PDF page
public static string PROMSVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
public string AssemblyDescription
public string AssemblyDescription
{
get
{
@@ -162,7 +137,7 @@ namespace VEPROMS
private void labelCompanyName_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
// Determine which link was clicked within the LinkLabel.
this.labelCompanyName.Links[0].Visited = true;
labelCompanyName.Links[0].Visited = true;
// Display the appropriate link based on the value of the
// LinkData property of the Link object.
@@ -171,18 +146,17 @@ namespace VEPROMS
System.Diagnostics.Process.Start(target); // this should start the default web browser
}
private void logoPictureBox_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(labelCompanyName.Links[0].LinkData as string); // this should start the default web browser
}
private void logoPictureBox_Click(object sender, EventArgs e) => System.Diagnostics.Process.Start(labelCompanyName.Links[0].LinkData as string); // this should start the default web browser
private void btnViewEULA_Click(object sender, EventArgs e)
private void btnViewEULA_Click(object sender, EventArgs e)
{
string EulaFile = string.Format(@"\{0}", VlnSettings.EULAfile);
string EulaFile = $@"\{VlnSettings.EULAfile}";
string strEULA = System.Environment.CurrentDirectory + EulaFile;
frmViewTextFile ViewFile = new frmViewTextFile(strEULA,RichTextBoxStreamType.PlainText);
ViewFile.Text = "End-User License Agreement";
ViewFile.ShowDialog();
frmViewTextFile ViewFile = new frmViewTextFile(strEULA, RichTextBoxStreamType.PlainText)
{
Text = "End-User License Agreement"
};
ViewFile.ShowDialog();
}
}
-34
View File
@@ -1,34 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using VEPROMS.CSLA.Library;
namespace VEPROMS
{
public class BookMarks
{
public string Name;
public VETreeNode Node;
public BookMarks()
{
}
public BookMarks(string n, VETreeNode o)
{
Name = n;
Node = o;
}
public BookMarks(VETreeNode o)
{
Name = o.Text;
Node = o;
}
public override string ToString()
{
return Name;
}
}
}
@@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
@@ -14,10 +9,7 @@ namespace VEPROMS
// C2025-027 Annotation Type Filtering
public partial class dlgAnnotationsSelect : Form
{
public dlgAnnotationsSelect()
{
InitializeComponent();
}
public dlgAnnotationsSelect() => InitializeComponent();
public dlgAnnotationsSelect(string userid)
{
@@ -25,30 +17,13 @@ namespace VEPROMS
UserID = userid;
}
private int _MyItemID;
public int MyItemID
{
get { return _MyItemID; }
set { _MyItemID = value; }
}
public int MyItemID { get; set; }
public string UserID { get; set; }
private string _UserID;
public string UserID
{
get { return _UserID; }
set { _UserID = value; }
}
private void btnSelect_Click(object sender, EventArgs e)
{
MoveSelectedItems(lstUnselected, lstSelected);
}
private void btnSelect_Click(object sender, EventArgs e) => MoveSelectedItems(lstUnselected, lstSelected);
// Move selected items to lstUnselected.
private void btnDeselect_Click(object sender, EventArgs e)
{
MoveSelectedItems(lstSelected, lstUnselected);
}
private void btnDeselect_Click(object sender, EventArgs e) => MoveSelectedItems(lstSelected, lstUnselected);
// Move selected items from one ListBox to another.
private void MoveSelectedItems(ListBox lstFrom, ListBox lstTo)
@@ -90,39 +65,21 @@ namespace VEPROMS
}
// Enable and disable buttons.
private void lst_SelectedIndexChanged(object sender, EventArgs e)
{
SetButtonsEditable();
}
private void lst_SelectedIndexChanged(object sender, EventArgs e) => SetButtonsEditable();
// Save selected list to DB.
private void btnUpdate_Click(object sender, EventArgs e)
{
saveChanges();
}
private void btnUpdate_Click(object sender, EventArgs e) => saveChanges();
public class AnnotataionItem
{
private string _NameStr;
private int _TypeID;
private readonly string _NameStr;
private readonly int _TypeID;
public AnnotataionItem(string NameStr, int TypeID)
{
this._NameStr = NameStr;
this._TypeID = TypeID;
}
public string NameStr
{
get
{
return _NameStr;
}
}
public int TypeID
{
get
{
return _TypeID;
}
_NameStr = NameStr;
_TypeID = TypeID;
}
public string NameStr => _NameStr;
public int TypeID => _TypeID;
}
// Enable and disable buttons.
@@ -167,16 +124,16 @@ namespace VEPROMS
if (result == DialogResult.Yes)
{
saveChanges();
this.Close();
Close();
}
else
{
this.Close();
Close();
}
}
else
{
this.Close();
Close();
}
}
@@ -1,12 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace VEPROMS
{
@@ -16,19 +8,10 @@ namespace VEPROMS
{
private bool _Cancel = true;
public bool Cancel
{
get { return _Cancel; }
}
public bool Cancel => _Cancel;
private bool _ExitPROMS;
public bool ExitPROMS
{
get { return _ExitPROMS; }
set { _ExitPROMS = value; }
}
public DlgCloseTabsOrExit(bool isMainWindow, bool hasChildWindows)
public bool ExitPROMS { get; set; }
public DlgCloseTabsOrExit(bool isMainWindow, bool hasChildWindows)
{
InitializeComponent();
if (!isMainWindow)
@@ -46,22 +29,22 @@ namespace VEPROMS
private void BtnClsTab_Click(object sender, EventArgs e)
{
_Cancel = false;
_ExitPROMS = false;
this.Hide();
ExitPROMS = false;
Hide();
}
private void BtnExitPROMS_Click(object sender, EventArgs e)
{
_Cancel = false;
_ExitPROMS = true;
this.Hide();
ExitPROMS = true;
Hide();
}
private void btnCancel_Click(object sender, EventArgs e)
{
_Cancel = true;
_ExitPROMS = false;
this.Hide();
ExitPROMS = false;
Hide();
}
}
}
+101 -240
View File
@@ -1,29 +1,21 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using VEPROMS.CSLA.Library;
using Volian.Print.Library;
//using Volian.Controls.Library;
using Volian.Base.Library;
using JR.Utils.GUI.Forms;
using System.Linq;
namespace VEPROMS
{
public partial class DlgPrintProcedure : DevComponents.DotNetBar.Office2007Form
{
public bool SaveLinks
{
get
{
return swtbtnPDFLinks.Value;
}
}
public int RemoveTrailingHardReturnsAndManualPageBreaks
public bool SaveLinks => swtbtnPDFLinks.Value;
public int RemoveTrailingHardReturnsAndManualPageBreaks
{
get
{
@@ -36,38 +28,19 @@ namespace VEPROMS
return 3;
}
}
private string _Prefix = ""; // RHM20150506 Multiline ItemID TextBox
public string Prefix
{
get { return _Prefix; }
set { _Prefix = value; }
}
public bool OpenAfterCreate // RHM20150506 Multiline ItemID TextBox
// RHM20150506 Multiline ItemID TextBox
public string Prefix { get; set; } = "";
public bool OpenAfterCreate // RHM20150506 Multiline ItemID TextBox
{
get { return cbxOpenAfterCreate2.Checked; }
set { cbxOpenAfterCreate2.Checked = value; }
}
private SessionInfo _MySessionInfo;
public SessionInfo MySessionInfo
{
get { return _MySessionInfo; }
set { _MySessionInfo = value; }
}
private bool _Automatic;
public bool Automatic
{
get { return _Automatic; }
set { _Automatic = value; }
}
private int _prtSectID = -1;
public int PrtSectID
{
get { return _prtSectID; }
set { _prtSectID = value; }
}
private bool _OverwritePDF;
public bool OverwritePDF
public SessionInfo MySessionInfo { get; set; }
public bool Automatic { get; set; }
public int PrtSectID { get; set; } = -1;
public bool OverwritePDF
{
get { return cbxOverwritePDF2.Checked; }
set { cbxOverwritePDF2.Checked = value; }
@@ -85,18 +58,17 @@ namespace VEPROMS
swtbtnPDFdtPrefixSuffix.Value = swtbtnPDFdtPrefixSuffix.Enabled = _AllowDateTimePrefixSuffix;
}
}
private DateTime _PrefixSuffixDTS = DateTime.Now; // C2018-033 date/time used for the date/time PDF file prefix and suffix
private readonly DateTime _PrefixSuffixDTS = DateTime.Now; // C2018-033 date/time used for the date/time PDF file prefix and suffix
private bool _DateTimePrefixSuffixPrintingAllProcedures = true; // C2018-033 to control adding the Date/Time Prefix/Suffix to PFD name when printing All procedures
private bool _IncludeWordSecTextInMetafile = true; // C2018-023 so that we can turn off including Word attachment text in metafile
private void RunAutomatic()
{
cbxDebugPagination.Checked = true;
cbxDebugText.Checked = true;
cbxMetaFile.Checked = true; // C2018-004 create meta file for baseline compares
cbxMetaFile.Checked = true; // C2018-004 create meta file for baseline compares
_IncludeWordSecTextInMetafile = true;
Application.DoEvents();
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
bool ranAuto = false;
foreach (string parameter in parameters)
{
if (parameter.ToUpper() == "/NT")
@@ -111,11 +83,11 @@ namespace VEPROMS
_IncludeWordSecTextInMetafile = false; // C2018-023 turn off putting Word attachment text in the meta file for baseline compares
}
CreatePDFs();
this.Close();
Close();
}
private DocVersionInfo _DocVersionInfo = null;
private bool _AllProcedures;
private DocVersionConfig _DocVersionConfig;
private readonly DocVersionInfo _DocVersionInfo = null;
private readonly bool _AllProcedures;
private readonly DocVersionConfig _DocVersionConfig;
public string RevNum
{
get { return txbRevNum.Text; }
@@ -143,11 +115,8 @@ namespace VEPROMS
return RevNum + "/" + RevDate;
}
}
public string ProcNum
{
get { return MyProcedure.DisplayNumber; }
}
public string PDFPath
public string ProcNum => MyProcedure.DisplayNumber;
public string PDFPath
{
get {// B2018-069 Revert to Temporary for Baseline testing
if (PromsPrinter.BaselineTesting)
@@ -179,7 +148,7 @@ namespace VEPROMS
private bool _CreateButtonClicked = false; // B2020-062 control the toggle of date/time prefix/suffix on pdf file name
public DlgPrintProcedure(DocVersionInfo dvi, bool automatic)
{
_Automatic = automatic;
Automatic = automatic;
InitializeComponent();
_AllProcedures = true;
_DocVersionConfig = dvi.DocVersionConfig;
@@ -201,14 +170,12 @@ namespace VEPROMS
btnCreatePDF.Text = "Create PDFs";
HandleDocVersionSettings();
PrepForAllOrOne(false);
// don't open all PDFs if doing All Procedures
//cbxOpenAfterCreate2.Checked = dvi.DocVersionConfig.Print_AlwaysViewPDFAfterCreate;
// C2018-033 added the Prefix / Suffix switch to the expand Additional Settings check
expPrnSetting.Expanded = swtbtnBlankPgsForDuplex.Value || swtbtnChgBar.Value || swtbtnGeneratePlacekeeper.Value || swtbtnPDFLinks.Value || swtbtnPROMSVersion.Value || swtbtnWaterMark.Value || swtbtnPDFdtPrefixSuffix.Value;
}
public DlgPrintProcedure(DocVersionInfo dvi)
{
_Automatic = false;
Automatic = false;
InitializeComponent();
_AllProcedures = true;
_DocVersionConfig = dvi.DocVersionConfig;
@@ -249,21 +216,12 @@ namespace VEPROMS
// C2021-063 make the Generate Alarm Point List text checkbox visable in the format flag is set.
cbxAlmPtTxt.Visible = !oneProcedure && MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.ChkBoxToGeneratePointListText;
}
private string _UnitNumber;
public string UnitNumber
{
get { return _UnitNumber; }
set { _UnitNumber = value; }
}
private int _UnitIndex;
public int UnitIndex
{
get { return _UnitIndex; }
set { _UnitIndex = value; }
}
// C2018-012 - Code Cleanup - redesigned the Print Dialog to include a sliding panel and remplaced check boxes with ON/OFF switches
public DlgPrintProcedure(ProcedureInfo pi)
public string UnitNumber { get; set; }
public int UnitIndex { get; set; }
// C2018-012 - Code Cleanup - redesigned the Print Dialog to include a sliding panel and remplaced check boxes with ON/OFF switches
public DlgPrintProcedure(ProcedureInfo pi)
{
InitializeComponent();
_AllProcedures = false;
@@ -354,31 +312,9 @@ namespace VEPROMS
swtbtnWaterMark.Value = false;
else
swtbtnWaterMark.Value = true;
// Auto Duplexing on/off - Auto duplex was used only by Point Beach formats These buttons were removed from the dialog
// There was not print coding to support this format flag
//if ((_MyProcedure.ActiveParent as DocVersionInfo).ActiveFormat.PlantFormat.FormatData.PrintData.AllowDuplex)
//{
// lblAutoDuplexing.Visible = true;
// btnDuplxOff.Visible = true;
// btnDuplxOn.Visible = true;
// if (_DocVersionConfig.Print_DisableDuplex)
// btnDuplxOff.PerformClick();
// else
// btnDuplxOn.PerformClick();
//}
//else
//{
// lblAutoDuplexing.Visible = false;
// btnDuplxOff.Visible = false;
// btnDuplxOn.Visible = false;
//}
SetCompareVisibility();
// default to using OriginalPageBreaks (16bit page breaks) if App.config is set
// to true:
//cbxOrPgBrk.Visible = VlnSettings.OriginalPageBreak && VlnSettings.DebugMode;
cbxOrPgBrk.Visible = false; //per Harry
cbxOrPgBrk.Visible = false; //per Harry
cbxOrPgBrk.Checked = false;
}
@@ -416,13 +352,7 @@ namespace VEPROMS
private Timer _MyTimer;
public void SetupForProcedure() // RHM20150506 Multiline ItemID TextBox
{
if(_DocVersionInfo == null)this.Text = "Create PDF for " + ProcNum;
// get list of previous pdf files
// if no previous pdf file, then get path from frmVersionProperties
// dlgSelectFile.InitialDirectory = pdf path from frmVersionProperties
//cbxPDF.Text = string.Format(@"{0}\{1}.pdf", _PDFPath, _ProcNum);
// General 2 settings
//txbPDFLocation.Text = _PDFPath;
if(_DocVersionInfo == null)Text = "Create PDF for " + ProcNum;
BuildPDFFileName();
ProcedureConfig pc = _MyProcedure.MyConfig as ProcedureConfig;
// C2025-033 set which Child procedure is being printed used for PageStyle items
@@ -434,7 +364,7 @@ namespace VEPROMS
if (pc != null)
{
//C2021-062 use the save rev number for all procedures if set, or just use the rev number in the current procedure config
RevNum = (_NewRevForAllProcs == null) ? pc.Print_Rev : _NewRevForAllProcs;
RevNum = _NewRevForAllProcs ?? pc.Print_Rev;
RevDate = pc.Print_RevDate; //== null || pc.Print_RevDate=="" ? DateTime.Today : Convert.ToDateTime(pc.Print_RevDate);
ReviewDate = pc.Print_ReviewDate; // == null ? DateTime.Today : Convert.ToDateTime(pc.Print_ReviewDate);
//Now check the format flags to determine if/how the Rev string should be parsed.
@@ -498,11 +428,6 @@ namespace VEPROMS
else
swtbtnWaterMark.Value = false; // set to None at folder level so set Watermark switch to the off position
//ppCmbxChgBarPos.DataSource = EnumDetail<PrintChangeBarLoc>.Details();
//ppCmbxChgBarPos.DisplayMember = "Description";
//ppCmbxChgBarPos.ValueMember = "EValue";
//ppCmbxChgBarPos.SelectedIndex = (int)MyProcedure.MyDocVersion.DocVersionConfig.Print_ChangeBarLoc;
ppCmbxChgBarTxtType.DataSource = EnumDetail<PrintChangeBarText>.Details();
ppCmbxChgBarTxtType.DisplayMember = "Description";
ppCmbxChgBarTxtType.ValueMember = "EValue";
@@ -515,7 +440,7 @@ namespace VEPROMS
bool usesRevDate = _MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.DoRevDate || _MyProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash;
if (_MyProcedure.Sections != null)
{
foreach (SectionInfo mysection in _MyProcedure.Sections)
foreach (SectionInfo mysection in _MyProcedure.Sections.OfType<SectionInfo>())
hasReviewDate |= mysection.ActiveFormat.PlantFormat.HasPageListToken("{REVIEWDATE}");
}
// Only the New HLP format and the MYA format use this
@@ -535,9 +460,8 @@ namespace VEPROMS
if (MyProcedure == null) return;
string PDFFilePrefix = _DocVersionConfig.Print_PDFFilePrefix;
string PDFFileSuffix = _DocVersionConfig.Print_PDFFileSuffix;
string PDFFileName = "";
PDFDTPrefix dtPre = _DocVersionConfig.Print_PDFdtFilePrefix;
PDFDTSuffix dtSuf = _DocVersionConfig.Print_PDFdtFileSuffix;
PDFDTPrefix dtPre = _DocVersionConfig.Print_PDFdtFilePrefix;
PDFDTSuffix dtSuf = _DocVersionConfig.Print_PDFdtFileSuffix;
if (dtPre != PDFDTPrefix.None) PDFFilePrefix = ""; // incase user entered prefix text but then selected a date/time (in working draft properties)
if (dtSuf != PDFDTSuffix.None) PDFFileSuffix = ""; // incase user entered suffix text but then selected a date/time (in working draft properties)
// B2020-062 control the toggle of date/time prefix/suffix on pdf file name
@@ -556,19 +480,17 @@ namespace VEPROMS
if (dtSuf != PDFDTSuffix.None)
PDFFileSuffix = "_" + (_PrefixSuffixDTS.ToString(dtSuf.ToString())).Replace("__", " ").Replace("_", "-");
}
if (ProcNum == string.Empty)
//txbPDFName.Text = this.UnitNumber + ".pdf";
PDFFileName = this.UnitNumber;
else
//txbPDFName.Text = string.Format("{0}.pdf", _MyProcedure.PDFNumber);
PDFFileName = string.Format("{0}", _MyProcedure.PDFNumber);
//if (txbPDFName.Text.StartsWith("*"))
// txbPDFName.Text = txbPDFName.Text.Replace("*", this.UnitNumber);
if ((PDFFileName ?? "") == "") PDFFileName = "NoProcNumber";
string PDFFileName;
if (ProcNum == string.Empty)
PDFFileName = UnitNumber;
else
PDFFileName = string.Format("{0}", _MyProcedure.PDFNumber);
if ((PDFFileName ?? "") == "") PDFFileName = "NoProcNumber";
if (PDFFileName.StartsWith("*"))
PDFFileName = PDFFileName.Replace("*", this.UnitNumber);
PDFFileName = PDFFileName.Replace("*", UnitNumber);
if (PDFFileName.Contains("?")) PDFFileName = PDFFileName.Replace("?", "_"); // for wcn sys/BM-2xxA??, etc
txbPDFName.Text = PDFFilePrefix + PDFFileName + PDFFileSuffix + ".pdf";
txbPDFName.Text = $"{PDFFilePrefix}{PDFFileName}{PDFFileSuffix}.pdf";
}
// C2018-033 Enable/disable the switch to control whether to add Prefix and/or Suffix to PDF file name
@@ -585,12 +507,9 @@ namespace VEPROMS
swtbtnPDFdtPrefixSuffix.Enabled = hasPrefixSuffix;
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnCancel_Click(object sender, EventArgs e) => Close();
private void swtbtnChgBar_ValueChanged(object sender, EventArgs e)
private void swtbtnChgBar_ValueChanged(object sender, EventArgs e)
{
// C2019-031 - disable the override change bar grouping when default change bar is set to format default or no change bar
cbxOvrrideDefChgBars.Checked = false; // uncheck the override change bar check box inside the grouping
@@ -714,7 +633,7 @@ namespace VEPROMS
StringBuilder sb = new StringBuilder();
if (MySessionInfo != null)
{
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures)
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures.OfType<ProcedureInfo>())
{
string message = string.Empty;
if (!MySessionInfo.CanCheckOutItem(myProc.ItemID, CheckOutType.Procedure, ref message))
@@ -742,15 +661,14 @@ namespace VEPROMS
pbPDFsStatus.Maximum = n;
pbPDFsStatus.Visible = true;
VlnSvgPageHelper.CountInApplProcs = 1; // B2021-127: BNPPalr - Auto set of serial #, skip Front Matter as per PAL 11/1/21 (set to 1 not 0)
this.Text = string.Format("Processing {0}", _DocVersionInfo.MyFolder.Name);
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures)
Text = string.Format("Processing {0}", _DocVersionInfo.MyFolder.Name);
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures.OfType<ProcedureInfo>())
{
string locpdfname = null; // get pdf file name for later merge code
MyProcedure = myProc;
// C2021-019: Override Watermark Text, 'waterMarkText' will have whatever watermark text should be printed
ProcedureConfig procConfig = MyProcedure.MyConfig as ProcedureConfig;
string waterMarkTextOverride = "";
if (procConfig != null) waterMarkTextOverride = procConfig.GetValue("PSI", "WATERMARKOVERRIDE");
// C2021-019: Override Watermark Text, 'waterMarkText' will have whatever watermark text should be printed
string waterMarkTextOverride = "";
if (MyProcedure.MyConfig is ProcedureConfig procConfig) waterMarkTextOverride = procConfig.GetValue("PSI", "WATERMARKOVERRIDE");
// C2020-002 paper size is now set in the format files - default is Letter
Volian.Print.Library.Rtf2Pdf.PaperSize = myProc.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize;
if (myProc.Sections != null)
@@ -772,13 +690,6 @@ namespace VEPROMS
pbPDFsStatus.TextVisible = true;
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
pbPDFsStatus.Value = i;
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
// B2021-102 we now get this information in frmPDFStatusForm()
//MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
//if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
string myPDFPath = GetMultiunitPDFPath();
_MergedPdfPath = myPDFPath; // If Slave, need its subdirectory/unit path for merging
@@ -814,14 +725,7 @@ namespace VEPROMS
pbPDFsStatus.TextVisible = true;
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
pbPDFsStatus.Value = i;
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
// B2021-102 we now get this information in frmPDFStatusForm()
//MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
//if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
// B2016-249 Output Procedure to folder associated with Parent Child
// B2021-102 put in the using for better memory management
@@ -850,18 +754,9 @@ namespace VEPROMS
pbPDFsStatus.TextVisible = true;
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
pbPDFsStatus.Value = i;
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
int profileDepth1 = ProfileTimer.Push(">>>> GetItemAndChildren");
// B2021-102 we now get this information in frmPDFStatusForm()
//if (MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
// MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
//else
// MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
//// C2018-015 add the procedure tree path and the procedure number and title to the meta file
//if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
ProfileTimer.Pop(profileDepth1);
// B2021-102 put in the using for better memory management
// B2016-249 Output Procedure to folder associated with Parent Child
@@ -934,12 +829,12 @@ namespace VEPROMS
private void CreateDebugFiles()
{
if (cbxDebugPagination.Checked)
Volian.Base.Library.DebugPagination.Open(PDFPath + "\\DebugPagination.txt"); // RHM 20120925 Corrected spelling
Volian.Base.Library.DebugPagination.Open($"{PDFPath}\\DebugPagination.txt"); // RHM 20120925 Corrected spelling
if (cbxDebugText.Checked)
Volian.Base.Library.DebugText.Open(PDFPath + "\\DebugText.txt");
Volian.Base.Library.DebugText.Open($"{PDFPath}\\DebugText.txt");
if (cbxMetaFile.Checked) // C2018-004 create meta file for baseline compares
{
Volian.Base.Library.BaselineMetaFile.Open(PDFPath + "\\DebugMeta.txt");
Volian.Base.Library.BaselineMetaFile.Open($"{PDFPath}\\DebugMeta.txt");
// C2018-015 add the PROMS Version, SQL Server, and Database to top of the meta file
Volian.Base.Library.BaselineMetaFile.WriteLine("!! Ver {0} {1} {2}", AboutVEPROMS.PROMSVersion, AboutVEPROMS.SQLServerName, AboutVEPROMS.DatabaseName);
// C2018-023 set as to whether we are going to include the Word attment text in the baseline metafile
@@ -975,7 +870,7 @@ namespace VEPROMS
if (MyProcedure.MyDocVersion.MultiUnitCount > 1)
{
VlnSvgPageHelper.CountInApplProcs = 1;
foreach (ProcedureInfo pi in MyProcedure.MyDocVersion.Procedures)
foreach (ProcedureInfo pi in MyProcedure.MyDocVersion.Procedures.OfType<ProcedureInfo>())
{
if (pi.ItemID == MyProcedure.ItemID) break;
bool includeProc = pi.ApplInclude(SelectedSlave);
@@ -991,24 +886,14 @@ namespace VEPROMS
string waterMarkText = (swtbtnWaterMark.Value) ? cbxWaterMark.Text : "None" ; // B2018-124 use text of watermark form drop down list instead of enum value
string watermarkColor = "Blue"; // this is the default watermark color
frmPDFStatusForm.SetUnitWatermark(MyProcedure, ref waterMarkText, ref watermarkColor); //C2022-004 Unit Designator Watermark
ProcedureConfig procConfig = MyProcedure.MyConfig as ProcedureConfig;
string waterMarkTextOverride = "";
if (procConfig != null) waterMarkTextOverride = procConfig.GetValue("PSI", "WATERMARKOVERRIDE"); // C2021-019: override watermark text
string waterMarkTextOverride = "";
if (MyProcedure.MyConfig is ProcedureConfig procConfig) waterMarkTextOverride = procConfig.GetValue("PSI", "WATERMARKOVERRIDE"); // C2021-019: override watermark text
if (swtbtnWaterMark.Value && waterMarkTextOverride != null && waterMarkTextOverride != "") waterMarkText = waterMarkTextOverride;
// Determine change bar settings. First get from config & then see if override from dialog.
// Also check that format allows override.
ChangeBarDefinition cbd = DetermineChangeBarSettings();
int profileDepth2 = ProfileTimer.Push(">>>> CreatePdf.GetItemAndChildren");
// B2021-088 moved this if/else to frmPDFStatusForm() so that the Approval logic will have access to this logic
//if (MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier || MyProcedure.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
// MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
//else
// MyProcedure = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID);
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a"," | "));
//if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
// B2022-088: Find Doc Ro button not working in Word Sections
// Initialize Print Cache
MSWordToPDF.RoPrintCache = new Dictionary<string, ROFSTLookup.rochild>();
@@ -1045,7 +930,7 @@ namespace VEPROMS
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
MyProcedure.SelectedChildToPrint = 0; // B2023-035 reset
this.Close();
Close();
ShowDebugFiles();
ProfileTimer.Pop(profileDepth);
ProfileTimer.ShowTimerTable();
@@ -1121,22 +1006,19 @@ namespace VEPROMS
DoCreatePDF();
}
public void QPCreatePDF()
{
DoCreatePDF();
}
public void QPCreatePDF() => DoCreatePDF();
private void DoCreatePDF()
private void DoCreatePDF()
{
if (_AllProcedures)
{
this.Cursor = Cursors.WaitCursor;
Cursor = Cursors.WaitCursor;
DateTime dtStart = DateTime.Now;
_MultiunitPdfLocation = cbxMultiunitPdfLocation.SelectedItem.ToString();
PromsPrinter.ClearTransPageNumProblems();
CreatePDFs();
PromsPrinter.ReportTransPageNumProblems();
this.Cursor = Cursors.Default;
Cursor = Cursors.Default;
if (_MergedPfd == null)
{
if (VlnSettings.DebugMode)
@@ -1149,7 +1031,7 @@ namespace VEPROMS
{
MessageBox.Show("Completed Successfully", "Print All Procedures", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
this.Close();
Close();
}
}
else
@@ -1158,14 +1040,14 @@ namespace VEPROMS
// B2017-009 If the selected item is null don't add a folder
if (cbxMultiunitPdfLocation.SelectedItem != null)
_MultiunitPdfLocation = cbxMultiunitPdfLocation.SelectedItem.ToString();
this.Cursor = Cursors.WaitCursor;
Cursor = Cursors.WaitCursor;
_CreateButtonClicked = true; // B2020-062 control the toggle of date/time prefix/suffix on pdf file name
CreatePDF();
_CreateButtonClicked = false;
this.Cursor = Cursors.Default;
Cursor = Cursors.Default;
}
}
private bool _Initializing = false;
private readonly bool _Initializing = false;
private void btnPdfLocation_Click(object sender, EventArgs e)
{
@@ -1191,12 +1073,9 @@ namespace VEPROMS
ppTxbxChangeBarUserMsgOne.Enabled = enabled;
ppTxbxChangeBarUserMsgTwo.Enabled = enabled;
}
private void cbxOvrrideDefChgBars_CheckStateChanged(object sender, EventArgs e)
{
SetCustomControls(cbxOvrrideDefChgBars.Checked);
}
private void cbxOvrrideDefChgBars_CheckStateChanged(object sender, EventArgs e) => SetCustomControls(cbxOvrrideDefChgBars.Checked);
private void rbCustom_Click(object sender, EventArgs e)
private void rbCustom_Click(object sender, EventArgs e)
{
SetCustomControls(true);
// Make Custom controls visible
@@ -1218,24 +1097,22 @@ namespace VEPROMS
// B2024-058 Add validation for Revision Date field of the Print dialog
private bool validateDate(TextBox txtDate)
{
DateTime dDate;
if (!(txtDate.Text == ""))
{
if (DateTime.TryParse(txtDate.Text, out dDate))
{
return true;
}
else
{
string txtDate2 = txtDate.Text;
string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2);
string txtTitle = "Invalid Format";
MessageBox.Show(message, txtTitle);
return false;
}
}
return true;
if (!(txtDate.Text == ""))
{
if (DateTime.TryParse(txtDate.Text, out _))
{
return true;
}
else
{
string txtDate2 = txtDate.Text;
string message = String.Format("Date {0} in wrong format" + System.Environment.NewLine + "Correct the revision date.", txtDate2);
string txtTitle = "Invalid Format";
MessageBox.Show(message, txtTitle);
return false;
}
}
return true;
}
private void txbRevDate_Enter(object sender, EventArgs e)
@@ -1243,8 +1120,6 @@ namespace VEPROMS
txbDate = txbRevDate;
grpDateSelector.Text = "Select Revision Date";
grpDateSelector.Visible = calDateSelector.Visible = true;
//C2021-007 position the calendar to the current RevDate or if no RevDate, position to today's date
DateTime dDate;
// B2024-058 Add validation for Revision Date field of the Print dialog
if (!validateDate(txbDate))
{
@@ -1259,17 +1134,16 @@ namespace VEPROMS
private void txbRevDate_Leave(object sender, EventArgs e)
{
if (_Initializing) return;
if (this.ActiveControl == calDateSelector)
if (ActiveControl == calDateSelector)
{
txbRevDate.Focus(); //B2018-059 keep the calendar open until a different field on the print dialog is selected
return;
}
txbDate = null;
grpDateSelector.Visible = calDateSelector.Visible = false;
// save the RevDate to the procedure's config.
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
if (pc == null) return;
pc.Print_RevDate = txbRevDate.Text;
// save the RevDate to the procedure's config.
if (!(MyProcedure.MyConfig is ProcedureConfig pc)) return;
pc.Print_RevDate = txbRevDate.Text;
using (Item itm = Item.Get(MyProcedure.ItemID))
{
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
@@ -1283,10 +1157,9 @@ namespace VEPROMS
if (_Initializing) return;
txbDate = null;
grpDateSelector.Visible = calDateSelector.Visible = false;
// save the ReviewDate to the procedure's config.
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
if (pc == null) return;
pc.Print_ReviewDate = txbReviewDate.Text;
// save the ReviewDate to the procedure's config.
if (!(MyProcedure.MyConfig is ProcedureConfig pc)) return;
pc.Print_ReviewDate = txbReviewDate.Text;
using (Item itm = Item.Get(MyProcedure.ItemID))
{
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
@@ -1326,10 +1199,9 @@ namespace VEPROMS
// C2021-062 used to save rev number information when all procedures are printed or merged
private void SaveRevNumToProcedureConfig(string newrevnum)
{
// save the RevNum to the procedure's config.
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
if (pc == null) return;
pc.Print_Rev = newrevnum;
// save the RevNum to the procedure's config.
if (!(MyProcedure.MyConfig is ProcedureConfig pc)) return;
pc.Print_Rev = newrevnum;
using (Item itm = Item.Get(MyProcedure.ItemID))
{
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
@@ -1341,22 +1213,16 @@ namespace VEPROMS
{
if (expPrnSetting.Expanded)
{
this.Size = new Size(this.Size.Width + (expPrnSetting.Size.Width - expPrnSetting.TitlePanel.Size.Height), this.Size.Height);
Size = new Size(Size.Width + (expPrnSetting.Size.Width - expPrnSetting.TitlePanel.Size.Height), Size.Height);
// B2018-137 set the visability of Generate Placekeeper
swtbtnGeneratePlacekeeper.Visible = lblGeneratePlacekeeper.Visible = ((MyProcedure.ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.AutoPlacekeeper) == E_PurchaseOptions.AutoPlacekeeper);
}
//else
// this.Size = new Size(this.Size.Width-(expPrnSetting.Size.Width-expPrnSetting.TitlePanel.Size.Height), this.Size.Height);
//Refresh();
}
private void expPrnSetting_ExpandedChanging(object sender, DevComponents.DotNetBar.ExpandedChangeEventArgs e)
{
{
if (expPrnSetting.Expanded)
//this.Size = new Size(this.Size.Width+(expPrnSetting.Size.Width-expPrnSetting.TitlePanel.Size.Height), this.Size.Height);
//else
this.Size = new Size(this.Size.Width-(expPrnSetting.Size.Width-expPrnSetting.TitlePanel.Size.Height), this.Size.Height);
//Refresh();
Size = new Size(Size.Width-(expPrnSetting.Size.Width-expPrnSetting.TitlePanel.Size.Height), Size.Height);
}
@@ -1395,15 +1261,15 @@ namespace VEPROMS
DoCreatePDF(); // create indivitual pdfs
if (_MergedPdfPath != null && _MergedPdfPath != PDFPath) PDFPath = _MergedPfd.Folder = _MergedPdfPath;
// C2021-063 pass in whether to generate Alarm Point List text when a merge is done
if (!_MergedPfd.DoTheMerge(PromsPrinter.MergedLandscapePages,cbxAlmPtTxt.Checked)) return; // merge them together.
if (!_MergedPfd.DoTheMerge(cbxAlmPtTxt.Checked)) return; // merge them together.
// if the property to show the file after printing is set (on the version dialog), display it. Otherwise do a dialog to let user know it's done
if (_DocVersionConfig.Print_MergedPdfsViewAfter)
{
if (_MergedPfd.MergedPdfs != null && _MergedPfd.MergedPdfs.Count > 0)
{
System.Diagnostics.Process sdp = System.Diagnostics.Process.Start(_MergedPfd.MergedFileName);
if (sdp != null) // B2020-055 if the current .NET version does not recognize the program used to display the PDF, it will return a NULL (ex. Microsoft Edge)
sdp.WaitForInputIdle();
// B2020-055 if the current .NET version does not recognize the program used to display the PDF, it will return a NULL (ex. Microsoft Edge)
sdp?.WaitForInputIdle();
}
}
else if (VlnSettings.DebugMode)
@@ -1416,7 +1282,7 @@ namespace VEPROMS
{
FlexibleMessageBox.Show("Completed Successfully", "Print All and Merge Procedures", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
this.Close();
Close();
}
private void cbxAssignRevToAllMergedPrcs_CheckedChanged(object sender, EventArgs e)
@@ -1428,10 +1294,5 @@ namespace VEPROMS
_NewRevForAllProcs = null;
}
//private void cbxDebug_CheckedChanged(object sender, EventArgs e)
//{
// cbxCmpPRMSpfd.Visible = cbxDebug.Checked;
//}
}
}
@@ -0,0 +1,8 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Not modifying Naming Styles")]
+552 -46
View File
@@ -1643,7 +1643,11 @@ Begin
Select Cast(i.LastChanged as varbinary(8)) as 'ILastChanged',
i.ItemID as 'ItemID',
zi.VersionID as 'VersionID',
zi.PPath +
CASE WHEN c.[Type] % 20000 = 6 THEN REPLACE(zi.PPath,'Note','Caution')
WHEN c.[Type] % 20000 = 7 THEN REPLACE(zi.PPath,'Caution','Note')
ELSE zi.PPath
END
+
Case (c.[Type]/10000)
When 0 Then @Delim + @UnitPrefix + IsNull(c.Number,'') + @DelimNumber + IsNull(c.Text,'') -- Procedure
When 1 Then @Delim + IsNull(c.Number,'') + @DelimNumber + IsNull(c.Text,'') -- Section
@@ -5223,7 +5227,7 @@ CREATE PROCEDURE [dbo].[getRevisionByItemIDandRevisionNumberAndUnitID]
WITH EXECUTE AS OWNER
AS
declare @RevisionID int
set @RevisionID = (select revisionid from revisions rr cross apply rr.config.nodes('//Applicability') t1(r1) where itemid = @itemid and revisionnumber = @RevisionNumber and r1.value('@Index','int') = @UnitID)
set @RevisionID = (select top 1 revisionid from revisions rr cross apply rr.config.nodes('//Applicability') t1(r1) where itemid = @itemid and revisionnumber = @RevisionNumber and r1.value('@Index','int') = @UnitID order by revisionid desc)
SELECT
[RevisionID],
[ItemID],
@@ -5543,6 +5547,12 @@ ELSE PRINT 'Function: ve_GetItemDerivedApplicability Error on Creation'
GO
-------
-- =============================================
-- Author: Matthew Schill
-- Modify date: 07/14/2026
-- Description: Reworked ve_GetParentItem for Performance improvement
-- =============================================
/****** Object: UserDefinedFunction [dbo].[vefn_GetParentItem] Script Date: 03/28/2012 17:58:48 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[ve_GetParentItem]') AND OBJECTPROPERTY(id,N'IsScalarFunction') = 1)
DROP FUNCTION [ve_GetParentItem];
@@ -5551,35 +5561,46 @@ GO
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE FUNCTION [dbo].[ve_GetParentItem] (@ItemID int) RETURNS int
CREATE OR ALTER FUNCTION [dbo].[ve_GetParentItem] (@ItemID int) RETURNS int
WITH EXECUTE AS OWNER
AS
BEGIN
DECLARE @ParentID int;
WITH Itemz([ItemID],[IsFound]) as
WITH Itemz([ItemID]) as
(
select ii.itemid,0 from items ii where ii.itemid = @ItemID
select ii.itemid from items ii WITH (NOLOCK) where ii.itemid = @ItemID
union all
select ii.previousid,0 from items ii
select ii.previousid from items ii WITH (NOLOCK)
join itemz zz on ii.itemid = zz.itemid
where ii.previousid is not null
and zz.isfound = 0
union all
select ii.itemid,1
from parts pp
join itemz zz on pp.itemid = zz.itemid
join items ii on ii.contentid = pp.contentid
)
select top 1 @ParentID = itemid from itemz
where isfound = 1 OPTION (MAXRECURSION 10000)
select top 1 @ParentID = ii.itemid
from itemz
inner join parts pp WITH (NOLOCK) on pp.itemid = itemz.itemid
inner join items ii WITH (NOLOCK) on ii.contentid = pp.contentid
OPTION (MAXRECURSION 10000)
RETURN @ParentID
END
GO
IF (@@Error = 0) PRINT 'ScalerFunction [vefn_GetParentItem] Succeeded'
ELSE PRINT 'ScalerFunction [vefn_GetParentItem] Error on Creation'
go
IF EXISTS (SELECT * FROM dbo.sysIndexes WHERE name like 'IX_PartsItemID')
DROP INDEX [IX_PartsItemID] ON [dbo].[tblParts];
GO
CREATE NONCLUSTERED INDEX IX_PartsItemID
ON [dbo].[tblParts] ([ItemID] ASC)
INCLUDE([ContentID],[DeleteStatus],[FromType]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
PRINT 'Added IX_PartsItemID Index. Speeds up Getting Parent Items'
GO
/****** Object: UserDefinedFunction [dbo].[vefn_CanTransitionBeCreated] Script Date: 10/14/2012 02:03:30 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_CanTransitionBeCreated]') AND OBJECTPROPERTY(id,N'IsScalarFunction') = 1)
DROP FUNCTION [vefn_CanTransitionBeCreated];
@@ -13536,35 +13557,7 @@ GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[deleteAllDocVersionPdfs]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [deleteAllDocVersionPdfs];
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2017 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE PROCEDURE [dbo].[deleteAllDocVersionPdfs]
(
@VersionID int
)
WITH EXECUTE AS OWNER
AS
BEGIN TRY -- Try Block
BEGIN TRANSACTION
DELETE [Pdfs]
WHERE [DocID] IN(select EE.DocID from vefn_GetVersionItems(cast(@VersionID as varchar(20))) VI
Join Entries EE ON EE.ContentID= VI.ContentID)
IF( @@TRANCOUNT > 0 ) COMMIT
END TRY
BEGIN CATCH -- Catch Block
IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level
ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback
EXEC vlnErrorHandler
END CATCH
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'Procedure Creation: deleteAllDocVersionPdfs Succeeded'
ELSE PRINT 'Procedure Creation: deleteAllDocVersionPdfs Error on Creation'
GO
/****** Object: StoredProcedure [addFiguresByROFstIDandImageIDs] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[addFiguresByROFstIDandImageIDs]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [addFiguresByROFstIDandImageIDs];
@@ -17165,6 +17158,7 @@ GO
[roid] [varchar](50) NOT NULL,
[appid] [varchar](max) NULL,
[value] [varchar](max) NULL,
[moddatetime] [datetime] NULL,
CONSTRAINT [PK_RofstChild] PRIMARY KEY CLUSTERED
(
[RofstChildID] ASC
@@ -17299,6 +17293,23 @@ GO
End -- Rofst Tables
Go
-- =============================================
-- Author: Matthew Schill
-- Create date: 03/30/2026
-- Description: Store RO Modification date/time
-- =============================================
--- Add Column to store RO Modification date/time if it does not already exist
IF NOT EXISTS(SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'RofstChild'
AND COLUMN_NAME = 'moddatetime')
ALTER TABLE RofstChild ADD moddatetime datetime NULL;
go
-- Display the status
IF (@@Error = 0) PRINT 'Altered table [RofstChild] Succeeded for moddatetime'
ELSE PRINT 'Altered table [RofstChild] Error on Alter for moddatetime'
go
/*
----------------------------------------------------------------------------------
@@ -19701,6 +19712,7 @@ GO
@roid VarChar(50),
@appid VarChar(Max) = null,
@value VarChar(Max) = null,
@ModDateTime DateTime = null,
@missingDefaultValue VarChar(Max) = null
)
With Execute as Owner
@@ -19718,8 +19730,8 @@ GO
Set @missingDefaultValue = '[TBD]';
-- Create Rofst Child/Group Record --> [Roid = (12) Digits]
Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, [value])
Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, REPLACE(REPLACE(@value, '&123;', '{'), '&125;', '}'));
Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, moddatetime, [value])
Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, @ModDateTime, REPLACE(REPLACE(@value, '&123;', '{'), '&125;', '}'));
-- Check for appid, if exists, then insert the default value for each return type if multi-value
@@ -24325,8 +24337,10 @@ BEGIN
OR FromID in (Select ContentID from tblContents where deletestatus != 0 and ActionDTS < @dte)
)
PRINT 'Deleting Items and Parts'
alter table tblParts nocheck constraint FK_Parts_Items
delete from tblItems where deletestatus != 0 and DTS < @dte
delete from tblParts where deletestatus != 0 and ItemID Not IN (Select ItemID from Items) and DTS < @dte
alter table tblParts check constraint FK_Parts_Items
PRINT 'Purging Parts with deleted Contents'
DELETE from Child
FROM tblParts AS Child
@@ -24351,7 +24365,9 @@ BEGIN
ON Itms.ItemID = tblItems.ItemID AND Itms.deletestatus = tblItems.deletestatus
alter table tblItems check constraint FK_Items_Items
PRINT 'Purging Contents'
alter table tblEntries nocheck constraint FK_Entries_Contents
delete from tblContents where deletestatus != 0 and ActionDTS < @dte
alter table tblEntries check constraint FK_Entries_Contents
PRINT 'Phase 3'
delete from AnnotationAudits where DTS < @dte
delete from ContentAudits where DTS < @dte
@@ -24529,6 +24545,496 @@ GO
PRINT 'Added IX_tblROUsagesRODbIDDeleteStatusROID Index. Speeds up RO queries'
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetCurrentApprovedRevisions]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [GetCurrentApprovedRevisions];
GO
/****** Object: StoredProcedure [dbo].[GetCurrentApprovedRevisions] Script Date: 02/05/2026 7:54:42 AM ******/
-- =============================================
-- Author: Matthew Schill
-- Create date: 02/05/2026
-- Description: Gets all current approved revisions
-- =============================================
CREATE PROCEDURE [dbo].[GetCurrentApprovedRevisions]
(
@ItemID AS bigint
)
AS
BEGIN
select max(rr.revisionid) revisionid, UnitId, UnitVal.name UnitName, max(rr.DTS) DTS
from items ii
inner join revisions rr on ii.itemid = rr.itemid
inner join versions vv on rr.revisionid = vv.revisionid
inner join stages ss on vv.stageid = ss.stageid
outer apply
(Select UnitId = r1.value('@Index','int') FROM rr.config.nodes('Config/Applicability') t1(r1)) App
left outer join
(select r1.value('@index','int') indx
,r1.value('@Name','varchar') name
from (select *,cast(config as xml) xconfig from DocVersions
where ItemID in(select itemID from vefn_AllSiblingItems(@ItemID))) SDV
cross apply
xconfig.nodes('Config/Slaves/Slave') t1(r1)) UnitVal ON UnitVal.indx = UnitId
where ss.isapproved = 1
and ii.itemid = @ItemID
group by UnitId, UnitVal.name
RETURN
END
IF (@@Error = 0) PRINT 'Procedure Creation: [GetCurrentApprovedRevisions] Succeeded'
ELSE PRINT 'Procedure Creation: [GetCurrentApprovedRevisions] Error on Creation'
GO
/*
==========================================================================================================
-- Begin: C2026-010 Add Audit Ability for ChangeBars
-- Author: Matthew Schill
-- Create date: 02/17/2026
==========================================================================================================
*/
/*
----------------------------------------------------------------------------------
Tables:
----------------------------------------------------------------------------------
[ChangeBarAudits]
----------------------------------------------------------------------------------
Indexes:
----------------------------------------------------------------------------------
[IX_ChangeBarAudits_ItemID] on [dbo].[ChangeBarAudits]
*/
IF Not Exists(SELECT * FROM sys.objects Where name = 'ChangeBarAudits' AND type in (N'U'))
Begin
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
/****** Create Table to hold Audit Information ******/
CREATE TABLE [dbo].[ChangeBarAudits](
[AuditID] [bigint] IDENTITY(1,1) NOT NULL,
[ItemID] [bigint] NOT NULL,
[Text] [nvarchar](max) NULL,
[DTS] [datetime] NOT NULL,
[UserID] [nvarchar](100) NOT NULL,
[UnitIndex] [int] NULL,
CONSTRAINT [PK_ChangeBarAudits] PRIMARY KEY CLUSTERED
(
[AuditID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
IF (@@Error = 0) PRINT 'Table Creation: [ChangeBarAudits] Succeeded'
ELSE PRINT 'Table Creation: [ChangeBarAudits] Error on Creation'
/****** Table was not previously created - so intially populate with info from Approvals ******/
INSERT into ChangeBarAudits([ItemID],[Text],[DTS],[UserID],[UnitIndex])
select --rr.RevisionID,
rr.ItemID,
Text = CASE WHEN r1.value('@Index','int') <> 0 AND UnitName IS NOT NULL THEN
'(Unit ' + UnitName + ') '
ELSE
''
END +
'Approved by (' + rr.UserID + ') on (' +
CAST(rr.DTS AS VARCHAR) + ')',
rr.DTS,
rr.UserID,
UnitIndex = r1.value('@Index','int')
-- , UnitName
from revisions rr
inner join versions vv on rr.revisionid = vv.revisionid
inner join stages ss on vv.stageid = ss.stageid
outer apply rr.config.nodes('Config/Applicability') t1(r1)
outer apply
( Select r2.value('@Name','varchar') UnitName
FROM
(select DocVerSions.ItemID, cast(config as xml) xconfig from DocVersions
inner join
vefn_AllSiblingItems(rr.ItemID) Sib ON DocVerSions.ItemID = Sib.ItemID) SDV
cross apply
xconfig.nodes('Config/Slaves/Slave') t2(r2)
WHERE r2.value('@index','varchar') = r1.value('@Index','int')
) UN
where ss.isapproved = 1
order by rr.ItemID, rr.RevisionID desc
IF (@@Error = 0) PRINT '[ChangeBarAudits] Initial Population Succeeded'
ELSE PRINT '[ChangeBarAudits] Initial Population Error'
/****** Create Index to get ChangeBar Audit Information for Item (ItemID = ProcedureID) ******/
CREATE NONCLUSTERED INDEX [IX_ChangeBarAudits_ItemID] ON [dbo].[ChangeBarAudits]
(
[ItemID] ASC
)
INCLUDE ([AuditID], [Text], [DTS], [UnitIndex])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
IF (@@Error = 0) PRINT 'Index Creation: [IX_ChangeBarAudits_ItemID] Succeeded'
ELSE PRINT 'Index Creation: [IX_ChangeBarAudits_ItemID] Error on Creation'
End
-- =============================================
-- Description: Gets ChangeBar Audit History by item
-- =============================================
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetChangeBarAuditHistoryByItem]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [GetChangeBarAuditHistoryByItem];
GO
CREATE PROCEDURE [dbo].[GetChangeBarAuditHistoryByItem]
(
@ItemID AS bigint
)
AS
BEGIN
Select * FROM ChangeBarAudits where ItemID = @ItemID
order by DTS desc
RETURN
END
IF (@@Error = 0) PRINT 'Procedure Creation: [GetChangeBarAuditHistoryByItem] Succeeded'
ELSE PRINT 'Procedure Creation: [GetChangeBarAuditHistoryByItem] Error on Creation'
GO
-- =============================================
-- Description: Adds ChangeBar Audit History
-- =============================================
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[AddChangeBarAuditHistory]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [AddChangeBarAuditHistory];
GO
CREATE PROCEDURE [dbo].[AddChangeBarAuditHistory]
(
@ItemID AS bigint,
@Description As nvarchar(max),
@DTS AS Datetime,
@UserID As nvarchar(100),
@UnitIndex AS bigint = NULL
)
AS
BEGIN
INSERT into ChangeBarAudits([ItemID],[Text],[DTS],[UserID],[UnitIndex])
VALUES (@ItemID, @Description, @DTS, @UserID, @UnitIndex)
RETURN
END
IF (@@Error = 0) PRINT 'Procedure Creation: [AddChangeBarAuditHistory] Succeeded'
ELSE PRINT 'Procedure Creation: [AddChangeBarAuditHistory] Error on Creation'
GO
/*
==========================================================================================================
-- End: C2026-010 Add Audit Ability for ChangeBars
==========================================================================================================
*/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetMissingDocsByUnit]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [GetMissingDocsByUnit];
GO
-- =============================================
-- Author: Matthew Schill
-- Create date: 02/27/2026
-- Description: Get Missing Docs by Unit for Generating Pdf table
-- =============================================
CREATE PROCEDURE [dbo].[GetMissingDocsByUnit]
AS
BEGIN
select Docs.DocID, UnitID, SectionID = MIN(SectionID)
FROM
(SELECT DISTINCT [DocID]
FROM [tblDocuments]) Docs
INNER JOIN Entries on Docs.DocID = Entries.DocID
INNER JOIN Contents on Entries.ContentID = Contents.ContentID
inner join Items on Items.ContentID = Contents.ContentID
outer apply
(Select UnitID = ID FROM dbo.vefn_SplitInt([dbo].[ve_GetItemDerivedApplicability](Items.ItemID),',')) Unit
outer apply
(Select TOP 1 SectionID = ItemID FROM Contents SecC where SecC.ContentID = Contents.ContentID
AND (SecC.Type / 10000) = 1
AND dbo.vefn_GetVersionIDByItemID(ItemID) IS NOT NULL
) Section
left outer join Pdfs on Pdfs.DocID = Docs.DocID AND Pdfs.DebugStatus = CASE WHEN UNITID IS NULL THEN 0 ELSE UnitID * 10 END
WHERE Pdfs.DocID IS NULL
AND SectionID IS NOT NULL
Group by Docs.DocID, UnitID
order by Docs.DocID, UnitID
RETURN
END
IF (@@Error = 0) PRINT 'Procedure Creation: [GetMissingDocsByUnit] Succeeded'
ELSE PRINT 'Procedure Creation: [GetMissingDocsByUnit] Error on Creation'
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_ROFST_changes]') AND OBJECTPROPERTY(id,N'IsTableFunction') = 1)
DROP FUNCTION [vefn_ROFST_changes];
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*
==========================================================================================================
Author: Matthew Schill
Create Date: 03/31/2026
Description: Function for ROs that updated in latest RO FST Load
==========================================================================================================
*/
CREATE FUNCTION [dbo].[vefn_ROFST_changes](@OrigFSTID int, @NewFSTid int, @VersionID int)
RETURNS @ROIDs TABLE
(
[roid] varchar(50)
)
WITH EXECUTE AS OWNER
AS
BEGIN
insert into @ROIDs
SELECT DISTINCT ISNULL(RofstChild.roid,previous.roid)
FROM
(SELECT * FROM RofstChild where RofstChild.RofstID = @NewFSTid) RofstChild
FULL OUTER JOIN
(SELECT * FROM RofstChild previous where previous.RofstID = @OrigFSTID) previous
ON previous.dbiID = RofstChild.dbiID AND previous.ID = RofstChild.ID
where
ISNULL(previous.RofstID,'') != ISNULL(RofstChild.RofstID,'')
AND
(
(RofstChild.RofstID = @NewFSTid OR RofstChild.RofstID IS NULL)
AND
(previous.RofstID = @OrigFSTID OR previous.RofstID IS NULL)
)
AND
(previous.moddatetime IS NULL
OR RofstChild.moddatetime IS NULL
OR RofstChild.moddatetime != previous.moddatetime
OR RofstChild.title != previous.title
OR RofstChild.value != previous.value
)
RETURN
END
go
IF (@@Error = 0) PRINT 'TableFunction [vefn_ROFST_changes] Succeeded'
ELSE PRINT 'TableFunction [vefn_ROFST_changes] Error on Creation'
go
/****** Object: StoredProcedure [deleteDocVersionPdfsWithNewROs] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[deleteDocVersionPdfsWithNewROs]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [deleteDocVersionPdfsWithNewROs];
GO
/*
==========================================================================================================
Author: Matthew Schill
Create Date: 03/31/2026
Description: Delete all PDFs with ROs that will need re-resolved
==========================================================================================================
*/
CREATE PROCEDURE [dbo].[deleteDocVersionPdfsWithNewROs]
(
@VersionID int,
@OrigFSTid int,
@NewFSTid int
)
WITH EXECUTE AS OWNER
AS
BEGIN
DELETE [Pdfs]
WHERE [DocID] IN
(
select EE.DocID from vefn_GetVersionItems(cast(@VersionID as varchar(20))) VI
Join Entries EE ON EE.ContentID= VI.ContentID
Join DRoUsages ON DRoUsages.DocID = EE.DocID
Join dbo.vefn_ROFST_changes(@OrigFSTID, @NewFSTid, @VersionID) ROFST_changes on LEFT(DRoUsages.ROID,12) = ROFST_changes.roid
)
RETURN
END
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'Procedure Creation: deleteDocVersionPdfsWithNewROs Succeeded'
ELSE PRINT 'Procedure Creation: deleteDocVersionPdfsWithNewROs Error on Creation'
GO
/****** Object: StoredProcedure [getItemsWithNewROs] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getItemsWithNewROs]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [getItemsWithNewROs];
GO
/*
==========================================================================================================
Author: Matthew Schill
Create Date: 03/31/2026
Description: Get Items with New ROs that will need resolved
==========================================================================================================
*/
CREATE PROCEDURE [dbo].[getItemsWithNewROs]
(
@VersionID int,
@OrigFSTid int,
@NewFSTid int
)
WITH EXECUTE AS OWNER
AS
BEGIN
select DISTINCT tblItems.ItemID FROM
dbo.vefn_ROFST_changes(@OrigFSTID, @NewFSTid, @VersionID) ROFST_changes
INNER JOIN RoUsages ON LEFT(RoUsages.ROID,12) = ROFST_changes.roid
INNER JOIN tblItems ON RoUsages.ContentID = tblItems.ContentID
OUTER APPLY (Select VersionID = dbo.vefn_GetVersionIDByItemID(tblItems.ItemID)) ver
INNER JOIN DocVersions DV ON DV.VersionID = ver.VersionID
INNER JOIN Associations ON Associations.VersionID = DV.VersionID
where ver.VersionID = @VersionID
RETURN
END
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'Procedure Creation: getItemsWithNewROs Succeeded'
ELSE PRINT 'Procedure Creation: getItemsWithNewROs Error on Creation'
GO
/****** Object: StoredProcedure [dbo].[getRevisionByItemIDandRevisionNumber] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[getRevisionByItemIDandRevisionNumber]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[getRevisionByItemIDandRevisionNumber];
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE PROCEDURE [dbo].[getRevisionByItemIDandRevisionNumber]
(
@ItemID int,
@RevisionNumber nvarchar(50)
)
WITH EXECUTE AS OWNER
AS
declare @RevisionID int
set @RevisionID = (select top 1 revisionid from revisions where itemid = @itemid and revisionnumber = @RevisionNumber order by revisionid desc)
SELECT
[RevisionID],
[ItemID],
[TypeID],
[RevisionNumber],
[RevisionDate],
[Notes],
[Config],
[DTS],
[UserID],
[LastChanged],
(SELECT COUNT(*) FROM [Checks] WHERE [Checks].[RevisionID]=[Revisions].[RevisionID]) [CheckCount],
(SELECT COUNT(*) FROM [Versions] WHERE [Versions].[RevisionID]=[Revisions].[RevisionID]) [VersionCount]
FROM [Revisions]
WHERE [RevisionID]=@RevisionID
SELECT
[Checks].[CheckID],
[Checks].[RevisionID],
[Checks].[StageID],
[Checks].[ConsistencyChecks],
[Checks].[DTS],
[Checks].[UserID],
[Checks].[LastChanged],
[Stages].[Name] [Stage_Name],
[Stages].[Description] [Stage_Description],
[Stages].[IsApproved] [Stage_IsApproved],
[Stages].[DTS] [Stage_DTS],
[Stages].[UserID] [Stage_UserID]
FROM [Checks]
JOIN [Stages] ON
[Stages].[StageID]=[Checks].[StageID]
WHERE
[Checks].[RevisionID]=@RevisionID
SELECT
[Versions].[VersionID],
[Versions].[RevisionID],
[Versions].[StageID],
[Versions].[DTS],
[Versions].[UserID],
[Versions].[LastChanged],
[Versions].[PDF],
[Versions].[SummaryPDF],
[Stages].[Name] [Stage_Name],
[Stages].[Description] [Stage_Description],
[Stages].[IsApproved] [Stage_IsApproved],
[Stages].[DTS] [Stage_DTS],
[Stages].[UserID] [Stage_UserID]
FROM [Versions]
JOIN [Stages] ON
[Stages].[StageID]=[Versions].[StageID]
WHERE
[Versions].[RevisionID]=@RevisionID
RETURN
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'Procedure Creation: getRevisionByItemIDandRevisionNumber Succeeded'
ELSE PRINT 'Procedure Creation: getRevisionByItemIDandRevisionNumber Error on Creation'
GO
/*
==========================================================================================================
Author: Matthew Schill
Create Date: 06/29/2026
Description: Added an ISNULL check when setting GridAudits.contentauditid.
Was Causing Deletion of some Grids to fail.
==========================================================================================================
*/
/****** Object: Trigger [tr_Contents_Delete] ******/
ALTER trigger [dbo].[tr_Contents_Delete] on [dbo].[Contents] instead of delete as
begin
update ii set DeleteStatus = (select max(DeleteID) from DeleteLog where SPID = @@spid), ActionDTS = getdate(),
UserID = (select top 1 UserID from DeleteLog where SPID = @@spid order by deleteid desc)
from tblContents ii inner join deleted dd on dd.ContentID = ii.ContentID
insert into ContentAudits(ContentID,Number,Text,Type,FormatID,Config,DTS,UserID,DeleteStatus,ActionDTS)
select ii.ContentID,ii.Number,ii.Text,ii.Type,ii.FormatID,ii.Config,ii.DTS,ii.UserID,ii.DeleteStatus,ii.ActionDTS
from tblContents ii inner join deleted dd on dd.ContentID = ii.ContentID
where ii.DeleteStatus > 0
update ga set ga.contentauditid = (select ISNULL(max(auditid),0) from contentaudits where contentid = ga.contentid and deletestatus = ga.deletestatus)
from gridaudits ga join deleted dd on ga.contentid = dd.contentid where ga.contentauditid = 0
end
go
-- Display the status of Trigger alter
IF (@@Error = 0) PRINT 'Trigger Alteration: tr_Contents_Delete Succeeded'
ELSE PRINT 'Trigger Alteration: tr_Contents_Delete Error on Creation'
GO
/*
---------------------------------------------------------------------------
| ADD New Code Before this Block |
@@ -24562,8 +25068,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255)
set @RevDate = '01/19/2026 5:00 PM'
set @RevDescription = 'Sync tree list Sort order between in RO Editor and PROMS'
set @RevDate = '07/16/2026 8:30 AM'
set @RevDescription = 'Reworked ve_GetParentItem for Performance improvement'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
-2
View File
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Volian.Base.Library;
namespace VEPROMS
{
@@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
using DevComponents.DotNetBar;
namespace VEPROMS
{
@@ -154,7 +154,6 @@
<Compile Include="AboutVEPROMS.Designer.cs">
<DependentUpon>AboutVEPROMS.cs</DependentUpon>
</Compile>
<Compile Include="BookMarks.cs" />
<Compile Include="dlgAnnotationsSelect.cs">
<SubType>Form</SubType>
</Compile>
@@ -349,6 +348,7 @@
<Compile Include="frmVersionsProperties.Designer.cs">
<DependentUpon>frmVersionsProperties.cs</DependentUpon>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Program.cs" />
<EmbeddedResource Include="AboutVEPROMS.resx">
<SubType>Designer</SubType>
-6
View File
@@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace VEPROMS
File diff suppressed because it is too large Load Diff
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace VEPROMS
@@ -21,8 +14,8 @@ namespace VEPROMS
private void btnTabs_Click(object sender, EventArgs e)
{
Remember = this.cbRemember.Checked;
this.Close();
Remember = cbRemember.Checked;
Close();
}
}
}
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
@@ -23,36 +19,22 @@ namespace VEPROMS
_MySessionInfo = SessionInfo.Get(_MyOwnerInfo.SessionID);
_MyUserInfo = ui;
}
private ProcedureInfo _MyProcedureInfo;
public ProcedureInfo MyProcedureInfo
{
get { return _MyProcedureInfo; }
}
private SectionInfo _MySectionInfo;
public SectionInfo MySectionInfo
{
get { return _MySectionInfo; }
}
private OwnerInfo _MyOwnerInfo;
public OwnerInfo MyOwnerInfo
{
get { return _MyOwnerInfo; }
}
private SessionInfo _MySessionInfo;
public SessionInfo MySessionInfo
{
get { return _MySessionInfo; }
}
private UserInfo _MyUserInfo;
public UserInfo MyUserInfo
{
get { return _MyUserInfo; }
}
StringBuilder sb = new StringBuilder();
private readonly ProcedureInfo _MyProcedureInfo;
public ProcedureInfo MyProcedureInfo => _MyProcedureInfo;
private readonly SectionInfo _MySectionInfo;
public SectionInfo MySectionInfo => _MySectionInfo;
private readonly OwnerInfo _MyOwnerInfo;
public OwnerInfo MyOwnerInfo => _MyOwnerInfo;
private readonly SessionInfo _MySessionInfo;
public SessionInfo MySessionInfo => _MySessionInfo;
private readonly UserInfo _MyUserInfo;
public UserInfo MyUserInfo => _MyUserInfo;
private void dlgCheckedOutProcedure_Load(object sender, EventArgs e)
{
if (MyProcedureInfo != null)
StringBuilder sb = new StringBuilder();
if (MyProcedureInfo != null)
sb.AppendLine(string.Format("The procedure {0} - {1}", MyProcedureInfo.DisplayNumber, MyProcedureInfo.DisplayText));
else
sb.AppendLine(string.Format("The document {0}", MySectionInfo.DisplayText));
@@ -74,7 +56,8 @@ namespace VEPROMS
private void btnForce_Click(object sender, EventArgs e)
{
MySessionInfo.CheckInItem(MyOwnerInfo.OwnerID);
StringBuilder sb = new StringBuilder();
MySessionInfo.CheckInItem(MyOwnerInfo.OwnerID);
sb.AppendLine();
sb.AppendLine("Forced Check In has been completed");
lblInfo.Text = sb.ToString();
+177 -189
View File
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using Volian.Controls.Library;
using Volian.Base.Library;
using System.Xml;
using System.IO;
@@ -20,14 +18,9 @@ namespace VEPROMS
{
#region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion
frmVEPROMS _MyFrmVEPROMS = null;// Save frmVEPROMS for Import to shutoff SessionPing
public frmVEPROMS MyFrmVEPROMS
{
get { return _MyFrmVEPROMS; }
set { _MyFrmVEPROMS = value; }
}
private bool _ConvertROsToTextDuringImport = false;
#endregion
public frmVEPROMS MyFrmVEPROMS { get; set; } = null;
private bool _ConvertROsToTextDuringImport = false;
private bool _ConvertROsAndTransitionsToText = false; // set to true when Approval creates an Export file
protected bool _ExportBothConvertedandNot = false; // set to true when Electronic Procedure export
@@ -40,32 +33,18 @@ namespace VEPROMS
//this will hold if a specific unit was selected
readonly protected int _UnitIndex;
private ItemInfo _ExternalTransitionItem = null;
public ItemInfo ExternalTransitionItem
{
get { return _ExternalTransitionItem; }
set { _ExternalTransitionItem = value; }
}
private Dictionary<int, int> floatFoldout;
public ItemInfo ExternalTransitionItem { get; set; } = null;
private Dictionary<int, int> floatFoldout;
private Dictionary<int, string> importedFormat;
private Dictionary<string, int> existingFormat;
private Dictionary<string, string> renamedUCFFormatName; // if format is renamed, this is its new name so references to it can be made
private Dictionary<int, int> renamedUCFFormatId; // if format is renamed, this is its old->new formatid
private int oldRODbID;
private int newRODbID;
private FolderInfo _MyNewFolder;
public FolderInfo MyNewFolder
{
get { return _MyNewFolder; }
}
private ProcedureInfo _MyNewProcedure;
public ProcedureInfo MyNewProcedure
{
get { return _MyNewProcedure; }
set { _MyNewProcedure = value; }
}
private string PEIPath;
private string _MyMode;
public FolderInfo MyNewFolder => _MyNewFolder;
public ProcedureInfo MyNewProcedure { get; set; }
private string PEIPath;
private readonly string _MyMode;
protected FolderInfo MyFolder = null;
protected DocVersionInfo MyDocVersion = null;
protected ProcedureInfo MyProcedure = null;
@@ -81,7 +60,7 @@ namespace VEPROMS
_MyMode = mode;
MyFolder = folderInfo;
InitializeComponent();
this.Text = mode + " Dialog for " + folderInfo.Name;
Text = $"{mode} Dialog for {folderInfo.Name}";
_UnitIndex = unitIndex;
if (_UnitIndex > 0)
@@ -103,9 +82,9 @@ namespace VEPROMS
MyDocVersion = docVersionInfo;
InitializeComponent();
if (mode.ToUpper().Contains("FORMAT"))
this.Text = mode;
Text = mode;
else
this.Text = mode + " Dialog for " + docVersionInfo.Name + " of " + docVersionInfo.MyFolder.Name;
Text = $"{mode} Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}";
_UnitIndex = unitIndex;
if (_UnitIndex > 0)
@@ -124,7 +103,7 @@ namespace VEPROMS
_MyMode = mode;
MyProcedure = procedureInfo;
InitializeComponent();
this.Text = mode + " Dialog for " + procedureInfo.DisplayNumber;
Text = $"{mode} Dialog for {procedureInfo.DisplayNumber}";
_UnitIndex = unitIndex;
if (_UnitIndex > 0)
@@ -173,7 +152,7 @@ namespace VEPROMS
ofd.InitialDirectory = PEIPath;
pnlImport.BringToFront();
}
this.Height = this.Height / formsize;
Height /= formsize;
}
private void btnExport_Click(object sender, EventArgs e)
{
@@ -220,19 +199,19 @@ namespace VEPROMS
string msg = "Finished Exporting:\n\n";
if (_MyMode.ToUpper().Contains("FORMAT"))
{
this.Cursor = Cursors.WaitCursor;
Cursor = Cursors.WaitCursor;
MyStart = DateTime.Now;
btnDoExport.Enabled = false;
lblExportStatus.Text = "Performing Export of UC Formats";
SaveExportUCF();
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
lblExportStatus.Text = "Format Export Completed in " + elapsed.ToString();
this.Cursor = Cursors.Default;
lblExportStatus.Text = $"Format Export Completed in {elapsed}";
Cursor = Cursors.Default;
}
else if (MyFolder != null)
{
this.Cursor = Cursors.WaitCursor;
Cursor = Cursors.WaitCursor;
MyStart = DateTime.Now;
btnDoExport.Enabled = false;
lblExportStatus.Text = "Performing Export";
@@ -240,7 +219,7 @@ namespace VEPROMS
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
lblExportStatus.Text = "Export Completed in " + elapsed.ToString();
this.Cursor = Cursors.Default;
Cursor = Cursors.Default;
msg += MyFolder.Name;
}
else if (MyProcedure != null)
@@ -281,7 +260,7 @@ namespace VEPROMS
}
this.Cursor = Cursors.WaitCursor;
Cursor = Cursors.WaitCursor;
MyStart = DateTime.Now;
btnDoExport.Enabled = false;
lblExportStatus.Text = "Performing Export";
@@ -294,7 +273,7 @@ namespace VEPROMS
xd.Save(fileLocation);
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
lblExportStatus.Text = "Export Completed in " + elapsed.ToString();
this.Cursor = Cursors.Default;
Cursor = Cursors.Default;
}
// added message to user when export of a procedure or procedure set has completed
if (successfullExport)
@@ -338,7 +317,7 @@ namespace VEPROMS
bool isImported = false;
bool canceledPressed = false;
btnImport.Enabled = false;
this.Cursor = Cursors.WaitCursor;
Cursor = Cursors.WaitCursor;
MyStart = DateTime.Now;
btnDoImport.Enabled = false;
lblImportStatus.Text = "Performing Import";
@@ -350,13 +329,13 @@ namespace VEPROMS
{
TurnChangeManagerOff.Execute();
MyFrmVEPROMS.DisablePing = true;// Turn-off SessionPing
bool result = TryToImportUCFs(ref isImported, ref canceledPressed);
bool result = TryToImportUCFs(ref isImported);
MyFrmVEPROMS.DisablePing = false;// Turn-on SessionPing
TurnChangeManagerOn.Execute();
if (!result) // B2019-006: let user know there was an error during import:
{
MessageBox.Show("Error occurred during import. Format(s) not imported.");
this.Cursor = Cursors.Default;
Cursor = Cursors.Default;
btnCloseImport.Enabled = true;
return;
}
@@ -400,7 +379,7 @@ namespace VEPROMS
if (isImported)
{
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
lblImportStatus.Text = "Import Completed in " + elapsed.ToString();
lblImportStatus.Text = $"Import Completed in {elapsed}";
}
else
{
@@ -408,7 +387,7 @@ namespace VEPROMS
btnDoImport.Enabled = true;
}
}
this.Cursor = Cursors.Default;
Cursor = Cursors.Default;
btnCloseImport.Enabled = true;
if (isImported)
{
@@ -436,7 +415,7 @@ namespace VEPROMS
}
}
private bool TryToImportUCFs(ref bool isImported, ref bool canceledPressed)
private bool TryToImportUCFs(ref bool isImported)
{
try
{
@@ -450,7 +429,7 @@ namespace VEPROMS
if (nl == null || nl.Count == 0) // B2019-014: Check contents of import file for compatible operation
{
MessageBox.Show("A Procedure export file can only be imported from the Tree View.", "Import Failed", MessageBoxButtons.OK);
this.Close();
Close();
isImported = false;
return false;
}
@@ -504,7 +483,7 @@ namespace VEPROMS
{
MessageBox.Show(ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
_MyLog.Warn("Failed during UC Formats Import", ex);
this.Close();
Close();
isImported = false;
return false;
}
@@ -519,7 +498,7 @@ namespace VEPROMS
{
MessageBox.Show(ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
_MyLog.Warn("Failed during Procedure Import", ex);
this.Close();
Close();
return false;
}
}
@@ -528,11 +507,9 @@ namespace VEPROMS
private bool _ImportingApprovedExportFile = false;
private bool ImportingApprovedExport(string fnAndPath)
{
bool rtnval = false;
int idx = fnAndPath.LastIndexOf("//") + 1;
int idx = fnAndPath.LastIndexOf("//") + 1;
string tmp = fnAndPath.Substring(idx);
rtnval = tmp.ToUpper().Contains("APPROVED_REV_");
return rtnval;
return tmp.ToUpper().Contains("APPROVED_REV_");
}
private bool ImportProcedure(ref bool isImported, ref bool canceledPressed)
{
@@ -544,15 +521,17 @@ namespace VEPROMS
if (ucf != null)
{
MessageBox.Show("A User Control of Format export file can only be imported from Administration on the V-Button.", "Import Failed", MessageBoxButtons.OK);
this.Cursor = Cursors.Default;
this.btnImport.Enabled = true; // allow user to select a different export file to import
this.btnCloseImport.Enabled = true; // allow user to close import dialog
Cursor = Cursors.Default;
btnImport.Enabled = true; // allow user to select a different export file to import
btnCloseImport.Enabled = true; // allow user to close import dialog
return false;
}
string rofolderpath = xd.DocumentElement.Attributes.GetNamedItem("rofolderpath").InnerText;
int rodbid = int.Parse(xd.DocumentElement.Attributes.GetNamedItem("rodbid").InnerText);
int rofstid = int.Parse(xd.DocumentElement.Attributes.GetNamedItem("rofstid").InnerText);
if (MyDocVersion.DocVersionAssociationCount > 0)
#pragma warning disable IDE0059 // Unnecessary assignment of a value - rofstid for Debugging/future use
int rofstid = int.Parse(xd.DocumentElement.Attributes.GetNamedItem("rofstid").InnerText);
#pragma warning restore IDE0059 // Unnecessary assignment of a value
if (MyDocVersion.DocVersionAssociationCount > 0)
{
// use current ROPath
MyRODb = RODb.GetJustRoDb(MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.RODbID);
@@ -560,15 +539,17 @@ namespace VEPROMS
// then ask if we should import using the current workingdraft RO Path, convert the ROs to text, or cancel the import
if (MyRODb.FolderPath != rofolderpath && !_ImportingApprovedExportFile) //B2020-095 don't display dialog if importing approved procedure export file
{
dlgImpHowToHandleROs dlg = new dlgImpHowToHandleROs();
dlg.ImportedROFolder = rofolderpath;
dlg.WorkingDraftROFolder = MyRODb.FolderPath;
dlg.ShowDialog(this);
dlgImpHowToHandleROs dlg = new dlgImpHowToHandleROs
{
ImportedROFolder = rofolderpath,
WorkingDraftROFolder = MyRODb.FolderPath
};
dlg.ShowDialog(this);
if (dlg.CancelImport)
{
this.Cursor = Cursors.Default;
this.btnImport.Enabled = true; // allow user to select a different export file to import
this.btnDoImport.Enabled = true; // allow user to change mind and perform the import
Cursor = Cursors.Default;
btnImport.Enabled = true; // allow user to select a different export file to import
btnDoImport.Enabled = true; // allow user to change mind and perform the import
return false; // Return False to Indicate that the Import did not succeed
}
_ConvertROsToTextDuringImport = dlg.ConvertROsToText;
@@ -612,16 +593,18 @@ namespace VEPROMS
if (localROPaths.Count == 0)
{
MessageBox.Show("There has been no RO folder defined for this database.\r\n\r\nIn order to import a procedure, you need to assign a RO folder path.\r\n\r\nImport process will terminate.");
this.Cursor = Cursors.Default;
Cursor = Cursors.Default;
return false;// Return False to Indicate that the Import did not succeed
}
else
{
this.Cursor = Cursors.Default;
dlgPickROFolder dlg = new dlgPickROFolder();
dlg.ImportedROFolder = rofolderpath;
dlg.LocalROFolders = localROPaths;
dlg.ShowDialog(this);
Cursor = Cursors.Default;
dlgPickROFolder dlg = new dlgPickROFolder
{
ImportedROFolder = rofolderpath,
LocalROFolders = localROPaths
};
dlg.ShowDialog(this);
if ((dlg.SelectedROFolder ?? string.Empty) != string.Empty) // B2015-216 If the return value is null treat it like an empty string
{
MyRODb = RODb.GetByFolderPath(dlg.SelectedROFolder);
@@ -645,7 +628,7 @@ namespace VEPROMS
else
{
MessageBox.Show("Since you did not pick an existing RO folder defined for this database, the import process will terminate.");
this.Close();// Close the Import Window
Close();// Close the Import Window
return false;// Return False to Indicate that the Import did not succeed
}
}
@@ -655,9 +638,9 @@ namespace VEPROMS
bool didImp = LoadFormats(xd, "procedure/formats/format");
if (!didImp)
{
this.Cursor = Cursors.Default;
this.btnImport.Enabled = true; // allow user to select a different export file to import
this.btnDoImport.Enabled = true; // allow user to change mind and perform the import
Cursor = Cursors.Default;
btnImport.Enabled = true; // allow user to select a different export file to import
btnDoImport.Enabled = true; // allow user to change mind and perform the import
return false; // Return False to Indicate that the Import did not succeed
}
// use resolvedProcNum to determine if procedure is 'unique', i.e. if the procedure number exists
@@ -763,7 +746,7 @@ namespace VEPROMS
ProcedureInfo lastProcedure = null;
foreach (ProcedureInfo pi in MyDocVersion.Procedures.OfType<ProcedureInfo>())
lastProcedure = pi;
_MyNewProcedure = AddProcedure(xd.DocumentElement, MyDocVersion, lastProcedure);
MyNewProcedure = AddProcedure(xd.DocumentElement, MyDocVersion, lastProcedure);
//update transitions
AddTransitions(PendingTransitions);
PendingTransitions.Save(fn);
@@ -803,7 +786,7 @@ namespace VEPROMS
}
xd.SelectSingleNode("procedure/content/@number").InnerText = string.Format("Copy({0}) of {1}", count.ToString(), number);
//add imported procedure and copy count
_MyNewProcedure = AddProcedure(xd.DocumentElement, MyDocVersion, lastProcedure);
MyNewProcedure = AddProcedure(xd.DocumentElement, MyDocVersion, lastProcedure);
//update transitions
AddTransitions(PendingTransitions);
FixFloatingFoldouts();
@@ -861,7 +844,7 @@ namespace VEPROMS
return false;
}
//add imported procedure
_MyNewProcedure = AddProcedure(xd.DocumentElement, MyDocVersion, lastProcedure);
MyNewProcedure = AddProcedure(xd.DocumentElement, MyDocVersion, lastProcedure);
//update transitions
AddTransitions(PendingTransitions);
FixFloatingFoldouts();
@@ -884,9 +867,9 @@ namespace VEPROMS
bool didImp = LoadFormats(xd, "folder/formats/format");
if (!didImp)
{
this.Cursor = Cursors.Default;
this.btnImport.Enabled = true; // allow user to select a different export file to import
this.btnDoImport.Enabled = true; // allow user to change mind and perform the import
Cursor = Cursors.Default;
btnImport.Enabled = true; // allow user to select a different export file to import
btnDoImport.Enabled = true; // allow user to change mind and perform the import
return false; // Return False to Indicate that the Import did not succeed
}
string name = xd.DocumentElement.Attributes.GetNamedItem("name").InnerText;
@@ -947,14 +930,16 @@ namespace VEPROMS
pi = AddProcedure(xd.DocumentElement, dvi, pi);
GC.Collect(); // need to cleanup memory after importing each procedure due to use of Regular Expressions in processing RO and Transition links
}
DirectoryInfo di = new DirectoryInfo(PEIPath);
DirectoryInfo[] dis = di.GetDirectories();
for (int d = 0; d < dis.Length; d++)
dis[d].Delete(true);
lblImportStatus.Text = "Updating Transitions";
AddTransitions();
FixFloatingFoldouts();
SaveTransitionAndItemContentIDs();
// B2026-034 remove the folders created from un-ziping the import set file - this was done prior to updating transitions
// so if there was an issue deleting these temporay folders and files, the actual importing will be completed
DirectoryInfo di = new DirectoryInfo(PEIPath);
DirectoryInfo[] dis = di.GetDirectories();
for (int d = 0; d < dis.Length; d++)
dis[d].Delete(true);
return true;
}
}
@@ -1002,7 +987,8 @@ namespace VEPROMS
c.Save();
}
}
Dictionary<string, string> existingCopyFCName = new Dictionary<string, string>();
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
Dictionary<string, string> existingCopyFCName = new Dictionary<string, string>();
// note that this is used when importing a folder or a procedure (procedure was added for UCF changes)
private bool LoadFormats(XmlDocument xd, string xmlpath)
{
@@ -1013,21 +999,20 @@ namespace VEPROMS
importedFormat = new Dictionary<int, string>();
XmlNodeList nl = xd.SelectNodes(xmlpath);
bool conflictingUCFdata = false;
List<string> existingFC = new List<string>();
List<string> importedFC = new List<string>();
List<string> fname = new List<string>();
foreach (XmlNode nd in nl)
{
string copyOfUCF = null;
// see if any of the imported formats are 'UCF' formats, i.e. have config data. If they are UCF,
// see if this is different that what is in the database. If it is, the user needs to decide
// whether to associate sections with existing UCF format or the new one. All UCF formats will be
// connected the same way, i.e. existing or new.
int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText);
string name = nd.Attributes.GetNamedItem("name").InnerText;
// see if any of the imported formats are 'UCF' formats, i.e. have config data. If they are UCF,
// see if this is different that what is in the database. If it is, the user needs to decide
// whether to associate sections with existing UCF format or the new one. All UCF formats will be
// connected the same way, i.e. existing or new.
#pragma warning disable IDE0059 // Unnecessary assignment of a value - formatid for Debugging/future use
int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText);
#pragma warning restore IDE0059 // Unnecessary assignment of a value
string name = nd.Attributes.GetNamedItem("name").InnerText;
string config = null;
XmlNode cfg = nd.Attributes.GetNamedItem("config");
if (cfg != null) config = cfg.InnerText;
@@ -1036,10 +1021,10 @@ namespace VEPROMS
FormatInfo exFI = FormatInfo.Get(existingFormat[name]);
if (exFI.Config != config && exFI.Config != "" && exFI.Config != null && config != "" && config != null)
{
// See if there are copies of this UCF format, if so, this may match (have same config) one of those and should
// use it before stating there is conflicting data.
copyOfUCF = ContentsOfUCFExists(name, config);
if (copyOfUCF == null)
// See if there are copies of this UCF format, if so, this may match (have same config) one of those and should
// use it before stating there is conflicting data.
string copyOfUCF = ContentsOfUCFExists(name, config);
if (copyOfUCF == null)
{
existingFC.Add(exFI.Config);
importedFC.Add(config);
@@ -1067,15 +1052,16 @@ namespace VEPROMS
if (pnameAttrib != null)
pname = pnameAttrib.InnerText;
if (pname == null) continue;
string description = null;
XmlNode descript = nd.Attributes.GetNamedItem("description");
if (descript != null) description = descript.InnerText;
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
// If the format that is being imported exists as a copy (already was imported and a 'Copy x of name' was created) and the imported and
// existing config match, use the existing (copied) format's name rather than importing it again (the dictionary was set up during
// the import formats process.
if (existingCopyFCName.ContainsKey(name)) name = existingCopyFCName[name];
XmlNode descript = nd.Attributes.GetNamedItem("description");
#pragma warning disable IDE0059 // Unnecessary assignment of a value - description, userid, dts for future use
string description = descript?.InnerText;
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
#pragma warning restore IDE0059 // Unnecessary assignment of a value
// If the format that is being imported exists as a copy (already was imported and a 'Copy x of name' was created) and the imported and
// existing config match, use the existing (copied) format's name rather than importing it again (the dictionary was set up during
// the import formats process.
if (existingCopyFCName.ContainsKey(name)) name = existingCopyFCName[name];
// compare this imported format to the original in the database.
// If format name exists, or if it has same config data, just use it.
@@ -1096,11 +1082,11 @@ namespace VEPROMS
// parent format will always be in there, if it is a new format, it will be added before the child. Check just in case (no null reference).
if (!existingFormat.ContainsKey(pname)) break;
int pid = existingFormat[pname];
Format pformat = Format.Get(pid);
_ = Format.Get(pid);
// if the new format doesn't exist, it will be added (after these other checks). Otherwise, handle the
// various cases listed above:
if (existingFormat.ContainsKey(name))
// if the new format doesn't exist, it will be added (after these other checks). Otherwise, handle the
// various cases listed above:
if (existingFormat.ContainsKey(name))
{
@@ -1219,7 +1205,6 @@ namespace VEPROMS
{
int oldid = int.Parse(nd.Attributes.GetNamedItem("old").InnerText);
int newid = int.Parse(nd.Attributes.GetNamedItem("new").InnerText);
//if (!Old2NewContent.ContainsKey(oldid))
Old2NewLibDoc.Add(oldid, newid);
}
File.Delete(fn);
@@ -1360,8 +1345,8 @@ namespace VEPROMS
}
private void ExportFormats(FormatInfoList fil, XmlElement xn, string nodename, bool doElement)
{
XmlElement xe = null;
if (doElement) xe = xn.OwnerDocument.CreateElement(nodename);
XmlElement xe;
if (doElement) xe = xn.OwnerDocument.CreateElement(nodename);
else xe = xn;
foreach (FormatInfo fi in fil)
ExportFormat(xe, fi, "format");
@@ -1487,7 +1472,7 @@ namespace VEPROMS
{
pbExportProcedure.Value = 0;
pbExportProcedure.Maximum = dvi.Procedures.Count;
lblExportProcedure.Text = pbExportProcedure.Maximum.ToString() + " Procedures";
lblExportProcedure.Text = $"{pbExportProcedure.Maximum} Procedures";
foreach (ItemInfo ii in dvi.Procedures)
{
XmlDocument xd = new XmlDocument();
@@ -1618,8 +1603,15 @@ namespace VEPROMS
public void ExportItem(XmlDocument xd, ItemInfo ii, string nodename)
{
XmlElement xe = xd.CreateElement(nodename);
if (ii.IsProcedure)
//B2026-016 - Fix error pulling Reference Object info into Export
if (ii.MyDocVersion.DocVersionAssociationCount == 0)
{
MessageBox.Show("Prior to Exporting Procedures you must set the Referenced Object Database", "No RO Database set", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
XmlElement xe = xd.CreateElement(nodename);
if (ii.IsProcedure)
{
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rodbid", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.RODbID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rofolderpath", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath));
@@ -1632,14 +1624,14 @@ namespace VEPROMS
private void ExportItem(XmlElement xn, ItemInfo ii, string nodename)
{
/*
/*
ItemID
PreviousID
ContentID
DTS
*/
XmlElement xe = null;
if (xn.Name == "procedure")
XmlElement xe;
if (xn.Name == "procedure")
xe = xn;
else
{
@@ -2425,12 +2417,9 @@ namespace VEPROMS
}
}
private void AddTransitions()
{
AddTransitions(PendingTransitions);
}
private void AddTransitions() => AddTransitions(PendingTransitions);
private void AddTransitions(XmlDocument xd)
private void AddTransitions(XmlDocument xd)
{
/*
Content
@@ -2450,7 +2439,7 @@ namespace VEPROMS
type,id,toid,rangeid
*/
XmlNodeList nl = xd.SelectNodes("//transition");
lblImportStatus.Text = string.Format("Updating {0} Tranistions", nl.Count.ToString());
lblImportStatus.Text = $"Updating {nl.Count} Tranistions";
foreach (XmlNode nd in nl)
{
@@ -2513,9 +2502,8 @@ namespace VEPROMS
}
else //transition to existing itemid (external)
{
bool forceConvertToText = false;
int transitionid = int.Parse(nd.Attributes.GetNamedItem("transitionid").InnerText);
int isrange = int.Parse(nd.Attributes.GetNamedItem("isrange").InnerText);
int transitionid = int.Parse(nd.Attributes.GetNamedItem("transitionid").InnerText);
int isrange = int.Parse(nd.Attributes.GetNamedItem("isrange").InnerText);
string config = nd.Attributes.GetNamedItem("config").InnerText;
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
@@ -2529,43 +2517,44 @@ namespace VEPROMS
fromid = Old2NewContent[fromid];
Content cc = Content.Get(fromid);
Transition tt = Transition.MakeTransition(cc, Item.Get(toid), Item.Get(rangeid), isrange, trantype, config, dts, userid);
if (tt.TransitionID < 0)
{
forceConvertToText = true;
_DidProcessTransitions |= cc.FixTransitionText(TransitionInfo.Get(tt.TransitionID), forceConvertToText); // B2017-076 FixTransitionText will tell us if transitions were processed/changed
cc.Save();
nd.InnerText = "done";
}
else
{
transitionid = tt.TransitionID;
string replacewith;
if (isrange == 0)
replacewith = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid);
else
replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
cc.Text = cc.Text.Replace(lookfor, replacewith);
if (cc.MyGrid != null && !string.IsNullOrEmpty(cc.MyGrid.Data))
{
cc.MyGrid.Data = cc.MyGrid.Data.Replace(lookfor, replacewith);
}
bool forceConvertToText;
if (tt.TransitionID < 0)
{
forceConvertToText = true;
_DidProcessTransitions |= cc.FixTransitionText(TransitionInfo.Get(tt.TransitionID), forceConvertToText); // B2017-076 FixTransitionText will tell us if transitions were processed/changed
cc.Save();
nd.InnerText = "done";
}
else
{
transitionid = tt.TransitionID;
string replacewith;
// B2016-176, B2016-197 - external transitions should be converted to text
forceConvertToText = true;
_DidProcessTransitions |= cc.FixTransitionText(TransitionInfo.Get(tt.TransitionID), forceConvertToText); // B2017-076 FixTransitionText will tell us if transitions were processed/changed
// B2017=003 make sure any grid changes are saved.
// done here because FixTransitionText() could update the transitions in the grid
if (cc.MyGrid != null && cc.MyGrid.Data != "")
cc.MyGrid.Save();
cc.Save();
nd.InnerText = "done";
_DidConvertTransitionsToText |= (forceConvertToText && _DidProcessTransitions); // B2016-225 - notify user when transitions are converted to text
}
}
if (isrange == 0)
replacewith = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid);
else
replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
cc.Text = cc.Text.Replace(lookfor, replacewith);
if (cc.MyGrid != null && !string.IsNullOrEmpty(cc.MyGrid.Data))
{
cc.MyGrid.Data = cc.MyGrid.Data.Replace(lookfor, replacewith);
}
// B2016-176, B2016-197 - external transitions should be converted to text
forceConvertToText = true;
_DidProcessTransitions |= cc.FixTransitionText(TransitionInfo.Get(tt.TransitionID), forceConvertToText); // B2017-076 FixTransitionText will tell us if transitions were processed/changed
// B2017=003 make sure any grid changes are saved.
// done here because FixTransitionText() could update the transitions in the grid
if (cc.MyGrid != null && cc.MyGrid.Data != "")
cc.MyGrid.Save();
cc.Save();
nd.InnerText = "done";
_DidConvertTransitionsToText |= (forceConvertToText && _DidProcessTransitions); // B2016-225 - notify user when transitions are converted to text
}
}
}
}
}
@@ -2611,7 +2600,6 @@ namespace VEPROMS
if (formatID >= importedFormat.Count) return null; // formatID not found, use default file name
formatName = importedFormat[formatID]; // for backwards compatibility with older export files
}
if (renamedUCFFormatName != null && renamedUCFFormatName.ContainsKey(formatFileName)) formatName = renamedUCFFormatName[formatName];
formatID = existingFormat[formatName];
return Format.Get(formatID);
}
@@ -2659,9 +2647,11 @@ namespace VEPROMS
MyRODb = AddRODb(xrodb);
ROFst rofst = AddROFst(xrofst);
DocVersionAssociation dva = dv.DocVersionAssociations.Add(rofst);
#pragma warning disable IDE0059 // Unnecessary assignment of a value - dva kept for side effect code
DocVersionAssociation dva = dv.DocVersionAssociations.Add(rofst);
#pragma warning restore IDE0059 // Unnecessary assignment of a value
dv.Save();
dv.Save();
}
return DocVersionInfo.Get(dv.VersionID);
@@ -2896,9 +2886,11 @@ namespace VEPROMS
foreach (XmlNode nd in xn.SelectNodes("rousage"))
{
string rousageid = nd.Attributes.GetNamedItem("rousageid").InnerText;
string roid = nd.Attributes.GetNamedItem("roid").InnerText;
#pragma warning disable IDE0059 // Unnecessary assignment of a value - roid for Debugging/future use
string roid = nd.Attributes.GetNamedItem("roid").InnerText;
#pragma warning restore IDE0059 // Unnecessary assignment of a value
string findLink = @"<START\].*?\[END>";
string findLink = @"<START\].*?\[END>";
content.Text = content.Text.Replace("<START]<START]", "<START]").Replace(@"[END><START]", @"[END>\v0 \v <START]"); //B2020-057 bad RO link - remove extra START and insert comment off/on between <END]<START]
content.Save();
MatchCollection ms = Regex.Matches(content.Text, findLink);
@@ -2934,7 +2926,7 @@ namespace VEPROMS
if (prefix == @"\v ")
part1 = part1.Substring(0, part1.Length - 3);
else
part1 = part1.Substring(0, part1.Length - 3) + " ";
part1 = $"{part1.Substring(0, part1.Length - 3)} ";
//modify part3 based on suffix
if (suffix == @"\v0 ")
part3 = part3.Substring(4);
@@ -3105,8 +3097,10 @@ namespace VEPROMS
{
foreach (XmlNode nd in xn.SelectNodes("annotation"))
{
int typeid = int.Parse(nd.Attributes.GetNamedItem("typeid").InnerText);
string rtftext = nd.Attributes.GetNamedItem("rtftext").InnerText;
#pragma warning disable IDE0059 // Unnecessary assignment of a value - typeid for debugging/future use
int typeid = int.Parse(nd.Attributes.GetNamedItem("typeid").InnerText);
#pragma warning restore IDE0059 // Unnecessary assignment of a value
string rtftext = nd.Attributes.GetNamedItem("rtftext").InnerText;
string searchtext = nd.Attributes.GetNamedItem("searchtext").InnerText;
string config = nd.Attributes.GetNamedItem("config").InnerText;
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
@@ -3841,7 +3835,7 @@ namespace VEPROMS
if (d == null)
{
// B2019-035 better memory management. Prior logic would eat up memory (and not free it).
string libkey = libtitle + "_" + dts.ToString();
string libkey = $"{libtitle}_{dts}";
if (ExistingLibDocs.ContainsKey(libkey))
d = Document.Get(ExistingLibDocs[libkey]); // found library document in existing database
}
@@ -3854,7 +3848,7 @@ namespace VEPROMS
string config = xn.Attributes.GetNamedItem("config").InnerText;
string userid = xn.Attributes.GetNamedItem("userid").InnerText;
string fileextension = xn.Attributes.GetNamedItem("fileextension").InnerText;
if (libtitle != "") libtitle = libtitle + "_" + dts.ToString(); // if a lib document, append the date/time to the title incase there are duplicate titles
if (libtitle != "") libtitle = $"{libtitle}_{dts}"; // if a lib document, append the date/time to the title incase there are duplicate titles
d = Document.MakeDocument(libtitle, doccontent, docascii, config, dts, userid, fileextension);
d.Save();
Old2NewLibDoc.Add(docid, d.DocID);
@@ -3864,20 +3858,14 @@ namespace VEPROMS
return d;
}
#endregion
#endregion
private void btnCloseExport_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnCloseExport_Click(object sender, EventArgs e) => Close();
private void btnCloseImport_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnCloseImport_Click(object sender, EventArgs e) => Close();
//unset the unit (SelectedSlave)
private void RemoveUnit_OnClose(object sender, EventArgs e)
//unset the unit (SelectedSlave)
private void RemoveUnit_OnClose(object sender, EventArgs e)
{
if (MyProcedure != null)
{
@@ -19,7 +19,7 @@ namespace VEPROMS
private readonly AnnotationTypeInfo _AnnotationType;
private readonly string multiseparator = ",";
private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
private static readonly Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, folderInfo, myFrmVEPROMS, ( unitIndex))
{
@@ -261,10 +261,8 @@ namespace VEPROMS
{
string rodbpath = rodb.FolderPath;
string rocval = roc.value;
if (rocval == null) rocval = Array.Find(roc.children, x => x.value.Contains('.')).value;
if (rocval == null) return "";
string rocval = roc.value ?? Array.Find(roc.children, x => x.value.Contains('.')).value;
if (rocval == null) return "";
string imgname;
if (isMulti)
{
@@ -1,54 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace VEPROMS
{
public partial class dlgImpHowToHandleROs : Form
{
private string _ImportedROFolder;
public string ImportedROFolder
{
get { return _ImportedROFolder; }
set { _ImportedROFolder = value; }
}
private string _WorkingDraftROFolder;
public string WorkingDraftROFolder
{
get { return _WorkingDraftROFolder; }
set { _WorkingDraftROFolder = value; }
}
private bool _CancelImport = true; // default to truen in case the dialog is closed with the red X in the upper right corner
public bool CancelImport
{
get { return _CancelImport; }
}
private bool _ConvertROsToText = false;
public bool ConvertROsToText
{
get { return _ConvertROsToText; }
}
public dlgImpHowToHandleROs()
{
InitializeComponent();
}
public string ImportedROFolder { get; set; }
public string WorkingDraftROFolder { get; set; }
private bool _CancelImport = true; // default to truen in case the dialog is closed with the red X in the upper right corner
public bool CancelImport => _CancelImport;
private bool _ConvertROsToText = false;
public bool ConvertROsToText => _ConvertROsToText;
public dlgImpHowToHandleROs() => InitializeComponent();
private void dlgImpHowToHandleROs_Load(object sender, EventArgs e)
{
rtbROPathInfo.Text = string.Format("The current Working Draft RO folder path is:\n\n {0}\n\nThe procedure you are trying to import is from a database that has the RO folder path:\n\n {1}\n\nSelect from the options below on how to handle the RO values when importing this procedure.", _WorkingDraftROFolder, _ImportedROFolder);
}
private void dlgImpHowToHandleROs_Load(object sender, EventArgs e) => rtbROPathInfo.Text = string.Format("The current Working Draft RO folder path is:\n\n {0}\n\nThe procedure you are trying to import is from a database that has the RO folder path:\n\n {1}\n\nSelect from the options below on how to handle the RO values when importing this procedure.", WorkingDraftROFolder, ImportedROFolder);
private void btnUseCurrentROs_Click(object sender, EventArgs e)
{
_ConvertROsToText = _CancelImport = false;
}
private void btnUseCurrentROs_Click(object sender, EventArgs e) => _ConvertROsToText = _CancelImport = false;
private void btnROsToText_Click(object sender, EventArgs e)
private void btnROsToText_Click(object sender, EventArgs e)
{
_CancelImport = false;
_ConvertROsToText = true;
@@ -60,9 +29,6 @@ namespace VEPROMS
_ConvertROsToText = false;
}
private void dlgImpHowToHandleROs_Resize(object sender, EventArgs e)
{
rtbROPathInfo.Refresh();
}
}
private void dlgImpHowToHandleROs_Resize(object sender, EventArgs e) => rtbROPathInfo.Refresh();
}
}
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
@@ -38,7 +31,7 @@ namespace VEPROMS
usersettings.SetUserSetting_MSWord_Summary_Prompt(false);
}
this.Close();
Close();
}
}
@@ -1,12 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using Volian.Controls.Library;
using System.Linq;
@@ -26,11 +21,8 @@ namespace VEPROMS
private List<MembershipInfo> myMembershipInfoList;
private Folder myFolder;
public dlgManageSecurity()
{
InitializeComponent();
}
private void dlgManageSecurity_Load(object sender, EventArgs e)
public dlgManageSecurity() => InitializeComponent();
private void dlgManageSecurity_Load(object sender, EventArgs e)
{
//load all folders
myFolder = Folder.Get(1);
@@ -216,7 +208,7 @@ namespace VEPROMS
MembershipInfo mi = (MembershipInfo)lstMembers.SelectedItem;
string selectedUserID = mi.MyUserUserID;
string msg = "Are you sure you want to remove this Group Member?";
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
if (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
{
@@ -255,7 +247,7 @@ namespace VEPROMS
MessageBox.Show("There are still users who are members of this group. You need to delete all members in order to delete this group.", "Group Has Members", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (MessageBox.Show("Are you sure you want to delete this group?", "Confirm Deleting Group", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
if (MessageBox.Show("Are you sure you want to delete this group?", "Confirm Deleting Group", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Group.Delete(gi.GID);
LoadRefreshGroupUsers();
@@ -331,10 +323,12 @@ namespace VEPROMS
private void addUserToolStripMenuItem_Click(object sender, EventArgs e)
{
User u = User.MakeUser("[Enter New UserID]", "", "", "", "", "", "", "", "", "", "", DateTime.Now, "");
frmManageUser frm = new frmManageUser("add");
frm.MyUser = u;
frm.Text = "Enter New UserID"; //C2026-002 Change Title bar on Add/Edit User
if (frm.ShowDialog(this) == DialogResult.OK)
frmManageUser frm = new frmManageUser("add")
{
MyUser = u,
Text = "Enter New UserID" //C2026-002 Change Title bar on Add/Edit User
};
if (frm.ShowDialog(this) == DialogResult.OK)
{
u = frm.MyUser;
u.Save();
@@ -362,9 +356,11 @@ namespace VEPROMS
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
using (User u = User.Get(ui.UID))
{
frmManageUser frm = new frmManageUser("edit");
frm.MyUser = u;
if (frm.ShowDialog(this) == DialogResult.OK)
frmManageUser frm = new frmManageUser("edit")
{
MyUser = u
};
if (frm.ShowDialog(this) == DialogResult.OK)
{
frm.MyUser.Save();
@@ -397,7 +393,7 @@ namespace VEPROMS
}
int nummemberships = ui.UserMemberships.Count(mi => mi.EndDate == null || mi.EndDate == string.Empty);
string mem_text = nummemberships > 0 ? "\r\nNote that this will remove all memberships that this user has." : "";
if (MessageBox.Show($"Are you sure you want to delete this user?{mem_text}", "Confirm Deleting User", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
if (MessageBox.Show($"Are you sure you want to delete this user?{mem_text}", "Confirm Deleting User", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
foreach (MembershipInfo minfo in ui.UserMemberships.Where(mi => mi.EndDate == null || mi.EndDate == string.Empty))
{
@@ -477,7 +473,7 @@ namespace VEPROMS
{
MembershipInfo mi = (MembershipInfo)lstGroups.SelectedItem;
string msg = "Are you sure you want to remove this Group Member?";
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
if (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
{
@@ -505,12 +501,14 @@ namespace VEPROMS
pnlGroups.Controls.Clear();
foreach (GroupInfo gi in myGroupInfoList)
{
RadioButton rb = new RadioButton();
rb.Text = gi.GroupName;
rb.Parent = pnlGroups;
rb.Dock = DockStyle.Top;
rb.Tag = gi;
rb.CheckedChanged -= new EventHandler(rb_CheckedChanged);
RadioButton rb = new RadioButton
{
Text = gi.GroupName,
Parent = pnlGroups,
Dock = DockStyle.Top,
Tag = gi
};
rb.CheckedChanged -= new EventHandler(rb_CheckedChanged);
rb.CheckedChanged += new EventHandler(rb_CheckedChanged);
pnlGroups.Controls.Add(rb);
rb.BringToFront();
+2 -7
View File
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
@@ -11,8 +6,8 @@ namespace VEPROMS
{
public partial class dlgPhoneList : Form
{
private DocVersionConfig _docVersionConfig;
private string _origPhoneList;
private readonly DocVersionConfig _docVersionConfig;
private readonly string _origPhoneList;
public dlgPhoneList(DocVersionConfig dvc)
{
_docVersionConfig = dvc;
@@ -1,57 +1,24 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace VEPROMS
{
public partial class dlgPickROFolder : Form
{
private string _ImportedROFolder;
public string ImportedROFolder
{
get { return _ImportedROFolder; }
set { _ImportedROFolder = value; }
}
private List<string> _LocalROFolders;
public List<string> LocalROFolders
{
get { return _LocalROFolders; }
set { _LocalROFolders = value; }
}
private string _SelectedROFolder;
public string SelectedROFolder
{
get { return _SelectedROFolder; }
set { _SelectedROFolder = value; }
}
public dlgPickROFolder()
{
InitializeComponent();
}
public string ImportedROFolder { get; set; }
public List<string> LocalROFolders { get; set; }
public string SelectedROFolder { get; set; }
public dlgPickROFolder() => InitializeComponent();
private void dlgPickROFolder_Load(object sender, EventArgs e)
private void dlgPickROFolder_Load(object sender, EventArgs e)
{
lblImportRO.Text = string.Format("The procedure you are trying to import was exported from a database that had the following RO folder path:\r\n\r\n{0}\r\n\r\nSelect from the following RO Folders that exist in the database you are trying to import this procedure into so that the import process can continue", _ImportedROFolder);
lblImportRO.Text = string.Format("The procedure you are trying to import was exported from a database that had the following RO folder path:\r\n\r\n{0}\r\n\r\nSelect from the following RO Folders that exist in the database you are trying to import this procedure into so that the import process can continue", ImportedROFolder);
clbLocalROFolders.DataSource = LocalROFolders;
}
private void clbLocalROFolders_SelectedIndexChanged(object sender, EventArgs e)
{
if (clbLocalROFolders.CheckedItems.Count > 0)
{
btnOkay.Enabled = true;
}
else
btnOkay.Enabled = false;
}
private void clbLocalROFolders_SelectedIndexChanged(object sender, EventArgs e) => btnOkay.Enabled = clbLocalROFolders.CheckedItems.Count > 0;
private void btnOkay_Click(object sender, EventArgs e)
{
SelectedROFolder = clbLocalROFolders.CheckedItems[0].ToString();
}
}
private void btnOkay_Click(object sender, EventArgs e) => SelectedROFolder = clbLocalROFolders.CheckedItems[0].ToString();
}
}
@@ -1,24 +1,19 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using VEPROMS.CSLA.Library;
using JR.Utils.GUI.Forms;
using System.Linq;
namespace VEPROMS
{
public partial class dlgPrintAllApprovedProcedures : DevComponents.DotNetBar.Office2007Form
{
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private StringBuilder NotApproved;
private DocVersionInfo _DocVersionInfo = null;
private int unitId = 0;
private readonly StringBuilder NotApproved;
private readonly DocVersionInfo _DocVersionInfo = null;
private readonly int unitId = 0;
public dlgPrintAllApprovedProcedures(DocVersionInfo dvi)
{
InitializeComponent();
@@ -43,7 +38,7 @@ namespace VEPROMS
// if SelectedSlave is > 0 then we are printing Approved Child Procedures and
// subtract one from the index (unitId) into the list of child names (UnitNames)
if (unitId > 0)
rtnstr += "\\" + _DocVersionInfo.UnitNames[unitId - 1]; // append Child name to path
rtnstr += $"\\{_DocVersionInfo.UnitNames[unitId - 1]}"; // append Child name to path
return rtnstr;
}
@@ -91,7 +86,7 @@ namespace VEPROMS
int pdfCount = 0;
DeleteExistingPDFs(); // delete existing PDFs in the target folder
// Get the Child index for Parent/Child procedure - if not Parent/Child this will be zero
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures)
foreach (ProcedureInfo myProc in _DocVersionInfo.Procedures.OfType<ProcedureInfo>())
{
RevisionInfoList ril = RevisionInfoList.GetByItemID(myProc.ItemID);
if (ril.Count == 0)
@@ -144,7 +139,7 @@ namespace VEPROMS
_MyLog.Error("Print All Approved PDFs", ex);// save error in PROMS error log
MessageBox.Show(ex.Message, ex.GetType().FullName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
this.Close(); // close dialog
Close(); // close dialog
}
private void SaveApprovedPDFToFolder(RevisionInfo revInfo,string PDFName)
{
@@ -168,10 +163,6 @@ namespace VEPROMS
{
DirectoryInfo di = new DirectoryInfo(txbApprovedPDFsPath.Text);
FileInfo[] fis;
//DirectoryInfo[] diAry = di.GetDirectories(txbApprovedPDFsPath.Text);
//DirectoryInfo di_fmtgen;
// remove all of the PDF fils
//di_fmtgen = diAry[0];
try
{
fis = di.GetFiles("*.pdf");
@@ -189,14 +180,8 @@ namespace VEPROMS
}
}
private void txbApprovedPDFsPath_TextChanged(object sender, EventArgs e)
{
btnPrntAllAprv.Enabled = txbApprovedPDFsPath.Text.Length > 0;
}
private void txbApprovedPDFsPath_TextChanged(object sender, EventArgs e) => btnPrntAllAprv.Enabled = txbApprovedPDFsPath.Text.Length > 0;
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
private void btnCancel_Click(object sender, EventArgs e) => Close();
}
}
+154 -137
View File
@@ -28,142 +28,158 @@
/// </summary>
private void InitializeComponent()
{
this.btnOK = new DevComponents.DotNetBar.ButtonX();
this.btnCancel = new DevComponents.DotNetBar.ButtonX();
this.label1 = new System.Windows.Forms.Label();
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.dateTimeInput1 = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
this.btnNow = new DevComponents.DotNetBar.ButtonX();
((System.ComponentModel.ISupportInitialize)(this.dateTimeInput1)).BeginInit();
this.SuspendLayout();
//
// btnOK
//
this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnOK.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(18, 111);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(64, 23);
this.btnOK.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnOK.TabIndex = 1;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(179, 111);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(64, 23);
this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCancel.TabIndex = 2;
this.btnCancel.Text = "Cancel";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(3, 19);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(229, 15);
this.label1.TabIndex = 3;
this.label1.Text = "Show Change Bars on Changes Starting:";
//
// superTooltip1
//
this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray);
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
//
// dateTimeInput1
//
//
//
//
this.dateTimeInput1.BackgroundStyle.Class = "DateTimeInputBackground";
this.dateTimeInput1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dateTimeInput1.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown;
this.dateTimeInput1.ButtonDropDown.Visible = true;
this.dateTimeInput1.CustomFormat = "MM/dd/yyyy HH:mm:ss";
this.dateTimeInput1.DateTimeSelectorVisibility = DevComponents.Editors.DateTimeAdv.eDateTimeSelectorVisibility.DateSelector;
this.dateTimeInput1.Format = DevComponents.Editors.eDateTimePickerFormat.Custom;
this.dateTimeInput1.IsPopupCalendarOpen = false;
this.dateTimeInput1.Location = new System.Drawing.Point(30, 51);
//
//
//
//
//
//
this.dateTimeInput1.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dateTimeInput1.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1);
this.dateTimeInput1.MonthCalendar.ClearButtonVisible = true;
//
//
//
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dateTimeInput1.MonthCalendar.DisplayMonth = new System.DateTime(2016, 2, 1, 0, 0, 0, 0);
//
//
//
this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90;
this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dateTimeInput1.MonthCalendar.TodayButtonVisible = true;
this.dateTimeInput1.Name = "dateTimeInput1";
this.dateTimeInput1.Size = new System.Drawing.Size(146, 20);
this.dateTimeInput1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.dateTimeInput1, new DevComponents.DotNetBar.SuperTooltipInfo("Change Bar Start Date", "", "Only the changes made after this date will have change bars.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(138, 67)));
this.dateTimeInput1.TabIndex = 4;
this.dateTimeInput1.TimeSelectorTimeFormat = DevComponents.Editors.DateTimeAdv.eTimeSelectorFormat.Time24H;
this.dateTimeInput1.TimeSelectorType = DevComponents.Editors.DateTimeAdv.eTimeSelectorType.TouchStyle;
//
// btnNow
//
this.btnNow.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnNow.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnNow.Location = new System.Drawing.Point(182, 51);
this.btnNow.Name = "btnNow";
this.btnNow.Size = new System.Drawing.Size(49, 23);
this.btnNow.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnNow, new DevComponents.DotNetBar.SuperTooltipInfo("Now", "", "This will set the Change Bar Start date to today.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnNow.TabIndex = 5;
this.btnNow.Text = "Today";
this.btnNow.Click += new System.EventHandler(this.btnNow_Click);
//
// dlgSetChangeBarStartDate
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(268, 144);
this.Controls.Add(this.btnNow);
this.Controls.Add(this.dateTimeInput1);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "dlgSetChangeBarStartDate";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Change Bar Start Date";
this.Load += new System.EventHandler(this.dlgSetChangeBarStartDate_Load);
((System.ComponentModel.ISupportInitialize)(this.dateTimeInput1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
this.btnOK = new DevComponents.DotNetBar.ButtonX();
this.btnCancel = new DevComponents.DotNetBar.ButtonX();
this.label1 = new System.Windows.Forms.Label();
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.dateTimeInput1 = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
this.btnNow = new DevComponents.DotNetBar.ButtonX();
this.btnResetToApproved = new DevComponents.DotNetBar.ButtonX();
((System.ComponentModel.ISupportInitialize)(this.dateTimeInput1)).BeginInit();
this.SuspendLayout();
//
// btnOK
//
this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnOK.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(18, 111);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(64, 23);
this.btnOK.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnOK.TabIndex = 1;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(179, 111);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(64, 23);
this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCancel.TabIndex = 2;
this.btnCancel.Text = "Cancel";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(3, 19);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(229, 15);
this.label1.TabIndex = 3;
this.label1.Text = "Show Change Bars on Changes Starting:";
//
// superTooltip1
//
this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray);
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
//
// dateTimeInput1
//
//
//
//
this.dateTimeInput1.BackgroundStyle.Class = "DateTimeInputBackground";
this.dateTimeInput1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dateTimeInput1.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown;
this.dateTimeInput1.ButtonDropDown.Visible = true;
this.dateTimeInput1.CustomFormat = "MM/dd/yyyy HH:mm:ss";
this.dateTimeInput1.DateTimeSelectorVisibility = DevComponents.Editors.DateTimeAdv.eDateTimeSelectorVisibility.DateSelector;
this.dateTimeInput1.Format = DevComponents.Editors.eDateTimePickerFormat.Custom;
this.dateTimeInput1.IsPopupCalendarOpen = false;
this.dateTimeInput1.Location = new System.Drawing.Point(30, 51);
//
//
//
//
//
//
this.dateTimeInput1.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dateTimeInput1.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1);
this.dateTimeInput1.MonthCalendar.ClearButtonVisible = true;
//
//
//
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1;
this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dateTimeInput1.MonthCalendar.DisplayMonth = new System.DateTime(2016, 2, 1, 0, 0, 0, 0);
//
//
//
this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90;
this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dateTimeInput1.MonthCalendar.TodayButtonVisible = true;
this.dateTimeInput1.Name = "dateTimeInput1";
this.dateTimeInput1.Size = new System.Drawing.Size(146, 20);
this.dateTimeInput1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.dateTimeInput1, new DevComponents.DotNetBar.SuperTooltipInfo("Change Bar Start Date", "", "Only the changes made after this date will have change bars.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(138, 67)));
this.dateTimeInput1.TabIndex = 4;
this.dateTimeInput1.TimeSelectorTimeFormat = DevComponents.Editors.DateTimeAdv.eTimeSelectorFormat.Time24H;
this.dateTimeInput1.TimeSelectorType = DevComponents.Editors.DateTimeAdv.eTimeSelectorType.TouchStyle;
//
// btnNow
//
this.btnNow.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnNow.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnNow.Location = new System.Drawing.Point(182, 51);
this.btnNow.Name = "btnNow";
this.btnNow.Size = new System.Drawing.Size(49, 23);
this.btnNow.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnNow, new DevComponents.DotNetBar.SuperTooltipInfo("Now", "", "This will set the Change Bar Start date to today.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnNow.TabIndex = 5;
this.btnNow.Text = "Today";
this.btnNow.Click += new System.EventHandler(this.btnNow_Click);
//
// btnResetToApproved
//
this.btnResetToApproved.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnResetToApproved.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnResetToApproved.Location = new System.Drawing.Point(30, 77);
this.btnResetToApproved.Name = "btnResetToApproved";
this.btnResetToApproved.Size = new System.Drawing.Size(201, 23);
this.btnResetToApproved.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnResetToApproved.TabIndex = 6;
this.btnResetToApproved.Text = "Reset Change Bar To Approved Date";
this.btnResetToApproved.Tooltip = "Reset Change Bar to the last approved date. If no approvals, reset to as if no ch" +
"ange bar date. After selecting this, press OK to save.";
this.btnResetToApproved.Click += new System.EventHandler(this.btnResetToApproved_Click);
//
// dlgSetChangeBarStartDate
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(268, 144);
this.Controls.Add(this.btnResetToApproved);
this.Controls.Add(this.btnNow);
this.Controls.Add(this.dateTimeInput1);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "dlgSetChangeBarStartDate";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Change Bar Start Date";
this.Load += new System.EventHandler(this.dlgSetChangeBarStartDate_Load);
((System.ComponentModel.ISupportInitialize)(this.dateTimeInput1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -175,5 +191,6 @@
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
private DevComponents.Editors.DateTimeAdv.DateTimeInput dateTimeInput1;
private DevComponents.DotNetBar.ButtonX btnNow;
}
private DevComponents.DotNetBar.ButtonX btnResetToApproved;
}
}
@@ -1,31 +1,24 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Controls;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using Volian.Controls.Library;
namespace VEPROMS
{
public partial class dlgSetChangeBarStartDate : DevComponents.DotNetBar.Office2007Form
{
private ProcedureConfig _MyProcConfig = null;
public ProcedureConfig MyProcConfig { get; set; } = null;
public ProcedureConfig MyProcConfig
{
get { return _MyProcConfig; }
set { _MyProcConfig = value; }
}
public ProcedureInfo MyProcInfo { get; set; } = null;
public dlgSetChangeBarStartDate(ProcedureConfig pc)
public dlgSetChangeBarStartDate(ProcedureConfig pc, ProcedureInfo pi)
{
InitializeComponent();
_MyProcConfig = pc;
MyProcConfig = pc;
MyProcInfo = pi;
}
private void dlgSetChangeBarStartDate_Load(object sender, EventArgs e)
@@ -35,9 +28,9 @@ namespace VEPROMS
if (tmp[0] == null || tmp[0] == "") // First time date set.
{
cbdt = DateTime.Now.ToString("MM/dd/yyyy") + " " + DateTime.Now.ToString("HH:mm:ss");
cbdt = $"{DateTime.Now:MM/dd/yyyy} {DateTime.Now:HH:mm:ss}";
dateTimeInput1.Value = DateTime.Parse(cbdt);
return;
return;
}
else
{
@@ -49,13 +42,13 @@ namespace VEPROMS
var time = tmpdt.TimeOfDay;
if (start < time) // If time is greater than 12:00:00 AM
{
cbdt = DateTime.Now.ToString("MM/dd/yyyy") + " " + tmpdt.TimeOfDay.ToString();
cbdt = $"{DateTime.Now:MM/dd/yyyy} {tmpdt.TimeOfDay}";
dateTimeInput1.Value = DateTime.Parse(cbdt);
return;
}
else // if time is 12:00:00 AM
{
cbdt = DateTime.Now.ToString("MM/dd/yyyy") + " " + " 00:00:00";
cbdt = $"{DateTime.Now:MM/dd/yyyy} 00:00:00";
dateTimeInput1.Value = DateTime.Parse(cbdt);
return;
}
@@ -72,13 +65,112 @@ namespace VEPROMS
private void btnOK_Click(object sender, EventArgs e)
{
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss");// ("MM/dd/yyyy HH:mm:ss");
}
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Set ChangeBars set to ({dateTimeInput1.Value:MM/dd/yyyy HH:mm:ss}) by ({VlnSettings.UserID}) on ({DateTime.Now})", DateTime.Now, VlnSettings.UserID, 0);
//CSM C2026-014 if multi-unit, set for each unit
System.Data.DataTable dt = RevisionData.GetRevisionDataByUnit(MyProcInfo.ItemID);
if (RevisionData.HasUnits(dt))
{
//Change the ChangeBarDate for each unit
foreach (DataRow r in dt.Rows)
{
if (!r.IsNull("UnitID"))
{
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss");
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Set ChangeBars set to ({dateTimeInput1.Value:MM/dd/yyyy HH:mm:ss}) by ({VlnSettings.UserID}) on ({DateTime.Now}) for (Unit {r["UnitName"]})", DateTime.Now, VlnSettings.UserID, MyProcConfig.SelectedSlave);
}
}
MyProcConfig.SelectedSlave = 0;
}
}
private void btnNow_Click(object sender, EventArgs e)
{
dateTimeInput1.Value = DateTime.Now;
}
private void btnNow_Click(object sender, EventArgs e) => dateTimeInput1.Value = DateTime.Now;
}
//C2026-009 Add Option to Reset Change Bar to Last Approved Date/Time
private void btnResetToApproved_Click(object sender, EventArgs e)
{
System.Data.DataTable dt = RevisionData.GetRevisionDataByUnit(MyProcInfo.ItemID);
if (dt.Rows.Count == 0)
{
//no records, remove
if (MessageBox.Show("There are currently no approvals set. Selecting yes will set ChangeBars to show all changes since the creation of the procedure.\r\nAre you sure you wish to reset ChangeBars?", "Reset ChangeBar Date", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
MyProcConfig.Print_ChangeBarDate = "";
DialogResult = DialogResult.OK;
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show all changes.", DateTime.Now, VlnSettings.UserID, 0);
Close();
}
}
else if (RevisionData.HasUnits(dt))
{
//any with units
string maxDTS = RevisionData.MaxDTS(dt).ToString("MM/dd/yyyy HH:mm:ss");
//create wording for ChangeBar changes
StringBuilder sb = new StringBuilder();
sb.Append($" The Procedure Viewer Change Bar Date will be set to ({maxDTS}).");
foreach (DataRow r in dt.Rows)
{
if (!r.IsNull("UnitID"))
{
sb.Append($"\r\n The Change Bar Date for Unit ({r["UnitName"]}) will be set to ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}).");
}
}
sb.Append("\r\n Any Change Bars for Units not listed above will use the Overall/Procedure Viewer Change Bar Date (as these Units have no approvals).");
if (CustomMessageBox.Show($"This will reset ChangeBars to show for changes newer than the last approval.\r\nThis includes the following changes:\r\n{sb}\r\n\r\nAre you sure you wish to reset ChangeBars?", "Reset ChangeBar Date", "Yes", "No") == DialogResult.Yes)
{
//Change the overall ChangeBarDate
MyProcConfig.Print_ChangeBarDate = maxDTS;
//Change the ChangeBarDate for each unit
foreach (DataRow r in dt.Rows)
{
if (!r.IsNull("UnitID"))
{
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
MyProcConfig.Print_ChangeBarDate = Convert.ToDateTime(r["DTS"]).ToString("MM / dd / yyyy HH: mm: ss");
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}) for (Unit {r["UnitName"]})", DateTime.Now, VlnSettings.UserID, MyProcConfig.SelectedSlave);
}
}
MyProcConfig.SelectedSlave = 0;
DialogResult = DialogResult.OK;
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({maxDTS})", DateTime.Now, VlnSettings.UserID, 0);
Close();
}
}
else
{
//no units
string maxDTS = RevisionData.MaxDTS(dt).ToString("MM/dd/yyyy HH:mm:ss");
if (MessageBox.Show($"This will reset ChangeBars to show for changes newer than the last approval ({maxDTS}).\r\nAre you sure you wish to reset ChangeBars?", "Reset ChangeBar Date", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
MyProcConfig.Print_ChangeBarDate = maxDTS;
DialogResult = DialogResult.OK;
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({maxDTS})", DateTime.Now, VlnSettings.UserID, 0);
Close();
}
}
}
}
}
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using Volian.Print.Library;
@@ -13,10 +9,11 @@ namespace VEPROMS
{
public partial class dlgTransitionReport : Form
{
private FolderInfo folderInfo = null;
private ProcedureInfo procedureInfo = null;
private readonly FolderInfo folderInfo = null;
private readonly ProcedureInfo procedureInfo = null;
private PDFTransitionReport rpt;
private List<DocVersionInfo> lstDocVersions;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
private List<DocVersionInfo> lstDocVersions;
public dlgTransitionReport(FolderInfo fi)
{
InitializeComponent();
@@ -26,7 +23,7 @@ namespace VEPROMS
if (lstDocVersions.Count == 1)
{
pnlVersions.Visible = false;
this.Height = this.Height - pnlVersions.Height;
Height -= pnlVersions.Height;
}
}
public dlgTransitionReport(ProcedureInfo pi)
@@ -34,16 +31,17 @@ namespace VEPROMS
InitializeComponent();
procedureInfo = pi;
pnlVersions.Visible = pnlProcs.Visible = false;
this.Height = this.Height - pnlVersions.Height - pnlProcs.Height;
Height = Height - pnlVersions.Height - pnlProcs.Height;
}
//private DocVersionInfo docVersionInfo;
private void dlgTransitionReport_Load(object sender, EventArgs e)
{
if (folderInfo != null)
{
rpt = new PDFTransitionReport(folderInfo, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\TransitionReport.pdf");
rpt.MyDocVersionList = lstDocVersions;
if (lstDocVersions.Count == 1)
rpt = new PDFTransitionReport(folderInfo, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\TransitionReport.pdf")
{
MyDocVersionList = lstDocVersions
};
if (lstDocVersions.Count == 1)
pbProcs.Maximum = lstDocVersions[0].Procedures.Count;
else
pbVersions.Maximum = lstDocVersions.Count;
@@ -54,8 +52,8 @@ namespace VEPROMS
if (VlnSettings.GetCommandFlag("PROFILE")) ProfileTimer.TurnOnTracking("Profile.txt");
VEPROMS.CSLA.Library.Database.TrackDBUsage = VlnSettings.GetCommandFlag("DBTrack");
ProfileTimer.Reset();
int profileDepth = ProfileTimer.Push(">>>> transitionreport");
rpt = new PDFTransitionReport(procedureInfo, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\TransitionReport.pdf");
_ = ProfileTimer.Push(">>>> transitionreport");
rpt = new PDFTransitionReport(procedureInfo, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\TransitionReport.pdf");
pbTrans.Maximum = rpt.TransitionInfoCount;
tmrReportStart.Enabled = true;
}
@@ -131,7 +129,7 @@ namespace VEPROMS
{
tmrReportFinish.Enabled = false;
System.Diagnostics.Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\TransitionReport.pdf");
this.Close();
Close();
}
}
}

Some files were not shown because too many files have changed in this diff Show More