Compare commits

..

110 Commits

Author SHA1 Message Date
afb0247d87 Merge pull request 'Development' (#559) from Development into master
Merging changes from dev into master after successful testing.
2025-05-20 13:24:21 -04:00
bce8461a7e Merge pull request 'Development' (#555) from Development into master
Merging all changes from dev into master after successful testing.
2025-05-15 15:01:00 -04:00
9d5cc43d71 Merge pull request 'Development' (#543) from Development into master
Merging dev into master after successful testing.
2025-05-01 11:25:49 -04:00
bc1370ab29 Merge pull request 'Development' (#540) from Development into master
Merging changes from Development into master after successful testing.
2025-04-23 15:13:56 -04:00
eaf2b14cfc Merge pull request 'Development' (#535) from Development into master
Merging all changes from development into master after successful testing.
2025-03-26 09:25:11 -04:00
1cf7d81aa5 Merge pull request 'Development' (#530) from Development into master
Merging all changes through B2025-017 from dev into master after successful testing.
2025-03-04 10:24:28 -05:00
f11a9536f0 Merge pull request 'Development' (#524) from Development into master
Merging all changes through B2025-015 from development into master after successful testing.
2025-02-20 15:33:44 -05:00
c7bdcf0104 Merge pull request 'Development' (#516) from Development into master
Merging changes from development into master after successful testing
2025-02-11 15:25:38 -05:00
df026499d5 Merge pull request 'Development' (#512) from Development into master
Merging all changes from development into master after successful testing.
2025-02-10 09:20:43 -05:00
a3aa4157b8 Merge pull request 'Development' (#508) from Development into master
Merging all changes through B2025-012 from development into master after successful testing.
2025-02-05 10:50:35 -05:00
8f3268e1bc Merge pull request 'Development' (#504) from Development into master
Merging all changes from development into master after successful testing.
2025-01-30 15:55:02 -05:00
5721d440e9 Merge branch 'master' of https://git.volian.com/Volian/SourceCode 2025-01-21 10:42:15 -05:00
505c396283 Merge pull request 'Development' (#489) from Development into master
Merging from development into master after successful testing.
2025-01-21 10:41:15 -05:00
643e6bc94f Merge pull request 'Development' (#486) from Development into master
Merging all items through B2025-003 from development in master after successful testing.
2025-01-09 15:02:16 -05:00
76502e6d97 Merge pull request 'Development' (#481) from Development into master
Merging all changes through F2024-087 after successful testing.
2024-12-11 11:52:34 -05:00
851a0b3810 Merge pull request 'Development' (#464) from Development into master
Merging all items through B2024-092 from development into master after successful testing.
2024-11-11 11:39:01 -05:00
fd8dbb4c8b Merge pull request 'Development' (#454) from Development into master
Merging all changes from development into master after successful testing.
2024-11-01 14:18:00 -04:00
4ffd994c5e Merge pull request 'Development' (#450) from Development into master
Merging all development items into master after successful testing.
2024-10-31 09:11:59 -04:00
a34828113a Merge pull request 'Development' (#416) from Development into master
Merging C2017-031 and B2024-075 from development into master after successful testing.
2024-10-03 12:08:30 -04:00
461329468c Merge pull request 'Development' (#413) from Development into master
Merging F2023-136 and F2024-074 in master after successful testing
2024-09-27 14:27:22 -04:00
35de5df04d Merge pull request 'Development' (#410) from Development into master
Merging all items through B2024-03 from development into master after successful testing.
2024-09-17 12:03:23 -04:00
4f0548fd60 Merge pull request 'Development' (#402) from Development into master
Merging C2021-034 and B2024-065 into master after successful testing.
2024-09-06 09:56:37 -04:00
5c1d96cc51 Merge pull request 'Development' (#399) from Development into master
Merging all fixes through B2024-063 from development into master after successful testing.
2024-08-27 15:58:15 -04:00
57049c0c52 Merge pull request 'Development' (#392) from Development into master
Merging B2024-059 and B2024-058 from development into master after successful testing.
2024-08-15 14:55:27 -04:00
31326e1c91 Merge pull request 'Development' (#389) from Development into master
Merging all changes through F2024-069 from development into master after successful testing.
2024-08-09 13:06:40 -04:00
3c60994a0a Merge pull request 'Development' (#373) from Development into master
Merging all changes through B2024-053 from development into master after successful testing.
2024-08-01 08:37:23 -04:00
773cc42346 Merge pull request 'Development' (#362) from Development into master
Merging B2024-046 and B2024-047 from development into master after successful testing.
2024-07-25 10:44:42 -04:00
f46a1f39dc Merge pull request 'Development' (#359) from Development into master
Merging B2024-042 from development into master after successful testing.
2024-07-22 11:14:19 -04:00
b7175bf77f Merge pull request 'Development' (#357) from Development into master
Merging C2024-005 from development into master after successful testing.
2024-07-18 15:41:20 -04:00
ec22232aa8 Merge pull request 'Development' (#356) from Development into master
Merging all items through B2024-041 from development into master after successful testing.
2024-07-18 09:51:54 -04:00
f303cd2236 Merge pull request 'Development' (#348) from Development into master
Merging F2024-065 and F2024-066 from development into master after successful testing.
2024-07-03 10:45:41 -04:00
f40cef4416 Merge pull request 'Development' (#346) from Development into master
Merging F2024-064 from development into master after successful testing.
2024-07-01 11:54:15 -04:00
fbca97d38d Merge pull request 'Development' (#344) from Development into master
Merging C2024-013 from development into master after successful testing.
2024-06-25 15:55:32 -04:00
28bd2cba5c Merge pull request 'Development' (#342) from Development into master
Merging C2022-029 from development into master after successful testing.
2024-06-20 11:36:59 -04:00
4b35f73bbf Merge pull request 'Development' (#340) from Development into master
Merging C2024-004 from development into master after successful testing.
2024-06-19 16:23:23 -04:00
f4706eb126 Merge pull request 'Development' (#338) from Development into master
Merging C2019-047 from development into master after successful testing.
2024-06-17 08:38:34 -04:00
21bcb90558 Merge pull request 'Development' (#335) from Development into master
Merging B2024-036 and F2024-063 from development into master after successful testing.
2024-06-06 14:51:13 -04:00
ae48ac0cae Merge pull request 'Development' (#332) from Development into master
Merging changes through B2024-035 from development into master after successful testing.
2024-05-30 08:08:28 -04:00
cb4979d5bc Merge pull request 'Development' (#327) from Development into master
Merging F2024-061 from development into master after successful testing.
2024-05-20 14:11:12 -04:00
7d3ae74e1f Merge pull request 'Development' (#325) from Development into master
Merging F2024-060 from development into master after successful testing.
2024-05-16 15:32:13 -04:00
9d680aa500 Merge pull request 'Development' (#323) from Development into master
Merging C2024-001 from development into master after successful testing.
2024-05-16 14:17:17 -04:00
0d50b1c2fe Merge pull request 'Development' (#321) from Development into master
Merging all items through B2024-030 from development into master after successful testing.
2024-05-15 08:33:58 -04:00
75e034863f Merge pull request 'Development' (#315) from Development into master
Merging all changes through B2024-026 from development into master after successful testing.
2024-05-09 14:01:48 -04:00
3b42de1571 Merge pull request 'F2024-059_Callaway' (#311) from F2024-059_Callaway into master
Format only changes
2024-05-07 16:00:36 -04:00
668472286e Merge pull request 'Development' (#307) from Development into master
Merging all changes through C2023-006 into master after successful testing.
2024-04-26 09:21:44 -04:00
e00d34c99d Merge pull request 'Development' (#300) from Development into master
Merging C2024-008 and C2024-007 from development into master after successful testing.
2024-04-17 14:57:22 -04:00
9fb496dfb3 Merge pull request 'Development' (#297) from Development into master
Merging F2024-053 from development into master after successful testing.
2024-04-11 09:23:34 -04:00
f4eaa4a3ef Merge pull request 'Development' (#295) from Development into master
Merging F2024-052 from development into master after successful testing.
2024-04-08 11:11:43 -04:00
5d50ed6bdf Merge pull request 'Development' (#292) from Development into master
Merging F2024-051, B2024-021, F2024-049, F2024-050 and F2024-045 after successful testing.
2024-04-05 10:54:57 -04:00
d7ace4eaf9 Merge pull request 'Development' (#287) from Development into master
Merging F2024-047, F2024-048, B2024-017 and B2024-019 from development into master after successful testing.
2024-04-04 11:36:56 -04:00
16a4d335ea Merge pull request 'Development' (#282) from Development into master
Merging all items through B2024-018 from development into master after successful testing.
2024-03-27 13:39:46 -04:00
ba69bb0772 Merge pull request 'Development' (#275) from Development into master
Merging F2024-037 and CSLA updates into master after successful testing.
2024-03-20 16:07:27 -04:00
455940caa2 Merge pull request 'Development' (#271) from Development into master
Merging F2024-040 into master after successful testing.
2024-03-18 10:00:30 -04:00
439344757e Merge pull request 'Development' (#269) from Development into master
Merging F2024-044, F2024-043, and F2024-019 in master after successful testing.
2024-03-15 09:33:57 -04:00
ad912691c9 Merge pull request 'Development' (#265) from Development into master
Merging 	F2024-016, 	F2024-032, 	B2024-013, 	F2024-025,	F2024-027 & F2024-028 into master after successful testing.
2024-03-12 14:01:12 -04:00
237144aff6 Merge pull request 'Development' (#259) from Development into master
Merging B2024-014 from development into master after successful testing.
2024-03-04 15:02:18 -05:00
810332d558 Merge pull request 'Development' (#256) from Development into master
Merging F2024-020 from development into master.  No testing required since formats are under development.
2024-02-29 13:23:48 -05:00
f8431d0ba1 Merge pull request 'Development' (#252) from Development into master
Merging F2024-022 from development into master.  No testing required since formats are under development.
2024-02-29 09:23:51 -05:00
57c3bfa16a Merge pull request 'Development' (#250) from Development into master
Merging C2023-003 and F2024-026 into master after successful testing.
2024-02-28 11:56:15 -05:00
61f1077608 Merge pull request 'Development' (#248) from Development into master
Merging F2024-029, B2024-009, F2024-023, B2024-011, B2024-012 and F2024-017 from development into master after successful testing.
2024-02-27 14:21:22 -05:00
8877e968b9 Merge pull request 'Development' (#239) from Development into master
Merging F2024-018, B2024-008, B2024-007, and F2024-015 from development into master after successful testing.
2024-02-22 08:22:26 -05:00
4575c90bee Merge pull request 'Development' (#233) from Development into master
Merging updated formats from development into master after successful testing.
2024-02-14 16:07:57 -05:00
21279a87ae Merge pull request 'Development' (#231) from Development into master
Merging B2024-006 from development into master after successful testing.
2024-02-14 08:19:09 -05:00
3d5ad4a17e Merge pull request 'Development' (#229) from Development into master
Merging C2024-002 and F2024-013 from development into master after successful testing.
2024-02-09 11:30:41 -05:00
9bb7b044a8 Merge pull request 'Development' (#226) from Development into master
Merging F2024-010, 	F2024-011, 	F2024-008, 	B2024-002, 	F2024-012  and B2024-005 from development into master after successful testing.
2024-02-08 11:38:49 -05:00
dc8f2f7561 Merge pull request 'Development' (#219) from Development into master
Merging C2022-009 into master after successful testing.
2024-02-02 13:53:22 -05:00
829dbf84da Merge pull request 'Development' (#217) from Development into master
Merging F2024-005 and B2024-004 from development into master after successful testing
2024-01-31 08:34:00 -05:00
7b156c17f8 Merge pull request 'Development' (#212) from Development into master
Merging all changes up through F2024-006 from development into master after successful testing.
2024-01-24 11:30:40 -05:00
cbf7cbc164 Merge pull request 'Development' (#198) from Development into master
Merging F2024-002 and F2023-112 from development into master.  No testing required since formats are under development.
2024-01-08 15:24:15 -05:00
b04faa816e Merge pull request 'Development' (#196) from Development into master
Merging F2023-126, F2024-001, C2022-009, C2023-024 and C2023-023 from development into Master after successful testing.
2024-01-03 10:54:22 -05:00
517ebe2902 Merge pull request 'Development' (#189) from Development into master
Initial check-in of Vogtle Background formats.  No testing required since formats are under development.
2023-12-15 15:48:55 -05:00
03d0d314e3 Merge pull request 'Development' (#187) from Development into master
Merging B2023-115 from development into master after successful testing.
2023-12-12 15:31:06 -05:00
3e804c5cce Merge pull request 'Development' (#185) from Development into master
Merging F2023-133 into from development into master. No testing required since formats are under development.
2023-12-11 10:08:22 -05:00
ee2b8b538e Merge pull request 'Development' (#183) from Development into master
Merging PROMSFixes from development into master after minor changes to UpdateFormatList.
2023-12-08 14:51:21 -05:00
fdfd34fe92 Merge pull request 'Development' (#181) from Development into master
Merging F2023-151 from development into master.  No testing required since formats are under development.
2023-12-07 15:55:16 -05:00
2d6fb6523b Merge pull request 'Development' (#179) from Development into master
Merging F2023-133 from development into master.  No testing required since formats are under development.
2023-12-07 11:44:31 -05:00
3084bf3982 Merge pull request 'Development' (#177) from Development into master
Merging B2023-115 and F2023-150 from development into master.  No testing required since formats are under development.
2023-12-06 09:08:18 -05:00
5ba51e8392 Merge pull request 'Development' (#174) from Development into master
Merging F2023-149 from development into master.  No testing required since formats are under development.
2023-12-05 16:30:39 -05:00
fb5eb43e34 Merge pull request 'Development' (#172) from Development into master
Merging F2023-124 from development into master.  No testing required since formats are under development.
2023-12-04 11:22:59 -05:00
b154056276 Merge pull request 'Development' (#170) from Development into master
Merging F2023-119 from development into master.  No testing required since formats are under development.
2023-12-01 15:36:22 -05:00
c67b8f9ca1 Merge pull request 'Development' (#168) from Development into master
Merging F2023-146 from development to master.  No testing required since formats are under development.
2023-12-01 10:02:50 -05:00
95e4181360 Merge pull request 'Development' (#166) from Development into master
Merging F2023-148, F2023-148, and B2023-120 from development into Master. No testing required since formats are under development.
2023-11-30 14:38:49 -05:00
32dffbe56b Merge pull request 'Development' (#162) from Development into master
Merging B2023-116, B2023-117, and F2023-143 from development to master after successful testing.
2023-11-29 15:58:44 -05:00
6b3c8d373b Merge pull request 'F2023-143_Vogtle3&4_Alrm_Footer' (#159) from F2023-143_Vogtle3&4_Alrm_Footer into master
Format only change.
Vogtle 3&4 formats under development. This change will be tested as data in entered into PROMS by Volian
2023-11-27 16:23:44 -05:00
db29107f47 Merge pull request 'Development' (#156) from Development into master
Merging F2023-142 and B2022-046 in from development to master after successful testing.
2023-11-14 08:45:47 -05:00
355537f2ab Merge pull request 'Development' (#153) from Development into master
Merging F2023-140, F2023-123, B2023-007, B2023-108, F2023-139, F2023-138 and B2023-103
2023-11-09 10:33:40 -05:00
0729ef0c21 Merge pull request 'Development' (#147) from Development into master
Merging F2023-139 from development into master after successful testing.
2023-10-26 10:10:33 -04:00
6fe82bfd0f Merge pull request 'Development' (#145) from Development into master
Merging F2023-138 from development into master after successful testing.
2023-10-25 14:40:15 -04:00
39bf072363 Merge pull request 'Development' (#142) from Development into master
Merging B2023-103 from development into master after successful testing.
2023-10-23 15:28:31 -04:00
da7c384fd8 Merge pull request 'Development' (#139) from Development into master
Merging C2023-017, C2023-019, B2023-104, B2023-101 and B2023-102 from development into master after successful testing.
2023-10-18 10:37:59 -04:00
95130fd9a0 Merge pull request 'Development' (#133) from Development into master
Merging C2023-018 from development into master after successful testing.
2023-10-11 09:26:45 -04:00
978e2344a3 Merge pull request 'Development' (#131) from Development into master
Merging C2023-016 and C2023-017 from development into master after successful testing.
2023-10-06 10:56:34 -04:00
c9bf45602c Merge pull request 'Development' (#128) from Development into master
Merging F2023-137 and B2023-100 from development into master. F2023-137 does not require testing since formats are under development. B2023-100 tested successfully.
2023-10-02 11:52:22 -04:00
aa160b2036 Merge pull request 'Development' (#124) from Development into master
Merging B2023-099 from development into master after successful testing.
2023-09-28 15:58:27 -04:00
f82b32d351 Merge pull request 'Development' (#122) from Development into master
Merging B2023-097 and B2023-098 from development into master after successful testing.
2023-09-26 14:58:05 -04:00
e519dc9a57 Merge pull request 'Development' (#120) from Development into master
Merging B2023-094 from development into master after successful testing.
2023-09-22 13:24:17 -04:00
f020c37db9 Merge pull request 'Development' (#118) from Development into master
Merged B2023-096 from development into master after successful testing.
2023-09-15 11:50:57 -04:00
5a4ec3b6b1 Merge pull request 'Development' (#117) from Development into master
Merging F2023-135 and B2023-093 from development into master after successful testing.
2023-09-14 15:58:52 -04:00
2602d6c9d2 Merge pull request 'Development' (#113) from Development into master
Merging C2023-015 from development into master.
2023-09-12 09:23:57 -04:00
ff403583d7 Merge pull request 'Development' (#111) from Development into master
Merging B2023-091 and B2023-078 from development into master.
2023-08-30 16:07:17 -04:00
c5577cc2bd Merge pull request 'Development' (#108) from Development into master
Merging F2023-134 from development into master.  No testing required since formats are under development.
2023-08-24 15:01:12 -04:00
78be6e5dc1 Merge pull request 'Development' (#106) from Development into master
Merging GitAutomation from Development into Master.
2023-08-24 09:13:06 -04:00
b954a41375 Merge pull request 'Development' (#104) from Development into master
Merging B2023-089 and F2023-131 from Development into Master.  No testing required since formats are under development.
2023-08-24 09:05:31 -04:00
0100a11cfe Merge pull request 'Development' (#101) from Development into master
Merging F2023-125 from development into master.  No testing required since formats are under development.
2023-08-23 08:19:00 -04:00
04cf2e8534 Merge pull request 'Development' (#99) from Development into master
Merging F2023-130 from Development into Master. No testing required since formats are under development.
2023-08-22 15:04:22 -04:00
be00724818 Merge pull request 'Development' (#97) from Development into master
Merging B2023-088 from development into master.  No testing required since formats are under development.
2023-08-22 10:52:09 -04:00
274d93c61a Merge pull request 'Development' (#94) from Development into master
Merging F2023-122 from development into master.  No testing required since formats are under development.
2023-08-22 08:53:57 -04:00
7dc4c30436 Merge pull request 'Development' (#92) from Development into master
Merging F2023-127 from development into master.  No testing required since formats are under development.
2023-08-22 08:33:56 -04:00
028ef4bc31 Merge pull request 'Development' (#89) from Development into master
Merging F2023-128 and F2023-129 from development into master.  No testing required since formats are under development.
2023-08-21 11:46:01 -04:00
42124d65c7 Merge pull request 'Development' (#87) from Development into master
Merging F2023-118,  F2023-120 and F2023-121 from development into master.  No testing required since formats are under development.
2023-08-16 10:13:52 -04:00
217 changed files with 10971 additions and 14880 deletions

View File

@@ -5,7 +5,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -44,7 +44,6 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -54,14 +53,13 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -32,9 +32,9 @@ namespace AdjustBuildRevision
{ {
// Allow for setting build revision on either proms or the roeditor: // Allow for setting build revision on either proms or the roeditor:
if (Directory.GetCurrentDirectory().ToUpper().Contains("REFOBJ")) if (Directory.GetCurrentDirectory().ToUpper().Contains("REFOBJ"))
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") + "\")"); outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.3.yyMM.dHH") + "\")");
else
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.2.yyMM.dHH") + "\")");
// if (outline != line) // if (outline != line)
// { // {
// Console.WriteLine("Before: '{0}'", line); // Console.WriteLine("Before: '{0}'", line);

View File

@@ -22,7 +22,7 @@
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
@@ -30,17 +30,15 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />

View File

@@ -28,9 +28,7 @@ namespace AT.STO.UI.Win
_dropDownHelper = new DropDownWindowHelper(); _dropDownHelper = new DropDownWindowHelper();
_dropDownHelper.DropDownClosed -= new DropDownClosedEventHandler(DropDownHelper_DropDownClosed);
_dropDownHelper.DropDownClosed += new DropDownClosedEventHandler(DropDownHelper_DropDownClosed); _dropDownHelper.DropDownClosed += new DropDownClosedEventHandler(DropDownHelper_DropDownClosed);
_dropDownHelper.DropDownCancel -= new DropDownCancelEventHandler(DropDownHelper_DropDownCancel);
_dropDownHelper.DropDownCancel += new DropDownCancelEventHandler(DropDownHelper_DropDownCancel); _dropDownHelper.DropDownCancel += new DropDownCancelEventHandler(DropDownHelper_DropDownCancel);
combo.DisplayMember = "Text"; combo.DisplayMember = "Text";
@@ -84,9 +82,7 @@ namespace AT.STO.UI.Win
DropDownForm dropDown = new DropDownForm(_dropDownControl); DropDownForm dropDown = new DropDownForm(_dropDownControl);
dropDown.FinishEditing -= new DropDownValueChangedEventHandler(DropDown_FinishEditing);
dropDown.FinishEditing += new DropDownValueChangedEventHandler(DropDown_FinishEditing); dropDown.FinishEditing += new DropDownValueChangedEventHandler(DropDown_FinishEditing);
dropDown.ValueChanged -= new DropDownValueChangedEventHandler(DropDown_ValueChanged);
dropDown.ValueChanged += new DropDownValueChangedEventHandler(DropDown_ValueChanged); dropDown.ValueChanged += new DropDownValueChangedEventHandler(DropDown_ValueChanged);
combo.DroppedDown = false; combo.DroppedDown = false;

View File

@@ -34,7 +34,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -45,14 +45,13 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Demo|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Demo|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Demo\</OutputPath> <OutputPath>bin\Demo\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -61,7 +60,7 @@
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -70,7 +69,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -79,7 +78,7 @@
<OutputPath>bin\Demo\</OutputPath> <OutputPath>bin\Demo\</OutputPath>
<DefineConstants>TRACE;DEMO</DefineConstants> <DefineConstants>TRACE;DEMO</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -49,9 +49,7 @@ namespace AT.STO.UI.Win
{ {
base.OnShown(e); base.OnShown(e);
_control.FinishEditing -= new DropDownValueChangedEventHandler(Ctrl_FinishEditing);
_control.FinishEditing += new DropDownValueChangedEventHandler(Ctrl_FinishEditing); _control.FinishEditing += new DropDownValueChangedEventHandler(Ctrl_FinishEditing);
_control.ValueChanged -= new DropDownValueChangedEventHandler(Ctrl_ValueChanged);
_control.ValueChanged += new DropDownValueChangedEventHandler(Ctrl_ValueChanged); _control.ValueChanged += new DropDownValueChangedEventHandler(Ctrl_ValueChanged);
} }
#endregion #endregion

View File

@@ -39,7 +39,6 @@ namespace AT.STO.UI.Win
public DropDownWindowHelper() public DropDownWindowHelper()
{ {
_filter = new DropDownMessageFilter(this); _filter = new DropDownMessageFilter(this);
_filter.DropDownCancel -= new DropDownCancelEventHandler(Popup_Cancel);
_filter.DropDownCancel += new DropDownCancelEventHandler(Popup_Cancel); _filter.DropDownCancel += new DropDownCancelEventHandler(Popup_Cancel);
} }
#endregion #endregion

View File

@@ -29,7 +29,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -40,14 +40,13 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
@@ -57,7 +56,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>

View File

@@ -35,7 +35,6 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -45,7 +44,6 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DevComponents.DotNetBar2, Version=14.1.0.37, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL"> <Reference Include="DevComponents.DotNetBar2, Version=14.1.0.37, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL">
@@ -94,10 +92,6 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="epall\EPFormatTST1.xml" />
<Content Include="epall\EPFormatTST2.xml" />
<Content Include="epall\EPFormatTST3.xml" />
<Content Include="epall\EPFormatTST4.xml" />
<Content Include="fmtall\AEPall.xml"> <Content Include="fmtall\AEPall.xml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Content> </Content>
@@ -182,8 +176,6 @@
<Content Include="fmtall\CPL_03all.xml" /> <Content Include="fmtall\CPL_03all.xml" />
<Content Include="fmtall\CPSAMGDataall.xml" /> <Content Include="fmtall\CPSAMGDataall.xml" />
<Content Include="fmtall\CPSAMGDEVall.xml" /> <Content Include="fmtall\CPSAMGDEVall.xml" />
<Content Include="fmtall\EPTSTBCK1all.xml" />
<Content Include="fmtall\EPTST1all.xml" />
<Content Include="fmtall\CWEall.xml" /> <Content Include="fmtall\CWEall.xml" />
<Content Include="fmtall\CWEDEVall.xml" /> <Content Include="fmtall\CWEDEVall.xml" />
<Content Include="fmtall\CWERall.xml" /> <Content Include="fmtall\CWERall.xml" />
@@ -195,7 +187,6 @@
<Content Include="fmtall\EFSGBCKall.xml" /> <Content Include="fmtall\EFSGBCKall.xml" />
<Content Include="fmtall\ELFDEVall.xml" /> <Content Include="fmtall\ELFDEVall.xml" />
<Content Include="fmtall\ENall.xml" /> <Content Include="fmtall\ENall.xml" />
<Content Include="fmtall\EPTST2all.xml" />
<Content Include="fmtall\ESFDEVall.xml" /> <Content Include="fmtall\ESFDEVall.xml" />
<Content Include="fmtall\EXCLNall.xml" /> <Content Include="fmtall\EXCLNall.xml" />
<Content Include="fmtall\EXCLN_00all.xml" /> <Content Include="fmtall\EXCLN_00all.xml" />

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.

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.

View File

@@ -34,7 +34,7 @@
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -45,14 +45,13 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
@@ -62,7 +61,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>

View File

@@ -59,7 +59,7 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -85,7 +85,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -93,7 +92,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -104,7 +103,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -77,7 +77,6 @@ using System.Xml.Schema;
using System.Text; using System.Text;
using ROFields; using ROFields;
using RODBInterface; using RODBInterface;
using System.Linq;
namespace ROEditor namespace ROEditor
{ {
@@ -281,7 +280,6 @@ namespace ROEditor
this.tbXYPlotWid.Size = new System.Drawing.Size(40, 22); this.tbXYPlotWid.Size = new System.Drawing.Size(40, 22);
this.tbXYPlotWid.TabIndex = 11; this.tbXYPlotWid.TabIndex = 11;
this.tbXYPlotWid.Text = ""; this.tbXYPlotWid.Text = "";
this.tbXYPlotWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// tbTableWid // tbTableWid
// //
@@ -290,7 +288,6 @@ namespace ROEditor
this.tbTableWid.Size = new System.Drawing.Size(40, 22); this.tbTableWid.Size = new System.Drawing.Size(40, 22);
this.tbTableWid.TabIndex = 10; this.tbTableWid.TabIndex = 10;
this.tbTableWid.Text = ""; this.tbTableWid.Text = "";
this.tbTableWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// tbVariableTxtWid // tbVariableTxtWid
// //
@@ -299,7 +296,6 @@ namespace ROEditor
this.tbVariableTxtWid.Size = new System.Drawing.Size(40, 22); this.tbVariableTxtWid.Size = new System.Drawing.Size(40, 22);
this.tbVariableTxtWid.TabIndex = 9; this.tbVariableTxtWid.TabIndex = 9;
this.tbVariableTxtWid.Text = ""; this.tbVariableTxtWid.Text = "";
this.tbVariableTxtWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// tbSingleTxtWid // tbSingleTxtWid
// //
@@ -308,7 +304,6 @@ namespace ROEditor
this.tbSingleTxtWid.Size = new System.Drawing.Size(40, 22); this.tbSingleTxtWid.Size = new System.Drawing.Size(40, 22);
this.tbSingleTxtWid.TabIndex = 8; this.tbSingleTxtWid.TabIndex = 8;
this.tbSingleTxtWid.Text = ""; this.tbSingleTxtWid.Text = "";
this.tbSingleTxtWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// lblW4 // lblW4
// //
@@ -591,18 +586,5 @@ namespace ROEditor
this.Close(); this.Close();
} }
private void txtBox_KeyDown(object sender, KeyEventArgs e)
{
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
string clpBrd = Clipboard.GetText();
if (clpBrd.Any(c => c > 166))
{
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
} }
} }
}
}
}

View File

@@ -77,7 +77,6 @@ using System.Xml.Schema;
using System.Text; using System.Text;
using ROFields; using ROFields;
using RODBInterface; using RODBInterface;
using System.Linq;
namespace ROEditor namespace ROEditor
{ {
@@ -317,22 +316,6 @@ namespace ROEditor
} }
base.Dispose( disposing ); base.Dispose( disposing );
} }
private void txtBox_KeyDown(object sender, KeyEventArgs e)
{
bool symFlg = false;
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
string clpBrd = Clipboard.GetText();
if (clpBrd.Any(c => c > 166))
{
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
}
}
}
}
#region Windows Form Designer generated code #region Windows Form Designer generated code
/// <summary> /// <summary>
@@ -374,7 +357,6 @@ namespace ROEditor
this.tbFieldName.Size = new System.Drawing.Size(320, 22); this.tbFieldName.Size = new System.Drawing.Size(320, 22);
this.tbFieldName.TabIndex = 2; this.tbFieldName.TabIndex = 2;
this.tbFieldName.Text = ""; this.tbFieldName.Text = "";
this.tbFieldName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// tbWidth // tbWidth
// //
@@ -383,7 +365,6 @@ namespace ROEditor
this.tbWidth.Size = new System.Drawing.Size(32, 22); this.tbWidth.Size = new System.Drawing.Size(32, 22);
this.tbWidth.TabIndex = 3; this.tbWidth.TabIndex = 3;
this.tbWidth.Text = ""; this.tbWidth.Text = "";
this.tbWidth.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// btnOK // btnOK
// //
@@ -421,7 +402,6 @@ namespace ROEditor
this.tbPattern.TabIndex = 7; this.tbPattern.TabIndex = 7;
this.tbPattern.Text = ""; this.tbPattern.Text = "";
this.tbPattern.Visible = false; this.tbPattern.Visible = false;
this.tbPattern.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// FieldTextFrm // FieldTextFrm
// //
@@ -445,4 +425,3 @@ namespace ROEditor
#endregion #endregion
} }
} }

View File

@@ -72,7 +72,6 @@ using System.Xml;
using System.Text; using System.Text;
using RODBInterface; using RODBInterface;
using ROFields; using ROFields;
using System.Linq;
namespace ROEditor namespace ROEditor
{ {
@@ -278,22 +277,6 @@ namespace ROEditor
this.Close(); this.Close();
} }
private void txtBox_KeyDown(object sender, KeyEventArgs e)
{
bool symFlg = false;
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
string clpBrd = Clipboard.GetText();
if (clpBrd.Any(c => c > 166))
{
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
}
}
}
}
#region Windows Form Designer generated code #region Windows Form Designer generated code
/// <summary> /// <summary>
/// Required method for Designer support - do not modify /// Required method for Designer support - do not modify
@@ -332,7 +315,6 @@ namespace ROEditor
this.tbFieldName.Size = new System.Drawing.Size(368, 22); this.tbFieldName.Size = new System.Drawing.Size(368, 22);
this.tbFieldName.TabIndex = 1; this.tbFieldName.TabIndex = 1;
this.tbFieldName.Text = ""; this.tbFieldName.Text = "";
this.tbFieldName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// gbFldType // gbFldType
// //
@@ -455,4 +437,3 @@ namespace ROEditor
#endregion #endregion
} }
} }

View File

@@ -52,7 +52,6 @@ using System.Xml;
using System.Text; using System.Text;
using ROFields; using ROFields;
using RODBInterface; using RODBInterface;
using System.Linq;
namespace ROEditor namespace ROEditor
{ {
@@ -156,7 +155,6 @@ namespace ROEditor
this.tbGroup.Size = new System.Drawing.Size(248, 22); this.tbGroup.Size = new System.Drawing.Size(248, 22);
this.tbGroup.TabIndex = 8; this.tbGroup.TabIndex = 8;
this.tbGroup.Text = ""; this.tbGroup.Text = "";
this.tbGroup.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// lblGroup // lblGroup
// //
@@ -423,21 +421,5 @@ namespace ROEditor
GroupDefFrm grdef = new GroupDefFrm(nelem,myrodb,nelem.InnerText,dbtype); GroupDefFrm grdef = new GroupDefFrm(nelem,myrodb,nelem.InnerText,dbtype);
grdef.ShowDialog(); grdef.ShowDialog();
} }
private void txtBox_KeyDown(object sender, KeyEventArgs e)
{
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
string clpBrd = Clipboard.GetText();
if (clpBrd.Any(c => c > 166))
{
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
} }
} }
}
}
}
}

View File

@@ -106,7 +106,6 @@ using ROFields;
using RODBInterface; using RODBInterface;
using VlnStatus; using VlnStatus;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
namespace ROEditor namespace ROEditor
@@ -1312,22 +1311,6 @@ namespace ROEditor
} }
} }
} }
private void txtBox_KeyDown(object sender, KeyEventArgs e)
{
bool symFlg = false;
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
string clpBrd = Clipboard.GetText();
if (clpBrd.Any(c => c > 166))
{
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
}
}
}
}
#region Windows Form Designer generated code #region Windows Form Designer generated code
/// <summary> /// <summary>
@@ -1392,7 +1375,6 @@ namespace ROEditor
this.tbRetVal.Size = new System.Drawing.Size(464, 22); this.tbRetVal.Size = new System.Drawing.Size(464, 22);
this.tbRetVal.TabIndex = 4; this.tbRetVal.TabIndex = 4;
this.tbRetVal.Text = "textBox1"; this.tbRetVal.Text = "textBox1";
this.tbRetVal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// tbMenuVal // tbMenuVal
// //
@@ -1401,7 +1383,6 @@ namespace ROEditor
this.tbMenuVal.Size = new System.Drawing.Size(464, 22); this.tbMenuVal.Size = new System.Drawing.Size(464, 22);
this.tbMenuVal.TabIndex = 5; this.tbMenuVal.TabIndex = 5;
this.tbMenuVal.Text = "textBox1"; this.tbMenuVal.Text = "textBox1";
this.tbMenuVal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
// //
// lblGroupText // lblGroupText
// //
@@ -1627,4 +1608,3 @@ namespace ROEditor
#endregion #endregion
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -71,7 +71,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -96,7 +96,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -104,15 +103,11 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DevComponents.DotNetBar2, Version=14.1.0.37, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll</HintPath>
</Reference>
<Reference Include="System"> <Reference Include="System">
<Name>System</Name> <Name>System</Name>
</Reference> </Reference>
@@ -128,6 +123,10 @@
<Reference Include="System.Xml"> <Reference Include="System.Xml">
<Name>System.XML</Name> <Name>System.XML</Name>
</Reference> </Reference>
<Reference Include="Volian.Base.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AboutROEditor.cs"> <Compile Include="AboutROEditor.cs">
@@ -168,7 +167,6 @@
<Compile Include="RO_FST.cs"> <Compile Include="RO_FST.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Content Include="Symbols.xml" />
<EmbeddedResource Include="AboutROEditor.resx"> <EmbeddedResource Include="AboutROEditor.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>AboutROEditor.cs</DependentUpon> <DependentUpon>AboutROEditor.cs</DependentUpon>

View File

@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
CAAAAk1TRnQBSQFMAgEBAgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CAAAAk1TRnQBSQFMAgEBAgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -175,7 +175,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
CwAAAk1TRnQBSQFMAgEBBgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CwAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@@ -101,6 +101,7 @@ using System.Runtime.InteropServices;
using VlnStatus; using VlnStatus;
using System.Collections.Specialized; using System.Collections.Specialized;
using ROFST_FILE; using ROFST_FILE;
using Volian.Base.Library;
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list //using VlnProfiler; //don't forget to add VlnProfiler to the reference list
@@ -884,4 +885,3 @@ namespace ROEditor
} }
} }

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -35,7 +35,6 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@@ -45,14 +44,13 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -61,7 +59,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -263,7 +263,6 @@ using System.Collections.Specialized;
using Org.Mentalis.Files; using Org.Mentalis.Files;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace RODBInterface namespace RODBInterface
@@ -410,7 +409,7 @@ namespace RODBInterface
GetDbServerInfo(ropath); GetDbServerInfo(ropath);
if (!dbProviderType.Equals((int)DB_PROVIDER.SQL_SERVER)) if (!dbProviderType.Equals((int)DB_PROVIDER.SQL_SERVER))
{ {
strDatabaseConnectionCommand = "Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\";User ID=Admin;Data Source=" + DataConnectionPath + "\\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"; strDatabaseConnectionCommand = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=" + DataConnectionPath + "\\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";
} }
} }
#endregion #endregion
@@ -1910,8 +1909,6 @@ namespace RODBInterface
string Info = DBE.GetString(3); string Info = DBE.GetString(3);
//B2022-043 &pos; was missing the ; //B2022-043 &pos; was missing the ;
Info = Info.Replace("&apos;", "\'"); // B2021-071: crash when getting/saving field names Info = Info.Replace("&apos;", "\'"); // B2021-071: crash when getting/saving field names
Info = Regex.Replace(Info, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
node.SetAttribute("HasChild", "True"); node.SetAttribute("HasChild", "True");
// Store data in the VlnXmlElement as a subgroup // Store data in the VlnXmlElement as a subgroup
@@ -2185,13 +2182,10 @@ namespace RODBInterface
parent.SetAttribute("ChildLoaded", "True"); parent.SetAttribute("ChildLoaded", "True");
} }
string xmlstr = GenerateXmlString(ro, false); string xmlstr = GenerateXmlString(ro, false);
string wraccid = null; string wraccid = null;
if (ro.HasAttribute("AccPageID")) if (ro.HasAttribute("AccPageID"))
{ {
string accid = ro.GetAttribute("AccPageID"); string accid = ro.GetAttribute("AccPageID");
int quote = accid.IndexOf("'"); int quote = accid.IndexOf("'");
if (quote >= 0) if (quote >= 0)
wraccid = accid.Insert(quote, "'"); wraccid = accid.Insert(quote, "'");
@@ -2257,7 +2251,7 @@ namespace RODBInterface
// select all of the field definition records in this table. // select all of the field definition records in this table.
// strGetFields = "SELECT RecID, Info from " + elem.GetAttribute("Table"); // strGetFields = "SELECT RecID, Info from " + elem.GetAttribute("Table");
strGetFields = "SELECT RecID, Info from " + TableName; strGetFields = "SELECT RecID, Info from " + TableName;
strGetFields = strGetFields + " where RecType = 2"; strGetFields = strGetFields + " where RecType = 2"; // + rtype.ToString();
DBE.Command(strGetFields); DBE.Command(strGetFields);
DBE.Reader(); DBE.Reader();

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -173,17 +171,6 @@
<Name>VlnStatus</Name> <Name>VlnStatus</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Interop.Access.Dao">
<Guid>{4AC9E1DA-5BAD-4AC7-86E3-24F4CDCECA28}</Guid>
<VersionMajor>12</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PreBuildEvent> <PreBuildEvent>

View File

@@ -735,13 +735,10 @@ namespace RODBInterface
else else
parentValue = nd.InnerText; parentValue = nd.InnerText;
if (parentName != "#whitespace")
{
//applicValues = ""; //applicValues = "";
applicValues = string.Format("<APL DefaultVal={0}", parentValue); applicValues = string.Format("<APL DefaultVal={0}", parentValue);
int pcChildIdx = 0; int pcChildIdx = 0;
//C2022-001 only save the child ro value in the RO.FST if it is different than the parent (default) value //C2022-001 only save the child ro value in the RO.FST if it is different than the parent (default) value
foreach (string c in pcChildern) foreach (string c in pcChildern)
{ {
//string csufx = CvtUserFldToFld(c); //string csufx = CvtUserFldToFld(c);
@@ -757,7 +754,6 @@ namespace RODBInterface
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText); applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
} }
} }
}
applicValues += " /APL>"; applicValues += " /APL>";
} }
return applicValues; return applicValues;

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE;Upgrade2005;</DefineConstants> <DefineConstants>DEBUG;TRACE;Upgrade2005;</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -77,7 +77,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -102,7 +101,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -110,7 +108,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -121,7 +119,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -7,7 +7,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -73,7 +73,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -98,7 +97,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -106,7 +104,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>

View File

@@ -39,7 +39,7 @@ namespace ctlXMLEditLib
{ {
private System.Windows.Forms.Button btnSave; private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.Button btnCancel;
private ctlXMLEditLib.roRichTextBox tbZoom; // RO Editor add symbols C2022 - 003 private System.Windows.Forms.TextBox tbZoom;
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
@@ -88,7 +88,7 @@ namespace ctlXMLEditLib
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.tbZoom = new ctlXMLEditLib.roRichTextBox(); // RO Editor add symbols C2022 - 003 this.tbZoom = new System.Windows.Forms.TextBox();
this.btnSave = new System.Windows.Forms.Button(); this.btnSave = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button();
this.SuspendLayout(); this.SuspendLayout();
@@ -99,7 +99,7 @@ namespace ctlXMLEditLib
this.tbZoom.Location = new System.Drawing.Point(24, 16); this.tbZoom.Location = new System.Drawing.Point(24, 16);
this.tbZoom.Multiline = true; this.tbZoom.Multiline = true;
this.tbZoom.Name = "tbZoom"; this.tbZoom.Name = "tbZoom";
this.tbZoom.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; // RO Editor add symbols C2022 - 003 this.tbZoom.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.tbZoom.Size = new System.Drawing.Size(576, 392); this.tbZoom.Size = new System.Drawing.Size(576, 392);
this.tbZoom.TabIndex = 0; this.tbZoom.TabIndex = 0;
// //
@@ -149,4 +149,3 @@ namespace ctlXMLEditLib
} }
} }

View File

@@ -200,11 +200,7 @@ using System.Xml.Schema;
using System.Text; using System.Text;
using RODBInterface; using RODBInterface;
using Org.Mentalis.Files; using Org.Mentalis.Files;
using System.Windows; //using IniFileIO;
using System.Text.RegularExpressions;
using System.Linq;
using Volian.Base.Library;
@@ -225,7 +221,6 @@ namespace ctlXMLEditLib
/// ///
/// ///
/// </summary> /// </summary>
public class ctlXMLEdit : System.Windows.Forms.UserControl public class ctlXMLEdit : System.Windows.Forms.UserControl
{ {
/// <summary> /// <summary>
@@ -242,12 +237,12 @@ namespace ctlXMLEditLib
private bool dosaveflag; private bool dosaveflag;
private VlnXmlElement editelem; private VlnXmlElement editelem;
private XmlDocument editdoc; private XmlDocument editdoc;
private roRichTextBox zoomtextbox; private TextBox zoomtextbox;
// the following is used for handling images. Note that if we want to have more // the following is used for handling images. Note that if we want to have more
// than one image defined in an ro, this should be become a list. // than one image defined in an ro, this should be become a list.
private roRichTextBox GraphicsFiletextbox; private TextBox GraphicsFiletextbox;
private roRichTextBox GraphicsWdtextbox; private TextBox GraphicsWdtextbox;
private roRichTextBox GraphicsHttextbox; private TextBox GraphicsHttextbox;
private System.Windows.Forms.Button btnFindFile; private System.Windows.Forms.Button btnFindFile;
private string GraphicsText; private string GraphicsText;
private ToolTip zmtooltip; private ToolTip zmtooltip;
@@ -270,19 +265,6 @@ namespace ctlXMLEditLib
private GroupBox pcGrpBox = null; private GroupBox pcGrpBox = null;
/** end C2021-026 **/ /** end C2021-026 **/
public string _RO_IDEN;
public string RO_IDEN
{
get
{
return _RO_IDEN;
}
set
{
_RO_IDEN = value;
}
}
// use this struct to define attributes for the text box fields, storing // use this struct to define attributes for the text box fields, storing
// the pattern, radio button association, required field flag, etc. // the pattern, radio button association, required field flag, etc.
struct TextBoxAttrTag struct TextBoxAttrTag
@@ -329,19 +311,10 @@ namespace ctlXMLEditLib
public string GetParentHTId { get { return parenthtid; } } public string GetParentHTId { get { return parenthtid; } }
public void SetParentHTId(string id) { this.parenthtid = id; } public void SetParentHTId(string id) { this.parenthtid = id; }
} }
private roRichTextBox _TextBoxFocus; // RO Editor add symbols C2022 - 003
public roRichTextBox TextBoxFocus
{
get { return _TextBoxFocus; }
set
{
_TextBoxFocus = value;
}
}
public ctlXMLEdit(VlnXmlElement myelem, XmlSchema myschema, ArrayList reqfields, ArrayList fldsWithApplic, string [] pckids) public ctlXMLEdit(VlnXmlElement myelem, XmlSchema myschema, ArrayList reqfields, ArrayList fldsWithApplic, string [] pckids)
{ {
// This call is required by the Windows.Forms Form Designer. // This call is required by the Windows.Forms Form Designer.
InitializeComponent(); InitializeComponent();
FieldsWithApplic = fldsWithApplic; FieldsWithApplic = fldsWithApplic;
PCChildren = pckids; //C2021-026 list of Parent/Child children PCChildren = pckids; //C2021-026 list of Parent/Child children
@@ -386,12 +359,11 @@ namespace ctlXMLEditLib
// Set required fields based on list. (can add message later). // Set required fields based on list. (can add message later).
SetRequiredFields(reqfields); SetRequiredFields(reqfields);
dosaveflag=true; dosaveflag=true;
RO_IDEN = myelem.GetAccPageIDTemplate();
} }
// set the required fields tag on those fields which are included in the passed // set the required fields tag on those fields which are included in the passed
// in required fields list. // in required fields list.
private void DoSet(roRichTextBox hwnd, string msg) // RO Editor add symbols C2022 - 003 private void DoSet(TextBox hwnd, string msg)
{ {
if (hwnd == null) return; if (hwnd == null) return;
if (hwnd.Tag != null) if (hwnd.Tag != null)
@@ -406,7 +378,7 @@ namespace ctlXMLEditLib
private void SetRequiredFields(ArrayList reqfields) private void SetRequiredFields(ArrayList reqfields)
{ {
Object o; Object o;
roRichTextBox hwnd; TextBox hwnd;
string field, msg; string field, msg;
int indx; int indx;
foreach (string strfld in reqfields) foreach (string strfld in reqfields)
@@ -425,15 +397,15 @@ namespace ctlXMLEditLib
o = myHT[field+"a"]; o = myHT[field+"a"];
if (o != null) // set all combo types required, the checker if (o != null) // set all combo types required, the checker
{ {
DoSet((roRichTextBox)o,msg); DoSet((TextBox)o,msg);
DoSet((roRichTextBox)myHT[field+"b"],msg); DoSet((TextBox)myHT[field+"b"],msg);
DoSet((roRichTextBox)myHT[field+"c"],msg); DoSet((TextBox)myHT[field+"c"],msg);
DoSet((roRichTextBox)myHT[field+"d"],msg); DoSet((TextBox)myHT[field+"d"],msg);
} }
} }
else if (o != null) else if (o != null)
{ {
hwnd = (roRichTextBox) o; hwnd = (TextBox) o;
if (hwnd.Tag != null) if (hwnd.Tag != null)
{ {
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag; TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
@@ -447,7 +419,7 @@ namespace ctlXMLEditLib
// C2021-026 If this is a Parent/Child field that has no value saved in the database // C2021-026 If this is a Parent/Child field that has no value saved in the database
// then use the parent's value and display it as grey colored text. // then use the parent's value and display it as grey colored text.
private void GetDefaultParentValue(roRichTextBox tb, XmlNode node, string chldName) private void GetDefaultParentValue(TextBox tb, XmlNode node, string chldName)
{ {
XmlNode parentNode = null; XmlNode parentNode = null;
// PCChildren contains a list strings reprenting the Children setup in the current Working Draft Parent/Child property // PCChildren contains a list strings reprenting the Children setup in the current Working Draft Parent/Child property
@@ -491,13 +463,13 @@ namespace ctlXMLEditLib
private void DisplayFieldContents(XmlNode node) private void DisplayFieldContents(XmlNode node)
{ {
Object o; Object o;
roRichTextBox hwnd; TextBox hwnd;
XmlNode nd; XmlNode nd;
// if we have an image, check it for validity, i.e. file exists, etc.?? // if we have an image, check it for validity, i.e. file exists, etc.??
foreach (string str in myHT.Keys) foreach (string str in myHT.Keys)
{ {
o = myHT[str]; o = myHT[str];
hwnd = (roRichTextBox) o; hwnd = (TextBox) o;
nd = node.SelectSingleNode(str); nd = node.SelectSingleNode(str);
// if not found with just the string, search the tree. // if not found with just the string, search the tree.
if (nd==null)nd = node.SelectSingleNode("*/"+str); if (nd==null)nd = node.SelectSingleNode("*/"+str);
@@ -505,9 +477,7 @@ namespace ctlXMLEditLib
GetDefaultParentValue(hwnd, node, str); // C2021-026 Parent/Child Field has no value so use parent's value GetDefaultParentValue(hwnd, node, str); // C2021-026 Parent/Child Field has no value so use parent's value
else else
{ {
hwnd.Text = nd.InnerText; // set the field's text from XML
hwnd.Text = Regex.Replace(nd.InnerText, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // set the field's text from XML
Size size = hwnd.Size;
// check if this window has a button name as part of its tag. If // check if this window has a button name as part of its tag. If
// so it's a combo type & the radio button/visibility may need to // so it's a combo type & the radio button/visibility may need to
@@ -576,7 +546,7 @@ namespace ctlXMLEditLib
// height/width data of the image. // height/width data of the image.
if (GraphicsFiletextbox != null && GraphicsFiletextbox.Text != "") UpdateHtWd(); if (GraphicsFiletextbox != null && GraphicsFiletextbox.Text != "") UpdateHtWd();
} }
public roRichTextBox GetGraphicsFiletextbox() public TextBox GetGraphicsFiletextbox()
{ {
return GraphicsFiletextbox; return GraphicsFiletextbox;
} }
@@ -615,13 +585,13 @@ namespace ctlXMLEditLib
{ {
dosaveflag=false; dosaveflag=false;
mysavexml=false; mysavexml=false;
roRichTextBox hwnd; TextBox hwnd;
// first, clear out all of the text boxes. // first, clear out all of the text boxes.
foreach (string str in myHT.Keys) foreach (string str in myHT.Keys)
{ {
object o = myHT[str]; object o = myHT[str];
hwnd = (roRichTextBox) o; hwnd = (TextBox) o;
hwnd.Text = ""; hwnd.Text = "";
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag; TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
RadioButton radio; RadioButton radio;
@@ -653,7 +623,7 @@ namespace ctlXMLEditLib
// to the parent's value, then clear the child's textbox so that nothing is saved // to the parent's value, then clear the child's textbox so that nothing is saved
// to the database. This allow us to know that a specific value was not set // to the database. This allow us to know that a specific value was not set
// for this Parent/Child child // for this Parent/Child child
private void RemovePCChildTextIfSameAsParent(XmlNode node, roRichTextBox tb, string chldName) private void RemovePCChildTextIfSameAsParent(XmlNode node, TextBox tb, string chldName)
{ {
XmlNode parentNode = null; XmlNode parentNode = null;
// if this is a child node get the parent's value // if this is a child node get the parent's value
@@ -690,35 +660,18 @@ namespace ctlXMLEditLib
// true if success, false if fail. // true if success, false if fail.
// Note that the Parent and Child XML node variables below are not coding for Parent/Child Applicabily Fields // Note that the Parent and Child XML node variables below are not coding for Parent/Child Applicabily Fields
public bool SaveData() public bool SaveData()
{ {
if (mysavexml) if (mysavexml)
{ {
roRichTextBox hwnd; TextBox hwnd;
TextBoxAttrTag tag; TextBoxAttrTag tag;
string imgdate; string imgdate;
//go thru the hash table to get textboxes. Find the ones that have text. //go thru the hash table to get textboxes. Find the ones that have text.
foreach (string str in myHT.Keys) // RO Editor add symbols C2022 - 003 foreach (string str in myHT.Keys)
{ {
object o = myHT[str]; object o = myHT[str];
hwnd = (roRichTextBox) o; hwnd = (TextBox) o;
StringBuilder result1 = new StringBuilder();
char[] chrAry = hwnd.Text.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 166)
{
result1.Append($"\\u{(int)chr}?");
}
else
{
result1.Append((char)chr);
}
}
hwnd.Text = result1.ToString();
imgdate = null; imgdate = null;
// if this is a required field and there is no text, put out an error // if this is a required field and there is no text, put out an error
// message and get out of here. // message and get out of here.
@@ -835,7 +788,6 @@ namespace ctlXMLEditLib
return (false); return (false);
} }
#region Component Designer generated code #region Component Designer generated code
/// <summary> /// <summary>
/// Required method for Designer support - do not modify /// Required method for Designer support - do not modify
@@ -906,7 +858,7 @@ namespace ctlXMLEditLib
// 'normalizedString') or a multiline text box(type is 'string'). Also, a radio // 'normalizedString') or a multiline text box(type is 'string'). Also, a radio
// button is passed in if this was called to handle an element within a combo type. // button is passed in if this was called to handle an element within a combo type.
// This button is saved for a given text box so that initialization of these combo types can occur. // This button is saved for a given text box so that initialization of these combo types can occur.
private string DisplayXmlSchemaSimpleType(XmlSchemaSimpleType simpleType, roRichTextBox mytextbox, RadioButton radio, private string DisplayXmlSchemaSimpleType(XmlSchemaSimpleType simpleType, TextBox mytextbox, RadioButton radio,
bool img, string imgname) bool img, string imgname)
{ {
// set up for text box tag, which stores whether field is required and // set up for text box tag, which stores whether field is required and
@@ -936,17 +888,12 @@ namespace ctlXMLEditLib
if (getannot.IndexOf("Lines")>=0) if (getannot.IndexOf("Lines")>=0)
{ {
GraphicsHttextbox = mytextbox; GraphicsHttextbox = mytextbox;
Size size = GraphicsHttextbox.Size;
mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus); mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus);
} }
if (getannot.IndexOf("Character")>=0) if (getannot.IndexOf("Character")>=0)
{ {
GraphicsWdtextbox = mytextbox; GraphicsWdtextbox = mytextbox;
mytextbox.LostFocus += new System.EventHandler(this.GraphicsWd_lostfocus); mytextbox.LostFocus += new System.EventHandler(this.GraphicsWd_lostfocus);
} }
} }
} }
@@ -958,16 +905,13 @@ namespace ctlXMLEditLib
// A Schema Type Restriction is used to define single or multi-line boxes. // A Schema Type Restriction is used to define single or multi-line boxes.
XmlSchemaSimpleTypeRestriction myRestrictions = (XmlSchemaSimpleTypeRestriction) simpleType.Content; XmlSchemaSimpleTypeRestriction myRestrictions = (XmlSchemaSimpleTypeRestriction) simpleType.Content;
if (myRestrictions.BaseTypeName.Name == "normalizedString") if (myRestrictions.BaseTypeName.Name == "normalizedString")
{
mytextbox.Multiline = false; mytextbox.Multiline = false;
mytextbox.Size = new Size(300, 40);
}
else else
{ {
mytextbox.Multiline = true; mytextbox.Multiline = true;
mytextbox.AcceptsTab = true; mytextbox.AcceptsReturn = true;
mytextbox.Height = (int) mytextbox.Font.GetHeight() * 4; mytextbox.Height = (int) mytextbox.Font.GetHeight() * 4;
mytextbox.ScrollBars = RichTextBoxScrollBars.Vertical; mytextbox.ScrollBars = ScrollBars.Vertical;
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom"); zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
} }
@@ -1048,8 +992,7 @@ namespace ctlXMLEditLib
radio.CheckedChanged += new System.EventHandler(this.radiocheckchg); radio.CheckedChanged += new System.EventHandler(this.radiocheckchg);
gbox.Controls.Add(radio); gbox.Controls.Add(radio);
roRichTextBox tb = new roRichTextBox(); TextBox tb = new TextBox();
Size size3 = tb.Size;
tb.Location = new Point(boxx+20, y+25); tb.Location = new Point(boxx+20, y+25);
if (!first) tb.Visible = false; if (!first) tb.Visible = false;
myHT.Add(element.Name,tb); myHT.Add(element.Name,tb);
@@ -1058,7 +1001,7 @@ namespace ctlXMLEditLib
// the groupbox. // the groupbox.
Controls.Add(tb); Controls.Add(tb);
tb.TextChanged += new System.EventHandler(this.textbox_change); tb.TextChanged += new System.EventHandler(this.textbox_change);
tb.GotFocus += new System.EventHandler(this.currentTextBox); tb.GotFocus += new System.EventHandler(this.textbox_zoombtn);
tb.KeyDown += new KeyEventHandler(MyOnKeyDown); tb.KeyDown += new KeyEventHandler(MyOnKeyDown);
gbox.Contains(tb); gbox.Contains(tb);
// the following will set attributes on the text boxes such as maxlength, multiline, etc. // the following will set attributes on the text boxes such as maxlength, multiline, etc.
@@ -1201,9 +1144,8 @@ namespace ctlXMLEditLib
} }
else else
{ {
roRichTextBox mytextbox; TextBox mytextbox;
mytextbox = new roRichTextBox(); mytextbox = new TextBox();
Size size3 = mytextbox.Size;
mytextbox.Location = new Point(screenx+indent, screeny); mytextbox.Location = new Point(screenx+indent, screeny);
string tFieldName = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName); string tFieldName = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
mytextbox.Name = tFieldName; mytextbox.Name = tFieldName;
@@ -1213,7 +1155,7 @@ namespace ctlXMLEditLib
screeny = screeny + 10; screeny = screeny + 10;
mytextbox.TextChanged += new System.EventHandler(this.textbox_change); mytextbox.TextChanged += new System.EventHandler(this.textbox_change);
mytextbox.Validating += new System.ComponentModel.CancelEventHandler(this.textbox_Validating); mytextbox.Validating += new System.ComponentModel.CancelEventHandler(this.textbox_Validating);
mytextbox.GotFocus += new System.EventHandler(this.currentTextBox); mytextbox.GotFocus += new System.EventHandler(this.textbox_zoombtn);
mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown); mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown);
if (pcChildIdx > 0) if (pcChildIdx > 0)
{ {
@@ -1253,15 +1195,6 @@ namespace ctlXMLEditLib
} }
public delegate void ctlXMLEditEvent(object sender, ctlXMLEditEventArgs args); // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID field.
public event ctlXMLEditEvent EnableDisableSymbolsBtn;
private void OnEnableDisableSymbolsBtn(ctlXMLEditEventArgs args)
{
if (EnableDisableSymbolsBtn != null)
EnableDisableSymbolsBtn(this, args);
}
// when data in a text box has changed, flag it (except for when this // when data in a text box has changed, flag it (except for when this
// happens during loading of original data). This flag will be used // happens during loading of original data). This flag will be used
// later to know whether to save data. // later to know whether to save data.
@@ -1277,7 +1210,7 @@ namespace ctlXMLEditLib
// When leaving the textbox // When leaving the textbox
private void txtBox_Leave(object sender, EventArgs e) private void txtBox_Leave(object sender, EventArgs e)
{ {
roRichTextBox tb = sender as roRichTextBox; TextBox tb = sender as TextBox;
string dfTxt = ""; string dfTxt = "";
try try
{ {
@@ -1286,7 +1219,7 @@ namespace ctlXMLEditLib
{ {
object o = myHT[parentid]; object o = myHT[parentid];
if (o != null) if (o != null)
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default) dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
} }
else else
{ {
@@ -1294,7 +1227,7 @@ namespace ctlXMLEditLib
string parName = pcGrpBox.Name.Substring(5); string parName = pcGrpBox.Name.Substring(5);
object o = myHT[parName]; object o = myHT[parName];
if (o != null) if (o != null)
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default) dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
} }
} }
catch catch
@@ -1302,7 +1235,7 @@ namespace ctlXMLEditLib
string parName = pcGrpBox.Name.Substring(5); string parName = pcGrpBox.Name.Substring(5);
object o = myHT[parName]; object o = myHT[parName];
if (o != null) if (o != null)
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default) dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
} }
if (dosaveflag) mysavexml = true; if (dosaveflag) mysavexml = true;
@@ -1318,7 +1251,7 @@ namespace ctlXMLEditLib
// so clear the textbox so that user can enter the value for that child // so clear the textbox so that user can enter the value for that child
private void txtBox_Enter(object sender, EventArgs e) private void txtBox_Enter(object sender, EventArgs e)
{ {
roRichTextBox tb = sender as roRichTextBox; TextBox tb = sender as TextBox;
if (tb.ForeColor == SystemColors.GrayText) // currently no value set - using parent's value if (tb.ForeColor == SystemColors.GrayText) // currently no value set - using parent's value
{ {
tb.Text = ""; tb.Text = "";
@@ -1331,7 +1264,7 @@ namespace ctlXMLEditLib
private void radiocheckchg(object sender, System.EventArgs e) private void radiocheckchg(object sender, System.EventArgs e)
{ {
RadioButton btnsel = (RadioButton) sender; RadioButton btnsel = (RadioButton) sender;
roRichTextBox assocbox; TextBox assocbox;
string btntext, str; string btntext, str;
if(dosaveflag)mysavexml = true; if(dosaveflag)mysavexml = true;
@@ -1344,7 +1277,7 @@ namespace ctlXMLEditLib
str = btnsel.Name.Replace(btntext,""); str = btnsel.Name.Replace(btntext,"");
object o = myHT[str]; object o = myHT[str];
if (o == null) return; if (o == null) return;
assocbox = (roRichTextBox) o; assocbox = (TextBox) o;
// make the text box visible if checked, otherwise, invisible // make the text box visible if checked, otherwise, invisible
assocbox.Visible = btnsel.Checked; assocbox.Visible = btnsel.Checked;
// C2021-026 show or hide the Parent/Child appicability group box // C2021-026 show or hide the Parent/Child appicability group box
@@ -1366,7 +1299,7 @@ namespace ctlXMLEditLib
c.Visible = vsblState; // show or hide the lable inside the group box c.Visible = vsblState; // show or hide the lable inside the group box
object oo = myHT[c.Name]; object oo = myHT[c.Name];
if (oo != null) if (oo != null)
(oo as roRichTextBox).Visible = vsblState; // show or hide the associated text box (oo as TextBox).Visible = vsblState; // show or hide the associated text box
} }
} }
} }
@@ -1458,7 +1391,7 @@ namespace ctlXMLEditLib
// The following can be used to validate the text, i.e. check the text against // The following can be used to validate the text, i.e. check the text against
// the pattern. this needs written yet (5/16/02) // the pattern. this needs written yet (5/16/02)
private void MyValidatingCode(roRichTextBox tb) private void MyValidatingCode(TextBox tb)
{ {
//get the text box's tag which contains a flag for whether this is required & //get the text box's tag which contains a flag for whether this is required &
//if it has a pattern. If it has a pattern, validate the field against the pattern. //if it has a pattern. If it has a pattern, validate the field against the pattern.
@@ -1487,33 +1420,20 @@ namespace ctlXMLEditLib
} }
// save which box we're on, for zoom processing. // save which box we're on, for zoom processing.
private void currentTextBox(object sender, System.EventArgs e) private void textbox_zoombtn(object sender, System.EventArgs e)
{ {
roRichTextBox textbox = (roRichTextBox) sender; TextBox textbox = (TextBox) sender;
if (textbox.Multiline == true || textbox == GraphicsFiletextbox) if (textbox.Multiline == true || textbox == GraphicsFiletextbox)
zoomtextbox = textbox; zoomtextbox = textbox;
else else
zoomtextbox = null; zoomtextbox = null;
TextBoxFocus = textbox;
string RO_IDENDITY = RO_IDEN.Substring(1, RO_IDEN.Length - 2); // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID.
if (textbox.Name == RO_IDENDITY)
{
OnEnableDisableSymbolsBtn(new ctlXMLEditEventArgs(DisplaySymBolBtn:false));
}
else
{
OnEnableDisableSymbolsBtn(new ctlXMLEditEventArgs(DisplaySymBolBtn:true));
}
} }
private void textbox_Validating(object sender, System.ComponentModel.CancelEventArgs e) private void textbox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
{ {
try try
{ {
MyValidatingCode((roRichTextBox) sender); MyValidatingCode((TextBox) sender);
} }
catch(Exception ex) catch(Exception ex)
@@ -1539,18 +1459,11 @@ namespace ctlXMLEditLib
} }
btnZoom_click(null, null); btnZoom_click(null, null);
} }
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
if (((kea.Modifiers & Keys.ControlKey) == Keys.ControlKey) && kea.KeyCode == Keys.V)
{
roRichTextBox o = (roRichTextBox)objSender;
o.rchtxtBox_KeyDown(objSender, RO_IDEN);
}
}
} }
public void btnZoom_click(object sender, System.EventArgs e) public void btnZoom_click(object sender, System.EventArgs e)
{ {
//TextBox tb = (TextBox) sender;
TextBoxAttrTag tag; TextBoxAttrTag tag;
bool doimage = false; bool doimage = false;
if (zoomtextbox.Tag != null) if (zoomtextbox.Tag != null)
@@ -1594,7 +1507,7 @@ namespace ctlXMLEditLib
// file local & keep width/height of file proportional. // file local & keep width/height of file proportional.
private void GraphicText_lostfocus(object sender, System.EventArgs e) private void GraphicText_lostfocus(object sender, System.EventArgs e)
{ {
roRichTextBox fnamebox = (roRichTextBox) sender; TextBox fnamebox = (TextBox) sender;
if (fnamebox.Text != "" && fnamebox.Modified == true) if (fnamebox.Text != "" && fnamebox.Modified == true)
{ {
FileInfo ifi = new FileInfo(fnamebox.Text); FileInfo ifi = new FileInfo(fnamebox.Text);
@@ -1803,7 +1716,7 @@ namespace ctlXMLEditLib
// if changed height, calculate associated width // if changed height, calculate associated width
private void GraphicsHt_lostfocus(object sender, System.EventArgs e) private void GraphicsHt_lostfocus(object sender, System.EventArgs e)
{ {
roRichTextBox ht = (roRichTextBox) sender; TextBox ht = (TextBox) sender;
if (ht.Modified == true) if (ht.Modified == true)
{ {
try try
@@ -1820,7 +1733,7 @@ namespace ctlXMLEditLib
// if changed width, calculate associated height // if changed width, calculate associated height
private void GraphicsWd_lostfocus(object sender, System.EventArgs e) private void GraphicsWd_lostfocus(object sender, System.EventArgs e)
{ {
roRichTextBox wd = (roRichTextBox) sender; TextBox wd = (TextBox) sender;
if (wd.Modified == true) if (wd.Modified == true)
{ {
try try
@@ -2016,31 +1929,5 @@ namespace ctlXMLEditLib
return curTZ.GetDaylightChanges(year); return curTZ.GetDaylightChanges(year);
} }
} }
public class ctlXMLEditEventArgs : EventArgs // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID.
{
public ctlXMLEditEventArgs() {; }
public ctlXMLEditEventArgs(bool DisplaySymBolBtn)
{
_DisplaySymBolBtn = DisplaySymBolBtn;
}
private bool _DisplaySymBolBtn;
public bool DisplaySymBolBtn
{
get { return _DisplaySymBolBtn; }
set { _DisplaySymBolBtn = value; }
}
}
public enum E_FontStyle : byte
{
FS_NONE = 0,
FS_BOLD = 0x01,
FS_UNDERLINE = 0x02,
FS_ITALIC = 0x04,
FS_SUPERSCRIPT = 0x08,
FS_SUBSCRIPT = 0x10
}
} }

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType> <DebugType>
</DebugType> </DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -126,9 +124,6 @@
<Reference Include="System.Xml"> <Reference Include="System.Xml">
<Name>System.XML</Name> <Name>System.XML</Name>
</Reference> </Reference>
<Reference Include="Volian.Base.Library">
<HintPath>..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AssemblyInfo.cs"> <Compile Include="AssemblyInfo.cs">
@@ -140,12 +135,6 @@
<Compile Include="ImageDialog.cs"> <Compile Include="ImageDialog.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="roRichTextBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="roRichTextBox.Designer.cs">
<DependentUpon>roRichTextBox.cs</DependentUpon>
</Compile>
<Compile Include="ZoomDialog.cs"> <Compile Include="ZoomDialog.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>

View File

@@ -1,40 +0,0 @@
namespace ctlXMLEditLib
{
partial class roRichTextBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
System.Windows.Forms.AutoScaleMode AutoScaleMode;
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@@ -1,100 +0,0 @@
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 Volian.Base.Library;
namespace ctlXMLEditLib
{
public partial class roRichTextBox : RichTextBox // C2022-003 Symbols in RO Editor. Customized RichTextBox for RO Editor.
{
public roRichTextBox()
{
InitializeComponent();
}
private string _RtfPrefix; // contains Font table and styles (bold/underline/italics) for rtb from step style
public string RtfPrefixForSymbols
{
get
{
//B2020-100 RHM Use SelectionFont rather than the font from the format file.
StringBuilder selectedRtfSB = new StringBuilder();
AddFontTable(selectedRtfSB, FormatFont, true);
_RtfPrefix = selectedRtfSB.ToString();
return _RtfPrefix + @"\f1\fs" + 10 * 2 + " ";
}
}
public void InsertSymbol( int symbcode)
{
int position = this.SelectionStart;
string sym = string.Format(symbcode < 256 ? "\'{0:X2}" : @"\u{0}", symbcode);
this.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
Select(position, -1);
Select(position + 1, 0);
}
public void rchtxtBox_KeyDown(object sender,string RO_IDEN) // C2022-003 code used to prevent a symbol from being inserted into RO ID.
{
bool symFlg = false;
roRichTextBox o = (roRichTextBox)sender;
if (o.Name == RO_IDEN)
{
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
{
string clpBrd = Clipboard.GetText();
if (clpBrd.Any(c => c > 166))
{
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
Clipboard.Clear();
}
}
}
}
private static void AddFontTable(StringBuilder selectedRtfSB, Font myFont, bool isFixed)
{
StringBuilder sbbeg = new StringBuilder();
StringBuilder sbend = new StringBuilder();
if (myFont.Bold)
{
sbbeg.Append(@"\b");
sbend.Append(@"\b0");
}
if (myFont.Underline)
{
sbbeg.Append(@"\ul");
sbend.Insert(0, @"\ulnone");
}
if (myFont.Italic)
{
sbbeg.Append(@"\i");
sbend.Insert(0, @"\i0");
}
// RO Editor add symbols C2022-003
selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}");
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // FreeMono is now used for symbols display.
selectedRtfSB.Append("\r\n");
selectedRtfSB.Append(@"\viewkind4\uc1\pard" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(myFont.SizeInPoints * 2).ToString() + @" ");
}
private Font _FormatFont;
public Font FormatFont
{
get
{
if (_FormatFont == null)
{
Font formatFont;
formatFont = Font;
_FormatFont = formatFont;
}
return _FormatFont;
}
set { _FormatFont = value; }
}
}
}

View File

@@ -229,7 +229,7 @@ namespace RoAccessToSql
if (sqlConnection.State == ConnectionState.Open) if (sqlConnection.State == ConnectionState.Open)
{ {
// now try to open access db: // 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.Jet.OLEDB.4.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)) using (OleDbConnection accessConnection = new OleDbConnection(strDatabaseConnectionCommand))
{ {
try try

View File

@@ -22,7 +22,7 @@
</SccProvider> </SccProvider>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
@@ -30,17 +30,15 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DevComponents.DotNetBar2, Version=14.1.0.37, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL"> <Reference Include="DevComponents.DotNetBar2, Version=14.1.0.37, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL">
@@ -100,17 +98,6 @@
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Interop.Access.Dao">
<Guid>{4AC9E1DA-5BAD-4AC7-86E3-24F4CDCECA28}</Guid>
<VersionMajor>12</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -60,7 +60,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -85,7 +84,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_PreRegistered|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_PreRegistered|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -110,7 +108,6 @@
<DebugType>none</DebugType> <DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -119,7 +116,7 @@
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
@@ -130,7 +127,7 @@
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
@@ -141,7 +138,7 @@
<BaseAddress>285212672</BaseAddress> <BaseAddress>285212672</BaseAddress>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>

View File

@@ -1,203 +0,0 @@
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;
namespace VEPROMS
{
// C2025-027 Annotation Type Filtering
public partial class dlgAnnotationsSelect : Form
{
public dlgAnnotationsSelect()
{
InitializeComponent();
}
public dlgAnnotationsSelect(string userid)
{
InitializeComponent();
UserID = userid;
}
private int _MyItemID;
public int MyItemID
{
get { return _MyItemID; }
set { _MyItemID = value; }
}
private string _UserID;
public string UserID
{
get { return _UserID; }
set { _UserID = value; }
}
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);
}
// Move selected items from one ListBox to another.
private void MoveSelectedItems(ListBox lstFrom, ListBox lstTo)
{
while (lstFrom.SelectedItems.Count > 0)
{
lstSelected.DisplayMember = "NameStr";
lstSelected.ValueMember = "TypeID";
AnnotataionItem item = (AnnotataionItem)lstFrom.SelectedItems[0];
lstTo.Items.Add(new AnnotataionItem(item.NameStr, item.TypeID));
lstFrom.Items.Remove(item);
}
SetButtonsEditable();
btnUpdate.Enabled = true;
}
// Move all items to lstSelected.
private void btnSelectAll_Click(object sender, EventArgs e)
{
MoveAllItems(lstUnselected, lstSelected);
btnUpdate.Enabled = true;
}
// Move all items to lstUnselected.
private void btnDeselectAll_Click(object sender, EventArgs e)
{
MoveAllItems(lstSelected, lstUnselected);
btnUpdate.Enabled = true;
}
// Move all items from one ListBox to another.
private void MoveAllItems(ListBox lstFrom, ListBox lstTo)
{
lstTo.Items.AddRange(lstFrom.Items);
lstFrom.Items.Clear();
SetButtonsEditable();
btnUpdate.Enabled = true;
}
// Enable and disable buttons.
private void lst_SelectedIndexChanged(object sender, EventArgs e)
{
SetButtonsEditable();
}
// Save selected list to DB.
private void btnUpdate_Click(object sender, EventArgs e)
{
saveChanges();
}
public class AnnotataionItem
{
private string _NameStr;
private 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;
}
}
}
// Enable and disable buttons.
private void SetButtonsEditable()
{
btnSelect.Enabled = (lstUnselected.SelectedItems.Count > 0);
btnSelectAll.Enabled = (lstUnselected.Items.Count > 0);
btnDeselect.Enabled = (lstSelected.SelectedItems.Count > 0);
btnDeselectAll.Enabled = (lstSelected.Items.Count > 0);
}
private void DlgAnnotationsSelect_Load(object sender, EventArgs e)
{
lstUnselected.DisplayMember = "NameStr";
lstUnselected.ValueMember = "TypeID";
SetButtonsEditable();
DataTable AnnoType = AnnotationstypeSelections.GetAnnoTypes(UserID);
foreach (DataRow dr in AnnoType.Rows)
{
lstUnselected.Items.Add(new AnnotataionItem(dr["Name"].ToString(), (int)dr["TypeID"]));
}
lstSelected.DisplayMember = "NameStr";
lstSelected.ValueMember = "TypeID";
DataTable lstSelectedTbl = VEPROMS.CSLA.Library.AnnotationstypeSelections.Retrieve(UserID);
foreach (DataRow lstSelectedRow in lstSelectedTbl.Rows)
{
lstSelected.Items.Add(new AnnotataionItem(lstSelectedRow["Name"].ToString(), (int)lstSelectedRow["TypeID"]));
}
btnUpdate.Enabled = false;
}
private void btnCancel_Click_1(object sender, EventArgs e)
{
if (btnUpdate.Enabled == true)
{
string message = "Changes have not yet been saved. Do you want to save the changes prior to closing?";
string title = "Save Annotation Selections";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result = MessageBox.Show(message, title, buttons);
if (result == DialogResult.Yes)
{
saveChanges();
this.Close();
}
else
{
this.Close();
}
}
else
{
this.Close();
}
}
private DataTable coverToTable()
{
DataTable dt = new DataTable();
dt.Columns.Add("TypeID", typeof(Int32));
foreach (AnnotataionItem item in lstSelected.Items.OfType<AnnotataionItem>())
{
dt.Rows.Add(item.TypeID);
}
return dt;
}
private void saveChanges()
{
DataTable dt2 = coverToTable();
VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID);
btnUpdate.Enabled = false;
}
}
}

View File

@@ -66,12 +66,6 @@ namespace VEPROMS
set { _prtSectID = value; } set { _prtSectID = value; }
} }
private bool _OverwritePDF;
public bool OverwritePDF
{
get { return cbxOverwritePDF2.Checked; }
set { cbxOverwritePDF2.Checked = value; }
}
// C2018-033 Used to turn off using the date/time PDF file prefix and suffix when doing batch file autmatic baseline print testing (frmVEPROMS.cs RunAutomatic()) // C2018-033 Used to turn off using the date/time PDF file prefix and suffix when doing batch file autmatic baseline print testing (frmVEPROMS.cs RunAutomatic())
// This is needed so the the automatic baselines can compare results from different runs of PROMS // This is needed so the the automatic baselines can compare results from different runs of PROMS
@@ -399,7 +393,6 @@ namespace VEPROMS
{ {
SetupForProcedure(); SetupForProcedure();
_MyTimer = new Timer(); _MyTimer = new Timer();
_MyTimer.Tick -= new EventHandler(_MyTimer_Tick);
_MyTimer.Tick += new EventHandler(_MyTimer_Tick); _MyTimer.Tick += new EventHandler(_MyTimer_Tick);
_MyTimer.Interval = 100; _MyTimer.Interval = 100;
_MyTimer.Enabled = true; _MyTimer.Enabled = true;
@@ -1099,9 +1092,7 @@ namespace VEPROMS
(int)changeBarData.FixedChangeColumn : (int)changeBarData.FixedChangeColumn :
System.Convert.ToInt32(changeBarData.DefaultCBLoc.Split(" ,".ToCharArray())[System.Convert.ToInt32(cbd.MyChangeBarLoc)]); System.Convert.ToInt32(changeBarData.DefaultCBLoc.Split(" ,".ToCharArray())[System.Convert.ToInt32(cbd.MyChangeBarLoc)]);
//cbd.MyChangeBarColumn = (int)changeBarData.FixedChangeColumn; //cbd.MyChangeBarColumn = (int)changeBarData.FixedChangeColumn;
if (cbd.MyChangeBarText == PrintChangeBarText.UserDef && !string.IsNullOrEmpty(ppTxbxChangeBarUserMsgOne.Text)) if (cbd.MyChangeBarText == PrintChangeBarText.UserDef)
cbd.MyChangeBarMessage = ppTxbxChangeBarUserMsgOne.Text + @"\n" + ppTxbxChangeBarUserMsgTwo.Text;
else if (cbd.MyChangeBarText == PrintChangeBarText.UserDef)
cbd.MyChangeBarMessage = _DocVersionConfig.Print_UserCBMess1 + @"\n" + _DocVersionConfig.Print_UserCBMess2; cbd.MyChangeBarMessage = _DocVersionConfig.Print_UserCBMess1 + @"\n" + _DocVersionConfig.Print_UserCBMess2;
} }

File diff suppressed because it is too large Load Diff

View File

@@ -250,16 +250,6 @@ namespace VEPROMS.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap toolbox {
get {
object obj = ResourceManager.GetObject("toolbox", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

File diff suppressed because it is too large Load Diff

View File

@@ -410,5 +410,17 @@ namespace VEPROMS.Properties {
this["VisioPath"] = value; this["VisioPath"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int UCFImportOpt {
get {
return ((int)(this["UCFImportOpt"]));
}
set {
this["UCFImportOpt"] = value;
}
}
} }
} }

View File

@@ -80,9 +80,11 @@
<Setting Name="UpdateSettings" Type="System.Boolean" Scope="User"> <Setting Name="UpdateSettings" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value> <Value Profile="(Default)">True</Value>
</Setting> </Setting>
<Setting Name="cbShwRplWrdsColor" Type="System.Boolean" Scope="User"> <Setting Name="cbShwRplWrdsColor" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>
<Setting Name="PasteNoReturns" Type="System.Boolean" Scope="User"> <Setting Name="PasteNoReturns" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>
@@ -101,5 +103,8 @@
<Setting Name="VisioPath" Type="System.String" Scope="User"> <Setting Name="VisioPath" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)" />
</Setting> </Setting>
<Setting Name="UCFImportOpt" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -50,7 +50,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -61,14 +61,13 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Demo|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Demo|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Demo\</OutputPath> <OutputPath>bin\Demo\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -77,7 +76,7 @@
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -86,7 +85,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -95,7 +94,7 @@
<OutputPath>bin\Demo\</OutputPath> <OutputPath>bin\Demo\</OutputPath>
<DefineConstants>TRACE;DEMO</DefineConstants> <DefineConstants>TRACE;DEMO</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@@ -112,6 +111,10 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll</HintPath> <HintPath>..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll</HintPath>
</Reference> </Reference>
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\3rdPartyLibraries\Ionic\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="Itenso.Rtf.Interpreter"> <Reference Include="Itenso.Rtf.Interpreter">
<HintPath>..\..\..\..\3rdPartyLibraries\RtfConverter\bin\Debug\Itenso.Rtf.Interpreter.dll</HintPath> <HintPath>..\..\..\..\3rdPartyLibraries\RtfConverter\bin\Debug\Itenso.Rtf.Interpreter.dll</HintPath>
</Reference> </Reference>
@@ -122,10 +125,6 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\3rdPartyLibraries\Log4Net\log4net.dll</HintPath> <HintPath>..\..\..\..\3rdPartyLibraries\Log4Net\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.configuration" /> <Reference Include="System.configuration" />
<Reference Include="System.Data"> <Reference Include="System.Data">
@@ -134,8 +133,6 @@
<Reference Include="System.Deployment" /> <Reference Include="System.Deployment" />
<Reference Include="System.Design" /> <Reference Include="System.Design" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Runtime.Remoting" /> <Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
@@ -155,17 +152,6 @@
<DependentUpon>AboutVEPROMS.cs</DependentUpon> <DependentUpon>AboutVEPROMS.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="BookMarks.cs" /> <Compile Include="BookMarks.cs" />
<Compile Include="dlgAnnotationsSelect.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgAnnotationsSelect.Designer.cs">
<DependentUpon>dlgAnnotationsSelect.cs</DependentUpon>
</Compile>
<Compile Include="dlgAnnotationsSelect.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>dlgAnnotationsSelect.resx</DependentUpon>
</Compile>
<Compile Include="dlgApproveProcedure.cs"> <Compile Include="dlgApproveProcedure.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -178,9 +164,6 @@
<Compile Include="dlgCheckedOutProcedure.designer.cs"> <Compile Include="dlgCheckedOutProcedure.designer.cs">
<DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon> <DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="dlgExportImportEP.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgMSWordMessage.cs"> <Compile Include="dlgMSWordMessage.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -229,12 +212,6 @@
<Compile Include="dlgPickROFolder.designer.cs"> <Compile Include="dlgPickROFolder.designer.cs">
<DependentUpon>dlgPickROFolder.cs</DependentUpon> <DependentUpon>dlgPickROFolder.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="dlgPrintAllApprovedProcedures.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgPrintAllApprovedProcedures.Designer.cs">
<DependentUpon>dlgPrintAllApprovedProcedures.cs</DependentUpon>
</Compile>
<Compile Include="DlgPrintProcedure.cs"> <Compile Include="DlgPrintProcedure.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -253,6 +230,12 @@
<Compile Include="dlgTransitionReport.designer.cs"> <Compile Include="dlgTransitionReport.designer.cs">
<DependentUpon>dlgTransitionReport.cs</DependentUpon> <DependentUpon>dlgTransitionReport.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="dlgUCFDetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgUCFDetail.Designer.cs">
<DependentUpon>dlgUCFDetail.cs</DependentUpon>
</Compile>
<Compile Include="frmAnnotationsCleanup.cs"> <Compile Include="frmAnnotationsCleanup.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -271,12 +254,6 @@
<Compile Include="frmBatchRefreshCheckedOut.designer.cs"> <Compile Include="frmBatchRefreshCheckedOut.designer.cs">
<DependentUpon>frmBatchRefreshCheckedOut.cs</DependentUpon> <DependentUpon>frmBatchRefreshCheckedOut.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="frmGenTools.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmGenTools.designer.cs">
<DependentUpon>frmGenTools.cs</DependentUpon>
</Compile>
<Compile Include="frmManageUser.cs"> <Compile Include="frmManageUser.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -307,6 +284,12 @@
<Compile Include="frmSI.Designer.cs"> <Compile Include="frmSI.Designer.cs">
<DependentUpon>frmSI.cs</DependentUpon> <DependentUpon>frmSI.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="frmUCF.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmUCF.designer.cs">
<DependentUpon>frmUCF.cs</DependentUpon>
</Compile>
<Compile Include="frmVEPROMS.cs"> <Compile Include="frmVEPROMS.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -354,10 +337,6 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>AboutVEPROMS.cs</DependentUpon> <DependentUpon>AboutVEPROMS.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="dlgAnnotationsSelect.resx">
<DependentUpon>dlgAnnotationsSelect.cs</DependentUpon>
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Include="dlgMSWordMessage.resx"> <EmbeddedResource Include="dlgMSWordMessage.resx">
<DependentUpon>dlgMSWordMessage.cs</DependentUpon> <DependentUpon>dlgMSWordMessage.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -370,9 +349,6 @@
<EmbeddedResource Include="dlgImpHowToHandleROs.resx"> <EmbeddedResource Include="dlgImpHowToHandleROs.resx">
<DependentUpon>dlgImpHowToHandleROs.cs</DependentUpon> <DependentUpon>dlgImpHowToHandleROs.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="dlgPrintAllApprovedProcedures.resx">
<DependentUpon>dlgPrintAllApprovedProcedures.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DlgPrintProcedure.resx"> <EmbeddedResource Include="DlgPrintProcedure.resx">
<DependentUpon>DlgPrintProcedure.cs</DependentUpon> <DependentUpon>DlgPrintProcedure.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -380,12 +356,12 @@
<EmbeddedResource Include="dlgSetChangeBarStartDate.resx"> <EmbeddedResource Include="dlgSetChangeBarStartDate.resx">
<DependentUpon>dlgSetChangeBarStartDate.cs</DependentUpon> <DependentUpon>dlgSetChangeBarStartDate.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="dlgUCFDetail.resx">
<DependentUpon>dlgUCFDetail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmAnnotationsCleanup.resx"> <EmbeddedResource Include="frmAnnotationsCleanup.resx">
<DependentUpon>frmAnnotationsCleanup.cs</DependentUpon> <DependentUpon>frmAnnotationsCleanup.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmGenTools.resx">
<DependentUpon>frmGenTools.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmPDFStatusForm.resx"> <EmbeddedResource Include="frmPDFStatusForm.resx">
<DependentUpon>frmPDFStatusForm.cs</DependentUpon> <DependentUpon>frmPDFStatusForm.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -401,6 +377,9 @@
<EmbeddedResource Include="frmSI.resx"> <EmbeddedResource Include="frmSI.resx">
<DependentUpon>frmSI.cs</DependentUpon> <DependentUpon>frmSI.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmUCF.resx">
<DependentUpon>frmUCF.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmVEPROMS.resx"> <EmbeddedResource Include="frmVEPROMS.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>frmVEPROMS.cs</DependentUpon> <DependentUpon>frmVEPROMS.cs</DependentUpon>
@@ -508,7 +487,6 @@
<Content Include="PROMSRollback %28v2.0%29.Sql"> <Content Include="PROMSRollback %28v2.0%29.Sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Resources\toolbox.png" />
<Content Include="ROBuild.Sql"> <Content Include="ROBuild.Sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
@@ -599,6 +577,8 @@
<Content Include="Resources\Save.png" /> <Content Include="Resources\Save.png" />
<Content Include="Resources\SaveAllHS.png" /> <Content Include="Resources\SaveAllHS.png" />
<Content Include="Resources\SaveAs.png" /> <Content Include="Resources\SaveAs.png" />
<Content Include="UCFDetails.xsl" />
<Content Include="UCFSummary.xsl" />
<Content Include="VEicon.ico" /> <Content Include="VEicon.ico" />
<Content Include="veproms.ico" /> <Content Include="veproms.ico" />
<Content Include="Vicon.ico" /> <Content Include="Vicon.ico" />

View File

@@ -1,229 +0,0 @@
namespace VEPROMS
{
partial class dlgAnnotationsSelect
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lstUnselected = new System.Windows.Forms.ListBox();
this.lstSelected = new System.Windows.Forms.ListBox();
this.btnSelect = new System.Windows.Forms.Button();
this.btnSelectAll = new System.Windows.Forms.Button();
this.btnDeselectAll = new System.Windows.Forms.Button();
this.btnDeselect = new System.Windows.Forms.Button();
this.btnUpdate = new System.Windows.Forms.Button();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnCancel = new System.Windows.Forms.Button();
this.lblMessage = new System.Windows.Forms.Label();
this.lblAvailableTypes = new System.Windows.Forms.Label();
this.lblSelected = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// lstUnselected
//
this.lstUnselected.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstUnselected.FormattingEnabled = true;
this.lstUnselected.IntegralHeight = false;
this.lstUnselected.ItemHeight = 16;
this.lstUnselected.Location = new System.Drawing.Point(3, 3);
this.lstUnselected.Name = "lstUnselected";
this.tableLayoutPanel1.SetRowSpan(this.lstUnselected, 4);
this.lstUnselected.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstUnselected.Size = new System.Drawing.Size(287, 347);
this.lstUnselected.TabIndex = 0;
this.lstUnselected.SelectedIndexChanged += new System.EventHandler(this.lst_SelectedIndexChanged);
//
// lstSelected
//
this.lstSelected.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstSelected.FormattingEnabled = true;
this.lstSelected.IntegralHeight = false;
this.lstSelected.ItemHeight = 16;
this.lstSelected.Location = new System.Drawing.Point(334, 3);
this.lstSelected.Name = "lstSelected";
this.tableLayoutPanel1.SetRowSpan(this.lstSelected, 4);
this.lstSelected.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstSelected.Size = new System.Drawing.Size(288, 347);
this.lstSelected.TabIndex = 1;
this.lstSelected.SelectedIndexChanged += new System.EventHandler(this.lst_SelectedIndexChanged);
//
// btnSelect
//
this.btnSelect.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btnSelect.Location = new System.Drawing.Point(298, 32);
this.btnSelect.Name = "btnSelect";
this.btnSelect.Size = new System.Drawing.Size(28, 23);
this.btnSelect.TabIndex = 2;
this.btnSelect.Text = ">";
this.btnSelect.UseVisualStyleBackColor = true;
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
//
// btnSelectAll
//
this.btnSelectAll.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btnSelectAll.Location = new System.Drawing.Point(296, 120);
this.btnSelectAll.Name = "btnSelectAll";
this.btnSelectAll.Size = new System.Drawing.Size(32, 23);
this.btnSelectAll.TabIndex = 3;
this.btnSelectAll.Text = ">>";
this.btnSelectAll.UseVisualStyleBackColor = true;
this.btnSelectAll.Click += new System.EventHandler(this.btnSelectAll_Click);
//
// btnDeselectAll
//
this.btnDeselectAll.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btnDeselectAll.Location = new System.Drawing.Point(297, 207);
this.btnDeselectAll.Name = "btnDeselectAll";
this.btnDeselectAll.Size = new System.Drawing.Size(30, 26);
this.btnDeselectAll.TabIndex = 5;
this.btnDeselectAll.Text = "<<";
this.btnDeselectAll.UseVisualStyleBackColor = true;
this.btnDeselectAll.Click += new System.EventHandler(this.btnDeselectAll_Click);
//
// btnDeselect
//
this.btnDeselect.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btnDeselect.Location = new System.Drawing.Point(298, 297);
this.btnDeselect.Name = "btnDeselect";
this.btnDeselect.Size = new System.Drawing.Size(28, 23);
this.btnDeselect.TabIndex = 4;
this.btnDeselect.Text = "<";
this.btnDeselect.UseVisualStyleBackColor = true;
this.btnDeselect.Click += new System.EventHandler(this.btnDeselect_Click);
//
// btnUpdate
//
this.btnUpdate.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btnUpdate.Location = new System.Drawing.Point(536, 422);
this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(100, 35);
this.btnUpdate.TabIndex = 8;
this.btnUpdate.Text = "Save";
this.btnUpdate.UseVisualStyleBackColor = true;
this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 38F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.lstUnselected, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lstSelected, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.btnDeselect, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.btnDeselectAll, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.btnSelect, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.btnSelectAll, 1, 1);
this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 62);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 4;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(625, 353);
this.tableLayoutPanel1.TabIndex = 6;
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(411, 422);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(100, 35);
this.btnCancel.TabIndex = 9;
this.btnCancel.Text = "Close";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click_1);
//
// lblMessage
//
this.lblMessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblMessage.Location = new System.Drawing.Point(43, 12);
this.lblMessage.Name = "lblMessage";
this.lblMessage.Size = new System.Drawing.Size(317, 16);
this.lblMessage.TabIndex = 10;
this.lblMessage.Text = "Updates will appear when PROMS is restarted.";
//
// lblAvailableTypes
//
this.lblAvailableTypes.AutoSize = true;
this.lblAvailableTypes.Location = new System.Drawing.Point(12, 43);
this.lblAvailableTypes.Name = "lblAvailableTypes";
this.lblAvailableTypes.Size = new System.Drawing.Size(110, 16);
this.lblAvailableTypes.TabIndex = 11;
this.lblAvailableTypes.Text = "Types Available ";
//
// lblSelected
//
this.lblSelected.AutoSize = true;
this.lblSelected.Location = new System.Drawing.Point(343, 43);
this.lblSelected.Name = "lblSelected";
this.lblSelected.Size = new System.Drawing.Size(104, 16);
this.lblSelected.TabIndex = 12;
this.lblSelected.Text = "Types Selected";
//
// dlgAnnotationsSelect
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(653, 466);
this.Controls.Add(this.lblSelected);
this.Controls.Add(this.lblAvailableTypes);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.btnUpdate);
this.Controls.Add(this.lblMessage);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "dlgAnnotationsSelect";
this.Text = "Filter Annotation Types";
this.Load += new System.EventHandler(this.DlgAnnotationsSelect_Load);
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListBox lstUnselected;
private System.Windows.Forms.ListBox lstSelected;
private System.Windows.Forms.Button btnSelect;
private System.Windows.Forms.Button btnSelectAll;
private System.Windows.Forms.Button btnDeselectAll;
private System.Windows.Forms.Button btnDeselect;
private System.Windows.Forms.Button btnUpdate;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Label lblMessage;
private System.Windows.Forms.Label lblAvailableTypes;
private System.Windows.Forms.Label lblSelected;
}
}

View File

@@ -13,8 +13,6 @@ using System.Text.RegularExpressions;
using System.Globalization; using System.Globalization;
using DevComponents.DotNetBar; using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
using Volian.Controls.Library;
using System.Linq;
namespace VEPROMS namespace VEPROMS
{ {
@@ -67,13 +65,11 @@ namespace VEPROMS
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
_MyApproval = new ApprovalInfo(myFrmVEPROMS);// Save frmVEPROMS for Import to shutoff SessionPing _MyApproval = new ApprovalInfo(myFrmVEPROMS);// Save frmVEPROMS for Import to shutoff SessionPing
ApplicabilityIndex = myDocVersion.DocVersionConfig.SelectedSlave; ApplicabilityIndex = myDocVersion.DocVersionConfig.SelectedSlave;
this.ConsistencyPrintRequest -= new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest);
this.ConsistencyPrintRequest += new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest); this.ConsistencyPrintRequest += new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest);
_MyDocVersion = myDocVersion; _MyDocVersion = myDocVersion;
_MyDocVersion.ResetProcedures(); // B2021-035: Pasted, modified number and deleted procedures not refreshed so missing from list _MyDocVersion.ResetProcedures(); // B2021-035: Pasted, modified number and deleted procedures not refreshed so missing from list
InitializeComponent(); InitializeComponent();
FlexGridAddEvents(); FlexGridAddEvents();
_MyApproval.StatusUpdated -= new ApprovalStatusChangeEvent(_MyApproval_StatusUpdated);
_MyApproval.StatusUpdated += new ApprovalStatusChangeEvent(_MyApproval_StatusUpdated); _MyApproval.StatusUpdated += new ApprovalStatusChangeEvent(_MyApproval_StatusUpdated);
SetupComboBoxes(); SetupComboBoxes();
foreach (ProcedureInfo pi in myDocVersion.Procedures) foreach (ProcedureInfo pi in myDocVersion.Procedures)
@@ -105,7 +101,6 @@ namespace VEPROMS
//fgProcs.SetupEditor += new C1.Win.C1FlexGrid.RowColEventHandler(fgProcs_SetupEditor); //fgProcs.SetupEditor += new C1.Win.C1FlexGrid.RowColEventHandler(fgProcs_SetupEditor);
//fgProcs.StartEdit += new C1.Win.C1FlexGrid.RowColEventHandler(fgProcs_StartEdit); //fgProcs.StartEdit += new C1.Win.C1FlexGrid.RowColEventHandler(fgProcs_StartEdit);
//fgProcs.ValidateEdit += new C1.Win.C1FlexGrid.ValidateEditEventHandler(fgProcs_ValidateEdit); //fgProcs.ValidateEdit += new C1.Win.C1FlexGrid.ValidateEditEventHandler(fgProcs_ValidateEdit);
fgProcs.ComboCloseUp -= new C1.Win.C1FlexGrid.RowColEventHandler(fgProcs_ComboCloseUp);
fgProcs.ComboCloseUp += new C1.Win.C1FlexGrid.RowColEventHandler(fgProcs_ComboCloseUp); fgProcs.ComboCloseUp += new C1.Win.C1FlexGrid.RowColEventHandler(fgProcs_ComboCloseUp);
//fgProcs.MouseDown += new MouseEventHandler(fgProcs_MouseDown); //fgProcs.MouseDown += new MouseEventHandler(fgProcs_MouseDown);
//fgProcs.MouseUp += new MouseEventHandler(fgProcs_MouseUp); //fgProcs.MouseUp += new MouseEventHandler(fgProcs_MouseUp);
@@ -280,7 +275,6 @@ namespace VEPROMS
{ {
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
_MyApproval = new ApprovalInfo(myFrmVEPROMS);// Save frmVEPROMS for Import to shutoff SessionPing _MyApproval = new ApprovalInfo(myFrmVEPROMS);// Save frmVEPROMS for Import to shutoff SessionPing
this.ConsistencyPrintRequest -= new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest);
this.ConsistencyPrintRequest += new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest); this.ConsistencyPrintRequest += new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest);
_MyDocVersion = myDocVersion; _MyDocVersion = myDocVersion;
_MyDocVersion.ResetProcedures(); // B2021-035: Pasted, modified number and deleted procedures not refreshed so missing from list _MyDocVersion.ResetProcedures(); // B2021-035: Pasted, modified number and deleted procedures not refreshed so missing from list
@@ -301,7 +295,6 @@ namespace VEPROMS
{ {
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
_MyApproval = new ApprovalInfo(myFrmVEPROMS);// Save frmVEPROMS for Import to shutoff SessionPing _MyApproval = new ApprovalInfo(myFrmVEPROMS);// Save frmVEPROMS for Import to shutoff SessionPing
this.ConsistencyPrintRequest -= new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest);
this.ConsistencyPrintRequest += new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest); this.ConsistencyPrintRequest += new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest);
_MyDocVersion = myProcedure.MyDocVersion; _MyDocVersion = myProcedure.MyDocVersion;
_MyDocVersion.ResetProcedures(); // B2021-035: Pasted, modified number and deleted procedures not refreshed so missing from list _MyDocVersion.ResetProcedures(); // B2021-035: Pasted, modified number and deleted procedures not refreshed so missing from list
@@ -457,7 +450,6 @@ namespace VEPROMS
int checkedCount = clbMore.CheckedItems.Count; int checkedCount = clbMore.CheckedItems.Count;
string oldLabel = lblMore.Text; string oldLabel = lblMore.Text;
pbMore.Visible = true; pbMore.Visible = true;
ItemInfoList.ConsistencyCheckUpdated -= new ItemInfoListCCEvent(ItemInfoList_ConsistencyCheckUpdated);
ItemInfoList.ConsistencyCheckUpdated += new ItemInfoListCCEvent(ItemInfoList_ConsistencyCheckUpdated); ItemInfoList.ConsistencyCheckUpdated += new ItemInfoListCCEvent(ItemInfoList_ConsistencyCheckUpdated);
List<ProcedureInfo> myProcs = new List<ProcedureInfo>(); List<ProcedureInfo> myProcs = new List<ProcedureInfo>();
// B2018-136 use the list of procedures that have checkboxes and are checked (right panel) instead of the list to be approved (left panel) // B2018-136 use the list of procedures that have checkboxes and are checked (right panel) instead of the list to be approved (left panel)
@@ -1311,7 +1303,7 @@ namespace VEPROMS
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0; pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
if (si.IsApproved == 1) if (si.IsApproved == 1)
{ {
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (selectedSlave)); // "true tell export to convert ROs and Transitions to text dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (E_UCFImportOptions)0); // "true tell export to convert ROs and Transitions to text
dlg.DocReplace = frm.DocReplace; // this tells approval to prepare an export file with resolved transitions and ROs, word sections are saved with resolved ROs during approval PDF creation and saved in DocReplace dlg.DocReplace = frm.DocReplace; // this tells approval to prepare an export file with resolved transitions and ROs, word sections are saved with resolved ROs during approval PDF creation and saved in DocReplace
System.Xml.XmlDocument xd = new System.Xml.XmlDocument(); System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
dlg.ExportItem(xd, pi, "procedure"); dlg.ExportItem(xd, pi, "procedure");
@@ -1323,26 +1315,6 @@ namespace VEPROMS
// Clear the change bar override for this procedure: // Clear the change bar override for this procedure:
pi.ClearChangeBarOverrides(); pi.ClearChangeBarOverrides();
//B2019-140 Change bars do not get refreshed when approval is run.
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
//// Refresh the StepPanel for the current Procedure
//// so change bars update
//// on any open StepPanel
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
if (dti != null)
{
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
dti.MyStepTabPanel.MyStepPanel.Focus();
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
}
//since in a separate form, need to update the tree view
//so "Showing Change Bars" Content Menu Item is correct
MyFrmVEPROMS.RefreshProcedureNode(newproc);
} }
else else
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave); UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave);

File diff suppressed because it is too large Load Diff

View File

@@ -1,347 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using VEPROMS.CSLA.Library;
namespace VEPROMS
{
//C2025-024 Electronic Procedures - Phase 2 (PROMS XML output)
//class inherits from normal import/export form
//then adds additional functionality
#pragma warning disable S101 // Types should be named in PascalCase
public partial class dlgExportImportEP : dlgExportImport
#pragma warning restore S101 // Types should be named in PascalCase
{
private readonly AnnotationTypeInfo _AnnotationType;
private readonly string multiseparator = ",";
private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, folderInfo, myFrmVEPROMS, ( unitIndex))
{
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
_ExportBothConvertedandNot = true;
DocReplace = new Dictionary<int, byte[]>();
FormClosed += OnClose;
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}";
}
public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, docVersionInfo, myFrmVEPROMS, (unitIndex))
{
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
_ExportBothConvertedandNot = true;
DocReplace = new Dictionary<int, byte[]>();
FormClosed += OnClose;
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}";
}
public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, procedureInfo, myFrmVEPROMS, (unitIndex))
{
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
_ExportBothConvertedandNot = true;
DocReplace = new Dictionary<int, byte[]>();
FormClosed += OnClose;
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {procedureInfo.DisplayNumber}";
}
//Overridden function to handle export of EP data
protected override void ExportEPAnnotationInfo(XmlElement xe, ItemInfo ii)
{
if (_UnitIndex > 0)
{
ii.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
}
//switch to handle customizations for different formats
switch (ii.ActiveFormat.PlantFormat.EPFormatFiles.Find(x => x.AnnotationTypeID == _AnnotationType.TypeID)?.Name)
{
default:
ExportEPAnnotationInfo_Default(xe, ii);
break;
}
ii.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
}
//default export of EP Data
private void ExportEPAnnotationInfo_Default(XmlElement xe, ItemInfo ii)
{
//Add tab text to item
string steptab = Volian.Print.Library.PDFReport.BuildStepTab(ii);
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "StepTab", steptab));
//Add db sequence to item
string dbsequence = dbSeq(ii);
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dbsequence", dbsequence));
//get first transition in item and add it as an xml element
if (ii.MyContent.ContentTransitionCount > 0)
{
TransitionInfo ct = ii.MyContent.ContentTransitions[0];
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "TransitionToItemID", ct.ToID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "TransitionTodbsequence", dbSeq(ct.ToID)));
}
//export EP annotation details under an EPInfo node
if (ii.ItemAnnotations != null)
{
XmlElement xepinfo = xe.OwnerDocument.CreateElement("EPInfo");
EPFields myEPFields = ii.GetValidEPFields(_AnnotationType.TypeID);
ROFSTLookup lookup = ii.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(ii.MyDocVersion);
bool epexportblank = ii.EPexportblank(_AnnotationType.TypeID); //should blank xml elements export?
//grab the current RO db so will know location of RO files and default graphics ext.
using (RODbInfo myRODB = (RODbInfoList.Get()).FirstOrDefault(x => x.RODbID == ii.MyDocVersion.DocVersionAssociations[0].MyROFst.RODbID))
{
//For each annotation in the item that is of the current EP Annotation type
foreach (var EPAnnotation in ii.ItemAnnotations.Where(x => x.TypeID == _AnnotationType.TypeID))
{
var EPAnnotationConfig = new AnnotationConfig(EPAnnotation.Config);
XmlElement xepdetails = xe.OwnerDocument.CreateElement("Details");
//include the annotation ID for reference
xepdetails.Attributes.SetNamedItem(AddAttribute(xepdetails.OwnerDocument, "AnnotationID", EPAnnotation.AnnotationID.ToString()));
//loop through each EP Field - name the xml elements the EP.name
foreach (EPField EP in myEPFields)
{
string val = EPAnnotationConfig.GetValue("EP", EP.name);
if (epexportblank || !string.IsNullOrEmpty(val))
{
if (_UnitIndex != 0)
{
val = DisplayText.ResolveUnitSpecific(ii.MyDocVersion, val);
}
XmlElement xindivid = xe.OwnerDocument.CreateElement(EP.name);
//need to resolve ROs ROSingle, ROMulti, in text
//get values
switch (EP.type.ToLower())
{
case "text":
//for text, check if any embedded ROs
//if none, set the xml element to the text
//otherwise resolve the ROs
MatchCollection matches = _ROAccPageTokenPattern.Matches(val);
if (matches.Count == 0)
{
xindivid.InnerText = val;
}
else
{
//resolve ROs
//text ROs will replace the AccID key in the text
//for binary objects like images,
//we will keep the AccID in the text and output the binary as a separate child
//XML element with the same xml name as the AccID
foreach (Match m in matches)
{
ROFSTLookup.rochild roc = lookup.GetROChildByAccPageID(m.Groups[0].Value);
// Exclude replacing Images since are binary - for those, add a sub item
if (Enumerable.Range(8, 15).Contains(roc.type))
{
xindivid.InnerText = val;
XmlElement xroid = AddGraphic(xindivid, m.Groups[0].Value, roc, myRODB, roc.type != 8);
xindivid.AppendChild(xroid);
}
else if (!string.IsNullOrEmpty(roc.value))
{
bool convertCaretToDeltaSymbol = (ii.ActiveSection != null) && ii.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta;
string rocvalue = roc.value.Replace("`", "\xB0");
rocvalue = rocvalue.Replace("\xF8", "\xB0");
rocvalue = rocvalue.Replace("\x7F", "\x394"); //delta
if (convertCaretToDeltaSymbol) rocvalue = rocvalue.Replace("^", "\x394"); // delta
val = val.Replace($"{m.Groups[0].Value}", rocvalue);
xindivid.InnerText = val;
}
}
}
break;
case "rosingle":
//Get the output columns from the EPFormatFile
//set the "Item" nodes value = to those resolved items
//separated by multiseparator
XmlElement xindivid_rosingle = xindivid.OwnerDocument.CreateElement("Item");
xindivid_rosingle.Attributes.SetNamedItem(AddAttribute(xindivid_rosingle.OwnerDocument, "ROID", val));
//add values specified in EP input list
List<string> ro_single_tmp = EP.getROValuesList(EPAnnotation, val);
xindivid_rosingle.InnerText = String.Join(multiseparator, ro_single_tmp.ToArray());
//if image, add location and binary of image
// - images are type 8
// but if multiple return values could combine
// for example an text (1) + image (8) would be 9
ROFSTLookup.rochild roc_single = lookup.GetRoChild(val);
if (Enumerable.Range(8, 15).Contains(roc_single.type))
{
XmlElement xroid = AddGraphic(xindivid, val, roc_single, myRODB, roc_single.type != 8);
xindivid_rosingle.AppendChild(xroid);
}
xindivid.AppendChild(xindivid_rosingle);
break;
case "romulti":
//Get the output columns from the EPFormatFile
//create an "Item" subnode for each selected RO
//set the nodes value = to those resolved items
//separated by multiseparator
foreach (string ival in val.Split(multiseparator.ToCharArray()))
{
XmlElement xindivid_romulti = xindivid.OwnerDocument.CreateElement("Item");
xindivid_romulti.Attributes.SetNamedItem(AddAttribute(xindivid_romulti.OwnerDocument, "ROID", ival));
//add values specified in EP input list
List<string> ro_multi_tmp = EP.getROValuesList(EPAnnotation, ival);
xindivid_romulti.InnerText = String.Join(multiseparator, ro_multi_tmp.ToArray());
//if image, add location and binary of image
// - images are type 8
// but if multiple return values could combine
// for example an text (1) + image (8) would be 9
ROFSTLookup.rochild roc_multi = lookup.GetRoChild(ival);
if (Enumerable.Range(8, 15).Contains(roc_multi.type))
{
XmlElement xroid = AddGraphic(xindivid, ival, roc_multi, myRODB, roc_multi.type != 8);
xindivid_romulti.AppendChild(xroid);
}
xindivid.AppendChild(xindivid_romulti);
}
break;
case "tableinput":
xindivid.InnerText = val;
break;
default:
xindivid.InnerText = val;
break;
}
xepdetails.AppendChild(xindivid);
}
}
xepinfo.AppendChild(xepdetails);
}
}
xe.AppendChild(xepinfo);
}
}
//return a db sequence string from an Item ID
private string dbSeq(int itemID)
{
using (ItemInfo ii = ItemInfo.Get(itemID))
{
return dbSeq(ii);
}
}
//return a db sequence string from an ItemInfo
private string dbSeq(ItemInfo ii) => $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.MyProcedure.DisplayNumber} {ii.MyProcedure.DisplayText}:{ii.DBSequence}";
//For Exporting an RO that is an image
//returns the Location and FileName of the RO Image
private string GetROImageFileLocation(ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
{
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 imgname;
if (isMulti)
{
imgname = rocval.Substring(rocval.IndexOf(' ') + 1, rocval.IndexOf("\r\n") - rocval.IndexOf(' ') - 1);
}
else
{
imgname = rocval.Substring(0, rocval.IndexOf('\n'));
}
int thedot = imgname.LastIndexOf('.');
string fname = imgname;
if (thedot == -1 || (thedot != (imgname.Length - 4)))
{
RODbConfig roDbCfg = new RODbConfig(rodb.Config);
fname += string.Format(".{0}", roDbCfg.GetDefaultGraphicExtension());
}
string imgfile = Path.Combine(rodbpath, fname);
return imgfile;
}
//For Exporting an RO that is an image
//returns an xmlElement
// - that is a child to xindivid
// - that has a name of Name
// - that has a value of the binary representation of the image
// - that has an attribute designating the location of the image file
private XmlElement AddGraphic(XmlElement xindivid, string Name, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
{
Name = Name.Replace("<", "").Replace(">", "");
XmlElement xroid = xindivid.OwnerDocument.CreateElement(Name);
string imgfile = GetROImageFileLocation(roc, rodb, isMulti);
if (string.IsNullOrEmpty(imgfile)) return xroid;
xroid.Attributes.SetNamedItem(AddAttribute(xroid.OwnerDocument, "Location", imgfile));
if (File.Exists(imgfile))
{
using (FileStream fsIn = new FileStream(imgfile, FileMode.Open, FileAccess.Read, FileShare.Read))
{
// Create an instance of StreamReader that can read characters from the FileStream.
using (BinaryReader r = new BinaryReader(fsIn))
xroid.InnerText = Encoding.Default.GetString(r.ReadBytes((int)fsIn.Length));
}
}
return xroid;
}
//overridden - used to set the RO location for RO Images that are not in annotations
protected override void SetROLocation(ref XmlElement xindivid, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
{
string imgfile = GetROImageFileLocation(roc, rodb, isMulti);
if (!string.IsNullOrEmpty(imgfile)) xindivid.Attributes.SetNamedItem(AddAttribute(xindivid.OwnerDocument, "Location", imgfile));
}
//overridden - used to set specific enhanced doc info
protected override void SetEPEnhancedDocLinks(ref XmlElement xe, ItemInfo ii)
{
EnhancedDocuments eds = ii.GetMyEnhancedDocuments();
if (eds != null && eds.Count == 1)
{
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocType", eds[0].Type.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocToItemID", eds[0].ItemID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocToDbSeq", dbSeq(eds[0].ItemID)));
}
}
//clear objects to release memory
private void OnClose(object sender, EventArgs e)
{
DocReplace.Clear();
DocReplace = null;
}
}
}

View File

@@ -30,7 +30,10 @@ namespace VEPROMS
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.tcSecurity = new System.Windows.Forms.TabControl(); this.tcSecurity = new System.Windows.Forms.TabControl();
this.tpManageFolders = new System.Windows.Forms.TabPage(); this.tpGroupUsers = new System.Windows.Forms.TabPage();
this.pnlMembers = new System.Windows.Forms.Panel();
this.lstMembers = new System.Windows.Forms.ListBox();
this.lblMembers = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.tvFolders = new System.Windows.Forms.TreeView(); this.tvFolders = new System.Windows.Forms.TreeView();
this.cmFolders = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmFolders = new System.Windows.Forms.ContextMenuStrip(this.components);
@@ -38,23 +41,10 @@ namespace VEPROMS
this.createWriterGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.createWriterGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createROEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.createROEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createReviewerGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.createReviewerGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tpManageGroups = new System.Windows.Forms.TabPage();
this.btnAddMember = new System.Windows.Forms.Button();
this.btnRemoveMember = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.lbNonMembers = new System.Windows.Forms.Label();
this.btnDeleteGroup = new System.Windows.Forms.Button();
this.cbGroupSelection = new System.Windows.Forms.ComboBox();
this.lstNonMembers = new System.Windows.Forms.ListBox();
this.pnlMembers = new System.Windows.Forms.Panel();
this.lstMembers = new System.Windows.Forms.ListBox();
this.lblMembers = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.tpManageUsers = new System.Windows.Forms.TabPage();
this.lblUserGroups = new System.Windows.Forms.Label();
this.lstGroups = new System.Windows.Forms.ListBox();
this.lstUsers = new System.Windows.Forms.ListBox(); this.lstUsers = new System.Windows.Forms.ListBox();
this.lblUsers = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lstGroups = new System.Windows.Forms.ListBox();
this.tpDefault = new System.Windows.Forms.TabPage(); this.tpDefault = new System.Windows.Forms.TabPage();
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.pnlGroups = new System.Windows.Forms.Panel(); this.pnlGroups = new System.Windows.Forms.Panel();
@@ -64,22 +54,23 @@ namespace VEPROMS
this.addUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.addUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.editUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.deleteUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.deleteUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tt = new System.Windows.Forms.ToolTip(this.components); this.addMemberToolStripMenuItemUser = new System.Windows.Forms.ToolStripMenuItem();
this.cmGroups = new System.Windows.Forms.ContextMenuStrip(this.components);
this.deleteGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addMemberToolStripMenuItemGroup = new System.Windows.Forms.ToolStripMenuItem();
this.tcSecurity.SuspendLayout(); this.tcSecurity.SuspendLayout();
this.tpManageFolders.SuspendLayout(); this.tpGroupUsers.SuspendLayout();
this.cmFolders.SuspendLayout();
this.tpManageGroups.SuspendLayout();
this.pnlMembers.SuspendLayout(); this.pnlMembers.SuspendLayout();
this.tpManageUsers.SuspendLayout(); this.cmFolders.SuspendLayout();
this.tpDefault.SuspendLayout(); this.tpDefault.SuspendLayout();
this.cmMembers.SuspendLayout();
this.cmUsers.SuspendLayout(); this.cmUsers.SuspendLayout();
this.cmGroups.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// tcSecurity // tcSecurity
// //
this.tcSecurity.Controls.Add(this.tpManageFolders); this.tcSecurity.Controls.Add(this.tpGroupUsers);
this.tcSecurity.Controls.Add(this.tpManageGroups);
this.tcSecurity.Controls.Add(this.tpManageUsers);
this.tcSecurity.Controls.Add(this.tpDefault); this.tcSecurity.Controls.Add(this.tpDefault);
this.tcSecurity.Dock = System.Windows.Forms.DockStyle.Fill; this.tcSecurity.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcSecurity.Location = new System.Drawing.Point(0, 0); this.tcSecurity.Location = new System.Drawing.Point(0, 0);
@@ -87,38 +78,69 @@ namespace VEPROMS
this.tcSecurity.SelectedIndex = 0; this.tcSecurity.SelectedIndex = 0;
this.tcSecurity.Size = new System.Drawing.Size(784, 564); this.tcSecurity.Size = new System.Drawing.Size(784, 564);
this.tcSecurity.TabIndex = 0; this.tcSecurity.TabIndex = 0;
this.tcSecurity.SelectedIndexChanged += new System.EventHandler(this.changedTab);
// //
// tpManageFolders // tpGroupUsers
// //
this.tpManageFolders.BackColor = System.Drawing.SystemColors.ButtonFace; this.tpGroupUsers.BackColor = System.Drawing.SystemColors.ButtonFace;
this.tpManageFolders.Controls.Add(this.label6); this.tpGroupUsers.Controls.Add(this.pnlMembers);
this.tpManageFolders.Controls.Add(this.tvFolders); this.tpGroupUsers.Controls.Add(this.label6);
this.tpManageFolders.Location = new System.Drawing.Point(4, 22); this.tpGroupUsers.Controls.Add(this.tvFolders);
this.tpManageFolders.Name = "tpManageFolders"; this.tpGroupUsers.Controls.Add(this.lstUsers);
this.tpManageFolders.Padding = new System.Windows.Forms.Padding(3); this.tpGroupUsers.Controls.Add(this.label5);
this.tpManageFolders.Size = new System.Drawing.Size(776, 538); this.tpGroupUsers.Controls.Add(this.label3);
this.tpManageFolders.TabIndex = 2; this.tpGroupUsers.Controls.Add(this.lstGroups);
this.tpManageFolders.Text = "Manage Folders / Add Groups"; this.tpGroupUsers.Location = new System.Drawing.Point(4, 22);
this.tpGroupUsers.Name = "tpGroupUsers";
this.tpGroupUsers.Padding = new System.Windows.Forms.Padding(3);
this.tpGroupUsers.Size = new System.Drawing.Size(776, 538);
this.tpGroupUsers.TabIndex = 2;
this.tpGroupUsers.Text = "Folders, Groups and Users";
//
// pnlMembers
//
this.pnlMembers.Controls.Add(this.lstMembers);
this.pnlMembers.Controls.Add(this.lblMembers);
this.pnlMembers.Location = new System.Drawing.Point(384, 304);
this.pnlMembers.Name = "pnlMembers";
this.pnlMembers.Size = new System.Drawing.Size(386, 232);
this.pnlMembers.TabIndex = 12;
//
// lstMembers
//
this.lstMembers.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstMembers.FormattingEnabled = true;
this.lstMembers.Location = new System.Drawing.Point(0, 19);
this.lstMembers.Name = "lstMembers";
this.lstMembers.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstMembers.Size = new System.Drawing.Size(386, 212);
this.lstMembers.TabIndex = 10;
this.lstMembers.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstMembers_MouseUp);
//
// lblMembers
//
this.lblMembers.Dock = System.Windows.Forms.DockStyle.Top;
this.lblMembers.Location = new System.Drawing.Point(0, 0);
this.lblMembers.Name = "lblMembers";
this.lblMembers.Size = new System.Drawing.Size(386, 19);
this.lblMembers.TabIndex = 2;
this.lblMembers.Text = "Members";
// //
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.Location = new System.Drawing.Point(8, 5); this.label6.Location = new System.Drawing.Point(8, 5);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(55, 15); this.label6.Size = new System.Drawing.Size(41, 13);
this.label6.TabIndex = 7; this.label6.TabIndex = 7;
this.label6.Text = "Folders"; this.label6.Text = "Folders";
// //
// tvFolders // tvFolders
// //
this.tvFolders.ContextMenuStrip = this.cmFolders; this.tvFolders.ContextMenuStrip = this.cmFolders;
this.tvFolders.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tvFolders.HideSelection = false; this.tvFolders.HideSelection = false;
this.tvFolders.Location = new System.Drawing.Point(3, 32); this.tvFolders.Location = new System.Drawing.Point(8, 21);
this.tvFolders.Name = "tvFolders"; this.tvFolders.Name = "tvFolders";
this.tvFolders.Size = new System.Drawing.Size(770, 503); this.tvFolders.Size = new System.Drawing.Size(370, 511);
this.tvFolders.TabIndex = 6; this.tvFolders.TabIndex = 6;
this.tvFolders.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvFolders_NodeMouseClick); this.tvFolders.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvFolders_NodeMouseClick);
// //
@@ -160,189 +182,49 @@ namespace VEPROMS
this.createReviewerGroupToolStripMenuItem.Text = "Create a Reviewer Group"; this.createReviewerGroupToolStripMenuItem.Text = "Create a Reviewer Group";
this.createReviewerGroupToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem); this.createReviewerGroupToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem);
// //
// tpManageGroups // lstUsers
// //
this.tpManageGroups.Controls.Add(this.btnAddMember); this.lstUsers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.tpManageGroups.Controls.Add(this.btnRemoveMember); | System.Windows.Forms.AnchorStyles.Left)));
this.tpManageGroups.Controls.Add(this.label1); this.lstUsers.FormattingEnabled = true;
this.tpManageGroups.Controls.Add(this.lbNonMembers); this.lstUsers.Location = new System.Drawing.Point(630, 21);
this.tpManageGroups.Controls.Add(this.btnDeleteGroup); this.lstUsers.Name = "lstUsers";
this.tpManageGroups.Controls.Add(this.cbGroupSelection); this.lstUsers.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.tpManageGroups.Controls.Add(this.lstNonMembers); this.lstUsers.Size = new System.Drawing.Size(140, 277);
this.tpManageGroups.Controls.Add(this.pnlMembers); this.lstUsers.TabIndex = 5;
this.tpManageGroups.Controls.Add(this.label3); this.lstUsers.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstUsers_MouseUp);
this.tpManageGroups.Location = new System.Drawing.Point(4, 22); this.lstUsers.SelectedIndexChanged += new System.EventHandler(this.lstUsers_SelectedIndexChanged);
this.tpManageGroups.Name = "tpManageGroups";
this.tpManageGroups.Padding = new System.Windows.Forms.Padding(3);
this.tpManageGroups.Size = new System.Drawing.Size(776, 538);
this.tpManageGroups.TabIndex = 3;
this.tpManageGroups.Text = "Manage Groups";
this.tpManageGroups.UseVisualStyleBackColor = true;
// //
// btnAddMember // label5
// //
this.btnAddMember.Location = new System.Drawing.Point(337, 190); this.label5.AutoSize = true;
this.btnAddMember.Name = "btnAddMember"; this.label5.Location = new System.Drawing.Point(630, 6);
this.btnAddMember.Size = new System.Drawing.Size(36, 29); this.label5.Name = "label5";
this.btnAddMember.TabIndex = 19; this.label5.Size = new System.Drawing.Size(34, 13);
this.btnAddMember.Text = "<<"; this.label5.TabIndex = 4;
this.tt.SetToolTip(this.btnAddMember, "Add User as Members of Group"); this.label5.Text = "Users";
this.btnAddMember.UseVisualStyleBackColor = true;
this.btnAddMember.Click += new System.EventHandler(this.addMember_Click);
//
// btnRemoveMember
//
this.btnRemoveMember.Location = new System.Drawing.Point(337, 254);
this.btnRemoveMember.Name = "btnRemoveMember";
this.btnRemoveMember.Size = new System.Drawing.Size(36, 29);
this.btnRemoveMember.TabIndex = 18;
this.btnRemoveMember.Text = ">>";
this.tt.SetToolTip(this.btnRemoveMember, "Remove User From Group");
this.btnRemoveMember.UseVisualStyleBackColor = true;
this.btnRemoveMember.Click += new System.EventHandler(this.removeMember_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(386, 42);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(97, 15);
this.label1.TabIndex = 17;
this.label1.Text = "Non Members";
//
// lbNonMembers
//
this.lbNonMembers.AutoSize = true;
this.lbNonMembers.Location = new System.Drawing.Point(386, 42);
this.lbNonMembers.Name = "lbNonMembers";
this.lbNonMembers.Size = new System.Drawing.Size(73, 13);
this.lbNonMembers.TabIndex = 17;
this.lbNonMembers.Text = "Non Members";
//
// btnDeleteGroup
//
this.btnDeleteGroup.ForeColor = System.Drawing.Color.Red;
this.btnDeleteGroup.Location = new System.Drawing.Point(668, 12);
this.btnDeleteGroup.Name = "btnDeleteGroup";
this.btnDeleteGroup.Size = new System.Drawing.Size(89, 23);
this.btnDeleteGroup.TabIndex = 16;
this.btnDeleteGroup.Text = "Delete Group";
this.btnDeleteGroup.UseVisualStyleBackColor = true;
this.btnDeleteGroup.Click += new System.EventHandler(this.deleteGroup_Click);
//
// cbGroupSelection
//
this.cbGroupSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbGroupSelection.FormattingEnabled = true;
this.cbGroupSelection.Location = new System.Drawing.Point(50, 9);
this.cbGroupSelection.Name = "cbGroupSelection";
this.cbGroupSelection.Size = new System.Drawing.Size(272, 21);
this.cbGroupSelection.TabIndex = 15;
this.cbGroupSelection.SelectedIndexChanged += new System.EventHandler(this.cbGroupSelection_SelectedIndexChanged);
//
// lstNonMembers
//
this.lstNonMembers.FormattingEnabled = true;
this.lstNonMembers.Location = new System.Drawing.Point(389, 61);
this.lstNonMembers.Name = "lstNonMembers";
this.lstNonMembers.Size = new System.Drawing.Size(316, 472);
this.lstNonMembers.TabIndex = 14;
//
// pnlMembers
//
this.pnlMembers.Controls.Add(this.lstMembers);
this.pnlMembers.Controls.Add(this.lblMembers);
this.pnlMembers.Location = new System.Drawing.Point(6, 42);
this.pnlMembers.Name = "pnlMembers";
this.pnlMembers.Size = new System.Drawing.Size(316, 493);
this.pnlMembers.TabIndex = 13;
//
// lstMembers
//
this.lstMembers.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstMembers.FormattingEnabled = true;
this.lstMembers.Location = new System.Drawing.Point(0, 19);
this.lstMembers.Name = "lstMembers";
this.lstMembers.Size = new System.Drawing.Size(316, 474);
this.lstMembers.TabIndex = 10;
//
// lblMembers
//
this.lblMembers.Dock = System.Windows.Forms.DockStyle.Top;
this.lblMembers.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblMembers.Location = new System.Drawing.Point(0, 0);
this.lblMembers.Name = "lblMembers";
this.lblMembers.Size = new System.Drawing.Size(316, 19);
this.lblMembers.TabIndex = 2;
this.lblMembers.Text = "Selected Group Users";
// //
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 12); this.label3.Location = new System.Drawing.Point(381, 6);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(39, 13); this.label3.Size = new System.Drawing.Size(41, 13);
this.label3.TabIndex = 3; this.label3.TabIndex = 1;
this.label3.Text = "Group:"; this.label3.Text = "Groups";
//
// tpManageUsers
//
this.tpManageUsers.Controls.Add(this.lblUserGroups);
this.tpManageUsers.Controls.Add(this.lstGroups);
this.tpManageUsers.Controls.Add(this.lstUsers);
this.tpManageUsers.Controls.Add(this.lblUsers);
this.tpManageUsers.Location = new System.Drawing.Point(4, 22);
this.tpManageUsers.Name = "tpManageUsers";
this.tpManageUsers.Size = new System.Drawing.Size(776, 538);
this.tpManageUsers.TabIndex = 4;
this.tpManageUsers.Text = "Manage Users";
this.tpManageUsers.UseVisualStyleBackColor = true;
//
// lblUserGroups
//
this.lblUserGroups.AutoSize = true;
this.lblUserGroups.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblUserGroups.Location = new System.Drawing.Point(268, 11);
this.lblUserGroups.Name = "lblUserGroups";
this.lblUserGroups.Size = new System.Drawing.Size(225, 15);
this.lblUserGroups.TabIndex = 9;
this.lblUserGroups.Text = "Groups That User Is a Member Of:";
// //
// lstGroups // lstGroups
// //
this.lstGroups.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.lstGroups.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.lstGroups.FormattingEnabled = true; this.lstGroups.FormattingEnabled = true;
this.lstGroups.Location = new System.Drawing.Point(271, 36); this.lstGroups.Location = new System.Drawing.Point(384, 21);
this.lstGroups.Name = "lstGroups"; this.lstGroups.Name = "lstGroups";
this.lstGroups.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; this.lstGroups.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstGroups.Size = new System.Drawing.Size(502, 498); this.lstGroups.Size = new System.Drawing.Size(240, 277);
this.lstGroups.TabIndex = 8; this.lstGroups.TabIndex = 0;
this.lstGroups.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstGroups_MouseUp); this.lstGroups.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstGroups_MouseUp);
// this.lstGroups.SelectedIndexChanged += new System.EventHandler(this.lstGroups_SelectedIndexChanged);
// lstUsers
//
this.lstUsers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lstUsers.FormattingEnabled = true;
this.lstUsers.Location = new System.Drawing.Point(8, 36);
this.lstUsers.Name = "lstUsers";
this.lstUsers.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstUsers.Size = new System.Drawing.Size(217, 498);
this.lstUsers.TabIndex = 7;
this.lstUsers.SelectedIndexChanged += new System.EventHandler(this.lstUsers_SelectedIndexChanged);
this.lstUsers.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstUsers_MouseUp);
//
// lblUsers
//
this.lblUsers.AutoSize = true;
this.lblUsers.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblUsers.Location = new System.Drawing.Point(8, 11);
this.lblUsers.Name = "lblUsers";
this.lblUsers.Size = new System.Drawing.Size(44, 15);
this.lblUsers.TabIndex = 6;
this.lblUsers.Text = "Users";
// //
// tpDefault // tpDefault
// //
@@ -374,8 +256,10 @@ namespace VEPROMS
// //
// cmMembers // cmMembers
// //
this.cmMembers.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.removeMemberToolStripMenuItem});
this.cmMembers.Name = "cmGroupMembers"; this.cmMembers.Name = "cmGroupMembers";
this.cmMembers.Size = new System.Drawing.Size(61, 4); this.cmMembers.Size = new System.Drawing.Size(166, 26);
// //
// removeMemberToolStripMenuItem // removeMemberToolStripMenuItem
// //
@@ -389,31 +273,61 @@ namespace VEPROMS
this.cmUsers.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmUsers.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addUserToolStripMenuItem, this.addUserToolStripMenuItem,
this.editUserToolStripMenuItem, this.editUserToolStripMenuItem,
this.deleteUserToolStripMenuItem}); this.deleteUserToolStripMenuItem,
this.addMemberToolStripMenuItemUser});
this.cmUsers.Name = "cmUsers"; this.cmUsers.Name = "cmUsers";
this.cmUsers.Size = new System.Drawing.Size(145, 92); this.cmUsers.Size = new System.Drawing.Size(153, 114);
// //
// addUserToolStripMenuItem // addUserToolStripMenuItem
// //
this.addUserToolStripMenuItem.Name = "addUserToolStripMenuItem"; this.addUserToolStripMenuItem.Name = "addUserToolStripMenuItem";
this.addUserToolStripMenuItem.Size = new System.Drawing.Size(144, 22); this.addUserToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.addUserToolStripMenuItem.Text = "Add User"; this.addUserToolStripMenuItem.Text = "Add User";
this.addUserToolStripMenuItem.Click += new System.EventHandler(this.addUserToolStripMenuItem_Click); this.addUserToolStripMenuItem.Click += new System.EventHandler(this.addUserToolStripMenuItem_Click);
// //
// editUserToolStripMenuItem // editUserToolStripMenuItem
// //
this.editUserToolStripMenuItem.Name = "editUserToolStripMenuItem"; this.editUserToolStripMenuItem.Name = "editUserToolStripMenuItem";
this.editUserToolStripMenuItem.Size = new System.Drawing.Size(144, 22); this.editUserToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.editUserToolStripMenuItem.Text = "Edit User"; this.editUserToolStripMenuItem.Text = "Edit User";
this.editUserToolStripMenuItem.Click += new System.EventHandler(this.editUserToolStripMenuItem_Click); this.editUserToolStripMenuItem.Click += new System.EventHandler(this.editUserToolStripMenuItem_Click);
// //
// deleteUserToolStripMenuItem // deleteUserToolStripMenuItem
// //
this.deleteUserToolStripMenuItem.Name = "deleteUserToolStripMenuItem"; this.deleteUserToolStripMenuItem.Name = "deleteUserToolStripMenuItem";
this.deleteUserToolStripMenuItem.Size = new System.Drawing.Size(144, 22); this.deleteUserToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.deleteUserToolStripMenuItem.Text = "Delete User"; this.deleteUserToolStripMenuItem.Text = "Delete User";
this.deleteUserToolStripMenuItem.Click += new System.EventHandler(this.deleteUserToolStripMenuItem_Click); this.deleteUserToolStripMenuItem.Click += new System.EventHandler(this.deleteUserToolStripMenuItem_Click);
// //
// addMemberToolStripMenuItemUser
//
this.addMemberToolStripMenuItemUser.Name = "addMemberToolStripMenuItemUser";
this.addMemberToolStripMenuItemUser.Size = new System.Drawing.Size(152, 22);
this.addMemberToolStripMenuItemUser.Text = "Add Member";
this.addMemberToolStripMenuItemUser.Click += new System.EventHandler(this.addMemberToolStripMenuItem_Click);
//
// cmGroups
//
this.cmGroups.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.deleteGroupToolStripMenuItem,
this.addMemberToolStripMenuItemGroup});
this.cmGroups.Name = "cmGroups";
this.cmGroups.Size = new System.Drawing.Size(145, 48);
//
// deleteGroupToolStripMenuItem
//
this.deleteGroupToolStripMenuItem.Name = "deleteGroupToolStripMenuItem";
this.deleteGroupToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.deleteGroupToolStripMenuItem.Text = "Delete Group";
this.deleteGroupToolStripMenuItem.Click += new System.EventHandler(this.deleteGroupToolStripMenuItem_Click);
//
// addMemberToolStripMenuItemGroup
//
this.addMemberToolStripMenuItemGroup.Name = "addMemberToolStripMenuItemGroup";
this.addMemberToolStripMenuItemGroup.Size = new System.Drawing.Size(144, 22);
this.addMemberToolStripMenuItemGroup.Text = "Add Member";
this.addMemberToolStripMenuItemGroup.Click += new System.EventHandler(this.addMemberToolStripMenuItem_Click);
//
// dlgManageSecurity // dlgManageSecurity
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -427,16 +341,14 @@ namespace VEPROMS
this.Text = "Manage Security"; this.Text = "Manage Security";
this.Load += new System.EventHandler(this.dlgManageSecurity_Load); this.Load += new System.EventHandler(this.dlgManageSecurity_Load);
this.tcSecurity.ResumeLayout(false); this.tcSecurity.ResumeLayout(false);
this.tpManageFolders.ResumeLayout(false); this.tpGroupUsers.ResumeLayout(false);
this.tpManageFolders.PerformLayout(); this.tpGroupUsers.PerformLayout();
this.cmFolders.ResumeLayout(false);
this.tpManageGroups.ResumeLayout(false);
this.tpManageGroups.PerformLayout();
this.pnlMembers.ResumeLayout(false); this.pnlMembers.ResumeLayout(false);
this.tpManageUsers.ResumeLayout(false); this.cmFolders.ResumeLayout(false);
this.tpManageUsers.PerformLayout();
this.tpDefault.ResumeLayout(false); this.tpDefault.ResumeLayout(false);
this.cmMembers.ResumeLayout(false);
this.cmUsers.ResumeLayout(false); this.cmUsers.ResumeLayout(false);
this.cmGroups.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@@ -445,7 +357,13 @@ namespace VEPROMS
private System.Windows.Forms.TabControl tcSecurity; private System.Windows.Forms.TabControl tcSecurity;
private System.Windows.Forms.TabPage tpDefault; private System.Windows.Forms.TabPage tpDefault;
private System.Windows.Forms.TabPage tpManageFolders; private System.Windows.Forms.TabPage tpGroupUsers;
private System.Windows.Forms.ListBox lstGroups;
private System.Windows.Forms.Label lblMembers;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ContextMenuStrip cmGroups;
private System.Windows.Forms.ListBox lstUsers;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ContextMenuStrip cmUsers; private System.Windows.Forms.ContextMenuStrip cmUsers;
private System.Windows.Forms.ToolStripMenuItem addUserToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem addUserToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem editUserToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem editUserToolStripMenuItem;
@@ -461,23 +379,10 @@ namespace VEPROMS
private System.Windows.Forms.ToolStripMenuItem createReviewerGroupToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem createReviewerGroupToolStripMenuItem;
private System.Windows.Forms.Panel pnlGroups; private System.Windows.Forms.Panel pnlGroups;
private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label8;
private System.Windows.Forms.TabPage tpManageGroups; private System.Windows.Forms.ToolStripMenuItem deleteGroupToolStripMenuItem;
private System.Windows.Forms.TabPage tpManageUsers;
private System.Windows.Forms.Panel pnlMembers; private System.Windows.Forms.Panel pnlMembers;
private System.Windows.Forms.ListBox lstMembers; private System.Windows.Forms.ListBox lstMembers;
private System.Windows.Forms.Label lblMembers; private System.Windows.Forms.ToolStripMenuItem addMemberToolStripMenuItemUser;
private System.Windows.Forms.ListBox lstUsers; private System.Windows.Forms.ToolStripMenuItem addMemberToolStripMenuItemGroup;
private System.Windows.Forms.Label lblUsers;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cbGroupSelection;
private System.Windows.Forms.ListBox lstNonMembers;
private System.Windows.Forms.Button btnDeleteGroup;
private System.Windows.Forms.Label lbNonMembers;
private System.Windows.Forms.ListBox lstGroups;
private System.Windows.Forms.Button btnAddMember;
private System.Windows.Forms.Button btnRemoveMember;
private System.Windows.Forms.ToolTip tt;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblUserGroups;
} }
} }

View File

@@ -7,85 +7,84 @@ using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using VEPROMS.CSLA.Library; using VEPROMS.CSLA.Library;
using Volian.Base.Library; using Volian.Base.Library;
using Volian.Controls.Library;
using System.Linq;
namespace VEPROMS namespace VEPROMS
{ {
//C2024-047 Redesign PROMS Security Dialog
public partial class dlgManageSecurity : Form public partial class dlgManageSecurity : Form
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Main Form / Shared Code
private GroupInfoList myGroupInfoList; private GroupInfoList myGroupInfoList;
private UserInfoList myUserInfoList; private UserInfoList myUserInfoList;
private List<MembershipInfo> myMembershipInfoList; private List<MembershipInfo> myMembershipInfoList;
private Folder myFolder; private Folder myFolder;
public dlgManageSecurity() public dlgManageSecurity()
{ {
InitializeComponent(); InitializeComponent();
} }
private void dlgManageSecurity_Load(object sender, EventArgs e) private void dlgManageSecurity_Load(object sender, EventArgs e)
{ {
//load all folders
myFolder = Folder.Get(1); myFolder = Folder.Get(1);
SetupSecurity();
//Default to Users Tab
tcSecurity.SelectedIndex = 2;
}
//This is called when the Index Changes for main tab Control
//it loads info for the current tab
private void changedTab(object sender, EventArgs e)
{
LoadRefreshGroupUsers();
switch (tcSecurity.SelectedIndex)
{
//Manage Folders
case 0:
SetupFolderOptions();
break;
//Manage Groups
case 1:
SetupGroups(); SetupGroups();
break;
//Manage Users (note that this is the default)
case 2:
SetupUserOptions();
break;
//Default Options tab
case 3:
SetupDefaultGroupOptions();
break;
} }
} private void SetupGroups()
//Loads a refreshed list of Groups and Users
private void LoadRefreshGroupUsers()
{ {
GroupInfoList.Reset(); pnlGroups.Controls.Clear();
myGroupInfoList = GroupInfoList.Get(); foreach (GroupInfo gi in myGroupInfoList)
UserInfoList.Reset(); {
myUserInfoList = UserInfoList.Get(); RadioButton rb = new RadioButton();
rb.Text = gi.GroupName;
rb.Parent = pnlGroups;
rb.Dock = DockStyle.Top;
rb.Tag = gi;
rb.CheckedChanged += new EventHandler(rb_CheckedChanged);
pnlGroups.Controls.Add(rb);
rb.BringToFront();
if (myFolder.FolderConfig.Security_Group == 0 && gi.GID == 1)
{
myFolder.FolderConfig.Security_Group = gi.GID;
rb.Checked = true;
myFolder.Save();
} }
#endregion else if (myFolder.FolderConfig.Security_Group == gi.GID)
{
#region Manage Folders rb.Checked = true;
//Sets up Folders }
private void SetupFolderOptions() }
}
private void rb_CheckedChanged(object sender, EventArgs e)
{
RadioButton rb = sender as RadioButton;
GroupInfo gi = rb.Tag as GroupInfo;
label8.Text = gi.GroupAssignments[0].MyRole.Title + " for " + gi.GroupAssignments[0].MyFolder.Name;
myFolder.FolderConfig.Security_Group = gi.GID;
myFolder.Save();
}
private void SetupSecurity()
{ {
if (tvFolders.Nodes.Count == 0) if (tvFolders.Nodes.Count == 0)
{ {
FolderInfo fi = FolderInfo.Get(1); FolderInfo fi = FolderInfo.Get(1);
LoadChildFolders(fi, null); LoadChildFolders(fi, null);
} }
lstMembers.Items.Clear();
lstUsers.Items.Clear();
lstGroups.Items.Clear();
GroupInfoList.Reset();
UserInfoList.Reset();
myGroupInfoList = GroupInfoList.Get();
myUserInfoList = UserInfoList.Get();
foreach (GroupInfo gi in myGroupInfoList)
lstGroups.Items.Add(gi.GroupName);
lstGroups.SelectedIndex = 0;
foreach (UserInfo ui in myUserInfoList)
lstUsers.Items.Add(ui.UserID);
lstGroups.SelectedIndex = -1;
lstUsers.SelectedIndex = -1;
} }
//loads child folders in tree view
private void LoadChildFolders(FolderInfo fi, TreeNode tn) private void LoadChildFolders(FolderInfo fi, TreeNode tn)
{ {
if (tn == null) if (tn == null)
@@ -106,7 +105,172 @@ namespace VEPROMS
} }
} }
} }
//Handles Creating a New Group private void lstGroups_SelectedIndexChanged(object sender, EventArgs e)
{
lblMembers.Text = "Selected Group Users";
myMembershipInfoList = new List<MembershipInfo>();
lstMembers.Items.Clear();
if (lstGroups.SelectedIndex > -1)
{
GroupInfo gi = myGroupInfoList[lstGroups.SelectedIndex];
if (gi.GroupMembershipCount > 0)
foreach (MembershipInfo mi in gi.GroupMemberships)
{
if (mi.EndDate == null || mi.EndDate == string.Empty)
{
myMembershipInfoList.Add(mi);
lstMembers.Items.Add(mi.MyUser.UserID);
}
}
}
}
private void addMemberToolStripMenuItem_Click(object sender, EventArgs e)
{
int groupIndex = lstGroups.SelectedIndex;
int userIndex = lstUsers.SelectedIndex;
GroupInfo gi = myGroupInfoList[groupIndex];
UserInfo ui = myUserInfoList[userIndex];
Membership.MakeMembership(User.Get(ui.UID), Group.Get(gi.GID), null, "");
SetupSecurity();
if ((sender as ToolStripMenuItem).Name.EndsWith("Group"))
{
lstUsers.SelectedIndex = userIndex;
lstGroups.SelectedIndex = groupIndex;
}
else
{
lstGroups.SelectedIndex = groupIndex;
lstUsers.SelectedIndex = userIndex;
}
}
private void removeMemberToolStripMenuItem_Click(object sender, EventArgs e)
{
MembershipInfo mi = myMembershipInfoList[lstMembers.SelectedIndex];
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)
{
int groupIndex = lstGroups.SelectedIndex;
int userIndex = lstUsers.SelectedIndex;
if (mi.MyGroup.GroupName == "Administrators")
{
int k = 0;
foreach(MembershipInfo mm in mi.MyGroup.GroupMemberships)
if(mm.EndDate == null || mm.EndDate == string.Empty)
k++;
if (k == 1)
{
MessageBox.Show("You must have at least 1 user assigned to the Adminstrators group", "One Administrator Required", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
Membership m = Membership.Get(mi.UGID);
m.EndDate = DateTime.Now.ToShortDateString();
m.Save();
SetupSecurity();
lstGroups.SelectedIndex = groupIndex;
lstUsers.SelectedIndex = userIndex;
}
// foreach (int gg in lstGroups.SelectedIndices)
// {
// GroupInfo gi = myGroupInfoList[gg];
// if (gi.GroupName == "Administrators" && gi.GroupMembershipCount == 1)
// {
// MessageBox.Show("You must have at least 1 user assigned to the Adminstrators group", "Can Not Delete User", MessageBoxButtons.OK, MessageBoxIcon.Warning);
// return;
// }
// foreach (MembershipInfo mi in gi.GroupMemberships)
// {
// foreach (int mm in lstGroupUsers.SelectedIndices)
// {
// MembershipInfo mig = myMembershipInfoList[mm];
// if (mi.MyUser.UID == mig.MyUser.UID)
// {
// Membership m = Membership.Get(mi.UGID);
// m.EndDate = DateTime.Now.ToShortDateString();
// m.Save();
// }
// }
// }
// }
// SetupSecurity();
//}
}
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;
if (frm.ShowDialog(this) == DialogResult.OK)
{
u = frm.MyUser;
u.Save();
Membership.MakeMembership(u, Group.Get(myFolder.FolderConfig.Security_Group), "", "");
SetupSecurity();
}
else
{
u.Delete();
}
}
private void editUserToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lstUsers.SelectedIndex == -1)
{
MessageBox.Show("You must select a user to edit", "No User Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
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)
{
frm.MyUser.Save();
SetupSecurity();
}
}
}
private void deleteUserToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lstUsers.SelectedIndex == -1)
{
MessageBox.Show("You must select a user to delete", "No User Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
SessionInfoList sil = SessionInfoList.Get();
foreach (SessionInfo si in sil)
{
if (si.UserID == ui.UserID && (si.DTSEnd == null))
{
MessageBox.Show("The user selected has an active session. You may not delete the user at this time.", "User Active Session", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
int k = 0;
if (ui.UserMembershipCount > 0)
{
foreach (MembershipInfo mi in ui.UserMemberships)
{
if (mi.EndDate == null || mi.EndDate == string.Empty)
k++;
}
}
if (k > 0)
{
MessageBox.Show("You must remove user from all groups that user is a member of in order to delete user", "User Has Memberships", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (MessageBox.Show("Are you sure you want to delete this user?", "Confirm Deleting User", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
User.Delete(ui.UID);
SetupSecurity();
}
//to do delete user
//end date user memberships
//delete user
}
private void createGroupMenuItem(object sender, EventArgs e) private void createGroupMenuItem(object sender, EventArgs e)
{ {
try try
@@ -115,6 +279,7 @@ namespace VEPROMS
TreeNode tn = tvFolders.SelectedNode; TreeNode tn = tvFolders.SelectedNode;
FolderInfo fi = tn.Tag as FolderInfo; FolderInfo fi = tn.Tag as FolderInfo;
AddNewGroup(tsddi.Text, fi); AddNewGroup(tsddi.Text, fi);
SetupSecurity();
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -133,123 +298,81 @@ namespace VEPROMS
MessageBox.Show("Roles table is missing entries.\r\nPlease contact Volian to create other groups.", "Cannot create groups", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("Roles table is missing entries.\r\nPlease contact Volian to create other groups.", "Cannot create groups", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
} }
foreach(RoleInfo ri in ril)
foreach (var ri in ril.Where(ri => ri.Name == txt)) {
if (ri.Name == txt)
{ {
string gin = string.Format("{0}s - {1}", ri.Name, fi.Name); string gin = string.Format("{0}s - {1}", ri.Name, fi.Name);
if (!myGroupInfoList.Any(gi => gi.GroupName == gin)) bool addOK = true;
foreach (GroupInfo gi in myGroupInfoList)
{
if (gin == gi.GroupName)
{
addOK = false;
break;
}
}
if (addOK)
{ {
Group group = Group.MakeGroup(gin, null, null); Group group = Group.MakeGroup(gin, null, null);
Assignment.MakeAssignment(group, Role.Get(ri.RID), Folder.Get(fi.FolderID), null); Assignment.MakeAssignment(group, Role.Get(ri.RID), Folder.Get(fi.FolderID), null);
} }
} }
}
LoadRefreshGroupUsers(); GroupInfoList.Reset();
myGroupInfoList = GroupInfoList.Get();
// C2026-004 - messagebox when create group SetupGroups();
MessageBox.Show($"{txt} group successfully created.", "Create group", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void lstUsers_SelectedIndexChanged(object sender, EventArgs e)
{
lblMembers.Text = "Selected User Groups";
myMembershipInfoList = new List<MembershipInfo>();
lstMembers.Items.Clear();
if (lstUsers.SelectedIndex > -1)
{
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
if (ui.UserMembershipCount > 0)
{
foreach (MembershipInfo mi in ui.UserMemberships)
{
if (mi.EndDate == null || mi.EndDate == string.Empty)
{
myMembershipInfoList.Add(mi);
lstMembers.Items.Add(mi.MyGroup.GroupName);
}
}
}
}
} }
private void tvFolders_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) private void tvFolders_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{ {
tvFolders.SelectedNode = e.Node; tvFolders.SelectedNode = e.Node;
} }
private void deleteGroupToolStripMenuItem_Click(object sender, EventArgs e)
#endregion
#region Manage Groups
//Sets up Group Options
private void SetupGroups()
{ {
cbGroupSelection.Items.Clear(); if (lstGroups.SelectedIndex < 0)
foreach (GroupInfo gi in myGroupInfoList)
cbGroupSelection.Items.Add(gi.GroupName);
cbGroupSelection.SelectedIndex = 0;
}
private void cbGroupSelection_SelectedIndexChanged(object sender, EventArgs e) => updateMembershipLists();
//Updates the lists of members / nonMembers
private void updateMembershipLists()
{
myMembershipInfoList = new List<MembershipInfo>();
if (cbGroupSelection.SelectedIndex > -1)
{
GroupInfo gi = myGroupInfoList[cbGroupSelection.SelectedIndex];
gi.RefreshGroupMemberships();
if (gi.GroupMembershipCount > 0)
myMembershipInfoList.AddRange(gi.GroupMemberships.Where(mi => mi.EndDate == null || mi.EndDate == string.Empty).OrderBy(x => x.MyUserUserID));
}
lstMembers.DataSource = myMembershipInfoList;
lstMembers.ValueMember = "UID";
lstMembers.DisplayMember = "MyUserUserID";
//set NonMembers to Users that are not in Members
lstNonMembers.DataSource = myUserInfoList.Select(x => x.UserID).Except(myMembershipInfoList.Select(x => x.MyUser.UserID)).ToList();
}
//Add a Member to a Group
private void addMember_Click(object sender, EventArgs e)
{
// B2026-007 PROMS Security - don't error when add a user to a group but no group selected
if (lstNonMembers.SelectedValue != null)
{
int groupIndex = cbGroupSelection.SelectedIndex;
string selectedUserID = lstNonMembers.SelectedValue.ToString();
int selectedUID = UserInfo.GetByUserID(selectedUserID).UID;
GroupInfo gi = myGroupInfoList[groupIndex];
User selectedUser = User.Get(selectedUID);
Membership.MakeMembership(selectedUser, Group.Get(gi.GID), null, "");
updateMembershipLists();
lstNonMembers.SelectedIndex = -1;
int index = lstMembers.FindString(selectedUserID);
lstMembers.SetSelected(index, true);
}
}
//Remove a Member From a Group
private void removeMember_Click(object sender, EventArgs e)
{
if (lstMembers.SelectedIndex > -1)
{
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 (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
{
MessageBox.Show("You must have at least 1 user assigned to the Administrators group", "One Administrator Required", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
Membership m = Membership.Get(mi.UGID);
m.EndDate = DateTime.Now.ToShortDateString();
m.Save();
updateMembershipLists();
lstMembers.SelectedIndex = -1;
lstNonMembers.SelectedItem = selectedUserID;
}
}
}
//Deletes the Currently Selected Group
private void deleteGroup_Click(object sender, EventArgs e)
{
if (cbGroupSelection.SelectedIndex < 0)
{ {
MessageBox.Show("You must select a group to delete", "No Group Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("You must select a group to delete", "No Group Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
} }
GroupInfo gi = myGroupInfoList[cbGroupSelection.SelectedIndex]; GroupInfo gi = myGroupInfoList[lstGroups.SelectedIndex];
if(myFolder.FolderConfig.Security_Group == gi.GID) if(myFolder.FolderConfig.Security_Group == gi.GID)
{ {
MessageBox.Show("Cannot Delete Default Group", "Attempt to Delete Default", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("Cannot Delete Default Group", "Attempt to Delete Default", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
} }
bool deleteOK = true; bool deleteOK = true;
if (gi.GroupMembershipCount > 0 && gi.GroupMemberships.Any(mi => mi.EndDate == null || mi.EndDate == string.Empty)) if(gi.GroupMembershipCount > 0)
{
foreach (MembershipInfo mi in gi.GroupMemberships)
{
if (mi.EndDate == null || mi.EndDate == string.Empty)
{
deleteOK = false; deleteOK = false;
break;
}
}
}
if (!deleteOK) if (!deleteOK)
{ {
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); 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);
@@ -258,65 +381,91 @@ namespace VEPROMS
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.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{ {
Group.Delete(gi.GID); Group.Delete(gi.GID);
LoadRefreshGroupUsers(); GroupInfoList.Reset();
myGroupInfoList = GroupInfoList.Get();
SetupGroups(); SetupGroups();
SetupSecurity();
} }
} }
private void lstGroups_MouseUp(object sender, MouseEventArgs e)
#endregion
#region Manage Users
//Sets up UserOptions
private void SetupUserOptions()
{ {
lstUsers.Items.Clear(); lstGroups.SelectedIndex = -1;
foreach (UserInfo ui in myUserInfoList) if (e.Button == MouseButtons.Right)
lstUsers.Items.Add(ui.UserID);
lstUsers.SelectedIndex = -1;
lstGroups.DataSource = null;
}
#region Manage Users - User Options
//Build Membership list based on selected user
private void lstUsers_SelectedIndexChanged(object sender, EventArgs e)
{ {
myMembershipInfoList = new List<MembershipInfo>(); int k = lstGroups.IndexFromPoint(e.Location);
if (lstUsers.SelectedIndex > -1) if (k >= 0)
{ {
lstGroups.SelectedIndex = k;
if (lstUsers.SelectedIndex >= 0)
{
GroupInfo gi = myGroupInfoList[k];
if (gi.GroupMembershipCount > 0)
{
addMemberToolStripMenuItemGroup.Visible = true;
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex]; UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
if (ui.UserMembershipCount > 0) foreach (MembershipInfo mi in gi.GroupMemberships)
{ {
myMembershipInfoList.AddRange(ui.UserMemberships.Where(mi => mi.EndDate == null || mi.EndDate == string.Empty)); if (mi.MyUser.UserID == ui.UserID && (mi.EndDate == null || mi.EndDate == string.Empty))
{
addMemberToolStripMenuItemGroup.Visible = false;
break;
}
}
}
}
else
addMemberToolStripMenuItemGroup.Visible = false;
cmGroups.Show(lstGroups, e.Location);
}
}
else if (e.Button == MouseButtons.Left)
{
int k = lstGroups.IndexFromPoint(e.Location);
if (k >= 0)
{
lstGroups.SelectedIndex = k;
} }
} }
lstGroups.DataSource = myMembershipInfoList;
lstGroups.ValueMember = "UGID";
lstGroups.DisplayMember = "MyGroupName";
} }
//Select User and set up Mouse Click Menus based on
//where click in User Box
private void lstUsers_MouseUp(object sender, MouseEventArgs e) private void lstUsers_MouseUp(object sender, MouseEventArgs e)
{ {
lstUsers.SelectedIndex = -1;
if (e.Button == MouseButtons.Right) if (e.Button == MouseButtons.Right)
{ {
int k = lstUsers.IndexFromPoint(e.Location); int k = lstUsers.IndexFromPoint(e.Location);
if (k >= 0) if (k >= 0)
{ {
lstUsers.SelectedIndex = k; lstUsers.SelectedIndex = k;
//addUserToolStripMenuItem.Visible = false;
editUserToolStripMenuItem.Visible = deleteUserToolStripMenuItem.Visible = true; editUserToolStripMenuItem.Visible = deleteUserToolStripMenuItem.Visible = true;
if (lstGroups.SelectedIndex >= 0)
{
UserInfo ui = myUserInfoList[k];
if(ui.UserMembershipCount > 0)
{
addMemberToolStripMenuItemUser.Visible = true;
GroupInfo gi = myGroupInfoList[lstGroups.SelectedIndex];
foreach(MembershipInfo mi in ui.UserMemberships)
{
if (mi.MyGroup.GroupName == gi.GroupName && (mi.EndDate == null || mi.EndDate == string.Empty))
{
addMemberToolStripMenuItemUser.Visible = false;
break;
}
}
}
}
else
addMemberToolStripMenuItemUser.Visible = false;
cmUsers.Show(lstUsers, e.Location);
} }
else else
{ {
addUserToolStripMenuItem.Visible = true; addUserToolStripMenuItem.Visible = true;
editUserToolStripMenuItem.Visible = deleteUserToolStripMenuItem.Visible = false; editUserToolStripMenuItem.Visible = deleteUserToolStripMenuItem.Visible = addMemberToolStripMenuItemUser.Visible = false;
}
cmUsers.Show(lstUsers, e.Location); cmUsers.Show(lstUsers, e.Location);
} }
}
else if (e.Button == MouseButtons.Left) else if (e.Button == MouseButtons.Left)
{ {
int k = lstUsers.IndexFromPoint(e.Location); int k = lstUsers.IndexFromPoint(e.Location);
@@ -326,216 +475,34 @@ namespace VEPROMS
} }
} }
} }
private void lstMembers_MouseUp(object sender, MouseEventArgs e)
//Adds a new User
private void addUserToolStripMenuItem_Click(object sender, EventArgs e)
{ {
User u = User.MakeUser("[Enter New UserID]", "", "", "", "", "", "", "", "", "", "", DateTime.Now, ""); lstMembers.SelectedIndex = -1;
frmManageUser frm = new frmManageUser("add"); if (e.Button == MouseButtons.Right)
frm.MyUser = u;
frm.Text = "Enter New UserID"; //C2026-002 Change Title bar on Add/Edit User
if (frm.ShowDialog(this) == DialogResult.OK)
{ {
u = frm.MyUser; int k = lstMembers.IndexFromPoint(e.Location);
u.Save(); if (k >= 0)
Membership.MakeMembership(u, Group.Get(myFolder.FolderConfig.Security_Group), "", ""); {
lstMembers.SelectedIndex = k;
//Update the User list to reflect the added user addMemberToolStripMenuItemUser.Visible = false;
LoadRefreshGroupUsers(); removeMemberToolStripMenuItem.Visible = true;
SetupUserOptions(); cmMembers.Show(lstMembers, e.Location);
lstUsers.SelectedItem = u.UserID;
} }
else else
{ {
u.Delete(); addMemberToolStripMenuItemUser.Visible = true;
removeMemberToolStripMenuItem.Visible = false;
cmMembers.Show(lstMembers, e.Location);
} }
} }
//Edit a User's details
private void editUserToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lstUsers.SelectedIndex == -1)
{
MessageBox.Show("You must select a user to edit", "No User Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
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)
{
frm.MyUser.Save();
//Update the User list to reflect the edited user
//this is done in case the UserID is updated so the list updates to reflect that
LoadRefreshGroupUsers();
SetupUserOptions();
lstUsers.SelectedItem = u.UserID;
}
}
}
//Delete a User
private void deleteUserToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lstUsers.SelectedIndex == -1)
{
MessageBox.Show("You must select a user to delete", "No User Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
SessionInfoList sil = SessionInfoList.Get();
foreach (SessionInfo si in sil)
{
if (si.UserID == ui.UserID && (si.DTSEnd == null))
{
MessageBox.Show("The user selected has an active session. You may not delete the user at this time.", "User Active Session", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
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)
{
foreach (MembershipInfo minfo in ui.UserMemberships.Where(mi => mi.EndDate == null || mi.EndDate == string.Empty))
{
Membership m = Membership.Get(minfo.UGID);
m.EndDate = DateTime.Now.ToShortDateString();
m.Save();
}
User.Delete(ui.UID);
//Update the User list to reflect the deleted user
LoadRefreshGroupUsers();
SetupUserOptions();
lstUsers.SelectedIndex = -1;
lstGroups.DataSource = null;
}
}
#endregion
#region Manage Users - Member Options
//Adds Context Menu for when a Group is selected
private void lstGroups_MouseUp(object sender, MouseEventArgs e)
{
cmMembers.Items.Clear();
lstGroups.SelectedIndex = -1;
//shouldnt be bringing up a menu in the Group box unless a user is 1st selected in the Users box.
if (e.Button == MouseButtons.Right && lstUsers.SelectedIndex > -1)
{
int k = lstGroups.IndexFromPoint(e.Location);
if (k >= 0)
{
lstGroups.SelectedIndex = k;
cmMembers.Items.Add(this.removeMemberToolStripMenuItem);
}
var groupsCanAddTo = myGroupInfoList.Select(x => new { x.GroupName, x.GID }).Except(myMembershipInfoList.Select(x => new { x.MyGroup.GroupName, x.GID }));
foreach (var possiblegroup in groupsCanAddTo)
{
ToolStripMenuItemwithValue AddToMenuItem = new ToolStripMenuItemwithValue($"Add as Member to Group: {possiblegroup.GroupName}", possiblegroup.GID);
AddToMenuItem.Click += addMemberToolStripMenuItem_Click;
cmMembers.Items.Add(AddToMenuItem);
}
cmMembers.Show(lstGroups, e.Location);
}
else if (e.Button == MouseButtons.Left) else if (e.Button == MouseButtons.Left)
{ {
int k = lstGroups.IndexFromPoint(e.Location); int k = lstMembers.IndexFromPoint(e.Location);
if (k >= 0) if (k >= 0)
{ {
lstGroups.SelectedIndex = k; lstMembers.SelectedIndex = k;
} }
} }
} }
//Adds a User to a Group
private void addMemberToolStripMenuItem_Click(object sender, EventArgs e)
{
ToolStripMenuItemwithValue item = (ToolStripMenuItemwithValue)sender;
int userIndex = lstUsers.SelectedIndex;
UserInfo ui = myUserInfoList[userIndex];
Membership.MakeMembership(User.Get(ui.UID), Group.Get((int) item.Value), null, "");
//Update the Group list to reflect the added group
LoadRefreshGroupUsers();
lstUsers_SelectedIndexChanged(sender, e);
}
//Removes a User from a Group
private void removeMemberToolStripMenuItem_Click(object sender, EventArgs e)
{
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 (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
{
MessageBox.Show("You must have at least 1 user assigned to the Administrators group", "One Administrator Required", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
Membership m = Membership.Get(mi.UGID);
m.EndDate = DateTime.Now.ToShortDateString();
m.Save();
//Update the Group list to reflect the removed group
LoadRefreshGroupUsers();
lstUsers_SelectedIndexChanged(sender, e);
}
}
#endregion
#endregion
#region Default Options
//Sets up Default Group options for Default Tab
private void SetupDefaultGroupOptions()
{
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);
rb.CheckedChanged += new EventHandler(rb_CheckedChanged);
pnlGroups.Controls.Add(rb);
rb.BringToFront();
if (myFolder.FolderConfig.Security_Group == 0 && gi.GID == 1)
{
myFolder.FolderConfig.Security_Group = gi.GID;
rb.Checked = true;
myFolder.Save();
}
else if (myFolder.FolderConfig.Security_Group == gi.GID)
{
rb.Checked = true;
}
}
}
//Handles changing the default group
private void rb_CheckedChanged(object sender, EventArgs e)
{
RadioButton rb = sender as RadioButton;
GroupInfo gi = rb.Tag as GroupInfo;
label8.Text = gi.GroupAssignments[0].MyRole.Title + " for " + gi.GroupAssignments[0].MyFolder.Name;
myFolder.FolderConfig.Security_Group = gi.GID;
myFolder.Save();
}
#endregion
} }
} }

View File

@@ -112,27 +112,21 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="cmFolders.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmFolders.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>234, 17</value>
</metadata>
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>341, 17</value> <value>341, 17</value>
</metadata> </metadata>
<metadata name="cmMembers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmMembers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="cmUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>243, 17</value>
</metadata>
<metadata name="cmGroups.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>136, 17</value> <value>136, 17</value>
</metadata> </metadata>
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>341, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>58</value>
</metadata>
</root> </root>

View File

@@ -1,136 +0,0 @@
namespace VEPROMS
{
partial class dlgPrintAllApprovedProcedures
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(dlgPrintAllApprovedProcedures));
this.txbApprovedPDFsPath = new DevComponents.DotNetBar.Controls.TextBoxX();
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.ppBtnPDFLoc = new DevComponents.DotNetBar.ButtonX();
this.ApprovedPDFsFolderDlg = new System.Windows.Forms.FolderBrowserDialog();
this.btnPrntAllAprv = new DevComponents.DotNetBar.ButtonX();
this.btnCancel = new DevComponents.DotNetBar.ButtonX();
this.SuspendLayout();
//
// txbApprovedPDFsPath
//
//
//
//
this.txbApprovedPDFsPath.Border.Class = "TextBoxBorder";
this.txbApprovedPDFsPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txbApprovedPDFsPath.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txbApprovedPDFsPath.Location = new System.Drawing.Point(11, 45);
this.txbApprovedPDFsPath.Name = "txbApprovedPDFsPath";
this.txbApprovedPDFsPath.PreventEnterBeep = true;
this.txbApprovedPDFsPath.Size = new System.Drawing.Size(611, 22);
this.txbApprovedPDFsPath.TabIndex = 0;
this.txbApprovedPDFsPath.WatermarkText = "Enter to Path of where to Place All Approved PDFs";
this.txbApprovedPDFsPath.TextChanged += new System.EventHandler(this.txbApprovedPDFsPath_TextChanged);
//
// labelX1
//
//
//
//
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX1.Location = new System.Drawing.Point(12, 22);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(360, 23);
this.labelX1.TabIndex = 1;
this.labelX1.Text = "Approved PDFs Location:";
//
// ppBtnPDFLoc
//
this.ppBtnPDFLoc.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.ppBtnPDFLoc.Image = ((System.Drawing.Image)(resources.GetObject("ppBtnPDFLoc.Image")));
this.ppBtnPDFLoc.Location = new System.Drawing.Point(627, 45);
this.ppBtnPDFLoc.Margin = new System.Windows.Forms.Padding(2);
this.ppBtnPDFLoc.Name = "ppBtnPDFLoc";
this.ppBtnPDFLoc.Size = new System.Drawing.Size(37, 22);
this.ppBtnPDFLoc.TabIndex = 32;
this.ppBtnPDFLoc.Click += new System.EventHandler(this.ppBtnPDFLoc_Click);
//
// btnPrntAllAprv
//
this.btnPrntAllAprv.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnPrntAllAprv.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnPrntAllAprv.Enabled = false;
this.btnPrntAllAprv.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnPrntAllAprv.Location = new System.Drawing.Point(397, 120);
this.btnPrntAllAprv.Name = "btnPrntAllAprv";
this.btnPrntAllAprv.Size = new System.Drawing.Size(132, 26);
this.btnPrntAllAprv.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnPrntAllAprv.TabIndex = 33;
this.btnPrntAllAprv.Text = "Print All Approved";
this.btnPrntAllAprv.Click += new System.EventHandler(this.btnPrntAllAprv_Click);
//
// btnCancel
//
this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnCancel.Location = new System.Drawing.Point(564, 120);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(99, 26);
this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCancel.TabIndex = 34;
this.btnCancel.Text = "Close";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// dlgPrintAllApprovedProcedures
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(675, 161);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnPrntAllAprv);
this.Controls.Add(this.ppBtnPDFLoc);
this.Controls.Add(this.labelX1);
this.Controls.Add(this.txbApprovedPDFsPath);
this.Cursor = System.Windows.Forms.Cursors.Default;
this.DoubleBuffered = true;
this.Name = "dlgPrintAllApprovedProcedures";
this.ShowIcon = false;
this.Text = "Print All Approved Procedures";
this.ResumeLayout(false);
}
#endregion
private DevComponents.DotNetBar.Controls.TextBoxX txbApprovedPDFsPath;
private DevComponents.DotNetBar.LabelX labelX1;
private DevComponents.DotNetBar.ButtonX ppBtnPDFLoc;
private System.Windows.Forms.FolderBrowserDialog ApprovedPDFsFolderDlg;
private DevComponents.DotNetBar.ButtonX btnPrntAllAprv;
private DevComponents.DotNetBar.ButtonX btnCancel;
}
}

View File

@@ -1,202 +0,0 @@
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;
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;
public dlgPrintAllApprovedProcedures(DocVersionInfo dvi)
{
InitializeComponent();
_DocVersionInfo = dvi;
unitId = (_DocVersionInfo.DocVersionConfig.SelectedSlave < 0) ? 0 : _DocVersionInfo.DocVersionConfig.SelectedSlave; // set unitId to zero if not Parent/Child
NotApproved = new StringBuilder();
txbApprovedPDFsPath.Text = BuildInitialPDFPath(); // set to default approved PDF path
}
// create an approved PDFs path based on the user's Documents folder and the tree path to the working draft
private string BuildInitialPDFPath()
{
// start with the SearchDVPath which is the node path staring with the top of the PROMS Procedure tree (VEPROMS)
string rtnstr = _DocVersionInfo.ActiveParent.SearchDVPath;
// remove top tree node (VEPROMS) and put a " - " between each tree node name
rtnstr = rtnstr.Substring(rtnstr.IndexOf("\a") + 1).Replace("\a", " - ");
// add the user's path to the My Documments folder to the start of the path
rtnstr = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\" + rtnstr;
// check if we are printing Approved Child Procedures
// 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
return rtnstr;
}
private void ppBtnPDFLoc_Click(object sender, EventArgs e)
{
if (txbApprovedPDFsPath.Text.Length > 0)
ApprovedPDFsFolderDlg.SelectedPath = txbApprovedPDFsPath.Text;
DialogResult dr = ApprovedPDFsFolderDlg.ShowDialog();
if (dr == DialogResult.OK)
{
txbApprovedPDFsPath.Text = ApprovedPDFsFolderDlg.SelectedPath;
}
}
private bool FolderIsWritable(string dirPath)
{
try
{
using (FileStream fs = File.Create(Path.Combine(dirPath, Path.GetRandomFileName()), 1, FileOptions.DeleteOnClose))
{ }
return true;
}
catch
{
return false;
}
}
private void btnPrntAllAprv_Click(object sender, EventArgs e)
{
try
{
// Create folder if needed, clear the folder
if (!Directory.Exists(txbApprovedPDFsPath.Text))
Directory.CreateDirectory(txbApprovedPDFsPath.Text);
// check if the folder location is writable
if (!FolderIsWritable(txbApprovedPDFsPath.Text))
{
MessageBox.Show("Cannot Write to this folder.\n\nSelect a different location.", "Invalid Folder Access", MessageBoxButtons.OK, MessageBoxIcon.Error);
btnPrntAllAprv.Enabled = false;
}
else
{
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)
{
RevisionInfoList ril = RevisionInfoList.GetByItemID(myProc.ItemID);
if (ril.Count == 0)
{
NotApproved.AppendLine(string.Format("No approved Version for {0}", (myProc.PDFNumber.Length > 0) ? myProc.PDFNumber : myProc.DisplayText));
}
else
{
bool foundApproved = false;
foreach (RevisionInfo revinfo in ril)
{
// if not Parent/Child, "unitId" and "Applicability_index" will be zero
if (unitId == revinfo.MyConfig.Applicability_Index)
{
if (revinfo.LatestVersion.MyStage.IsApproved > 0)
{
foundApproved = true;
ItemInfo ii = ItemInfo.Get(revinfo.ItemID);
ii.MyDocVersion.DocVersionConfig.SelectedSlave = unitId;
ProcedureInfo prcInfo = ProcedureInfo.Get(ii.ItemID);
SaveApprovedPDFToFolder(revinfo, prcInfo.PDFNumber);// save PDF to folder
pdfCount++;
break; // got the latest Approved - jump out of foreach revision info loop
}
}
}
if (!foundApproved) NotApproved.AppendLine(string.Format("No approved Version for {0}", myProc.PDFNumber));
}
}
// if no Approved PDFs were save, display general message and exit
if (pdfCount == 0)
{
string msg = "There are no Approved Procedure PDFs in this procedure set.\n\n Approved Procedures PDFs are created when a procedure is approved using the PROMS Approval function.";
FlexibleMessageBox.Show(msg, "Print PDFs Completed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else // we saved some approved PDFs tell user how many were saved and list procedures that were not approved
{
string msg = string.Format("{0} PDFs were saved at\n\n{1}", pdfCount, txbApprovedPDFsPath.Text);
if (NotApproved.Length > 0)
{
msg += string.Format("\n\n--------------------------------------------\n\nPDFs for the Following were not Generated:\n\n{0}", NotApproved.ToString());
}
FlexibleMessageBox.Show(msg, "Print PDFs Completed", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
catch (Exception ex)
{
_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
}
private void SaveApprovedPDFToFolder(RevisionInfo revInfo,string PDFName)
{
byte[] buffer = revInfo.LatestVersion.PDF;
string PDFFilePath = string.Format("{0}\\{1}.PDF", txbApprovedPDFsPath.Text, PDFName);
try
{
FileStream fs = new FileStream(PDFFilePath, FileMode.Create);
fs.Write(buffer, 0, buffer.Length);
fs.Close();
}
catch (Exception ex)
{
string str = string.Format("Could not create {0}", PDFFilePath);
NotApproved.AppendLine(str); // save to list of procedure that were not approved
_MyLog.Info(str, ex);// save error in PROMS error log
}
}
private void DeleteExistingPDFs()
{
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");
foreach (FileInfo fi in fis)
{
if (fi.IsReadOnly) fi.IsReadOnly = false;
fi.Delete();
}
}
catch (Exception ex)
{
string str = string.Format("Cannot delete files in {0}", txbApprovedPDFsPath.Text);
MessageBox.Show(str, "Error deleting files", MessageBoxButtons.OK, MessageBoxIcon.Error);
_MyLog.Info(str, ex); // save error in PROMS error log
}
}
private void txbApprovedPDFsPath_TextChanged(object sender, EventArgs e)
{
btnPrntAllAprv.Enabled = txbApprovedPDFsPath.Text.Length > 0;
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

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