Compare commits
507
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c3e4bb3e9 | ||
|
|
23a296df86 | ||
|
|
dbea4abafb | ||
|
|
57622931a5 | ||
|
|
75368c2fe0 | ||
|
|
5e071bd35a | ||
|
|
77639318c6 | ||
|
|
1a890b11cb | ||
|
|
f2e01803bc | ||
|
|
752d30ba8f | ||
|
|
795f21f04b | ||
|
|
b1427f4997 | ||
|
|
c95e86c2a6 | ||
|
|
18d2aa3b51 | ||
|
|
7ba3ea8b13 | ||
|
|
30b34c3a50 | ||
|
|
6a42800d2c | ||
|
|
70f132540f | ||
|
|
cd9eaaaba1 | ||
|
|
70aa1f4024 | ||
|
|
1d634d96fe | ||
|
|
6d7d127b63 | ||
|
|
6f0fcdded2 | ||
|
|
4eb5254d96 | ||
|
|
6c2eee0cbc | ||
|
|
3c5265cecf | ||
|
|
9c97394f5e | ||
|
|
478d35890d | ||
|
|
1b9b63412c | ||
|
|
3bb8fff3a1 | ||
|
|
694bc0ead4 | ||
|
|
cfc324d31e | ||
|
|
43b63e2843 | ||
|
|
f2ec510a70 | ||
|
|
453edbb28e | ||
|
|
e492f12602 | ||
|
|
bc9407f52f | ||
|
|
954cc5918f | ||
|
|
4ef16e7856 | ||
|
|
1eb3c3e725 | ||
|
|
a89c2d3d22 | ||
|
|
914837a5a2 | ||
|
|
9643a71ba5 | ||
|
|
aa7e0528f8 | ||
|
|
57bd8d569e | ||
|
|
b49d8871a2 | ||
|
|
b90d419bc5 | ||
|
|
1f48d498e1 | ||
|
|
da6139c932 | ||
|
|
be744b40a3 | ||
|
|
780ce657ca | ||
|
|
464be0f803 | ||
|
|
58a6cb9a24 | ||
|
|
9bf7b2ffde | ||
|
|
cde1f28215 | ||
|
|
db198cb7d0 | ||
|
|
99fe567e78 | ||
|
|
f67d37801a | ||
|
|
2261c8f0f5 | ||
|
|
f93b16fc52 | ||
|
|
7c3a43749c | ||
|
|
ecec7b9f1a | ||
|
|
1aca7335f7 | ||
|
|
ba5aee6640 | ||
|
|
06c3136566 | ||
|
|
abaf55e9b1 | ||
|
|
3a2dd0b0aa | ||
|
|
9486b37300 | ||
|
|
0fed1acfd8 | ||
|
|
d7c2300021 | ||
|
|
fca333299d | ||
|
|
a13b03a136 | ||
|
|
48054f5bf1 | ||
|
|
51f2897a33 | ||
|
|
7a3a07b0da | ||
|
|
7c3cfca86c | ||
|
|
352af15984 | ||
|
|
2c42933d58 | ||
|
|
2e68362836 | ||
|
|
c6736db7ea | ||
|
|
c005f03af8 | ||
|
|
459aabcc86 | ||
|
|
ad33097d5e | ||
|
|
8d7735735e | ||
|
|
25bbc46925 | ||
|
|
5a26b0ee35 | ||
|
|
09a397bed2 | ||
|
|
a33039bcae | ||
|
|
0ebd125266 | ||
|
|
fd16a6b6c3 | ||
|
|
cf19f764c7 | ||
|
|
88850d6c25 | ||
|
|
b173c61575 | ||
|
|
3b866f0952 | ||
|
|
94db524a11 | ||
|
|
f27616ce1f | ||
|
|
7f75af7119 | ||
|
|
05ab48cdc5 | ||
|
|
38e42723af | ||
|
|
f4ec60c9e0 | ||
|
|
fd51c209a3 | ||
|
|
01394b1978 | ||
|
|
9b7db08fcf | ||
|
|
6d7cdef223 | ||
|
|
d9c35fe02a | ||
|
|
250b3fa406 | ||
|
|
a5a3f16177 | ||
|
|
ffa7e21c18 | ||
|
|
4608c05df0 | ||
|
|
56ff5a0213 | ||
|
|
014fde301c | ||
|
|
0080a42423 | ||
|
|
2035a4c855 | ||
|
|
4dc6a190fa | ||
|
|
e0db322262 | ||
|
|
8f1bb45e42 | ||
|
|
f39aefd28f | ||
|
|
2cfc43dbfd | ||
|
|
f4168b5202 | ||
|
|
2d93b652e8 | ||
|
|
70782cd655 | ||
|
|
768fcc4f05 | ||
|
|
727491f99b | ||
|
|
c5f1c3a340 | ||
|
|
a78311104a | ||
|
|
4b5b06210c | ||
|
|
333645b044 | ||
|
|
23173074aa | ||
|
|
be8bb9c4e1 | ||
|
|
d07e132216 | ||
|
|
401fa12851 | ||
|
|
194ca84d38 | ||
|
|
7bbf62d735 | ||
|
|
3924e2fca5 | ||
|
|
2e39102e7c | ||
|
|
2a0849fae5 | ||
|
|
9f4e8f6eef | ||
|
|
d0fe36f86e | ||
|
|
10da22cd77 | ||
|
|
6dacc2d515 | ||
|
|
7baa9628d6 | ||
|
|
ec5229101f | ||
|
|
a0e0b1e788 | ||
|
|
f1e04396de | ||
|
|
d0cae8c2fc | ||
|
|
90c215d4c1 | ||
|
|
1b1dc78548 | ||
|
|
a112163f85 | ||
|
|
2a9f2e188d | ||
|
|
652e0cb06f | ||
|
|
123b1b08c2 | ||
|
|
b321bc354b | ||
|
|
03d7397242 | ||
|
|
45e78ef184 | ||
|
|
fe7c5893bb | ||
|
|
2b57c552d1 | ||
|
|
7f0d39b684 | ||
|
|
7273a8b13b | ||
|
|
a544a5cd4f | ||
|
|
ff9ade75d4 | ||
|
|
cfd5498521 | ||
|
|
9b7c30e1cd | ||
|
|
670e5d7fa9 | ||
|
|
8258235611 | ||
|
|
4d97f29943 | ||
|
|
ab8d59eb2d | ||
|
|
c324fa69b2 | ||
|
|
1cdb9b4cc2 | ||
|
|
f47fa49b80 | ||
|
|
6ade96c7ef | ||
|
|
61d31a3c67 | ||
|
|
014509ea30 | ||
|
|
1ce1a45ca6 | ||
|
|
b6da13a653 | ||
|
|
604b4d1751 | ||
|
|
874aaf2857 | ||
|
|
17a28def4e | ||
|
|
e72a1aa9e7 | ||
|
|
7b96ef1b4c | ||
|
|
ea048e6d82 | ||
|
|
109abfb4ad | ||
|
|
3f662ab19d | ||
|
|
b0de38909a | ||
|
|
267de44103 | ||
|
|
b7b0e55d94 | ||
|
|
c0d12f5721 | ||
|
|
27a945485f | ||
|
|
d76c81a9d8 | ||
|
|
143a3622dd | ||
|
|
75992293c6 | ||
|
|
0e004828b3 | ||
|
|
714751f404 | ||
|
|
27576e946e | ||
|
|
e548dddcbd | ||
|
|
8cbc8c497e | ||
|
|
c328140441 | ||
|
|
a10798c983 | ||
|
|
06909e260f | ||
|
|
5eca8a5150 | ||
|
|
88a13f9864 | ||
|
|
e03ae6195a | ||
|
|
c3cacaf407 | ||
|
|
4b479b3ceb | ||
|
|
c78cb805fb | ||
|
|
d17688fc9d | ||
|
|
fd59b9d5f0 | ||
|
|
0e71c9f5f5 | ||
|
|
bc3c14589e | ||
|
|
4331f49f6f | ||
|
|
294d19e9d1 | ||
|
|
ed615dbb31 | ||
|
|
e9ad57f588 | ||
|
|
7fee639b53 | ||
|
|
c2a5a8ec7d | ||
|
|
ec823cab97 | ||
|
|
83f88b6df3 | ||
|
|
7636fe7686 | ||
|
|
1e12c82be4 | ||
|
|
9879a80569 | ||
|
|
13b03f4f89 | ||
|
|
331de6ecfe | ||
|
|
7b649c4a62 | ||
|
|
9ccdaef354 | ||
|
|
fa114f4467 | ||
|
|
33cc650871 | ||
|
|
95737d05e1 | ||
|
|
955ffc48d3 | ||
|
|
d79dd908f6 | ||
|
|
4656ec30af | ||
|
|
a0be60a1b9 | ||
|
|
d296d6f000 | ||
|
|
8df4bd2537 | ||
|
|
cc5cdb88ff | ||
|
|
f66c6a93c5 | ||
|
|
a7b5ee33e2 | ||
|
|
fe90af5aa4 | ||
|
|
7e672d91e9 | ||
|
|
09f472bee2 | ||
|
|
30da0c5105 | ||
|
|
d2082cdbea | ||
|
|
c42596811e | ||
|
|
d095a19187 | ||
|
|
8089e2c898 | ||
|
|
a657d03fb0 | ||
|
|
4e829200f5 | ||
|
|
bef9be5cbe | ||
|
|
56f14323d1 | ||
|
|
4fcd22ca68 | ||
|
|
21890e74fe | ||
|
|
ef32564fba | ||
|
|
d95505726f | ||
|
|
bb7b892f7c | ||
|
|
836cdaf087 | ||
|
|
6f5c41abb8 | ||
|
|
6379321785 | ||
|
|
e4c6e4393e | ||
|
|
3e6bb81e39 | ||
|
|
ded6f18dd5 | ||
|
|
81643e2aef | ||
|
|
8a186f9f0c | ||
|
|
14aa39976a | ||
|
|
c077e0ddc2 | ||
|
|
d198a7b63a | ||
|
|
7f36a33dea | ||
|
|
db3d9fc65f | ||
|
|
f9738451db | ||
|
|
ec73b5cbea | ||
|
|
f3bd6b6469 | ||
|
|
fd50993fb9 | ||
|
|
079381dbb0 | ||
|
|
85bdc35342 | ||
|
|
2aaaa55e42 | ||
|
|
e999bea228 | ||
|
|
287c06383b | ||
|
|
202409c140 | ||
|
|
34886beccb | ||
|
|
3d200cc34e | ||
|
|
b13883530a | ||
|
|
032e04bc50 | ||
|
|
625b715832 | ||
|
|
e1ac360271 | ||
|
|
7eda88bdbe | ||
|
|
90fdb94e95 | ||
|
|
15979203ce | ||
|
|
53360a03af | ||
|
|
9f6f7c23f6 | ||
|
|
7419f4e886 | ||
|
|
f90a80c366 | ||
|
|
d9ec756e22 | ||
|
|
9f7c24c540 | ||
|
|
fe2833395d | ||
|
|
a181cf3815 | ||
|
|
dfce44a47a | ||
|
|
22280bf1e3 | ||
|
|
30aedb6eec | ||
|
|
12f175740f | ||
|
|
5c0f11aea1 | ||
|
|
879518c4a9 | ||
|
|
7afca6a254 | ||
|
|
1c56aa2eb1 | ||
|
|
ecaf00c5b3 | ||
|
|
bfdc77da97 | ||
|
|
f38aa4595f | ||
|
|
aa0b906a9f | ||
|
|
9e64e5a60e | ||
|
|
35eb05432b | ||
|
|
77c6298067 | ||
|
|
f43d1e5f47 | ||
|
|
63a74e1aef | ||
|
|
69e45e9ae8 | ||
|
|
53cf35014c | ||
|
|
d6e4239573 | ||
|
|
c76808e11e | ||
|
|
b2428a4211 | ||
|
|
aa0e919713 | ||
|
|
7e2a41b6cb | ||
|
|
258b1d2d1f | ||
|
|
a4ea200e38 | ||
|
|
43a27c16a6 | ||
|
|
3c693baab0 | ||
|
|
d186e2702c | ||
|
|
aee478114b | ||
|
|
6220530855 | ||
|
|
69ae37021c | ||
|
|
e2382a403b | ||
|
|
0ae45eb918 | ||
|
|
d8882f8d0c | ||
|
|
00c64411c5 | ||
|
|
c0f35a7d84 | ||
|
|
12cf05bb87 | ||
|
|
325c17647e | ||
|
|
c6eeb2107a | ||
|
|
70fd037161 | ||
|
|
ed4469bd5f | ||
|
|
5ce168071c | ||
|
|
4273d72b9d | ||
|
|
30f56d1f9b | ||
|
|
d560468f3c | ||
|
|
ac5e49d0fc | ||
|
|
447d1f510c | ||
|
|
c0651e4e2c | ||
|
|
f8865206e9 | ||
|
|
5e7d2431b3 | ||
|
|
9bb13f6d88 | ||
|
|
52dbd8afec | ||
|
|
99216321a8 | ||
|
|
31a0f04710 | ||
|
|
ac88add40b | ||
|
|
5a2c0460aa | ||
|
|
862cf67375 | ||
|
|
dae850616d | ||
|
|
72c2bd90e4 | ||
|
|
d4ecf28147 | ||
|
|
149e114359 | ||
|
|
7d63e7e417 | ||
|
|
d12e5d19c9 | ||
|
|
7a6b3b7a86 | ||
|
|
97fc02b601 | ||
|
|
9485403712 | ||
|
|
caeead0bc0 | ||
|
|
f93204e37e | ||
|
|
e6af91c6ab | ||
|
|
c89428eed8 | ||
|
|
b4f2b89139 | ||
|
|
aab7cdcf77 | ||
|
|
47cdedefd4 | ||
|
|
710145a32d | ||
|
|
2783d2cc77 | ||
|
|
751794c1ec | ||
|
|
a7a5df1991 | ||
|
|
62a296f909 | ||
|
|
c561aad661 | ||
|
|
0a301e1a84 | ||
|
|
37e727202c | ||
|
|
9023cc76a0 | ||
|
|
49bdd03c1c | ||
|
|
23f4b672b2 | ||
|
|
599d45086f | ||
|
|
93aed0e06a | ||
|
|
7eb94d7575 | ||
|
|
fa8b0bd6a1 | ||
|
|
c26e271676 | ||
|
|
7d87477d68 | ||
|
|
9002fb3828 | ||
|
|
10257a832a | ||
|
|
261f5a526c | ||
|
|
b5e0c121e8 | ||
|
|
6d99c456e4 | ||
|
|
8c6f0c2736 | ||
|
|
bd89af5e8c | ||
|
|
b0e4128d3c | ||
|
|
875a8f101a | ||
|
|
c5a8ef57ac | ||
|
|
c8adeed187 | ||
|
|
49f5f506d4 | ||
|
|
1c87585570 | ||
|
|
30eb52da77 | ||
|
|
6f089482e6 | ||
|
|
8e221cc263 | ||
|
|
441917b670 | ||
|
|
6251de3b38 | ||
|
|
d731125a14 | ||
|
|
d6fe64bc40 | ||
|
|
f8b93807ae | ||
|
|
2287a111c1 | ||
|
|
a08d92ea41 | ||
|
|
c41d7981ba | ||
|
|
37f5336806 | ||
|
|
ebdc98dfa7 | ||
|
|
f3c8c860f5 | ||
|
|
f7b27142c4 | ||
|
|
4fc37c54c5 | ||
|
|
849e1e57dd | ||
|
|
c768ca5eba | ||
|
|
c9516d90e9 | ||
|
|
327aae687a | ||
|
|
3cbe4617eb | ||
|
|
de69fe6b6f | ||
|
|
e53101dacb | ||
|
|
d3ec749848 | ||
|
|
410b7d3dd6 | ||
|
|
e87b233713 | ||
|
|
ca38ecb1cf | ||
|
|
5dfa70dc10 | ||
|
|
ff3daff15a | ||
|
|
7b7f235354 | ||
|
|
779c6247cd | ||
|
|
fcaffa8c5f | ||
|
|
d2ffcc903a | ||
|
|
1d12c97e30 | ||
|
|
3bcaeb214e | ||
|
|
85995040a8 | ||
|
|
826d06b532 | ||
|
|
3328e35cf4 | ||
|
|
091c56ec34 | ||
|
|
31e9910242 | ||
|
|
f6e3c72e9c | ||
|
|
3f618bc970 | ||
|
|
1c766e568c | ||
|
|
8ed9bfbfcb | ||
|
|
f1d66fc446 | ||
|
|
50977b367f | ||
|
|
45312d0564 | ||
|
|
3261d63b19 | ||
|
|
2894899ad4 | ||
|
|
dd5c709709 | ||
|
|
618247f4d5 | ||
|
|
abcf035143 | ||
|
|
0b015233a9 | ||
|
|
44d85b842c | ||
|
|
470f4a770b | ||
|
|
808a1ba0ea | ||
|
|
04cef606fc | ||
|
|
1ef6a1d0e4 | ||
|
|
b163a3a7b9 | ||
|
|
e7f7f28ff1 | ||
|
|
b9c17fd360 | ||
|
|
c7534a985a | ||
|
|
52583a05f6 | ||
|
|
081373fc0d | ||
|
|
9130604fa6 | ||
|
|
37b4726925 | ||
|
|
cc66eb5329 | ||
|
|
563c133676 | ||
|
|
e8b32c4ed3 | ||
|
|
72ca259771 | ||
|
|
d175c4b564 | ||
|
|
fb2aeb8192 | ||
|
|
24c25ab26c | ||
|
|
9da91e460f | ||
|
|
2634cf7de9 | ||
|
|
7417091f3f | ||
|
|
f9aad50f46 | ||
|
|
535cd5af2e | ||
|
|
4a8e469736 | ||
|
|
7d89f711fe | ||
|
|
7555a0389b | ||
|
|
1ac6e4b1a0 | ||
|
|
d2fc4c6134 | ||
|
|
73cad308aa | ||
|
|
c9f4c33ba1 | ||
|
|
3f0bdc593c | ||
|
|
0da2d38bd8 | ||
|
|
3a6ce52ead | ||
|
|
eb0582ae69 | ||
|
|
3143d094e8 | ||
|
|
f265a23f97 | ||
|
|
dceeb410c6 | ||
|
|
30be08fe4d | ||
|
|
20247d0bc2 | ||
|
|
c0ac325911 | ||
|
|
c02ab116cd | ||
|
|
7ec4f2a61e | ||
|
|
16129ba742 | ||
|
|
61853fb71f | ||
|
|
58f13eb1dc | ||
|
|
b999f17445 | ||
|
|
3bf24b838b | ||
|
|
e37928bf89 | ||
|
|
aa6dacf0c5 | ||
|
|
69cc71ab3b | ||
|
|
fe52d31168 | ||
|
|
3ea4307716 | ||
|
|
5650df1a9f | ||
|
|
8f154ebf48 | ||
|
|
ba9d56811c | ||
|
|
8eb8a328d1 |
@@ -402,3 +402,4 @@ FodyWeavers.xsd
|
|||||||
/fmtall
|
/fmtall
|
||||||
/genmacall
|
/genmacall
|
||||||
*AssemblyInfo.cs
|
*AssemblyInfo.cs
|
||||||
|
/PROMS/Baseline/Baseline.sln
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -44,6 +44,7 @@
|
|||||||
<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>
|
||||||
@@ -53,13 +54,14 @@
|
|||||||
<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>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@@ -32,34 +30,10 @@ 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.3.yyMM.dHH") + "\")");
|
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.4.yyMM.dHH") + "\")");
|
||||||
else
|
else
|
||||||
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.2.yyMM.dHH") + "\")");
|
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.3.yyMM.dHH") + "\")");
|
||||||
// if (outline != line)
|
|
||||||
// {
|
|
||||||
// Console.WriteLine("Before: '{0}'", line);
|
|
||||||
// Console.WriteLine("After: '{0}'", outline);
|
|
||||||
// lines[i] = outline;
|
|
||||||
// changed = true;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// Console.WriteLine("No change: '{0}'", line);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//if (changed)
|
|
||||||
//{
|
|
||||||
// if (!fi.IsReadOnly) fi.IsReadOnly = false;
|
|
||||||
// StreamWriter sw = fi.CreateText();
|
|
||||||
// foreach (string line in lines)
|
|
||||||
// sw.WriteLine(line);
|
|
||||||
// sw.Close();
|
|
||||||
// string line = lines[i];
|
|
||||||
// string outline = line;
|
|
||||||
// if (line.Contains("AssemblyVersion") || line.Contains("AssemblyFileVersion"))
|
|
||||||
// {
|
|
||||||
//outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("1.1.yyMM.dHH") + "\")");
|
|
||||||
if (outline != line)
|
if (outline != line)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Before: '{0}'", line);
|
Console.WriteLine("Before: '{0}'", line);
|
||||||
@@ -84,7 +58,7 @@ namespace AdjustBuildRevision
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("File " + fi.FullName + " does not exist");
|
MessageBox.Show($"File {fi.FullName} does not exist");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -93,10 +67,6 @@ namespace AdjustBuildRevision
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//private static DateTime GetLatestDateTime(string path)
|
|
||||||
//{
|
|
||||||
// return GetLatestDateTime(new DirectoryInfo(path));
|
|
||||||
//}
|
|
||||||
private static DateTime GetLatestDateTime(DirectoryInfo di, DateTime dtCheck)
|
private static DateTime GetLatestDateTime(DirectoryInfo di, DateTime dtCheck)
|
||||||
{
|
{
|
||||||
DateTime dtMax = dtCheck;
|
DateTime dtMax = dtCheck;
|
||||||
@@ -104,24 +74,14 @@ namespace AdjustBuildRevision
|
|||||||
foreach(FileInfo myFile in myFiles)
|
foreach(FileInfo myFile in myFiles)
|
||||||
{
|
{
|
||||||
DateTime dt = myFile.LastWriteTime;
|
DateTime dt = myFile.LastWriteTime;
|
||||||
//if (dt > dtCheck)
|
|
||||||
//{
|
|
||||||
//Console.WriteLine("\"File\"\t\"{0}\"\t\"{1}\"\t{2}\t{3}",myFile.FullName,dt.ToString("1.1.yyMM.dHH"),dt,dtCheck);
|
|
||||||
if(dtMax < dt) dtMax = dt;
|
if(dtMax < dt) dtMax = dt;
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
DirectoryInfo[] myFolders = di.GetDirectories();
|
DirectoryInfo[] myFolders = di.GetDirectories();
|
||||||
foreach (DirectoryInfo diChild in myFolders)
|
foreach (DirectoryInfo diChild in myFolders)
|
||||||
{
|
{
|
||||||
DateTime dtChild = GetLatestDateTime(diChild,dtCheck);
|
DateTime dtChild = GetLatestDateTime(diChild,dtCheck);
|
||||||
//if (dtChild > dtCheck)
|
|
||||||
//{
|
|
||||||
//Console.WriteLine("\"SubFolder\"\t\"{0}\"\t\"{1}\"\t{2}\t{3}", diChild.FullName, dtChild.ToString("1.1.yyMM.dHH"),dtChild,dtCheck);
|
|
||||||
if(dtChild > dtMax) dtMax = dtChild;
|
if(dtChild > dtMax) dtMax = dtChild;
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
//if(dtMax > dtCheck)
|
|
||||||
// Console.WriteLine("\"Folder\"\t\"{0}\"\t\"{1}\"", di.FullName, dtMax.ToString("1.1.yyMM.dHH"));
|
|
||||||
return dtMax;
|
return dtMax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
@@ -30,15 +30,17 @@
|
|||||||
<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>AnyCPU</PlatformTarget>
|
<PlatformTarget>x64</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" />
|
||||||
@@ -65,6 +67,7 @@
|
|||||||
<Compile Include="frmSettings.Designer.cs">
|
<Compile Include="frmSettings.Designer.cs">
|
||||||
<DependentUpon>frmSettings.cs</DependentUpon>
|
<DependentUpon>frmSettings.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="GlobalSuppressions.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<EmbeddedResource Include="frmBaseline.resx">
|
<EmbeddedResource Include="frmBaseline.resx">
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is used by Code Analysis to maintain SuppressMessage
|
||||||
|
// attributes that are applied to this project.
|
||||||
|
// Project-level suppressions either have no target or are given
|
||||||
|
// a specific target and scoped to a namespace, type, member, etc.
|
||||||
|
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Not modifying Naming Styles")]
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Baseline
|
namespace Baseline
|
||||||
|
|||||||
+160
-205
@@ -43,12 +43,9 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Collections.Specialized;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
@@ -73,12 +70,7 @@ namespace Baseline
|
|||||||
}
|
}
|
||||||
public partial class frmBaseline : Form
|
public partial class frmBaseline : Form
|
||||||
{
|
{
|
||||||
private IgnoreLines _MyIgnore = new IgnoreLines();
|
public IgnoreLines MyIgnore { get; set; } = new IgnoreLines();
|
||||||
public IgnoreLines MyIgnore
|
|
||||||
{
|
|
||||||
get { return _MyIgnore; }
|
|
||||||
set { _MyIgnore = value; }
|
|
||||||
}
|
|
||||||
private LastWas myLast = LastWas.Search;
|
private LastWas myLast = LastWas.Search;
|
||||||
private Settings MySettings;
|
private Settings MySettings;
|
||||||
public string MyStatus
|
public string MyStatus
|
||||||
@@ -151,8 +143,10 @@ namespace Baseline
|
|||||||
this.WindowState = Properties.Settings.Default.WidnowState;
|
this.WindowState = Properties.Settings.Default.WidnowState;
|
||||||
if(Properties.Settings.Default.Ignore != null && Properties.Settings.Default.Ignore != "")
|
if(Properties.Settings.Default.Ignore != null && Properties.Settings.Default.Ignore != "")
|
||||||
MyIgnore = IgnoreLines.Get(Properties.Settings.Default.Ignore);
|
MyIgnore = IgnoreLines.Get(Properties.Settings.Default.Ignore);
|
||||||
MySettings= new Settings();
|
MySettings = new Settings
|
||||||
MySettings.IgnoreLines = new BindingList<string>();
|
{
|
||||||
|
IgnoreLines = new BindingList<string>()
|
||||||
|
};
|
||||||
splitContainer1.SplitterDistance = Properties.Settings.Default.Split1;
|
splitContainer1.SplitterDistance = Properties.Settings.Default.Split1;
|
||||||
splitContainer2.SplitterDistance = Properties.Settings.Default.Split2;
|
splitContainer2.SplitterDistance = Properties.Settings.Default.Split2;
|
||||||
splitContainer3.SplitterDistance = Properties.Settings.Default.Split3;
|
splitContainer3.SplitterDistance = Properties.Settings.Default.Split3;
|
||||||
@@ -240,8 +234,7 @@ namespace Baseline
|
|||||||
lbProcedures.Items.Clear();
|
lbProcedures.Items.Clear();
|
||||||
lbResults1.Items.Clear();
|
lbResults1.Items.Clear();
|
||||||
lbResults2.Items.Clear();
|
lbResults2.Items.Clear();
|
||||||
FindFile ff = lbDifferent.SelectedItem as FindFile;
|
if (lbDifferent.SelectedItem is FindFile ff)
|
||||||
if (ff != null)
|
|
||||||
{
|
{
|
||||||
// Fill Procedure or Result ListBoxes
|
// Fill Procedure or Result ListBoxes
|
||||||
switch (myLast)
|
switch (myLast)
|
||||||
@@ -361,13 +354,6 @@ namespace Baseline
|
|||||||
lines1 = list1.AsEnumerable<string>();// Convert back to Enumerable to work with LINQ
|
lines1 = list1.AsEnumerable<string>();// Convert back to Enumerable to work with LINQ
|
||||||
return lines1;
|
return lines1;
|
||||||
}
|
}
|
||||||
private string GetProcNum(string line)
|
|
||||||
{
|
|
||||||
string retval = line.Substring(3, line.IndexOf(" | ") - 3);
|
|
||||||
if (retval.Contains("_"))
|
|
||||||
retval = retval.Substring(0, retval.IndexOf("_") - 1);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Include lines for Procedure or Page or Search is true
|
/// Include lines for Procedure or Page or Search is true
|
||||||
/// Account for Case Insensitive CheckBox
|
/// Account for Case Insensitive CheckBox
|
||||||
@@ -450,13 +436,13 @@ namespace Baseline
|
|||||||
private void lbResults1_SelectedIndexChanged(object sender, EventArgs e)
|
private void lbResults1_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string line=null;
|
string line=null;
|
||||||
if (lbResults1.SelectedItem is string)
|
if (lbResults1.SelectedItem is string v)
|
||||||
line = (string)lbResults1.SelectedItem;
|
line = v;
|
||||||
Line myLine = lbResults1.SelectedItem as Line;
|
Line myLine = lbResults1.SelectedItem as Line;
|
||||||
switch (myLast)
|
switch (myLast)
|
||||||
{
|
{
|
||||||
case LastWas.Pagination:
|
case LastWas.Pagination:
|
||||||
line = OpenPDF(line);
|
OpenPDF(line);
|
||||||
break;
|
break;
|
||||||
case LastWas.Baseline: // TODO: Need to add code here to open matching file
|
case LastWas.Baseline: // TODO: Need to add code here to open matching file
|
||||||
OpenOnePDF(myLine,1);
|
OpenOnePDF(myLine,1);
|
||||||
@@ -472,14 +458,14 @@ namespace Baseline
|
|||||||
{
|
{
|
||||||
|
|
||||||
string line=null;
|
string line=null;
|
||||||
if(lbResults2.SelectedItem is string)
|
if(lbResults2.SelectedItem is string v)
|
||||||
line = (string)lbResults2.SelectedItem;
|
line = v;
|
||||||
Line myLine = lbResults2.SelectedItem as Line;
|
Line myLine = lbResults2.SelectedItem as Line;
|
||||||
|
|
||||||
switch (myLast)
|
switch (myLast)
|
||||||
{
|
{
|
||||||
case LastWas.Pagination:
|
case LastWas.Pagination:
|
||||||
line = OpenPDF(line);
|
OpenPDF(line);
|
||||||
break;
|
break;
|
||||||
case LastWas.Baseline: // TODO: Need to add code here to open matching file
|
case LastWas.Baseline: // TODO: Need to add code here to open matching file
|
||||||
OpenOnePDF(myLine,2);
|
OpenOnePDF(myLine,2);
|
||||||
@@ -491,34 +477,97 @@ namespace Baseline
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string exePath;
|
|
||||||
private string OpenPDF(string line)
|
/// <summary>
|
||||||
|
/// This will return the full path to the PDF file
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fi"></param>
|
||||||
|
/// <param name="patern"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private string GetPFDFileAndPath(FileInfo fi, string patern)
|
||||||
{
|
{
|
||||||
int page = int.Parse(line.Substring(0, 6));
|
string[] fileList = Directory.GetFiles(fi.DirectoryName, patern);
|
||||||
|
// sort the list of file list
|
||||||
|
Array.Sort((string[])fileList);
|
||||||
|
return fileList.FirstOrDefault(); // the PDF file that we what should be top of the list then.
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This will parse out the procedure number for the PROMS ShortPath representation of a procedure section or step part
|
||||||
|
/// In the PROMS ShortPath, ".S" is used to delimit the procedure number, section then uses "..S" for the step parts
|
||||||
|
/// This method was written to handle cases where ".S" is used as part of the procedure number
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="txt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private string ParseOutProcedureNumberFromLine(string txt)
|
||||||
|
{
|
||||||
|
// if the item is to a high levels step or sub-step the short path as "..S" for each part of the step
|
||||||
|
// so look for the last occurence of ".." which will be the end of the section information
|
||||||
|
int lidx = txt.LastIndexOf("..");
|
||||||
|
if (lidx > 0)
|
||||||
|
{
|
||||||
|
lidx = txt.LastIndexOf(".S", lidx); // this will position us to the end of the procedure number
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lidx = txt.LastIndexOf(".S"); // this will position us to the end of the procedure number if there was no step information
|
||||||
|
}
|
||||||
|
// old logic was looking for the first occurence of ".S" in the txt string as the ending point of the procedure nuumber
|
||||||
|
// Beaver Valley has a procedure number "1.SBGEN" in which the old logic would not work
|
||||||
|
// 1.SBGEN.SC. ==> short path of attachment section "C"
|
||||||
|
// 1.SBGEN.SC..S1. ==> short path of Step 1 in attachment section "C"
|
||||||
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
|
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
|
||||||
line = line.Substring(8, line.IndexOf(".S") - 8).Replace("/", "_").Replace("\\", "_");
|
string rtnstr = txt.Substring(8, lidx - 8).Replace("/", "_").Replace("\\", "_");
|
||||||
|
return rtnstr;
|
||||||
|
}
|
||||||
|
|
||||||
|
string exePath;
|
||||||
|
private void OpenPDF(string line)
|
||||||
|
{
|
||||||
|
int pageNum = int.Parse(line.Substring(0, 6));
|
||||||
|
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
|
||||||
|
string ProcNum = ParseOutProcedureNumberFromLine(line);
|
||||||
|
string procPatern = string.Format("*{0}*.pdf", string.IsNullOrEmpty(line) ? "noProcNumber" : ProcNum);
|
||||||
|
|
||||||
FindFile ff = lbDifferent.SelectedItem as FindFile;
|
FindFile ff = lbDifferent.SelectedItem as FindFile;
|
||||||
FileInfo fi1 = new FileInfo(ff.File1);
|
FileInfo fi1 = new FileInfo(ff.File1);
|
||||||
FileInfo fi2 = new FileInfo(ff.File2);
|
FileInfo fi2 = new FileInfo(ff.File2);
|
||||||
|
string PDFfileName1 = GetPFDFileAndPath(fi1,procPatern);
|
||||||
|
string PDFfileName2 = GetPFDFileAndPath(fi2,procPatern);
|
||||||
|
if (string.IsNullOrEmpty(PDFfileName1) || string.IsNullOrEmpty(PDFfileName2)) return;
|
||||||
|
|
||||||
// If you don't know where the Reader executable is for PDFs Open a PDF and Check to see where the path points
|
// If you don't know where the Reader executable is for PDFs Open a PDF and Check to see where the path points
|
||||||
if (exePath == null)
|
if (exePath == null)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process p = System.Diagnostics.Process.Start(fi1.DirectoryName + "\\" + line + ".pdf");
|
try
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process p = System.Diagnostics.Process.Start(PDFfileName1);
|
||||||
exePath = TryToGetPath(p);
|
exePath = TryToGetPath(p);
|
||||||
p.Kill(); // No need to keep it open
|
p.Kill(); // No need to keep it open
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Application.DoEvents();
|
||||||
|
string msg = string.Format("{0} - {1}", ex.GetType().Name, ex.Message);
|
||||||
|
Console.WriteLine(msg);
|
||||||
|
MessageBox.Show(msg, "Error opening default PDF Viewer");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Open the first PDF on a Specific Page
|
// Open the first PDF on a Specific Page
|
||||||
System.Diagnostics.ProcessStartInfo psi1 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A page={0} ", page) + fi1.DirectoryName + "\\" + line + ".pdf ");
|
System.Diagnostics.ProcessStartInfo psi1 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format(" /A \"page={0}\" \"{1}\" ", pageNum,PDFfileName1));
|
||||||
System.Diagnostics.Process p1 = System.Diagnostics.Process.Start(psi1);
|
System.Diagnostics.Process p1 = System.Diagnostics.Process.Start(psi1);
|
||||||
// Move the PDF Reader window to 0,0
|
// Move the PDF Reader window to 0,0
|
||||||
MoveProcess(p1, 0, 0);
|
MoveProcess(p1, 0, 0);
|
||||||
// Open the first PDF on a Specific Page
|
|
||||||
System.Diagnostics.ProcessStartInfo psi2 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A page={0} ", page) + fi2.DirectoryName + "\\" + line + ".pdf ");
|
// Open the second PDF on a Specific Page
|
||||||
|
System.Diagnostics.ProcessStartInfo psi2 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format(" /A \"page={0}\" \"{1}\" ", pageNum, PDFfileName2));
|
||||||
System.Diagnostics.Process p2 = System.Diagnostics.Process.Start(psi2);
|
System.Diagnostics.Process p2 = System.Diagnostics.Process.Start(psi2);
|
||||||
// Move the PDF Reader window to 960,0
|
// Move the PDF Reader window to 960,0
|
||||||
// TODO: This Offset could be a Setting
|
// TODO: This Offset could be a Setting
|
||||||
MoveProcess(p2, 960, 0);
|
MoveProcess(p2, 960, 0);
|
||||||
return line;
|
return;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Try to get the location of the PDF Reader executable
|
/// Try to get the location of the PDF Reader executable
|
||||||
@@ -551,10 +600,10 @@ namespace Baseline
|
|||||||
progname = @"C:\Program Files (x86)\IDM Computer Solutions\UltraCompare\UC.exe";
|
progname = @"C:\Program Files (x86)\IDM Computer Solutions\UltraCompare\UC.exe";
|
||||||
System.Diagnostics.ProcessStartInfo psi =
|
System.Diagnostics.ProcessStartInfo psi =
|
||||||
new System.Diagnostics.ProcessStartInfo(progname, string.Format(@" -t ""{0}"" ""{1}""", compareFile, baseFile));
|
new System.Diagnostics.ProcessStartInfo(progname, string.Format(@" -t ""{0}"" ""{1}""", compareFile, baseFile));
|
||||||
System.Diagnostics.Process prc = System.Diagnostics.Process.Start(psi);
|
_ = System.Diagnostics.Process.Start(psi);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ProcessLocationQueue myQueue= new ProcessLocationQueue();
|
private readonly ProcessLocationQueue myQueue= new ProcessLocationQueue();
|
||||||
private Timer queueTimer = null;
|
private Timer queueTimer = null;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Move a Process to a specific screen location - This is done with a timer so
|
/// Move a Process to a specific screen location - This is done with a timer so
|
||||||
@@ -567,8 +616,10 @@ namespace Baseline
|
|||||||
{
|
{
|
||||||
if (queueTimer == null)
|
if (queueTimer == null)
|
||||||
{
|
{
|
||||||
queueTimer = new Timer();
|
queueTimer = new Timer
|
||||||
queueTimer.Enabled = false;
|
{
|
||||||
|
Enabled = false
|
||||||
|
};
|
||||||
queueTimer.Tick += queueTimer_Tick;
|
queueTimer.Tick += queueTimer_Tick;
|
||||||
queueTimer.Interval = 1000;
|
queueTimer.Interval = 1000;
|
||||||
}
|
}
|
||||||
@@ -594,40 +645,54 @@ namespace Baseline
|
|||||||
/// <param name="list"></param>
|
/// <param name="list"></param>
|
||||||
private void OpenOnePDF(Line myLine, int list)
|
private void OpenOnePDF(Line myLine, int list)
|
||||||
{
|
{
|
||||||
|
if (myLine == null) return; // no PDF to open
|
||||||
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
|
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
|
||||||
string proc = myLine.MyProc.Number.Replace("/","_").Replace("\\","_");
|
string proc = myLine.MyProc.Number.Replace("/","_").Replace("\\","_");
|
||||||
|
|
||||||
|
// if no procedure number, PROMS creates pdf filename "NoProcNumber.pdf"
|
||||||
|
// create pattern to use to get the PDF from the directory
|
||||||
|
// add wildcards (*) to file the file if any prefix or suffix was added to the filename
|
||||||
|
string procPatern = string.Format("*{0}*.pdf", proc == string.Empty ? "noProcNumber" : proc);
|
||||||
int pagenum = myLine.MyPage.Number;
|
int pagenum = myLine.MyPage.Number;
|
||||||
FindFile ff = lbDifferent.SelectedItem as FindFile;
|
FindFile ff = lbDifferent.SelectedItem as FindFile;
|
||||||
FileInfo fi1 = new FileInfo(ff.File1);
|
string PDFfileName;
|
||||||
FileInfo fi2 = new FileInfo(ff.File2);
|
if (list == 1)
|
||||||
if (exePath == null)
|
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process p = System.Diagnostics.Process.Start(fi1.DirectoryName + "\\" + proc + ".pdf");
|
FileInfo fi1 = new FileInfo(ff.File1);
|
||||||
while (exePath == null)
|
PDFfileName = GetPFDFileAndPath(fi1, procPatern);
|
||||||
|
}
|
||||||
|
else // list == 2
|
||||||
|
{
|
||||||
|
FileInfo fi2 = new FileInfo(ff.File2);
|
||||||
|
PDFfileName = GetPFDFileAndPath(fi2, procPatern);
|
||||||
|
}
|
||||||
|
if (string.IsNullOrEmpty(PDFfileName)) return; // no PDF to open
|
||||||
|
|
||||||
|
// if exePath is null, then open the found PDF with the default PDF viewer and
|
||||||
|
// capture/save the entire name and path of the default PDF viewer
|
||||||
|
if (exePath == null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
System.Diagnostics.Process tp = System.Diagnostics.Process.Start(PDFfileName);
|
||||||
exePath = p.MainModule.FileName;
|
exePath = TryToGetPath(tp);
|
||||||
|
tp.Kill();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
Console.WriteLine("{0} - {1}", ex.GetType().Name, ex.Message);
|
string msg = string.Format("{0} - {1}", ex.GetType().Name, ex.Message);
|
||||||
|
Console.WriteLine(msg);
|
||||||
|
MessageBox.Show(msg, "Error opening default PDF Viewer");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.Kill();
|
// open the PDF and jump to the page number
|
||||||
}
|
System.Diagnostics.ProcessStartInfo psi1 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A \"page={0}\" \"{1}\" ", pagenum, PDFfileName))
|
||||||
if (list == 1)
|
|
||||||
{
|
{
|
||||||
System.Diagnostics.ProcessStartInfo psi1 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A page={0} ", pagenum) + fi1.DirectoryName + "\\" + proc + ".pdf ");
|
UseShellExecute = false
|
||||||
System.Diagnostics.Process p1 = System.Diagnostics.Process.Start(psi1);
|
};
|
||||||
}
|
_ = System.Diagnostics.Process.Start(psi1);
|
||||||
else
|
|
||||||
{
|
|
||||||
System.Diagnostics.ProcessStartInfo psi2 = new System.Diagnostics.ProcessStartInfo(exePath, string.Format("/A page={0} ", pagenum) + fi2.DirectoryName + "\\" + proc + ".pdf ");
|
|
||||||
System.Diagnostics.Process p1 = System.Diagnostics.Process.Start(psi2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Perform Debug Meta file comparison for all of the folders within the automated testing folders
|
/// Perform Debug Meta file comparison for all of the folders within the automated testing folders
|
||||||
@@ -709,11 +774,11 @@ namespace Baseline
|
|||||||
private void lbProcedures_SelectedIndexChanged(object sender, EventArgs e)
|
private void lbProcedures_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//Initialize Results List Box
|
//Initialize Results List Box
|
||||||
lbResults1.Items.Clear();
|
if (!(lbProcedures.SelectedItem is Procedure myProc)) return; // clicked on the white space (blank line) in the list of different procedures
|
||||||
Procedure myProc = lbProcedures.SelectedItem as Procedure;
|
|
||||||
//TODO: May need to consider if there are duplicate procedure numers and titles
|
//TODO: May need to consider if there are duplicate procedure numers and titles
|
||||||
Procedure myProc1 = MyProcs1.Find(x => x.Number == myProc.Number && x.Title == myProc.Title);
|
Procedure myProc1 = MyProcs1.Find(x => x.Number == myProc.Number && x.Title == myProc.Title);
|
||||||
// Build the results ListBox for the left window
|
// Build the results ListBox for the left window
|
||||||
|
lbResults1.Items.Clear();
|
||||||
if (myProc1 != null)
|
if (myProc1 != null)
|
||||||
{
|
{
|
||||||
foreach (Page myPage in myProc1.MyPages)
|
foreach (Page myPage in myProc1.MyPages)
|
||||||
@@ -758,27 +823,12 @@ namespace Baseline
|
|||||||
};
|
};
|
||||||
public class Settings
|
public class Settings
|
||||||
{
|
{
|
||||||
private BindingList<string> _IgnoreLines;
|
public BindingList<string> IgnoreLines { get; set; }
|
||||||
public BindingList<string> IgnoreLines
|
|
||||||
{
|
|
||||||
get { return _IgnoreLines; }
|
|
||||||
set { _IgnoreLines = value; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class FindFile
|
public partial class FindFile
|
||||||
{
|
{
|
||||||
private string _File1;
|
public string File1 { get; set; }
|
||||||
public string File1
|
public string File2 { get; set; }
|
||||||
{
|
|
||||||
get { return _File1; }
|
|
||||||
set { _File1 = value; }
|
|
||||||
}
|
|
||||||
private string _File2;
|
|
||||||
public string File2
|
|
||||||
{
|
|
||||||
get { return _File2; }
|
|
||||||
set { _File2 = value; }
|
|
||||||
}
|
|
||||||
public FindFile(string file1, string file2)
|
public FindFile(string file1, string file2)
|
||||||
{
|
{
|
||||||
File1 = file1;
|
File1 = file1;
|
||||||
@@ -787,11 +837,8 @@ namespace Baseline
|
|||||||
}
|
}
|
||||||
public partial class FindFiles : List<FindFile>
|
public partial class FindFiles : List<FindFile>
|
||||||
{
|
{
|
||||||
private string _FileName;
|
private readonly string _FileName;
|
||||||
public string FileName
|
public string FileName => _FileName;
|
||||||
{
|
|
||||||
get { return _FileName; }
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Build list of DocVersion Folders with differences
|
/// Build list of DocVersion Folders with differences
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1025,33 +1072,15 @@ namespace Baseline
|
|||||||
// Text - the line of text
|
// Text - the line of text
|
||||||
public partial class Procedure
|
public partial class Procedure
|
||||||
{
|
{
|
||||||
private string _Number;
|
public string Number { get; set; }
|
||||||
public string Number
|
public string Title { get; set; }
|
||||||
{
|
public Pages MyPages { get; set; } = new Pages();
|
||||||
get { return _Number; }
|
|
||||||
set { _Number = value; }
|
|
||||||
}
|
|
||||||
private string _Title;
|
|
||||||
public string Title
|
|
||||||
{
|
|
||||||
get { return _Title; }
|
|
||||||
set { _Title = value; }
|
|
||||||
}
|
|
||||||
private Pages _MyPages = new Pages();
|
|
||||||
public Pages MyPages
|
|
||||||
{
|
|
||||||
get { return _MyPages; }
|
|
||||||
set { _MyPages = value; }
|
|
||||||
}
|
|
||||||
public Procedure(string number, string title)
|
public Procedure(string number, string title)
|
||||||
{
|
{
|
||||||
_Number = number;
|
Number = number;
|
||||||
_Title = title;
|
Title = title;
|
||||||
}
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return string.Format("{0} - {1}", Number, Title);
|
|
||||||
}
|
}
|
||||||
|
public override string ToString() => string.Format("{0} - {1}", Number, Title);
|
||||||
}
|
}
|
||||||
public partial class Procedures : List<Procedure>
|
public partial class Procedures : List<Procedure>
|
||||||
{
|
{
|
||||||
@@ -1083,76 +1112,33 @@ namespace Baseline
|
|||||||
}
|
}
|
||||||
public partial class Page
|
public partial class Page
|
||||||
{
|
{
|
||||||
private int _Number;
|
public int Number { get; set; }
|
||||||
public int Number
|
|
||||||
{
|
|
||||||
get { return _Number; }
|
|
||||||
set { _Number = value; }
|
|
||||||
}
|
|
||||||
private Lines _MyLines = new Lines();
|
|
||||||
|
|
||||||
public Lines MyLines
|
public Lines MyLines { get; set; } = new Lines();
|
||||||
{
|
public Page(int number) => Number = number;
|
||||||
get { return _MyLines; }
|
public override string ToString() => string.Format("Page {0}", Number);
|
||||||
set { _MyLines = value; }
|
|
||||||
}
|
|
||||||
public Page(int number)
|
|
||||||
{
|
|
||||||
_Number = number;
|
|
||||||
}
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return string.Format("Page {0}", Number);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class Pages : List<Page>
|
public partial class Pages : List<Page>
|
||||||
{
|
{
|
||||||
public void Add(int number)
|
public void Add(int number) => Add(new Page(number));
|
||||||
{
|
|
||||||
Add(new Page(number));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class Line
|
public partial class Line
|
||||||
{
|
{
|
||||||
private Procedure _MyProc;
|
public Procedure MyProc { get; set; }
|
||||||
public Procedure MyProc
|
public Page MyPage { get; set; }
|
||||||
{
|
public string Text { get; set; }
|
||||||
get { return _MyProc; }
|
public Line(string text) => Text = text;
|
||||||
set { _MyProc = value; }
|
|
||||||
}
|
|
||||||
private Page _MyPage;
|
|
||||||
public Page MyPage
|
|
||||||
{
|
|
||||||
get { return _MyPage; }
|
|
||||||
set { _MyPage = value; }
|
|
||||||
}
|
|
||||||
private string _Text;
|
|
||||||
public string Text
|
|
||||||
{
|
|
||||||
get { return _Text; }
|
|
||||||
set { _Text = value; }
|
|
||||||
}
|
|
||||||
public Line(string text)
|
|
||||||
{
|
|
||||||
_Text = text;
|
|
||||||
}
|
|
||||||
public Line(string text, Procedure myProc, Page myPage)
|
public Line(string text, Procedure myProc, Page myPage)
|
||||||
{
|
{
|
||||||
_Text = text;
|
Text = text;
|
||||||
_MyProc = myProc;
|
MyProc = myProc;
|
||||||
_MyPage = myPage;
|
MyPage = myPage;
|
||||||
}
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return Text;
|
|
||||||
}
|
}
|
||||||
|
public override string ToString() => Text;
|
||||||
}
|
}
|
||||||
public partial class Lines : List<Line>
|
public partial class Lines : List<Line>
|
||||||
{
|
{
|
||||||
public void Add(string text)
|
public void Add(string text) => Add(new Line(text));
|
||||||
{
|
|
||||||
Add(new Line(text));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public partial class IgnoreLine
|
public partial class IgnoreLine
|
||||||
@@ -1191,20 +1177,11 @@ namespace Baseline
|
|||||||
public IgnoreLines()
|
public IgnoreLines()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
public void Add(string text, Relation searchType, bool active)
|
public void Add(string text, Relation searchType, bool active) => Add(new IgnoreLine(text, searchType, active));
|
||||||
{
|
|
||||||
Add(new IgnoreLine(text, searchType, active));
|
|
||||||
}
|
|
||||||
// Convert IgnoreLines to string (XML)
|
// Convert IgnoreLines to string (XML)
|
||||||
public override string ToString()
|
public override string ToString() => GenericSerializer<IgnoreLines>.StringSerialize(this);
|
||||||
{
|
|
||||||
return GenericSerializer<IgnoreLines>.StringSerialize(this);
|
|
||||||
}
|
|
||||||
// Convert string to IgnoreLines
|
// Convert string to IgnoreLines
|
||||||
public static IgnoreLines Get(string xml)
|
public static IgnoreLines Get(string xml) => GenericSerializer<IgnoreLines>.StringDeserialize(xml);
|
||||||
{
|
|
||||||
return GenericSerializer<IgnoreLines>.StringDeserialize(xml);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is a simple serializer that takes a class and converts it to and from string (XML)
|
/// This is a simple serializer that takes a class and converts it to and from string (XML)
|
||||||
@@ -1233,7 +1210,7 @@ namespace Baseline
|
|||||||
string ss = s.Replace("encoding=\"utf-16\"", "");
|
string ss = s.Replace("encoding=\"utf-16\"", "");
|
||||||
XmlSerializer xs = new XmlSerializer(typeof(T));
|
XmlSerializer xs = new XmlSerializer(typeof(T));
|
||||||
UTF8Encoding enc = new UTF8Encoding();
|
UTF8Encoding enc = new UTF8Encoding();
|
||||||
Byte[] arrBytData = enc.GetBytes(ss);
|
byte[] arrBytData = enc.GetBytes(ss);
|
||||||
using (MemoryStream ms = new MemoryStream(arrBytData))
|
using (MemoryStream ms = new MemoryStream(arrBytData))
|
||||||
{
|
{
|
||||||
t = (T)xs.Deserialize(ms);
|
t = (T)xs.Deserialize(ms);
|
||||||
@@ -1248,10 +1225,7 @@ namespace Baseline
|
|||||||
{
|
{
|
||||||
public NonXsiTextWriter(TextWriter w) : base(w) { }
|
public NonXsiTextWriter(TextWriter w) : base(w) { }
|
||||||
public NonXsiTextWriter(Stream w, Encoding encoding)
|
public NonXsiTextWriter(Stream w, Encoding encoding)
|
||||||
: base(w, encoding)
|
: base(w, encoding) => Formatting = Formatting.Indented;
|
||||||
{
|
|
||||||
this.Formatting = Formatting.Indented;
|
|
||||||
}
|
|
||||||
public NonXsiTextWriter(string filename, Encoding encoding) : base(filename, encoding) { }
|
public NonXsiTextWriter(string filename, Encoding encoding) : base(filename, encoding) { }
|
||||||
bool _skip = false;
|
bool _skip = false;
|
||||||
public override void WriteStartAttribute(string prefix, string localName, string ns)
|
public override void WriteStartAttribute(string prefix, string localName, string ns)
|
||||||
@@ -1294,32 +1268,16 @@ namespace Baseline
|
|||||||
public const short SWP_NOZORDER = 0X4;
|
public const short SWP_NOZORDER = 0X4;
|
||||||
public const int SWP_SHOWWINDOW = 0x0040;
|
public const int SWP_SHOWWINDOW = 0x0040;
|
||||||
|
|
||||||
private System.Diagnostics.Process _Process;
|
public System.Diagnostics.Process Process { get; set; }
|
||||||
|
public int X { get; set; }
|
||||||
public System.Diagnostics.Process Process
|
public int Y { get; set; }
|
||||||
{
|
|
||||||
get { return _Process; }
|
|
||||||
set { _Process = value; }
|
|
||||||
}
|
|
||||||
private int _X;
|
|
||||||
public int X
|
|
||||||
{
|
|
||||||
get { return _X; }
|
|
||||||
set { _X = value; }
|
|
||||||
}
|
|
||||||
private int _Y;
|
|
||||||
public int Y
|
|
||||||
{
|
|
||||||
get { return _Y; }
|
|
||||||
set { _Y = value; }
|
|
||||||
}
|
|
||||||
public ProcessLocation(System.Diagnostics.Process process, int x, int y)
|
public ProcessLocation(System.Diagnostics.Process process, int x, int y)
|
||||||
{
|
{
|
||||||
Process = process;
|
Process = process;
|
||||||
X = x;
|
X = x;
|
||||||
Y = y;
|
Y = y;
|
||||||
}
|
}
|
||||||
private static Boolean FoxitSettingInfo = true;
|
private static bool FoxitSettingInfo = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// MoveIt() moves the window containing the PDF viewer to the right so the two pdf viewer windows will not overlap.
|
/// MoveIt() moves the window containing the PDF viewer to the right so the two pdf viewer windows will not overlap.
|
||||||
@@ -1340,10 +1298,7 @@ namespace Baseline
|
|||||||
}
|
}
|
||||||
public class ProcessLocationQueue: Queue<ProcessLocation>
|
public class ProcessLocationQueue: Queue<ProcessLocation>
|
||||||
{
|
{
|
||||||
public void Add(System.Diagnostics.Process process, int x, int y)
|
public void Add(System.Diagnostics.Process process, int x, int y) => Enqueue(new ProcessLocation(process, x, y));
|
||||||
{
|
|
||||||
Enqueue(new ProcessLocation(process,x,y));
|
|
||||||
}
|
|
||||||
public void ProcessNext()
|
public void ProcessNext()
|
||||||
{
|
{
|
||||||
ProcessLocation pl = Dequeue();
|
ProcessLocation pl = Dequeue();
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
using System;
|
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.Windows.Forms;
|
||||||
|
|
||||||
namespace Baseline
|
namespace Baseline
|
||||||
@@ -19,17 +12,7 @@ namespace Baseline
|
|||||||
set {
|
set {
|
||||||
_MyIgnore = value;
|
_MyIgnore = value;
|
||||||
dgv.DataSource=null;
|
dgv.DataSource=null;
|
||||||
//dgvcSearchType.ValueType = typeof(Relation);
|
|
||||||
//dgvcSearchType.ValueMember = "Value";
|
|
||||||
//dgvcSearchType.DisplayMember = "Display";
|
|
||||||
//dgvcSearchType.DataSource = new Relation[] { Relation.Contains, Relation.StartsWith, Relation.EndsWith, Relation.Regex }
|
|
||||||
//.Select(x => new { Display = x.ToString(), Value = x })
|
|
||||||
//.ToList();
|
|
||||||
dgv.DataSource=value;
|
dgv.DataSource=value;
|
||||||
//dgvcSearchType.DataSource =
|
|
||||||
//new List<Relation>((Relation[]) Enum.GetValues(typeof(Relation)))
|
|
||||||
//.Select(x => new { Display=x.ToString(), Value=(int)x })
|
|
||||||
//.ToList();;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public frmSettings(IgnoreLines myIgnore)
|
public frmSettings(IgnoreLines myIgnore)
|
||||||
@@ -46,19 +29,16 @@ namespace Baseline
|
|||||||
col.ValueType = typeof(Relation);
|
col.ValueType = typeof(Relation);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dgv_DataError(object sender, DataGridViewDataErrorEventArgs e)
|
private void dgv_DataError(object sender, DataGridViewDataErrorEventArgs e) => Console.WriteLine("Here");
|
||||||
{
|
|
||||||
Console.WriteLine("Here");
|
|
||||||
}
|
|
||||||
private void btnOK_Click(object sender, EventArgs e)
|
private void btnOK_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
this.Close();
|
Close();
|
||||||
}
|
}
|
||||||
private void btnCancel_Click(object sender, EventArgs e)
|
private void btnCancel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.Close();
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ namespace AT.STO.UI.Win
|
|||||||
{
|
{
|
||||||
#region Private Variable Declarations
|
#region Private Variable Declarations
|
||||||
private IDropDownAware _dropDownControl = null;
|
private IDropDownAware _dropDownControl = null;
|
||||||
private DropDownWindowHelper _dropDownHelper = null;
|
private readonly DropDownWindowHelper _dropDownHelper = null;
|
||||||
private Form _owner = null;
|
private Form _owner = null;
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructor / Destructor
|
#region Constructor / Destructor
|
||||||
@@ -47,7 +46,7 @@ namespace AT.STO.UI.Win
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected override void OnHandleCreated(EventArgs e)
|
protected override void OnHandleCreated(EventArgs e)
|
||||||
{
|
{
|
||||||
_owner = this.FindForm();
|
_owner = FindForm();
|
||||||
_dropDownHelper.ReleaseHandle();
|
_dropDownHelper.ReleaseHandle();
|
||||||
|
|
||||||
if (_owner != null)
|
if (_owner != null)
|
||||||
@@ -66,8 +65,8 @@ namespace AT.STO.UI.Win
|
|||||||
{
|
{
|
||||||
base.OnResize(e);
|
base.OnResize(e);
|
||||||
combo.Location = new Point(0, 0);
|
combo.Location = new Point(0, 0);
|
||||||
combo.Width = this.ClientRectangle.Width;
|
combo.Width = ClientRectangle.Width;
|
||||||
this.Height = combo.Height;
|
Height = combo.Height;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Event Handler
|
#region Event Handler
|
||||||
@@ -96,7 +95,7 @@ namespace AT.STO.UI.Win
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_dropDownHelper.CloseDropDown();
|
_dropDownHelper.CloseDropDown();
|
||||||
this.Focus();
|
Focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +114,7 @@ namespace AT.STO.UI.Win
|
|||||||
|
|
||||||
private void DropDownHelper_DropDownCancel(object sender, DropDownCancelEventArgs e)
|
private void DropDownHelper_DropDownCancel(object sender, DropDownCancelEventArgs e)
|
||||||
{
|
{
|
||||||
if (this.Bounds.Contains(Parent.PointToClient(e.CursorLocation)))
|
if (Bounds.Contains(Parent.PointToClient(e.CursorLocation)))
|
||||||
{
|
{
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
@@ -138,23 +137,14 @@ namespace AT.STO.UI.Win
|
|||||||
SetValue<long>(e.Value as ILookupItem<long>);
|
SetValue<long>(e.Value as ILookupItem<long>);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.FinishEditing != null)
|
FinishEditing?.Invoke(this, e);
|
||||||
{
|
|
||||||
this.FinishEditing(this, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
_dropDownControl.FinishEditing -= new DropDownValueChangedEventHandler(DropDown_FinishEditing);
|
_dropDownControl.FinishEditing -= new DropDownValueChangedEventHandler(DropDown_FinishEditing);
|
||||||
_dropDownControl.ValueChanged -= new DropDownValueChangedEventHandler(DropDown_ValueChanged);
|
_dropDownControl.ValueChanged -= new DropDownValueChangedEventHandler(DropDown_ValueChanged);
|
||||||
_dropDownHelper.CloseDropDown();
|
_dropDownHelper.CloseDropDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DropDown_ValueChanged(object sender, DropDownValueChangedEventArgs e)
|
private void DropDown_ValueChanged(object sender, DropDownValueChangedEventArgs e) => ValueChanged?.Invoke(this, e);
|
||||||
{
|
|
||||||
if (this.ValueChanged != null)
|
|
||||||
{
|
|
||||||
this.ValueChanged(this, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -169,15 +159,12 @@ namespace AT.STO.UI.Win
|
|||||||
{
|
{
|
||||||
_dropDownControl = value;
|
_dropDownControl = value;
|
||||||
|
|
||||||
this.Controls.Add(_dropDownControl as Control);
|
Controls.Add(_dropDownControl as Control);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
public override string ToString()
|
public override string ToString() => Name;
|
||||||
{
|
|
||||||
return this.Name;
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Private Methods
|
#region Private Methods
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -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>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
@@ -45,13 +45,14 @@
|
|||||||
<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>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -60,7 +61,7 @@
|
|||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -69,7 +70,7 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -78,7 +79,7 @@
|
|||||||
<OutputPath>bin\Demo\</OutputPath>
|
<OutputPath>bin\Demo\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEMO</DefineConstants>
|
<DefineConstants>TRACE;DEMO</DefineConstants>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -36,9 +36,8 @@ namespace AT.STO.UI.Win
|
|||||||
public class DropDownCancelEventArgs : EventArgs
|
public class DropDownCancelEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
#region Private Variable Declarations
|
#region Private Variable Declarations
|
||||||
private bool _cancel = false;
|
|
||||||
private Point _cursorLocation;
|
private Point _cursorLocation;
|
||||||
private Form _dropDown = null;
|
private readonly Form _dropDown = null;
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructor / Destructor
|
#region Constructor / Destructor
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -51,34 +50,24 @@ namespace AT.STO.UI.Win
|
|||||||
{
|
{
|
||||||
_dropDown = DropDown;
|
_dropDown = DropDown;
|
||||||
_cursorLocation = CursorLocation;
|
_cursorLocation = CursorLocation;
|
||||||
_cancel = false;
|
Cancel = false;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Cancel
|
public bool Cancel { get; set; } = false;
|
||||||
{
|
|
||||||
get { return _cancel; }
|
|
||||||
set { _cancel = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Point CursorLocation
|
public Point CursorLocation => _cursorLocation;
|
||||||
{
|
|
||||||
get { return _cursorLocation; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Form DropDown
|
public Form DropDown => _dropDown;
|
||||||
{
|
|
||||||
get { return _dropDown; }
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +80,7 @@ namespace AT.STO.UI.Win
|
|||||||
public class DropDownClosedEventArgs : EventArgs
|
public class DropDownClosedEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
#region Private Variable Declarations
|
#region Private Variable Declarations
|
||||||
private Form _dropDown = null;
|
private readonly Form _dropDown = null;
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructor / Destructor
|
#region Constructor / Destructor
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -99,19 +88,13 @@ namespace AT.STO.UI.Win
|
|||||||
/// popup form.
|
/// popup form.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="DropDown">DropDown Form which is being closed.</param>
|
/// <param name="DropDown">DropDown Form which is being closed.</param>
|
||||||
public DropDownClosedEventArgs(Form DropDown)
|
public DropDownClosedEventArgs(Form DropDown) => _dropDown = DropDown;
|
||||||
{
|
|
||||||
_dropDown = DropDown;
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the dropdown form which is being closed.
|
/// Gets the dropdown form which is being closed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Form DropDown
|
public Form DropDown => _dropDown;
|
||||||
{
|
|
||||||
get { return _dropDown; }
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +104,6 @@ namespace AT.STO.UI.Win
|
|||||||
public class DropDownValueChangedEventArgs : EventArgs
|
public class DropDownValueChangedEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
#region Private Variable Declarations
|
#region Private Variable Declarations
|
||||||
private object _value = null;
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructor / Destructor
|
#region Constructor / Destructor
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -135,20 +117,13 @@ namespace AT.STO.UI.Win
|
|||||||
/// Initialization with the control's value.
|
/// Initialization with the control's value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Value"></param>
|
/// <param name="Value"></param>
|
||||||
public DropDownValueChangedEventArgs(object Value)
|
public DropDownValueChangedEventArgs(object Value) => this.Value = Value;
|
||||||
{
|
|
||||||
_value = Value;
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the control's value.
|
/// Gets or sets the control's value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object Value
|
public object Value { get; set; } = null;
|
||||||
{
|
|
||||||
get { return _value; }
|
|
||||||
set { _value = value; }
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,16 +13,13 @@ namespace AT.STO.UI.Win
|
|||||||
internal partial class DropDownForm : Form, IDropDownAware
|
internal partial class DropDownForm : Form, IDropDownAware
|
||||||
{
|
{
|
||||||
#region Private Variable Declaration
|
#region Private Variable Declaration
|
||||||
private IDropDownAware _control = null;
|
private readonly IDropDownAware _control = null;
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructor / Destructor
|
#region Constructor / Destructor
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default Constructor
|
/// Default Constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DropDownForm()
|
public DropDownForm() => InitializeComponent();
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor to initialize the for with the control to display.
|
/// Constructor to initialize the for with the control to display.
|
||||||
@@ -41,7 +38,7 @@ namespace AT.STO.UI.Win
|
|||||||
#region Form Events
|
#region Form Events
|
||||||
protected override void OnClosing(CancelEventArgs e)
|
protected override void OnClosing(CancelEventArgs e)
|
||||||
{
|
{
|
||||||
this.Controls.Remove(_control as Control);
|
Controls.Remove(_control as Control);
|
||||||
base.OnClosing(e);
|
base.OnClosing(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,22 +55,13 @@ namespace AT.STO.UI.Win
|
|||||||
#region Event Handler
|
#region Event Handler
|
||||||
private void Ctrl_FinishEditing(object sender, DropDownValueChangedEventArgs e)
|
private void Ctrl_FinishEditing(object sender, DropDownValueChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (this.FinishEditing != null)
|
FinishEditing?.Invoke(this, e);
|
||||||
{
|
|
||||||
this.FinishEditing(this, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
_control.FinishEditing -= new DropDownValueChangedEventHandler(Ctrl_FinishEditing);
|
_control.FinishEditing -= new DropDownValueChangedEventHandler(Ctrl_FinishEditing);
|
||||||
_control.ValueChanged -= new DropDownValueChangedEventHandler(Ctrl_ValueChanged);
|
_control.ValueChanged -= new DropDownValueChangedEventHandler(Ctrl_ValueChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Ctrl_ValueChanged(object sender, DropDownValueChangedEventArgs e)
|
private void Ctrl_ValueChanged(object sender, DropDownValueChangedEventArgs e) => ValueChanged?.Invoke(this, e);
|
||||||
{
|
|
||||||
if (this.ValueChanged != null)
|
|
||||||
{
|
|
||||||
this.ValueChanged(this, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
#region IDropDownAware Implementation
|
#region IDropDownAware Implementation
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -100,15 +88,15 @@ namespace AT.STO.UI.Win
|
|||||||
private void InitializeControl(Control Ctrl)
|
private void InitializeControl(Control Ctrl)
|
||||||
{
|
{
|
||||||
Size size = Ctrl.Size;
|
Size size = Ctrl.Size;
|
||||||
Size inner = this.ClientRectangle.Size;
|
Size inner = ClientRectangle.Size;
|
||||||
Size outer = this.Size;
|
Size outer = Size;
|
||||||
int gap = outer.Width - inner.Width;
|
int gap = outer.Width - inner.Width;
|
||||||
|
|
||||||
size.Width += gap;
|
size.Width += gap;
|
||||||
size.Height += gap;
|
size.Height += gap;
|
||||||
|
|
||||||
this.Size = size;
|
Size = size;
|
||||||
this.Controls.Add(Ctrl);
|
Controls.Add(Ctrl);
|
||||||
Ctrl.Location = new Point(0, 0);
|
Ctrl.Location = new Point(0, 0);
|
||||||
Ctrl.Visible = true;
|
Ctrl.Visible = true;
|
||||||
Ctrl.Invalidate();
|
Ctrl.Invalidate();
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using System;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
@@ -23,8 +22,7 @@ namespace AT.STO.UI.Win
|
|||||||
private const int WM_NCMBUTTONDOWN = 0x0A7;
|
private const int WM_NCMBUTTONDOWN = 0x0A7;
|
||||||
#endregion
|
#endregion
|
||||||
#region Private Variable Declarations
|
#region Private Variable Declarations
|
||||||
private Form _dropDown = null;
|
private readonly DropDownWindowHelper _owner = null;
|
||||||
private DropDownWindowHelper _owner = null;
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Event Declarations
|
#region Event Declarations
|
||||||
public event DropDownCancelEventHandler DropDownCancel;
|
public event DropDownCancelEventHandler DropDownCancel;
|
||||||
@@ -36,44 +34,34 @@ namespace AT.STO.UI.Win
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Owner">The <see cref="DropDownWindowHelper"/> object
|
/// <param name="Owner">The <see cref="DropDownWindowHelper"/> object
|
||||||
/// which owns this class.</param>
|
/// which owns this class.</param>
|
||||||
public DropDownMessageFilter(DropDownWindowHelper Owner)
|
public DropDownMessageFilter(DropDownWindowHelper Owner) => _owner = Owner;
|
||||||
{
|
|
||||||
_owner = Owner;
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets/sets the dropdown form which is being displayed.
|
/// Gets/sets the dropdown form which is being displayed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Form DropDown
|
public Form DropDown { get; set; } = null;
|
||||||
{
|
|
||||||
get { return _dropDown; }
|
|
||||||
set { _dropDown = value; }
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Private Methods
|
#region Private Methods
|
||||||
private void OnMouseDown()
|
private void OnMouseDown()
|
||||||
{
|
{
|
||||||
Point cursorPos = Cursor.Position; // Get the cursor location
|
Point cursorPos = Cursor.Position; // Get the cursor location
|
||||||
|
|
||||||
if (!_dropDown.Bounds.Contains(cursorPos)) // Check if it is within the popup form
|
if (!DropDown.Bounds.Contains(cursorPos)) // Check if it is within the popup form
|
||||||
{
|
{
|
||||||
OnDropDownCancel(new DropDownCancelEventArgs(_dropDown, cursorPos)); // If not, then call to see if it should be closed
|
OnDropDownCancel(new DropDownCancelEventArgs(DropDown, cursorPos)); // If not, then call to see if it should be closed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region DropDownCancelEvent Implementation
|
#region DropDownCancelEvent Implementation
|
||||||
protected virtual void OnDropDownCancel(DropDownCancelEventArgs e)
|
protected virtual void OnDropDownCancel(DropDownCancelEventArgs e)
|
||||||
{
|
{
|
||||||
if (this.DropDownCancel != null)
|
DropDownCancel?.Invoke(this, e);
|
||||||
{
|
|
||||||
this.DropDownCancel(this, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!e.Cancel)
|
if (!e.Cancel)
|
||||||
{
|
{
|
||||||
_owner.CloseDropDown();
|
_owner.CloseDropDown();
|
||||||
_dropDown = null; // Clear reference for GC
|
DropDown = null; // Clear reference for GC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -90,7 +78,7 @@ namespace AT.STO.UI.Win
|
|||||||
/// This implementation always returns <c>false</c>.</returns>
|
/// This implementation always returns <c>false</c>.</returns>
|
||||||
public bool PreFilterMessage(ref Message m)
|
public bool PreFilterMessage(ref Message m)
|
||||||
{
|
{
|
||||||
if (_dropDown != null)
|
if (DropDown != null)
|
||||||
{
|
{
|
||||||
switch (m.Msg)
|
switch (m.Msg)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AT.STO.UI.Win
|
namespace AT.STO.UI.Win
|
||||||
@@ -22,7 +21,7 @@ namespace AT.STO.UI.Win
|
|||||||
|
|
||||||
private Form _dropDown = null;
|
private Form _dropDown = null;
|
||||||
private bool _dropDownShowing = false;
|
private bool _dropDownShowing = false;
|
||||||
private DropDownMessageFilter _filter = null;
|
private readonly DropDownMessageFilter _filter = null;
|
||||||
private Form _owner = null;
|
private Form _owner = null;
|
||||||
private bool _skipClose = false;
|
private bool _skipClose = false;
|
||||||
#endregion
|
#endregion
|
||||||
@@ -44,10 +43,7 @@ namespace AT.STO.UI.Win
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Event Handler
|
#region Event Handler
|
||||||
private void Popup_Cancel(object sender, DropDownCancelEventArgs e)
|
private void Popup_Cancel(object sender, DropDownCancelEventArgs e) => OnDropDownCancel(e);
|
||||||
{
|
|
||||||
OnDropDownCancel(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Responds to the <see cref="System.Windows.Forms.Form.Closed"/>
|
/// Responds to the <see cref="System.Windows.Forms.Form.Closed"/>
|
||||||
@@ -55,10 +51,7 @@ namespace AT.STO.UI.Win
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender">Popup form that has been closed.</param>
|
/// <param name="sender">Popup form that has been closed.</param>
|
||||||
/// <param name="e">Not used.</param>
|
/// <param name="e">Not used.</param>
|
||||||
private void Popup_Closed(object sender, EventArgs e)
|
private void Popup_Closed(object sender, EventArgs e) => CloseDropDown();
|
||||||
{
|
|
||||||
CloseDropDown();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Subclasses the owning form's existing Window Procedure to enables the
|
/// Subclasses the owning form's existing Window Procedure to enables the
|
||||||
@@ -76,7 +69,7 @@ namespace AT.STO.UI.Win
|
|||||||
{
|
{
|
||||||
if (((int)m.WParam) == 0) // Check if the title bar will made inactive:
|
if (((int)m.WParam) == 0) // Check if the title bar will made inactive:
|
||||||
{ // Note it's no good to try and consume this message; if you try to do that you'll end up with windows
|
{ // Note it's no good to try and consume this message; if you try to do that you'll end up with windows
|
||||||
UIApiCalls.SendMessage(this.Handle, UIApiCalls.WM_NCACTIVATE, 1, IntPtr.Zero); // If so reactivate it.
|
UIApiCalls.SendMessage(Handle, UIApiCalls.WM_NCACTIVATE, 1, IntPtr.Zero); // If so reactivate it.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (m.Msg == UIApiCalls.WM_ACTIVATEAPP)
|
else if (m.Msg == UIApiCalls.WM_ACTIVATEAPP)
|
||||||
@@ -84,7 +77,7 @@ namespace AT.STO.UI.Win
|
|||||||
if ((int)m.WParam == 0) // Check if the application is being deactivated.
|
if ((int)m.WParam == 0) // Check if the application is being deactivated.
|
||||||
{
|
{
|
||||||
CloseDropDown(); // It is so cancel the popup:
|
CloseDropDown(); // It is so cancel the popup:
|
||||||
UIApiCalls.PostMessage(this.Handle, UIApiCalls.WM_NCACTIVATE, 0, IntPtr.Zero); // And put the title bar into the inactive state:
|
UIApiCalls.PostMessage(Handle, UIApiCalls.WM_NCACTIVATE, 0, IntPtr.Zero); // And put the title bar into the inactive state:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -173,17 +166,14 @@ namespace AT.STO.UI.Win
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicator weither the DropDown is showing.
|
/// Indicator weither the DropDown is showing.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DropDownShowing
|
public bool DropDownShowing => _dropDownShowing;
|
||||||
{
|
|
||||||
get { return _dropDownShowing; }
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Event Implementation
|
#region Event Implementation
|
||||||
protected virtual void OnDropDownCancel(DropDownCancelEventArgs e)
|
protected virtual void OnDropDownCancel(DropDownCancelEventArgs e)
|
||||||
{
|
{
|
||||||
if (this.DropDownCancel != null)
|
if (DropDownCancel != null)
|
||||||
{
|
{
|
||||||
this.DropDownCancel(this, e);
|
DropDownCancel(this, e);
|
||||||
|
|
||||||
if (!e.Cancel)
|
if (!e.Cancel)
|
||||||
{
|
{
|
||||||
@@ -192,13 +182,7 @@ namespace AT.STO.UI.Win
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnPDropDownClosed(DropDownClosedEventArgs e)
|
protected virtual void OnPDropDownClosed(DropDownClosedEventArgs e) => DropDownClosed?.Invoke(this, e);
|
||||||
{
|
|
||||||
if (this.DropDownClosed != null)
|
|
||||||
{
|
|
||||||
this.DropDownClosed(this, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace AT.STO.UI.Win
|
namespace AT.STO.UI.Win
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace AT.STO.UI.Win
|
namespace AT.STO.UI.Win
|
||||||
{
|
{
|
||||||
public interface ILookupItem<T> where T: struct
|
public interface ILookupItem<T> where T: struct
|
||||||
|
|||||||
@@ -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>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
@@ -40,13 +40,14 @@
|
|||||||
<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>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
@@ -56,7 +57,7 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Globalization;
|
|
||||||
//using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
|
||||||
@@ -121,10 +119,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="text">The text.</param>
|
/// <param name="text">The text.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult Show(string text)
|
public static DialogResult Show(string text) => FlexibleMessageBoxForm.Show(null, text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(null, text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -132,10 +127,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="owner">The owner.</param>
|
/// <param name="owner">The owner.</param>
|
||||||
/// <param name="text">The text.</param>
|
/// <param name="text">The text.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult Show(IWin32Window owner, string text)
|
public static DialogResult Show(IWin32Window owner, string text) => FlexibleMessageBoxForm.Show(owner, text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(owner, text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -143,10 +135,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="text">The text.</param>
|
/// <param name="text">The text.</param>
|
||||||
/// <param name="caption">The caption.</param>
|
/// <param name="caption">The caption.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult Show(string text, string caption)
|
public static DialogResult Show(string text, string caption) => FlexibleMessageBoxForm.Show(null, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(null, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -155,10 +144,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="text">The text.</param>
|
/// <param name="text">The text.</param>
|
||||||
/// <param name="caption">The caption.</param>
|
/// <param name="caption">The caption.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult Show(IWin32Window owner, string text, string caption)
|
public static DialogResult Show(IWin32Window owner, string text, string caption) => FlexibleMessageBoxForm.Show(owner, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(owner, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -167,10 +153,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="caption">The caption.</param>
|
/// <param name="caption">The caption.</param>
|
||||||
/// <param name="buttons">The buttons.</param>
|
/// <param name="buttons">The buttons.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons)
|
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons) => FlexibleMessageBoxForm.Show(null, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(null, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -180,10 +163,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="caption">The caption.</param>
|
/// <param name="caption">The caption.</param>
|
||||||
/// <param name="buttons">The buttons.</param>
|
/// <param name="buttons">The buttons.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons)
|
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons) => FlexibleMessageBoxForm.Show(owner, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(owner, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -193,10 +173,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="buttons">The buttons.</param>
|
/// <param name="buttons">The buttons.</param>
|
||||||
/// <param name="icon">The icon.</param>
|
/// <param name="icon">The icon.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
|
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) => FlexibleMessageBoxForm.Show(null, text, caption, buttons, icon, MessageBoxDefaultButton.Button1);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(null, text, caption, buttons, icon, MessageBoxDefaultButton.Button1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -207,10 +184,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="buttons">The buttons.</param>
|
/// <param name="buttons">The buttons.</param>
|
||||||
/// <param name="icon">The icon.</param>
|
/// <param name="icon">The icon.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
|
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) => FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, MessageBoxDefaultButton.Button1);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, MessageBoxDefaultButton.Button1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -221,10 +195,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="icon">The icon.</param>
|
/// <param name="icon">The icon.</param>
|
||||||
/// <param name="defaultButton">The default button.</param>
|
/// <param name="defaultButton">The default button.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
|
public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton) => FlexibleMessageBoxForm.Show(null, text, caption, buttons, icon, defaultButton);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(null, text, caption, buttons, icon, defaultButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -236,10 +207,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="icon">The icon.</param>
|
/// <param name="icon">The icon.</param>
|
||||||
/// <param name="defaultButton">The default button.</param>
|
/// <param name="defaultButton">The default button.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
|
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton) => FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, defaultButton);
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, defaultButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the specified message box.
|
/// Shows the specified message box.
|
||||||
@@ -251,10 +219,8 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="icon">The icon.</param>
|
/// <param name="icon">The icon.</param>
|
||||||
/// <param name="defaultButton">The default button.</param>
|
/// <param name="defaultButton">The default button.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
public static DialogResult ShowCustom(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Keeping owner for legacy reasons")]
|
||||||
{
|
public static DialogResult ShowCustom(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) => FlexibleMessageBoxForm.ShowCustom(null, text, caption, buttons, icon);
|
||||||
return FlexibleMessageBoxForm.ShowCustom(null, text, caption, buttons, icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -341,7 +307,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
this.richTextBoxMessage.TabIndex = 0;
|
this.richTextBoxMessage.TabIndex = 0;
|
||||||
this.richTextBoxMessage.TabStop = false;
|
this.richTextBoxMessage.TabStop = false;
|
||||||
this.richTextBoxMessage.Text = "<Message>";
|
this.richTextBoxMessage.Text = "<Message>";
|
||||||
this.richTextBoxMessage.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.richTextBoxMessage_LinkClicked);
|
this.richTextBoxMessage.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.RichTextBoxMessage_LinkClicked);
|
||||||
//
|
//
|
||||||
// panel1
|
// panel1
|
||||||
//
|
//
|
||||||
@@ -431,8 +397,8 @@ namespace JR.Utils.GUI.Forms
|
|||||||
#region Private constants
|
#region Private constants
|
||||||
|
|
||||||
//These separators are used for the "copy to clipboard" standard operation, triggered by Ctrl + C (behavior and clipboard format is like in a standard MessageBox)
|
//These separators are used for the "copy to clipboard" standard operation, triggered by Ctrl + C (behavior and clipboard format is like in a standard MessageBox)
|
||||||
private static readonly String STANDARD_MESSAGEBOX_SEPARATOR_LINES = "---------------------------\n";
|
private static readonly string STANDARD_MESSAGEBOX_SEPARATOR_LINES = "---------------------------\n";
|
||||||
private static readonly String STANDARD_MESSAGEBOX_SEPARATOR_SPACES = " ";
|
private static readonly string STANDARD_MESSAGEBOX_SEPARATOR_SPACES = " ";
|
||||||
|
|
||||||
//These are the possible buttons (in a standard MessageBox)
|
//These are the possible buttons (in a standard MessageBox)
|
||||||
private enum ButtonID { OK = 0, CANCEL, YES, NO, ABORT, RETRY, IGNORE, OVERWRITE, RENAME };
|
private enum ButtonID { OK = 0, CANCEL, YES, NO, ABORT, RETRY, IGNORE, OVERWRITE, RENAME };
|
||||||
@@ -440,10 +406,10 @@ namespace JR.Utils.GUI.Forms
|
|||||||
//These are the buttons texts for different languages.
|
//These are the buttons texts for different languages.
|
||||||
//If you want to add a new language, add it here and in the GetButtonText-Function
|
//If you want to add a new language, add it here and in the GetButtonText-Function
|
||||||
private enum TwoLetterISOLanguageID { en, de, es, it };
|
private enum TwoLetterISOLanguageID { en, de, es, it };
|
||||||
private static readonly String[] BUTTON_TEXTS_ENGLISH_EN = { "OK", "Cancel", "&Yes", "&No", "&Abort", "&Retry", "&Ignore", "&Overwrite", "&Rename" }; //Note: This is also the fallback language
|
private static readonly string[] BUTTON_TEXTS_ENGLISH_EN = { "OK", "Cancel", "&Yes", "&No", "&Abort", "&Retry", "&Ignore", "&Overwrite", "&Rename" }; //Note: This is also the fallback language
|
||||||
private static readonly String[] BUTTON_TEXTS_GERMAN_DE = { "OK", "Abbrechen", "&Ja", "&Nein", "&Abbrechen", "&Wiederholen", "&Ignorieren", "&Overwrite", "&Rename" };
|
private static readonly string[] BUTTON_TEXTS_GERMAN_DE = { "OK", "Abbrechen", "&Ja", "&Nein", "&Abbrechen", "&Wiederholen", "&Ignorieren", "&Overwrite", "&Rename" };
|
||||||
private static readonly String[] BUTTON_TEXTS_SPANISH_ES = { "Aceptar", "Cancelar", "&Sí", "&No", "&Abortar", "&Reintentar", "&Ignorar", "&Overwrite", "&Rename" };
|
private static readonly string[] BUTTON_TEXTS_SPANISH_ES = { "Aceptar", "Cancelar", "&Sí", "&No", "&Abortar", "&Reintentar", "&Ignorar", "&Overwrite", "&Rename" };
|
||||||
private static readonly String[] BUTTON_TEXTS_ITALIAN_IT = { "OK", "Annulla", "&Sì", "&No", "&Interrompi", "&Riprova", "&Ignora", "&Overwrite", "&Rename" };
|
private static readonly string[] BUTTON_TEXTS_ITALIAN_IT = { "OK", "Annulla", "&Sì", "&No", "&Interrompi", "&Riprova", "&Ignora", "&Overwrite", "&Rename" };
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -451,7 +417,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
|
|
||||||
private MessageBoxDefaultButton defaultButton;
|
private MessageBoxDefaultButton defaultButton;
|
||||||
private int visibleButtonsCount;
|
private int visibleButtonsCount;
|
||||||
private TwoLetterISOLanguageID languageID = TwoLetterISOLanguageID.en;
|
private readonly TwoLetterISOLanguageID languageID = TwoLetterISOLanguageID.en;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -758,9 +724,9 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
|
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
|
||||||
private void FlexibleMessageBoxForm_Shown(object sender, EventArgs e)
|
private void FlexibleMessageBoxForm_Shown(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int buttonIndexToFocus = 1;
|
|
||||||
Button buttonToFocus;
|
Button buttonToFocus;
|
||||||
|
|
||||||
|
int buttonIndexToFocus;
|
||||||
//Set the default button...
|
//Set the default button...
|
||||||
switch (this.defaultButton)
|
switch (this.defaultButton)
|
||||||
{
|
{
|
||||||
@@ -799,7 +765,7 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender">The source of the event.</param>
|
/// <param name="sender">The source of the event.</param>
|
||||||
/// <param name="e">The <see cref="System.Windows.Forms.LinkClickedEventArgs"/> instance containing the event data.</param>
|
/// <param name="e">The <see cref="System.Windows.Forms.LinkClickedEventArgs"/> instance containing the event data.</param>
|
||||||
private void richTextBoxMessage_LinkClicked(object sender, LinkClickedEventArgs e)
|
private void RichTextBoxMessage_LinkClicked(object sender, LinkClickedEventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -877,12 +843,14 @@ namespace JR.Utils.GUI.Forms
|
|||||||
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
|
public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
|
||||||
{
|
{
|
||||||
//Create a new instance of the FlexibleMessageBox form
|
//Create a new instance of the FlexibleMessageBox form
|
||||||
var flexibleMessageBoxForm = new FlexibleMessageBoxForm();
|
var flexibleMessageBoxForm = new FlexibleMessageBoxForm
|
||||||
flexibleMessageBoxForm.ShowInTaskbar = false;
|
{
|
||||||
|
ShowInTaskbar = false,
|
||||||
|
|
||||||
//Bind the caption and the message text
|
//Bind the caption and the message text
|
||||||
flexibleMessageBoxForm.CaptionText = caption;
|
CaptionText = caption,
|
||||||
flexibleMessageBoxForm.MessageText = text;
|
MessageText = text
|
||||||
|
};
|
||||||
flexibleMessageBoxForm.FlexibleMessageBoxFormBindingSource.DataSource = flexibleMessageBoxForm;
|
flexibleMessageBoxForm.FlexibleMessageBoxFormBindingSource.DataSource = flexibleMessageBoxForm;
|
||||||
|
|
||||||
//Set the buttons visibilities and texts. Also set a default button.
|
//Set the buttons visibilities and texts. Also set a default button.
|
||||||
@@ -914,15 +882,18 @@ namespace JR.Utils.GUI.Forms
|
|||||||
/// <param name="icon">The icon.</param>
|
/// <param name="icon">The icon.</param>
|
||||||
/// <param name="defaultButton">The default button.</param>
|
/// <param name="defaultButton">The default button.</param>
|
||||||
/// <returns>The dialog result.</returns>
|
/// <returns>The dialog result.</returns>
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Keeping buttons for legacy reasons")]
|
||||||
public static DialogResult ShowCustom(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
|
public static DialogResult ShowCustom(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
|
||||||
{
|
{
|
||||||
//Create a new instance of the FlexibleMessageBox form
|
//Create a new instance of the FlexibleMessageBox form
|
||||||
var flexibleMessageBoxForm = new FlexibleMessageBoxForm();
|
var flexibleMessageBoxForm = new FlexibleMessageBoxForm
|
||||||
flexibleMessageBoxForm.ShowInTaskbar = false;
|
{
|
||||||
|
ShowInTaskbar = false,
|
||||||
|
|
||||||
//Bind the caption and the message text
|
//Bind the caption and the message text
|
||||||
flexibleMessageBoxForm.CaptionText = caption;
|
CaptionText = caption,
|
||||||
flexibleMessageBoxForm.MessageText = text;
|
MessageText = text
|
||||||
|
};
|
||||||
flexibleMessageBoxForm.FlexibleMessageBoxFormBindingSource.DataSource = flexibleMessageBoxForm;
|
flexibleMessageBoxForm.FlexibleMessageBoxFormBindingSource.DataSource = flexibleMessageBoxForm;
|
||||||
|
|
||||||
//Set the buttons visibilities and texts. Also set a default button.
|
//Set the buttons visibilities and texts. Also set a default button.
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
<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>
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
<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">
|
||||||
@@ -64,6 +66,7 @@
|
|||||||
<Compile Include="frmFormatCopy.Designer.cs">
|
<Compile Include="frmFormatCopy.Designer.cs">
|
||||||
<DependentUpon>frmFormatCopy.cs</DependentUpon>
|
<DependentUpon>frmFormatCopy.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="GlobalSuppressions.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<EmbeddedResource Include="frmFormatCopy.resx">
|
<EmbeddedResource Include="frmFormatCopy.resx">
|
||||||
@@ -177,6 +180,7 @@
|
|||||||
<Content Include="fmtall\CPL_00all.xml" />
|
<Content Include="fmtall\CPL_00all.xml" />
|
||||||
<Content Include="fmtall\CPL_01all.xml" />
|
<Content Include="fmtall\CPL_01all.xml" />
|
||||||
<Content Include="fmtall\CPL_02all.xml" />
|
<Content Include="fmtall\CPL_02all.xml" />
|
||||||
|
<Content Include="fmtall\CPL_04all.xml" />
|
||||||
<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" />
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is used by Code Analysis to maintain SuppressMessage
|
||||||
|
// attributes that are applied to this project.
|
||||||
|
// Project-level suppressions either have no target or are given
|
||||||
|
// a specific target and scoped to a namespace, type, member, etc.
|
||||||
|
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Not modifying Naming Styles")]
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Formats
|
namespace Formats
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
@@ -28,7 +23,7 @@ namespace Formats
|
|||||||
txbxPROMSFormatsPath.Text = savedFormatPath;
|
txbxPROMSFormatsPath.Text = savedFormatPath;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string curFolder = Environment.CurrentDirectory; // C:\development/PROMS/Formats/bin/debug
|
string curFolder = Environment.CurrentDirectory; // .../PROMS/Formats/bin/debug
|
||||||
int idx = curFolder.ToUpper().IndexOf(@"\PROMS\");
|
int idx = curFolder.ToUpper().IndexOf(@"\PROMS\");
|
||||||
txbxPROMSFormatsPath.Text = curFolder.Substring(0, idx);
|
txbxPROMSFormatsPath.Text = curFolder.Substring(0, idx);
|
||||||
}
|
}
|
||||||
@@ -40,8 +35,7 @@ namespace Formats
|
|||||||
DirectoryInfo di = new DirectoryInfo(path);
|
DirectoryInfo di = new DirectoryInfo(path);
|
||||||
if (di.Exists == false) //return;
|
if (di.Exists == false) //return;
|
||||||
{
|
{
|
||||||
DialogResult dlgrslt = DialogResult.No;
|
DialogResult dlgrslt = MessageBox.Show(string.Format("{0} does not exist. Create it?", path), "Create Folder?", MessageBoxButtons.YesNo);
|
||||||
dlgrslt = MessageBox.Show(string.Format("{0} does not exist. Create it?", path), "Create Folder?", MessageBoxButtons.YesNo);
|
|
||||||
if (dlgrslt == DialogResult.Yes)
|
if (dlgrslt == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
di.Create();
|
di.Create();
|
||||||
@@ -86,9 +80,10 @@ namespace Formats
|
|||||||
|
|
||||||
private void btnBrowse_Click(object sender, EventArgs e)
|
private void btnBrowse_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog fbd = new FolderBrowserDialog();
|
FolderBrowserDialog fbd = new FolderBrowserDialog
|
||||||
|
{
|
||||||
fbd.SelectedPath = txbxPROMSFormatsPath.Text;
|
SelectedPath = txbxPROMSFormatsPath.Text
|
||||||
|
};
|
||||||
if (fbd.ShowDialog() == DialogResult.OK)
|
if (fbd.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
if (Directory.Exists(fbd.SelectedPath)) txbxPROMSFormatsPath.Text = fbd.SelectedPath + @"\";
|
if (Directory.Exists(fbd.SelectedPath)) txbxPROMSFormatsPath.Text = fbd.SelectedPath + @"\";
|
||||||
@@ -116,9 +111,9 @@ namespace Formats
|
|||||||
if (!txbxPROMSFormatsPath.Text.EndsWith(@"\")) txbxPROMSFormatsPath.Text += @"\";
|
if (!txbxPROMSFormatsPath.Text.EndsWith(@"\")) txbxPROMSFormatsPath.Text += @"\";
|
||||||
|
|
||||||
// There should be a "fmtall" and "genmacall" folder in the delelopment project folder
|
// There should be a "fmtall" and "genmacall" folder in the delelopment project folder
|
||||||
// ex: C:\development\PROMS\Formats\fmtall and C:\development\PROMS\Formats\genmacall
|
// ex: ...\PROMS\Formats\fmtall and ...\PROMS\Formats\genmacall
|
||||||
string destFmtallPath = txbxPROMSFormatsPath.Text + @"fmtall\";
|
string destFmtallPath = $@"{txbxPROMSFormatsPath.Text}fmtall\";
|
||||||
string destGenmacallPath = txbxPROMSFormatsPath.Text + @"genmacall\";
|
string destGenmacallPath = $@"{txbxPROMSFormatsPath.Text}genmacall\";
|
||||||
string srcFmtallPath = @"..\..\"; // up to levels from startup path
|
string srcFmtallPath = @"..\..\"; // up to levels from startup path
|
||||||
|
|
||||||
// clear the destination fmtall and genmacall folders
|
// clear the destination fmtall and genmacall folders
|
||||||
@@ -156,14 +151,10 @@ namespace Formats
|
|||||||
}
|
}
|
||||||
Properties.Settings.Default.FormatPath = txbxPROMSFormatsPath.Text.Substring(0,txbxPROMSFormatsPath.Text.Length-1); // save the copy format path minus the ending backslash
|
Properties.Settings.Default.FormatPath = txbxPROMSFormatsPath.Text.Substring(0,txbxPROMSFormatsPath.Text.Length-1); // save the copy format path minus the ending backslash
|
||||||
Properties.Settings.Default.Save();
|
Properties.Settings.Default.Save();
|
||||||
//if(MessageBox.Show("Do you want to end the Format Copier?","Formats Copied.", MessageBoxButtons.YesNo, MessageBoxIcon.Question)== DialogResult.Yes)
|
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonX2_Click(object sender, EventArgs e)
|
private void buttonX2_Click(object sender, EventArgs e) => Application.Exit();
|
||||||
{
|
|
||||||
Application.Exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is used by Code Analysis to maintain SuppressMessage
|
||||||
|
// attributes that are applied to this project.
|
||||||
|
// Project-level suppressions either have no target or are given
|
||||||
|
// a specific target and scoped to a namespace, type, member, etc.
|
||||||
|
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Not modifying Naming Styles")]
|
||||||
+250
-820
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
|
using Microsoft.Win32;
|
||||||
|
using Read64bitRegistryFrom32bitApp;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Microsoft.Win32;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Read64bitRegistryFrom32bitApp;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace LBWordLibrary
|
namespace LBWordLibrary
|
||||||
{
|
{
|
||||||
@@ -18,14 +18,8 @@ namespace LBWordLibrary
|
|||||||
/// <param name="Background">boolean BackGround
|
/// <param name="Background">boolean BackGround
|
||||||
/// If true - document will be printed in the background
|
/// If true - document will be printed in the background
|
||||||
/// If false - document will be printed in the foreground</param>
|
/// If false - document will be printed in the foreground</param>
|
||||||
public void PrintOut(Boolean Background)
|
public void PrintOut(bool Background) => InvokeMethod("PrintOut", Background, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
|
||||||
{
|
public void Quit(bool save) => InvokeMethod("Quit", save, Missing.Value, Missing.Value);
|
||||||
InvokeMethod("PrintOut", Background, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
|
|
||||||
}
|
|
||||||
public void Quit(bool save)
|
|
||||||
{
|
|
||||||
InvokeMethod("Quit", save, Missing.Value, Missing.Value);
|
|
||||||
}
|
|
||||||
public bool VolianPDFInstalled
|
public bool VolianPDFInstalled
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -53,19 +47,7 @@ namespace LBWordLibrary
|
|||||||
_WordPDFExporterInstalled = validKey;
|
_WordPDFExporterInstalled = validKey;
|
||||||
if (!validKey)
|
if (!validKey)
|
||||||
_MyLog.WarnFormat("MSWord2007 PDF Export Registry Key Missing");
|
_MyLog.WarnFormat("MSWord2007 PDF Export Registry Key Missing");
|
||||||
//RegistryKey key = Registry.LocalMachine.OpenSubKey(keyPath, RegistryKeyPermissionCheck.ReadSubTree);
|
|
||||||
//if (key == null)
|
|
||||||
//{
|
|
||||||
// RegistryKey localMachine64 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
|
|
||||||
// key = localMachine64.OpenSubKey(keystring, RegistryKeyPermissionCheck.ReadSubTree);
|
|
||||||
//}
|
|
||||||
//if (key != null)
|
|
||||||
//{
|
|
||||||
// key.Close();
|
|
||||||
// _WordPDFExporterInstalled = true;
|
|
||||||
// return (bool) _WordPDFExporterInstalled;
|
|
||||||
//}
|
|
||||||
//_WordPDFExporterInstalled = FindEXP_PDF();
|
|
||||||
return (bool)_WordPDFExporterInstalled;
|
return (bool)_WordPDFExporterInstalled;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -79,35 +61,7 @@ namespace LBWordLibrary
|
|||||||
return (bool)_WordPDFExporterInstalled;
|
return (bool)_WordPDFExporterInstalled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private static bool FindEXP_PDF()
|
|
||||||
{
|
|
||||||
bool retval = false;
|
|
||||||
DateTime dtStart = DateTime.Now;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//string keystr = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\0E5C161912A2A6C4C93C76678926C56C";
|
|
||||||
RegistryKey key = null;
|
|
||||||
string keystr = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components";
|
|
||||||
while (key == null && keystr != "")
|
|
||||||
{
|
|
||||||
key = Registry.LocalMachine.OpenSubKey(keystr, RegistryKeyPermissionCheck.ReadSubTree);
|
|
||||||
keystr = keystr.Substring(0, keystr.LastIndexOf("\\"));
|
|
||||||
}
|
|
||||||
if (FindKeys(key, "EXP_PDF.DLL"))
|
|
||||||
retval = true;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
AddKeyFound(string.Format("{0} - {1}", ex.GetType().Name, ex.Message));
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
DateTime dtEnd = DateTime.Now;
|
|
||||||
TimeSpan ts = TimeSpan.FromTicks(dtEnd.Ticks - dtStart.Ticks);
|
|
||||||
AddKeyFound(string.Format("{0} Seconds", ts.TotalSeconds));
|
|
||||||
}
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
private static bool FindKeys(RegistryKey key, string find)
|
private static bool FindKeys(RegistryKey key, string find)
|
||||||
{
|
{
|
||||||
string[] keyNames = key.GetSubKeyNames();
|
string[] keyNames = key.GetSubKeyNames();
|
||||||
@@ -144,10 +98,7 @@ namespace LBWordLibrary
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
private static void AddKeyFound(string str)
|
private static void AddKeyFound(string str) => _MyLog.WarnFormat("RegistryKeySearch: {0}", str);
|
||||||
{
|
|
||||||
_MyLog.WarnFormat("RegistryKeySearch: {0}",str);
|
|
||||||
}
|
|
||||||
private bool CanCreatePDFFile(string pdfFileName)
|
private bool CanCreatePDFFile(string pdfFileName)
|
||||||
{
|
{
|
||||||
System.IO.FileInfo file = new System.IO.FileInfo(pdfFileName);
|
System.IO.FileInfo file = new System.IO.FileInfo(pdfFileName);
|
||||||
@@ -184,11 +135,9 @@ namespace LBWordLibrary
|
|||||||
if (openPDF) OpenPDF(pdfFileName);
|
if (openPDF) OpenPDF(pdfFileName);
|
||||||
return pdfFileName;
|
return pdfFileName;
|
||||||
}
|
}
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
|
||||||
static List<System.Diagnostics.Process> _AcrobatProcesses = new List<System.Diagnostics.Process>();
|
static List<System.Diagnostics.Process> _AcrobatProcesses = new List<System.Diagnostics.Process>();
|
||||||
private static void OpenPDF(string pdfFileName)
|
private static void OpenPDF(string pdfFileName) => _AcrobatProcesses.Add(System.Diagnostics.Process.Start(pdfFileName));
|
||||||
{
|
|
||||||
_AcrobatProcesses.Add(System.Diagnostics.Process.Start(pdfFileName));
|
|
||||||
}
|
|
||||||
public static void ClosePDFs()
|
public static void ClosePDFs()
|
||||||
{
|
{
|
||||||
foreach (System.Diagnostics.Process proc in _AcrobatProcesses)
|
foreach (System.Diagnostics.Process proc in _AcrobatProcesses)
|
||||||
@@ -223,12 +172,7 @@ namespace LBWordLibrary
|
|||||||
_MyLog.WarnFormat("Using VolianPDFWriter - MSWord Version = '{0}'", Version);
|
_MyLog.WarnFormat("Using VolianPDFWriter - MSWord Version = '{0}'", Version);
|
||||||
return CreatePDF2003BG(pdfFileName);
|
return CreatePDF2003BG(pdfFileName);
|
||||||
}
|
}
|
||||||
//else // Force PDF Export
|
|
||||||
//{
|
|
||||||
// _MyLog.WarnFormat("Force PDF Export for Michelle - MSWord Version = '{0}'", Version);
|
|
||||||
// return CreatePDF2007(pdfFileName, DebugStatus);
|
|
||||||
throw new Exception("No PDF Writer support installed for MS Word sections");
|
throw new Exception("No PDF Writer support installed for MS Word sections");
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
public string CreatePDF2003FG(string pdfFileName, bool openPDF)
|
public string CreatePDF2003FG(string pdfFileName, bool openPDF)
|
||||||
{
|
{
|
||||||
@@ -302,9 +246,6 @@ namespace LBWordLibrary
|
|||||||
public string CreatePDF2007(string pdfFileName, int DebugStatus)
|
public string CreatePDF2007(string pdfFileName, int DebugStatus)
|
||||||
{
|
{
|
||||||
pdfFileName = AvailableFileName(pdfFileName);
|
pdfFileName = AvailableFileName(pdfFileName);
|
||||||
// Removed to support MSWord 2010 and beyond.
|
|
||||||
//if (!WordPDFExporterInstalled)
|
|
||||||
// throw new Exception("MS Word PDF Exporter is not installed");
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ActiveDocument.ExportAsFixedFormat(pdfFileName, LBWdExportFormat.wdExportFormatPDF, DebugStatus);
|
ActiveDocument.ExportAsFixedFormat(pdfFileName, LBWdExportFormat.wdExportFormatPDF, DebugStatus);
|
||||||
@@ -318,14 +259,8 @@ namespace LBWordLibrary
|
|||||||
}
|
}
|
||||||
public partial class LBDocuments
|
public partial class LBDocuments
|
||||||
{
|
{
|
||||||
public LBDocumentClass Open(string fileName, Boolean addToRecentFiles)
|
public LBDocumentClass Open(string fileName, bool addToRecentFiles) => Open(fileName, Missing.Value, Missing.Value, addToRecentFiles);
|
||||||
{
|
private LBDocumentClass Open(params object[] myParams) => new LBDocumentClass(InvokeMethod("Open", myParams));
|
||||||
return Open(fileName, Missing.Value, Missing.Value, addToRecentFiles);
|
|
||||||
}
|
|
||||||
private LBDocumentClass Open(params object[] myParams)
|
|
||||||
{
|
|
||||||
return new LBDocumentClass(InvokeMethod("Open", myParams));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class LBDocumentClass : LBComObject
|
public partial class LBDocumentClass : LBComObject
|
||||||
{
|
{
|
||||||
@@ -345,10 +280,7 @@ namespace LBWordLibrary
|
|||||||
else
|
else
|
||||||
SaveAs2000(fileName);
|
SaveAs2000(fileName);
|
||||||
}
|
}
|
||||||
public void SaveAs2000(params object[] myParams)
|
public void SaveAs2000(params object[] myParams) => InvokeMethod("SaveAs2000", myParams);
|
||||||
{
|
|
||||||
InvokeMethod("SaveAs2000", myParams);
|
|
||||||
}
|
|
||||||
public void SaveAs(string fileName)
|
public void SaveAs(string fileName)
|
||||||
{
|
{
|
||||||
if (fileName.ToUpper().EndsWith("DOC"))
|
if (fileName.ToUpper().EndsWith("DOC"))
|
||||||
@@ -362,18 +294,9 @@ namespace LBWordLibrary
|
|||||||
else
|
else
|
||||||
SaveAs2(fileName, Missing.Value, Missing.Value, Missing.Value, false);
|
SaveAs2(fileName, Missing.Value, Missing.Value, Missing.Value, false);
|
||||||
}
|
}
|
||||||
public void SaveAs2(params object[] myParams)
|
public void SaveAs2(params object[] myParams) => InvokeMethod("SaveAs", myParams);
|
||||||
{
|
public void SaveAs(string fileName, LBWdSaveFormat format) => SaveAs2(fileName, format, Missing.Value, Missing.Value, false);
|
||||||
InvokeMethod("SaveAs", myParams);
|
public LBRange Range(int Start, int End) => new LBRange(InvokeMethod("Range", Start, End));
|
||||||
}
|
|
||||||
public void SaveAs(string fileName, LBWdSaveFormat format)
|
|
||||||
{
|
|
||||||
SaveAs2(fileName, format, Missing.Value, Missing.Value, false);
|
|
||||||
}
|
|
||||||
public LBRange Range(int Start, int End)
|
|
||||||
{
|
|
||||||
return new LBRange(InvokeMethod("Range", Start, End));
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Length is Pages and Partial Pages
|
/// Length is Pages and Partial Pages
|
||||||
/// The integral part is the number of full pages
|
/// The integral part is the number of full pages
|
||||||
@@ -393,11 +316,6 @@ namespace LBWordLibrary
|
|||||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToAbsolute, 0);
|
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToAbsolute, 0);
|
||||||
float mytop = myRange.PageSetup.TopMargin;
|
float mytop = myRange.PageSetup.TopMargin;
|
||||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
||||||
//float partial = (float) myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToTextBoundary);
|
|
||||||
// B2018-028 Word 2016 has a different value for the Vertical Position Relative to the Text Boundary than older version of Word.
|
|
||||||
// We now need to calculated the last row of text in the PROMS attachment differently.
|
|
||||||
// We now subtract the TopMargin the Page Setup from the Vertical Position Relative to the Page
|
|
||||||
// this works with older versions of MS Word as well.
|
|
||||||
float partial = (float)myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToPage) - mytop;
|
float partial = (float)myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToPage) - mytop;
|
||||||
partial += myRange.Font.Size;
|
partial += myRange.Font.Size;
|
||||||
retval += partial / 7200;
|
retval += partial / 7200;
|
||||||
@@ -414,7 +332,7 @@ namespace LBWordLibrary
|
|||||||
return ReplaceSymbolCharacters(GetRangeText(myRange));
|
return ReplaceSymbolCharacters(GetRangeText(myRange));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private static string[] SymbolFontName = { "VolianDraw", "WingDings", "VESymb", "VESymbFix", "Symbol" };
|
private static readonly string[] SymbolFontName = { "VolianDraw", "WingDings", "VESymb", "VESymbFix", "Symbol" };
|
||||||
private static bool IsSymbolFont(string fontName)
|
private static bool IsSymbolFont(string fontName)
|
||||||
{
|
{
|
||||||
foreach (string symbolFont in SymbolFontName)
|
foreach (string symbolFont in SymbolFontName)
|
||||||
@@ -422,150 +340,6 @@ namespace LBWordLibrary
|
|||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// If document contains symbol characters, returns problem font.
|
|
||||||
/// </summary>
|
|
||||||
public string FontHasSymbolCharacters
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
LBRange myRange = Range();
|
|
||||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
|
||||||
myRange.Start = 0;
|
|
||||||
int end = myRange.End;
|
|
||||||
string myText = GetRangeText(myRange);
|
|
||||||
//return _RegFindSymbol.IsMatch(myText);
|
|
||||||
MatchCollection problems = _RegFindSymbol.Matches(myText);
|
|
||||||
int offset = 0;
|
|
||||||
List<string> alreadyProcessed = new List<string>();
|
|
||||||
List<string> fontHasSymbols = new List<string>();
|
|
||||||
foreach (Match problem in problems)
|
|
||||||
{
|
|
||||||
if (!alreadyProcessed.Contains(problem.Value))
|
|
||||||
{
|
|
||||||
myRange.Start = problem.Index + offset;
|
|
||||||
myRange.End = problem.Index + problem.Length + offset;
|
|
||||||
int newOffset = FindRangeOffset(myRange, problem, offset, end);
|
|
||||||
string fontName = myRange.Font.Name;
|
|
||||||
if (IsSymbolFont(fontName))
|
|
||||||
{
|
|
||||||
if( !fontHasSymbols.Contains(fontName))
|
|
||||||
{
|
|
||||||
fontHasSymbols.Add(fontName);
|
|
||||||
// Found symbol font
|
|
||||||
_MyLog.InfoFormat("Font '{0}' has Symbols", fontName);
|
|
||||||
}
|
|
||||||
//Console.WriteLine("Font '{0}' has Symbols", myRange.Font.Name);
|
|
||||||
//return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return myRange.Font.Name;
|
|
||||||
offset = newOffset;
|
|
||||||
alreadyProcessed.Add(problem.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// Debug Tool - Return a string containing a list of the fonts that have symbol characters.
|
|
||||||
/// </summary>
|
|
||||||
public string FontsHaveSymbolCharacters
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
string sep = "";
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
List<string> fonts=new List<string>();
|
|
||||||
LBRange myRange = Range();
|
|
||||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
|
||||||
myRange.Start = 0;
|
|
||||||
int end = myRange.End;
|
|
||||||
string myText = GetRangeText(myRange);
|
|
||||||
//return _RegFindSymbol.IsMatch(myText);
|
|
||||||
MatchCollection problems = _RegFindSymbol.Matches(myText);
|
|
||||||
int offset = 0;
|
|
||||||
foreach (Match problem in problems)
|
|
||||||
{
|
|
||||||
myRange.Start = problem.Index + offset;
|
|
||||||
myRange.End = problem.Index + problem.Length + offset;
|
|
||||||
int newOffset = FindRangeOffset(myRange, problem, offset, end);
|
|
||||||
if (!fonts.Contains(myRange.Font.Name))
|
|
||||||
{
|
|
||||||
fonts.Add(myRange.Font.Name);
|
|
||||||
sb.Append(sep + "'" + myRange.Font.Name + "'");
|
|
||||||
sep = ",";
|
|
||||||
}
|
|
||||||
offset = newOffset;
|
|
||||||
}
|
|
||||||
if (sb.Length > 0) return sb.ToString();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// Debug Tool - Return a list of symbol characters using VESYMB font.
|
|
||||||
/// </summary>
|
|
||||||
public string FontsHaveSymbolCharacters2
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Dictionary<string, List<int>> fonts = new Dictionary<string, List<int>>();
|
|
||||||
LBRange myRange = Range();
|
|
||||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
|
||||||
myRange.Start = 0;
|
|
||||||
int end = myRange.End;
|
|
||||||
string myText = GetRangeText(myRange);
|
|
||||||
//return _RegFindSymbol.IsMatch(myText);
|
|
||||||
MatchCollection problems = _RegFindSymbol.Matches(myText);
|
|
||||||
int offset = 0;
|
|
||||||
foreach (Match problem in problems)
|
|
||||||
{
|
|
||||||
myRange.Start = problem.Index + offset;
|
|
||||||
myRange.End = problem.Index + problem.Length + offset;
|
|
||||||
int newOffset = FindRangeOffset(myRange, problem, offset, end);
|
|
||||||
string sFont = myRange.Font.Name;
|
|
||||||
if (sFont.ToUpper().StartsWith("VESYM"))
|
|
||||||
{
|
|
||||||
if (!fonts.ContainsKey(sFont))
|
|
||||||
{
|
|
||||||
fonts.Add(sFont, new List<int>());
|
|
||||||
}
|
|
||||||
List<int> symbols = fonts[sFont];
|
|
||||||
string myTextSymb = GetRangeText(myRange);
|
|
||||||
foreach (char c in myTextSymb)
|
|
||||||
{
|
|
||||||
if (!symbols.Contains((int)c))
|
|
||||||
symbols.Add((int)c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
offset = newOffset;
|
|
||||||
}
|
|
||||||
if (fonts.Count > 0)
|
|
||||||
{
|
|
||||||
string sep = "";
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
foreach (string font in fonts.Keys)
|
|
||||||
{
|
|
||||||
sb.Append(sep + "'" + font + "'");
|
|
||||||
sep = ",";
|
|
||||||
foreach (int i in fonts[font])
|
|
||||||
{
|
|
||||||
sb.Append(sep);
|
|
||||||
sb.Append(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sb.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine("{0},{1},{2}", ex.GetType().Name, ex.Message, ex.StackTrace);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks to see if the document contains symbol characters
|
/// Checks to see if the document contains symbol characters
|
||||||
@@ -580,7 +354,6 @@ namespace LBWordLibrary
|
|||||||
myRange.Start = 0;
|
myRange.Start = 0;
|
||||||
int end = myRange.End;
|
int end = myRange.End;
|
||||||
string myText = GetRangeText(myRange);
|
string myText = GetRangeText(myRange);
|
||||||
//return _RegFindSymbol.IsMatch(myText);
|
|
||||||
MatchCollection problems = _RegFindSymbol.Matches(myText);
|
MatchCollection problems = _RegFindSymbol.Matches(myText);
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
foreach (Match problem in problems)
|
foreach (Match problem in problems)
|
||||||
@@ -591,7 +364,6 @@ namespace LBWordLibrary
|
|||||||
if (IsSymbolFont(myRange.Font.Name))
|
if (IsSymbolFont(myRange.Font.Name))
|
||||||
{
|
{
|
||||||
Console.WriteLine("Font '{0}' has Symbols", myRange.Font.Name);
|
Console.WriteLine("Font '{0}' has Symbols", myRange.Font.Name);
|
||||||
//return true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
@@ -600,87 +372,8 @@ namespace LBWordLibrary
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Regex _RegFindSymbol = new Regex("[\\uF020-\\uF07F]+");
|
readonly Regex _RegFindSymbol = new Regex("[\\uF020-\\uF07F]+");
|
||||||
/// <summary>
|
|
||||||
/// FixSymbolCharacters - Fix any symbol characters in the document
|
|
||||||
/// </summary>
|
|
||||||
public void FixSymbolCharacters()
|
|
||||||
{
|
|
||||||
// Set up range object to be used to process text
|
|
||||||
LBRange myRange = Range();
|
|
||||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
|
||||||
int end = myRange.End;
|
|
||||||
myRange.Start = 0;
|
|
||||||
string myText = GetRangeText(myRange);
|
|
||||||
MatchCollection problems = _RegFindSymbol.Matches(myText);
|
|
||||||
int offset = 0;
|
|
||||||
foreach (Match problem in problems)
|
|
||||||
{
|
|
||||||
myRange.Start = problem.Index + offset;
|
|
||||||
myRange.End = problem.Index + problem.Length + offset;
|
|
||||||
int newOffset = FindRangeOffset(myRange, problem, offset, end);
|
|
||||||
if (myRange.Font.Name == "")
|
|
||||||
{
|
|
||||||
int wrdStart = myRange.Start;
|
|
||||||
int wrdEnd = myRange.End;
|
|
||||||
int wrdMiddle = wrdStart;
|
|
||||||
while (myRange.Font.Name == "")
|
|
||||||
{
|
|
||||||
do
|
|
||||||
{
|
|
||||||
myRange.End = ++wrdMiddle;
|
|
||||||
} while(myRange.Font.Name != "");
|
|
||||||
myRange.End = wrdMiddle - 1;
|
|
||||||
ReplaceSymbolCharacters(myRange);
|
|
||||||
myRange.Start = wrdMiddle -1;
|
|
||||||
myRange.End = wrdEnd;
|
|
||||||
}
|
|
||||||
ReplaceSymbolCharacters(myRange);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ReplaceSymbolCharacters(myRange);
|
|
||||||
}
|
|
||||||
offset = newOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// Try to fix the first character in the symbol range F000 to F0FF. If it cannot be
|
|
||||||
/// fixed, it is an indicator that the font is not installed properly. Regardless of
|
|
||||||
/// whether there is success, the change is undone so that the document will not be
|
|
||||||
/// considered dirty, i.e. will not prompt user for save.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool AttemptToFixASymbolCharacter()
|
|
||||||
{
|
|
||||||
// Set up range object to be used to process text
|
|
||||||
LBRange myRange = Range();
|
|
||||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
|
||||||
|
|
||||||
int end = myRange.End;
|
|
||||||
myRange.Start = 0;
|
|
||||||
string myText = GetRangeText(myRange);
|
|
||||||
MatchCollection problems = _RegFindSymbol.Matches(myText);
|
|
||||||
if (problems.Count>0)
|
|
||||||
{
|
|
||||||
Match problem = problems[0];
|
|
||||||
myRange.Start = problem.Index;
|
|
||||||
myRange.End = myRange.Start + 1;
|
|
||||||
if (IsSymbolFont(myRange.Font.Name)) return true; // if it's a symbol font already, no issue.
|
|
||||||
string before = GetRangeText(myRange);
|
|
||||||
string updated = ReplaceSymbolCharacters(before);
|
|
||||||
myRange.Text = updated;
|
|
||||||
string after = GetRangeText(myRange);
|
|
||||||
Undo(1);
|
|
||||||
//Console.WriteLine("Undo1 results = {0}", tst);
|
|
||||||
//tst = Undo(1);
|
|
||||||
//Console.WriteLine("Undo2 results = {0}", tst);
|
|
||||||
//tst = Undo(1);
|
|
||||||
//Console.WriteLine("Undo3 results = {0}", tst);
|
|
||||||
return (updated == after);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the Range Text with error handling. myRange.Text sometimes will get a null reference exception.
|
/// Get the Range Text with error handling. myRange.Text sometimes will get a null reference exception.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -737,35 +430,6 @@ namespace LBWordLibrary
|
|||||||
return myRange.Start - problem.Index;
|
return myRange.Start - problem.Index;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ReplaceSymbolCharacters Replaces any symbol characters in the specified range
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="myRange"></param>
|
|
||||||
private static void ReplaceSymbolCharacters(LBRange myRange)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (IsSymbolFont(myRange.Font.Name))
|
|
||||||
return;
|
|
||||||
string before = GetRangeText(myRange);
|
|
||||||
string updated = ReplaceSymbolCharacters(before);
|
|
||||||
myRange.Text = updated;
|
|
||||||
string after = GetRangeText(myRange);
|
|
||||||
if (after != updated) // If the Word text doesn't match try including a character before and after and do it again.
|
|
||||||
{
|
|
||||||
Console.WriteLine("'TryEntireRange Failed',{0},{1},'{2}','{3}','{4}'", myRange.Start, myRange.End, before, updated, after);
|
|
||||||
int end = myRange.End;
|
|
||||||
myRange.Start = myRange.Start - 1;
|
|
||||||
myRange.End = end + 1;
|
|
||||||
myRange.Text = ReplaceSymbolCharacters(GetRangeText(myRange));
|
|
||||||
Console.WriteLine("'TryEntireRange Failed',{0},{1},'{2}'", myRange.Start, myRange.End, GetRangeText(myRange));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine("'TryEntireRange Exception',{0},{1},'{2}'", myRange.Start, myRange.End, ex.Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// ReplaceSymbolCharacters processes the string returned and changes any symbols (0xF0??) to normal characters
|
/// ReplaceSymbolCharacters processes the string returned and changes any symbols (0xF0??) to normal characters
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="str"></param>
|
/// <param name="str"></param>
|
||||||
@@ -786,10 +450,7 @@ namespace LBWordLibrary
|
|||||||
/// Close the document
|
/// Close the document
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="SaveChanges">Save Changes</param>
|
/// <param name="SaveChanges">Save Changes</param>
|
||||||
public void Close(bool SaveChanges)
|
public void Close(bool SaveChanges) => InvokeMethod("Close", SaveChanges, Missing.Value, Missing.Value);
|
||||||
{
|
|
||||||
InvokeMethod("Close", SaveChanges, Missing.Value, Missing.Value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class LBFind
|
public partial class LBFind
|
||||||
{
|
{
|
||||||
@@ -810,33 +471,15 @@ namespace LBWordLibrary
|
|||||||
}
|
}
|
||||||
public partial class LBRange : LBComObject
|
public partial class LBRange : LBComObject
|
||||||
{
|
{
|
||||||
public Object get_Information(LBWdInformation info)
|
public object get_Information(LBWdInformation info) => GetProperty("Information", info);
|
||||||
{
|
public LBRange GoTo(LBWdGoToItem What, LBWdGoToDirection Which, int Count) => new LBRange(InvokeMethod("GoTo", What, Which, Count, Missing.Value));
|
||||||
return GetProperty("Information", info);
|
|
||||||
}
|
|
||||||
public LBRange GoTo(LBWdGoToItem What, LBWdGoToDirection Which, int Count)
|
|
||||||
{
|
|
||||||
return new LBRange(InvokeMethod("GoTo", What, Which, Count, Missing.Value));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class LBSelection : LBComObject
|
public partial class LBSelection : LBComObject
|
||||||
{
|
{
|
||||||
public Object get_Information(LBWdInformation info)
|
public object get_Information(LBWdInformation info) => GetProperty("Information", info);
|
||||||
{
|
public int MoveStart(LBWdUnits Unit, int Count) => InvokeMethod("MoveStart", Unit, Count) as int? ?? 0;
|
||||||
return GetProperty("Information", info);
|
public int MoveEnd(LBWdUnits Unit, int Count) => InvokeMethod("MoveEnd", Unit, Count) as int? ?? 0;
|
||||||
}
|
public int EndKey(LBWdUnits Unit, bool Extend) => InvokeMethod("EndKey", Unit, Extend) as int? ?? 0;
|
||||||
public int MoveStart(LBWdUnits Unit, int Count)
|
|
||||||
{
|
|
||||||
return InvokeMethod("MoveStart", Unit, Count) as int? ?? 0;
|
|
||||||
}
|
|
||||||
public int MoveEnd(LBWdUnits Unit, int Count)
|
|
||||||
{
|
|
||||||
return InvokeMethod("MoveEnd", Unit, Count) as int? ?? 0;
|
|
||||||
}
|
|
||||||
public int EndKey(LBWdUnits Unit, bool Extend)
|
|
||||||
{
|
|
||||||
return InvokeMethod("EndKey", Unit, Extend) as int? ?? 0;
|
|
||||||
}
|
|
||||||
public bool LastWasUpper
|
public bool LastWasUpper
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -850,7 +493,7 @@ namespace LBWordLibrary
|
|||||||
string previous = LBDocumentClass.GetRangeText(myRange);
|
string previous = LBDocumentClass.GetRangeText(myRange);
|
||||||
if (Regex.IsMatch(previous, "[A-Z]")) return true;
|
if (Regex.IsMatch(previous, "[A-Z]")) return true;
|
||||||
if (Regex.IsMatch(previous, "[a-z]")) return false;
|
if (Regex.IsMatch(previous, "[a-z]")) return false;
|
||||||
start = start - 1;
|
start--;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -858,21 +501,12 @@ namespace LBWordLibrary
|
|||||||
}
|
}
|
||||||
public partial class LBInlineShapes : LBComObjectList<LBInlineShapes, LBInlineShape> /* Collection */
|
public partial class LBInlineShapes : LBComObjectList<LBInlineShapes, LBInlineShape> /* Collection */
|
||||||
{
|
{
|
||||||
public LBInlineShape AddPicture(string FileName, LBRange Range)
|
public LBInlineShape AddPicture(string FileName, LBRange Range) => new LBInlineShape(InvokeMethod("AddPicture", FileName, false, true, Range));
|
||||||
{
|
|
||||||
return new LBInlineShape(InvokeMethod("AddPicture", FileName, false, true, Range));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class LBShapes : LBComObjectList<LBShapes, LBShape> /* Collection */
|
public partial class LBShapes : LBComObjectList<LBShapes, LBShape> /* Collection */
|
||||||
{
|
{
|
||||||
public LBShape AddPicture(string FileName, float Left, float Top, LBRange Anchor)
|
public LBShape AddPicture(string FileName, float Left, float Top, LBRange Anchor) => new LBShape(InvokeMethod("AddPicture", FileName, false, true, Left, Top, Missing.Value, Missing.Value, Anchor));
|
||||||
{
|
public LBShape AddPicture(string FileName, float Left, float Top) => new LBShape(InvokeMethod("AddPicture", FileName, false, true, Left, Top, Missing.Value, Missing.Value, Missing.Value));
|
||||||
return new LBShape(InvokeMethod("AddPicture", FileName, false, true, Left, Top, Missing.Value, Missing.Value, Anchor));
|
|
||||||
}
|
|
||||||
public LBShape AddPicture(string FileName, float Left, float Top)
|
|
||||||
{
|
|
||||||
return new LBShape(InvokeMethod("AddPicture", FileName, false, true, Left, Top, Missing.Value, Missing.Value, Missing.Value));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public enum LBMsoTriState
|
public enum LBMsoTriState
|
||||||
{
|
{
|
||||||
@@ -882,25 +516,4 @@ namespace LBWordLibrary
|
|||||||
msoTriStateToggle = -3,
|
msoTriStateToggle = -3,
|
||||||
msoTrue = -1
|
msoTrue = -1
|
||||||
}
|
}
|
||||||
//public partial class ProcessKiller
|
|
||||||
//{
|
|
||||||
// System.Diagnostics.Process _MyProcess;
|
|
||||||
// private bool _Exited = false;
|
|
||||||
// public ProcessKiller(System.Diagnostics.Process myProcess)
|
|
||||||
// {
|
|
||||||
// _MyProcess = myProcess;
|
|
||||||
// _MyProcess.Exited += new EventHandler(_MyProcess_Exited);
|
|
||||||
// _MyProcess.Kill();
|
|
||||||
// DateTime next = DateTime.Now.AddMilliseconds(200);
|
|
||||||
// while (DateTime.Now < next)
|
|
||||||
// Application.DoEvents();
|
|
||||||
// while (!_Exited)
|
|
||||||
// Application.DoEvents();
|
|
||||||
// }
|
|
||||||
// void _MyProcess_Exited(object sender, EventArgs e)
|
|
||||||
// {
|
|
||||||
// Console.WriteLine("Exited");
|
|
||||||
// _Exited = true;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
@@ -45,13 +45,14 @@
|
|||||||
<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>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
@@ -78,6 +79,7 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="GlobalSuppressions.cs" />
|
||||||
<Compile Include="LBComObject.cs" />
|
<Compile Include="LBComObject.cs" />
|
||||||
<Compile Include="LBObjectExtension.cs" />
|
<Compile Include="LBObjectExtension.cs" />
|
||||||
<Compile Include="OutlookLBComObject.cs" />
|
<Compile Include="OutlookLBComObject.cs" />
|
||||||
|
|||||||
@@ -1,28 +1,22 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace LBOutlookLibrary
|
namespace LBOutlookLibrary
|
||||||
{
|
{
|
||||||
public abstract partial class LBComObject
|
public abstract partial class LBComObject
|
||||||
{
|
{
|
||||||
private Object _Item;
|
private object _Item;
|
||||||
internal Object Item
|
internal object Item
|
||||||
{
|
{
|
||||||
get { return _Item; }
|
get { return _Item; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_Item = value;
|
_Item = value;
|
||||||
if (value != null) _MyType = _Item.GetType();
|
if (value != null) MyType = _Item.GetType();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private Type _MyType;
|
|
||||||
public Type MyType
|
public Type MyType { get; set; }
|
||||||
{
|
|
||||||
get { return _MyType; }
|
|
||||||
set { _MyType = value; }
|
|
||||||
}
|
|
||||||
protected LBComObject() { }
|
protected LBComObject() { }
|
||||||
protected LBComObject(string ProgID)
|
protected LBComObject(string ProgID)
|
||||||
{
|
{
|
||||||
@@ -30,35 +24,22 @@ namespace LBOutlookLibrary
|
|||||||
objClassType = Type.GetTypeFromProgID(ProgID);
|
objClassType = Type.GetTypeFromProgID(ProgID);
|
||||||
Item = Activator.CreateInstance(objClassType);
|
Item = Activator.CreateInstance(objClassType);
|
||||||
}
|
}
|
||||||
protected LBComObject(Object item)
|
protected LBComObject(object item) => Item = item;
|
||||||
{
|
private object DoInvokeMember(string name, object[] parameters, BindingFlags bf, Binder b)
|
||||||
Item = item;
|
|
||||||
}
|
|
||||||
private Object DoInvokeMember(string name, Object[] parameters, BindingFlags bf, Binder b)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return _MyType.InvokeMember(name, bf, b, _Item, parameters);
|
return MyType.InvokeMember(name, bf, b, _Item, parameters);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw new Exception(string.Format("LBComObject.DoInvokeMember {0}.{1}", _MyType.Name, name), ex);
|
throw new Exception(string.Format("LBComObject.DoInvokeMember {0}.{1}", MyType.Name, name), ex);
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
protected void SetProperty(string propertyName, params Object[] parameters)
|
protected void SetProperty(string propertyName, params object[] parameters) => DoInvokeMember(propertyName, parameters, BindingFlags.SetProperty, null);
|
||||||
{
|
protected object GetProperty(string propertyName) => DoInvokeMember(propertyName, null, BindingFlags.GetProperty, null);
|
||||||
DoInvokeMember(propertyName, parameters, BindingFlags.SetProperty, null);
|
protected object GetProperty(string propertyName, params object[] parameters) => DoInvokeMember(propertyName, parameters, BindingFlags.GetProperty, null);
|
||||||
}
|
protected object InvokeMethod(string methodName, params object[] parameters)
|
||||||
protected Object GetProperty(string propertyName)
|
|
||||||
{
|
|
||||||
return DoInvokeMember(propertyName, null, BindingFlags.GetProperty, null);
|
|
||||||
}
|
|
||||||
protected Object GetProperty(string propertyName, params Object[] parameters)
|
|
||||||
{
|
|
||||||
return DoInvokeMember(propertyName, parameters, BindingFlags.GetProperty, null);
|
|
||||||
}
|
|
||||||
protected Object InvokeMethod(string methodName, params Object[] parameters)
|
|
||||||
{
|
{
|
||||||
if (parameters != null)
|
if (parameters != null)
|
||||||
FixParameters(parameters);
|
FixParameters(parameters);
|
||||||
@@ -71,44 +52,14 @@ namespace LBOutlookLibrary
|
|||||||
if (parameters[i] is LBComObject)
|
if (parameters[i] is LBComObject)
|
||||||
parameters[i] = (parameters[i] as LBComObject).Item;
|
parameters[i] = (parameters[i] as LBComObject).Item;
|
||||||
}
|
}
|
||||||
protected Object InvokeMethod(string methodName)
|
protected object InvokeMethod(string methodName) => InvokeMethod(methodName, null);
|
||||||
{
|
|
||||||
return InvokeMethod(methodName, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public class LBComObjectList<TList, TItem> : LBComObject
|
|
||||||
where TList : LBComObjectList<TList, TItem>
|
|
||||||
where TItem : LBComObject, new()
|
|
||||||
{
|
|
||||||
//public new(Object item):base(item){}
|
|
||||||
public TItem Add()
|
|
||||||
{
|
|
||||||
TItem tmp = new TItem();
|
|
||||||
tmp.Item = InvokeMethod("Add");
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
//public TItem this[int item]
|
|
||||||
//{
|
|
||||||
// get
|
|
||||||
// {
|
|
||||||
// TItem tmp = new TItem();
|
|
||||||
// tmp.Item = GetProperty("Item", item);
|
|
||||||
// return tmp;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
public partial class LBApplicationClass : LBComObject
|
public partial class LBApplicationClass : LBComObject
|
||||||
{
|
{
|
||||||
public LBApplicationClass() : base("Outlook.Application") { }
|
public LBApplicationClass() : base("Outlook.Application") { }
|
||||||
public LBApplicationClass(Object item) : base(item) { }
|
public LBApplicationClass(object item) : base(item) { }
|
||||||
public System.Object CreateItem(LBOlItemType ItemType)
|
public object CreateItem(LBOlItemType ItemType) => InvokeMethod("CreateItem", ItemType);
|
||||||
{
|
public void Quit() => InvokeMethod("Quit");
|
||||||
return InvokeMethod("CreateItem", ItemType);
|
|
||||||
}
|
|
||||||
public void Quit()
|
|
||||||
{
|
|
||||||
InvokeMethod("Quit");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public enum LBOlItemType
|
public enum LBOlItemType
|
||||||
{
|
{
|
||||||
@@ -124,13 +75,13 @@ namespace LBOutlookLibrary
|
|||||||
public partial class LBMailItem : LBComObject
|
public partial class LBMailItem : LBComObject
|
||||||
{
|
{
|
||||||
public LBMailItem() { }
|
public LBMailItem() { }
|
||||||
public LBMailItem(Object item) : base(item) { }
|
public LBMailItem(object item) : base(item) { }
|
||||||
}
|
}
|
||||||
public partial class LBMailItemClass : LBComObject
|
public partial class LBMailItemClass : LBComObject
|
||||||
{
|
{
|
||||||
public LBMailItemClass() { }
|
public LBMailItemClass() { }
|
||||||
public LBMailItemClass(Object item) : base(item) { }
|
public LBMailItemClass(object item) : base(item) { }
|
||||||
public String Body
|
public string Body
|
||||||
{
|
{
|
||||||
get { return (GetProperty("Body").ToString()); }
|
get { return (GetProperty("Body").ToString()); }
|
||||||
set { SetProperty("Body", value); }
|
set { SetProperty("Body", value); }
|
||||||
@@ -140,28 +91,19 @@ namespace LBOutlookLibrary
|
|||||||
get { return (LBOlBodyFormat)GetProperty("BodyFormat"); }
|
get { return (LBOlBodyFormat)GetProperty("BodyFormat"); }
|
||||||
set { SetProperty("BodyFormat", value); }
|
set { SetProperty("BodyFormat", value); }
|
||||||
}
|
}
|
||||||
public LBAttachments Attachments
|
public LBAttachments Attachments => new LBAttachments(GetProperty("Attachments"));
|
||||||
{
|
public string Subject
|
||||||
get { return new LBAttachments(GetProperty("Attachments")); }
|
|
||||||
}
|
|
||||||
public String Subject
|
|
||||||
{
|
{
|
||||||
get { return (GetProperty("Subject").ToString()); }
|
get { return (GetProperty("Subject").ToString()); }
|
||||||
set { SetProperty("Subject", value); }
|
set { SetProperty("Subject", value); }
|
||||||
}
|
}
|
||||||
public LBRecipients Recipients
|
public LBRecipients Recipients => new LBRecipients(GetProperty("Recipients"));
|
||||||
{
|
public string To
|
||||||
get { return new LBRecipients(GetProperty("Recipients")); }
|
|
||||||
}
|
|
||||||
public String To
|
|
||||||
{
|
{
|
||||||
get { return (GetProperty("To").ToString()); }
|
get { return (GetProperty("To").ToString()); }
|
||||||
set { SetProperty("To", value); }
|
set { SetProperty("To", value); }
|
||||||
}
|
}
|
||||||
public void Send()
|
public void Send() => InvokeMethod("Send");
|
||||||
{
|
|
||||||
InvokeMethod("Send");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public enum LBOlBodyFormat
|
public enum LBOlBodyFormat
|
||||||
{
|
{
|
||||||
@@ -173,78 +115,39 @@ namespace LBOutlookLibrary
|
|||||||
public partial class LBAttachments : LBComObject
|
public partial class LBAttachments : LBComObject
|
||||||
{
|
{
|
||||||
public LBAttachments() { }
|
public LBAttachments() { }
|
||||||
public LBAttachments(Object item) : base(item) { }
|
public LBAttachments(object item) : base(item) { }
|
||||||
public int Count
|
public int Count => (GetProperty("Count") as int? ?? 0);
|
||||||
{
|
public new LBAttachment Item => new LBAttachment(GetProperty("Item"));
|
||||||
get { return (GetProperty("Count") as int? ?? 0); }
|
public LBAttachment Add(object Source) => new LBAttachment(InvokeMethod("Add", Source, Missing.Value, Missing.Value, Missing.Value));
|
||||||
}
|
|
||||||
public LBAttachment Item
|
|
||||||
{
|
|
||||||
get { return new LBAttachment(GetProperty("Item")); }
|
|
||||||
}
|
|
||||||
public LBAttachment Add(object Source)
|
|
||||||
{
|
|
||||||
return new LBAttachment(InvokeMethod("Add", Source, Missing.Value, Missing.Value, Missing.Value));
|
|
||||||
}
|
|
||||||
public LBAttachment Add(object Source, object Type, object Position, object DisplayName)
|
public LBAttachment Add(object Source, object Type, object Position, object DisplayName)
|
||||||
{
|
{
|
||||||
return new LBAttachment(InvokeMethod("Add", Source, Type, Position, DisplayName));
|
return new LBAttachment(InvokeMethod("Add", Source, Type, Position, DisplayName));
|
||||||
}
|
}
|
||||||
public void Remove(int Index)
|
public void Remove(int Index) => InvokeMethod("Remove", Index);
|
||||||
{
|
|
||||||
InvokeMethod("Remove", Index);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class LBRecipients : LBComObject
|
public partial class LBRecipients : LBComObject
|
||||||
{
|
{
|
||||||
public LBRecipients() { }
|
public LBRecipients() { }
|
||||||
public LBRecipients(Object item) : base(item) { }
|
public LBRecipients(object item) : base(item) { }
|
||||||
public int Count
|
public int Count => (GetProperty("Count") as int? ?? 0);
|
||||||
{
|
public new LBRecipient Item => new LBRecipient(GetProperty("Item"));
|
||||||
get { return (GetProperty("Count") as int? ?? 0); }
|
public LBRecipient Add(string Name) => new LBRecipient(InvokeMethod("Add", Name));
|
||||||
}
|
public void Remove(int Index) => InvokeMethod("Remove", Index);
|
||||||
public LBRecipient Item
|
public bool ResolveAll() => InvokeMethod("ResolveAll") as bool? ?? false;
|
||||||
{
|
|
||||||
get { return new LBRecipient(GetProperty("Item")); }
|
|
||||||
}
|
|
||||||
public LBRecipient Add(string Name)
|
|
||||||
{
|
|
||||||
return new LBRecipient(InvokeMethod("Add", Name));
|
|
||||||
}
|
|
||||||
public void Remove(int Index)
|
|
||||||
{
|
|
||||||
InvokeMethod("Remove", Index);
|
|
||||||
}
|
|
||||||
public Boolean ResolveAll()
|
|
||||||
{
|
|
||||||
return InvokeMethod("ResolveAll") as Boolean? ?? false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class LBAttachment : LBComObject
|
public partial class LBAttachment : LBComObject
|
||||||
{
|
{
|
||||||
public LBAttachment() { }
|
public LBAttachment() { }
|
||||||
public LBAttachment(Object item) : base(item) { }
|
public LBAttachment(object item) : base(item) { }
|
||||||
public LBOlAttachmentType Type
|
public LBOlAttachmentType Type => (LBOlAttachmentType)GetProperty("Type");
|
||||||
{
|
|
||||||
get { return (LBOlAttachmentType)GetProperty("Type"); }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class LBRecipient : LBComObject
|
public partial class LBRecipient : LBComObject
|
||||||
{
|
{
|
||||||
public LBRecipient() { }
|
public LBRecipient() { }
|
||||||
public LBRecipient(Object item) : base(item) { }
|
public LBRecipient(object item) : base(item) { }
|
||||||
public String Address
|
public string Address => (GetProperty("Address").ToString());
|
||||||
{
|
public string Name => (GetProperty("Name").ToString());
|
||||||
get { return (GetProperty("Address").ToString()); }
|
public bool Resolve() => InvokeMethod("Resolve") as bool? ?? false;
|
||||||
}
|
|
||||||
public String Name
|
|
||||||
{
|
|
||||||
get { return (GetProperty("Name").ToString()); }
|
|
||||||
}
|
|
||||||
public Boolean Resolve()
|
|
||||||
{
|
|
||||||
return InvokeMethod("Resolve") as Boolean? ?? false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public enum LBOlAttachmentType
|
public enum LBOlAttachmentType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace LBOutlookLibrary
|
namespace LBOutlookLibrary
|
||||||
{
|
{
|
||||||
public partial class LBApplicationClass
|
public partial class LBApplicationClass
|
||||||
{
|
{
|
||||||
public LBMailItemClass CreateMailItem()
|
public LBMailItemClass CreateMailItem() => new LBMailItemClass(CreateItem(LBOlItemType.olMailItem));
|
||||||
{
|
|
||||||
return new LBMailItemClass(CreateItem(LBOlItemType.olMailItem));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public partial class LBMailItemClass
|
public partial class LBMailItemClass
|
||||||
{
|
{
|
||||||
public void AddAttachment(string filename)
|
public void AddAttachment(string filename) => Attachments.Add(filename, LBOlAttachmentType.olByValue, Type.Missing, Type.Missing);
|
||||||
{
|
|
||||||
Attachments.Add(filename, LBOlAttachmentType.olByValue, Type.Missing, Type.Missing);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,15 +53,9 @@ namespace Read64bitRegistryFrom32bitApp
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Functions
|
#region Functions
|
||||||
static public string GetRegKey64Value(UIntPtr inHive, String inKeyName, String inPropertyName)
|
static public string GetRegKey64Value(UIntPtr inHive, string inKeyName, string inPropertyName) => GetRegKey64Value(inHive, inKeyName, RegSAM.WOW64_64Key, inPropertyName);
|
||||||
{
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "inHive kept to match dll signature")]
|
||||||
return GetRegKey64Value(inHive, inKeyName, RegSAM.WOW64_64Key, inPropertyName);
|
static public string GetRegKey64Value(UIntPtr inHive, string inKeyName, RegSAM in32or64key, string inPropertyName)
|
||||||
}
|
|
||||||
static public string GetRegKey32Value(UIntPtr inHive, String inKeyName, String inPropertyName)
|
|
||||||
{
|
|
||||||
return GetRegKey64Value(inHive, inKeyName, RegSAM.WOW64_32Key, inPropertyName);
|
|
||||||
}
|
|
||||||
static public string GetRegKey64Value(UIntPtr inHive, String inKeyName, RegSAM in32or64key, String inPropertyName)
|
|
||||||
{
|
{
|
||||||
int hkey = 0;
|
int hkey = 0;
|
||||||
try
|
try
|
||||||
@@ -80,15 +74,10 @@ namespace Read64bitRegistryFrom32bitApp
|
|||||||
if (0 != hkey) RegCloseKey(hkey);
|
if (0 != hkey) RegCloseKey(hkey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static public bool CheckRegKey64Valid(UIntPtr inHive, String inKeyName)
|
static public bool CheckRegKey64Valid(UIntPtr inHive, string inKeyName) => CheckRegKey64Valid(inHive, inKeyName, RegSAM.WOW64_64Key);
|
||||||
{
|
static public bool GetRegKey32Valid(UIntPtr inHive, string inKeyName) => CheckRegKey64Valid(inHive, inKeyName, RegSAM.WOW64_32Key);
|
||||||
return CheckRegKey64Valid(inHive, inKeyName, RegSAM.WOW64_64Key);
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "inHive kept to match dll signature")]
|
||||||
}
|
static public bool CheckRegKey64Valid(UIntPtr inHive, string inKeyName, RegSAM in32or64key)
|
||||||
static public bool GetRegKey32Valid(UIntPtr inHive, String inKeyName)
|
|
||||||
{
|
|
||||||
return CheckRegKey64Valid(inHive, inKeyName, RegSAM.WOW64_32Key);
|
|
||||||
}
|
|
||||||
static public bool CheckRegKey64Valid(UIntPtr inHive, String inKeyName, RegSAM in32or64key)
|
|
||||||
{
|
{
|
||||||
int hkey = 0;
|
int hkey = 0;
|
||||||
try
|
try
|
||||||
@@ -103,8 +92,5 @@ namespace Read64bitRegistryFrom32bitApp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Enums
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
@@ -85,6 +85,7 @@
|
|||||||
<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>
|
||||||
@@ -92,7 +93,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -103,7 +104,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ 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
|
||||||
{
|
{
|
||||||
@@ -280,6 +281,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -288,6 +290,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -296,6 +299,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -304,6 +308,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -586,5 +591,18 @@ 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ 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
|
||||||
{
|
{
|
||||||
@@ -316,6 +317,22 @@ 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>
|
||||||
@@ -357,6 +374,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -365,6 +383,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -402,6 +421,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -425,3 +445,4 @@ namespace ROEditor
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ using System.Xml;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
using ROFields;
|
using ROFields;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace ROEditor
|
namespace ROEditor
|
||||||
{
|
{
|
||||||
@@ -277,6 +278,22 @@ 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
|
||||||
@@ -315,6 +332,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -437,3 +455,4 @@ namespace ROEditor
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ using System.Xml;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using ROFields;
|
using ROFields;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace ROEditor
|
namespace ROEditor
|
||||||
{
|
{
|
||||||
@@ -155,6 +156,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -421,5 +423,21 @@ 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ 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
|
||||||
@@ -1311,6 +1312,22 @@ 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>
|
||||||
@@ -1375,6 +1392,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -1383,6 +1401,7 @@ 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
|
||||||
//
|
//
|
||||||
@@ -1608,3 +1627,4 @@ namespace ROEditor
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</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>x86</PlatformTarget>
|
<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>
|
||||||
@@ -96,6 +96,7 @@
|
|||||||
<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>
|
||||||
@@ -103,11 +104,15 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</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>
|
||||||
@@ -123,10 +128,6 @@
|
|||||||
<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">
|
||||||
@@ -167,6 +168,7 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
|
||||||
CwAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CwAAAk1TRnQBSQFMAgEBBgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ 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
|
||||||
|
|
||||||
@@ -845,6 +844,10 @@ namespace ROEditor
|
|||||||
AccPageID = " ";
|
AccPageID = " ";
|
||||||
WriteString(AccPageID);
|
WriteString(AccPageID);
|
||||||
|
|
||||||
|
//C2026-008 Re-Architect RO.FST to include RO Modification date/time
|
||||||
|
string moddt = ROdatabase.RODB_GetModDateTime(elem.GetAttribute("RecID"), elem.GetAttribute("Table"));
|
||||||
|
if (!string.IsNullOrEmpty(moddt)) WriteString(moddt);
|
||||||
|
|
||||||
// Save the ID and offset entry for the current ID
|
// Save the ID and offset entry for the current ID
|
||||||
IdsAndOffsets.Add(RORecID, startFST);
|
IdsAndOffsets.Add(RORecID, startFST);
|
||||||
|
|
||||||
@@ -885,3 +888,4 @@ namespace ROEditor
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
<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>
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
<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 +95,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -104,7 +106,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
<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>
|
||||||
@@ -44,13 +45,14 @@
|
|||||||
<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>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -59,7 +61,7 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -263,6 +263,7 @@ 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
|
||||||
@@ -354,6 +355,7 @@ namespace RODBInterface
|
|||||||
public abstract string RODB_GetDBServerForAbout();
|
public abstract string RODB_GetDBServerForAbout();
|
||||||
public abstract string RODB_HasBeenConverted();
|
public abstract string RODB_HasBeenConverted();
|
||||||
public abstract bool RODB_WriteSqlConnectToAccess(string newConectStr);
|
public abstract bool RODB_WriteSqlConnectToAccess(string newConectStr);
|
||||||
|
public abstract string RODB_GetModDateTime(string Recid, string table);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public RODB()
|
public RODB()
|
||||||
@@ -409,7 +411,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.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";
|
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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -1909,6 +1911,8 @@ 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("'", "\'"); // B2021-071: crash when getting/saving field names
|
Info = Info.Replace("'", "\'"); // 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
|
||||||
@@ -2139,7 +2143,20 @@ namespace RODBInterface
|
|||||||
wraccid = accid;
|
wraccid = accid;
|
||||||
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
|
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
|
||||||
string xmlstr = GenerateXmlString(ro, false);
|
string xmlstr = GenerateXmlString(ro, false);
|
||||||
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'";
|
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
|
||||||
|
char[] chrAry = xmlstr.ToCharArray();
|
||||||
|
foreach (int chr in chrAry)
|
||||||
|
{
|
||||||
|
if (chr > 166)
|
||||||
|
{
|
||||||
|
xmlstrTmp.Append($"\\u{(int)chr}?");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xmlstrTmp.Append((char)chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp.ToString() + "'";
|
||||||
if (movedRO)
|
if (movedRO)
|
||||||
{
|
{
|
||||||
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
|
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
|
||||||
@@ -2182,10 +2199,27 @@ namespace RODBInterface
|
|||||||
parent.SetAttribute("ChildLoaded", "True");
|
parent.SetAttribute("ChildLoaded", "True");
|
||||||
}
|
}
|
||||||
string xmlstr = GenerateXmlString(ro, false);
|
string xmlstr = GenerateXmlString(ro, false);
|
||||||
|
|
||||||
|
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
|
||||||
|
char[] chrAry = xmlstr.ToCharArray();
|
||||||
|
foreach (int chr in chrAry)
|
||||||
|
{
|
||||||
|
if (chr > 166)
|
||||||
|
{
|
||||||
|
xmlstrTmp.Append($"\\u{(int)chr}?");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xmlstrTmp.Append((char)chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string wraccid = null;
|
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, "'");
|
||||||
@@ -2203,13 +2237,13 @@ namespace RODBInterface
|
|||||||
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
|
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
|
||||||
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
|
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
|
||||||
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
||||||
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
|
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) ";
|
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) ";
|
||||||
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
||||||
strInsert = strInsert + "','" + dt + "','" + xmlstr + "');";
|
strInsert = strInsert + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2217,7 +2251,7 @@ namespace RODBInterface
|
|||||||
{
|
{
|
||||||
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) ";
|
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) ";
|
||||||
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID");
|
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID");
|
||||||
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
|
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -2251,7 +2285,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"; // + rtype.ToString();
|
strGetFields = strGetFields + " where RecType = 2";
|
||||||
DBE.Command(strGetFields);
|
DBE.Command(strGetFields);
|
||||||
DBE.Reader();
|
DBE.Reader();
|
||||||
|
|
||||||
@@ -2625,7 +2659,21 @@ namespace RODBInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle");
|
StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle");
|
||||||
|
StringBuilder tinfo2Tmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
|
||||||
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'";
|
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'";
|
||||||
|
char[] chrAry = tinfo2.ToCharArray();
|
||||||
|
foreach (int chr in chrAry)
|
||||||
|
{
|
||||||
|
if (chr > 166)
|
||||||
|
{
|
||||||
|
tinfo2Tmp.Append($"\\u{(int)chr}?");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tinfo2Tmp.Append((char)chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp.ToString() + "'";
|
||||||
str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';";
|
str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';";
|
||||||
DBE.Command(str);
|
DBE.Command(str);
|
||||||
DBE.Reader();
|
DBE.Reader();
|
||||||
@@ -3035,6 +3083,27 @@ namespace RODBInterface
|
|||||||
return GrpCnt;
|
return GrpCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//C2026-008 Re-Architect RO.FST to include RO Modification date/time
|
||||||
|
//Get the Modification Date / Time for the RO
|
||||||
|
public override string RODB_GetModDateTime(string Recid, string table)
|
||||||
|
{
|
||||||
|
using (System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection(strDatabaseConnectionCommand))
|
||||||
|
{
|
||||||
|
connection.Open();
|
||||||
|
using (System.Data.OleDb.OleDbCommand command = connection.CreateCommand())
|
||||||
|
{
|
||||||
|
//Unfortunately Access wont let you paramaterize the table name
|
||||||
|
command.CommandText = $"SELECT ModDateTime FROM {Regex.Replace(table, "[^a-zA-Z0-9]", "")} WHERE RecID = @Value";
|
||||||
|
command.Parameters.Add(new System.Data.OleDb.OleDbParameter
|
||||||
|
{
|
||||||
|
OleDbType = System.Data.OleDb.OleDbType.VarChar,
|
||||||
|
ParameterName = "@Value",
|
||||||
|
Value = Recid
|
||||||
|
});
|
||||||
|
return command.ExecuteScalar().ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
<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>
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
<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 +95,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -104,7 +106,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -171,6 +173,17 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -2653,6 +2653,34 @@ namespace RODBInterface
|
|||||||
}
|
}
|
||||||
return GrpCnt;
|
return GrpCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//C2026-008 Re-Architect RO.FST to include RO Modification date/time
|
||||||
|
//Get the Modification Date / Time for the RO
|
||||||
|
public override string RODB_GetModDateTime(string Recid, string table)
|
||||||
|
{
|
||||||
|
using (SqlConnection connection = new SqlConnection(strDatabaseConnectionCommand))
|
||||||
|
{
|
||||||
|
connection.Open();
|
||||||
|
using (SqlCommand command = connection.CreateCommand())
|
||||||
|
{
|
||||||
|
command.CommandText = $"SELECT ModDateTime FROM ROALL WHERE RecID = @Value AND ROTable = @table";
|
||||||
|
command.Parameters.Add(new SqlParameter
|
||||||
|
{
|
||||||
|
SqlDbType = SqlDbType.VarChar,
|
||||||
|
ParameterName = "@Value",
|
||||||
|
Value = Recid
|
||||||
|
});
|
||||||
|
command.Parameters.Add(new SqlParameter
|
||||||
|
{
|
||||||
|
SqlDbType = SqlDbType.VarChar,
|
||||||
|
ParameterName = "@table",
|
||||||
|
Value = table
|
||||||
|
});
|
||||||
|
|
||||||
|
return command.ExecuteScalar().ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
public static bool TestConnect(string constring)
|
public static bool TestConnect(string constring)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ using System.IO;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using ROFields;
|
using ROFields;
|
||||||
using VlnStatus;
|
using VlnStatus;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
|
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
|
||||||
|
|
||||||
namespace RODBInterface
|
namespace RODBInterface
|
||||||
@@ -517,6 +518,7 @@ namespace RODBInterface
|
|||||||
strtmp.Append(" ");
|
strtmp.Append(" ");
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
|
text = Regex.Replace(text, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); //B2026-025 Unicode removed from RO menu titles in treeview.
|
||||||
if ((cnt + text.Length) > frmt2) // longer than the field length?
|
if ((cnt + text.Length) > frmt2) // longer than the field length?
|
||||||
strtmp.Append(text.Substring(0,frmt2-cnt));
|
strtmp.Append(text.Substring(0,frmt2-cnt));
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
<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>
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
<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 +95,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE;Upgrade2005;</DefineConstants>
|
<DefineConstants>DEBUG;TRACE;Upgrade2005;</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -104,7 +106,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
<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>
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
<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 +95,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -104,7 +106,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
<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>
|
||||||
@@ -101,6 +102,7 @@
|
|||||||
<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>
|
||||||
@@ -108,7 +110,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -119,7 +121,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -73,6 +73,7 @@
|
|||||||
<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>
|
||||||
@@ -97,6 +98,7 @@
|
|||||||
<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,7 +106,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -19,11 +19,6 @@
|
|||||||
*********************************************************************************************/
|
*********************************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
|
||||||
using System.Collections;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
//using ROProfiler; //don't forget to add VlnProfiler to the reference list
|
|
||||||
|
|
||||||
namespace VlnStatus
|
namespace VlnStatus
|
||||||
{
|
{
|
||||||
@@ -35,11 +30,6 @@ namespace VlnStatus
|
|||||||
private System.Windows.Forms.ProgressBar progressBar1;
|
private System.Windows.Forms.ProgressBar progressBar1;
|
||||||
private System.Windows.Forms.Label lblBar;
|
private System.Windows.Forms.Label lblBar;
|
||||||
private System.Windows.Forms.Label StatMsg;
|
private System.Windows.Forms.Label StatMsg;
|
||||||
// private string strLblLast="";
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.Container components = null;
|
|
||||||
|
|
||||||
public StatusBarFrm()
|
public StatusBarFrm()
|
||||||
{
|
{
|
||||||
@@ -61,21 +51,6 @@ namespace VlnStatus
|
|||||||
Text = StatusBoxTitle;
|
Text = StatusBoxTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
protected override void Dispose( bool disposing )
|
|
||||||
{
|
|
||||||
if( disposing )
|
|
||||||
{
|
|
||||||
if(components != null)
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
base.Dispose( disposing );
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
@@ -190,14 +165,6 @@ namespace VlnStatus
|
|||||||
{
|
{
|
||||||
lblBar.Text = (Math.Round((decimal)(progressBar1.Value * 100) / progressBar1.Maximum)).ToString();
|
lblBar.Text = (Math.Round((decimal)(progressBar1.Value * 100) / progressBar1.Maximum)).ToString();
|
||||||
lblBar.Text += "% Complete";
|
lblBar.Text += "% Complete";
|
||||||
// if( lblBar.Text != strLblLast)
|
|
||||||
// {
|
|
||||||
// Profiler.Start("UpdateLabel");
|
|
||||||
lblBar.Refresh();
|
|
||||||
// lblBar.Update();
|
|
||||||
// Profiler.End("UpdateLabel");
|
|
||||||
// }
|
|
||||||
// strLblLast = lblBar.Text;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string StatusMessage
|
public string StatusMessage
|
||||||
@@ -209,10 +176,7 @@ namespace VlnStatus
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
StatMsg.Text = value;
|
StatMsg.Text = value;
|
||||||
// Profiler.Start("StatusMessage");
|
|
||||||
StatMsg.Refresh();
|
StatMsg.Refresh();
|
||||||
// StatMsg.Update();
|
|
||||||
// Profiler.End("StatusMessage");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,12 +17,6 @@
|
|||||||
* Added overbounds check
|
* Added overbounds check
|
||||||
*********************************************************************************************/
|
*********************************************************************************************/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Collections;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace VlnStatus
|
namespace VlnStatus
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -31,10 +25,6 @@ namespace VlnStatus
|
|||||||
public class StatusMessageFrm : System.Windows.Forms.Form
|
public class StatusMessageFrm : System.Windows.Forms.Form
|
||||||
{
|
{
|
||||||
private System.Windows.Forms.Label lblStatMsg;
|
private System.Windows.Forms.Label lblStatMsg;
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.Container components = null;
|
|
||||||
|
|
||||||
public StatusMessageFrm()
|
public StatusMessageFrm()
|
||||||
{
|
{
|
||||||
@@ -54,21 +44,6 @@ namespace VlnStatus
|
|||||||
Text = StatTitle;
|
Text = StatTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
protected override void Dispose( bool disposing )
|
|
||||||
{
|
|
||||||
if( disposing )
|
|
||||||
{
|
|
||||||
if(components != null)
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
base.Dispose( disposing );
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
<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>
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
<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 +95,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -104,7 +106,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace VlnStatus
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class VlnStatusBar
|
public class VlnStatusBar
|
||||||
{
|
{
|
||||||
StatusBarFrm StatBar;
|
readonly StatusBarFrm StatBar;
|
||||||
private int Cnt;
|
private int Cnt;
|
||||||
|
|
||||||
// Create a status window with the default title of "Status"
|
// Create a status window with the default title of "Status"
|
||||||
@@ -53,8 +53,6 @@ namespace VlnStatus
|
|||||||
// Increament the the status bar by the passed in value.
|
// Increament the the status bar by the passed in value.
|
||||||
public void PerformStep(int val)
|
public void PerformStep(int val)
|
||||||
{
|
{
|
||||||
// StatBar.Value = val;
|
|
||||||
// Cnt = val;
|
|
||||||
BarValue = val;
|
BarValue = val;
|
||||||
StatBar.PerformStep();
|
StatBar.PerformStep();
|
||||||
}
|
}
|
||||||
@@ -62,7 +60,6 @@ namespace VlnStatus
|
|||||||
// Increament the the status bar by one
|
// Increament the the status bar by one
|
||||||
public void PerformStep()
|
public void PerformStep()
|
||||||
{
|
{
|
||||||
// StatBar.Value = StatBar.Value + 1;
|
|
||||||
Cnt++;
|
Cnt++;
|
||||||
BarValue = Cnt;
|
BarValue = Cnt;
|
||||||
StatBar.PerformStep();
|
StatBar.PerformStep();
|
||||||
|
|||||||
@@ -13,8 +13,6 @@
|
|||||||
* Added overbounds check
|
* Added overbounds check
|
||||||
*********************************************************************************************/
|
*********************************************************************************************/
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace VlnStatus
|
namespace VlnStatus
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -28,7 +26,7 @@ namespace VlnStatus
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class VlnStatusMessage
|
public class VlnStatusMessage
|
||||||
{
|
{
|
||||||
StatusMessageFrm StatusMessageBox;
|
readonly StatusMessageFrm StatusMessageBox;
|
||||||
|
|
||||||
// Create a status window with the default title of "Status"
|
// Create a status window with the default title of "Status"
|
||||||
public VlnStatusMessage()
|
public VlnStatusMessage()
|
||||||
|
|||||||
@@ -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 System.Windows.Forms.TextBox tbZoom;
|
private ctlXMLEditLib.roRichTextBox tbZoom; // RO Editor add symbols C2022 - 003
|
||||||
/// <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 System.Windows.Forms.TextBox();
|
this.tbZoom = new ctlXMLEditLib.roRichTextBox(); // RO Editor add symbols C2022 - 003
|
||||||
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.ScrollBars.Vertical;
|
this.tbZoom.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; // RO Editor add symbols C2022 - 003
|
||||||
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,3 +149,4 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,11 @@ using System.Xml.Schema;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
using Org.Mentalis.Files;
|
using Org.Mentalis.Files;
|
||||||
//using IniFileIO;
|
using System.Windows;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Linq;
|
||||||
|
using Volian.Base.Library;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -221,6 +225,7 @@ namespace ctlXMLEditLib
|
|||||||
///
|
///
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class ctlXMLEdit : System.Windows.Forms.UserControl
|
public class ctlXMLEdit : System.Windows.Forms.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -237,12 +242,12 @@ namespace ctlXMLEditLib
|
|||||||
private bool dosaveflag;
|
private bool dosaveflag;
|
||||||
private VlnXmlElement editelem;
|
private VlnXmlElement editelem;
|
||||||
private XmlDocument editdoc;
|
private XmlDocument editdoc;
|
||||||
private TextBox zoomtextbox;
|
private roRichTextBox 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 TextBox GraphicsFiletextbox;
|
private roRichTextBox GraphicsFiletextbox;
|
||||||
private TextBox GraphicsWdtextbox;
|
private roRichTextBox GraphicsWdtextbox;
|
||||||
private TextBox GraphicsHttextbox;
|
private roRichTextBox 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;
|
||||||
@@ -265,6 +270,19 @@ 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
|
||||||
@@ -311,10 +329,19 @@ 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
|
||||||
@@ -359,11 +386,12 @@ 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(TextBox hwnd, string msg)
|
private void DoSet(roRichTextBox hwnd, string msg) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
if (hwnd == null) return;
|
if (hwnd == null) return;
|
||||||
if (hwnd.Tag != null)
|
if (hwnd.Tag != null)
|
||||||
@@ -378,7 +406,7 @@ namespace ctlXMLEditLib
|
|||||||
private void SetRequiredFields(ArrayList reqfields)
|
private void SetRequiredFields(ArrayList reqfields)
|
||||||
{
|
{
|
||||||
Object o;
|
Object o;
|
||||||
TextBox hwnd;
|
roRichTextBox hwnd;
|
||||||
string field, msg;
|
string field, msg;
|
||||||
int indx;
|
int indx;
|
||||||
foreach (string strfld in reqfields)
|
foreach (string strfld in reqfields)
|
||||||
@@ -397,15 +425,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((TextBox)o,msg);
|
DoSet((roRichTextBox)o,msg);
|
||||||
DoSet((TextBox)myHT[field+"b"],msg);
|
DoSet((roRichTextBox)myHT[field+"b"],msg);
|
||||||
DoSet((TextBox)myHT[field+"c"],msg);
|
DoSet((roRichTextBox)myHT[field+"c"],msg);
|
||||||
DoSet((TextBox)myHT[field+"d"],msg);
|
DoSet((roRichTextBox)myHT[field+"d"],msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (o != null)
|
else if (o != null)
|
||||||
{
|
{
|
||||||
hwnd = (TextBox) o;
|
hwnd = (roRichTextBox) o;
|
||||||
if (hwnd.Tag != null)
|
if (hwnd.Tag != null)
|
||||||
{
|
{
|
||||||
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
||||||
@@ -419,7 +447,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(TextBox tb, XmlNode node, string chldName)
|
private void GetDefaultParentValue(roRichTextBox 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
|
||||||
@@ -463,13 +491,13 @@ namespace ctlXMLEditLib
|
|||||||
private void DisplayFieldContents(XmlNode node)
|
private void DisplayFieldContents(XmlNode node)
|
||||||
{
|
{
|
||||||
Object o;
|
Object o;
|
||||||
TextBox hwnd;
|
roRichTextBox 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 = (TextBox) o;
|
hwnd = (roRichTextBox) 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);
|
||||||
@@ -477,7 +505,9 @@ 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
|
||||||
@@ -546,7 +576,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 TextBox GetGraphicsFiletextbox()
|
public roRichTextBox GetGraphicsFiletextbox()
|
||||||
{
|
{
|
||||||
return GraphicsFiletextbox;
|
return GraphicsFiletextbox;
|
||||||
}
|
}
|
||||||
@@ -585,13 +615,13 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
dosaveflag=false;
|
dosaveflag=false;
|
||||||
mysavexml=false;
|
mysavexml=false;
|
||||||
TextBox hwnd;
|
roRichTextBox 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 = (TextBox) o;
|
hwnd = (roRichTextBox) o;
|
||||||
hwnd.Text = "";
|
hwnd.Text = "";
|
||||||
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
||||||
RadioButton radio;
|
RadioButton radio;
|
||||||
@@ -623,7 +653,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, TextBox tb, string chldName)
|
private void RemovePCChildTextIfSameAsParent(XmlNode node, roRichTextBox 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
|
||||||
@@ -660,18 +690,35 @@ 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)
|
||||||
{
|
{
|
||||||
TextBox hwnd;
|
roRichTextBox 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)
|
foreach (string str in myHT.Keys) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
hwnd = (TextBox) o;
|
hwnd = (roRichTextBox) 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.
|
||||||
@@ -788,6 +835,7 @@ 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
|
||||||
@@ -858,7 +906,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, TextBox mytextbox, RadioButton radio,
|
private string DisplayXmlSchemaSimpleType(XmlSchemaSimpleType simpleType, roRichTextBox 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
|
||||||
@@ -888,12 +936,17 @@ 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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -905,13 +958,16 @@ 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.AcceptsReturn = true;
|
mytextbox.AcceptsTab = true;
|
||||||
mytextbox.Height = (int) mytextbox.Font.GetHeight() * 4;
|
mytextbox.Height = (int) mytextbox.Font.GetHeight() * 4;
|
||||||
mytextbox.ScrollBars = ScrollBars.Vertical;
|
mytextbox.ScrollBars = RichTextBoxScrollBars.Vertical;
|
||||||
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
|
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -992,7 +1048,8 @@ namespace ctlXMLEditLib
|
|||||||
radio.CheckedChanged += new System.EventHandler(this.radiocheckchg);
|
radio.CheckedChanged += new System.EventHandler(this.radiocheckchg);
|
||||||
gbox.Controls.Add(radio);
|
gbox.Controls.Add(radio);
|
||||||
|
|
||||||
TextBox tb = new TextBox();
|
roRichTextBox tb = new roRichTextBox();
|
||||||
|
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);
|
||||||
@@ -1001,7 +1058,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.textbox_zoombtn);
|
tb.GotFocus += new System.EventHandler(this.currentTextBox);
|
||||||
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.
|
||||||
@@ -1144,8 +1201,9 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TextBox mytextbox;
|
roRichTextBox mytextbox;
|
||||||
mytextbox = new TextBox();
|
mytextbox = new roRichTextBox();
|
||||||
|
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;
|
||||||
@@ -1155,7 +1213,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.textbox_zoombtn);
|
mytextbox.GotFocus += new System.EventHandler(this.currentTextBox);
|
||||||
mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
||||||
if (pcChildIdx > 0)
|
if (pcChildIdx > 0)
|
||||||
{
|
{
|
||||||
@@ -1195,6 +1253,15 @@ 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.
|
||||||
@@ -1210,7 +1277,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)
|
||||||
{
|
{
|
||||||
TextBox tb = sender as TextBox;
|
roRichTextBox tb = sender as roRichTextBox;
|
||||||
string dfTxt = "";
|
string dfTxt = "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1219,7 +1286,7 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
object o = myHT[parentid];
|
object o = myHT[parentid];
|
||||||
if (o != null)
|
if (o != null)
|
||||||
dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
|
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1227,7 +1294,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 TextBox).Text; // set to use the parent's value (default)
|
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@@ -1235,7 +1302,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 TextBox).Text; // set to use the parent's value (default)
|
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dosaveflag) mysavexml = true;
|
if (dosaveflag) mysavexml = true;
|
||||||
@@ -1251,7 +1318,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)
|
||||||
{
|
{
|
||||||
TextBox tb = sender as TextBox;
|
roRichTextBox tb = sender as roRichTextBox;
|
||||||
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 = "";
|
||||||
@@ -1264,7 +1331,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;
|
||||||
TextBox assocbox;
|
roRichTextBox assocbox;
|
||||||
string btntext, str;
|
string btntext, str;
|
||||||
|
|
||||||
if(dosaveflag)mysavexml = true;
|
if(dosaveflag)mysavexml = true;
|
||||||
@@ -1277,7 +1344,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 = (TextBox) o;
|
assocbox = (roRichTextBox) 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
|
||||||
@@ -1299,7 +1366,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 TextBox).Visible = vsblState; // show or hide the associated text box
|
(oo as roRichTextBox).Visible = vsblState; // show or hide the associated text box
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1391,7 +1458,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(TextBox tb)
|
private void MyValidatingCode(roRichTextBox 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.
|
||||||
@@ -1420,20 +1487,33 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
|
|
||||||
// save which box we're on, for zoom processing.
|
// save which box we're on, for zoom processing.
|
||||||
private void textbox_zoombtn(object sender, System.EventArgs e)
|
private void currentTextBox(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox textbox = (TextBox) sender;
|
roRichTextBox textbox = (roRichTextBox) 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((TextBox) sender);
|
MyValidatingCode((roRichTextBox) sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
@@ -1459,11 +1539,18 @@ 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)
|
||||||
@@ -1507,7 +1594,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)
|
||||||
{
|
{
|
||||||
TextBox fnamebox = (TextBox) sender;
|
roRichTextBox fnamebox = (roRichTextBox) 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);
|
||||||
@@ -1716,7 +1803,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)
|
||||||
{
|
{
|
||||||
TextBox ht = (TextBox) sender;
|
roRichTextBox ht = (roRichTextBox) sender;
|
||||||
if (ht.Modified == true)
|
if (ht.Modified == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -1733,7 +1820,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)
|
||||||
{
|
{
|
||||||
TextBox wd = (TextBox) sender;
|
roRichTextBox wd = (roRichTextBox) sender;
|
||||||
if (wd.Modified == true)
|
if (wd.Modified == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -1929,5 +2016,31 @@ 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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
<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>
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
<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 +95,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<BaseAddress>285212672</BaseAddress>
|
<BaseAddress>285212672</BaseAddress>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -104,7 +106,7 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>
|
<DebugType>
|
||||||
</DebugType>
|
</DebugType>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -124,6 +126,9 @@
|
|||||||
<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">
|
||||||
@@ -135,6 +140,12 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
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 = symbcode < 256 ? ((char)symbcode).ToString() : string.Format(@"\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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// This file is used by Code Analysis to maintain SuppressMessage
|
||||||
|
// attributes that are applied to this project.
|
||||||
|
// Project-level suppressions either have no target or are given
|
||||||
|
// a specific target and scoped to a namespace, type, member, etc.
|
||||||
|
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Not modifying Naming Styles")]
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace RoAccessToSql
|
namespace RoAccessToSql
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user