Compare commits
655 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5190a41470 | |||
| 3afe6bb35b | |||
| 554ae16e48 | |||
| 1b4d239202 | |||
| 3b2d15703a | |||
| 8e5a4d4ac5 | |||
| f2ce55ff27 | |||
| ae3b16b715 | |||
| 8ff4b74725 | |||
| 18fb37b497 | |||
| 246e55f733 | |||
| 9b29b16a33 | |||
| 1debeab653 | |||
| 63c3a4e085 | |||
| 7830105bc4 | |||
| 8a11051575 | |||
| 0b50832b4e | |||
| 40bdcec46e | |||
| 9eaca47566 | |||
| 7c53ecceb4 | |||
| 9a6f6ad37e | |||
| 8174c6137a | |||
| b84699e3c1 | |||
| 5101c1cca9 | |||
| 3ad3694454 | |||
| 9d9e184efa | |||
| cf3f756683 | |||
| 72544190cc | |||
| 2ce454ad0a | |||
| 5a3ad4356f | |||
| ba4414c9f6 | |||
| aa29e4106d | |||
| 76eb17868c | |||
| 829b58a0e5 | |||
| 79847e3cce | |||
| 59be071d12 | |||
| d9150c75f4 | |||
| 00088315cd | |||
| e12a310010 | |||
| 449fe3ad57 | |||
| e8d8637832 | |||
| 6671f2269e | |||
| 26ef6b2d3b | |||
| b5e9686da2 | |||
| f57410dffb | |||
| 346c452546 | |||
| 2eff34e8b6 | |||
| 7c3a107c31 | |||
| e119e9673a | |||
| 2407d3a0ae | |||
| fd32ba3ea1 | |||
| 9045469c0d | |||
| 10972a466d | |||
| e6b674ec46 | |||
| 68cdd41b20 | |||
| cf23a2b7c2 | |||
| 67c2a9d0ec | |||
| 7b70a27ff4 | |||
| 00c37ad74f | |||
| 18e079d235 | |||
| f734885de5 | |||
| 0cc673b047 | |||
| acc1365fd2 | |||
| 7dcf1fe8dc | |||
| fcca1ed72c | |||
| 03ecf3493b | |||
| 36b667fcc5 | |||
| cd748dea7a | |||
| c2f03a883a | |||
| 9b09eeaa9c | |||
| 919890e68d | |||
| fa0bc2ffdd | |||
| b8143b0ff5 | |||
| 085975338a | |||
| 53fc2694a3 | |||
| 9c8563f5c3 | |||
| 2f78dd796d | |||
| 378369d3d5 | |||
| 656c5a7d54 | |||
| c40bc508d0 | |||
| de2234387d | |||
| d7c1ecacc2 | |||
| ec813beae5 | |||
| 7a9faf537f | |||
| 6f58b6f090 | |||
| 53d06d6098 | |||
| eb571bf5fd | |||
| 3d11abfa31 | |||
| b1f8d21cc5 | |||
| ec8fbd3297 | |||
| fdd3342492 | |||
| f41b8f1409 | |||
| 5edd5300cd | |||
| 92be9189c6 | |||
| 6c0bb175d9 | |||
| a079596aed | |||
| 60da7384a2 | |||
| 761842bf45 | |||
| 32cfbfbeec | |||
| 2ff2e6ffc4 | |||
| 0c7c729914 | |||
| 7195e16c37 | |||
| 42b0622bdf | |||
| bcdb79e796 | |||
| d7aa8902d9 | |||
| 9d7fb9ab99 | |||
| 8419659647 | |||
| 8becdfb219 | |||
| 7c6b18d996 | |||
| 44e9a448fe | |||
| 5740820eed | |||
| 3202993a3e | |||
| b293156a30 | |||
| dfe876638f | |||
| 1c861ee7e3 | |||
| 5da026accb | |||
| 5396796d28 | |||
| ae18c7f027 | |||
| 54122d82e6 | |||
| f85e97a126 | |||
| 06654d923c | |||
| ce1c6fcf02 | |||
| da11ec0a11 | |||
| 52688ed0da | |||
| 60eda04669 | |||
| b95dd8f41d | |||
| 4b2351c20a | |||
| 988743187b | |||
| 2c0afccbe3 | |||
| a5d6d34664 | |||
| 27b13292cf | |||
| 7b9d99a9c6 | |||
| 1e2b4bed27 | |||
| 4ecf7980ce | |||
| 82157d3b6e | |||
| 10cb8f64f5 | |||
| 6dbf4f5ccb | |||
| 4ba0fe2520 | |||
| a55ab4f83d | |||
| 419776c89f | |||
| fd89a6cf3b | |||
| b505b79d9a | |||
| b1313ddb55 | |||
| f3889ede24 | |||
| 5ca010ae4a | |||
| 391d25507e | |||
| c954f364e3 | |||
| 1ab6d2746f | |||
| 41de0516c8 | |||
| dec4c0d312 | |||
| 834f3afe1c | |||
| e6c95323fb | |||
| fa6e5b520f | |||
| aefc037cd9 | |||
| c475f7dc12 | |||
| c5f3d4fcfb | |||
| a04e2cbe62 | |||
| da980a649e | |||
| 4c282d7531 | |||
| a941f963c2 | |||
| eab341d7fe | |||
| 9c7d60d307 | |||
| a7adcdcaca | |||
| acb8ceed4d | |||
| 65d8f58b45 | |||
| 07cf7ced42 | |||
| b1410ca11c | |||
| 1975f46995 | |||
| 6863186e07 | |||
| b434f80030 | |||
| 0151cd8f9e | |||
| 75e3729216 | |||
| ef1aef12ed | |||
| 959fb2e44f | |||
| 59e3ae5841 | |||
| 941e7837be | |||
| 58de5d4077 | |||
| b6beef668d | |||
| 680505af10 | |||
| b0bfa67d2a | |||
| 29d8c1e29b | |||
| e5d4f223f8 | |||
| 3cfc7276c9 | |||
| 0c0233b27e | |||
| 4e8925515d | |||
| 3b552b2f4e | |||
| 3fae33404b | |||
| 0d4d853834 | |||
| 37fcbe8240 | |||
| 4393f282b7 | |||
| 6844a8c77c | |||
| 659405c52f | |||
| efafacf6ca | |||
| 6905a8d6dc | |||
| d8ba23894e | |||
| aba1572f95 | |||
| fdb0ed598b | |||
| 4cb3518346 | |||
| 56b8ee88d3 | |||
| d0439f2b05 | |||
| 07d8145d57 | |||
| 652c396933 | |||
| 997e8c380d | |||
| 8d363b8b06 | |||
| 7ecad4c218 | |||
| d49c231541 | |||
| 8d82058e49 | |||
| d6a9cac6b4 | |||
| 4ce898c25c | |||
| 6f59cddd80 | |||
| c8b018f6df | |||
| 36a1ecb509 | |||
| e287e827c4 | |||
| 68e9a9201d | |||
| 0eaebd5aad | |||
| 8946bf3a00 | |||
| aeb0be0590 | |||
| a15acb6528 | |||
| e7e9d26b75 | |||
| b48d4900ea | |||
| d9de23daca | |||
| ad5c9331ba | |||
| b67330b509 | |||
| ca66108145 | |||
| 379ccc7519 | |||
| b751c27773 | |||
| 14e1c254f0 | |||
| 6f08e5f520 | |||
| 7d8933cc39 | |||
| 2179996bff | |||
| 316bcc89ea | |||
| 17f41f1563 | |||
| 6a17b88283 | |||
| ce151e5db7 | |||
| b303fe2615 | |||
| 6f248ec645 | |||
| 3e0d43c1d8 | |||
| 70b1822446 | |||
| 17d6ced974 | |||
| db145af965 | |||
| 037fdb41b6 | |||
| f89fe7fefd | |||
| 6ecbd7f545 | |||
| 734f480f67 | |||
| 87fa5cc6dd | |||
| 5b00409abe | |||
| 0f3b91e847 | |||
| 3befbecd3c | |||
| b6d2cc434c | |||
| 800a589285 | |||
| 2618d3f14c | |||
| bb32a4e500 | |||
| 6d266819db | |||
| 3ce8965206 | |||
| d924f4c107 | |||
| b141bda34d | |||
| ecb599c5c1 | |||
| 957a012de5 | |||
| 12277387b6 | |||
| ac92d1b4df | |||
| 5fe84aa6fd | |||
| b3ec57fb79 | |||
| c5f8e1f3fd | |||
| 202a63329b | |||
| 8cdc527943 | |||
| 61bb35fda2 | |||
| ee70e8f4c2 | |||
| 4d0e700d50 | |||
| 4432893794 | |||
| 9fa98d78a5 | |||
| e1d166375a | |||
| 4e669bc577 | |||
| 73a1caf1d0 | |||
| 322497121d | |||
| 468270cbab | |||
| 71ce283bad | |||
| 576d547a85 | |||
| a79316f290 | |||
| 51ee7a0c92 | |||
| 237eeb8871 | |||
| abe1b3a430 | |||
| 7e205a6424 | |||
| a7d7c66e2b | |||
| 7bb35e4694 | |||
| 65e72391d8 | |||
| 32e4d6d76b | |||
| 59b9354551 | |||
| 7315166ca7 | |||
| b9875ba243 | |||
| f7bcdff766 | |||
| 47b98c6392 | |||
| a0f5585391 | |||
| a6457ece76 | |||
| e93c4e41a3 | |||
| abaf1ac3a8 | |||
| ed4fc25c5d | |||
| d1d48bf8a4 | |||
| 4e0d362b36 | |||
| 1afdc8551f | |||
| d17cd8d2d8 | |||
| cc11ab463f | |||
| d322dc192d | |||
| 24ab2e0ba8 | |||
| 8aec6c87b0 | |||
| 24fa5e089a | |||
| 29eae5517a | |||
| 1ce036a0f6 | |||
| dd5dd7c93c | |||
| 393559d41a | |||
| 45f6639dcd | |||
| de989f5762 | |||
| c33d6c1e77 | |||
| a1b2158404 | |||
| 05e94943e0 | |||
| 6bba5143f9 | |||
| 3957f66ec1 | |||
| 46f7e78efc | |||
| 02a8e3a274 | |||
| 00bbe3ad70 | |||
| f81970accc | |||
| 165ed71234 | |||
| 01b04e6a9d | |||
| 8a8ff33110 | |||
| 4ca3b4ee47 | |||
| 6b6031379b | |||
| 7e96fb2385 | |||
| 7ee4a2e552 | |||
| 105a12c497 | |||
| e0f380ed1d | |||
| a568c614fb | |||
| 6dc5fe5a12 | |||
| a1db5945df | |||
| fba8b377f9 | |||
| 401b171c4e | |||
| 3285d72817 | |||
| 17229ab9bc | |||
| c3abca3cee | |||
| 2e0f2eab1b | |||
| 9c60ef020f | |||
| 58c62ebd5c | |||
| ab525c7431 | |||
| 613b9fa725 | |||
| e4e20b9f91 | |||
| ca6a468cda | |||
| 24ddd7d245 | |||
| f9fd0f0168 | |||
| eac7b0999a | |||
| a464e0dc3b | |||
| 401af44bb5 | |||
| 1599515d58 | |||
| 0be1695246 | |||
| a79725783f | |||
| f13a51e8a1 | |||
| b77ed406ae | |||
| bb650afe9c | |||
| 1d87ac5c47 | |||
| fc3053df66 | |||
| 588ef08b17 | |||
| ebdaeece85 | |||
| 1605f81090 | |||
| a10703fe94 | |||
| a0575cbbac | |||
| 8180ffaeaa | |||
| 848783078c | |||
| 45f0245f9f | |||
| a81a7f8d9e | |||
| ca0210cf09 | |||
| 622912dec3 | |||
| 8ed35a5c46 | |||
| a2bbcfed95 | |||
| 0667da3692 | |||
| 5ff39c9d1c | |||
| 60a666c1c1 | |||
| df47692e8e | |||
| 5f2d03cbcb | |||
| 5255fad7fc | |||
| 41903872b1 | |||
| beb3ce841b | |||
| 4a2da4ac41 | |||
| 869b459c3b | |||
| aa84b2c8ab | |||
| 555d2d029f | |||
| 749fb2d949 | |||
| 5b3e73290c | |||
| 854519b706 | |||
| d8179b47ee | |||
| f68e141449 | |||
| 011c94cc6b | |||
| 64da46c0a4 | |||
| aab81c6af7 | |||
| 46be644285 | |||
| 5fe75b78e5 | |||
| eafe6184eb | |||
| 1bf42ebbc1 | |||
| 0e35e41c4a | |||
| 64e3fd83de | |||
| e5e74a6afd | |||
| 28deac8501 | |||
| 367a8c9fc3 | |||
| 0717546ad0 | |||
| 3bf1a87688 | |||
| 6d82b6efee | |||
| 94102172dd | |||
| 82426db72a | |||
| 20fd722dee | |||
| c83b3e6bea | |||
| a45613ff39 | |||
| 84690ddf32 | |||
| 844cb3cfe6 | |||
| ee84a57194 | |||
| efa1cb1272 | |||
| 1437d20353 | |||
| 3d4a921719 | |||
| e26d68b0f3 | |||
| 7815b7ec89 | |||
| 66051943c7 | |||
| 2e9071569a | |||
| 813d224f50 | |||
| 5f03a36df2 | |||
| ac9c347bc0 | |||
| 9784c75766 | |||
| 8af69e553d | |||
| 3128f89f63 | |||
| 56884c34f2 | |||
| 332b17e55e | |||
| 4aaf1d084e | |||
| 4bcbe8d290 | |||
| 8484087c69 | |||
| 116289cac5 | |||
| 30ee1bcf99 | |||
| a1d7983704 | |||
| 636d3a9eca | |||
| bd70bf1ec9 | |||
| d66b331478 | |||
| aecb8ed442 | |||
| 3e72b216a6 | |||
| 5baa701681 | |||
| e3a1330889 | |||
| aa237fd744 | |||
| ccfc8f89e4 | |||
| a2e28fa134 | |||
| d8c16a34f0 | |||
| 1847154a29 | |||
| 2362c8df61 | |||
| 54127e61ec | |||
| aaa39c3779 | |||
| 78fc3118ab | |||
| 4ff2ac1063 | |||
| edab1024c3 | |||
| 5092385ea4 | |||
| 6cde63cd2e | |||
| 4f12bce90a | |||
| 0107fc022b | |||
| a69418c6f5 | |||
| c79e1b0327 | |||
| 915d3c0408 | |||
| f53b6e0bd5 | |||
| fc7b4d276c | |||
| 95460ecbb2 | |||
| dc31665029 | |||
| e98e9ed416 | |||
| de203b55fa | |||
| 0a8dbb3557 | |||
| 1f66a8f4ef | |||
| 93b432284d | |||
| 677c3af3b7 | |||
| eb22771d06 | |||
| 2710d72a73 | |||
| ccfb1a5179 | |||
| 26e00416c5 | |||
| 73ebd3ecdb | |||
| 02acc77521 | |||
| 7f7c63bc07 | |||
| 22560f434e | |||
| d0c8e3e88b | |||
| 1f184a6f7f | |||
| ea06fe1a9f | |||
| 5025c6a134 | |||
| f66e5d6da9 | |||
| ed6c36bff4 | |||
| 50889df91e | |||
| 75e3c023ad | |||
| d57075b065 | |||
| c3c24cd8e6 | |||
| 63e708d601 | |||
| 0849514253 | |||
| 703b7c0bad | |||
| a9235820c5 | |||
| ba59163234 | |||
| e1897e68b0 | |||
| 86821914b1 | |||
| 46abf5ca91 | |||
| 01a9ebf53b | |||
| e01fbbc35a | |||
| c9356a3889 | |||
| 4ce940bb0a | |||
| fd8ac8f528 | |||
| f07cfdc9dc | |||
| 4f060f3d3d | |||
| 7169fa1fd6 | |||
| 6b89e4067c | |||
| 4ac0507050 | |||
| a6a4f29bba | |||
| 0c9b37742a | |||
| ef5c98020e | |||
| c2a1fa3fdc | |||
| 319275f43c | |||
| 61d238e196 | |||
| 0900728bbf | |||
| c4ac9e6770 | |||
| ee83a453e7 | |||
| 9109a8cfb7 | |||
| f1ab1f1e77 | |||
| 7596849254 | |||
| e12eb2599e | |||
| a0754265ac | |||
| 1645a39506 | |||
| 9e2c2c1b98 | |||
| 51f15818c2 | |||
| b0081241d8 | |||
| 173230df5a | |||
| 22afb6edcd | |||
| 9c8faf25bf | |||
| 58775595c7 | |||
| 367ac62fc8 | |||
| 9750fdfe75 | |||
| 39bc4f55ea | |||
| 803a7bdbfc | |||
| 1473298705 | |||
| 4be7087a1b | |||
| 7c990987e8 | |||
| 3837895350 | |||
| e5195c5c5c | |||
| 17ed0b3807 | |||
| e11722f598 | |||
| 9644529618 | |||
| 0eb6897c08 | |||
| 8462554421 | |||
| 446df8f37f | |||
| 2919cc2dde | |||
| 093f882118 | |||
| f908f073af | |||
| dc0a2f1934 | |||
| 6366aa7938 | |||
| 696ceabb17 | |||
| c55d9b48d3 | |||
| 8c35871e34 | |||
| 4390dbdce8 | |||
| 8d4785334a | |||
| 7cf5a88b23 | |||
| e587cd9d45 | |||
| 973157a0de | |||
| 7ccb7fb96f | |||
| 9a751d0524 | |||
| 0e25b456bf | |||
| 4c8394f22d | |||
| ed3e14229f | |||
| 81f6fa88da | |||
| adbc811206 | |||
| 94866ce13d | |||
| c336390baf | |||
| 0686d543bb | |||
| 58c00878a8 | |||
| 992686a5a2 | |||
| 4cd9b70cf2 | |||
| 140d2bc226 | |||
| 5b2b39789d | |||
| 3c796aeefa | |||
| 2bcab0bbf1 | |||
| df41408ec9 | |||
| 9a2084c216 | |||
| 52844c8d75 | |||
| ad74579ee6 | |||
| f3f9db7bb7 | |||
| 2900aa98f8 | |||
| 153374cd5d | |||
| 1076abd8de | |||
| 0e260a570e | |||
| 59176a1269 | |||
| 2e2de2ade4 | |||
| b6f19b04cb | |||
| 7289e84d7b | |||
| c5757cb3c7 | |||
| 311f6fca99 | |||
| 0efe5b51e4 | |||
| 38bf52893b | |||
| d4b49699c8 | |||
| 09e8c0f6b4 | |||
| 03fdc33be0 | |||
| 50c3eac8fe | |||
| 004258a469 | |||
| ce83d8ee49 | |||
| 9db1f5085c | |||
| 49435ba828 | |||
| 6e963ad6a2 | |||
| 4d12d4a129 | |||
| c46b7d1aa0 | |||
| 08d71ecec2 | |||
| 9f4448220e | |||
| 6117963ac1 | |||
| 941fa96d03 | |||
| 9f995079e2 | |||
| 604f0f744c | |||
| 185cfffe71 | |||
| 289c58f867 | |||
| 8ee25d6883 | |||
| cd946a7353 | |||
| bdefedae39 | |||
| 2a07343685 | |||
| b5ed38e20f | |||
| 6507ef0a97 | |||
| ab33dbcc46 | |||
| 17f1bc1b20 | |||
| 97c99d3114 | |||
| cecbacd614 | |||
| 7c8dccfa57 | |||
| fb0436d090 | |||
| aa83984a15 | |||
| 27feb8a7cc | |||
| 0edda465f1 | |||
| 8bc2076027 | |||
| 174738f252 | |||
| 9112fb5691 | |||
| db608e6c0e | |||
| 5ce753e4b7 | |||
| d7445f828a | |||
| ca4eb016a5 | |||
| ea48c05112 | |||
| 3f6e8fbbeb | |||
| e52a56a683 | |||
| 3d44bbaa5c | |||
| 5d75e658fb | |||
| fc68efd4f4 | |||
| 191a973ee3 | |||
| e3f628a07d | |||
| 8b57174267 | |||
| 2035c83062 | |||
| 3aa9129acc | |||
| 8ccfda96f8 | |||
| 8a67feab0f | |||
| f76d91fc20 | |||
| 372b084d53 | |||
| 00f30c943c | |||
| 4418d53557 | |||
| 0fe95e4ccc | |||
| c2d150b402 | |||
| efba122f14 | |||
| ed19ade967 | |||
| 80857bb4e1 | |||
| 584a635ff4 | |||
| f1ddce36d8 | |||
| 8aae4ff8d0 | |||
| 01e0fa3a9c | |||
| 27bfef3fc1 | |||
| 6db4dd995f |
@@ -23,7 +23,8 @@
|
|||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.25*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.25*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.25*"/>
|
<RowDefinition Height="0.25*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
@@ -44,13 +45,17 @@
|
|||||||
VerticalAlignment="Center" FontSize="18"/>
|
VerticalAlignment="Center" FontSize="18"/>
|
||||||
<TextBlock Name="KeyLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
|
<TextBlock Name="KeyLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" FontSize="18"/>
|
VerticalAlignment="Center" FontSize="18"/>
|
||||||
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
|
|
||||||
|
<TextBlock Name="AssStatusLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" FontSize="18"/>
|
VerticalAlignment="Center" FontSize="18"/>
|
||||||
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
|
|
||||||
|
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" FontSize="18"/>
|
VerticalAlignment="Center" FontSize="18"/>
|
||||||
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
|
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center" FontSize="18"/>
|
||||||
|
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="9" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" FontSize="15" />
|
VerticalAlignment="Center" FontSize="15" />
|
||||||
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="10" IsCancel="True"
|
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="11" IsCancel="True"
|
||||||
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
|
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -33,6 +33,19 @@ Public Class AboutBoxWD
|
|||||||
#Else
|
#Else
|
||||||
KeyLbl.Text = sKey & " - " & sOpts
|
KeyLbl.Text = sKey & " - " & sOpts
|
||||||
#End If
|
#End If
|
||||||
|
' COPIATO da codice CAM5
|
||||||
|
Dim sAssStatus As String = " discontinued"
|
||||||
|
Dim nAssLeftDays As Integer
|
||||||
|
If EgtGetKeyAssLeftDays(nAssLeftDays) And nAssLeftDays >= 0 Then
|
||||||
|
If nAssLeftDays > 30 Then
|
||||||
|
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
|
||||||
|
ElseIf nAssLeftDays > 0 Then
|
||||||
|
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
|
||||||
|
Else
|
||||||
|
sAssStatus = "to be renewed by today"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
AssStatusLbl.Text = sAssStatus
|
||||||
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||||
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
|
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
|
||||||
ProjectLbl.Text = "Project : " & m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
|
ProjectLbl.Text = "Project : " & m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
|
||||||
|
|||||||
+142
-3
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports System.Windows.Forms.Integration
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
Friend Module CamAuto
|
Friend Module CamAuto
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ Friend Module CamAuto
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function AddWaterJetMachining( nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
Friend Function AddWaterJetMachining(nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||||
EgtLuaCreateGlobTable("CAM")
|
EgtLuaCreateGlobTable("CAM")
|
||||||
SetLuaStandardCamParams()
|
SetLuaStandardCamParams()
|
||||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||||
@@ -93,7 +94,7 @@ Friend Module CamAuto
|
|||||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
||||||
' Reinserisco tutte le lavorazioni piane
|
' Reinserisco tutte le lavorazioni piane
|
||||||
AddMachinings(GDB_ID.NULL, nWarn)
|
AddMachinings(GDB_ID.NULL, nWarn)
|
||||||
' Se altrimenti progetto con cornici
|
' Se altrimenti progetto con cornici
|
||||||
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
||||||
' Reinserisco tutte le lavorazioni delle cornici
|
' Reinserisco tutte le lavorazioni delle cornici
|
||||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||||
@@ -101,6 +102,137 @@ Friend Module CamAuto
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function ResetAllSplitCurv() As Boolean
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||||
|
While nIdPart <> GDB_ID.NULL
|
||||||
|
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||||
|
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
|
||||||
|
EgtErase(IdAuxLayer)
|
||||||
|
' accedo al Layer OutLoop
|
||||||
|
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||||
|
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||||
|
While nIdMy <> GDB_ID.NULL
|
||||||
|
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||||
|
nIdMy = EgtGetNext(nIdMy)
|
||||||
|
End While
|
||||||
|
nIdPart = EgtGetNextPart(nIdPart)
|
||||||
|
End While
|
||||||
|
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||||
|
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||||
|
While nIdPart <> GDB_ID.NULL
|
||||||
|
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||||
|
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
|
||||||
|
EgtErase(IdAuxLayer)
|
||||||
|
' accedo al Layer OutLoop
|
||||||
|
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||||
|
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||||
|
While nIdMy <> GDB_ID.NULL
|
||||||
|
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||||
|
nIdMy = EgtGetNext(nIdMy)
|
||||||
|
End While
|
||||||
|
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||||
|
End While
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function ResetAllStartCurv() As Boolean
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||||
|
While nIdPart <> GDB_ID.NULL
|
||||||
|
' accedo al Layer OutLoop
|
||||||
|
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||||
|
EgtRemoveInfo(nIdLayerOutLoop, INFO_START)
|
||||||
|
nIdPart = EgtGetNextPart(nIdPart)
|
||||||
|
End While
|
||||||
|
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||||
|
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||||
|
While nIdPart <> GDB_ID.NULL
|
||||||
|
' accedo al Layer OutLoop
|
||||||
|
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||||
|
EgtRemoveInfo(nIdLayerOutLoop, INFO_START)
|
||||||
|
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||||
|
End While
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function ResetAllBRidges() As Boolean
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
Dim nMachGroup As Integer = EgtGetCurrMachGroup()
|
||||||
|
Dim nBridgesGroup As Integer = EgtGetFirstNameInGroup(nMachGroup, "Bridges")
|
||||||
|
bOk = EgtErase(nBridgesGroup)
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function ResetAllSplitCut() As Boolean
|
||||||
|
Dim PartList As New List(Of Integer)
|
||||||
|
' Ricerca nei grezzi dei pezzi (devono essere ricercati tra quelli presenti nei grezzi)
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
' Recupero il numero di fasi presenti nel progetto
|
||||||
|
Dim nPhaseCount As Integer = EgtGetPhaseCount()
|
||||||
|
For nPhase As Integer = 1 To nPhaseCount
|
||||||
|
EgtSetCurrPhase(nPhase)
|
||||||
|
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||||
|
While nRawId <> GDB_ID.NULL
|
||||||
|
Dim nParId As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||||
|
If EgtVerifyRawPartPhase(nRawId, nPhase) Then
|
||||||
|
While nParId <> GDB_ID.NULL
|
||||||
|
Dim nNextParId As Integer = EgtGetNextPartInRawPart(nParId)
|
||||||
|
' verifico se il pezzo passato è un taglio di sepatazione (il nome deve contenere "SpliCut")
|
||||||
|
Dim sName As String = String.Empty
|
||||||
|
If EgtGetName(nParId, sName) AndAlso sName.Contains(SPLIT_CUT) Then
|
||||||
|
' Rimuovo il pezzo dal grezzo
|
||||||
|
If EgtRemovePartFromRawPart(nParId) Then
|
||||||
|
' Salvo l'indice del pezzo se non è stato già inserito
|
||||||
|
Dim nIndex As Integer = PartList.FirstOrDefault(Function(nId) nId = nParId)
|
||||||
|
If nIndex = 0 Then PartList.Add(nParId)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nParId = nNextParId
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
nRawId = EgtGetNextRawPart(nRawId)
|
||||||
|
End While
|
||||||
|
Next
|
||||||
|
' Reimposto la prima fase del progetto
|
||||||
|
EgtSetCurrPhase(1)
|
||||||
|
' Procedo ad eliminare il pezzo
|
||||||
|
For Each Item As Integer In PartList
|
||||||
|
bOk = bOk And EgtErase(Item)
|
||||||
|
Next
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function ResetAllRawPart() As Boolean
|
||||||
|
Dim nPhase As Integer = 1
|
||||||
|
Dim nOtherRaw As Integer = EgtGetFirstRawPart()
|
||||||
|
While nOtherRaw <> GDB_ID.NULL
|
||||||
|
' se il pezzo non appartiene alla prima fase allora viene eliminato
|
||||||
|
If Not EgtVerifyRawPartPhase(nOtherRaw, nPhase) Then
|
||||||
|
Dim NextRaw As Integer = EgtGetNextRawPart(nOtherRaw)
|
||||||
|
EgtRemoveRawPart(nOtherRaw)
|
||||||
|
nOtherRaw = NextRaw
|
||||||
|
Else
|
||||||
|
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' verifico che il contorno passato non sia stato separato
|
||||||
|
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer)
|
||||||
|
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||||
|
While nIdMy <> GDB_ID.NULL
|
||||||
|
Dim nValInfo As Integer = 1
|
||||||
|
If EgtGetInfo(nIdMy, INFO_JOINENTITY, nValInfo) Then
|
||||||
|
If nValInfo = 0 Then Return False
|
||||||
|
End If
|
||||||
|
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||||
|
nIdMy = EgtGetNext(nIdMy)
|
||||||
|
End While
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function RemoveFinalEmptyPhases() As Boolean
|
Friend Function RemoveFinalEmptyPhases() As Boolean
|
||||||
Dim nOpeId As Integer = EgtGetLastOperation()
|
Dim nOpeId As Integer = EgtGetLastOperation()
|
||||||
While nOpeId <> GDB_ID.NULL
|
While nOpeId <> GDB_ID.NULL
|
||||||
@@ -674,6 +806,9 @@ Friend Module CamAuto
|
|||||||
End If
|
End If
|
||||||
' Lo sposto dalla lavorazione al pezzo
|
' Lo sposto dalla lavorazione al pezzo
|
||||||
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
||||||
|
|
||||||
|
If nId = GDB_ID.NULL Then Return False
|
||||||
|
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
EgtRelocateGlob(nId, nPartPvId)
|
EgtRelocateGlob(nId, nPartPvId)
|
||||||
nId = EgtGetFirstInGroup(nMchPvId)
|
nId = EgtGetFirstInGroup(nMchPvId)
|
||||||
@@ -719,10 +854,12 @@ Friend Module CamAuto
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||||
|
Dim sMaterial As String = m_MainWindow.m_CurrentMachine.CurrMat.sName
|
||||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||||
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||||
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||||
|
Dim sWaterJetQual As String = m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
||||||
Dim sPocketMch As String = m_MainWindow.m_CurrentMachine.sCurrPocketing
|
Dim sPocketMch As String = m_MainWindow.m_CurrentMachine.sCurrPocketing
|
||||||
Dim sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
|
Dim sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
|
||||||
Dim sDripDrillMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripDrilling, "")
|
Dim sDripDrillMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripDrilling, "")
|
||||||
@@ -735,11 +872,13 @@ Friend Module CamAuto
|
|||||||
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||||
|
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
||||||
|
EgtLuaSetGlobStringVar("CAM.WATERJETQLTY", sWaterJetQual)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
||||||
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
||||||
|
|||||||
+82
-3
@@ -1,5 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Friend Module CSVFile
|
Friend Module CSVFile
|
||||||
|
|
||||||
@@ -7,6 +7,7 @@ Friend Module CSVFile
|
|||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
Friend Class CsvPart
|
Friend Class CsvPart
|
||||||
|
Public m_sPath As String = String.Empty
|
||||||
Public m_sName As String = String.Empty
|
Public m_sName As String = String.Empty
|
||||||
Public m_sOrd As String = String.Empty
|
Public m_sOrd As String = String.Empty
|
||||||
Public m_sDist As String = String.Empty
|
Public m_sDist As String = String.Empty
|
||||||
@@ -19,8 +20,20 @@ Friend Module CSVFile
|
|||||||
Public m_dDimX As Double = 0
|
Public m_dDimX As Double = 0
|
||||||
Public m_dDimY As Double = 0
|
Public m_dDimY As Double = 0
|
||||||
Public m_dTh As Double = 0
|
Public m_dTh As Double = 0
|
||||||
|
Public m_dAng1 As Double = 0
|
||||||
|
Public m_dHeel1 As Double = 0
|
||||||
|
Public m_dAng2 As Double = 0
|
||||||
|
Public m_dHeel2 As Double = 0
|
||||||
|
Public m_dAng3 As Double = 0
|
||||||
|
Public m_dHeel3 As Double = 0
|
||||||
|
Public m_dAng4 As Double = 0
|
||||||
|
Public m_dHeel4 As Double = 0
|
||||||
Public m_nOriInd As Integer = 0
|
Public m_nOriInd As Integer = 0
|
||||||
Public m_nId As Integer = GDB_ID.NULL
|
Public m_nId As Integer = GDB_ID.NULL
|
||||||
|
' definsco il riferimento al gruppo
|
||||||
|
Public m_sRefGuid As String = System.Guid.NewGuid.ToString
|
||||||
|
' definisco il colore del gruppo che sto inserendo
|
||||||
|
Public m_cColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
@@ -51,6 +64,7 @@ Friend Module CSVFile
|
|||||||
For i As Integer = 1 To nNbr
|
For i As Integer = 1 To nNbr
|
||||||
Dim OnePart As New CsvPart
|
Dim OnePart As New CsvPart
|
||||||
Dim sN As String = i.ToString()
|
Dim sN As String = i.ToString()
|
||||||
|
OnePart.m_sPath = sFile
|
||||||
EgtLuaGetGlobStringVar("CSV.NAME" & sN, OnePart.m_sName)
|
EgtLuaGetGlobStringVar("CSV.NAME" & sN, OnePart.m_sName)
|
||||||
OnePart.m_bActive = True
|
OnePart.m_bActive = True
|
||||||
EgtLuaGetGlobStringVar("CSV.ORD" & sN, OnePart.m_sOrd)
|
EgtLuaGetGlobStringVar("CSV.ORD" & sN, OnePart.m_sOrd)
|
||||||
@@ -62,7 +76,18 @@ Friend Module CSVFile
|
|||||||
EgtLuaGetGlobNumVar("CSV.DIMX" & sN, OnePart.m_dDimX)
|
EgtLuaGetGlobNumVar("CSV.DIMX" & sN, OnePart.m_dDimX)
|
||||||
EgtLuaGetGlobNumVar("CSV.DIMY" & sN, OnePart.m_dDimY)
|
EgtLuaGetGlobNumVar("CSV.DIMY" & sN, OnePart.m_dDimY)
|
||||||
EgtLuaGetGlobNumVar("CSV.TH" & sN, OnePart.m_dTh)
|
EgtLuaGetGlobNumVar("CSV.TH" & sN, OnePart.m_dTh)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.A1_" & sN, OnePart.m_dAng1)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.H1_" & sN, OnePart.m_dHeel1)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.A2_" & sN, OnePart.m_dAng2)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.H2_" & sN, OnePart.m_dHeel2)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.A3_" & sN, OnePart.m_dAng3)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.H3_" & sN, OnePart.m_dHeel3)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.A4_" & sN, OnePart.m_dAng4)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.H4_" & sN, OnePart.m_dHeel4)
|
||||||
OnePart.m_nOriInd = i
|
OnePart.m_nOriInd = i
|
||||||
|
If OnePart.m_nCount > 1 Then
|
||||||
|
OnePart.m_sRefGuid = System.Guid.NewGuid.ToString
|
||||||
|
End If
|
||||||
' inserisco in lista
|
' inserisco in lista
|
||||||
CsvPartList.Add(OnePart)
|
CsvPartList.Add(OnePart)
|
||||||
Next
|
Next
|
||||||
@@ -123,7 +148,9 @@ Friend Module CSVFile
|
|||||||
Else
|
Else
|
||||||
Dim sItems() As String = sLine.Split("=".ToCharArray)
|
Dim sItems() As String = sLine.Split("=".ToCharArray)
|
||||||
If sItems.Count() >= 2 Then
|
If sItems.Count() >= 2 Then
|
||||||
If sItems(0) = "Nam" Then
|
If sItems(0) = "Path" Then
|
||||||
|
OnePart.m_sPath = sItems(1)
|
||||||
|
ElseIf sItems(0) = "Nam" Then
|
||||||
OnePart.m_sName = sItems(1)
|
OnePart.m_sName = sItems(1)
|
||||||
ElseIf sItems(0) = "Ord" Then
|
ElseIf sItems(0) = "Ord" Then
|
||||||
OnePart.m_sOrd = sItems(1)
|
OnePart.m_sOrd = sItems(1)
|
||||||
@@ -147,8 +174,26 @@ Friend Module CSVFile
|
|||||||
StringToDouble(sItems(1), OnePart.m_dDimY)
|
StringToDouble(sItems(1), OnePart.m_dDimY)
|
||||||
ElseIf sItems(0) = "Th" Then
|
ElseIf sItems(0) = "Th" Then
|
||||||
StringToDouble(sItems(1), OnePart.m_dTh)
|
StringToDouble(sItems(1), OnePart.m_dTh)
|
||||||
|
ElseIf sItems(0) = "A1" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dAng1)
|
||||||
|
ElseIf sItems(0) = "H1" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dHeel1)
|
||||||
|
ElseIf sItems(0) = "A2" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dAng2)
|
||||||
|
ElseIf sItems(0) = "H2" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dHeel2)
|
||||||
|
ElseIf sItems(0) = "A3" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dAng3)
|
||||||
|
ElseIf sItems(0) = "H3" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dHeel3)
|
||||||
|
ElseIf sItems(0) = "A4" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dAng4)
|
||||||
|
ElseIf sItems(0) = "H4" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dHeel4)
|
||||||
ElseIf sItems(0) = "OIn" Then
|
ElseIf sItems(0) = "OIn" Then
|
||||||
StringToInt(sItems(1), OnePart.m_nOriInd)
|
StringToInt(sItems(1), OnePart.m_nOriInd)
|
||||||
|
ElseIf sItems(0) = "Guid" Then
|
||||||
|
OnePart.m_sRefGuid = sItems(1).Trim
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -176,6 +221,7 @@ Friend Module CSVFile
|
|||||||
For i As Integer = 1 To CsvPartList.Count()
|
For i As Integer = 1 To CsvPartList.Count()
|
||||||
Dim CurrPart As CsvPart = CsvPartList(i - 1)
|
Dim CurrPart As CsvPart = CsvPartList(i - 1)
|
||||||
Writer.WriteLine("[P" & i.ToString() & "]")
|
Writer.WriteLine("[P" & i.ToString() & "]")
|
||||||
|
Writer.WriteLine("Path=" & CurrPart.m_sPath)
|
||||||
Writer.WriteLine("Nam=" & CurrPart.m_sName)
|
Writer.WriteLine("Nam=" & CurrPart.m_sName)
|
||||||
Writer.WriteLine("Ord=" & CurrPart.m_sOrd)
|
Writer.WriteLine("Ord=" & CurrPart.m_sOrd)
|
||||||
Writer.WriteLine("Dist=" & CurrPart.m_sDist)
|
Writer.WriteLine("Dist=" & CurrPart.m_sDist)
|
||||||
@@ -188,20 +234,53 @@ Friend Module CSVFile
|
|||||||
Writer.WriteLine("DX=" & DoubleToString(CurrPart.m_dDimX, 4))
|
Writer.WriteLine("DX=" & DoubleToString(CurrPart.m_dDimX, 4))
|
||||||
Writer.WriteLine("DY=" & DoubleToString(CurrPart.m_dDimY, 4))
|
Writer.WriteLine("DY=" & DoubleToString(CurrPart.m_dDimY, 4))
|
||||||
Writer.WriteLine("Th=" & DoubleToString(CurrPart.m_dTh, 4))
|
Writer.WriteLine("Th=" & DoubleToString(CurrPart.m_dTh, 4))
|
||||||
|
Writer.WriteLine("A1=" & DoubleToString(CurrPart.m_dAng1, 4))
|
||||||
|
Writer.WriteLine("H1=" & DoubleToString(CurrPart.m_dHeel1, 4))
|
||||||
|
Writer.WriteLine("A2=" & DoubleToString(CurrPart.m_dAng2, 4))
|
||||||
|
Writer.WriteLine("H2=" & DoubleToString(CurrPart.m_dHeel2, 4))
|
||||||
|
Writer.WriteLine("A3=" & DoubleToString(CurrPart.m_dAng3, 4))
|
||||||
|
Writer.WriteLine("H3=" & DoubleToString(CurrPart.m_dHeel3, 4))
|
||||||
|
Writer.WriteLine("A4=" & DoubleToString(CurrPart.m_dAng4, 4))
|
||||||
|
Writer.WriteLine("H4=" & DoubleToString(CurrPart.m_dHeel4, 4))
|
||||||
Writer.WriteLine("OIn=" & CurrPart.m_nOriInd.ToString())
|
Writer.WriteLine("OIn=" & CurrPart.m_nOriInd.ToString())
|
||||||
|
Writer.WriteLine("Guid=" & CurrPart.m_sRefGuid)
|
||||||
Next
|
Next
|
||||||
' Terminatore
|
' Terminatore
|
||||||
Writer.WriteLine("[END]")
|
Writer.WriteLine("[END]")
|
||||||
' Chiudo file
|
' Chiudo file
|
||||||
Writer.Close()
|
Writer.Close()
|
||||||
Return True
|
Return True
|
||||||
' Errore
|
' Errore
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
EgtOutLog("CSV List error writing " & sFile)
|
EgtOutLog("CSV List error writing " & sFile)
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' dato l'elenco completo dei file salvo ogni singolo epl
|
||||||
|
Friend Function WriteCsvMergePartList(CsvPartList As List(Of CsvPart)) As Boolean
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
Dim LocalPartList As New List(Of CsvPart)
|
||||||
|
Dim Index As Integer = 0
|
||||||
|
' devo dividere la lista in tante parti quanti sono i file che lo costituiscono
|
||||||
|
While Index < CsvPartList.Count
|
||||||
|
Dim CurrFile As String = CsvPartList(Index).m_sPath
|
||||||
|
Dim sFile As String = Path.ChangeExtension(CurrFile, ".epl")
|
||||||
|
LocalPartList.Clear()
|
||||||
|
While CurrFile = CsvPartList(Index).m_sPath
|
||||||
|
LocalPartList.Add(CsvPartList(Index))
|
||||||
|
Index += 1
|
||||||
|
' se terminata la lista
|
||||||
|
If Index = CsvPartList.Count Then
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
' salvo l'elenco corrente
|
||||||
|
bOk = WriteCsvPartList(sFile, CurrFile, LocalPartList) And bOk
|
||||||
|
End While
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function RemoveNotToNestParts(ByRef CsvPartList As List(Of CsvPart)) As Boolean
|
Friend Function RemoveNotToNestParts(ByRef CsvPartList As List(Of CsvPart)) As Boolean
|
||||||
For i As Integer = CsvPartList.Count() - 1 To 0 Step -1
|
For i As Integer = CsvPartList.Count() - 1 To 0 Step -1
|
||||||
If CsvPartList(i).m_nToNest = 0 Then
|
If CsvPartList(i).m_nToNest = 0 Then
|
||||||
|
|||||||
+265
-39
@@ -11,7 +11,7 @@ Public Class CSVPage
|
|||||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||||
' Flag di pagina attiva
|
' Flag di pagina attiva
|
||||||
Private m_bActive As Boolean = False
|
Private m_bActive As Boolean = False
|
||||||
' Flag tipologia
|
' Flag tipologia (False -> Cvs semplificato)
|
||||||
Private m_bFull As Boolean = False
|
Private m_bFull As Boolean = False
|
||||||
' Flag inserimento diretto
|
' Flag inserimento diretto
|
||||||
Private m_bDirect As Boolean = True
|
Private m_bDirect As Boolean = True
|
||||||
@@ -28,6 +28,10 @@ Public Class CSVPage
|
|||||||
Private m_ptRawMin As Point3d
|
Private m_ptRawMin As Point3d
|
||||||
Private m_ptRawMax As Point3d
|
Private m_ptRawMax As Point3d
|
||||||
|
|
||||||
|
Dim m_bIsCounterLy As Boolean = False
|
||||||
|
Dim m_nCurrNubrOfParts As Integer = 0
|
||||||
|
Dim m_nIdToSel As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
Private Sub CSVPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub CSVPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Assegno la lista dei pezzi Csv come sorgente del treeview
|
' Assegno la lista dei pezzi Csv come sorgente del treeview
|
||||||
PartsTreeView.ItemsSource = m_ItemsList
|
PartsTreeView.ItemsSource = m_ItemsList
|
||||||
@@ -101,13 +105,36 @@ Public Class CSVPage
|
|||||||
If EgtIsPart(nPartId) Or bPartInTable Then
|
If EgtIsPart(nPartId) Or bPartInTable Then
|
||||||
Dim nStat As Integer = GDB_ST.ON_
|
Dim nStat As Integer = GDB_ST.ON_
|
||||||
EgtGetStatus(nPartId, nStat)
|
EgtGetStatus(nPartId, nStat)
|
||||||
' Se già selezionato, lo deselezione
|
|
||||||
If nStat = GDB_ST.SEL Then
|
' verifico se l'lemento selezionato è il numero di pezzi
|
||||||
EgtDeselectObj(nPartId)
|
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
||||||
' Altrimenti lo seleziono
|
Dim NameLayer As String = String.Empty
|
||||||
Else
|
EgtGetName(EgtGetParent(nId), NameLayer)
|
||||||
EgtSelectObj(nPartId)
|
If NameLayer = INFO_COUNTERLY Then
|
||||||
|
Dim sText As String = String.Empty
|
||||||
|
If EgtTextGetContent(nId, sText) Then
|
||||||
|
Dim sItems() As String = sText.Split("#")
|
||||||
|
If sItems.Count > 1 Then
|
||||||
|
m_nCurrNubrOfParts = 0
|
||||||
|
If StringToInt(sItems(1), m_nCurrNubrOfParts) And m_nCurrNubrOfParts > 0 Then
|
||||||
|
m_bIsCounterLy = True
|
||||||
|
m_nIdToSel = nPartId
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not m_bIsCounterLy Then
|
||||||
|
' Se già selezionato, lo deselezione
|
||||||
|
If nStat = GDB_ST.SEL Then
|
||||||
|
EgtDeselectObj(nPartId)
|
||||||
|
' Altrimenti lo seleziono
|
||||||
|
Else
|
||||||
|
EgtSelectObj(nPartId)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
nId = EgtGetNextObjInSelWin()
|
nId = EgtGetNextObjInSelWin()
|
||||||
@@ -115,6 +142,28 @@ Public Class CSVPage
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
|
||||||
|
If m_bIsCounterLy Then
|
||||||
|
' apro una finestra di dialogo per chiedere se inserire tutti i pezzi della famiglia
|
||||||
|
Dim SelectWD As New SelectPartFromFamilyWD(m_MainWindow, m_nCurrNubrOfParts)
|
||||||
|
Dim sRefGroup As String = String.Empty
|
||||||
|
EgtGetInfo(m_nIdToSel, INFO_REFGROUP, sRefGroup)
|
||||||
|
' deseleziono il pezzo corrente
|
||||||
|
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectPartInFaimily(sRefGroup)
|
||||||
|
Select Case SelectWD.NumberOfSelection
|
||||||
|
Case 0 ' Annulla
|
||||||
|
' continuo senza eseguire niente
|
||||||
|
Case Else
|
||||||
|
' seleziono il numero di pezzi indicati
|
||||||
|
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectPartInFaimily(sRefGroup, SelectWD.NumberOfSelection)
|
||||||
|
End Select
|
||||||
|
m_bIsCounterLy = False
|
||||||
|
' disassegno il riferimento all'oggetto appena creato
|
||||||
|
SelectWD = Nothing
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(Me)
|
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(Me)
|
||||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC.m_NestPage)
|
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC.m_NestPage)
|
||||||
@@ -133,15 +182,48 @@ Public Class CSVPage
|
|||||||
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, "", m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, "", m_MainWindow.GetIniFile())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function CreateListOfDeniedFiles() As List(Of String)
|
||||||
|
Dim LocalList As New List(Of String)
|
||||||
|
LocalList.Add("MERGE")
|
||||||
|
Dim Index1 As Integer = 0
|
||||||
|
Dim Index2 As Integer = 0
|
||||||
|
For Index1 = 0 To m_CsvPartList.Count - 1
|
||||||
|
Dim sFileName As String = m_CsvPartList(Index1).m_sPath
|
||||||
|
sFileName = Path.GetFileNameWithoutExtension(sFileName).ToUpper.Trim()
|
||||||
|
Dim bNewFile As Boolean = True
|
||||||
|
For Index2 = 0 To LocalList.Count - 1
|
||||||
|
If sFileName = LocalList(Index2) Then
|
||||||
|
bNewFile = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If bNewFile Then
|
||||||
|
LocalList.Add(Path.GetFileNameWithoutExtension(sFileName).ToUpper.Trim)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return LocalList
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub OpenBtn_Click(sender As Object, e As RoutedEventArgs) Handles OpenBtn.Click
|
Private Sub OpenBtn_Click(sender As Object, e As RoutedEventArgs) Handles OpenBtn.Click
|
||||||
' Salvo lista dei pezzi attuale
|
'' Salvo lista dei pezzi attuale
|
||||||
SaveCsvPartList()
|
'SaveCsvPartList()
|
||||||
' Leggo direttorio corrente dei file CSV
|
' Leggo direttorio corrente dei file CSV
|
||||||
Dim sCurrDir As String = ""
|
Dim sCurrDir As String = ""
|
||||||
GetPrivateProfileString(S_CSV, K_CSVCURRDIR, "C:\", sCurrDir, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_CSV, K_CSVCURRDIR, "C:\", sCurrDir, m_MainWindow.GetIniFile())
|
||||||
' Apro dialogo scelta file
|
' Apro dialogo scelta file
|
||||||
Dim OpenFileWnd As New OpenFileWD(m_MainWindow, sCurrDir, ".CSV", ".EPL")
|
Dim OpenFileWnd As OpenFileWD
|
||||||
|
Dim sDeniedFiles As List(Of String) = CreateListOfDeniedFiles()
|
||||||
|
' imposto il filtro
|
||||||
|
If m_bFull Then
|
||||||
|
OpenFileWnd = New OpenFileWD(m_MainWindow, sCurrDir, ".CSV", ".EPL", sDeniedFiles)
|
||||||
|
Else
|
||||||
|
OpenFileWnd = New OpenFileWD(m_MainWindow, sCurrDir, ".CSV")
|
||||||
|
End If
|
||||||
If Not OpenFileWnd.ShowDialog() Then Return
|
If Not OpenFileWnd.ShowDialog() Then Return
|
||||||
|
' verifico che il file inserito non appartenga al Merge attuale
|
||||||
|
|
||||||
|
' Salvo lista dei pezzi attuale
|
||||||
|
SaveCsvPartList()
|
||||||
' Salvo direttorio corrente
|
' Salvo direttorio corrente
|
||||||
WritePrivateProfileString(S_CSV, K_CSVCURRDIR, OpenFileWnd.GetFileDir(), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_CSV, K_CSVCURRDIR, OpenFileWnd.GetFileDir(), m_MainWindow.GetIniFile())
|
||||||
' Apertura file
|
' Apertura file
|
||||||
@@ -173,17 +255,28 @@ Public Class CSVPage
|
|||||||
' Pulisco path e lista dei pezzi Csv
|
' Pulisco path e lista dei pezzi Csv
|
||||||
m_sFilePath = String.Empty
|
m_sFilePath = String.Empty
|
||||||
m_sCsvPath = String.Empty
|
m_sCsvPath = String.Empty
|
||||||
m_CsvPartList.Clear()
|
|
||||||
|
' mantengo la lista attuale dei pezzi
|
||||||
|
'm_CsvPartList.Clear()
|
||||||
|
|
||||||
|
' aggiungo i pezzi su una lista temporanea
|
||||||
|
Dim LocalPartList As New List(Of CsvPart)
|
||||||
' Eseguo la lettura del file Csv
|
' Eseguo la lettura del file Csv
|
||||||
If Not ReadCsvFile(sCsvPath, m_bFull, m_sCsvPath, m_CsvPartList) Then
|
If Not ReadCsvFile(sCsvPath, m_bFull, m_sCsvPath, LocalPartList) Then
|
||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(91206)) 'Errore nella lettura del file CSV
|
m_CurrProjPage.SetErrorMessage(EgtMsg(91206)) 'Errore nella lettura del file CSV
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' Creo un nuovo file che ospitarà il merge de
|
||||||
|
Dim sNewMergeFile As String = Path.GetDirectoryName(m_sCsvPath) & "\Merge.csv"
|
||||||
|
m_sCsvPath = sNewMergeFile
|
||||||
m_sFilePath = m_sCsvPath
|
m_sFilePath = m_sCsvPath
|
||||||
|
|
||||||
' Elimino pezzi nulli
|
' Elimino pezzi nulli
|
||||||
RemoveWrongParts(m_CsvPartList)
|
RemoveWrongParts(LocalPartList)
|
||||||
' Aggiorno
|
' Aggiorno
|
||||||
If m_bFull Then
|
If m_bFull Then
|
||||||
|
MySaveCsvPartList(LocalPartList)
|
||||||
' Salvo come epl
|
' Salvo come epl
|
||||||
SaveCsvPartList()
|
SaveCsvPartList()
|
||||||
' Rinomino file originale
|
' Rinomino file originale
|
||||||
@@ -196,9 +289,40 @@ Public Class CSVPage
|
|||||||
' eseguo rinomina
|
' eseguo rinomina
|
||||||
My.Computer.FileSystem.RenameFile(sCsvPath, sBakName)
|
My.Computer.FileSystem.RenameFile(sCsvPath, sBakName)
|
||||||
End If
|
End If
|
||||||
|
' attacco i nuovi pezzi alla lista corrente
|
||||||
|
For Each Item As CsvPart In LocalPartList
|
||||||
|
m_CsvPartList.Add(Item)
|
||||||
|
Next
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub LoadCsvPartList(sFile As String)
|
||||||
|
' Se Csv semplificato non va letta
|
||||||
|
If Not m_bFull Then Return
|
||||||
|
' Pulisco path e lista dei pezzi Csv
|
||||||
|
m_sCsvPath = String.Empty
|
||||||
|
|
||||||
|
' mantengo la lista attuale dei pezzi
|
||||||
|
'm_CsvPartList.Clear()
|
||||||
|
|
||||||
|
' aggiungo i pezzi su una lista temporanea
|
||||||
|
Dim LocalPartList As New List(Of CsvPart)
|
||||||
|
|
||||||
|
' Lettura del file
|
||||||
|
If ReadCsvPartList(sFile, m_sCsvPath, LocalPartList) Then
|
||||||
|
' Creo un nuovo file che ospitarà il merge de
|
||||||
|
Dim sNewMergeFile As String = Path.GetDirectoryName(m_sCsvPath) & "\Merge.csv"
|
||||||
|
m_sCsvPath = sNewMergeFile
|
||||||
|
m_sFilePath = m_sCsvPath
|
||||||
|
End If
|
||||||
|
' Elimino pezzi nulli
|
||||||
|
RemoveWrongParts(LocalPartList)
|
||||||
|
' attacco i nuovi pezzi alla lista corrente
|
||||||
|
For Each Item As CsvPart In LocalPartList
|
||||||
|
m_CsvPartList.Add(Item)
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub ShowTreeView()
|
Private Sub ShowTreeView()
|
||||||
' Path del file Csv
|
' Path del file Csv
|
||||||
Dim TempPath As New Text.StringBuilder(260)
|
Dim TempPath As New Text.StringBuilder(260)
|
||||||
@@ -208,6 +332,7 @@ Public Class CSVPage
|
|||||||
m_ItemsList.Clear()
|
m_ItemsList.Clear()
|
||||||
Dim sCurrMat As String = String.Empty
|
Dim sCurrMat As String = String.Empty
|
||||||
Dim dCurrTh As Double = 0
|
Dim dCurrTh As Double = 0
|
||||||
|
Dim sCurrPath As String = String.Empty
|
||||||
Dim nCatToNest As Integer = 0
|
Dim nCatToNest As Integer = 0
|
||||||
Dim nCatCount As Integer = 0
|
Dim nCatCount As Integer = 0
|
||||||
Dim PartCathegory As New PartCathegoryItem("", 0)
|
Dim PartCathegory As New PartCathegoryItem("", 0)
|
||||||
@@ -218,19 +343,28 @@ Public Class CSVPage
|
|||||||
If i = 1 Then
|
If i = 1 Then
|
||||||
sCurrMat = CurrPart.m_sMaterial
|
sCurrMat = CurrPart.m_sMaterial
|
||||||
dCurrTh = CurrPart.m_dTh
|
dCurrTh = CurrPart.m_dTh
|
||||||
|
sCurrPath = CurrPart.m_sPath
|
||||||
ElseIf String.Compare(sCurrMat, CurrPart.m_sMaterial, True) <> 0 Or
|
ElseIf String.Compare(sCurrMat, CurrPart.m_sMaterial, True) <> 0 Or
|
||||||
|
String.Compare(sCurrPath, CurrPart.m_sPath, True) <> 0 Or
|
||||||
Math.Abs(dCurrTh - CurrPart.m_dTh) > 10 * EPS_SMALL Then
|
Math.Abs(dCurrTh - CurrPart.m_dTh) > 10 * EPS_SMALL Then
|
||||||
If m_bFull Then
|
If m_bFull Then
|
||||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||||
" - " & LenToString(dCurrTh, 2) &
|
" - " & LenToString(dCurrTh, 2) &
|
||||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||||
|
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||||
|
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||||
|
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||||
|
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
PartCathegory.IsExpanded = True
|
PartCathegory.IsExpanded = True
|
||||||
m_ItemsList.Add(PartCathegory)
|
m_ItemsList.Add(PartCathegory)
|
||||||
sCurrMat = CurrPart.m_sMaterial
|
sCurrMat = CurrPart.m_sMaterial
|
||||||
dCurrTh = CurrPart.m_dTh
|
dCurrTh = CurrPart.m_dTh
|
||||||
|
sCurrPath = CurrPart.m_sPath
|
||||||
PartCathegory = New PartCathegoryItem("", 0)
|
PartCathegory = New PartCathegoryItem("", 0)
|
||||||
nCatToNest = 0
|
nCatToNest = 0
|
||||||
nCatCount = 0
|
nCatCount = 0
|
||||||
@@ -248,8 +382,14 @@ Public Class CSVPage
|
|||||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||||
" - " & LenToString(dCurrTh, 2) &
|
" - " & LenToString(dCurrTh, 2) &
|
||||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||||
|
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||||
|
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||||
|
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||||
|
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
PartCathegory.IsExpanded = True
|
PartCathegory.IsExpanded = True
|
||||||
m_ItemsList.Add(PartCathegory)
|
m_ItemsList.Add(PartCathegory)
|
||||||
@@ -259,6 +399,7 @@ Public Class CSVPage
|
|||||||
For Each CatItem As PartCathegoryItem In m_ItemsList
|
For Each CatItem As PartCathegoryItem In m_ItemsList
|
||||||
Dim sCurrMat As String = String.Empty
|
Dim sCurrMat As String = String.Empty
|
||||||
Dim dCurrTh As Double = 0
|
Dim dCurrTh As Double = 0
|
||||||
|
Dim sCurrPath As String = String.Empty
|
||||||
Dim nCatToNest As Integer = 0
|
Dim nCatToNest As Integer = 0
|
||||||
Dim nCatCount As Integer = 0
|
Dim nCatCount As Integer = 0
|
||||||
For Each PrtItem As PartCustomItem In CatItem.Items
|
For Each PrtItem As PartCustomItem In CatItem.Items
|
||||||
@@ -268,6 +409,7 @@ Public Class CSVPage
|
|||||||
PrtItem.sText1 = sCount
|
PrtItem.sText1 = sCount
|
||||||
sCurrMat = PartData.m_sMaterial
|
sCurrMat = PartData.m_sMaterial
|
||||||
dCurrTh = PartData.m_dTh
|
dCurrTh = PartData.m_dTh
|
||||||
|
sCurrPath = PartData.m_sPath
|
||||||
nCatToNest += PartData.m_nToNest
|
nCatToNest += PartData.m_nToNest
|
||||||
nCatCount += PartData.m_nCount
|
nCatCount += PartData.m_nCount
|
||||||
Next
|
Next
|
||||||
@@ -275,8 +417,14 @@ Public Class CSVPage
|
|||||||
CatItem.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
CatItem.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||||
" - " & LenToString(dCurrTh, 2) &
|
" - " & LenToString(dCurrTh, 2) &
|
||||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||||
|
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||||
|
CatItem.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
CatItem.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
CatItem.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||||
|
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||||
|
CatItem.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
@@ -345,6 +493,7 @@ Public Class CSVPage
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub InsertBtn_Click(sender As Object, e As RoutedEventArgs) Handles InsertBtn.Click
|
Private Sub InsertBtn_Click(sender As Object, e As RoutedEventArgs) Handles InsertBtn.Click
|
||||||
|
'm_CurrProjPage.ClearMessage()
|
||||||
' Recupero lo spessore della lastra corrente
|
' Recupero lo spessore della lastra corrente
|
||||||
Dim dRawHeight As Double = GetRawHeight()
|
Dim dRawHeight As Double = GetRawHeight()
|
||||||
If dRawHeight < EPS_SMALL Then Return
|
If dRawHeight < EPS_SMALL Then Return
|
||||||
@@ -355,20 +504,17 @@ Public Class CSVPage
|
|||||||
End If
|
End If
|
||||||
' Recupero la tolleranza sullo spessore
|
' Recupero la tolleranza sullo spessore
|
||||||
Dim dToler As Double = GetPrivateProfileDouble(S_CSV, K_THICKTOLERANCE, 100 * EPS_SMALL, m_MainWindow.GetIniFile())
|
Dim dToler As Double = GetPrivateProfileDouble(S_CSV, K_THICKTOLERANCE, 100 * EPS_SMALL, m_MainWindow.GetIniFile())
|
||||||
dToler = Math.Max( dToler, 100 * EPS_SMALL)
|
dToler = Math.Max(dToler, 100 * EPS_SMALL)
|
||||||
' Creo la lista dei pezzi inseribili nella lastra corrente
|
' Creo la lista dei pezzi inseribili nella lastra corrente
|
||||||
Dim InsPartList As New List(Of CsvPart)
|
Dim InsPartList As New List(Of CsvPart)
|
||||||
For i As Integer = 1 To m_CsvPartList.Count()
|
For i As Integer = 1 To m_CsvPartList.Count()
|
||||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||||
If CurrPart.m_bActive And
|
If CurrPart.m_bActive And
|
||||||
(Math.Abs(CurrPart.m_dTh - dRawHeight) < dToler Or
|
(Math.Abs(CurrPart.m_dTh - dRawHeight) < dToler Or CurrPart.m_dTh < EPS_SMALL) And
|
||||||
CurrPart.m_dTh < EPS_SMALL) And
|
(String.IsNullOrWhiteSpace(CurrPart.m_sMaterial) Or String.IsNullOrWhiteSpace(sCurrMat) Or CurrPart.m_sMaterial = "***" Or sCurrMat = "***" Or String.Compare(CurrPart.m_sMaterial, sCurrMat, True) = 0) Then
|
||||||
(String.IsNullOrWhiteSpace(CurrPart.m_sMaterial) Or
|
|
||||||
String.IsNullOrWhiteSpace(sCurrMat) Or
|
|
||||||
CurrPart.m_sMaterial = "***" Or
|
|
||||||
sCurrMat = "***" Or
|
|
||||||
String.Compare(CurrPart.m_sMaterial, sCurrMat, True) = 0) Then
|
|
||||||
InsPartList.Add(CurrPart)
|
InsPartList.Add(CurrPart)
|
||||||
|
'ElseIf CurrPart.m_bActive Then
|
||||||
|
' m_CurrProjPage.SetWarningMessage("Grezzo non compatibile")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
' Lancio l'inserimento dei pezzi
|
' Lancio l'inserimento dei pezzi
|
||||||
@@ -424,10 +570,14 @@ Public Class CSVPage
|
|||||||
' Definizione variabili
|
' Definizione variabili
|
||||||
Dim dDimX = CurrPart.m_dDimX
|
Dim dDimX = CurrPart.m_dDimX
|
||||||
Dim dDimY = CurrPart.m_dDimY
|
Dim dDimY = CurrPart.m_dDimY
|
||||||
|
Dim dAng = New Double() {CurrPart.m_dAng1,CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4}
|
||||||
|
Dim dHeel = New Double() {CurrPart.m_dHeel1,CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4}
|
||||||
If bMaxDimOnX And dDimY > dDimX Then
|
If bMaxDimOnX And dDimY > dDimX Then
|
||||||
Dim dTemp As Double = dDimX
|
Dim dTemp As Double = dDimX
|
||||||
dDimX = dDimY
|
dDimX = dDimY
|
||||||
dDimY = dTemp
|
dDimY = dTemp
|
||||||
|
dAng = New Double() {CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4,CurrPart.m_dAng1}
|
||||||
|
dHeel = New Double() {CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4,CurrPart.m_dHeel1}
|
||||||
End If
|
End If
|
||||||
EgtLuaSetGlobNumVar("CMP.V1", dDimX)
|
EgtLuaSetGlobNumVar("CMP.V1", dDimX)
|
||||||
EgtLuaSetGlobNumVar("CMP.V2", dDimY)
|
EgtLuaSetGlobNumVar("CMP.V2", dDimY)
|
||||||
@@ -439,7 +589,7 @@ Public Class CSVPage
|
|||||||
If nId = GDB_ID.NULL Then Continue For
|
If nId = GDB_ID.NULL Then Continue For
|
||||||
CurrPart.m_nId = nId
|
CurrPart.m_nId = nId
|
||||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||||
Dim nRegId = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
Dim nRegId As Integer = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
||||||
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||||
' Eventuale testo per indicare il sopra
|
' Eventuale testo per indicare il sopra
|
||||||
If Not bMaxDimOnX Then
|
If Not bMaxDimOnX Then
|
||||||
@@ -447,11 +597,36 @@ Public Class CSVPage
|
|||||||
Dim nText As Integer = EgtCreateTextAdv(nRegId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
Dim nText As Integer = EgtCreateTextAdv(nRegId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||||
EgtSetColor(nText, New Color3d( 0, 0, 0))
|
EgtSetColor(nText, New Color3d( 0, 0, 0))
|
||||||
End If
|
End If
|
||||||
|
' Inserisco eventuali angoli di fianco
|
||||||
|
Dim bSideAngs As Boolean = False
|
||||||
|
Dim nOutLoopId As Integer = EgtGetFirstNameInGroup( nId, NAME_OUTLOOP)
|
||||||
|
For nSide As Integer = 1 To 4
|
||||||
|
Dim dSideAng As Double = dAng( nSide - 1)
|
||||||
|
Dim dSideHeel As Double = dHeel( nSide - 1)
|
||||||
|
If Math.Abs( dSideAng) > EPS_ANG_SMALL Then
|
||||||
|
Dim nEntId As Integer = EgtGetFirstNameInGroup( nOutLoopId, "A" & nSide.ToString())
|
||||||
|
If nEntId <> GDB_ID.NULL Then
|
||||||
|
bSideAngs = True
|
||||||
|
' Assegno valori
|
||||||
|
EgtSetInfo(nEntId, INFO_SIDE_ANGLE, dSideAng)
|
||||||
|
EgtSetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, dSideAng)
|
||||||
|
EgtSetInfo(nEntId, INFO_HEEL, dSideHeel)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Creo layer per testi nesting
|
||||||
|
If bSideAngs Then
|
||||||
|
Dim TextLayId As Integer = EgtCreateGroup(nId)
|
||||||
|
EgtSetName(TextLayId, SIDE_ANGLE_LAYER)
|
||||||
|
EgtSetColor(TextLayId, New Color3d(0, 0, 128))
|
||||||
|
' Opero su geometria esterna pezzo
|
||||||
|
SideAngle.WriteSideAngleOnLoop(nOutLoopId, TextLayId)
|
||||||
|
End If
|
||||||
' Aggiusto per lavorazioni
|
' Aggiusto per lavorazioni
|
||||||
EgtAdjustFlatPart(nId)
|
EgtAdjustFlatPart(nId)
|
||||||
' Se Csv completo, aggiungo info su CSV di origine
|
' Se Csv completo, aggiungo info su CSV di origine
|
||||||
If m_bFull Then
|
If m_bFull Then
|
||||||
EgtSetInfo(nId, INFO_CSV_PATH, m_sCsvPath)
|
EgtSetInfo(nId, INFO_CSV_PATH, CurrPart.m_sPath)
|
||||||
EgtSetInfo(nId, INFO_CSV_PART, CurrPart.m_sName)
|
EgtSetInfo(nId, INFO_CSV_PART, CurrPart.m_sName)
|
||||||
EgtSetInfo(nId, INFO_CSV_ORD, CurrPart.m_sOrd)
|
EgtSetInfo(nId, INFO_CSV_ORD, CurrPart.m_sOrd)
|
||||||
EgtSetInfo(nId, INFO_CSV_DIST, CurrPart.m_sDist)
|
EgtSetInfo(nId, INFO_CSV_DIST, CurrPart.m_sDist)
|
||||||
@@ -461,14 +636,36 @@ Public Class CSVPage
|
|||||||
Utility.SetTextColor( nRegId)
|
Utility.SetTextColor( nRegId)
|
||||||
' Lo sposto nel gruppo speciale
|
' Lo sposto nel gruppo speciale
|
||||||
EgtRelocate(nId, nIpGrp)
|
EgtRelocate(nId, nIpGrp)
|
||||||
|
|
||||||
|
|
||||||
|
' assegno l'identificatico del pezzo, se esiste
|
||||||
|
If Not String.IsNullOrEmpty(CurrPart.m_sRefGuid) Then
|
||||||
|
' GuidCode dovrebbe contenere 36 caratteri, il precode 5: tot = 41
|
||||||
|
If CurrPart.m_sRefGuid.Count <= 36 Then
|
||||||
|
Dim sPreGuid As String = CreatePreGuidCode(CurrPart.m_nId)
|
||||||
|
CurrPart.m_sRefGuid = sPreGuid & CurrPart.m_sRefGuid
|
||||||
|
End If
|
||||||
|
EgtSetInfo(CurrPart.m_nId, INFO_REFGROUP, CurrPart.m_sRefGuid)
|
||||||
|
End If
|
||||||
|
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(CurrPart.m_nId, NAME_REGION)
|
||||||
|
' Imposto il colore del pezzo inserito nel progetto
|
||||||
|
EgtSetColor(nRegLayId, CurrPart.m_cColor)
|
||||||
|
Dim EntId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||||
|
While EntId <> GDB_ID.NULL
|
||||||
|
If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, CurrPart.m_cColor)
|
||||||
|
EntId = EgtGetNext(EntId)
|
||||||
|
End While
|
||||||
|
|
||||||
Next
|
Next
|
||||||
EgtLuaResetGlobVar("CMP")
|
EgtLuaResetGlobVar("CMP")
|
||||||
EgtLuaResetGlobVar("CMP_Draw")
|
EgtLuaResetGlobVar("CMP_Draw")
|
||||||
|
|
||||||
' Provo ad inserire i pezzi
|
' Provo ad inserire i pezzi
|
||||||
Dim dNewArea As Double = 0
|
Dim dNewArea As Double = 0
|
||||||
For i As Integer = 1 To InsPartList.Count()
|
For i As Integer = 1 To InsPartList.Count()
|
||||||
Dim CurrPart As CsvPart = InsPartList(i - 1)
|
Dim CurrPart As CsvPart = InsPartList(i - 1)
|
||||||
While CurrPart.m_nToNest > 0
|
While CurrPart.m_nToNest > 0
|
||||||
|
|
||||||
If m_bDirect Then
|
If m_bDirect Then
|
||||||
If NestOnePart(CurrPart.m_nId) Then
|
If NestOnePart(CurrPart.m_nId) Then
|
||||||
dNewArea += GeomCalc.GetPartArea(CurrPart.m_nId)
|
dNewArea += GeomCalc.GetPartArea(CurrPart.m_nId)
|
||||||
@@ -490,6 +687,7 @@ Public Class CSVPage
|
|||||||
m_CurrProjPage.UpdateTotalArea( dNewArea)
|
m_CurrProjPage.UpdateTotalArea( dNewArea)
|
||||||
m_CurrProjPage.UpdateToProduceArea()
|
m_CurrProjPage.UpdateToProduceArea()
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -566,11 +764,11 @@ Public Class CSVPage
|
|||||||
Dim sName As String = String.Empty
|
Dim sName As String = String.Empty
|
||||||
EgtGetInfo(nId, INFO_CSV_PART, sName)
|
EgtGetInfo(nId, INFO_CSV_PART, sName)
|
||||||
' Verifico che il pezzo appartenga a questo Csv
|
' Verifico che il pezzo appartenga a questo Csv
|
||||||
If String.Compare(sCsvPath, m_sCsvPath, True) = 0 Then
|
If SearchCurrCSV(sCsvPath) Then
|
||||||
' Cerco il pezzo nella lista dei pezzi
|
' Cerco il pezzo nella lista dei pezzi
|
||||||
For i As Integer = 1 To m_CsvPartList.Count()
|
For i As Integer = 1 To m_CsvPartList.Count()
|
||||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||||
If String.Compare(sName, CurrPart.m_sName, True) = 0 Then
|
If String.Compare(sName, CurrPart.m_sName, True) = 0 And String.Compare(sCsvPath, CurrPart.m_sPath, True) = 0 Then
|
||||||
' Se nel grezzo
|
' Se nel grezzo
|
||||||
If EgtGetParent(nId) = m_nRawId Then
|
If EgtGetParent(nId) = m_nRawId Then
|
||||||
' Rimuovo le lavorazioni
|
' Rimuovo le lavorazioni
|
||||||
@@ -578,19 +776,38 @@ Public Class CSVPage
|
|||||||
' Rimuovo dal grezzo
|
' Rimuovo dal grezzo
|
||||||
EgtRemovePartFromRawPart(nId)
|
EgtRemovePartFromRawPart(nId)
|
||||||
End If
|
End If
|
||||||
|
' recupero il Guid del pezzo corrente (potrebbe essere stato modificato a causa di rotazioni quando il pezzo è passato in parcheggio)
|
||||||
|
Dim sCurrRefGuid As String = String.Empty
|
||||||
|
EgtGetInfo(nId, INFO_REFGROUP, sCurrRefGuid)
|
||||||
' Cancello il pezzo
|
' Cancello il pezzo
|
||||||
EgtErase(nId)
|
EgtErase(nId)
|
||||||
|
' aggiorno il layer che indica il numero di pezzi in parcheggio (se sRefGroup<>"")
|
||||||
|
m_MainWindow.m_CadCutPageUC.m_NestPage.CountPartInFamily(sCurrRefGuid)
|
||||||
' Aggiorno il contatore
|
' Aggiorno il contatore
|
||||||
CurrPart.m_nToNest += 1
|
CurrPart.m_nToNest += 1
|
||||||
|
' ricreo la lista delle famiglie di pezzi presenti in parcheggio
|
||||||
|
m_MainWindow.m_CadCutPageUC.m_NestPage.GetFamilyGroupInPark()
|
||||||
' Esco
|
' Esco
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
' creo la lista delle famiglie di pezzi presenti in parcheggio
|
||||||
|
m_MainWindow.m_CadCutPageUC.m_NestPage.GetFamilyGroupInPark()
|
||||||
' Pezzo non appartenente al Csv corrente
|
' Pezzo non appartenente al Csv corrente
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function SearchCurrCSV(ByVal sCSVFile As String) As Boolean
|
||||||
|
For i As Integer = 1 To m_CsvPartList.Count()
|
||||||
|
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||||
|
If String.Compare(sCSVFile, CurrPart.m_sPath, True) = 0 Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Sub SaveCsvPartList()
|
Friend Sub SaveCsvPartList()
|
||||||
' Se Csv semplificato non va salvata
|
' Se Csv semplificato non va salvata
|
||||||
If Not m_bFull Then Return
|
If Not m_bFull Then Return
|
||||||
@@ -601,24 +818,33 @@ Public Class CSVPage
|
|||||||
End If
|
End If
|
||||||
' Path del file
|
' Path del file
|
||||||
Dim sFile As String = Path.ChangeExtension(m_sFilePath, ".epl")
|
Dim sFile As String = Path.ChangeExtension(m_sFilePath, ".epl")
|
||||||
' Scrittura del file
|
' Scrittura dei file
|
||||||
If WriteCsvPartList(sFile, m_sCsvPath, m_CsvPartList) Then
|
If WriteCsvMergePartList(m_CsvPartList) Then
|
||||||
' Registro in ini path
|
' Scrittura dei file Merge
|
||||||
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, sFile, m_MainWindow.GetIniFile())
|
If WriteCsvPartList(sFile, m_sCsvPath, m_CsvPartList) Then
|
||||||
|
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, sFile, m_MainWindow.GetIniFile())
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LoadCsvPartList(sFile As String)
|
' salvo il sottoelenco dei pezzi
|
||||||
' Se Csv semplificato non va letta
|
Friend Sub MySaveCsvPartList(ByVal CurrPartList As List(Of CsvPart))
|
||||||
|
' Se Csv semplificato non va salvata
|
||||||
If Not m_bFull Then Return
|
If Not m_bFull Then Return
|
||||||
' Pulisco path e lista dei pezzi Csv
|
Dim sCurrPath As String = String.Empty
|
||||||
m_sCsvPath = String.Empty
|
' recupero dalla lista il nome del file corrente
|
||||||
m_CsvPartList.Clear()
|
For Each Item As CsvPart In CurrPartList
|
||||||
' Lettura del file
|
sCurrPath = Item.m_sPath
|
||||||
ReadCsvPartList(sFile, m_sCsvPath, m_CsvPartList)
|
Next
|
||||||
m_sFilePath = sFile
|
' se non trov il nome del file assocciato all'elenco di pezzi esco
|
||||||
' Elimino pezzi nulli
|
If String.IsNullOrEmpty(sCurrPath) Then
|
||||||
RemoveWrongParts(m_CsvPartList)
|
EgtOutLog("CSV Curr list missing")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Path del file
|
||||||
|
Dim sFile As String = Path.ChangeExtension(sCurrPath, ".epl")
|
||||||
|
' Scrittura del file
|
||||||
|
WriteCsvPartList(sFile, sCurrPath, CurrPartList)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub UpdateCsvPartList()
|
Friend Sub UpdateCsvPartList()
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="PhotoIMG" Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
|||||||
@@ -107,6 +107,9 @@ Public Class CadCutPageUC
|
|||||||
|
|
||||||
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
' Se macchina fotografica collegata, faccio una foto
|
' Se macchina fotografica collegata, faccio una foto
|
||||||
@@ -140,6 +143,9 @@ Public Class CadCutPageUC
|
|||||||
|
|
||||||
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
|
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(Me)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_RawPartPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_RawPartPage)
|
||||||
@@ -165,6 +171,9 @@ Public Class CadCutPageUC
|
|||||||
|
|
||||||
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
|
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
||||||
@@ -172,6 +181,9 @@ Public Class CadCutPageUC
|
|||||||
|
|
||||||
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
||||||
m_MainWindow.TestOff()
|
m_MainWindow.TestOff()
|
||||||
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_ImportPageUC)
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_ImportPageUC)
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Import
|
m_MainWindow.m_ActivePage = MainWindow.Pages.Import
|
||||||
@@ -193,10 +205,13 @@ Public Class CadCutPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
|
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
|
||||||
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
EgtDeselectObj(m_NestPage.m_CurrSelectedCurv)
|
EgtDeselectObj(m_NestPage.m_CurrSelectedCurv)
|
||||||
m_ProjectMgr.TestBtn.IsChecked = False
|
m_ProjectMgr.TestBtn.IsChecked = False
|
||||||
m_CurrProjPage.m_bSelectCurv = False
|
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||||
Select Case m_CadCutMode
|
Select Case m_CadCutMode
|
||||||
Case CadCutModes.Nest, CadCutModes.FastGrid
|
Case CadCutModes.Nest, CadCutModes.FastGrid
|
||||||
' Passo alla pagina Split
|
' Passo alla pagina Split
|
||||||
@@ -206,9 +221,9 @@ Public Class CadCutPageUC
|
|||||||
SplitImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/Nest.png", UriKind.Relative))
|
SplitImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/Nest.png", UriKind.Relative))
|
||||||
End If
|
End If
|
||||||
If m_CadCutMode = CadCutModes.Nest Then
|
If m_CadCutMode = CadCutModes.Nest Then
|
||||||
CadCutPageGrid.Children.Remove(m_NestPage)
|
CadCutPageGrid.Children.Remove(m_NestPage)
|
||||||
Else
|
Else
|
||||||
CadCutPageGrid.Children.Remove(m_FastGridSlabManager)
|
CadCutPageGrid.Children.Remove(m_FastGridSlabManager)
|
||||||
End If
|
End If
|
||||||
CadCutPageGrid.Children.Add(m_SplitPage)
|
CadCutPageGrid.Children.Add(m_SplitPage)
|
||||||
m_CadCutMode = CadCutModes.Split
|
m_CadCutMode = CadCutModes.Split
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
<Window x:Class="ChooseTestToolWD"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
|
Title="OpenFile" Height="382.6" Width="426.6" WindowStyle="None"
|
||||||
|
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||||
|
Background="Transparent">
|
||||||
|
|
||||||
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||||
|
<!--TextAlignment="Center"
|
||||||
|
FontSize="20"
|
||||||
|
VerticalAlignment="Center"-->
|
||||||
|
<ListBox Name="SetUpToolListBox" Grid.Column="1" Grid.Row="2"
|
||||||
|
ItemsSource="{Binding ItemList}">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding ToolAlias}" Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
|
||||||
|
<Grid Grid.Column="1" Grid.Row="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,281 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class ChooseTestToolWD
|
||||||
|
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
|
Private m_SetUpToolList As New ObservableCollection(Of TestTool)
|
||||||
|
|
||||||
|
Sub New(Owner As Window)
|
||||||
|
Me.Owner = Owner
|
||||||
|
InitializeComponent()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
' Posizione finestra
|
||||||
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
|
' Definizione del collegamento tra ItemList e ListBox1
|
||||||
|
SetUpToolListBox.ItemsSource = m_SetUpToolList
|
||||||
|
FilePathTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 45) ' Selezionare l'utensile da tastare
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OpenFile_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||||
|
' carico elenco degli utensili impostati attualmente in macchina (anche il laser!)
|
||||||
|
LoadSetUpTool()
|
||||||
|
' ricerco l'utensile della lavorazione indicata
|
||||||
|
Dim Item As TestTool = m_SetUpToolList.FirstOrDefault(Function(x) x.ToolName = m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrToolFromSelectedSawCurv)
|
||||||
|
Dim Index As Integer = m_SetUpToolList.IndexOf(Item)
|
||||||
|
If Index < 0 Then
|
||||||
|
Index = 0
|
||||||
|
End If
|
||||||
|
' se presente seleziono il primo elemento
|
||||||
|
If m_SetUpToolList.Count > 0 Then
|
||||||
|
SetUpToolListBox.SelectedItem = m_SetUpToolList(Index)
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
Else
|
||||||
|
OkBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function LoadSetUpTool() As Boolean
|
||||||
|
Dim sNameTool As String = String.Empty
|
||||||
|
Dim sHeadTool As String = String.Empty
|
||||||
|
Dim nExitTool As Integer = 0
|
||||||
|
|
||||||
|
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' ' Imposto la lama
|
||||||
|
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, True))
|
||||||
|
'End If
|
||||||
|
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||||
|
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' ' Imposto la fresa
|
||||||
|
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, False))
|
||||||
|
'End If
|
||||||
|
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||||
|
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' ' Imposto il foretto
|
||||||
|
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, False))
|
||||||
|
'End If
|
||||||
|
|
||||||
|
sNameTool = "Laser point"
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto laser di puntamento
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, ""))
|
||||||
|
End If
|
||||||
|
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrWaterJet
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto WJ
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Select Case m_MainWindow.m_CurrentMachine.MountedToolConfig
|
||||||
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la fresa
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto il foretto
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||||
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||||
|
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||||
|
sNameTool = ToolChangerPos.sTool
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
|
||||||
|
Case CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||||
|
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||||
|
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||||
|
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||||
|
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||||
|
sNameTool = ToolChangerPos.sTool
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||||
|
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||||
|
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||||
|
sNameTool = ToolChangerPos.sTool
|
||||||
|
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||||
|
' Imposto la lama
|
||||||
|
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
Case Else
|
||||||
|
Return False
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
|
||||||
|
' Disabilito Ok
|
||||||
|
OkBtn.IsEnabled = False
|
||||||
|
' Recupero item selezionato
|
||||||
|
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' A seconda del tipo
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetUpToolListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles SetUpToolListBox.SelectionChanged
|
||||||
|
' Disabilito Ok
|
||||||
|
OkBtn.IsEnabled = False
|
||||||
|
' Recupero item selezionato
|
||||||
|
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||||
|
Return
|
||||||
|
Else
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
|
DialogResult = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' restituisce l'oggetto selezionato in elenco e lo imposta come attivo
|
||||||
|
Friend Function GetSelectedTool() As TestTool
|
||||||
|
Dim SelTestTool As TestTool = DirectCast(SetUpToolListBox.SelectedItem, TestTool)
|
||||||
|
If SelTestTool.ToolAlias = "Laser point" Then
|
||||||
|
SelTestTool.ToolHead = "H3"
|
||||||
|
SelTestTool.ToolExit = 1
|
||||||
|
SelTestTool.ToolIsSaw = False
|
||||||
|
SelTestTool.ToolIsLaser = True
|
||||||
|
Else
|
||||||
|
EgtTdbSetCurrTool(SelTestTool.ToolName)
|
||||||
|
Dim sHeadTool As String = String.Empty
|
||||||
|
Dim nExitTool As Integer = 0
|
||||||
|
Dim sTypeTool As String = String.Empty
|
||||||
|
Dim nTypeTool As Integer
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nTypeTool)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHeadTool)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExitTool)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, sTypeTool)
|
||||||
|
SelTestTool.ToolHead = sHeadTool
|
||||||
|
SelTestTool.ToolExit = nExitTool
|
||||||
|
SelTestTool.ToolType = nTypeTool
|
||||||
|
SelTestTool.ToolIsSaw = (nTypeTool = MCH_TY.SAW_STD)
|
||||||
|
SelTestTool.ToolIsLaser = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return SelTestTool
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class TestTool
|
||||||
|
|
||||||
|
Private m_ToolAlias As String = String.Empty
|
||||||
|
Private m_ToolName As String = String.Empty
|
||||||
|
Private m_ToolHead As String = "H1"
|
||||||
|
Private m_ToolExit As Integer = 1
|
||||||
|
Private m_ToolIsSaw As Boolean = False
|
||||||
|
Private m_ToolIsLaser As Boolean = False
|
||||||
|
Private m_ToolType As Integer = -1
|
||||||
|
|
||||||
|
Public Property ToolAlias As String
|
||||||
|
Get
|
||||||
|
Return m_ToolAlias
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_ToolAlias = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolName As String
|
||||||
|
Get
|
||||||
|
Return m_ToolName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_ToolName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolHead As String
|
||||||
|
Get
|
||||||
|
Return m_ToolHead
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_ToolHead = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolExit As Integer
|
||||||
|
Get
|
||||||
|
Return m_ToolExit
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_ToolExit = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolType As Integer
|
||||||
|
Get
|
||||||
|
Return m_ToolType
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_ToolType = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolIsSaw As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ToolIsSaw
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_ToolIsSaw = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ToolIsLaser As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ToolIsLaser
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_ToolIsLaser = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(sToolAlias As String, sToolName As String)
|
||||||
|
m_ToolAlias = sToolAlias
|
||||||
|
m_ToolName = sToolName
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -27,6 +27,14 @@
|
|||||||
<EgtWPFLib:EgtTextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1"
|
<EgtWPFLib:EgtTextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
|
<ComboBox Name="ValueCmBx" Grid.Column="1" Grid.Row="1">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" FontSize="20" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib
|
Imports EgtWPFLib
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
|
||||||
Public Class EditValueWD
|
Public Class EditValueWD
|
||||||
|
|
||||||
@@ -8,29 +9,77 @@ Public Class EditValueWD
|
|||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
Private m_sMsg As String = "Value"
|
Private m_sMsg As String = "Value"
|
||||||
Private m_sValue As String = ""
|
Private m_sValue As String = ""
|
||||||
|
Private m_sList As ObservableCollection(Of String)
|
||||||
|
Private m_IsText As Boolean = True
|
||||||
|
|
||||||
|
' avvia la visualizzazione della textbox
|
||||||
Sub New(Owner As Window, Optional sMsg As String = "")
|
Sub New(Owner As Window, Optional sMsg As String = "")
|
||||||
Me.Owner = Owner
|
Me.Owner = Owner
|
||||||
m_sMsg = sMsg
|
m_sMsg = sMsg
|
||||||
|
m_IsText = True
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Function SetVal( dVal As Double) As Boolean
|
Friend Function SetVal(dVal As Double, Optional ByVal bLen As Boolean = False) As Boolean
|
||||||
m_sValue = DoubleToString( dVal, 3)
|
If bLen Then
|
||||||
|
m_sValue = LenToString(dVal, 3)
|
||||||
|
Else
|
||||||
|
m_sValue = DoubleToString(dVal, 3)
|
||||||
|
End If
|
||||||
ValueTxBx.Text = m_sValue
|
ValueTxBx.Text = m_sValue
|
||||||
Return true
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function GetVal() As Double
|
' avvia la visualizzazione della combobox
|
||||||
|
Sub New(Owner As Window, sList As ObservableCollection(Of String), Optional sMsg As String = "")
|
||||||
|
Me.Owner = Owner
|
||||||
|
m_sMsg = sMsg
|
||||||
|
m_IsText = False
|
||||||
|
InitializeComponent()
|
||||||
|
m_sList = sList
|
||||||
|
SetComboBox(m_sList)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function GetVal(Optional ByVal bLen As Boolean = False) As Double
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
StringToDouble( m_sValue, dVal)
|
If bLen Then
|
||||||
|
StringToLen(m_sValue, dVal)
|
||||||
|
Else
|
||||||
|
StringToDouble(m_sValue, dVal)
|
||||||
|
End If
|
||||||
Return dVal
|
Return dVal
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function SetComboBox(sList As ObservableCollection(Of String)) As Boolean
|
||||||
|
ValueCmBx.ItemsSource = sList
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function SetItemComboBox(sItem As String) As Boolean
|
||||||
|
For Each MyItem As String In ValueCmBx.ItemsSource
|
||||||
|
If MyItem = sItem Then
|
||||||
|
ValueCmBx.SelectedItem = MyItem
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function GetItemComboBox() As String
|
||||||
|
Dim sVal As String = ValueCmBx.SelectedItem
|
||||||
|
Return sVal
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub EditValueWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub EditValueWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
ValueTxbl.Text = m_sMsg
|
ValueTxbl.Text = m_sMsg
|
||||||
|
If m_IsText Then
|
||||||
|
ValueCmBx.Visibility = Visibility.Collapsed
|
||||||
|
ValueTxBx.Visibility = Visibility.Visible
|
||||||
|
Else
|
||||||
|
ValueCmBx.Visibility = Visibility.Visible
|
||||||
|
ValueTxBx.Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub EditValueWD_Rendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
Private Sub EditValueWD_Rendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||||
|
|||||||
+132
-123
@@ -7,158 +7,167 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||||
|
|
||||||
<!-- Definizione della SplitPage -->
|
<!-- Definizione della SplitPage -->
|
||||||
<Grid Name="SplitPageGrid" >
|
<Grid Name="SplitPageGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="12*"/>
|
<ColumnDefinition Width="12*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="8*"/>
|
<RowDefinition Height="8*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--Upper button grid-->
|
<!--Upper button grid-->
|
||||||
<Grid Grid.Column="1">
|
<Grid Grid.Column="1">
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="4*"/>
|
|
||||||
<ColumnDefinition Width="8*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
|
||||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="4*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="8*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
||||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Image.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<RotateTransform Angle="180"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Image.RenderTransform>
|
||||||
|
</Image>
|
||||||
|
</Button>
|
||||||
|
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!--Left Button Grid-->
|
||||||
|
<Grid Grid.RowSpan="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
|
||||||
|
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||||
|
<Image Source="{DynamicResource TopLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
||||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||||
<Image.RenderTransform>
|
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<TransformGroup>
|
|
||||||
<RotateTransform Angle="180"/>
|
|
||||||
</TransformGroup>
|
|
||||||
</Image.RenderTransform>
|
|
||||||
</Image>
|
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!--Left Button Grid-->
|
|
||||||
<Grid Grid.RowSpan="3">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="2*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
|
|
||||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource TopLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource TopRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
|
||||||
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
|
|
||||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
|
||||||
<Image Source="{DynamicResource TopRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
|
||||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource LeftArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource LeftArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
|
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
|
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}">
|
Style="{DynamicResource OmagCut_YellowTextButton}">
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource RightArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource RightArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
|
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource BottomLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource BottomLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
|
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
|
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50"
|
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||||
Text="°"/>
|
Text="°"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<!--Gestione sfridi-->
|
||||||
|
<Button Name="RemovePartBtn" Grid.ColumnSpan="2" Grid.Row="6"
|
||||||
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6"
|
<Button Name="ScrapsBtn" Grid.Column="3" Grid.Row="6"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="7" Grid.ColumnSpan="3">
|
<!--Gestione scarico pezzi-->
|
||||||
|
<Button Name="UnloadPartsBtn" Grid.ColumnSpan="2" Grid.Row="7"
|
||||||
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
|
<Grid Grid.Row="7" Grid.ColumnSpan="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!--Lower button grid, sfondo grigio per coprire i bottoni della pagina sottostante-->
|
||||||
|
<Grid Grid.Column="1" Grid.Row="2" Background="{DynamicResource OmagCut_Gray}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="10*"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
|
||||||
|
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!--Lower button grid, sfondo grigio per coprire i bottoni della pagina sottostante-->
|
|
||||||
<Grid Grid.Column="1" Grid.Row="2" Background="{DynamicResource OmagCut_Gray}">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="10*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+912
-77
File diff suppressed because it is too large
Load Diff
+57
-12
@@ -8,7 +8,7 @@
|
|||||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
||||||
|
|
||||||
<!-- Definizione della NestPage -->
|
<!-- Definizione della NestPage -->
|
||||||
<Grid Name="NestPageGrid" >
|
<Grid Name="NestPageGrid">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="12*"/>
|
<ColumnDefinition Width="12*"/>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50"
|
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||||
Text="°"/>
|
Text="°"/>
|
||||||
@@ -99,18 +99,63 @@
|
|||||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
|
||||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
|
||||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6"
|
<!--Comandi attivi solo in madalità REG-->
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
<UniformGrid Name ="UG0_Reg" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" Visibility="Hidden">
|
||||||
|
<ToggleButton Name="AddPointRegBtn" Visibility="Hidden"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource RefTabImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton Name="ModPointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Move-Spot-RegImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton Name="RemovePointRegBtn" Visibility="Hidden"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource RefTabImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
<!--Comandi attivi solo in madalità REG-->
|
||||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
<UniformGrid Name ="UG1_Reg" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" Visibility="Hidden">
|
||||||
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
<Button Name="AdjustPointRegBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Muovi-grezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<ToggleButton Name="ActivatePointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource ON_OFF-REGImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3">
|
||||||
|
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<ToggleButton Name="StartCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource StartWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
|
||||||
|
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource SplitWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||||
|
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
+2381
-220
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@ Public Class OpenFileWD
|
|||||||
Private m_sCurrFile As String = String.Empty
|
Private m_sCurrFile As String = String.Empty
|
||||||
Private m_sExt As String = String.Empty
|
Private m_sExt As String = String.Empty
|
||||||
Private m_sExt2 As String = String.Empty
|
Private m_sExt2 As String = String.Empty
|
||||||
|
Private n_sDeniedFiles As New List(Of String)
|
||||||
|
|
||||||
Private m_OpenItemList As New ObservableCollection(Of IconListBoxItem)
|
Private m_OpenItemList As New ObservableCollection(Of IconListBoxItem)
|
||||||
|
|
||||||
@@ -27,6 +28,15 @@ Public Class OpenFileWD
|
|||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub New(Owner As Window, sDir As String, sExt As String, sExt2 As String, DeniedFiles As List(Of String))
|
||||||
|
Me.Owner = Owner
|
||||||
|
m_sCurrDir = sDir
|
||||||
|
m_sExt = sExt
|
||||||
|
m_sExt2 = sExt2
|
||||||
|
n_sDeniedFiles = DeniedFiles
|
||||||
|
InitializeComponent()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Posizione finestra
|
' Posizione finestra
|
||||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
@@ -71,13 +81,20 @@ Public Class OpenFileWD
|
|||||||
Dim FileI As FileInfo
|
Dim FileI As FileInfo
|
||||||
For Each FileI In vFileI
|
For Each FileI In vFileI
|
||||||
Dim sExt As String = Path.GetExtension(FileI.Name).ToUpper()
|
Dim sExt As String = Path.GetExtension(FileI.Name).ToUpper()
|
||||||
If String.Compare(sExt, m_sExt, True) = 0 Or
|
Dim sFileName As String = Path.GetFileNameWithoutExtension(FileI.Name).ToUpper.Trim
|
||||||
String.Compare(sExt, m_sExt2, True) = 0 Then
|
Dim bDenied As Boolean = False
|
||||||
|
For Each ItemFile As String In n_sDeniedFiles
|
||||||
|
If ItemFile.ToUpper.Trim = sFileName Then
|
||||||
|
bDenied = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If (String.Compare(sExt, m_sExt, True) = 0 Or String.Compare(sExt, m_sExt2, True) = 0) And Not bDenied Then
|
||||||
m_OpenItemList.Add(New IconListBoxItem(FileI.Name, 3))
|
m_OpenItemList.Add(New IconListBoxItem(FileI.Name, 3))
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
' riporto visualizzazione in cima alla lista (esiste sempre almeno un elemento)
|
' riporto visualizzazione in cima alla lista (esiste sempre almeno un elemento)
|
||||||
FileListBox.ScrollIntoView(m_OpenItemList(0))
|
FileListBox.ScrollIntoView(m_OpenItemList(0))
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<Window x:Class="SelectPartFromFamilyWD"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
|
Title="SaveNameWD" Height="200" Width="400" ShowInTaskbar="False">
|
||||||
|
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||||
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
<Grid x:Name="SaveNameGrid">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.1*"/>
|
||||||
|
<RowDefinition Height="0.3*"/>
|
||||||
|
<RowDefinition Height="0.2*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="0.2*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="0.2*"/>
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--Messaggio: Seleziona il numero di pezzi-->
|
||||||
|
<TextBlock Name="TitleWDTxbl" Grid.Column="1" Grid.Row="1"
|
||||||
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
|
||||||
|
<UniformGrid Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Columns="2">
|
||||||
|
<TextBlock Name="NbrOfPartsMsg"
|
||||||
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="NbrOfParts"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!--ultimo progetto-->
|
||||||
|
<Button Name="ConfirmSelection" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||||
|
ToolTip="Confirm">
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<!--nuovo progetto-->
|
||||||
|
<Button Name="SelectAllPart" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||||
|
ToolTip="Select all" Visibility="Collapsed">
|
||||||
|
<Image Source="{DynamicResource NuovoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<!--apri folder progetti-->
|
||||||
|
<Button Name="CancelSelection" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||||
|
ToolTip="Cancel">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
Public Class SelectPartFromFamilyWD
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
|
Private m_NumberOfParts As Integer = 1
|
||||||
|
Public Property NumberOfParts As Integer
|
||||||
|
Get
|
||||||
|
Return m_NumberOfParts
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_NumberOfParts = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_NumberOfSelection As Integer = 1
|
||||||
|
Public Property NumberOfSelection As Integer
|
||||||
|
Get
|
||||||
|
Return m_NumberOfSelection
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_NumberOfSelection = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Sub New(Owner As Window, NbrParts As Integer)
|
||||||
|
Me.Owner = Owner
|
||||||
|
m_NumberOfParts = NbrParts
|
||||||
|
InitializeComponent()
|
||||||
|
Me.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' inizializzo la finestra
|
||||||
|
Private Sub SelectPartFromFamilyWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
' posiziono la fistra in centro alla pagina
|
||||||
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
|
|
||||||
|
TitleWDTxbl.Text = "Selection parts"
|
||||||
|
NbrOfPartsMsg.Text = "Number of parts"
|
||||||
|
NbrOfParts.Text = m_NumberOfParts.ToString
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' seleziono il numero di elementi indicati
|
||||||
|
Private Sub ConfirmSelection_Click(sender As Object, e As RoutedEventArgs) Handles ConfirmSelection.Click
|
||||||
|
Dim nVal As Integer = 0
|
||||||
|
StringToInt(NbrOfParts.Text, nVal)
|
||||||
|
If nVal >= 0 Then
|
||||||
|
m_NumberOfSelection = nVal
|
||||||
|
Else
|
||||||
|
' indice non valido per la selezione
|
||||||
|
m_NumberOfSelection = 0
|
||||||
|
End If
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'' seleziona tutti
|
||||||
|
'Private Sub SelectAllPart_Click(sender As Object, e As RoutedEventArgs) Handles SelectAllPart.Click
|
||||||
|
' m_NumberOfSelection = m_NumberOfParts
|
||||||
|
' Me.Close()
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
' Deseleziomo tutto
|
||||||
|
Private Sub CancelSelection_Click(sender As Object, e As RoutedEventArgs) Handles CancelSelection.Click
|
||||||
|
m_NumberOfSelection = 0
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
+203
-43
@@ -1,10 +1,17 @@
|
|||||||
Imports EgtUILib
|
Imports System.Net
|
||||||
|
Imports System.Windows.Forms.Integration
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Module SplitAuto
|
Public Module SplitAuto
|
||||||
|
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
Private m_dLastDT As Double = 0
|
Private m_dLastDT As Double = 0
|
||||||
|
Public ReadOnly Property dLastDT As Double
|
||||||
|
Get
|
||||||
|
Return m_dLastDT
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
Friend Class SplitMach
|
Friend Class SplitMach
|
||||||
@@ -31,6 +38,8 @@ Public Module SplitAuto
|
|||||||
Public m_dStartFreeLen As Double
|
Public m_dStartFreeLen As Double
|
||||||
Public m_dEndFreeLen As Double
|
Public m_dEndFreeLen As Double
|
||||||
Public m_vtDir As Vector3d
|
Public m_vtDir As Vector3d
|
||||||
|
' ver 2.6f4: tagli corti gestiti con LeadIn.OUT/LeadOut.OUT
|
||||||
|
Public m_bMngLeadInOnIntCorner As Boolean
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
@@ -93,25 +102,33 @@ Public Module SplitAuto
|
|||||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||||
Dim nEntId, nSub As Integer
|
Dim nEntId, nSub As Integer
|
||||||
If EgtGetMachiningGeometry( 0, nEntId, nSub) Then
|
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||||
If EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse EgtGetType( nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||||
Mach.m_bEnableInvert = GetEnableInvert( nEntId)
|
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||||
EgtMidVector( nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||||
|
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||||
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
||||||
Mach.m_nEntId = nEntId
|
Mach.m_nEntId = nEntId
|
||||||
|
EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
|
||||||
End If
|
End If
|
||||||
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
||||||
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL) And
|
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||||
Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
|
Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
|
||||||
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||||
Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL And (nRes And CAR_RES.LI_OK) <> 0) And
|
Dim bIn As Boolean = False
|
||||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine
|
Dim bOut As Boolean = False
|
||||||
Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL And (nRes And CAR_RES.LO_OK) <> 0) And
|
CanExtendSides(Mach, bIn, bOut)
|
||||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine
|
Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
|
||||||
|
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
|
||||||
|
Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
|
||||||
|
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
|
||||||
|
If nRes = 0 Then
|
||||||
|
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' se trasformabile in taglio di separazione, verifico se lo è
|
' se trasformabile in taglio di separazione, verifico se lo è
|
||||||
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
||||||
@@ -126,7 +143,7 @@ Public Module SplitAuto
|
|||||||
Mach.m_bStartAll = False
|
Mach.m_bStartAll = False
|
||||||
Mach.m_bEndAll = False
|
Mach.m_bEndAll = False
|
||||||
End If
|
End If
|
||||||
' Waterjet
|
' Waterjet
|
||||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||||
Mach.m_nInterf = FMI_TYPE.NONE
|
Mach.m_nInterf = FMI_TYPE.NONE
|
||||||
' recupero l'angolo di fianco
|
' recupero l'angolo di fianco
|
||||||
@@ -135,7 +152,7 @@ Public Module SplitAuto
|
|||||||
Mach.m_bCanEndAll = False
|
Mach.m_bCanEndAll = False
|
||||||
Mach.m_bStartAll = False
|
Mach.m_bStartAll = False
|
||||||
Mach.m_bEndAll = False
|
Mach.m_bEndAll = False
|
||||||
' Forature e fresature
|
' Forature e fresature
|
||||||
Else
|
Else
|
||||||
Mach.m_nInterf = FMI_TYPE.NONE
|
Mach.m_nInterf = FMI_TYPE.NONE
|
||||||
Mach.m_dSideAng = 0
|
Mach.m_dSideAng = 0
|
||||||
@@ -150,7 +167,7 @@ Public Module SplitAuto
|
|||||||
Mach.m_bPause = GetPause(nOperId)
|
Mach.m_bPause = GetPause(nOperId)
|
||||||
' inserisco in lista
|
' inserisco in lista
|
||||||
MachSplitList.Add(Mach)
|
MachSplitList.Add(Mach)
|
||||||
' altrimenti la disattivo
|
' altrimenti la disattivo
|
||||||
Else
|
Else
|
||||||
EgtSetOperationMode(nOperId, False)
|
EgtSetOperationMode(nOperId, False)
|
||||||
End If
|
End If
|
||||||
@@ -160,7 +177,38 @@ Public Module SplitAuto
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function CanExtendSides(CurrMach As SplitMach, ByRef bIn As Boolean, ByRef bOut As Boolean) As Boolean
|
||||||
|
If CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng > EPS_ANG_SMALL Then
|
||||||
|
' Posso estendere SOLO l'uscita
|
||||||
|
bOut = True
|
||||||
|
bIn = False
|
||||||
|
ElseIf CurrMach.m_dPrevAng > EPS_ANG_SMALL And CurrMach.m_dNextAng < -EPS_ANG_SMALL Then
|
||||||
|
' Posso estendere SOLO l'ingresso
|
||||||
|
bIn = True
|
||||||
|
bOut = False
|
||||||
|
ElseIf CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng < -EPS_ANG_SMALL Then
|
||||||
|
' NON Posso estendere
|
||||||
|
bIn = False
|
||||||
|
bOut = False
|
||||||
|
Else
|
||||||
|
bIn = True
|
||||||
|
bOut = True
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
|
' calcolo il numero di tipi di lavorazioni
|
||||||
|
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
|
||||||
|
If MachSplit.m_nType = MCH_OY.SAWING Then
|
||||||
|
nCountSawing += 1
|
||||||
|
ElseIf MachSplit.m_nType = MCH_OY.WATERJETTING Then
|
||||||
|
nCountWaterjetting += 1
|
||||||
|
Else
|
||||||
|
nCountOtherMachining += 1
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub ColorMachining(MachSplit As SplitMach, Optional bReset As Boolean = False)
|
Friend Sub ColorMachining(MachSplit As SplitMach, Optional bReset As Boolean = False)
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
' Assegno stato
|
' Assegno stato
|
||||||
@@ -177,7 +225,7 @@ Public Module SplitAuto
|
|||||||
|
|
||||||
Private Sub ColorSingleMachining(nOperId As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
|
Private Sub ColorSingleMachining(nOperId As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
|
||||||
' Verifico se è un taglio da sopra o da sotto
|
' Verifico se è un taglio da sopra o da sotto
|
||||||
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or ( sLay = NAME_INLOOP AndAlso EgtExistsInfo( nOperId, INFO_FILOTOP)))
|
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or (sLay = NAME_INLOOP AndAlso EgtExistsInfo(nOperId, INFO_FILOTOP)))
|
||||||
Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL)
|
Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL)
|
||||||
' Recupero il preview della lavorazione
|
' Recupero il preview della lavorazione
|
||||||
Dim nPvId As Integer = GDB_ID.NULL
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
@@ -202,11 +250,11 @@ Public Module SplitAuto
|
|||||||
Next
|
Next
|
||||||
EgtSetColor(nDwnCutId, COL_MCH_DISABLED)
|
EgtSetColor(nDwnCutId, COL_MCH_DISABLED)
|
||||||
Dim bFreeStart As Boolean = (nInterf And FMI_TYPE.LI) <> FMI_TYPE.LI
|
Dim bFreeStart As Boolean = (nInterf And FMI_TYPE.LI) <> FMI_TYPE.LI
|
||||||
EgtSetColor(nPrcId, If(bFreeStart, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
EgtSetColor(nPrcId, If(bFreeStart, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||||
EgtSetColor(nDwnPrcId, If(bFreeStart, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
EgtSetColor(nDwnPrcId, If(bFreeStart, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||||
Dim bFreeEnd As Boolean = (nInterf And FMI_TYPE.LO) <> FMI_TYPE.LO
|
Dim bFreeEnd As Boolean = (nInterf And FMI_TYPE.LO) <> FMI_TYPE.LO
|
||||||
EgtSetColor(nPocId, If(bFreeEnd, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
EgtSetColor(nPocId, If(bFreeEnd, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||||
EgtSetColor(nDwnPocId, If(bFreeEnd, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
EgtSetColor(nDwnPocId, If(bFreeEnd, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||||
Else
|
Else
|
||||||
Dim colCut As Color3d
|
Dim colCut As Color3d
|
||||||
If bOnMach Then
|
If bOnMach Then
|
||||||
@@ -325,6 +373,7 @@ Public Module SplitAuto
|
|||||||
Dim ptOri As Point3d
|
Dim ptOri As Point3d
|
||||||
EgtGetTableRef(1, ptOri)
|
EgtGetTableRef(1, ptOri)
|
||||||
Dim vtOri As New Vector3d(ptOri.x, ptOri.y, ptOri.z)
|
Dim vtOri As New Vector3d(ptOri.x, ptOri.y, ptOri.z)
|
||||||
|
' ---------------------------------- GREZZI ----------------------------------
|
||||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||||
While nRawId <> GDB_ID.NULL
|
While nRawId <> GDB_ID.NULL
|
||||||
@@ -347,6 +396,13 @@ Public Module SplitAuto
|
|||||||
vNewRaws.Add(nNewRawId)
|
vNewRaws.Add(nNewRawId)
|
||||||
nNewRawId = EgtGetNextRawPart(nNewRawId)
|
nNewRawId = EgtGetNextRawPart(nNewRawId)
|
||||||
End While
|
End While
|
||||||
|
Else
|
||||||
|
' verifico che nella fase precedente è stato definito come sfrido, allora lo riassegno
|
||||||
|
Dim nVal As Integer = 0
|
||||||
|
EgtGetInfo(nRawId, K_ISNEWSCRAPS, nVal)
|
||||||
|
If nVal = 1 Or nVal = 2 Or nVal = 3 Then
|
||||||
|
EgtSetInfo(nRaw1Id, K_ISNEWSCRAPS, "3")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' Assegno ai nuovi grezzi eventuale texture del grezzo originale
|
' Assegno ai nuovi grezzi eventuale texture del grezzo originale
|
||||||
Dim nSolidId = EgtGetFirstNameInGroup(nRawId, NAME_RAW_SOLID)
|
Dim nSolidId = EgtGetFirstNameInGroup(nRawId, NAME_RAW_SOLID)
|
||||||
@@ -369,10 +425,19 @@ Public Module SplitAuto
|
|||||||
' passo al successivo grezzo
|
' passo al successivo grezzo
|
||||||
nRawId = EgtGetNextRawPart(nRawId)
|
nRawId = EgtGetNextRawPart(nRawId)
|
||||||
End While
|
End While
|
||||||
|
' ---------------------------------- GREZZI ----------------------------------
|
||||||
' Cancello preview dei tagli allungati dalla lavorazione
|
' Cancello preview dei tagli allungati dalla lavorazione
|
||||||
For Each nCut As Integer In vCuts
|
For Each nCut As Integer In vCuts
|
||||||
RemoveMachiningPreview(nCut)
|
RemoveMachiningPreview(nCut)
|
||||||
Next
|
Next
|
||||||
|
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||||
|
ChangeOperationPhase(nNewPhase)
|
||||||
|
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' Sposta le lavorzioni della fase precedente a quella indicata
|
||||||
|
Friend Sub ChangeOperationPhase_ERR(nNewPhase As Integer)
|
||||||
' Sposto tutte le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
' Sposto tutte le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||||
Dim nId = EgtGetFirstOperation()
|
Dim nId = EgtGetFirstOperation()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
@@ -393,9 +458,50 @@ Public Module SplitAuto
|
|||||||
End If
|
End If
|
||||||
nId = nNextId
|
nId = nNextId
|
||||||
End While
|
End While
|
||||||
Return True
|
End Sub
|
||||||
End Function
|
|
||||||
|
|
||||||
|
' Miglioramento della gestione delle lavorazioni
|
||||||
|
Friend Sub ChangeOperationPhase(nNewPhase As Integer)
|
||||||
|
' creo l'elenco delle lavorazioni che devono essere sposate
|
||||||
|
Dim MchList As New List(Of Integer)
|
||||||
|
' Recupero le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||||
|
Dim nId = EgtGetFirstOperation()
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
Dim nNextId = EgtGetNextOperation(nId)
|
||||||
|
If IsValidMachining(nId) And EgtGetOperationPhase(nId) = nNewPhase - 1 And EgtExistsInfo(nId, INFO_MCH_USER_OFF) Then
|
||||||
|
' Provo ad inserire la lavorazione nell'elenco
|
||||||
|
AddMach(MchList, nId)
|
||||||
|
' sposto le inglobate
|
||||||
|
Dim sInfo As String = String.Empty
|
||||||
|
If EgtGetInfo(nId, INFO_MCH_OTHMID, sInfo) Then
|
||||||
|
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||||
|
For Each sId2 As String In sItems
|
||||||
|
Dim nId2 As Integer = 0
|
||||||
|
StringToInt(sId2, nId2)
|
||||||
|
If nId2 > 0 Then
|
||||||
|
' Provo ad inserire la lavorazione nell'elenco
|
||||||
|
AddMach(MchList, nId2)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nId = nNextId
|
||||||
|
End While
|
||||||
|
' Procedo ora a spostare le lavorazioni nella nuova disposizione
|
||||||
|
For Each ItemMchId As Integer In MchList
|
||||||
|
EgtChangeOperationPhase(ItemMchId, nNewPhase)
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Inserisce gli inidici delle lavorazioni evitando di inserire dei doppioni
|
||||||
|
Private Sub AddMach(MchList As List(Of Integer), IdMch As Integer)
|
||||||
|
For Each Item As Integer In MchList
|
||||||
|
If IdMch = Item Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
MchList.Add(IdMch)
|
||||||
|
End Sub
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
Friend Function CalculateSplitAuto() As Boolean
|
Friend Function CalculateSplitAuto() As Boolean
|
||||||
' Fase iniziale
|
' Fase iniziale
|
||||||
@@ -719,53 +825,81 @@ Public Module SplitAuto
|
|||||||
|
|
||||||
Private Function ExecMove(nDispId As Integer, vNewRaws As List(Of Integer),
|
Private Function ExecMove(nDispId As Integer, vNewRaws As List(Of Integer),
|
||||||
vtMove As Vector3d, dMinMove As Double) As Boolean
|
vtMove As Vector3d, dMinMove As Double) As Boolean
|
||||||
Dim vtMove2 As Vector3d = -vtMove
|
Dim bTwoHeadVac As Boolean = (EgtGetHeadId(VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||||
Dim rmData As New RawMoveData
|
Dim rmData As New RawMoveData
|
||||||
If PutVacuumCupsOnRaw(vNewRaws(1), rmData) AndAlso
|
Dim vtMove2 As Vector3d = -vtMove
|
||||||
SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
|
|
||||||
|
VacuumCups.ResetHeadName()
|
||||||
|
Dim bPutVacuum As Boolean = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
||||||
|
If Not bPutVacuum And bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
||||||
|
If bPutVacuum AndAlso SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
|
||||||
rmData.m_vtRawMove = vtMove
|
rmData.m_vtRawMove = vtMove
|
||||||
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
||||||
Return True
|
Return True
|
||||||
ElseIf PutVacuumCupsOnRaw(vNewRaws(0), rmData) AndAlso
|
End If
|
||||||
SafeMoveRawPart(vNewRaws(0), vtMove2, dMinMove) Then
|
|
||||||
|
VacuumCups.ResetHeadName()
|
||||||
|
Dim bPut2Vacuum As Boolean = PutVacuumCupsOnRaw(vNewRaws(0), rmData)
|
||||||
|
If Not bPut2Vacuum And bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(vNewRaws(0), rmData)
|
||||||
|
If bPut2Vacuum AndAlso SafeMoveRawPart(vNewRaws(0), vtMove2, dMinMove) Then
|
||||||
rmData.m_vtRawMove = vtMove2
|
rmData.m_vtRawMove = vtMove2
|
||||||
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
||||||
Return True
|
Return True
|
||||||
Else
|
|
||||||
Return False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
|
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
|
||||||
|
' Spostamento originale
|
||||||
|
Dim vtOriMove As New Vector3d(vtMove)
|
||||||
|
' Livello di movimento
|
||||||
|
Dim nMoveLevel As Integer = GetPrivateProfileInt(S_SPLIT, K_MOVE_LEV, 5, m_MainWindow.GetIniFile())
|
||||||
|
Dim nMove As Integer = 1
|
||||||
' Se esce dalla tavola, movimento già annullato ed esco con errore
|
' Se esce dalla tavola, movimento già annullato ed esco con errore
|
||||||
If Not EgtMoveRawPart(nRawId, vtMove) Then Return False
|
If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
|
||||||
' Se interferisce con altri grezzi, annullo movimento ed esco con errore
|
' Se interferisce con altri grezzi, annullo movimento ed esco con errore
|
||||||
If Not VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If Not VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
EgtMoveRawPart(nRawId, -vtMove)
|
EgtMoveRawPart(nRawId, -vtOriMove)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
If nMoveLevel < 2 Then Return True
|
||||||
' Provo ad aggiungere un altro movimento
|
' Provo ad aggiungere un altro movimento
|
||||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
If EgtMoveRawPart(nRawId, vtOriMove) Then
|
||||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
vtMove += vtMove
|
vtMove += vtOriMove
|
||||||
|
nMove += 1
|
||||||
|
If nMoveLevel = nMove Then Return True
|
||||||
Else
|
Else
|
||||||
EgtMoveRawPart(nRawId, -vtMove)
|
EgtMoveRawPart(nRawId, -vtOriMove)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Provo ad aggiungere un altro movimento
|
||||||
|
If EgtMoveRawPart(nRawId, vtOriMove) Then
|
||||||
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
|
vtMove += vtOriMove
|
||||||
|
nMove += 1
|
||||||
|
If nMoveLevel = nMove Then Return True
|
||||||
|
Else
|
||||||
|
EgtMoveRawPart(nRawId, -vtOriMove)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Provo ad aggiungere un movimento dimezzato
|
' Provo ad aggiungere un movimento dimezzato
|
||||||
If EgtMoveRawPart(nRawId, 0.5 * vtMove) Then
|
If EgtMoveRawPart(nRawId, 0.5 * vtOriMove) Then
|
||||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
vtMove += 0.5 * vtMove
|
vtMove += 0.5 * vtOriMove
|
||||||
|
nMove += 1
|
||||||
|
If nMoveLevel = nMove Then Return True
|
||||||
Else
|
Else
|
||||||
EgtMoveRawPart(nRawId, -0.5 * vtMove)
|
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Provo ad aggiunger un movimento 1/4
|
' Provo ad aggiungere un movimento 1/4
|
||||||
If EgtMoveRawPart(nRawId, 0.25 * vtMove) Then
|
If EgtMoveRawPart(nRawId, 0.25 * vtOriMove) Then
|
||||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
vtMove += 0.25 * vtMove
|
vtMove += 0.25 * vtOriMove
|
||||||
Else
|
Else
|
||||||
EgtMoveRawPart(nRawId, -0.25 * vtMove)
|
EgtMoveRawPart(nRawId, -0.25 * vtOriMove)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
@@ -817,4 +951,30 @@ Public Module SplitAuto
|
|||||||
Return (Not bInterf)
|
Return (Not bInterf)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function MaxCuttingMustache(dMustache As Double) As Double
|
||||||
|
Dim MachSplitList As New List(Of SplitMach)
|
||||||
|
' Recupero l'indice della fase corrente
|
||||||
|
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||||
|
' se non è stata creata nessuna lista allora restituisco il valore di Default
|
||||||
|
If Not CalculateSplitMachList(nCurrPhase, MachSplitList) Then Return dMustache
|
||||||
|
Dim NewMustache As Double = 0
|
||||||
|
Dim ItemMachSplit As SplitMach
|
||||||
|
For Each ItemMachSplit In MachSplitList
|
||||||
|
' Recupero lunghezza baffo secondo taglio
|
||||||
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(ItemMachSplit.m_nId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||||
|
Dim dDT As Double
|
||||||
|
If EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT) Then
|
||||||
|
If NewMustache < dDT Then NewMustache = dDT
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim dExtraL As Double = 0
|
||||||
|
EgtMdbGetGeneralParam(MCH_GP.EXTRALONCUTREG, dExtraL)
|
||||||
|
' se esiste il valore di un baffo allora sovrascrivo il valore di default
|
||||||
|
If NewMustache > 0 Then
|
||||||
|
dMustache = Math.Ceiling(NewMustache)
|
||||||
|
End If
|
||||||
|
Return dMustache + dExtraL
|
||||||
|
End Function
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
+94
-29
@@ -38,7 +38,7 @@
|
|||||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||||
<Image.RenderTransform>
|
<Image.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<RotateTransform Angle="180"/>
|
<RotateTransform Angle="180"/>
|
||||||
@@ -63,17 +63,27 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ListBox Name="MachiningLsBx" Grid.Row="1" ItemTemplate="{DynamicResource NameIdLsBxItem}"
|
<ListBox Name="MachiningLsBx" Grid.Row="1"
|
||||||
SelectionMode="Extended">
|
SelectionMode="Extended">
|
||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemTemplate>
|
||||||
<Style TargetType="ListBoxItem">
|
<DataTemplate>
|
||||||
<Style.Triggers>
|
<TextBlock Text="{Binding Name}">
|
||||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
<TextBlock.Style>
|
||||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||||
</DataTrigger>
|
<Style.Triggers>
|
||||||
</Style.Triggers>
|
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||||
</Style>
|
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||||
</ListBox.ItemContainerStyle>
|
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||||
|
<Setter Property="Foreground" Value="Black"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</TextBlock.Style>
|
||||||
|
</TextBlock>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<Grid Grid.Row="2">
|
<Grid Grid.Row="2">
|
||||||
@@ -100,9 +110,15 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Image Source="{DynamicResource ON_OFF-singolo-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
</Button>
|
||||||
|
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Tutti-ONImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Tutti-OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -113,9 +129,34 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||||
|
<ToggleButton Name="BridgesWJBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource PonticelliWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
<!--solo per macchine con lavorazioni Waterjet-->
|
||||||
|
<Button Name="QualityWJBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource QualityWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||||
|
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -139,18 +180,42 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Image Source="{DynamicResource Inizio-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
</Button>
|
||||||
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Image Source="{DynamicResource Fine-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
</Button>
|
||||||
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Image Source="{DynamicResource Modifica-InizioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
</Button>
|
||||||
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
<Image Source="{DynamicResource Modifica-FineImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
</Button>
|
||||||
|
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource InvertiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Inizio-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Inizio-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Fine-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Fine-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Tutti-allungaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Tutti-accorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
+1374
-328
File diff suppressed because it is too large
Load Diff
+245
-35
@@ -1,4 +1,6 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
Imports System.Threading
|
||||||
|
|
||||||
Module VacuumCups
|
Module VacuumCups
|
||||||
' Tipo manipolatore con ventosa (0=assente, 1=dietro, 2=laterale)
|
' Tipo manipolatore con ventosa (0=assente, 1=dietro, 2=laterale)
|
||||||
@@ -8,11 +10,41 @@ Module VacuumCups
|
|||||||
Private m_nVacId As Integer = GDB_ID.NULL
|
Private m_nVacId As Integer = GDB_ID.NULL
|
||||||
Private m_nRefId As Integer = GDB_ID.NULL
|
Private m_nRefId As Integer = GDB_ID.NULL
|
||||||
Private m_dPreferredRot As Double = 0
|
Private m_dPreferredRot As Double = 0
|
||||||
|
Private m_dPrefVertRotXMinus As Double = 0
|
||||||
|
Private m_dPrefVertRotXPlus As Double = 0
|
||||||
|
Private m_dPrefVertRotYMinus As Double = 0
|
||||||
|
Private m_dPrefVertRotYPlus As Double = 0
|
||||||
Private m_dDripRefAng As Double = 0
|
Private m_dDripRefAng As Double = 0
|
||||||
|
' dati carico massimo manipolatore
|
||||||
|
Private m_RawDensity As Double = 2500
|
||||||
|
Private m_RawWeight As Double = 0
|
||||||
|
Private m_MaxWeightSinglePlugger As Double = 250
|
||||||
|
Private m_MaxWeightDoublePlugger As Double = 750
|
||||||
|
Public bOverWeight As Boolean = False
|
||||||
|
' dati per rotazione ventose vicono al fine corsa Y e X
|
||||||
|
Private bRotateVacuumNearExtraStrokeY As Boolean = False
|
||||||
|
Private bRotateVacuumNearExtraStrokeX As Boolean = False
|
||||||
|
' dati stroke
|
||||||
|
Public bExtraStroke As Boolean = False
|
||||||
|
Public ptStartPointLift As Point3d
|
||||||
|
Public dDegRotStartAng As Double
|
||||||
|
|
||||||
' Nome del gruppo temporaneo per le ventose
|
' Nome del gruppo temporaneo per le ventose
|
||||||
Private Const VACTMP_GRP As String = "VacTmp"
|
Private Const VACTMP_GRP As String = "VacTmp"
|
||||||
|
|
||||||
|
Private m_sHeadName As String = VACUUM_HEAD
|
||||||
|
Public Sub ResetHeadName()
|
||||||
|
Dim bReload As Boolean = (m_sHeadName <> VACUUM_HEAD)
|
||||||
|
m_sHeadName = VACUUM_HEAD
|
||||||
|
If bReload Then LoadVacuumCups()
|
||||||
|
End Sub
|
||||||
|
Public Function ChangeHeadName() As Boolean
|
||||||
|
If EgtGetHeadId( VACUUM_HEAD_2) = GDB_ID.NULL Then Return False
|
||||||
|
m_sHeadName = If( m_sHeadName = VACUUM_HEAD, VACUUM_HEAD_2, VACUUM_HEAD)
|
||||||
|
LoadVacuumCups()
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
Friend Class RawMoveData
|
Friend Class RawMoveData
|
||||||
|
|
||||||
@@ -48,6 +80,20 @@ Module VacuumCups
|
|||||||
Return m_nVacType
|
Return m_nVacType
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' carico i dati macchina relativi al peso massimo movimentabile
|
||||||
|
Friend Sub SetWeightInformation(Density As Double, MaxSingle As Double, MaxDouble As Double)
|
||||||
|
m_RawDensity = Density
|
||||||
|
m_MaxWeightSinglePlugger = MaxSingle
|
||||||
|
m_MaxWeightDoublePlugger = MaxDouble
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub SetRotationForExtraStrokeY(Rotate As Boolean)
|
||||||
|
bRotateVacuumNearExtraStrokeY = Rotate
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub SetRotationForExtraStrokeX(Rotate As Boolean)
|
||||||
|
bRotateVacuumNearExtraStrokeX = Rotate
|
||||||
|
End Sub
|
||||||
Friend Function GetVacuumId() As Integer
|
Friend Function GetVacuumId() As Integer
|
||||||
Return m_nVacId
|
Return m_nVacId
|
||||||
End Function
|
End Function
|
||||||
@@ -55,15 +101,17 @@ Module VacuumCups
|
|||||||
Friend Function LoadVacuumCups() As Boolean
|
Friend Function LoadVacuumCups() As Boolean
|
||||||
' Leggo tipo manipolatore con ventosa
|
' Leggo tipo manipolatore con ventosa
|
||||||
m_nVacType = 0
|
m_nVacType = 0
|
||||||
EgtGetInfo(EgtGetHeadId(VACUUM_HEAD), KEY_VAC_TYPE, m_nVacType)
|
EgtGetInfo(EgtGetHeadId(m_sHeadName), KEY_VAC_TYPE, m_nVacType)
|
||||||
' Cancello eventuali vecchie ventose
|
' Cancello eventuali vecchie ventose
|
||||||
RemoveVacuumCups()
|
RemoveVacuumCups()
|
||||||
' Identificativo ventose nella macchina
|
' Identificativo ventose nella macchina
|
||||||
Dim nLayId As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), VACUUM_HEAD_LAYOUT)
|
Dim nLayId As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(m_sHeadName), VACUUM_HEAD_LAYOUT)
|
||||||
If nLayId = GDB_ID.NULL Then Return False
|
If nLayId = GDB_ID.NULL Then Return False
|
||||||
' Identificativo riferimento della testa nella macchina
|
' Identificativo riferimento della testa nella macchina
|
||||||
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT)
|
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(m_sHeadName), HEAD_FIRST_EXIT)
|
||||||
If nT1Id = GDB_ID.NULL Then Return False
|
If nT1Id = GDB_ID.NULL Then Return False
|
||||||
|
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||||
|
EgtSetCalcTool("", m_sHeadName, 1)
|
||||||
' Creo gruppo temporaneo in cui copiarli
|
' Creo gruppo temporaneo in cui copiarli
|
||||||
m_nTempId = EgtCreateGroup(GDB_ID.ROOT)
|
m_nTempId = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
If m_nTempId = GDB_ID.NULL Then Return False
|
If m_nTempId = GDB_ID.NULL Then Return False
|
||||||
@@ -73,18 +121,23 @@ Module VacuumCups
|
|||||||
m_nVacId = EgtCopyGlob(nLayId, m_nTempId)
|
m_nVacId = EgtCopyGlob(nLayId, m_nTempId)
|
||||||
If m_nVacId = GDB_ID.NULL Then Return False
|
If m_nVacId = GDB_ID.NULL Then Return False
|
||||||
' Angolo di rotazione preferito
|
' Angolo di rotazione preferito
|
||||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||||
|
' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola
|
||||||
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
|
||||||
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus)
|
||||||
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYMINUS, m_dPrefVertRotYMinus)
|
||||||
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYPLUS, m_dPrefVertRotYPlus)
|
||||||
' Direzione di riferimento per tagli Drip
|
' Direzione di riferimento per tagli Drip
|
||||||
EgtGetInfo( m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
EgtGetInfo(m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
||||||
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
|
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
|
||||||
EgtSetStatus(m_nVacId, GDB_ST.OFF)
|
EgtSetStatus(m_nVacId, GDB_ST.OFF)
|
||||||
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
Select Case EgtGetType(nId)
|
Select Case EgtGetType(nId)
|
||||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
||||||
EgtSetStatus(nId, GDB_ST.ON_)
|
EgtSetStatus(nId, GDB_ST.ON_)
|
||||||
Case Else
|
Case Else
|
||||||
EgtSetStatus(nId, GDB_ST.OFF)
|
EgtSetStatus(nId, GDB_ST.OFF)
|
||||||
End Select
|
End Select
|
||||||
nId = EgtGetNext(nId)
|
nId = EgtGetNext(nId)
|
||||||
End While
|
End While
|
||||||
@@ -113,7 +166,7 @@ Module VacuumCups
|
|||||||
Friend Function ResetVacuumCups() As Boolean
|
Friend Function ResetVacuumCups() As Boolean
|
||||||
' Ripristino posizione e rotazione originali
|
' Ripristino posizione e rotazione originali
|
||||||
Dim frOriRef As New Frame3d
|
Dim frOriRef As New Frame3d
|
||||||
EgtFrame(EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT), GDB_ID.ROOT, frOriRef)
|
EgtFrame(EgtGetFirstNameInGroup(EgtGetHeadId(m_sHeadName), HEAD_FIRST_EXIT), GDB_ID.ROOT, frOriRef)
|
||||||
Dim frCurrRef As New Frame3d
|
Dim frCurrRef As New Frame3d
|
||||||
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
|
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
|
||||||
EgtMove(m_nVacId, frOriRef.Orig() - frCurrRef.Orig(), GDB_RT.GLOB)
|
EgtMove(m_nVacId, frOriRef.Orig() - frCurrRef.Orig(), GDB_RT.GLOB)
|
||||||
@@ -125,10 +178,10 @@ Module VacuumCups
|
|||||||
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
Select Case EgtGetType(nId)
|
Select Case EgtGetType(nId)
|
||||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
||||||
EgtSetStatus(nId, GDB_ST.ON_)
|
EgtSetStatus(nId, GDB_ST.ON_)
|
||||||
Case Else
|
Case Else
|
||||||
EgtSetStatus(nId, GDB_ST.OFF)
|
EgtSetStatus(nId, GDB_ST.OFF)
|
||||||
End Select
|
End Select
|
||||||
nId = EgtGetNext(nId)
|
nId = EgtGetNext(nId)
|
||||||
End While
|
End While
|
||||||
@@ -160,10 +213,25 @@ Module VacuumCups
|
|||||||
EgtGetBBoxGlob(nRKerfId, GDB_BB.STANDARD, b3Kerf)
|
EgtGetBBoxGlob(nRKerfId, GDB_BB.STANDARD, b3Kerf)
|
||||||
Dim ptKerfCen As Point3d
|
Dim ptKerfCen As Point3d
|
||||||
EgtCentroid(nRKerfId, GDB_ID.ROOT, ptKerfCen)
|
EgtCentroid(nRKerfId, GDB_ID.ROOT, ptKerfCen)
|
||||||
|
|
||||||
|
'-------------------- INIZIO CALCOLO PESO --------------------
|
||||||
|
' recupero l'area del grezzo da muovere
|
||||||
|
Dim RawArea As Double = 0
|
||||||
|
' superficie del grezzo senza considerare eventuali fori
|
||||||
|
EgtSurfFrGrossArea(nRKerfId, RawArea)
|
||||||
|
' volume calcolato in mmc
|
||||||
|
Dim RawVolume As Double = RawArea * b3Raw.DimZ()
|
||||||
|
' peso calcolato in kg
|
||||||
|
m_RawWeight = RawVolume * m_RawDensity / Math.Pow(10, 9)
|
||||||
|
'-------------------- FINE CALCOLO PESO --------------------
|
||||||
|
|
||||||
' Eseguo ricerca
|
' Eseguo ricerca
|
||||||
If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then
|
If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then
|
||||||
Return True
|
Return True
|
||||||
|
Else
|
||||||
|
If ChangeHeadName() Then Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' In caso di fallimento, provo riducendo con offset la regione di kerf
|
' In caso di fallimento, provo riducendo con offset la regione di kerf
|
||||||
' (così si simula la proiezione del centro sul MAT - medial axis transform)
|
' (così si simula la proiezione del centro sul MAT - medial axis transform)
|
||||||
Dim bOkFind As Boolean = False
|
Dim bOkFind As Boolean = False
|
||||||
@@ -182,6 +250,7 @@ Module VacuumCups
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' utilizzata per gestire la movimentazione dei pezzi per eseguire i drip
|
||||||
Friend Function PutVacuumCupsOnPart(nPartId As Integer,
|
Friend Function PutVacuumCupsOnPart(nPartId As Integer,
|
||||||
ByRef rmData As RawMoveData, ByRef b3Part As BBox3d) As Boolean
|
ByRef rmData As RawMoveData, ByRef b3Part As BBox3d) As Boolean
|
||||||
' Ripristino posizione originale ventose
|
' Ripristino posizione originale ventose
|
||||||
@@ -189,20 +258,20 @@ Module VacuumCups
|
|||||||
' Verifico sia veramente un pezzo
|
' Verifico sia veramente un pezzo
|
||||||
If EgtGetRawPartFromPart(nPartId) = GDB_ID.NULL Then Return False
|
If EgtGetRawPartFromPart(nPartId) = GDB_ID.NULL Then Return False
|
||||||
' Cerco la direzione del primo taglio attivo da sotto
|
' Cerco la direzione del primo taglio attivo da sotto
|
||||||
Dim nDripLayId As Integer = EgtGetFirstNameInGroup( nPartId, NAME_DRIPCUT)
|
Dim nDripLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_DRIPCUT)
|
||||||
Dim nDripLineId As Integer = EgtGetFirstInGroup( nDripLayId)
|
Dim nDripLineId As Integer = EgtGetFirstInGroup(nDripLayId)
|
||||||
While nDripLineId <> GDB_ID.NULL
|
While nDripLineId <> GDB_ID.NULL
|
||||||
Dim nMchId As Integer = EgtGetOperationId( "DripSaw" & nDripLineId.ToString())
|
Dim nMchId As Integer = EgtGetOperationId("DripSaw" & nDripLineId.ToString())
|
||||||
Dim nMode As Integer
|
Dim nMode As Integer
|
||||||
If EgtGetMode( nMchId, nMode) AndAlso nMode = GDB_MD.STD Then Exit While
|
If EgtGetMode(nMchId, nMode) AndAlso nMode = GDB_MD.STD Then Exit While
|
||||||
nDripLineId = EgtGetNext( nDripLineId)
|
nDripLineId = EgtGetNext(nDripLineId)
|
||||||
End While
|
End While
|
||||||
Dim vtDir As New Vector3d
|
Dim vtDir As New Vector3d
|
||||||
if EgtStartVector( nDripLineId, GDB_ID.ROOT, vtDir) Then
|
If EgtStartVector(nDripLineId, GDB_ID.ROOT, vtDir) Then
|
||||||
Dim dLen, dAngV, dAngH As Double
|
Dim dLen, dAngV, dAngH As Double
|
||||||
vtDir.ToSpherical( dLen, dAngV, dAngH)
|
vtDir.ToSpherical(dLen, dAngV, dAngH)
|
||||||
Dim dOffsAng = dAngH - m_dDripRefAng
|
Dim dOffsAng = dAngH - m_dDripRefAng
|
||||||
While dOffsAng - m_dPreferredRot >= 90
|
While dOffsAng - m_dPreferredRot >= 90
|
||||||
dOffsAng -= 180
|
dOffsAng -= 180
|
||||||
End While
|
End While
|
||||||
While dOffsAng - m_dPreferredRot <= -90
|
While dOffsAng - m_dPreferredRot <= -90
|
||||||
@@ -261,6 +330,7 @@ Module VacuumCups
|
|||||||
Dim sCups() As String = Nothing
|
Dim sCups() As String = Nothing
|
||||||
Dim sCups2() As String = Nothing
|
Dim sCups2() As String = Nothing
|
||||||
If Not GetVacuumCupSelection(nI, sCups, sCups2) Then Return False
|
If Not GetVacuumCupSelection(nI, sCups, sCups2) Then Return False
|
||||||
|
bExtraStroke = False
|
||||||
' Determino validità soluzioni della configurazione
|
' Determino validità soluzioni della configurazione
|
||||||
Dim vtMove As New Vector3d
|
Dim vtMove As New Vector3d
|
||||||
Dim ptRotCen As New Point3d
|
Dim ptRotCen As New Point3d
|
||||||
@@ -289,6 +359,7 @@ Module VacuumCups
|
|||||||
Dim frCurrRef As New Frame3d
|
Dim frCurrRef As New Frame3d
|
||||||
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
|
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
|
||||||
Dim vtDelta As Vector3d = frCurrRef.Orig() - ptRawCen
|
Dim vtDelta As Vector3d = frCurrRef.Orig() - ptRawCen
|
||||||
|
|
||||||
' Assegno dati noti al movimento del grezzo
|
' Assegno dati noti al movimento del grezzo
|
||||||
rmData.m_nId = nRawId
|
rmData.m_nId = nRawId
|
||||||
rmData.m_vtRawMove = Vector3d.NULL()
|
rmData.m_vtRawMove = Vector3d.NULL()
|
||||||
@@ -334,7 +405,7 @@ Module VacuumCups
|
|||||||
|
|
||||||
Private Function GetVacRotAxisSteps(ByRef vAngRot As List(Of Double)) As Boolean
|
Private Function GetVacRotAxisSteps(ByRef vAngRot As List(Of Double)) As Boolean
|
||||||
' Recupero l'asse rotante della testa ventosa
|
' Recupero l'asse rotante della testa ventosa
|
||||||
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(VACUUM_HEAD))
|
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(m_sHeadName))
|
||||||
' Verifico se contiene info con STEPS
|
' Verifico se contiene info con STEPS
|
||||||
Dim sSteps As String = ""
|
Dim sSteps As String = ""
|
||||||
If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return False
|
If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return False
|
||||||
@@ -363,6 +434,26 @@ Module VacuumCups
|
|||||||
If b3Vac.IsEmpty() Then Return INFINITO
|
If b3Vac.IsEmpty() Then Return INFINITO
|
||||||
' Se box maggiore di quello del pezzo, scarto soluzione
|
' Se box maggiore di quello del pezzo, scarto soluzione
|
||||||
If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
|
If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
|
||||||
|
'-------------------- INIZIO VERIFICA PESO --------------------
|
||||||
|
bOverWeight = False
|
||||||
|
Select Case GetPluggerFromCameras(sCups)
|
||||||
|
Case 2
|
||||||
|
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||||
|
If m_RawWeight > m_MaxWeightDoublePlugger Then
|
||||||
|
bOverWeight = True
|
||||||
|
Return INFINITO
|
||||||
|
End If
|
||||||
|
Case 1
|
||||||
|
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||||
|
If m_RawWeight > m_MaxWeightSinglePlugger Then
|
||||||
|
bOverWeight = True
|
||||||
|
Return INFINITO
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
'-------------------- FINE VERIFICA PESO --------------------
|
||||||
|
' Recupero l'area della tavola
|
||||||
|
Dim b3Tab As New BBox3d
|
||||||
|
EgtGetTableArea(1, b3Tab)
|
||||||
' Determino il movimento
|
' Determino il movimento
|
||||||
vtMove = ptRawCen - b3Vac.Center()
|
vtMove = ptRawCen - b3Vac.Center()
|
||||||
b3Vac.Move(vtMove)
|
b3Vac.Move(vtMove)
|
||||||
@@ -374,11 +465,30 @@ Module VacuumCups
|
|||||||
frMinRect.VersX().ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
frMinRect.VersX().ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||||
dRotAngDeg = dAngOrizzDeg
|
dRotAngDeg = dAngOrizzDeg
|
||||||
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
||||||
Dim dAngDelta As Double = If( Math.Abs( b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
Dim dPreferredRot As Double = m_dPreferredRot
|
||||||
While dRotAngDeg - m_dPreferredRot >= dAngDelta / 2
|
' -------------------- INIZIO GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
||||||
|
' verifico l'orientamento del pezzo
|
||||||
|
If bRotateVacuumNearExtraStrokeX And Not IsHorizontal(dAngOrizzDeg) Then
|
||||||
|
' se l'orientamento è verticale
|
||||||
|
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||||
|
dPreferredRot = m_dPrefVertRotXMinus
|
||||||
|
Else
|
||||||
|
dPreferredRot = m_dPrefVertRotXPlus
|
||||||
|
End If
|
||||||
|
ElseIf bRotateVacuumNearExtraStrokeY And IsHorizontal(dAngOrizzDeg) Then
|
||||||
|
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
||||||
|
If frMinRect.Orig().y < b3Tab.Center().y Then
|
||||||
|
dPreferredRot = m_dPrefVertRotYPlus
|
||||||
|
Else
|
||||||
|
dPreferredRot = m_dPrefVertRotYMinus
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' -------------------- FINE GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
||||||
|
Dim dAngDelta As Double = If(Math.Abs(b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||||
|
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||||
dRotAngDeg -= dAngDelta
|
dRotAngDeg -= dAngDelta
|
||||||
End While
|
End While
|
||||||
While dRotAngDeg - m_dPreferredRot <= -dAngDelta / 2
|
While dRotAngDeg - dPreferredRot <= -dAngDelta / 2
|
||||||
dRotAngDeg += dAngDelta
|
dRotAngDeg += dAngDelta
|
||||||
End While
|
End While
|
||||||
Else
|
Else
|
||||||
@@ -400,15 +510,15 @@ Module VacuumCups
|
|||||||
' Ordino secondo distanza angolare crescente da direzione di allineamento (modulo 180 deg)
|
' Ordino secondo distanza angolare crescente da direzione di allineamento (modulo 180 deg)
|
||||||
Dim dRotRefDeg As Double = dRotAngDeg
|
Dim dRotRefDeg As Double = dRotAngDeg
|
||||||
vAngRot.Sort(Function(P, Q)
|
vAngRot.Sort(Function(P, Q)
|
||||||
Dim dDiffP = Math.Abs( P - dRotRefDeg)
|
Dim dDiffP = Math.Abs(P - dRotRefDeg)
|
||||||
If Math.Abs( dDiffP - 180) < 10 * EPS_ANG_SMALL Then dDiffP = 1
|
If Math.Abs(dDiffP - 180) < 10 * EPS_ANG_SMALL Then dDiffP = 1
|
||||||
Dim dDiffQ = Math.Abs( Q - dRotRefDeg)
|
Dim dDiffQ = Math.Abs(Q - dRotRefDeg)
|
||||||
If Math.Abs( dDiffQ - 180) < 10 * EPS_ANG_SMALL Then dDiffQ = 1
|
If Math.Abs(dDiffQ - 180) < 10 * EPS_ANG_SMALL Then dDiffQ = 1
|
||||||
Return ( dDiffP - dDiffQ)
|
Return (dDiffP - dDiffQ)
|
||||||
End Function)
|
End Function)
|
||||||
' Annullo la rotazione di allineamento
|
' Annullo la rotazione di allineamento
|
||||||
dRotAngDeg = 0
|
dRotAngDeg = 0
|
||||||
' altrimenti in continuo
|
' altrimenti in continuo
|
||||||
Else
|
Else
|
||||||
' Assegno più valori di ricerca e conservo angolo di allineamento
|
' Assegno più valori di ricerca e conservo angolo di allineamento
|
||||||
vAngRot.AddRange({0, +5, -5, +12.5, -12.5, +25, -25, +45, -45})
|
vAngRot.AddRange({0, +5, -5, +12.5, -12.5, +25, -25, +45, -45})
|
||||||
@@ -430,13 +540,91 @@ Module VacuumCups
|
|||||||
' Applico movimento e rotazione al punto
|
' Applico movimento e rotazione al punto
|
||||||
ptRef.Move(vtMove)
|
ptRef.Move(vtMove)
|
||||||
ptRef.Rotate(ptRotCen, Vector3d.Z_AX(), dRotAngDeg)
|
ptRef.Rotate(ptRotCen, Vector3d.Z_AX(), dRotAngDeg)
|
||||||
|
|
||||||
|
' -------------- INIZIO verifica di essere nel limite delle corse macchina --------------
|
||||||
|
If VerifyOutOfStrokes(ptRef, dRotAngDeg) <> 0 Then
|
||||||
|
bExtraStroke = True
|
||||||
|
Return INFINITO
|
||||||
|
End If
|
||||||
|
' se la posizione è accettbaile allora salvo i dati
|
||||||
|
ptStartPointLift = ptRef
|
||||||
|
dDegRotStartAng = dRotAngDeg
|
||||||
|
' -------------- FINE verifica di essere nel limite delle corse macchina --------------
|
||||||
|
|
||||||
' Ne calcolo la distanza dal centro della tavola
|
' Ne calcolo la distanza dal centro della tavola
|
||||||
Dim b3Tab As New BBox3d
|
|
||||||
EgtGetTableArea(1, b3Tab)
|
|
||||||
Dim dDist As Double = Point3d.DistXY(ptRef, b3Tab.Center())
|
Dim dDist As Double = Point3d.DistXY(ptRef, b3Tab.Center())
|
||||||
Return dDist
|
Return dDist
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function IsHorizontal(dDegAng As Double) As Boolean
|
||||||
|
If (Math.Abs(dDegAng) > 45 And Math.Abs(dDegAng) < 135) Or (Math.Abs(dDegAng) > 225 And Math.Abs(dDegAng) < 315) Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' assegnate le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||||
|
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||||
|
Dim sAxisName As String = "C"
|
||||||
|
' verifico che il nome dell'asse impostato sia corretto
|
||||||
|
If EgtGetAxisId(sAxisName) = GDB_ID.NULL Then
|
||||||
|
If m_sHeadName = VACUUM_HEAD Then
|
||||||
|
sAxisName = "C1"
|
||||||
|
Else
|
||||||
|
sAxisName = "C2"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Posizione Home dell'asse rotante
|
||||||
|
Dim dCHome As Double
|
||||||
|
EgtGetAxisHomePos(sAxisName, dCHome)
|
||||||
|
' Corse dell'asse
|
||||||
|
Dim dCMin As Double
|
||||||
|
EgtGetAxisMin(sAxisName, dCMin)
|
||||||
|
Dim dCMax As Double
|
||||||
|
EgtGetAxisMax(sAxisName, dCMax)
|
||||||
|
' Porto l'angolo nel range
|
||||||
|
Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome
|
||||||
|
AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax)
|
||||||
|
' Imposto la ventosa come fosse un utensile
|
||||||
|
EgtSetCalcTool("", m_sHeadName, 1)
|
||||||
|
' Calcolo gli assi macchina
|
||||||
|
Dim dX, dY, dZ As Double
|
||||||
|
Dim nStat As Integer
|
||||||
|
If EgtGetAxisId("A") <> GDB_ID.NULL Then
|
||||||
|
' Asse tavola rotante (movimenti solo con A0)
|
||||||
|
EgtGetCalcPositions(ptRef, 0, dRotAngMachDeg, nStat, dX, dY, dZ)
|
||||||
|
' Verifico le corse
|
||||||
|
EgtVerifyOutstroke(dX, dY, dZ, 0, dRotAngMachDeg, nStat)
|
||||||
|
Else
|
||||||
|
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ)
|
||||||
|
' Verifico le corse
|
||||||
|
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Return nStat
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' dall'informazione di extra corsa recupera il valore indicato
|
||||||
|
Public Function GetExtraStrokeValue(sInfo As String) As Double
|
||||||
|
Dim dExtraStroke As Double = 0
|
||||||
|
Dim sItems As String() = sInfo.Split("="c)
|
||||||
|
If sItems.Count = 2 Then
|
||||||
|
Dim nStartIndex As Integer = 0
|
||||||
|
For Each ItemChar As Char In sItems(1)
|
||||||
|
If ItemChar = "("c Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
nStartIndex += 1
|
||||||
|
Next
|
||||||
|
If nStartIndex > 0 Then
|
||||||
|
Dim sValue As String = sItems(1).Remove(nStartIndex, sItems(1).Count - nStartIndex)
|
||||||
|
StringToLen(sValue, dExtraStroke)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return dExtraStroke
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Function TestVacuumCups(nCups() As Integer, nRawRegId As Integer,
|
Private Function TestVacuumCups(nCups() As Integer, nRawRegId As Integer,
|
||||||
vtMove As Vector3d, ptRotCen As Point3d, dRotAngDeg As Double) As Boolean
|
vtMove As Vector3d, ptRotCen As Point3d, dRotAngDeg As Double) As Boolean
|
||||||
' Eseguo verifica delle ventose rispetto al grezzo
|
' Eseguo verifica delle ventose rispetto al grezzo
|
||||||
@@ -457,6 +645,28 @@ Module VacuumCups
|
|||||||
Return bVacOk
|
Return bVacOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' dato il vettore delle camere restituisco il quali attuatori sono coinvolti
|
||||||
|
Private Function GetPluggerFromCameras(sCups() As String) As Integer
|
||||||
|
Dim nCountPlunger As Integer = 1
|
||||||
|
Dim bPlugger1 As Boolean = False
|
||||||
|
Dim bPlugger2 As Boolean = False
|
||||||
|
For Each Camera As String In sCups
|
||||||
|
If (Camera.Contains("1") Or Camera.Contains("2") Or Camera.Contains("3")) Then
|
||||||
|
bPlugger1 = True
|
||||||
|
Else
|
||||||
|
bPlugger2 = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' verifico quali sono le camere attive
|
||||||
|
If bPlugger1 And bPlugger2 Then
|
||||||
|
nCountPlunger = 2
|
||||||
|
ElseIf Not bPlugger1 And Not bPlugger2 Then
|
||||||
|
nCountPlunger = 0
|
||||||
|
End If
|
||||||
|
' restituisco il numero di Plugger in uso
|
||||||
|
Return nCountPlunger
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function SaveOneMoveInfo(nId As Integer, rmData As RawMoveData) As Boolean
|
Friend Function SaveOneMoveInfo(nId As Integer, rmData As RawMoveData) As Boolean
|
||||||
' Assegno le informazioni
|
' Assegno le informazioni
|
||||||
EgtSetInfo(nId, "Id", rmData.m_nId)
|
EgtSetInfo(nId, "Id", rmData.m_nId)
|
||||||
@@ -557,7 +767,7 @@ Module VacuumCups
|
|||||||
rmList.RemoveAt(nInd)
|
rmList.RemoveAt(nInd)
|
||||||
nInd = rmList.Count() - 1
|
nInd = rmList.Count() - 1
|
||||||
End If
|
End If
|
||||||
' Se non trovato, lo accodo
|
' Se non trovato, lo accodo
|
||||||
Else
|
Else
|
||||||
rmList.Add(New RawMoveData(nRawId))
|
rmList.Add(New RawMoveData(nRawId))
|
||||||
nInd = rmList.Count() - 1
|
nInd = rmList.Count() - 1
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ Module ConstGen
|
|||||||
Public Const MACHININGS_DIR As String = "Machinings"
|
Public Const MACHININGS_DIR As String = "Machinings"
|
||||||
' Nome file Dati delle lucidature
|
' Nome file Dati delle lucidature
|
||||||
Public Const KITS_FILE As String = "Kits.data"
|
Public Const KITS_FILE As String = "Kits.data"
|
||||||
|
' Nome file Dati per waterJet
|
||||||
|
Public Const WATERJETDB_FILE As String = "WaterjetDB.data"
|
||||||
|
|
||||||
' File dei pezzi rovinati
|
' File dei pezzi rovinati
|
||||||
Public Const CURR_RUINED_EPL As String = "RuinedParts.epl"
|
Public Const CURR_RUINED_EPL As String = "RuinedParts.epl"
|
||||||
@@ -82,6 +84,11 @@ Module ConstGen
|
|||||||
|
|
||||||
' Nome testa con ventose per spostamento pezzi
|
' Nome testa con ventose per spostamento pezzi
|
||||||
Public Const VACUUM_HEAD As String = "H4"
|
Public Const VACUUM_HEAD As String = "H4"
|
||||||
|
Public Const VACUUM_HEAD_2 As String = "H104"
|
||||||
|
' Nome teste laser
|
||||||
|
Public Const LASER_HEAD As String = "H3"
|
||||||
|
Public Const LASER_HEAD_2 As String = "H103"
|
||||||
|
|
||||||
' Info tipo ventosa
|
' Info tipo ventosa
|
||||||
Public Const KEY_VAC_TYPE As String = "VacType"
|
Public Const KEY_VAC_TYPE As String = "VacType"
|
||||||
' Nome gruppo layout in testa con ventose
|
' Nome gruppo layout in testa con ventose
|
||||||
@@ -90,6 +97,10 @@ Module ConstGen
|
|||||||
Public Const KEY_VACLAY_SEL As String = "Sel"
|
Public Const KEY_VACLAY_SEL As String = "Sel"
|
||||||
' Info in gruppo layout per angolo di rotazione preferito
|
' Info in gruppo layout per angolo di rotazione preferito
|
||||||
Public Const KEY_VACLAY_PREFROT As String = "PreferredRot"
|
Public Const KEY_VACLAY_PREFROT As String = "PreferredRot"
|
||||||
|
Public Const KEY_VACLAY_PREFVROTXMINUS As String = "PrefVertRotXMinus"
|
||||||
|
Public Const KEY_VACLAY_PREFVROTXPLUS As String = "PrefVertRotXPlus"
|
||||||
|
Public Const KEY_VACLAY_PREFVROTYMINUS As String = "PrefVertRotYMinus"
|
||||||
|
Public Const KEY_VACLAY_PREFVROTYPLUS As String = "PrefVertRotYPlus"
|
||||||
' Info in gruppo layout per direzione di riferimento ventose per tagli da sotto
|
' Info in gruppo layout per direzione di riferimento ventose per tagli da sotto
|
||||||
Public Const KEY_VACLAY_DRIPREFDIR As String = "DripRefDir"
|
Public Const KEY_VACLAY_DRIPREFDIR As String = "DripRefDir"
|
||||||
' Info in asse rotante ventosa per step discreti
|
' Info in asse rotante ventosa per step discreti
|
||||||
@@ -143,6 +154,9 @@ Module ConstGen
|
|||||||
Public Const INFO_RAW_BLOCK = "Block"
|
Public Const INFO_RAW_BLOCK = "Block"
|
||||||
' Info per numero lastra nel blocco
|
' Info per numero lastra nel blocco
|
||||||
Public Const INFO_RAW_SLABNBR = "SlabNbr"
|
Public Const INFO_RAW_SLABNBR = "SlabNbr"
|
||||||
|
' Info per identificazione gruppo pezzi
|
||||||
|
Public Const INFO_REFGROUP As String = "RefGroup"
|
||||||
|
Public Const INFO_COUNTERLY As String = "CounterPz"
|
||||||
|
|
||||||
' Contrassegno di progetto OmagCut
|
' Contrassegno di progetto OmagCut
|
||||||
Public Const NAME_PROJMARK As String = "OmagCut"
|
Public Const NAME_PROJMARK As String = "OmagCut"
|
||||||
@@ -178,6 +192,10 @@ Module ConstGen
|
|||||||
Public Const INFO_TOTAREA As String = "TotArea"
|
Public Const INFO_TOTAREA As String = "TotArea"
|
||||||
' Info per area da produrre dei pezzi del progetto
|
' Info per area da produrre dei pezzi del progetto
|
||||||
Public Const INFO_TOPRODAREA As String = "ToProdArea"
|
Public Const INFO_TOPRODAREA As String = "ToProdArea"
|
||||||
|
' Info per nome progetti
|
||||||
|
Public Const INFO_PROJNAME As String = "ProjName"
|
||||||
|
' Info per parcheggio asse C
|
||||||
|
Public Const INFO_CAXESHOME As String = "CAxesHome"
|
||||||
|
|
||||||
' Nome layer delle regioni
|
' Nome layer delle regioni
|
||||||
Public Const NAME_REGION As String = "Region"
|
Public Const NAME_REGION As String = "Region"
|
||||||
@@ -203,6 +221,10 @@ Module ConstGen
|
|||||||
Public Const INFO_DEPTH As String = "Depth"
|
Public Const INFO_DEPTH As String = "Depth"
|
||||||
Public Const INFO_WIDTH As String = "Width"
|
Public Const INFO_WIDTH As String = "Width"
|
||||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||||
|
Public Const INFO_AGG2 As String = "Agg2"
|
||||||
|
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
||||||
|
Public Const INFO_DIRECTCUT As String = "DirectCut"
|
||||||
|
Public Const INFO_STEP_TYPE As String = "StepType"
|
||||||
' Info in entità da tagliare per taglio ristretto
|
' Info in entità da tagliare per taglio ristretto
|
||||||
Public Const INFO_STRICT As String = "Strict"
|
Public Const INFO_STRICT As String = "Strict"
|
||||||
' Info in entità da tagliare per angolo di lato e tallone
|
' Info in entità da tagliare per angolo di lato e tallone
|
||||||
@@ -292,6 +314,14 @@ Module ConstGen
|
|||||||
Public Const INFO_PARTOK As String = "POK"
|
Public Const INFO_PARTOK As String = "POK"
|
||||||
' Info in pezzo per stato rotazione
|
' Info in pezzo per stato rotazione
|
||||||
Public Const INFO_PARTROT As String = "ROT"
|
Public Const INFO_PARTROT As String = "ROT"
|
||||||
|
' Info in entità in OutLoop per indicare se è separata WaterJet
|
||||||
|
Public Const INFO_JOINENTITY As String = "JoinEntity"
|
||||||
|
' Nome layer per "*" inidcanti un lato separato nel taglio WaterJet
|
||||||
|
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||||
|
' Info in OutLoop per punto inzio lavorazione WaterJet
|
||||||
|
Public Const INFO_START As String = "Start"
|
||||||
|
' Nome dei tagli diretti inseriti in fase di Splitting
|
||||||
|
Public Const SPLIT_CUT As String = "SplitCut"
|
||||||
|
|
||||||
' Nome di pezzo che è una cornice
|
' Nome di pezzo che è una cornice
|
||||||
Public Const NAME_FRAME As String = "Frame"
|
Public Const NAME_FRAME As String = "Frame"
|
||||||
@@ -324,6 +354,11 @@ Module ConstGen
|
|||||||
' Info in pezzo per facet di ultima superficie selezionata
|
' Info in pezzo per facet di ultima superficie selezionata
|
||||||
Public Const INFO_FRAME_FACET As String = "Facet"
|
Public Const INFO_FRAME_FACET As String = "Facet"
|
||||||
|
|
||||||
|
' Nome del groppo dei ponticelli per lavorazioni Water
|
||||||
|
Public Const BRIDGES As String = "Bridges"
|
||||||
|
' Nome dell'entità ponticello contenuta nel gruppo BRIDGES
|
||||||
|
Public Const BRIDGELINE As String = "BridgeLine"
|
||||||
|
|
||||||
' utensile per le lavorazioni manuali
|
' utensile per le lavorazioni manuali
|
||||||
Public Const DUMMY_SAW As String = "DummySAW"
|
Public Const DUMMY_SAW As String = "DummySAW"
|
||||||
' lavorazione manuale
|
' lavorazione manuale
|
||||||
@@ -334,6 +369,8 @@ Module ConstGen
|
|||||||
' Nome di pezzo temporaneo che serve per copia dime
|
' Nome di pezzo temporaneo che serve per copia dime
|
||||||
Public Const NAME_COPYTEMPLATE As String = "CopyTemplate"
|
Public Const NAME_COPYTEMPLATE As String = "CopyTemplate"
|
||||||
|
|
||||||
|
' Nome layer solidi per VM
|
||||||
|
Public Const NAME_VM_SOLID As String = "Solid"
|
||||||
' Chiave per Id originale del pezzo per VeinMatch
|
' Chiave per Id originale del pezzo per VeinMatch
|
||||||
Public Const KEY_ORI_ID As String = "OriId"
|
Public Const KEY_ORI_ID As String = "OriId"
|
||||||
|
|
||||||
@@ -343,6 +380,9 @@ Module ConstGen
|
|||||||
' Lunghezza libera infinita
|
' Lunghezza libera infinita
|
||||||
Public Const FREELEN_INF = 9999
|
Public Const FREELEN_INF = 9999
|
||||||
|
|
||||||
|
' Costante per lunghezza gambo di lama
|
||||||
|
Public Const STEM = 131072
|
||||||
|
|
||||||
' Colori per lavorazioni
|
' Colori per lavorazioni
|
||||||
Public Function COL_MCH_CUT() As Color3d
|
Public Function COL_MCH_CUT() As Color3d
|
||||||
Return New Color3d(0, 255, 0)
|
Return New Color3d(0, 255, 0)
|
||||||
@@ -362,6 +402,9 @@ Module ConstGen
|
|||||||
Public Function COL_MCH_DRIPCUT() As Color3d
|
Public Function COL_MCH_DRIPCUT() As Color3d
|
||||||
Return New Color3d(255, 0, 165)
|
Return New Color3d(255, 0, 165)
|
||||||
End Function
|
End Function
|
||||||
|
Public Function COL_MCH_ONENGRAVE_ANG() As Color3d
|
||||||
|
Return New Color3d(255, 255, 100)
|
||||||
|
End Function
|
||||||
Public Function COL_MCH_DRIPFREE() As Color3d
|
Public Function COL_MCH_DRIPFREE() As Color3d
|
||||||
Return New Color3d(192, 0, 128)
|
Return New Color3d(192, 0, 128)
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ Module ConstIni
|
|||||||
Public Const S_GENERAL As String = "General"
|
Public Const S_GENERAL As String = "General"
|
||||||
Public Const K_DEBUG As String = "Debug"
|
Public Const K_DEBUG As String = "Debug"
|
||||||
Public Const K_LICENCE As String = "Licence"
|
Public Const K_LICENCE As String = "Licence"
|
||||||
|
Public Const K_NETKEY As String = "NetKey"
|
||||||
|
Public Const K_LOCKID As String = "LockId"
|
||||||
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||||
Public Const K_MESSAGES As String = "Messages"
|
Public Const K_MESSAGES As String = "Messages"
|
||||||
Public Const K_SUPPORT As String = "Support"
|
Public Const K_SUPPORT As String = "Support"
|
||||||
@@ -46,6 +48,12 @@ Module ConstIni
|
|||||||
Public Const K_THEME As String = "Theme"
|
Public Const K_THEME As String = "Theme"
|
||||||
Public Const K_MANUAL_CUT As String = "ManualCut"
|
Public Const K_MANUAL_CUT As String = "ManualCut"
|
||||||
Public Const K_TEST As String = "Test"
|
Public Const K_TEST As String = "Test"
|
||||||
|
Public Const K_SMARTMACHININGPAGE As String = "SmartMachiningPage"
|
||||||
|
Public Const K_STARTPROGRAM As String = "StartProgram"
|
||||||
|
Public Const K_GENERATECN As String = "GenerateCN"
|
||||||
|
Public Const K_FRACTIONPATTERN As String = "FractionPattern"
|
||||||
|
Public Const K_PRECISION As String = "Precision"
|
||||||
|
Public Const K_QUITDRAWPAGE As String = "QuitDrawPage"
|
||||||
|
|
||||||
Public Const S_LANGUAGES As String = "Languages"
|
Public Const S_LANGUAGES As String = "Languages"
|
||||||
Public Const K_LANGUAGE As String = "Language"
|
Public Const K_LANGUAGE As String = "Language"
|
||||||
@@ -105,6 +113,17 @@ Module ConstIni
|
|||||||
Public Const K_TRFDATA As String = "TrfData"
|
Public Const K_TRFDATA As String = "TrfData"
|
||||||
Public Const K_CSVDATA As String = "CsvData"
|
Public Const K_CSVDATA As String = "CsvData"
|
||||||
Public Const K_COMPODIR As String = "CompoDir"
|
Public Const K_COMPODIR As String = "CompoDir"
|
||||||
|
Public Const K_CMP_COUNT As String = "Count"
|
||||||
|
Public Const K_LASTCOLOR As String = "LastColor"
|
||||||
|
Public Const K_COLOR As String = "Color"
|
||||||
|
|
||||||
|
Public Const S_FRAMECOMPO As String = "FrameCompo"
|
||||||
|
|
||||||
|
Public Const S_EXTCOMPO As String = "Compo"
|
||||||
|
|
||||||
|
Public Const S_INTCOMPO As String = "InternalCompo"
|
||||||
|
Public Const K_INT_COMPODIR As String = "CompoDir"
|
||||||
|
Public Const K_INT_COUNT As String = "Count"
|
||||||
|
|
||||||
Public Const S_FLATPARTS As String = "FlatParts"
|
Public Const S_FLATPARTS As String = "FlatParts"
|
||||||
Public Const K_FLPCURRDIR As String = "CurrDir"
|
Public Const K_FLPCURRDIR As String = "CurrDir"
|
||||||
@@ -120,7 +139,9 @@ Module ConstIni
|
|||||||
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
|
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
|
||||||
Public Const K_ENGRAVEOFFSET2 As String = "EngraveOffset2"
|
Public Const K_ENGRAVEOFFSET2 As String = "EngraveOffset2"
|
||||||
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
||||||
|
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
|
||||||
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
||||||
|
Public Const K_ENGRAVEANGLE As String = "EngraveAngle"
|
||||||
Public Const K_DRIPOFFSET As String = "DripOffset"
|
Public Const K_DRIPOFFSET As String = "DripOffset"
|
||||||
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
||||||
Public Const K_DRIPDEPTH As String = "DripDepth"
|
Public Const K_DRIPDEPTH As String = "DripDepth"
|
||||||
@@ -128,6 +149,7 @@ Module ConstIni
|
|||||||
Public Const K_UNDERDRILLDEPTH As String = "UnderDrillDepth"
|
Public Const K_UNDERDRILLDEPTH As String = "UnderDrillDepth"
|
||||||
Public Const K_FILOTOPOFFSET As String = "FiloTopOffset"
|
Public Const K_FILOTOPOFFSET As String = "FiloTopOffset"
|
||||||
Public Const K_FILOTOPDEPTH As String = "FiloTopDepth"
|
Public Const K_FILOTOPDEPTH As String = "FiloTopDepth"
|
||||||
|
Public Const K_ROUNDOFF As String = "RoundOff"
|
||||||
|
|
||||||
Public Const S_NEST As String = "Nest"
|
Public Const S_NEST As String = "Nest"
|
||||||
Public Const K_DIRECT As String = "Direct"
|
Public Const K_DIRECT As String = "Direct"
|
||||||
@@ -139,6 +161,11 @@ Module ConstIni
|
|||||||
Public Const K_TEXTCOLOR As String = "TextColor"
|
Public Const K_TEXTCOLOR As String = "TextColor"
|
||||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||||
|
Public Const K_DRAG_RETTANGLE As String = "DragRectangle"
|
||||||
|
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
|
||||||
|
|
||||||
|
Public Const S_SPLIT As String = "Split"
|
||||||
|
Public Const K_MOVE_LEV As String = "MoveLevel"
|
||||||
|
|
||||||
Public Const S_CSV As String = "Csv"
|
Public Const S_CSV As String = "Csv"
|
||||||
Public Const K_FULL As String = "Full"
|
Public Const K_FULL As String = "Full"
|
||||||
@@ -151,6 +178,14 @@ Module ConstIni
|
|||||||
Public Const K_CSVCURRDIR As String = "CurrDir"
|
Public Const K_CSVCURRDIR As String = "CurrDir"
|
||||||
Public Const K_CSVLASTFILE As String = "LastFile"
|
Public Const K_CSVLASTFILE As String = "LastFile"
|
||||||
|
|
||||||
|
Public Const S_TRF As String = "TRF"
|
||||||
|
Public Const K_ORDCODE As String = "OrdCode"
|
||||||
|
Public Const K_ORDDESC As String = "OrdDesc"
|
||||||
|
Public Const K_PARTCODE As String = "PartCode"
|
||||||
|
Public Const K_MATCODE As String = "MatCode"
|
||||||
|
Public Const K_SURFCODE As String = "SurfCode"
|
||||||
|
Public Const K_TRFTHICKNESS As String = "TrfThickness"
|
||||||
|
|
||||||
Public Const S_SLABDXF As String = "SlabDxf"
|
Public Const S_SLABDXF As String = "SlabDxf"
|
||||||
Public Const K_IMPORTSLABDXF As String = "ImportSlabDxf"
|
Public Const K_IMPORTSLABDXF As String = "ImportSlabDxf"
|
||||||
Public Const K_SLABLAYER As String = "SlabLayer"
|
Public Const K_SLABLAYER As String = "SlabLayer"
|
||||||
@@ -172,6 +207,7 @@ Module ConstIni
|
|||||||
Public Const K_OFFSZ As String = "OffsZ"
|
Public Const K_OFFSZ As String = "OffsZ"
|
||||||
Public Const K_OFFSXY As String = "OffsXY"
|
Public Const K_OFFSXY As String = "OffsXY"
|
||||||
Public Const K_OFFSYY As String = "OffsYY"
|
Public Const K_OFFSYY As String = "OffsYY"
|
||||||
|
Public Const K_OFFSXINTERY As String = "OffsYInterY"
|
||||||
Public Const K_STARTTRIM As String = "StartTrim"
|
Public Const K_STARTTRIM As String = "StartTrim"
|
||||||
Public Const K_ENDTRIM As String = "EndTrim"
|
Public Const K_ENDTRIM As String = "EndTrim"
|
||||||
Public Const K_OTHERSIDE As String = "OtherSide"
|
Public Const K_OTHERSIDE As String = "OtherSide"
|
||||||
@@ -191,12 +227,27 @@ Module ConstIni
|
|||||||
Public Const K_RAWOFFSX As String = "OffsX"
|
Public Const K_RAWOFFSX As String = "OffsX"
|
||||||
Public Const K_RAWOFFSY As String = "OffsY"
|
Public Const K_RAWOFFSY As String = "OffsY"
|
||||||
Public Const K_RAWKERF As String = "Kerf"
|
Public Const K_RAWKERF As String = "Kerf"
|
||||||
|
Public Const K_ENABLEOTHERREFTAB As String = "EnableOtherRefTab"
|
||||||
|
Public Const K_OTHERREFTAB As String = "OtherRefTab"
|
||||||
|
Public Const K_OTHERREFTABX As String = "OtherRefTabX"
|
||||||
|
Public Const K_OTHERREFTABY As String = "OtherRefTabY"
|
||||||
|
Public Const K_OTHERREFTABPOS As String = "OtherRefTabPos"
|
||||||
|
|
||||||
|
|
||||||
Public Const S_RAWMOVE As String = "RawMove"
|
Public Const S_RAWMOVE As String = "RawMove"
|
||||||
Public Const K_RAWSTEP As String = "Step"
|
Public Const K_RAWSTEP As String = "Step"
|
||||||
Public Const K_RAWROTATION As String = "Rotation"
|
Public Const K_RAWROTATION As String = "Rotation"
|
||||||
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
||||||
|
|
||||||
|
Public Const S_SCRAPS As String = "Scraps"
|
||||||
|
Public Const K_ENABLESCRAPS As String = "EnableScraps"
|
||||||
|
Public Const K_PHOTODIR As String = "PhotoDir"
|
||||||
|
Public Const K_LASTBLOCK As String = "LastBlock"
|
||||||
|
Public Const K_TEMPLATE As String = "Template"
|
||||||
|
Public Const K_DAT As String = "Dat"
|
||||||
|
Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities"
|
||||||
|
Public Const K_ENABLE_PRINTER As String = "EnablePrinter"
|
||||||
|
|
||||||
Public Const S_REG As String = "Reg"
|
Public Const S_REG As String = "Reg"
|
||||||
Public Const K_REGSTEP As String = "Step"
|
Public Const K_REGSTEP As String = "Step"
|
||||||
Public Const K_REGANGSTEP As String = "AngStep"
|
Public Const K_REGANGSTEP As String = "AngStep"
|
||||||
@@ -236,6 +287,8 @@ Module ConstIni
|
|||||||
Public Const S_VEINMATCHING As String = "VeinMatching"
|
Public Const S_VEINMATCHING As String = "VeinMatching"
|
||||||
Public Const K_VEINMA_ENABLE As String = "Enable"
|
Public Const K_VEINMA_ENABLE As String = "Enable"
|
||||||
Public Const K_VEINMA_PLACE As String = "WinPlace"
|
Public Const K_VEINMA_PLACE As String = "WinPlace"
|
||||||
|
Public Const K_VEINMA_WIDTH As String = "Width"
|
||||||
|
Public Const K_VEINMA_HEIGHT As String = "Height"
|
||||||
|
|
||||||
Public Const S_FASTGRID As String = "FastGrid"
|
Public Const S_FASTGRID As String = "FastGrid"
|
||||||
Public Const K_FG_ENABLE As String = "FGEnable"
|
Public Const K_FG_ENABLE As String = "FGEnable"
|
||||||
@@ -282,6 +335,7 @@ Module ConstIni
|
|||||||
Public Const K_DC_FLATT_HEADSIDE As String = "FlattHeadSide"
|
Public Const K_DC_FLATT_HEADSIDE As String = "FlattHeadSide"
|
||||||
Public Const K_DC_FLATT_MACHTYPE As String = "FlattMachType"
|
Public Const K_DC_FLATT_MACHTYPE As String = "FlattMachType"
|
||||||
Public Const K_DC_FLATT_ROTLOCK As String = "FlattRotLock"
|
Public Const K_DC_FLATT_ROTLOCK As String = "FlattRotLock"
|
||||||
|
Public Const K_DC_FLAT_CHAINEDPATH As String = "ChainedPath"
|
||||||
Public Const K_DC_FLATT_POSX As String = "FlattPosX"
|
Public Const K_DC_FLATT_POSX As String = "FlattPosX"
|
||||||
Public Const K_DC_FLATT_POSY As String = "FlattPosY"
|
Public Const K_DC_FLATT_POSY As String = "FlattPosY"
|
||||||
Public Const K_DC_POLISH_NAME As String = "PolishName"
|
Public Const K_DC_POLISH_NAME As String = "PolishName"
|
||||||
@@ -289,6 +343,9 @@ Module ConstIni
|
|||||||
Public Const K_DC_TEST_LENGTH As String = "TestLength"
|
Public Const K_DC_TEST_LENGTH As String = "TestLength"
|
||||||
Public Const K_DC_TEST_ANGH As String = "TestAngH"
|
Public Const K_DC_TEST_ANGH As String = "TestAngH"
|
||||||
Public Const K_DC_TEST_OFFSET As String = "TestOffset"
|
Public Const K_DC_TEST_OFFSET As String = "TestOffset"
|
||||||
|
Public Const K_DC_OFFSET_SQUARING As String = "OffsetSquaring"
|
||||||
|
Public Const K_DC_EXTRA_LEN_SQUARING As String = "ExtraLenSquaring"
|
||||||
|
Public Const K_ENABLEINVERT As String = "EnableInvert"
|
||||||
|
|
||||||
Public Const S_STATDATA As String = "StatData"
|
Public Const S_STATDATA As String = "StatData"
|
||||||
Public Const K_SD_DAY As String = "Day"
|
Public Const K_SD_DAY As String = "Day"
|
||||||
|
|||||||
@@ -11,9 +11,18 @@
|
|||||||
Public Const K_ZIGZAGX As String = "ZigZagX"
|
Public Const K_ZIGZAGX As String = "ZigZagX"
|
||||||
Public Const K_OFFZIGZAGX As String = "OffZigZagX"
|
Public Const K_OFFZIGZAGX As String = "OffZigZagX"
|
||||||
Public Const K_STEPX As String = "StepX"
|
Public Const K_STEPX As String = "StepX"
|
||||||
|
Public Const K_RADIUSX As String = "RadiusX"
|
||||||
|
Public Const K_DISTANCEX As String = "DistanceX"
|
||||||
Public Const K_ZIGZAGY As String = "ZigZagY"
|
Public Const K_ZIGZAGY As String = "ZigZagY"
|
||||||
Public Const K_OFFZIGZAGY As String = "OffZigZagY"
|
Public Const K_OFFZIGZAGY As String = "OffZigZagY"
|
||||||
Public Const K_STEPY As String = "StepY"
|
Public Const K_STEPY As String = "StepY"
|
||||||
|
Public Const K_RADIUSY As String = "RadiusY"
|
||||||
|
Public Const K_DISTANCEY As String = "DistanceY"
|
||||||
|
Public Const K_SPIRAL As String = "Spiral"
|
||||||
|
Public Const K_OFFSPIRAL As String = "OffSpiral"
|
||||||
|
Public Const K_STEPSPIRAL As String = "StepSpiral"
|
||||||
|
Public Const K_RADIUSSPIRAL As String = "RadiusSpiral"
|
||||||
|
Public Const K_DISTANCESPIRAL As String = "DistanceSpiral"
|
||||||
Public Const K_LILEN As String = "LiLen"
|
Public Const K_LILEN As String = "LiLen"
|
||||||
Public Const K_LIHEIGHT As String = "LiHeight"
|
Public Const K_LIHEIGHT As String = "LiHeight"
|
||||||
Public Const K_LILOAD As String = "LiLoad"
|
Public Const K_LILOAD As String = "LiLoad"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
Public Const S_PARTPROGRAM As String = "PartProgram"
|
Public Const S_PARTPROGRAM As String = "PartProgram"
|
||||||
Public Const K_EXTENSION As String = "Extension"
|
Public Const K_EXTENSION As String = "Extension"
|
||||||
|
Public Const K_EXTFILECN As String = "ExtFileCN"
|
||||||
|
|
||||||
Public Const S_AXES As String = "Axes"
|
Public Const S_AXES As String = "Axes"
|
||||||
Public Const K_AXESNUM As String = "AxesNum"
|
Public Const K_AXESNUM As String = "AxesNum"
|
||||||
@@ -37,15 +38,33 @@
|
|||||||
Public Const K_PATH_HMI As String = "PathHmi"
|
Public Const K_PATH_HMI As String = "PathHmi"
|
||||||
Public Const K_USENEWMDI As String = "UseNewMDI"
|
Public Const K_USENEWMDI As String = "UseNewMDI"
|
||||||
Public Const K_ISSIEMENSONE As String = "IsSiemensOne"
|
Public Const K_ISSIEMENSONE As String = "IsSiemensOne"
|
||||||
|
Public Const K_ISACTIVEMODESUBSCR As String = "IsActiveModeSubscr"
|
||||||
Public Const K_DBVARPATH As String = "DBVarPath"
|
Public Const K_DBVARPATH As String = "DBVarPath"
|
||||||
|
Public Const K_NEWWRITECNCMODE As String = "NewWriteCNCMode"
|
||||||
|
|
||||||
Public Const S_NCNUM As String = "NcNUM"
|
Public Const S_NCNUM As String = "NcNUM"
|
||||||
Public Const K_RESETSENDDELAY As String = "ResetSendDelay"
|
Public Const K_RESETSENDDELAY As String = "ResetSendDelay"
|
||||||
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
||||||
|
Public Const K_PHOTODELEY As String = "PhotoDeley"
|
||||||
|
|
||||||
|
Public Const S_NCFANUC As String = "NcFanuc"
|
||||||
|
Public Const K_SETNCMODE As String = "SetNcMode"
|
||||||
|
Public Const K_BASEADDRINT As String = "BaseAddrInt"
|
||||||
|
Public Const K_BASEADDRBIT As String = "BaseAddrBit"
|
||||||
|
Public Const K_NUMVARINT As String = "NumVarInt"
|
||||||
|
Public Const K_NUMVARBIT As String = "NumVarBit"
|
||||||
|
|
||||||
|
Public Const S_EXECLUA As String = "ExecLua"
|
||||||
|
Public Const K_FILESCRIPT_LUA As String = "FileScript"
|
||||||
|
|
||||||
|
Public Const S_CAMERAHQ As String = "CameraHQ"
|
||||||
|
Public Const K_CAMERAHQ_ENABLE As String = "EnableHQ"
|
||||||
|
Public Const K_CAMERAHQ_ACTIVATE As String = "ActivateHQ"
|
||||||
|
|
||||||
Public Const S_NCDATA As String = "NcData"
|
Public Const S_NCDATA As String = "NcData"
|
||||||
Public Const K_NEWVARIABLE As String = "NewVariable"
|
Public Const K_NEWVARIABLE As String = "NewVariable"
|
||||||
Public Const K_NEWCONSOLE As String = "NewConsole"
|
Public Const K_NEWCONSOLE As String = "NewConsole"
|
||||||
|
Public Const K_WRITECNCMODEVAR As String = "WriteCNCModeVar"
|
||||||
Public Const K_COMM As String = "Comm"
|
Public Const K_COMM As String = "Comm"
|
||||||
Public Const K_REFRESH As String = "Refresh"
|
Public Const K_REFRESH As String = "Refresh"
|
||||||
Public Const K_MODE As String = "Mode"
|
Public Const K_MODE As String = "Mode"
|
||||||
@@ -71,9 +90,16 @@
|
|||||||
Public Const K_TABLEDOWN As String = "TableDown"
|
Public Const K_TABLEDOWN As String = "TableDown"
|
||||||
Public Const K_MANUAL As String = "Manual"
|
Public Const K_MANUAL As String = "Manual"
|
||||||
Public Const K_DOORCLOSED As String = "DoorClosed"
|
Public Const K_DOORCLOSED As String = "DoorClosed"
|
||||||
|
Public Const K_DOOROPENDED As String = "DoorOpened"
|
||||||
Public Const K_LIMITZ As String = "LimitZ"
|
Public Const K_LIMITZ As String = "LimitZ"
|
||||||
Public Const K_POWEROVR As String = "PowerOvr"
|
Public Const K_POWEROVR As String = "PowerOvr"
|
||||||
|
Public Const K_PARKING As String = "Parking"
|
||||||
|
Public Const K_ENABLEZONE As String = "EnableZone"
|
||||||
|
Public Const K_ENABLEPC As String = "EnablePC"
|
||||||
Public Const K_HSM As String = "Hsm"
|
Public Const K_HSM As String = "Hsm"
|
||||||
|
Public Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||||
|
Public Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||||
|
Public Const BTN_ENABLE_PC As String = "EnablePC"
|
||||||
Public Const K_VACUUMUP As String = "VacuumUp"
|
Public Const K_VACUUMUP As String = "VacuumUp"
|
||||||
Public Const K_VACUUMDOWN As String = "VacuumDown"
|
Public Const K_VACUUMDOWN As String = "VacuumDown"
|
||||||
Public Const K_VACUUM2UP As String = "Vacuum2Up"
|
Public Const K_VACUUM2UP As String = "Vacuum2Up"
|
||||||
@@ -100,6 +126,9 @@
|
|||||||
Public Const K_VACUUMOFF As String = "VacuumOff"
|
Public Const K_VACUUMOFF As String = "VacuumOff"
|
||||||
Public Const K_BYPASSTATE As String = "BypassState"
|
Public Const K_BYPASSTATE As String = "BypassState"
|
||||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||||
|
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||||
|
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||||
|
Public Const K_NAXES As String = "nAxes"
|
||||||
' Nuove variabili
|
' Nuove variabili
|
||||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||||
Public Const K_XYJOG As String = "XYJog"
|
Public Const K_XYJOG As String = "XYJog"
|
||||||
@@ -107,6 +136,7 @@
|
|||||||
Public Const K_ZBJOG As String = "ZBJog"
|
Public Const K_ZBJOG As String = "ZBJog"
|
||||||
Public Const K_POWERON As String = "PowerON"
|
Public Const K_POWERON As String = "PowerON"
|
||||||
Public Const K_POWEROFF As String = "PowerOFF"
|
Public Const K_POWEROFF As String = "PowerOFF"
|
||||||
|
Public Const K_REMOTE As String = "Remote"
|
||||||
|
|
||||||
Public Const S_PRODUCTIONLINE As String = "ProductionLine"
|
Public Const S_PRODUCTIONLINE As String = "ProductionLine"
|
||||||
Public Const K_ACTIVE As String = "Active"
|
Public Const K_ACTIVE As String = "Active"
|
||||||
@@ -129,6 +159,10 @@
|
|||||||
Public Const K_PRODLIPROBINGTCPOS2VAR As String = "ProbingTcPos2Var"
|
Public Const K_PRODLIPROBINGTCPOS2VAR As String = "ProbingTcPos2Var"
|
||||||
Public Const K_PRODLISAWDIAMETER2VAR As String = "SawDiameter2Var"
|
Public Const K_PRODLISAWDIAMETER2VAR As String = "SawDiameter2Var"
|
||||||
|
|
||||||
|
Public Const S_POLISHLINE As String = "PolishLine"
|
||||||
|
Public Const K_CLICKSTATE As String = "ClickState"
|
||||||
|
Public Const k_CLICKDIR As String = "ClickDir"
|
||||||
|
|
||||||
Public Const S_STATISTICS As String = "Stats"
|
Public Const S_STATISTICS As String = "Stats"
|
||||||
Public Const K_DATADIR As String = "DataDir"
|
Public Const K_DATADIR As String = "DataDir"
|
||||||
Public Const K_SHOWAREAS As String = "ShowAreas"
|
Public Const K_SHOWAREAS As String = "ShowAreas"
|
||||||
@@ -145,6 +179,8 @@
|
|||||||
Public Const K_PHOTO_OFFSETY As String = "OffsetY"
|
Public Const K_PHOTO_OFFSETY As String = "OffsetY"
|
||||||
Public Const K_PHOTO_TAB2_OFFSETX As String = "Tab2OffsetX"
|
Public Const K_PHOTO_TAB2_OFFSETX As String = "Tab2OffsetX"
|
||||||
Public Const K_PHOTO_TAB2_OFFSETY As String = "Tab2OffsetY"
|
Public Const K_PHOTO_TAB2_OFFSETY As String = "Tab2OffsetY"
|
||||||
|
Public Const K_PHOTO_HQ_OFFSETX As String = "HQOffsetX"
|
||||||
|
Public Const K_PHOTO_HQ_OFFSETY As String = "HQOffsetY"
|
||||||
|
|
||||||
Public Const S_TOOLS As String = "Tools"
|
Public Const S_TOOLS As String = "Tools"
|
||||||
Public Const K_DRILLBIT As String = "Drillbit"
|
Public Const K_DRILLBIT As String = "Drillbit"
|
||||||
@@ -194,6 +230,7 @@
|
|||||||
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
||||||
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
||||||
Public Const K_MACH_ENGRAVING_WITHMILL As String = "EngravingWithMill"
|
Public Const K_MACH_ENGRAVING_WITHMILL As String = "EngravingWithMill"
|
||||||
|
Public Const K_MACH_STARTCENERTOOLPATH As String = "StartCenterToolPath"
|
||||||
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
||||||
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
||||||
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
||||||
@@ -205,7 +242,13 @@
|
|||||||
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
|
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
|
||||||
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
||||||
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
||||||
' DrillMillC90
|
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
|
||||||
|
Public Const K_HOLES_DIAMITERWJ As String = "HolesDiameterWJ"
|
||||||
|
Public Const K_HOLES_OFFSETWJ As String = "HolesOffsetWJ"
|
||||||
|
Public Const K_MIN_RADIUSWJ As String = "MinRadiusWJ"
|
||||||
|
Public Const K_MACH_DRILLINGWJ_ON_CORNERS As String = "DrillingWJOnCorners"
|
||||||
|
Public Const K_MACH_RECTIFICATION_ON_SUBSQUARE As String = "RectificationSubSqWJ"
|
||||||
|
Public Const K_MACH_DRILL_MILL_C90 As String = "DrillMillC90"
|
||||||
' CutLongDxSx
|
' CutLongDxSx
|
||||||
' AngRotMultiCut
|
' AngRotMultiCut
|
||||||
' MinDistHeadsMultiCut
|
' MinDistHeadsMultiCut
|
||||||
@@ -217,6 +260,13 @@
|
|||||||
Public Const S_MACH_RAWMOVE As String = "RawMove"
|
Public Const S_MACH_RAWMOVE As String = "RawMove"
|
||||||
Public Const K_MACH_RM_ROTATE As String = "Rotate"
|
Public Const K_MACH_RM_ROTATE As String = "Rotate"
|
||||||
Public Const K_MACH_RM_FINALMOVE As String = "FinalMove"
|
Public Const K_MACH_RM_FINALMOVE As String = "FinalMove"
|
||||||
|
Public Const K_MACH_WEIGHT_SINGLEPLUGGER As String = "MaxWeightSinglePlugger"
|
||||||
|
Public Const K_MACH_WEIGHT_DOUBLEPLUGGER As String = "MaxWeightDoublePlugger"
|
||||||
|
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEY As String = "RotateVacuumForExtraStrokeY"
|
||||||
|
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEX As String = "RotateVacuumForExtraStrokeX"
|
||||||
|
|
||||||
|
Public Const K_ISNEWSCRAPS As String = "IsNewScraps"
|
||||||
|
Public Const K_DATABASEID As String = "DatabaseID"
|
||||||
|
|
||||||
Public Const S_MACH_REG As String = "Reg"
|
Public Const S_MACH_REG As String = "Reg"
|
||||||
Public Const K_MACH_MAX_ROT_ANG As String = "MaxRotAng"
|
Public Const K_MACH_MAX_ROT_ANG As String = "MaxRotAng"
|
||||||
@@ -240,10 +290,12 @@
|
|||||||
|
|
||||||
Public Const S_MACH_INPROGRESS As String = "InProgress"
|
Public Const S_MACH_INPROGRESS As String = "InProgress"
|
||||||
Public Const K_PHASEVAR As String = "PhaseVar"
|
Public Const K_PHASEVAR As String = "PhaseVar"
|
||||||
|
Public Const K_WP_STEPTIME As String = "WPStepTime"
|
||||||
|
|
||||||
Public Const S_MACH_PROBING As String = "Probing"
|
Public Const S_MACH_PROBING As String = "Probing"
|
||||||
Public Const K_PROBINGSTATEVAR As String = "ProbingStateVar"
|
Public Const K_PROBINGSTATEVAR As String = "ProbingStateVar"
|
||||||
Public Const K_SAWDIAMETER As String = "SawDiameter"
|
Public Const K_SAWDIAMETER As String = "SawDiameter"
|
||||||
|
Public Const K_TOOLLENGTH As String = "ToolLength"
|
||||||
Public Const K_RAWTHICKNESS As String = "RawThickness"
|
Public Const K_RAWTHICKNESS As String = "RawThickness"
|
||||||
Public Const K_ENABLERAWPROBE As String = "EnableRawProbe"
|
Public Const K_ENABLERAWPROBE As String = "EnableRawProbe"
|
||||||
|
|
||||||
@@ -272,9 +324,12 @@
|
|||||||
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
||||||
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
||||||
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
||||||
|
Public Const K_CURRWATERJETTINGQUALITY As String = "CurrWaterJettingQualilty"
|
||||||
|
|
||||||
Public Const S_MATERIALS As String = "Materials"
|
Public Const S_MATERIALS As String = "Materials"
|
||||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||||
Public Const K_MATERIAL As String = "Material"
|
Public Const K_MATERIAL As String = "Material"
|
||||||
|
Public Const K_FROMDBWATERJET As String = "FromDBWaterJet"
|
||||||
|
Public Const K_AVERAGEDENSITY As String = "AverageDensity"
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -0,0 +1,177 @@
|
|||||||
|
<UserControl x:Class="ControlsDirectCutUC"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
DataContext="Self"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
|
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<!--<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="7*"/>-->
|
||||||
|
<RowDefinition Height="9*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<!-- Definizione della Grid laterale -->
|
||||||
|
<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<!--<RowDefinition Height="1*"/>-->
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="ManualTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="SingleCutBtn" Grid.Row="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="SingleCutTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="MultipleCutBtn" Grid.Row="2"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="GridCutBtn" Grid.Row="3"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="GridCutTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
<Button Name="SingleDrillBtn" Grid.Row="4"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="FlatteningCutBtn" Grid.Row="5"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<!--<Button Name="PolishingBtn" Grid.Row="6"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>-->
|
||||||
|
|
||||||
|
<!--<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>-->
|
||||||
|
|
||||||
|
<Button Name="SquaringBtn" Grid.Row="6"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="SquaringTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<!--<Button Name="SawTestBtn" Grid.Row="6"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>-->
|
||||||
|
|
||||||
|
<Grid Name="ChangeUCGrid" Grid.Row="7">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Name="ChangeUCBtn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<!--<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />-->
|
||||||
|
<TextBlock Name="ChangeUCTxBl" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,268 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
Public Class ControlsDirectCutUC
|
||||||
|
|
||||||
|
' Dichiarazione delle Page UserControl
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
' ---- MAI USATA ---- nuova finestra per i comandi per il taglio manuale nuovo
|
||||||
|
Friend m_SingleCutAuto As SingleCutAuto
|
||||||
|
' ---- MAI USATA ----
|
||||||
|
Friend m_MachineButtons As MachineButtonsUC
|
||||||
|
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||||
|
Friend m_SingleCut As SingleCutUC
|
||||||
|
Friend m_SingleDrill As SingleDrillUC
|
||||||
|
Friend m_MultipleCut As MultipleCut
|
||||||
|
Friend m_GridCut As GridCut
|
||||||
|
Friend m_FlatteningCut As FlatteningCut
|
||||||
|
Friend m_Squaring As SquaringUC
|
||||||
|
Friend m_ControlsMachineButton As ControlsMachineButtonUC
|
||||||
|
Friend m_VacuumMachineButton As VacuumMachineButtonUC
|
||||||
|
|
||||||
|
Friend m_ControlDirectCutPage1 As ControlsDirectCutUC1
|
||||||
|
|
||||||
|
' Stato di visualizzazione della macchina
|
||||||
|
Friend m_bShowMachine As Boolean = False
|
||||||
|
Friend m_nMachLook As Integer = MCH_LOOK.ALL
|
||||||
|
' Dati generali CN
|
||||||
|
Friend m_CN As CN_generico
|
||||||
|
Private m_bFirst As Boolean = True
|
||||||
|
' Riferimento alla pagina correntemente attiva
|
||||||
|
Friend m_ActiveDirectCutPage As DirectCutPages = DirectCutPages.DirectCut
|
||||||
|
' Variabili che indicano attivazione paginette con bottoni macchina
|
||||||
|
Private m_ControlsBtn_IsActive As Boolean
|
||||||
|
|
||||||
|
Public Shared m_dZSafe As Double = 52
|
||||||
|
|
||||||
|
' Variabile che indica se sono attivi i bottoni macchina nuovi o vecchi
|
||||||
|
Friend m_NewMachineButtonsType As Boolean
|
||||||
|
' Indica che la finestra del talio Singolo deve essere di tipo manuale
|
||||||
|
Friend m_bManulaCut As Boolean = False
|
||||||
|
|
||||||
|
' elenco dei nuovi bottoni
|
||||||
|
Private m_ButtonJogList As New List(Of MachineButton)
|
||||||
|
|
||||||
|
Enum DirectCutPages
|
||||||
|
' pagina principale di tagli diretti
|
||||||
|
DirectCut
|
||||||
|
' nuova pagina di tagli diretti
|
||||||
|
DirectCut1
|
||||||
|
' elenco dei comandi associati
|
||||||
|
ManualAxesMove
|
||||||
|
SingleCut
|
||||||
|
MultipleCut
|
||||||
|
GridCut
|
||||||
|
FlatteningCut
|
||||||
|
Polishing
|
||||||
|
CopyTemplate
|
||||||
|
SawTest
|
||||||
|
SingleCutAuto
|
||||||
|
SingleDrill
|
||||||
|
Squaring
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||||
|
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
||||||
|
|
||||||
|
'Creazione delle Page UserControl
|
||||||
|
m_MachineButtons = New MachineButtonsUC
|
||||||
|
m_ManualAxesMove = New ManualAxesMoveUC
|
||||||
|
m_SingleCut = New SingleCutUC
|
||||||
|
m_SingleDrill = New SingleDrillUC
|
||||||
|
m_MultipleCut = New MultipleCut
|
||||||
|
m_GridCut = New GridCut
|
||||||
|
m_FlatteningCut = New FlatteningCut
|
||||||
|
m_Squaring = New SquaringUC
|
||||||
|
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||||
|
m_VacuumMachineButton = New VacuumMachineButtonUC
|
||||||
|
' reiferimento alla pagina succesiva
|
||||||
|
m_ControlDirectCutPage1 = New ControlsDirectCutUC1
|
||||||
|
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
||||||
|
m_SingleCutAuto = New SingleCutAuto
|
||||||
|
|
||||||
|
'Posizionemento nella griglia delle Page UserControl DirectCutPageUC
|
||||||
|
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||||
|
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||||
|
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||||
|
If m_bManulaCut Then
|
||||||
|
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
||||||
|
Else
|
||||||
|
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
||||||
|
End If
|
||||||
|
m_SingleDrill.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_MultipleCut.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_GridCut.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_FlatteningCut.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_Squaring.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
|
|
||||||
|
' ManualBtn.Content = EgtMsg(90201)
|
||||||
|
ManualTxt.Text = EgtMsg(90201)
|
||||||
|
'SingleCutBtn.Content = EgtMsg(90202)
|
||||||
|
SingleCutTxt.Text = EgtMsg(90202)
|
||||||
|
'SingleDrillBtn.Content = "Foro singolo"
|
||||||
|
SingleDrillTxt.Text = EgtMsg(90258)
|
||||||
|
'MultipleCutBtn.Content = EgtMsg(90203)
|
||||||
|
MultipleCutTxt.Text = EgtMsg(90203)
|
||||||
|
'GridCutBtn.Content = EgtMsg(90204)
|
||||||
|
GridCutTxt.Text = EgtMsg(90204)
|
||||||
|
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||||
|
FlatteningCutTxt.Text = EgtMsg(90206)
|
||||||
|
' 90261=Squaring
|
||||||
|
SquaringTxt.Text = EgtMsg(90261)
|
||||||
|
' 90409=Others
|
||||||
|
ChangeUCTxBl.Text = EgtMsg(90409)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ControlsDirectCutUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
|
' Se rientro da simulazione
|
||||||
|
If m_ActiveDirectCutPage = DirectCutPages.SingleCut Then
|
||||||
|
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||||
|
Return
|
||||||
|
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto Then
|
||||||
|
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||||
|
Return
|
||||||
|
ElseIf m_ActiveDirectCutPage = DirectCutPages.MultipleCut Then
|
||||||
|
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||||
|
Return
|
||||||
|
ElseIf m_ActiveDirectCutPage = DirectCutPages.GridCut Then
|
||||||
|
LeftButtonGrid.Children.Add(m_GridCut)
|
||||||
|
Return
|
||||||
|
ElseIf m_ActiveDirectCutPage = DirectCutPages.FlatteningCut Then
|
||||||
|
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||||
|
Return
|
||||||
|
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleDrill Then
|
||||||
|
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||||
|
Return
|
||||||
|
ElseIf m_ActiveDirectCutPage = DirectCutPages.Squaring Then
|
||||||
|
LeftButtonGrid.Children.Add(m_Squaring)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
If m_MainWindow.m_DirectCutPageUC.m_ActiveControl <> DirectCutPageUC.Controls.MachineButtonUC Or
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ActiveControl <> DirectCutPageUC.Controls.VacuumButtonUC Then
|
||||||
|
' Caso standard
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
||||||
|
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||||
|
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||||
|
|
||||||
|
ManualBtn.IsEnabled = bH1Exists
|
||||||
|
' sviluppo rimasto in sospeso
|
||||||
|
If m_bManulaCut Then
|
||||||
|
' anche se non è presente un grezzo mantengo abilitato il bottone
|
||||||
|
SingleCutBtn.IsEnabled = True
|
||||||
|
Else
|
||||||
|
SingleCutBtn.IsEnabled = bRawOk
|
||||||
|
End If
|
||||||
|
MultipleCutBtn.IsEnabled = bRawOk
|
||||||
|
GridCutBtn.IsEnabled = bRawOk
|
||||||
|
SingleDrillBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||||
|
FlatteningCutBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||||
|
SquaringBtn.IsEnabled = bRawOk
|
||||||
|
|
||||||
|
' aggiorno la visualizzazione dei parametri
|
||||||
|
ReloadParam()
|
||||||
|
|
||||||
|
' Nascondo i pezzi in parcheggio
|
||||||
|
HideParkedParts()
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' ricarico i parametri utensili per definizione
|
||||||
|
Public Sub ReloadParam()
|
||||||
|
Dim sCurrSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
|
Dim sCurrSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
Dim bSaw As Boolean = False
|
||||||
|
|
||||||
|
' se esiste una lavorazione di lama corrente vuol dire che deve essere preferita
|
||||||
|
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||||
|
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
If Not bSaw Then
|
||||||
|
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
|
||||||
|
End If
|
||||||
|
m_SingleCut.SetEnableParam(bSaw)
|
||||||
|
m_MultipleCut.SetEnableParam(bSaw)
|
||||||
|
m_GridCut.SetEnableParam(bSaw)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMAND CLICK BTN"
|
||||||
|
|
||||||
|
Private Sub ManualBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualBtn.Click
|
||||||
|
LeftButtonGrid.Children.Add(m_ManualAxesMove)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.ManualAxesMove
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
|
||||||
|
If m_bManulaCut Then
|
||||||
|
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto
|
||||||
|
Else
|
||||||
|
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.SingleCut
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MultipleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles MultipleCutBtn.Click
|
||||||
|
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.MultipleCut
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GridCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles GridCutBtn.Click
|
||||||
|
LeftButtonGrid.Children.Add(m_GridCut)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.GridCut
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub FlatteningCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FlatteningCutBtn.Click
|
||||||
|
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.FlatteningCut
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SquaringBtn_Click(sender As Object, e As RoutedEventArgs) Handles SquaringBtn.Click
|
||||||
|
LeftButtonGrid.Children.Add(m_Squaring)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.Squaring
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SingleDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleDrillBtn.Click
|
||||||
|
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.SingleDrill
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' cambio pagina
|
||||||
|
Private Sub ChangeUCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ChangeUCBtn.Click
|
||||||
|
DirectCutPage_Unloaded(Nothing, Nothing)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
||||||
|
m_MainWindow.m_DirectCutPageUC.LoadDirectCutUC1()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Command Click Btn
|
||||||
|
|
||||||
|
|
||||||
|
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
|
Select Case m_ActiveDirectCutPage
|
||||||
|
Case DirectCutPages.DirectCut Or DirectCutPages.ManualAxesMove
|
||||||
|
' Non è necessario fare alcunché
|
||||||
|
Case DirectCutPages.SingleCut
|
||||||
|
LeftButtonGrid.Children.Remove(m_SingleCut)
|
||||||
|
Case DirectCutPages.SingleCutAuto
|
||||||
|
LeftButtonGrid.Children.Remove(m_SingleCutAuto)
|
||||||
|
Case DirectCutPages.MultipleCut
|
||||||
|
LeftButtonGrid.Children.Remove(m_MultipleCut)
|
||||||
|
Case DirectCutPages.GridCut
|
||||||
|
LeftButtonGrid.Children.Remove(m_GridCut)
|
||||||
|
Case DirectCutPages.FlatteningCut
|
||||||
|
LeftButtonGrid.Children.Remove(m_FlatteningCut)
|
||||||
|
Case DirectCutPages.SingleDrill
|
||||||
|
LeftButtonGrid.Children.Remove(m_SingleDrill)
|
||||||
|
Case DirectCutPages.Squaring
|
||||||
|
LeftButtonGrid.Children.Remove(m_Squaring)
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<UserControl x:Class="ControlsDirectCutUC1"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
DataContext="Self"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
|
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<!--<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="7*"/>-->
|
||||||
|
<RowDefinition Height="9*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<!-- Definizione della Grid laterale -->
|
||||||
|
<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<!--<RowDefinition Height="1*"/>-->
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Button Name="SawTestBtn" Grid.Row="0"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="PolishingBtn" Grid.Row="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="CopyTemplateBtn" Grid.Row="2"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Grid Name="ChangeUC1Grid" Grid.Row="7">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Name="ChangeUC1Btn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
||||||
|
<!--<TextBlock Name="LabelCompo9" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>-->
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
Public Class ControlsDirectCutUC1
|
||||||
|
|
||||||
|
' Dichiarazione delle Page UserControl
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
Friend m_Polishing As Polishing
|
||||||
|
Friend m_CopyTemplate As CopyTemplateUC
|
||||||
|
Friend m_SawTest As SawTestUC
|
||||||
|
|
||||||
|
' Stato di visualizzazione della macchina
|
||||||
|
Friend m_bShowMachine As Boolean = False
|
||||||
|
Friend m_nMachLook As Integer = MCH_LOOK.ALL
|
||||||
|
' Dati generali CN
|
||||||
|
Friend m_CN As CN_generico
|
||||||
|
Private m_bFirst As Boolean = True
|
||||||
|
' Riferimento alla pagina correntemente attiva
|
||||||
|
Friend m_ActiveDirectCutPage As DirectCutPages = DirectCutPages.DirectCut
|
||||||
|
' Variabili che indicano attivazione paginette con bottoni macchina
|
||||||
|
Private m_ControlsBtn_IsActive As Boolean
|
||||||
|
|
||||||
|
Public Shared m_dZSafe As Double = 52
|
||||||
|
|
||||||
|
' Variabile che indica se sono attivi i bottoni macchina nuovi o vecchi
|
||||||
|
Friend m_NewMachineButtonsType As Boolean
|
||||||
|
' Indica che la finestra del talio Singolo deve essere di tipo manuale
|
||||||
|
Friend m_bManulaCut As Boolean = False
|
||||||
|
|
||||||
|
Enum DirectCutPages
|
||||||
|
DirectCut
|
||||||
|
DirectCut1
|
||||||
|
Polishing
|
||||||
|
CopyTemplate
|
||||||
|
SawTest
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||||
|
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
||||||
|
|
||||||
|
'Creazione delle Page UserControl
|
||||||
|
m_SawTest = New SawTestUC
|
||||||
|
m_Polishing = New Polishing
|
||||||
|
m_CopyTemplate = New CopyTemplateUC
|
||||||
|
|
||||||
|
'Posizionemento nella griglia delle Page UserControl
|
||||||
|
m_SawTest.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_Polishing.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_CopyTemplate.SetValue(Grid.RowProperty, 1)
|
||||||
|
|
||||||
|
' assegno i nomi ai pulsanti
|
||||||
|
SawTestTxt.Text = EgtMsg(90207)
|
||||||
|
PolishingTxt.Text = EgtMsg(90231)
|
||||||
|
'CopyTemplateBtn.Content = EgtMsg(90209)
|
||||||
|
CopyTemplateTxt.Text = EgtMsg(90209)
|
||||||
|
'SquaringTxt.Text = "Squaring"
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ControlsDirectCutUC1_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
|
' Se rientro da simulazione
|
||||||
|
If m_ActiveDirectCutPage = DirectCutPages.SawTest Then
|
||||||
|
LeftButtonGrid.Children.Add(m_SawTest)
|
||||||
|
Return
|
||||||
|
ElseIf m_ActiveDirectCutPage = DirectCutPages.CopyTemplate Then
|
||||||
|
Me.LeftButtonGrid.Children.Add(m_CopyTemplate)
|
||||||
|
Return
|
||||||
|
ElseIf m_ActiveDirectCutPage = DirectCutPages.Polishing Then
|
||||||
|
Me.LeftButtonGrid.Children.Add(m_Polishing)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Caso standard
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.DirectCut1
|
||||||
|
|
||||||
|
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
||||||
|
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||||
|
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||||
|
|
||||||
|
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||||
|
SawTestBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||||
|
CopyTemplateBtn.IsEnabled = bH1Exists
|
||||||
|
|
||||||
|
' aggiorno la visualizzazione dei parametri
|
||||||
|
ReloadParam()
|
||||||
|
|
||||||
|
' Nascondo i pezzi in parcheggio
|
||||||
|
HideParkedParts()
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' ricarica i dati utensili
|
||||||
|
Public Sub ReloadParam()
|
||||||
|
Dim sCurrSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
|
Dim sCurrSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
Dim bSaw As Boolean = False
|
||||||
|
|
||||||
|
' se esiste una lavorazione di lama corrente vuol dire che deve essere preferita
|
||||||
|
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||||
|
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
If Not bSaw Then
|
||||||
|
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
|
||||||
|
End If
|
||||||
|
'm_SingleCut.SetEnableParam(bSaw)
|
||||||
|
'm_MultipleCut.SetEnableParam(bSaw)
|
||||||
|
'm_GridCut.SetEnableParam(bSaw)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMAND CLICK BTN"
|
||||||
|
Private Sub SawTestBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawTestBtn.Click
|
||||||
|
LeftButtonGrid.Children.Add(m_SawTest)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.SawTest
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub PolishingBtn_Click(sender As Object, e As RoutedEventArgs) Handles PolishingBtn.Click
|
||||||
|
LeftButtonGrid.Children.Add(m_Polishing)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.Polishing
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CopyTemplateBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyTemplateBtn.Click
|
||||||
|
LeftButtonGrid.Children.Add(m_CopyTemplate)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.CopyTemplate
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ChangeUC1Btn_Click(sender As Object, e As RoutedEventArgs) Handles ChangeUC1Btn.Click
|
||||||
|
DirectCutPage_Unloaded(Nothing, Nothing)
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.DirectCut1
|
||||||
|
m_MainWindow.m_DirectCutPageUC.LoadDirectCutUC()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Command Click Btn
|
||||||
|
|
||||||
|
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
|
Select Case m_ActiveDirectCutPage
|
||||||
|
Case DirectCutPages.SawTest
|
||||||
|
LeftButtonGrid.Children.Remove(m_SawTest)
|
||||||
|
Case DirectCutPages.Polishing
|
||||||
|
LeftButtonGrid.Children.Remove(m_Polishing)
|
||||||
|
Case DirectCutPages.CopyTemplate
|
||||||
|
LeftButtonGrid.Children.Remove(m_CopyTemplate)
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -23,6 +23,9 @@ Public Class ControlsMachineButtonUC
|
|||||||
Friend m_CN As CN_generico
|
Friend m_CN As CN_generico
|
||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
|
' visualizzo l'elenco degli elementi della pagina sono al primo avvio
|
||||||
|
Friend Shared m_OutLogTypeButton As Boolean = True
|
||||||
|
|
||||||
' Creazione converter da String a ImageSource
|
' Creazione converter da String a ImageSource
|
||||||
Dim ImageConverter As New ImageSourceConverter
|
Dim ImageConverter As New ImageSourceConverter
|
||||||
|
|
||||||
@@ -72,10 +75,37 @@ Public Class ControlsMachineButtonUC
|
|||||||
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
|
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
GetTypeButton(MachineButton)
|
||||||
|
Next
|
||||||
|
m_OutLogTypeButton = False
|
||||||
|
|
||||||
NotifyPropertyChanged("ButtonList")
|
NotifyPropertyChanged("ButtonList")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "STATE CHANGED"
|
||||||
|
' ------------------------------------------------------------------------------
|
||||||
|
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
|
||||||
|
'-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Friend Sub GetTypeButton(CurrMachineButton As MachineButton)
|
||||||
|
If Not m_OutLogTypeButton Then Return
|
||||||
|
Dim BtnType As Type = CurrMachineButton.GetType
|
||||||
|
If BtnType Is GetType(NoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(0) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(TwoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(1) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(ThreeStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(2) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(DoubleCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(3) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(PressedCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(4) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||||
Dim SpindleButton As TwoStateButton = Nothing
|
Dim SpindleButton As TwoStateButton = Nothing
|
||||||
For Each MachineButton As MachineButton In m_ButtonList
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
@@ -255,38 +285,34 @@ Public Class ControlsMachineButtonUC
|
|||||||
Dim DoorOpenedButton As ThreeStateButton = Nothing
|
Dim DoorOpenedButton As ThreeStateButton = Nothing
|
||||||
For Each MachineButton As MachineButton In m_ButtonList
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
If MachineButton.StateFlag = K_DOORCLOSED Then
|
If MachineButton.StateFlag = K_DOORCLOSED Then
|
||||||
'If TypeOf MachineButton Is NoStateButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, NoStateButton)
|
|
||||||
'ElseIf TypeOf MachineButton Is TwoStateButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, TwoStateButton)
|
|
||||||
'ElseIf TypeOf MachineButton Is ThreeStateButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, ThreeStateButton)
|
|
||||||
'ElseIf TypeOf MachineButton Is DoubleCommandButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, DoubleCommandButton)
|
|
||||||
'ElseIf TypeOf MachineButton Is PressedCommandButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, PressedCommandButton)
|
|
||||||
'End If
|
|
||||||
DoorClosedButton = MachineButton
|
DoorClosedButton = MachineButton
|
||||||
End If
|
End If
|
||||||
If MachineButton.StateFlag = "DoorOpened" Then
|
If MachineButton.StateFlag = K_DOOROPENDED Then
|
||||||
DoorOpenedButton = MachineButton
|
DoorOpenedButton = MachineButton
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
' Chiusura porte (gesrtione comando Three/Two state
|
||||||
If Not IsNothing(DoorClosedButton) Then
|
If Not IsNothing(DoorClosedButton) Then
|
||||||
Select Case DoorClosedState
|
Select Case DoorClosedState
|
||||||
Case 0
|
Case 0
|
||||||
|
' porta aperta
|
||||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
|
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
|
||||||
Case 1, 2
|
Case 1, 2
|
||||||
|
' porta in movimento/aperta
|
||||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
' Chiusura porte (gesrtione comando Three/Two state
|
||||||
If Not IsNothing(DoorOpenedButton) Then
|
If Not IsNothing(DoorOpenedButton) Then
|
||||||
Select Case DoorClosedState
|
Select Case DoorClosedState
|
||||||
Case 0
|
Case 0
|
||||||
|
' porta aperta
|
||||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||||
Case 1
|
Case 1
|
||||||
|
' porta in movimento
|
||||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Yellow")
|
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||||
Case 2
|
Case 2
|
||||||
|
' porta chiusa
|
||||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Green")
|
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
@@ -330,6 +356,78 @@ Public Class ControlsMachineButtonUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ParkingStateChanged(ParkingState As Boolean)
|
||||||
|
Dim ParkingButton As TwoStateButton = Nothing
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
If MachineButton.StateFlag = K_PARKING Then
|
||||||
|
ParkingButton = MachineButton
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not IsNothing(ParkingButton) Then
|
||||||
|
ParkingButton.SetIsChecked(ParkingState)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ZoneStateChanged(ZoneState As Integer)
|
||||||
|
Dim bEnableZone1 As Boolean = False
|
||||||
|
If ZoneState = 1 Then
|
||||||
|
bEnableZone1 = True
|
||||||
|
ElseIf ZoneState = 2 Then
|
||||||
|
bEnableZone1 = False
|
||||||
|
End If
|
||||||
|
' attivo il comando associato
|
||||||
|
Dim EnableZoneButton As TwoStateButton = Nothing
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
If MachineButton.StateFlag = BTN_ENABLE_ZONE_1 Then
|
||||||
|
EnableZoneButton = MachineButton
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not IsNothing(EnableZoneButton) Then
|
||||||
|
EnableZoneButton.SetIsChecked(bEnableZone1)
|
||||||
|
End If
|
||||||
|
' disattivo l'altro per esclusione
|
||||||
|
EnableZoneButton = Nothing
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
If MachineButton.StateFlag = BTN_ENABLE_ZONE_2 Then
|
||||||
|
EnableZoneButton = MachineButton
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not IsNothing(EnableZoneButton) Then
|
||||||
|
EnableZoneButton.SetIsChecked(Not bEnableZone1)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub PcStateChanged(EnablePC As Integer)
|
||||||
|
Dim bEnablePC1 As Boolean = False
|
||||||
|
If EnablePC = 1 Then
|
||||||
|
bEnablePC1 = True
|
||||||
|
ElseIf EnablePC = 2 Then
|
||||||
|
bEnablePC1 = False
|
||||||
|
End If
|
||||||
|
' attivo/disattivo il comando associato
|
||||||
|
Dim EnablePCButton As TwoStateButton = Nothing
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
If MachineButton.StateFlag = K_ENABLEPC & "_1" Then
|
||||||
|
EnablePCButton = MachineButton
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not IsNothing(EnablePCButton) Then
|
||||||
|
EnablePCButton.SetIsChecked(bEnablePC1)
|
||||||
|
End If
|
||||||
|
' disattivo/attivo l'altro per esclusione
|
||||||
|
EnablePCButton = Nothing
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
If MachineButton.StateFlag = BTN_ENABLE_ZONE_2 Then
|
||||||
|
EnablePCButton = MachineButton
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not IsNothing(EnablePCButton) Then
|
||||||
|
EnablePCButton.SetIsChecked(Not bEnablePC1)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' State Range
|
||||||
|
|
||||||
Public Function GetPrivateProfileMachineButtons(
|
Public Function GetPrivateProfileMachineButtons(
|
||||||
ByVal lpAppName As String,
|
ByVal lpAppName As String,
|
||||||
ByVal lpKeyName As String,
|
ByVal lpKeyName As String,
|
||||||
@@ -402,6 +500,8 @@ Public MustInherit Class MachineButton
|
|||||||
Friend Const BTN_STATE_THREEAXIS As String = "ThreeAxis"
|
Friend Const BTN_STATE_THREEAXIS As String = "ThreeAxis"
|
||||||
Friend Const BTN_STATE_FIVEAXIS As String = "FiveAxis"
|
Friend Const BTN_STATE_FIVEAXIS As String = "FiveAxis"
|
||||||
Friend Const BTN_STATE_NOTHING As String = "Nothing"
|
Friend Const BTN_STATE_NOTHING As String = "Nothing"
|
||||||
|
Friend Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||||
|
Friend Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||||
|
|
||||||
' Dichiarazione delle Page UserControl
|
' Dichiarazione delle Page UserControl
|
||||||
Friend Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Friend Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
@@ -475,7 +575,7 @@ Public MustInherit Class MachineButton
|
|||||||
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
|
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
|
||||||
' solo per Flexium
|
' solo per Flexium
|
||||||
m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
|
m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
|
||||||
If Not IsNothing(ENumber2) And Not IsNothing(EValue2) Then
|
If Not String.IsNullOrEmpty(ENumber2) And Not String.IsNullOrEmpty(EValue2) Then
|
||||||
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
|
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
|
||||||
End If
|
End If
|
||||||
' altrimenti scrittura delle variabili E
|
' altrimenti scrittura delle variabili E
|
||||||
@@ -524,13 +624,64 @@ Public MustInherit Class MachineButton
|
|||||||
EgtOutLog("dopo scrittura seconda variabile")
|
EgtOutLog("dopo scrittura seconda variabile")
|
||||||
End If
|
End If
|
||||||
Return
|
Return
|
||||||
|
Case 4
|
||||||
|
' ------------------------------------ FANUC ------------------------------------
|
||||||
|
' eventuale scrittura di linea di comando MDI
|
||||||
|
If Not String.IsNullOrEmpty(CmdString) Then
|
||||||
|
' attivo mpdalità MDI
|
||||||
|
m_CN.DGeneralFunctions_WriteCncMode(2)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
' salvo la stringa di comando ricevuta dal file lua
|
||||||
|
m_CN.sz_ManualDataInput = CmdString
|
||||||
|
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||||
|
m_CN.MDI_command()
|
||||||
|
End If
|
||||||
|
' attivo modalità AUTO
|
||||||
|
m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
If String.IsNullOrEmpty(EValue) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
m_CN.NC_pulse_bit(ENumber)
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If ENumber.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue As Boolean
|
||||||
|
If EValue.Trim = "1" Then bEValue = True
|
||||||
|
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
||||||
|
End If
|
||||||
|
' eventale caricamento seconda variabile
|
||||||
|
If String.IsNullOrEmpty(EValue2) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
m_CN.NC_pulse_bit(ENumber2)
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If ENumber2.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue2 As Boolean
|
||||||
|
If EValue2.Trim = "1" Then bEValue2 = True
|
||||||
|
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
||||||
|
End If
|
||||||
|
Return
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
'--------------------------------------------------------- MDI ---------------------------------------------------------
|
'--------------------------------------------------------- MDI ---------------------------------------------------------
|
||||||
Dim nResult As Short
|
Dim nResult As Short
|
||||||
' assegno la modalità di funzionamento
|
' assegno la modalità di funzionamento
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||||
Case 1, 2
|
Case 1, 2, 4
|
||||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
|
nResult = m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
|
||||||
Case 3
|
Case 3
|
||||||
'Per il siemens non devo fare nulla
|
'Per il siemens non devo fare nulla
|
||||||
@@ -554,7 +705,7 @@ Public MustInherit Class MachineButton
|
|||||||
m_CN.DGeneralFunctions_CycleStart()
|
m_CN.DGeneralFunctions_CycleStart()
|
||||||
End If
|
End If
|
||||||
System.Threading.Thread.Sleep(300)
|
System.Threading.Thread.Sleep(300)
|
||||||
' riprostino la modalità manuale
|
' ripristino la modalità manuale..?? siucuri ??
|
||||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -575,6 +726,7 @@ Public MustInherit Class MachineButton
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
|
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
|
||||||
End If
|
End If
|
||||||
EgtLuaSetGlobNumVar("CMD.F", dFeed)
|
EgtLuaSetGlobNumVar("CMD.F", dFeed)
|
||||||
|
|
||||||
Dim dSpeed As Double = 0
|
Dim dSpeed As Double = 0
|
||||||
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
|
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
|
||||||
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
|
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
|
||||||
@@ -583,6 +735,18 @@ Public MustInherit Class MachineButton
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
||||||
End If
|
End If
|
||||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
||||||
|
|
||||||
|
' versione 2.5e1
|
||||||
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||||
|
Dim sToolPos As String = String.Empty
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
||||||
|
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
||||||
|
End If
|
||||||
|
Dim dToolDiam As Double = 0
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
||||||
@@ -647,12 +811,28 @@ Public Class TwoStateButton
|
|||||||
Return m_IsChecked
|
Return m_IsChecked
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
|
' accendo il comando, anche se dovrei aspettare di leggere lo stato da PLC
|
||||||
m_IsChecked = value
|
m_IsChecked = value
|
||||||
|
Dim sLuaScriptFile As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
|
||||||
If value Then
|
If value Then
|
||||||
|
sLuaScriptFile &= TLuaScriptName
|
||||||
ExecuteMDICommand(TLuaScriptName)
|
ExecuteMDICommand(TLuaScriptName)
|
||||||
Else
|
Else
|
||||||
|
sLuaScriptFile &= FLuaScriptName
|
||||||
ExecuteMDICommand(FLuaScriptName)
|
ExecuteMDICommand(FLuaScriptName)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim IsPressedShiftKey As Boolean = False
|
||||||
|
If Keyboard.Modifiers And ModifierKeys.Shift And
|
||||||
|
GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_MainWindow.GetIniFile()) > 4 Then IsPressedShiftKey = True
|
||||||
|
' procedo all'apertura del file CadCut1 appena generato (solo se generazione corretta)
|
||||||
|
If IsPressedShiftKey Then
|
||||||
|
Try
|
||||||
|
Process.Start("Notepad.exe", sLuaScriptFile)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog(ex.ToString)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetIsChecked(value As Boolean)
|
Friend Sub SetIsChecked(value As Boolean)
|
||||||
@@ -743,6 +923,7 @@ Public Class NoStateButton
|
|||||||
ExecuteMDICommand(TLuaScriptName)
|
ExecuteMDICommand(TLuaScriptName)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
' FANUC, SIEMENS
|
||||||
ExecuteMDICommand(TLuaScriptName)
|
ExecuteMDICommand(TLuaScriptName)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -35,10 +35,11 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="Point1Btn" Grid.Column="0"
|
<Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||||
Margin="6,0,6,0">
|
Margin="6,0,6,0">
|
||||||
@@ -55,10 +56,12 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="LineBtn" Grid.Column="0"
|
<ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
<Image Source="{DynamicResource LineaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<ToggleButton Name="ArcBtn" Grid.Column="1"
|
</ToggleButton>
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
<ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource ArcoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -69,14 +72,18 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2"
|
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Image Source="{DynamicResource Rimuovi-segmentoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2"
|
</Button>
|
||||||
Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
|
<Image Source="{DynamicResource ChiudiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
|
<Image Source="{DynamicResource Salva-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ Public Class CopyTemplateUC
|
|||||||
' Riferimenti a pagine
|
' Riferimenti a pagine
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||||
|
Private m_refControlDirectCutUC As ControlsDirectCutUC1
|
||||||
|
|
||||||
' Flag di pagina attiva
|
' Flag di pagina attiva
|
||||||
Private m_bActive As Boolean = False
|
Private m_bActive As Boolean = False
|
||||||
' Array stringhe modalità di acquisizione dei punti
|
' Array stringhe modalità di acquisizione dei punti
|
||||||
@@ -49,16 +51,17 @@ Public Class CopyTemplateUC
|
|||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
|
|
||||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||||
LineBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
|
LineBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
|
||||||
ArcBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
|
ArcBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
|
||||||
RemoveBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
|
RemoveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
|
||||||
CloseBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
|
CloseBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
|
||||||
SaveBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
|
SaveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||||
|
m_refControlDirectCutUC = m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC1
|
||||||
m_bActive = True
|
m_bActive = True
|
||||||
SaveBtn.IsEnabled = False
|
SaveBtn.IsEnabled = False
|
||||||
LineBtn.IsChecked = True
|
LineBtn.IsChecked = True
|
||||||
@@ -163,6 +166,15 @@ Public Class CopyTemplateUC
|
|||||||
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bTabOk Then Return
|
If Not m_bTabOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
' Ricavo dati lama corrente
|
||||||
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizione lama o laser
|
' Se acquisizione lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
@@ -170,14 +182,19 @@ Public Class CopyTemplateUC
|
|||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -185,7 +202,7 @@ Public Class CopyTemplateUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
@@ -193,8 +210,6 @@ Public Class CopyTemplateUC
|
|||||||
Else
|
Else
|
||||||
' Verifico presenza punto da mouse
|
' Verifico presenza punto da mouse
|
||||||
If Not m_bMouseOk Then Return
|
If Not m_bMouseOk Then Return
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
@@ -254,8 +269,7 @@ Public Class CopyTemplateUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function EraseCopyTemplatePart() As Boolean
|
Private Function EraseCopyTemplatePart() As Boolean
|
||||||
|
|||||||
+115
-58
@@ -28,10 +28,10 @@
|
|||||||
<ColumnDefinition Width="7*"/>
|
<ColumnDefinition Width="7*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -42,25 +42,27 @@
|
|||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Definizione della Grid laterale -->
|
<!-- Definizione della Grid laterale -->
|
||||||
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
<!--
|
||||||
<Grid.RowDefinitions>
|
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="7*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- Definizione della Grid laterale -->
|
|
||||||
<Grid Name="CutTypeGrid" Grid.Row="1" >
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="7*"/>
|
||||||
<RowDefinition Height="1*"/>
|
</Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
-->
|
||||||
<RowDefinition Height="1*"/>
|
<!-- Definizione della Grid laterale -->
|
||||||
<RowDefinition Height="1*"/>
|
<!--<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||||
<RowDefinition Height="1*"/>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
@@ -140,30 +142,65 @@
|
|||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="PolishingBtn" Grid.Row="6"
|
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
|
|
||||||
<Button Name="CopyTemplateBtn" Grid.Row="7"
|
<Button Name="PolishingBtn" Grid.Row="6"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
<ColumnDefinition Width="140"/>
|
<ColumnDefinition Width="140"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="SawTestBtn" Grid.Row="8"
|
-->
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
<!--<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>-->
|
||||||
|
<!--
|
||||||
|
<Button Name="SquaringBtn" Grid.Row="7"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="SquaringTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="SawTestBtn" Grid.Row="8"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
|
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Grid>-->
|
||||||
|
<!--
|
||||||
|
|
||||||
|
</Grid>-->
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Definizione della Grid laterale per bottoni macchina -->
|
<!-- Definizione della Grid laterale per bottoni macchina -->
|
||||||
<Grid Name="MachineButtonGrid" Grid.Row="1">
|
<Grid Name="MachineButtonGrid" Grid.Row="1">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@@ -180,9 +217,14 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="5*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<!--<ColumnDefinition Width="1*"/>-->
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="ControlsMachineBtn" Grid.Column="0"
|
<ToggleButton Name="ControlsMachineBtn" Grid.Column="0"
|
||||||
@@ -194,27 +236,42 @@
|
|||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<!--Comando asse X-Y-->
|
<!--Comando asse X-Y-->
|
||||||
<ToggleButton Name="XYBtn" Grid.Column="2"
|
<ToggleButton Name="XYBtn" Grid.Column="2"
|
||||||
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
<!--Comando asse Z-C-->
|
||||||
|
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||||
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
<!--Comando asse Z-B-->
|
||||||
|
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
||||||
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
<!--Comando Remote-->
|
||||||
|
<ToggleButton Name="RemoteBtn" Grid.Column="5"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
|
<!--Parking-->
|
||||||
|
<ToggleButton Name="ParkingBtn" Grid.Column="6"
|
||||||
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
|
||||||
<!--Comando asse Z-C-->
|
|
||||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
|
||||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
|
||||||
</ToggleButton>
|
|
||||||
|
|
||||||
<!--Comando asse Z-B-->
|
<!--Comando Manula/MDI-->
|
||||||
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
<Button Name="ManualModeBtn" Grid.Column="11"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
|
||||||
</ToggleButton>
|
|
||||||
|
|
||||||
<Button Name="ManualModeBtn" Grid.Column="7"
|
|
||||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
|
||||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|||||||
+248
-344
@@ -7,18 +7,20 @@ Public Class DirectCutPageUC
|
|||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
Friend m_MachineButtons As MachineButtonsUC
|
Friend m_MachineButtons As MachineButtonsUC
|
||||||
Friend m_ManualAxesMove As ManualAxesMoveUC
|
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||||
Friend m_SingleCut As SingleCutUC
|
|
||||||
Friend m_SingleDrill As SingleDrillUC
|
|
||||||
' nuova finestra per i comandi per il taglio manuale nuovo
|
|
||||||
Friend m_SingleCutAuto As SingleCutAuto
|
|
||||||
Friend m_MultipleCut As MultipleCut
|
|
||||||
Friend m_GridCut As GridCut
|
|
||||||
Friend m_FlatteningCut As FlatteningCut
|
|
||||||
Friend m_Polishing As Polishing
|
|
||||||
Friend m_CopyTemplate As CopyTemplateUC
|
|
||||||
Friend m_SawTest As SawTestUC
|
|
||||||
Friend m_ControlsMachineButton As ControlsMachineButtonUC
|
Friend m_ControlsMachineButton As ControlsMachineButtonUC
|
||||||
Friend m_VacuumMachineButton As VacuumMachineButtonUC
|
Friend m_VacuumMachineButton As VacuumMachineButtonUC
|
||||||
|
Friend m_ControlsDirectCutUC As ControlsDirectCutUC
|
||||||
|
Friend m_ControlsDirectCutUC1 As ControlsDirectCutUC1
|
||||||
|
|
||||||
|
Friend m_ActiveControl As Controls
|
||||||
|
Enum Controls
|
||||||
|
DirectCutUC
|
||||||
|
DirectCutUC1
|
||||||
|
MachineButtonUC
|
||||||
|
VacuumButtonUC
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
|
||||||
' Stato di visualizzazione della macchina
|
' Stato di visualizzazione della macchina
|
||||||
Friend m_bShowMachine As Boolean = False
|
Friend m_bShowMachine As Boolean = False
|
||||||
@@ -26,8 +28,6 @@ Public Class DirectCutPageUC
|
|||||||
' Dati generali CN
|
' Dati generali CN
|
||||||
Friend m_CN As CN_generico
|
Friend m_CN As CN_generico
|
||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
' Riferimento alla pagina correntemente attiva
|
|
||||||
Friend m_ActiveDirectCutPage As DirectCutPages = DirectCutPages.DirectCut
|
|
||||||
' Variabili che indicano attivazione paginette con bottoni macchina
|
' Variabili che indicano attivazione paginette con bottoni macchina
|
||||||
Private m_ControlsBtn_IsActive As Boolean
|
Private m_ControlsBtn_IsActive As Boolean
|
||||||
|
|
||||||
@@ -41,108 +41,45 @@ Public Class DirectCutPageUC
|
|||||||
' elenco dei nuovi bottoni
|
' elenco dei nuovi bottoni
|
||||||
Private m_ButtonJogList As New List(Of MachineButton)
|
Private m_ButtonJogList As New List(Of MachineButton)
|
||||||
|
|
||||||
Enum DirectCutPages
|
|
||||||
DirectCut
|
|
||||||
ManualAxesMove
|
|
||||||
SingleCut
|
|
||||||
MultipleCut
|
|
||||||
GridCut
|
|
||||||
FlatteningCut
|
|
||||||
Polishing
|
|
||||||
CopyTemplate
|
|
||||||
SawTest
|
|
||||||
SingleCutAuto
|
|
||||||
SingleDrill
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Private Sub DirectCutPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub DirectCutPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' leggo la configurazione del programma per i nuovi tagli manuali
|
|
||||||
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
|
||||||
|
|
||||||
'Creazione delle Page UserControl
|
'Creazione delle Page UserControl
|
||||||
m_MachineButtons = New MachineButtonsUC
|
m_MachineButtons = New MachineButtonsUC
|
||||||
m_ManualAxesMove = New ManualAxesMoveUC
|
m_ManualAxesMove = New ManualAxesMoveUC
|
||||||
m_SingleCut = New SingleCutUC
|
|
||||||
m_SingleDrill = New SingleDrillUC
|
|
||||||
m_MultipleCut = New MultipleCut
|
|
||||||
m_GridCut = New GridCut
|
|
||||||
m_FlatteningCut = New FlatteningCut
|
|
||||||
m_Polishing = New Polishing
|
|
||||||
m_CopyTemplate = New CopyTemplateUC
|
|
||||||
m_SawTest = New SawTestUC
|
|
||||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||||
m_VacuumMachineButton = New VacuumMachineButtonUC
|
m_VacuumMachineButton = New VacuumMachineButtonUC
|
||||||
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
m_ControlsDirectCutUC = New ControlsDirectCutUC
|
||||||
m_SingleCutAuto = New SingleCutAuto
|
m_ControlsDirectCutUC1 = New ControlsDirectCutUC1
|
||||||
|
|
||||||
'Posizionemento nella griglia delle Page UserControl
|
'Posizionemento nella griglia delle Page UserControl
|
||||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 6)
|
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, m_MachineButtons.nCountButton)
|
||||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||||
If m_bManulaCut Then
|
|
||||||
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
m_ControlsDirectCutUC.SetValue(Grid.RowProperty, 1)
|
||||||
Else
|
m_ControlsDirectCutUC1.SetValue(Grid.RowProperty, 1)
|
||||||
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
|
||||||
End If
|
|
||||||
m_SingleDrill.SetValue(Grid.RowProperty, 1)
|
|
||||||
m_MultipleCut.SetValue(Grid.RowProperty, 1)
|
|
||||||
m_GridCut.SetValue(Grid.RowProperty, 1)
|
|
||||||
m_FlatteningCut.SetValue(Grid.RowProperty, 1)
|
|
||||||
m_Polishing.SetValue(Grid.RowProperty, 1)
|
|
||||||
m_CopyTemplate.SetValue(Grid.RowProperty, 1)
|
|
||||||
m_SawTest.SetValue(Grid.RowProperty, 1)
|
|
||||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
|
|
||||||
Dim bCollapsedNewBottonsConsole As Boolean = False
|
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [ControlMachButtons])
|
||||||
|
Dim bCollapsedNewBottonsConsole As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons("JogButtons", "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||||
|
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [VacuumMachButtons])
|
||||||
|
Dim bCollapsedVacuumButton As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_VACUUMMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||||
If Not m_NewMachineButtonsType Then
|
If Not m_NewMachineButtonsType Then
|
||||||
'Assegno MachineButtons alla pagina
|
'Assegno MachineButtons alla pagina
|
||||||
LowerButtonGrid.Children.Add(m_MachineButtons)
|
LowerButtonGrid.Children.Add(m_MachineButtons)
|
||||||
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
|
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||||
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||||
' per le configurazioni diverse dalla Digitale5
|
|
||||||
bCollapsedNewBottonsConsole = True
|
|
||||||
End If
|
End If
|
||||||
|
' se non sono configurate le ventose allora nascondo il comando
|
||||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
If m_NewMachineButtonsType AndAlso bCollapsedVacuumButton Then
|
||||||
ManualBtn.IsEnabled = False
|
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||||
ManualModeBtn.Visibility = Windows.Visibility.Hidden
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' ManualBtn.Content = EgtMsg(90201)
|
|
||||||
ManualTxt.Text = EgtMsg(90201)
|
|
||||||
'SingleCutBtn.Content = EgtMsg(90202)
|
|
||||||
SingleCutTxt.Text = EgtMsg(90202)
|
|
||||||
'SingleDrillBtn.Content = "Foro singolo"
|
|
||||||
SingleDrillTxt.Text = EgtMsg(90258)
|
|
||||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
|
||||||
MultipleCutTxt.Text = EgtMsg(90203)
|
|
||||||
'GridCutBtn.Content = EgtMsg(90204)
|
|
||||||
GridCutTxt.Text = EgtMsg(90204)
|
|
||||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
|
||||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
|
||||||
PolishingBtn.Content = EgtMsg(90231)
|
|
||||||
'CopyTemplateBtn.Content = EgtMsg(90209)
|
|
||||||
CopyTemplateTxt.Text = EgtMsg(90209)
|
|
||||||
SawTestBtn.Content = EgtMsg(90207)
|
|
||||||
|
|
||||||
|
|
||||||
' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021
|
' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021
|
||||||
|
' leggo il numero di assi attivi nella macchina
|
||||||
Dim AxesNumber = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile())
|
Dim AxesNumber = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile())
|
||||||
Dim x As Integer = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
|
|
||||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollapsedNewBottonsConsole Then
|
|
||||||
XYBtn.Content = "X - Y"
|
|
||||||
ZCBtn.Content = "Z - C"
|
|
||||||
If AxesNumber < 5 Then
|
|
||||||
ZBBtn.Visibility = Windows.Visibility.Collapsed
|
|
||||||
End If
|
|
||||||
ZBBtn.Content = "Z - B"
|
|
||||||
Else
|
|
||||||
XYBtn.Visibility = Windows.Visibility.Collapsed
|
|
||||||
ZCBtn.Visibility = Windows.Visibility.Collapsed
|
|
||||||
ZBBtn.Visibility = Windows.Visibility.Collapsed
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -182,55 +119,17 @@ Public Class DirectCutPageUC
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
|
' attivo la visualizzazione dei comandi
|
||||||
|
SetVisibilityJogButtuns()
|
||||||
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
|
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
|
||||||
'----------- FINE NUOVI BOTTONI------------
|
'----------- FINE NUOVI BOTTONI------------
|
||||||
|
|
||||||
' Se rientro da simulazione
|
LoadLastDirectCutControls()
|
||||||
If m_ActiveDirectCutPage = DirectCutPages.SingleCut Then
|
|
||||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
|
||||||
Return
|
|
||||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto Then
|
|
||||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
|
||||||
Return
|
|
||||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.MultipleCut Then
|
|
||||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
|
||||||
Return
|
|
||||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.GridCut Then
|
|
||||||
LeftButtonGrid.Children.Add(m_GridCut)
|
|
||||||
Return
|
|
||||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.FlatteningCut Then
|
|
||||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
|
||||||
Return
|
|
||||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.Polishing Then
|
|
||||||
LeftButtonGrid.Children.Add(m_Polishing)
|
|
||||||
Return
|
|
||||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SawTest Then
|
|
||||||
LeftButtonGrid.Children.Add(m_SawTest)
|
|
||||||
Return
|
|
||||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleDrill Then
|
|
||||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
|
|
||||||
' Caso standard
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
|
||||||
|
|
||||||
' Se macchina fotografica abilitata
|
' Se macchina fotografica abilitata
|
||||||
PhotoBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO)
|
PhotoBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO)
|
||||||
|
' aggiorno la visualizzazione dei parametri
|
||||||
' Attivo le lavorazioni solo se esiste il grezzo
|
ReloadParam()
|
||||||
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
|
||||||
If m_bManulaCut Then
|
|
||||||
' anche se non è presente un grezzo mantengo abilitato il bottone
|
|
||||||
SingleCutBtn.IsEnabled = True
|
|
||||||
Else
|
|
||||||
SingleCutBtn.IsEnabled = bRawOk
|
|
||||||
End If
|
|
||||||
MultipleCutBtn.IsEnabled = bRawOk
|
|
||||||
GridCutBtn.IsEnabled = bRawOk
|
|
||||||
FlatteningCutBtn.IsEnabled = bRawOk
|
|
||||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
|
||||||
SawTestBtn.IsEnabled = bRawOk
|
|
||||||
|
|
||||||
' Nascondo i pezzi in parcheggio
|
' Nascondo i pezzi in parcheggio
|
||||||
HideParkedParts()
|
HideParkedParts()
|
||||||
@@ -238,6 +137,57 @@ Public Class DirectCutPageUC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub ReloadParam()
|
||||||
|
Dim sCurrSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
|
Dim sCurrSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
Dim bSaw As Boolean = False
|
||||||
|
|
||||||
|
' se esiste una lavorazione di lama corrente vuol dire che deve essere preferita
|
||||||
|
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||||
|
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
If Not bSaw Then
|
||||||
|
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
|
||||||
|
End If
|
||||||
|
m_ControlsDirectCutUC.m_SingleCut.SetEnableParam(bSaw)
|
||||||
|
m_ControlsDirectCutUC.m_MultipleCut.SetEnableParam(bSaw)
|
||||||
|
m_ControlsDirectCutUC.m_GridCut.SetEnableParam(bSaw)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetVisibilityJogButtuns()
|
||||||
|
XYBtn.Visibility = Visibility.Collapsed
|
||||||
|
ZCBtn.Visibility = Visibility.Collapsed
|
||||||
|
ZBBtn.Visibility = Visibility.Collapsed
|
||||||
|
RemoteBtn.Visibility = Visibility.Collapsed
|
||||||
|
ParkingBtn.Visibility = Visibility.Collapsed
|
||||||
|
|
||||||
|
Dim Item As MachineButton = Nothing
|
||||||
|
For Each Item In m_ButtonJogList
|
||||||
|
Select Case Item.StateFlag.Trim
|
||||||
|
Case K_XYJOG
|
||||||
|
XYBtn.Visibility = Visibility.Visible
|
||||||
|
XYBtn.Foreground = Brushes.White
|
||||||
|
XYBtn.ToolTip = "X - Y"
|
||||||
|
Case K_ZCJOG
|
||||||
|
ZCBtn.Visibility = Visibility.Visible
|
||||||
|
ZCBtn.Foreground = Brushes.White
|
||||||
|
ZCBtn.ToolTip = "Z - C"
|
||||||
|
Case K_ZBJOG
|
||||||
|
ZBBtn.Visibility = Visibility.Visible
|
||||||
|
ZBBtn.Foreground = Brushes.White
|
||||||
|
ZBBtn.ToolTip = "Z - B"
|
||||||
|
Case K_REMOTE
|
||||||
|
RemoteBtn.Visibility = Visibility.Visible
|
||||||
|
RemoteBtn.Foreground = Brushes.White
|
||||||
|
RemoteBtn.Content = "Remote"
|
||||||
|
Case K_PARKING
|
||||||
|
ParkingBtn.Visibility = Visibility.Visible
|
||||||
|
ParkingBtn.Foreground = Brushes.White
|
||||||
|
ParkingBtn.ToolTip = "Parking"
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
||||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
' Se macchina fotografica collegata, faccio una foto
|
' Se macchina fotografica collegata, faccio una foto
|
||||||
@@ -262,63 +212,13 @@ Public Class DirectCutPageUC
|
|||||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ManualBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualBtn.Click
|
|
||||||
LeftButtonGrid.Children.Add(m_ManualAxesMove)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.ManualAxesMove
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
|
|
||||||
If m_bManulaCut Then
|
|
||||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto
|
|
||||||
Else
|
|
||||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.SingleCut
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub MultipleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles MultipleCutBtn.Click
|
|
||||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.MultipleCut
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub GridCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles GridCutBtn.Click
|
|
||||||
LeftButtonGrid.Children.Add(m_GridCut)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.GridCut
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub FlatteningCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FlatteningCutBtn.Click
|
|
||||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.FlatteningCut
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub PolishingBtn_Click(sender As Object, e As RoutedEventArgs) Handles PolishingBtn.Click
|
|
||||||
LeftButtonGrid.Children.Add(m_Polishing)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.Polishing
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CopyTemplateBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyTemplateBtn.Click
|
|
||||||
LeftButtonGrid.Children.Add(m_CopyTemplate)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.CopyTemplate
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SawTestBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawTestBtn.Click
|
|
||||||
LeftButtonGrid.Children.Add(m_SawTest)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.SawTest
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SingleDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleDrillBtn.Click
|
|
||||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
|
||||||
m_ActiveDirectCutPage = DirectCutPages.SingleDrill
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ControlsMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles ControlsMachineBtn.Click
|
Private Sub ControlsMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles ControlsMachineBtn.Click
|
||||||
If ControlsMachineBtn.IsChecked Then
|
If ControlsMachineBtn.IsChecked Then
|
||||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||||
MachineButtonGrid.Children.Add(m_ControlsMachineButton)
|
MachineButtonGrid.Children.Add(m_ControlsMachineButton)
|
||||||
|
m_ActiveControl = Controls.MachineButtonUC
|
||||||
If VacuumMachineBtn.IsChecked Then
|
If VacuumMachineBtn.IsChecked Then
|
||||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||||
VacuumMachineBtn.IsChecked = False
|
VacuumMachineBtn.IsChecked = False
|
||||||
@@ -331,6 +231,7 @@ Public Class DirectCutPageUC
|
|||||||
Private Sub VacuumMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles VacuumMachineBtn.Click
|
Private Sub VacuumMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles VacuumMachineBtn.Click
|
||||||
If VacuumMachineBtn.IsChecked Then
|
If VacuumMachineBtn.IsChecked Then
|
||||||
MachineButtonGrid.Children.Add(m_VacuumMachineButton)
|
MachineButtonGrid.Children.Add(m_VacuumMachineButton)
|
||||||
|
m_ActiveControl = Controls.VacuumButtonUC
|
||||||
If ControlsMachineBtn.IsChecked Then
|
If ControlsMachineBtn.IsChecked Then
|
||||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||||
ControlsMachineBtn.IsChecked = False
|
ControlsMachineBtn.IsChecked = False
|
||||||
@@ -340,9 +241,32 @@ Public Class DirectCutPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
Friend Sub LoadDirectCutUC()
|
||||||
|
ManageControls()
|
||||||
|
m_ActiveControl = Controls.DirectCutUC
|
||||||
|
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub LoadDirectCutUC1()
|
||||||
|
ManageControls()
|
||||||
|
m_ActiveControl = Controls.DirectCutUC1
|
||||||
|
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC1)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#Region "[JogButtons]"
|
||||||
|
|
||||||
Private Sub XYBtn_Click(sender As Object, e As RoutedEventArgs) Handles XYBtn.Click
|
Private Sub XYBtn_Click(sender As Object, e As RoutedEventArgs) Handles XYBtn.Click
|
||||||
Dim XYJogButton As MachineButton = m_ButtonJogList(0)
|
' riverco in elenco il bottone XYJog
|
||||||
|
Dim XYJogButton As MachineButton = Nothing
|
||||||
|
Dim ItemButton As MachineButton = Nothing
|
||||||
|
For Each ItemButton In m_ButtonJogList
|
||||||
|
If ItemButton.StateFlag = K_XYJOG Then
|
||||||
|
XYJogButton = ItemButton
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If IsNothing(XYJogButton) Then Return
|
||||||
' eseguo lo script lua associato
|
' eseguo lo script lua associato
|
||||||
XYJogButton.ExecuteMDICommand(XYJogButton.TLuaScriptName)
|
XYJogButton.ExecuteMDICommand(XYJogButton.TLuaScriptName)
|
||||||
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
||||||
@@ -365,7 +289,16 @@ Public Class DirectCutPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ZCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZCBtn.Click
|
Private Sub ZCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZCBtn.Click
|
||||||
Dim ZJogButton As MachineButton = m_ButtonJogList(1)
|
' riverco in elenco il bottone ZCYJog
|
||||||
|
Dim ZJogButton As MachineButton = Nothing
|
||||||
|
Dim ItemButton As MachineButton = Nothing
|
||||||
|
For Each ItemButton In m_ButtonJogList
|
||||||
|
If ItemButton.StateFlag = K_ZCJOG Then
|
||||||
|
ZJogButton = ItemButton
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If IsNothing(ZJogButton) Then Return
|
||||||
' eseguo lo script lua associato
|
' eseguo lo script lua associato
|
||||||
ZJogButton.ExecuteMDICommand(ZJogButton.TLuaScriptName)
|
ZJogButton.ExecuteMDICommand(ZJogButton.TLuaScriptName)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -386,9 +319,18 @@ Public Class DirectCutPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ZBBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBBtn.Click
|
Private Sub ZBBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBBtn.Click
|
||||||
Dim BCJogButton As MachineButton = m_ButtonJogList(2)
|
' riverco in elenco il bottone ZCYJog
|
||||||
|
Dim ZBJogButton As MachineButton = Nothing
|
||||||
|
Dim ItemButton As MachineButton = Nothing
|
||||||
|
For Each ItemButton In m_ButtonJogList
|
||||||
|
If ItemButton.StateFlag = K_ZBJOG Then
|
||||||
|
ZBJogButton = ItemButton
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If IsNothing(ZBJogButton) Then Return
|
||||||
' eseguo lo script lua associato
|
' eseguo lo script lua associato
|
||||||
BCJogButton.ExecuteMDICommand(BCJogButton.TLuaScriptName)
|
ZBJogButton.ExecuteMDICommand(ZBJogButton.TLuaScriptName)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub ZBJogChanged(bBCAxes As Boolean)
|
Friend Sub ZBJogChanged(bBCAxes As Boolean)
|
||||||
@@ -405,17 +347,95 @@ Public Class DirectCutPageUC
|
|||||||
ZBBtn.IsChecked = bBCAxes
|
ZBBtn.IsChecked = bBCAxes
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
|
||||||
|
Private Sub RemoteBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemoteBtn.Click
|
||||||
|
Dim RemoteButton As MachineButton = Nothing
|
||||||
|
Dim ItemButton As MachineButton = Nothing
|
||||||
|
For Each ItemButton In m_ButtonJogList
|
||||||
|
If ItemButton.StateFlag = K_REMOTE Then
|
||||||
|
RemoteButton = ItemButton
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If IsNothing(RemoteButton) Then Return
|
||||||
|
' eseguo lo script lua associato
|
||||||
|
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
||||||
|
Dim sLuaFileName As String = String.Empty
|
||||||
|
' verifico lo stato del bottone per avviare il giusto script
|
||||||
|
If CurrentBtn.IsChecked() Then
|
||||||
|
sLuaFileName = RemoteButton.TLuaScriptName
|
||||||
|
Else
|
||||||
|
sLuaFileName = RemoteButton.FLuaScriptName
|
||||||
|
End If
|
||||||
|
RemoteButton.ExecuteMDICommand(sLuaFileName)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub RemoteChanged(bRemote As Boolean)
|
||||||
|
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||||
|
Dim RemoteButton As TwoStateButton = Nothing
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||||
|
If MachineButton.StateFlag.Trim = K_REMOTE Then
|
||||||
|
RemoteButton = MachineButton
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not IsNothing(RemoteButton) Then
|
||||||
|
RemoteButton.SetIsChecked(bRemote)
|
||||||
|
RemoteBtn.IsChecked = bRemote
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ParkingBtn_Click(sender As Object, e As RoutedEventArgs) Handles ParkingBtn.Click
|
||||||
|
Dim ParkingButton As MachineButton = Nothing
|
||||||
|
Dim ItemButton As MachineButton = Nothing
|
||||||
|
For Each ItemButton In m_ButtonJogList
|
||||||
|
If ItemButton.StateFlag = K_PARKING Then
|
||||||
|
ParkingButton = ItemButton
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If IsNothing(ParkingButton) Then Return
|
||||||
|
' eseguo lo script lua associato
|
||||||
|
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
||||||
|
Dim sLuaFileName As String = String.Empty
|
||||||
|
' verifico lo stato del bottone per avviare il giusto script
|
||||||
|
If CurrentBtn.IsChecked() Then
|
||||||
|
sLuaFileName = ParkingButton.TLuaScriptName
|
||||||
|
Else
|
||||||
|
sLuaFileName = ParkingButton.FLuaScriptName
|
||||||
|
End If
|
||||||
|
ParkingButton.ExecuteMDICommand(sLuaFileName)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ParkingStateChanged(bParkingState As Boolean)
|
||||||
|
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||||
|
Dim ParkingButton As TwoStateButton = Nothing
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||||
|
If MachineButton.StateFlag.Trim = K_PARKING Then
|
||||||
|
ParkingButton = MachineButton
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not IsNothing(ParkingButton) Then
|
||||||
|
ParkingButton.SetIsChecked(bParkingState)
|
||||||
|
ParkingButton.IsChecked = bParkingState
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region '[JogButtons]
|
||||||
|
|
||||||
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
||||||
If m_bShowMachine Then
|
If m_bShowMachine Then
|
||||||
' aggiorno lo stato
|
' aggiorno lo stato
|
||||||
Select Case m_nMachLook
|
Select Case m_nMachLook
|
||||||
Case MCH_LOOK.ALL
|
Case MCH_LOOK.ALL
|
||||||
m_nMachLook = MCH_LOOK.TAB_HEAD
|
m_nMachLook = MCH_LOOK.TAB_HEAD
|
||||||
Case MCH_LOOK.TAB_HEAD
|
Case MCH_LOOK.TAB_HEAD
|
||||||
m_nMachLook = MCH_LOOK.TAB_TOOL
|
m_nMachLook = MCH_LOOK.TAB_TOOL
|
||||||
Case Else
|
Case MCH_LOOK.TAB_TOOL
|
||||||
m_nMachLook = MCH_LOOK.ALL
|
m_nMachLook = MCH_LOOK.TAB
|
||||||
|
Case Else
|
||||||
|
m_nMachLook = MCH_LOOK.ALL
|
||||||
End Select
|
End Select
|
||||||
' aggiorno lo stato della macchina e la sua visualizzazione
|
' aggiorno lo stato della macchina e la sua visualizzazione
|
||||||
EgtSetMachineLook(m_nMachLook)
|
EgtSetMachineLook(m_nMachLook)
|
||||||
@@ -424,36 +444,40 @@ Public Class DirectCutPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
Select Case m_ActiveDirectCutPage
|
ManageControls()
|
||||||
Case DirectCutPages.DirectCut Or DirectCutPages.ManualAxesMove
|
End Sub
|
||||||
' Non è necessario fare alcunché
|
|
||||||
Case DirectCutPages.SingleCut
|
Friend Sub ManageControls()
|
||||||
LeftButtonGrid.Children.Remove(m_SingleCut)
|
Select Case m_ActiveControl
|
||||||
Case DirectCutPages.SingleCutAuto
|
Case Controls.DirectCutUC
|
||||||
LeftButtonGrid.Children.Remove(m_SingleCutAuto)
|
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||||
Case DirectCutPages.MultipleCut
|
m_ControlsDirectCutUC.DirectCutPage_Unloaded(Nothing, Nothing)
|
||||||
LeftButtonGrid.Children.Remove(m_MultipleCut)
|
Case Controls.DirectCutUC1
|
||||||
Case DirectCutPages.GridCut
|
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC1)
|
||||||
LeftButtonGrid.Children.Remove(m_GridCut)
|
m_ControlsDirectCutUC1.DirectCutPage_Unloaded(Nothing, Nothing)
|
||||||
Case DirectCutPages.FlatteningCut
|
Case Controls.MachineButtonUC
|
||||||
LeftButtonGrid.Children.Remove(m_FlatteningCut)
|
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||||
Case DirectCutPages.Polishing
|
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||||
LeftButtonGrid.Children.Remove(m_Polishing)
|
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC1)
|
||||||
Case DirectCutPages.CopyTemplate
|
ControlsMachineBtn.IsChecked = False
|
||||||
LeftButtonGrid.Children.Remove(m_CopyTemplate)
|
Case Controls.VacuumButtonUC
|
||||||
Case DirectCutPages.SawTest
|
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||||
LeftButtonGrid.Children.Remove(m_SawTest)
|
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||||
Case DirectCutPages.SingleDrill
|
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||||
LeftButtonGrid.Children.Remove(m_SingleDrill)
|
VacuumMachineBtn.IsChecked = False
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub LoadLastDirectCutControls()
|
||||||
|
Select Case m_ActiveControl
|
||||||
|
Case Controls.DirectCutUC
|
||||||
|
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC)
|
||||||
|
Case Controls.DirectCutUC1
|
||||||
|
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC1)
|
||||||
|
Case Else
|
||||||
|
m_ActiveControl = Controls.DirectCutUC
|
||||||
|
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC)
|
||||||
End Select
|
End Select
|
||||||
If ControlsMachineBtn.IsChecked Then
|
|
||||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
|
||||||
ControlsMachineBtn.IsChecked = False
|
|
||||||
End If
|
|
||||||
If VacuumMachineBtn.IsChecked Then
|
|
||||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
|
||||||
VacuumMachineBtn.IsChecked = False
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
|
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
|
||||||
@@ -462,124 +486,4 @@ Public Class DirectCutPageUC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'' ------------------------ GESTIONE SECONDA PAGINA ------------------------
|
|
||||||
'Private Sub ClearButton(nCount As Integer)
|
|
||||||
' Dim nEndIndex As Integer
|
|
||||||
' If m_bIsFirstPage Then
|
|
||||||
' nEndIndex = If(nCount < 8, nCount, 8)
|
|
||||||
' Else
|
|
||||||
' nEndIndex = If(nCount < 16, nCount - 8, 8)
|
|
||||||
' End If
|
|
||||||
' For index As Integer = 1 To nEndIndex
|
|
||||||
' GetLabel(index).Text = String.Empty
|
|
||||||
' GetImage(index).Source = Nothing
|
|
||||||
' GetButton(index).Visibility = Windows.Visibility.Visible
|
|
||||||
' Next
|
|
||||||
' For index As Integer = nEndIndex + 1 To 8
|
|
||||||
' GetLabel(index).Text = String.Empty
|
|
||||||
' GetImage(index).Source = Nothing
|
|
||||||
' GetButton(index).Visibility = Windows.Visibility.Hidden
|
|
||||||
' Next
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Private Sub LoadPage()
|
|
||||||
' Dim nDeltaSecondPage As Integer = 8
|
|
||||||
' ' Leggo numero di componenti presenti
|
|
||||||
' Dim nCompoNumber As Integer = GetPrivateProfileInt("Compo", "Count", 0, m_MainWindow.GetIniFile())
|
|
||||||
' ' Calcolo indici a seconda della pagina in cui sono
|
|
||||||
' If m_bIsFirstPage Then
|
|
||||||
' ClearButton(nCompoNumber)
|
|
||||||
' nDeltaSecondPage = 0
|
|
||||||
' Else
|
|
||||||
' ClearButton(nCompoNumber)
|
|
||||||
' nDeltaSecondPage = 8
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' ' Creazione converter da String a ImageSource
|
|
||||||
' Dim ImageConverter As New ImageSourceConverter
|
|
||||||
' Dim ThicknessConverter As New ThicknessConverter
|
|
||||||
|
|
||||||
' 'Assegnazione immagine e testo ai Button
|
|
||||||
' For index As Integer = 1 To 8
|
|
||||||
' Dim CustomThickness As New Thickness(0)
|
|
||||||
' Dim nCompoName As Integer = GetPrivateProfileInt("Compo" & index + nDeltaSecondPage, "Name", 0, m_MainWindow.GetIniFile())
|
|
||||||
' Dim sCompoImage As String = ""
|
|
||||||
' Dim sCompoImageSource As ImageSource
|
|
||||||
|
|
||||||
' 'verifico presenza immagine e la aggiungo
|
|
||||||
' If GetPrivateProfileString("Compo" & index + nDeltaSecondPage, "Image", "", sCompoImage, m_MainWindow.GetIniFile()) <> 0 Then
|
|
||||||
' Try
|
|
||||||
' sCompoImageSource = ImageConverter.ConvertFromString(m_MainWindow.GetResourcesDir() & "\" & sCompoImage)
|
|
||||||
' GetImage(index).Height = 65
|
|
||||||
' GetImage(index).Width = 65
|
|
||||||
' GetImage(index).Source = sCompoImageSource
|
|
||||||
' Catch ex As Exception
|
|
||||||
' EgtOutLog("Error loading image " & sCompoImage)
|
|
||||||
' sCompoImage = String.Empty
|
|
||||||
' GetImage(index).Height = 0
|
|
||||||
' GetImage(index).Width = 0
|
|
||||||
' CustomThickness.Right = 0
|
|
||||||
' GetImage(index).Margin = CustomThickness
|
|
||||||
' End Try
|
|
||||||
' Else
|
|
||||||
' 'Se non c'è l'immagine azzero la distanza tra testo e immagine
|
|
||||||
' CustomThickness.Right = 0
|
|
||||||
' GetImage(index).Margin = CustomThickness
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'verifico presenza testo
|
|
||||||
' If nCompoName > 0 Then
|
|
||||||
' Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
|
||||||
' 'verifico presenza immagine
|
|
||||||
' If sCompoImage.Length > 0 Then
|
|
||||||
' 'se la lunghezza del testo è maggiore di 15 lo taglio
|
|
||||||
' If sCompoName.Length > 15 Then
|
|
||||||
' sCompoName = sCompoName.Substring(0, 15)
|
|
||||||
' End If
|
|
||||||
' GetLabel(index).Text = sCompoName
|
|
||||||
' 'Se ci sono sia testo che immagine imposto un margine di 10
|
|
||||||
' CustomThickness.Right = 10
|
|
||||||
' GetImage(index).Margin = CustomThickness
|
|
||||||
' Else
|
|
||||||
' 'se l'immagine non c'è e il testo è maggiore di 20 lo taglio
|
|
||||||
' If sCompoName.Length > 20 Then
|
|
||||||
' sCompoName = sCompoName.Substring(0, 20)
|
|
||||||
' End If
|
|
||||||
' GetLabel(index).Text = sCompoName
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' 'Se non c'è testo azzero la distanza tra testo e immagine
|
|
||||||
' CustomThickness.Right = 0
|
|
||||||
' GetImage(index).Margin = CustomThickness
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Next
|
|
||||||
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'' Gestione bottone altri componenti
|
|
||||||
'Private Sub Compo9_Click(sender As Object, e As RoutedEventArgs) Handles Compo9.Click
|
|
||||||
' If m_bIsFirstPage Then
|
|
||||||
' m_bIsFirstPage = False
|
|
||||||
' LoadPage()
|
|
||||||
' 'Compo9.SetValue(Grid.ColumnProperty, 1)
|
|
||||||
' 'Compo9.SetValue(Grid.ColumnSpanProperty, 1)
|
|
||||||
' 'ImageCompo9.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NumericKeyboardArrow.png", UriKind.Relative))
|
|
||||||
' 'ImageCompo9.Visibility = Windows.Visibility.Visible
|
|
||||||
' 'LabelCompo9.Visibility = Windows.Visibility.Hidden
|
|
||||||
' Compo9.SetValue(Grid.ColumnProperty, 0)
|
|
||||||
' Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
|
||||||
' ImageCompo9.Visibility = Windows.Visibility.Hidden
|
|
||||||
' LabelCompo9.Visibility = Windows.Visibility.Visible
|
|
||||||
' Else
|
|
||||||
' m_bIsFirstPage = True
|
|
||||||
' LoadPage()
|
|
||||||
' Compo9.SetValue(Grid.ColumnProperty, 0)
|
|
||||||
' Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
|
||||||
' ImageCompo9.Visibility = Windows.Visibility.Hidden
|
|
||||||
' LabelCompo9.Visibility = Windows.Visibility.Visible
|
|
||||||
' End If
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+142
-90
@@ -7,133 +7,185 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
|
|
||||||
<!-- Definizione della Grid FlatteningCut -->
|
<!-- Definizione della Grid FlatteningCut -->
|
||||||
<Grid Name="FlatteningCutGrid" >
|
<Grid Name="FlatteningCutGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
</Grid>
|
||||||
<ComboBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ComboBox.ItemTemplate>
|
|
||||||
</ComboBox>
|
|
||||||
|
|
||||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
|
||||||
|
<ScrollViewer VerticalScrollBarVisibility="Visible" Visibility="Visible"
|
||||||
|
Grid.Row="1" Grid.RowSpan="11" Grid.ColumnSpan="2">
|
||||||
|
|
||||||
|
<Grid Name="DatiTaglioGrid" >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.1"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="40"/>
|
||||||
|
<RowDefinition Height="0.1"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="WidthTxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="WidthTxBl" Grid.Column="0" Grid.Row="5"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="OverlapTxBl" Grid.Column="0" Grid.Row="6"
|
<TextBlock Name="OverlapTxBl" Grid.Column="0" Grid.Row="6"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="ZReleasedTxBl" Grid.Column="0" Grid.Row="7"
|
<TextBlock Name="ZReleasedTxBl" Grid.Column="0" Grid.Row="7"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ZReleasedTxBx" Grid.Column="1" Grid.Row="7" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="ZReleasedTxBx" Grid.Column="1" Grid.Row="7" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="SideTxBl" Grid.Row="8" Grid.ColumnSpan="2"
|
<TextBlock Name="SideTxBl" Grid.Row="8" Grid.ColumnSpan="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<CheckBox Name="SideChBx" Grid.Row="8" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="SideChBx" Grid.Row="8" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
|
|
||||||
<ComboBox Name="TypeCmBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
<ComboBox Name="TypeCmBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="RotLockTxBl" Grid.Row="10" Grid.ColumnSpan="2"
|
<TextBlock Name="RotLockTxBl" Grid.Row="10" Grid.ColumnSpan="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<CheckBox Name="RotLockChBx" Grid.Row="10" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="RotLockChBx" Grid.Row="10" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
|
|
||||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
<TextBlock Name="ChainedPathTxBl" Grid.Row="11" Grid.ColumnSpan="2"
|
||||||
<Grid.ColumnDefinitions>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<CheckBox Name="ChainedPathChBx" Grid.Row="11" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
<ColumnDefinition Width="1*"/>
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
<ComboBox Name="SelToolCmBx" Grid.Row="12" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||||
</Grid.ColumnDefinitions>
|
<ComboBox.ItemTemplate>
|
||||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
<Grid Grid.Row="13" Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Grid.Row="12" Grid.ColumnSpan="2">
|
</Grid>
|
||||||
<Grid.ColumnDefinitions>
|
</ScrollViewer>
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Grid Grid.Row="12" Grid.ColumnSpan="2">
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Grid.ColumnDefinitions>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<ColumnDefinition Width="1*"/>
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Button>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
</Grid>
|
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
Imports EgtUILib
|
Imports System.Reflection
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
|
||||||
Public Class FlatteningCut
|
Public Class FlatteningCut
|
||||||
|
|
||||||
@@ -35,14 +37,18 @@ Public Class FlatteningCut
|
|||||||
Private m_bHeadSide As Boolean = False
|
Private m_bHeadSide As Boolean = False
|
||||||
Private m_nMachType As Integer = 1
|
Private m_nMachType As Integer = 1
|
||||||
Private m_bRotLock As Boolean = False
|
Private m_bRotLock As Boolean = False
|
||||||
|
Private m_bChainedPath As Boolean = True
|
||||||
|
Private m_nTool As Integer = 0
|
||||||
' Array delle modalità di acquisizione dei punti
|
' Array delle modalità di acquisizione dei punti
|
||||||
Private m_PointsModeArray(2) As String
|
Private m_PointsModeArray(2) As String
|
||||||
' Array delle tipologia di lavorazione della spianatura
|
' Array delle tipologia di lavorazione della spianatura
|
||||||
Private m_TypeArray(1) As String
|
Private m_TypeArray(2) As String
|
||||||
' Punto selezionato nel disegno
|
' Punto selezionato nel disegno
|
||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
' Layer per crocette temporanee
|
' Layer per crocette temporanee
|
||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
|
' Array degliutensili disponibili (lama e fresa)
|
||||||
|
Private m_ToolsArray(1) As String
|
||||||
|
|
||||||
' Costanti
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||||
@@ -57,8 +63,9 @@ Public Class FlatteningCut
|
|||||||
End Enum
|
End Enum
|
||||||
' Costanti che indicano la tipologia di lavorazione della spianatura
|
' Costanti che indicano la tipologia di lavorazione della spianatura
|
||||||
Private Enum MACH_TYPE As Integer
|
Private Enum MACH_TYPE As Integer
|
||||||
ONEWAY = 0
|
ZIGZAG = 0
|
||||||
ZIGZAG = 1
|
ONEWAY = 1
|
||||||
|
SPIRAL = 2
|
||||||
End Enum
|
End Enum
|
||||||
'Costante che indica il lato in cui posizionare i tagli
|
'Costante che indica il lato in cui posizionare i tagli
|
||||||
Private Enum CutSide As Integer
|
Private Enum CutSide As Integer
|
||||||
@@ -66,6 +73,12 @@ Public Class FlatteningCut
|
|||||||
Right
|
Right
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
Private Enum TOOL As Integer
|
||||||
|
SAW = 0
|
||||||
|
MILL = 1
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' Per abilitare la spianatura con la FRESA deve essere imposatato a TRUE il flag "Usa Fresa" nella pagina MACCHINA (campo INCISIONI)
|
||||||
Private Sub FlatteningCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub FlatteningCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||||
@@ -74,13 +87,14 @@ Public Class FlatteningCut
|
|||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' Creo lista tipo lavorazione
|
' Creo lista tipo lavorazione
|
||||||
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(MSG_COMBOBOXPARAM + 39)
|
|
||||||
m_TypeArray(MACH_TYPE.ZIGZAG) = EgtMsg(MSG_COMBOBOXPARAM + 38)
|
m_TypeArray(MACH_TYPE.ZIGZAG) = EgtMsg(MSG_COMBOBOXPARAM + 38)
|
||||||
|
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(MSG_COMBOBOXPARAM + 39)
|
||||||
|
m_TypeArray(MACH_TYPE.SPIRAL) = EgtMsg(MSG_COMBOBOXPARAM + 51)
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
TypeCmBx.ItemsSource = m_TypeArray
|
TypeCmBx.ItemsSource = m_TypeArray
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||||
@@ -89,19 +103,26 @@ Public Class FlatteningCut
|
|||||||
ZReleasedTxBl.Text = "Z Svincolo"
|
ZReleasedTxBl.Text = "Z Svincolo"
|
||||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||||
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
||||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
ChainedPathTxBl.Text = "Chained path"
|
||||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||||
|
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||||
|
' tipo di utensile in uso per la lavorazione
|
||||||
|
m_ToolsArray(TOOL.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||||
|
m_ToolsArray(TOOL.MILL) = "Mill"
|
||||||
|
SelToolCmBx.ItemsSource = m_ToolsArray
|
||||||
' Carico i dati dell'ultimo taglio
|
' Carico i dati dell'ultimo taglio
|
||||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
m_dLen = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||||
m_dWid = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_WIDTH, m_dWid, m_MainWindow.GetIniFile())
|
m_dWid = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_WIDTH, m_dWid, m_MainWindow.GetIniFile())
|
||||||
m_dOverlap = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, m_dOverlap, m_MainWindow.GetIniFile())
|
m_dOverlap = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, m_dOverlap, m_MainWindow.GetIniFile())
|
||||||
m_dZReleased = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, m_dZReleased, m_MainWindow.GetIniFile())
|
m_dZReleased = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, m_dZReleased, m_MainWindow.GetIniFile())
|
||||||
m_bHeadSide = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_bHeadSide = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
m_nMachType = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType, m_MainWindow.GetIniFile())
|
m_nMachType = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType, m_MainWindow.GetIniFile())
|
||||||
m_bRotLock = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_bRotLock = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
m_bChainedPath = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLAT_CHAINEDPATH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
m_nTool = GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile())
|
||||||
|
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||||
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -124,16 +145,16 @@ Public Class FlatteningCut
|
|||||||
' Disabilito registrazione progetto modificato
|
' Disabilito registrazione progetto modificato
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
' Creo layer temporaneo per crocette
|
' Creo layer temporaneo per crocette
|
||||||
m_nTempLay = EgtCreateGroup( GDB_ID.ROOT)
|
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
EgtSetLevel( m_nTempLay, GDB_LV.TEMP)
|
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||||
' Origine tavola
|
' Origine tavola
|
||||||
m_bRawOk = True
|
m_bRawOk = True
|
||||||
If Not EgtGetTableRef( 1, m_ptTabOri) Then
|
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||||
m_bRawOk = False
|
m_bRawOk = False
|
||||||
EgtOutLog("Error on TableRef1")
|
EgtOutLog("Error on TableRef1")
|
||||||
End If
|
End If
|
||||||
' Dati del grezzo
|
' Dati del grezzo
|
||||||
If Not GetRawBox( m_ptRawMin, m_ptRawMax) Then
|
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
|
||||||
m_bRawOk = False
|
m_bRawOk = False
|
||||||
EgtOutLog("Error on RawBox")
|
EgtOutLog("Error on RawBox")
|
||||||
End If
|
End If
|
||||||
@@ -141,7 +162,7 @@ Public Class FlatteningCut
|
|||||||
m_bPointP1Ok = False
|
m_bPointP1Ok = False
|
||||||
m_bPointP2Ok = False
|
m_bPointP2Ok = False
|
||||||
' Inizializzo primo punto acquisito dal disegno
|
' Inizializzo primo punto acquisito dal disegno
|
||||||
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
|
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||||
m_ptPrev.z = m_ptRawMax.z
|
m_ptPrev.z = m_ptRawMax.z
|
||||||
' Disegno crocetta che indica il punto acquisito
|
' Disegno crocetta che indica il punto acquisito
|
||||||
CreateCross(m_nTempLay, m_ptPrev)
|
CreateCross(m_nTempLay, m_ptPrev)
|
||||||
@@ -150,10 +171,10 @@ Public Class FlatteningCut
|
|||||||
SetCoordVisibility(True)
|
SetCoordVisibility(True)
|
||||||
ShowCoord()
|
ShowCoord()
|
||||||
' Assegno parametri di lavorazione già definiti
|
' Assegno parametri di lavorazione già definiti
|
||||||
DepthTxBx.Text = LenToString( m_dDepth, 1)
|
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||||
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
LenghtTxBx.Text = LenToString( m_dLen, 1)
|
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||||
WidthTxBx.Text = LenToString( m_dWid, 2)
|
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||||
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
|
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
|
||||||
ZReleasedTxBx.Text = LenToString(m_dZReleased, 2)
|
ZReleasedTxBx.Text = LenToString(m_dZReleased, 2)
|
||||||
' carico la quota di svincolo per la spianatura
|
' carico la quota di svincolo per la spianatura
|
||||||
@@ -162,6 +183,9 @@ Public Class FlatteningCut
|
|||||||
SideChBx.IsChecked = m_bHeadSide
|
SideChBx.IsChecked = m_bHeadSide
|
||||||
TypeCmBx.SelectedIndex = m_nMachType
|
TypeCmBx.SelectedIndex = m_nMachType
|
||||||
RotLockChBx.IsChecked = m_bRotLock
|
RotLockChBx.IsChecked = m_bRotLock
|
||||||
|
ChainedPathChBx.IsChecked = m_bChainedPath
|
||||||
|
' Assegno l'utensile in definito in macchina per la fresatura
|
||||||
|
SelToolCmBx.SelectedIndex = m_nTool
|
||||||
' Reset taglio e disabilito bottone esecuzione
|
' Reset taglio e disabilito bottone esecuzione
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
@@ -175,21 +199,24 @@ Public Class FlatteningCut
|
|||||||
|
|
||||||
Friend Sub FlatteningCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Friend Sub FlatteningCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
' Salvo i dati correnti
|
' Salvo i dati correnti
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_LENGTH, DoubleToString( m_dLen, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_LENGTH, DoubleToString(m_dLen, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_WIDTH, DoubleToString( m_dWid, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_WIDTH, DoubleToString(m_dWid, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_OVERLAP, DoubleToString(m_dOverlap, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, DoubleToString(m_dOverlap, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, DoubleToString(m_dZReleased, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, DoubleToString(m_dZReleased, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, If( m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, If(m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType.ToString(), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType.ToString(), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If( m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If(m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString( m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
|
' imposto la Z di sicurezza corretta
|
||||||
|
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||||
|
EgtMdbSave()
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||||
' Rimuovo layer temporaneo per crocette
|
' Rimuovo layer temporaneo per crocette
|
||||||
EgtErase(m_nTempLay)
|
EgtErase(m_nTempLay)
|
||||||
' Rimuovo eventuale pezzo per taglio diretto
|
' Rimuovo eventuale pezzo per taglio diretto
|
||||||
@@ -264,30 +291,43 @@ Public Class FlatteningCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
' Ricavo dati lama corrente
|
||||||
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
' Ricavo dati lama corrente
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -297,15 +337,13 @@ Public Class FlatteningCut
|
|||||||
m_dAngO = dTAngO + 90
|
m_dAngO = dTAngO + 90
|
||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
|
|
||||||
' Altrimenti da disegno
|
' Altrimenti da disegno
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
m_ptTipP1 = m_ptPrev
|
m_ptTipP1 = m_ptPrev
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
End If
|
End If
|
||||||
@@ -335,27 +373,40 @@ Public Class FlatteningCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
' Ricavo dati lama corrente
|
||||||
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
' Ricavo dati lama corrente
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
||||||
@@ -363,15 +414,13 @@ Public Class FlatteningCut
|
|||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
|
|
||||||
' Altrimenti da disegno
|
' Altrimenti da disegno
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||||
m_ptTipP2 = m_ptPrev
|
m_ptTipP2 = m_ptPrev
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
End If
|
End If
|
||||||
@@ -405,7 +454,7 @@ Public Class FlatteningCut
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -444,8 +493,8 @@ Public Class FlatteningCut
|
|||||||
StringToLen(WidthTxBx.Text, dWidth)
|
StringToLen(WidthTxBx.Text, dWidth)
|
||||||
' Recupero lo spessore della lama corrente
|
' Recupero lo spessore della lama corrente
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = GetFootPrintTool()
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
' La larghezza della spianatura nono può essere inferiore allo spessore della lama
|
' La larghezza della spianatura nono può essere inferiore allo spessore della lama
|
||||||
m_dWid = Math.Max(dWidth, dThick)
|
m_dWid = Math.Max(dWidth, dThick)
|
||||||
WidthTxBx.Text = LenToString(m_dWid, 2)
|
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||||
@@ -472,8 +521,8 @@ Public Class FlatteningCut
|
|||||||
|
|
||||||
Private Sub OverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OverlapTxBx.EgtClosed
|
Private Sub OverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OverlapTxBx.EgtClosed
|
||||||
' Recupero spessore della lama correntemente attiva
|
' Recupero spessore della lama correntemente attiva
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = GetFootPrintTool()
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
|
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
|
||||||
Dim dOverlap As Double = 0
|
Dim dOverlap As Double = 0
|
||||||
Const MIN_OFFSET As Double = 1.0
|
Const MIN_OFFSET As Double = 1.0
|
||||||
@@ -520,6 +569,16 @@ Public Class FlatteningCut
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SelToolCmBx_SelectionChanged(sender As Object, e As EventArgs) Handles SelToolCmBx.SelectionChanged
|
||||||
|
m_nTool = SelToolCmBx.SelectedIndex
|
||||||
|
' Disabilito il concatenamento
|
||||||
|
ChainedPathChBx.IsEnabled = (m_nTool = TOOL.MILL)
|
||||||
|
' Disegno il taglio
|
||||||
|
CreateFlatteningCut()
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub RotLockChBx_Click(sender As Object, e As EventArgs) Handles RotLockChBx.Click
|
Private Sub RotLockChBx_Click(sender As Object, e As EventArgs) Handles RotLockChBx.Click
|
||||||
m_bRotLock = RotLockChBx.IsChecked
|
m_bRotLock = RotLockChBx.IsChecked
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -528,6 +587,14 @@ Public Class FlatteningCut
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ChainedPathChBx_Click(sender As Object, e As EventArgs) Handles ChainedPathChBx.Click
|
||||||
|
m_bChainedPath = ChainedPathChBx.IsChecked
|
||||||
|
' Disegno il taglio
|
||||||
|
CreateFlatteningCut()
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||||
' Recupero il valore della coordinata (in 0 Tab)
|
' Recupero il valore della coordinata (in 0 Tab)
|
||||||
Dim dXcoord As Double = 0
|
Dim dXcoord As Double = 0
|
||||||
@@ -567,6 +634,7 @@ Public Class FlatteningCut
|
|||||||
m_bSimul = True
|
m_bSimul = True
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||||
@@ -578,9 +646,9 @@ Public Class FlatteningCut
|
|||||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||||
#Else
|
#Else
|
||||||
' Verifico non sia versione Ufficio
|
' Verifico non sia versione Ufficio
|
||||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico ci sia un taglio valido
|
' Verifico ci sia un taglio valido
|
||||||
If Not m_bCutOk Then Return
|
If Not m_bCutOk Then Return
|
||||||
@@ -595,13 +663,15 @@ Public Class FlatteningCut
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -609,9 +679,30 @@ Public Class FlatteningCut
|
|||||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||||
EgtMdbSave()
|
EgtMdbSave()
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
||||||
|
Private Function GetFootPrintTool() As Double
|
||||||
|
' vedere nella pagina Allarm il capito "Incisioni"
|
||||||
|
Dim bForceUseMill As Boolean = (m_nTool = TOOL.MILL)
|
||||||
|
Dim dFootPrint As Double = 0
|
||||||
|
' verifico quale lavorazione è attiva
|
||||||
|
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) AndAlso Not bForceUseMill Then
|
||||||
|
Dim bSetTool As Boolean = EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||||
|
If Not bSetTool Then EgtOutLog("Erro nel settaggio utensile lama " & m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
||||||
|
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
||||||
|
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||||
|
'GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||||
|
GetMillFromMilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||||
|
' recupero informazioni della fresa in uso
|
||||||
|
EgtTdbSetCurrTool(sCurrMill)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
|
||||||
|
End If
|
||||||
|
Return dFootPrint
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Function CreateFlatteningCut() As Boolean
|
Private Function CreateFlatteningCut() As Boolean
|
||||||
' Verifico sia definito il punto iniziale e il grezzo
|
' Verifico sia definito il punto iniziale e il grezzo
|
||||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||||
@@ -628,20 +719,30 @@ Public Class FlatteningCut
|
|||||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
EgtSetName(nPartId, NAME_DIRECTCUT)
|
||||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
Dim nLayerId = EgtCreateGroup(nPartId)
|
||||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
' EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
|
EgtSetName(nLayerId, NAME_ONPATH)
|
||||||
' Creo il taglio
|
' Creo il taglio
|
||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
ptStart.z = 0
|
ptStart.z = 0
|
||||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||||
|
EgtSetInfo(nCutId, INFO_DIRECTCUT, 1)
|
||||||
' Imposto affondamento e angolo di fianco sul taglio
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||||
|
If (m_nTool = TOOL.MILL) Then
|
||||||
|
EgtSetInfo(nCutId, INFO_WIDTH, GetFootPrintTool)
|
||||||
|
End If
|
||||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
||||||
' Imposto prima direzione
|
' Imposto prima direzione
|
||||||
EgtSetInfo(nCutId, INFO_DIR, 1)
|
EgtSetInfo(nCutId, INFO_DIR, 1)
|
||||||
|
' Imposto se iniziare la fresatura dal punto indicato
|
||||||
|
Dim bReducePath As Boolean = Not GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||||
|
If Not bReducePath Then EgtSetInfo(nCutId, INFO_STRICT, 0)
|
||||||
|
|
||||||
' Eventuale bloccaggio rotazione asse C tra le passate
|
' Eventuale bloccaggio rotazione asse C tra le passate
|
||||||
If RotLockChBx.IsChecked Then
|
If RotLockChBx.IsChecked Then
|
||||||
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
||||||
End If
|
End If
|
||||||
|
EgtSetInfo(nCutId, INFO_STEP_TYPE, m_nMachType)
|
||||||
' Funzione che crea i tagli successivi al primo
|
' Funzione che crea i tagli successivi al primo
|
||||||
MultiplyCut(nLayerId, nCutId)
|
MultiplyCut(nLayerId, nCutId)
|
||||||
' Creo layer per crocetta di riferimento
|
' Creo layer per crocetta di riferimento
|
||||||
@@ -670,22 +771,28 @@ Public Class FlatteningCut
|
|||||||
RemoveFinalHome()
|
RemoveFinalHome()
|
||||||
End If
|
End If
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Return m_bCutOk
|
Return m_bCutOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
||||||
' Recupero spessore della lama correntemente attiva
|
Dim bEngWithMill As Boolean = (m_nTool = TOOL.MILL)
|
||||||
Dim dThick As Double = 0
|
Dim bReducePath As Boolean = Not GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
|
||||||
|
' Recupero spessore della lama (utensile) correntemente attiva
|
||||||
|
Dim dThick As Double = GetFootPrintTool()
|
||||||
|
If dThick = 0 Then Return False
|
||||||
|
|
||||||
|
' Salvo la prima curva nella lista dei percorsi da concatenare
|
||||||
|
Dim CutsList As New List(Of Integer)
|
||||||
|
CutsList.Add(nCutId)
|
||||||
|
|
||||||
' Imposto angolo di rotazione a seconda del lato dei tagli
|
' Imposto angolo di rotazione a seconda del lato dei tagli
|
||||||
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
||||||
' Definisco vettore di spostamento
|
' Definisco vettore di spostamento
|
||||||
Dim vtDelta As Vector3d
|
Dim vtDelta As Vector3d
|
||||||
vtDelta = Vector3d.FromPolar(1, m_dAngO)
|
vtDelta = Vector3d.FromPolar(1, m_dAngO)
|
||||||
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
|
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
|
||||||
|
|
||||||
' Calcolo numero di iterazioni necessarie a coprire l'area impostata e lunghezza vettore delta
|
' Calcolo numero di iterazioni necessarie a coprire l'area impostata e lunghezza vettore delta
|
||||||
Dim nStepNum As Integer
|
Dim nStepNum As Integer
|
||||||
Dim dDelta As Double
|
Dim dDelta As Double
|
||||||
@@ -696,6 +803,10 @@ Public Class FlatteningCut
|
|||||||
If nStepNum > 1 Then
|
If nStepNum > 1 Then
|
||||||
dDelta = dWidth / (nStepNum - 1)
|
dDelta = dWidth / (nStepNum - 1)
|
||||||
End If
|
End If
|
||||||
|
' definisco la larghezza dell'utensile (solo per la fresa)
|
||||||
|
EgtSetInfo(nCutId, INFO_WIDTH, dThick)
|
||||||
|
' definisco il tipo di utensile da utilizzare
|
||||||
|
EgtSetInfo(nCutId, "EngravingWithMill", m_nTool)
|
||||||
' Creo vettore delta
|
' Creo vettore delta
|
||||||
vtDelta *= dDelta
|
vtDelta *= dDelta
|
||||||
' Creo indice per impostare info che indica tipologia di spianatura
|
' Creo indice per impostare info che indica tipologia di spianatura
|
||||||
@@ -704,6 +815,8 @@ Public Class FlatteningCut
|
|||||||
Dim vtPerpMove As Vector3d = Index * vtDelta
|
Dim vtPerpMove As Vector3d = Index * vtDelta
|
||||||
' Creo copie
|
' Creo copie
|
||||||
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
|
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
|
||||||
|
EgtSetInfo(nCut2Id, INFO_WIDTH, dThick)
|
||||||
|
EgtSetInfo(nCutId, "EngravingWithMill", m_nTool)
|
||||||
' Assegno info direzione a seconda del tipo di spianatura
|
' Assegno info direzione a seconda del tipo di spianatura
|
||||||
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG Then
|
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG Then
|
||||||
If nTypeIndex = 1 Then
|
If nTypeIndex = 1 Then
|
||||||
@@ -717,10 +830,77 @@ Public Class FlatteningCut
|
|||||||
EgtSetInfo(nCut2Id, INFO_DIR, 1)
|
EgtSetInfo(nCut2Id, INFO_DIR, 1)
|
||||||
End If
|
End If
|
||||||
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
||||||
|
|
||||||
|
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
|
||||||
|
If m_bChainedPath And bEngWithMill Then
|
||||||
|
If bReducePath Then
|
||||||
|
If Index < nStepNum - 1 Then
|
||||||
|
ExtendLenghtMillPath(nCut2Id, -dThick / 2)
|
||||||
|
ElseIf Index = nStepNum - 1 Then
|
||||||
|
If nStepNum Mod 2 = 0 Then
|
||||||
|
ExtendLenghtMillPath(nCut2Id, -dThick / 2, False, True)
|
||||||
|
Else
|
||||||
|
ExtendLenghtMillPath(nCut2Id, -dThick / 2, True, False)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
CutsList.Add(nCut2Id)
|
||||||
|
End If
|
||||||
|
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' ----------------------- CREO UN UNICO PERCORSO CONCATENATO -----------------------
|
||||||
|
If m_bChainedPath And bEngWithMill Then
|
||||||
|
' Decidere se accorciare i tagli del valore del raggio utensile!
|
||||||
|
If bReducePath Then
|
||||||
|
ExtendLenghtMillPath(CutsList(0), -dThick / 2, False, True)
|
||||||
|
End If
|
||||||
|
For Index As Integer = 0 To CutsList.Count - 2
|
||||||
|
If Index Mod 2 <> 0 Then
|
||||||
|
' Costruisco la linea di collegamento tra due curve adiacenti
|
||||||
|
Dim PtStart_1 As Point3d
|
||||||
|
EgtStartPoint(CutsList(Index), GDB_RT.GLOB, PtStart_1)
|
||||||
|
Dim PtStart_2 As Point3d
|
||||||
|
EgtStartPoint(CutsList(Index + 1), GDB_RT.GLOB, PtStart_2)
|
||||||
|
CutsList.Add(EgtCreateLine(nLayerId, PtStart_1, PtStart_2))
|
||||||
|
Else
|
||||||
|
' Costruisco la linea di collegamento tra due curve adiacenti
|
||||||
|
Dim PtStart_1 As Point3d
|
||||||
|
EgtEndPoint(CutsList(Index), GDB_RT.GLOB, PtStart_1)
|
||||||
|
Dim PtStart_2 As Point3d
|
||||||
|
EgtEndPoint(CutsList(Index + 1), GDB_RT.GLOB, PtStart_2)
|
||||||
|
CutsList.Add(EgtCreateLine(nLayerId, PtStart_1, PtStart_2))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim ptNear As Point3d
|
||||||
|
EgtStartPoint(CutsList(0), ptNear)
|
||||||
|
Dim IdJointCurv As Integer = EgtCreateCurveCompoByChain(nLayerId, CutsList.ToArray, ptNear, True)
|
||||||
|
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, 1)
|
||||||
|
EgtSetInfo(IdJointCurv, INFO_STEP_TYPE, m_nMachType)
|
||||||
|
EgtSetInfo(IdJointCurv, INFO_WIDTH, dThick)
|
||||||
|
' Se unisco il percorso devo per forza usare la fresa!
|
||||||
|
EgtSetInfo(IdJointCurv, "EngravingWithMill", 1)
|
||||||
|
If Not bReducePath Then EgtSetInfo(IdJointCurv, INFO_STRICT, 0)
|
||||||
|
End If
|
||||||
|
' ----------------------- CREO UN UNICO PERCORSO CONCATENATO -----------------------
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub ExtendLenghtMillPath(ByVal IdCurv As Integer, ByVal ReduceVal As Double,
|
||||||
|
ByVal Optional bStart As Boolean = True, ByVal Optional bEnd As Boolean = True)
|
||||||
|
Dim PtStart As Point3d
|
||||||
|
EgtStartPoint(IdCurv, GDB_RT.GLOB, PtStart)
|
||||||
|
Dim PtEnd As Point3d
|
||||||
|
EgtEndPoint(IdCurv, GDB_RT.GLOB, PtEnd)
|
||||||
|
If bStart Then EgtTrimExtendCurveByLen(IdCurv, ReduceVal, PtStart, GDB_RT.GLOB)
|
||||||
|
If bEnd Then EgtTrimExtendCurveByLen(IdCurv, ReduceVal, PtEnd, GDB_RT.GLOB)
|
||||||
|
Dim dLenLine As Double
|
||||||
|
EgtCurveLength(IdCurv, dLenLine)
|
||||||
|
EgtOutLog("Lunghezza segmento ridotto: " & dLenLine.ToString)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||||
' Aggiungo crocette
|
' Aggiungo crocette
|
||||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||||
|
|||||||
+23
-15
@@ -34,12 +34,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||||
Margin="6,0,6,0">
|
Margin="6,0,6,0">
|
||||||
@@ -57,12 +61,12 @@
|
|||||||
|
|
||||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||||
@@ -85,7 +89,7 @@
|
|||||||
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
|
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||||
@@ -95,7 +99,7 @@
|
|||||||
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
|
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||||
@@ -131,12 +135,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
</Button>
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
</Button>
|
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Grid>
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
+104
-32
@@ -38,6 +38,8 @@ Public Class GridCut
|
|||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
' Layer per crocette temporanee
|
' Layer per crocette temporanee
|
||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
|
' Gestione spessore lama
|
||||||
|
Private m_bSawTh As Boolean = False
|
||||||
|
|
||||||
' Costanti
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||||
@@ -63,8 +65,8 @@ Public Class GridCut
|
|||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||||
@@ -73,8 +75,8 @@ Public Class GridCut
|
|||||||
NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21)
|
NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21)
|
||||||
DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22)
|
DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22)
|
||||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||||
' Carico i dati dell'ultimo taglio
|
' Carico i dati dell'ultimo taglio
|
||||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||||
@@ -82,7 +84,12 @@ Public Class GridCut
|
|||||||
m_nNumX = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
|
m_nNumX = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
|
||||||
m_dDimX = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
m_dDimX = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||||
m_nNumY = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
|
m_nNumY = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
|
||||||
m_dDimY = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
|
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
|
||||||
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||||
@@ -141,6 +148,11 @@ Public Class GridCut
|
|||||||
NumPzYTxBx.Text = m_nNumY.ToString()
|
NumPzYTxBx.Text = m_nNumY.ToString()
|
||||||
DimPzYTxBx.Text = LenToString( m_dDimY, 1)
|
DimPzYTxBx.Text = LenToString( m_dDimY, 1)
|
||||||
SideChBx.IsChecked = m_bHeadSide
|
SideChBx.IsChecked = m_bHeadSide
|
||||||
|
|
||||||
|
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
|
||||||
' Reset taglio e disabilito bottone esecuzione
|
' Reset taglio e disabilito bottone esecuzione
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
@@ -152,6 +164,7 @@ Public Class GridCut
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Friend Sub GridCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Friend Sub GridCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
' Salvo i dati correnti
|
' Salvo i dati correnti
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||||
@@ -167,7 +180,7 @@ Public Class GridCut
|
|||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||||
' Rimuovo layer temporaneo per crocette
|
' Rimuovo layer temporaneo per crocette
|
||||||
EgtErase(m_nTempLay)
|
EgtErase(m_nTempLay)
|
||||||
' Rimuovo eventuale pezzo per taglio diretto
|
' Rimuovo eventuale pezzo per taglio diretto
|
||||||
@@ -185,6 +198,11 @@ Public Class GridCut
|
|||||||
m_bActive = False
|
m_bActive = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SetEnableParam(ByVal bIsSaw As Boolean)
|
||||||
|
' se macchina solo WaterJet Disabilito/Nascondo parametri della lama
|
||||||
|
DepthTxBx.IsEnabled = bIsSaw
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateSimulOkBtn()
|
Private Sub UpdateSimulOkBtn()
|
||||||
If m_bCutOk Then
|
If m_bCutOk Then
|
||||||
SimulBtn.IsEnabled = True
|
SimulBtn.IsEnabled = True
|
||||||
@@ -242,12 +260,31 @@ Public Class GridCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Recupero dati utensile e testa corrente
|
||||||
|
Dim sTool As String = ""
|
||||||
|
Dim sHead As String = ""
|
||||||
|
Dim nExit As Integer = 0
|
||||||
|
EgtGetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
|
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -255,18 +292,18 @@ Public Class GridCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -285,10 +322,8 @@ Public Class GridCut
|
|||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Ricavo dati lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Imposto la lama corrente
|
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -317,12 +352,31 @@ Public Class GridCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Recupero dati utensile e testa corrente
|
||||||
|
Dim sTool As String = ""
|
||||||
|
Dim sHead As String = ""
|
||||||
|
Dim nExit As Integer = 0
|
||||||
|
EgtGetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
|
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -330,18 +384,18 @@ Public Class GridCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -358,10 +412,8 @@ Public Class GridCut
|
|||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
' Ricavo dati lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Imposto la lama corrente
|
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||||
@@ -391,7 +443,7 @@ Public Class GridCut
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -480,6 +532,7 @@ Public Class GridCut
|
|||||||
m_bSimul = True
|
m_bSimul = True
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||||
@@ -508,19 +561,21 @@ Public Class GridCut
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreateGridCut() As Boolean
|
Private Function CreateGridCut() As Boolean
|
||||||
@@ -601,6 +656,15 @@ Public Class GridCut
|
|||||||
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||||
|
|
||||||
|
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
' Recupero spessore lama corrente
|
||||||
|
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
|
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
|
||||||
|
EgtOffsetCurve(nCutParaId, -dThick, OFF_TYPE.EXTEND)
|
||||||
|
End If
|
||||||
|
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
|
||||||
' Imposto affondamento e angolo di fianco sul taglio
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||||
@@ -619,6 +683,13 @@ Public Class GridCut
|
|||||||
' Arretro il punto di partenza di uno spessore lama
|
' Arretro il punto di partenza di uno spessore lama
|
||||||
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
||||||
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
|
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
|
||||||
|
|
||||||
|
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
|
||||||
|
EgtOffsetCurve(nCutPerpId, -dThick, OFF_TYPE.EXTEND)
|
||||||
|
End If
|
||||||
|
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
|
||||||
' Specchio se è attivo il flag che cambia lato di disegno
|
' Specchio se è attivo il flag che cambia lato di disegno
|
||||||
If SideChBx.IsChecked() Then
|
If SideChBx.IsChecked() Then
|
||||||
Dim vtRot As Vector3d = Vector3d.FromPolar(1, m_dAngO + 90)
|
Dim vtRot As Vector3d = Vector3d.FromPolar(1, m_dAngO + 90)
|
||||||
@@ -641,6 +712,7 @@ Public Class GridCut
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||||
|
ptP += New Vector3d(0, 0, 0.15)
|
||||||
' Aggiungo crocette
|
' Aggiungo crocette
|
||||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||||
Dim vtCrossY As New Vector3d(0, 20, 0)
|
Dim vtCrossY As New Vector3d(0, 20, 0)
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton1" Grid.Column="0" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton1" Grid.Column="0" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton1" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton1" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
@@ -61,6 +62,10 @@
|
|||||||
<Image Name="ImageButton10" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton10" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
<ToggleButton Name="MachineButton11" Grid.Column="10" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
|
<Image Name="ImageButton11" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -7,10 +7,13 @@ Public Class MachineButtonsUC
|
|||||||
Private m_DirectCutPage As DirectCutPageUC
|
Private m_DirectCutPage As DirectCutPageUC
|
||||||
Friend m_CN As CN_generico
|
Friend m_CN As CN_generico
|
||||||
|
|
||||||
|
Public nCountButton As Integer = 11
|
||||||
|
|
||||||
Private m_bOnlyLaser As Boolean = False
|
Private m_bOnlyLaser As Boolean = False
|
||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
Private Const MAX_BUTTONS As Integer = 10
|
' 9/2 aggiunto spazio per un nuovo bottone
|
||||||
|
Private Const MAX_BUTTONS As Integer = 11
|
||||||
Private m_nCount As Integer = 0
|
Private m_nCount As Integer = 0
|
||||||
Private ImageArrayY(MAX_BUTTONS - 1) As String
|
Private ImageArrayY(MAX_BUTTONS - 1) As String
|
||||||
Private ImageArrayN(MAX_BUTTONS - 1) As String
|
Private ImageArrayN(MAX_BUTTONS - 1) As String
|
||||||
@@ -31,6 +34,11 @@ Public Class MachineButtonsUC
|
|||||||
Private Const BTN_STATE_NOTHING As String = "Nothing"
|
Private Const BTN_STATE_NOTHING As String = "Nothing"
|
||||||
Private Const BTN_STATE_DOOR_OPENED As String = "DoorOpened"
|
Private Const BTN_STATE_DOOR_OPENED As String = "DoorOpened"
|
||||||
Private Const BTN_STATE_DOOR_CLOSED As String = "DoorClosed"
|
Private Const BTN_STATE_DOOR_CLOSED As String = "DoorClosed"
|
||||||
|
Private Const BTN_STATE_PARKING As String = "Parking"
|
||||||
|
Private Const BTN_STATE_HOME As String = "Home"
|
||||||
|
Private Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||||
|
Private Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||||
|
Private Const BTN_ENABLE_PC As String = "EnablePC"
|
||||||
|
|
||||||
Public Sub New(Optional bOnlyLaser As Boolean = False)
|
Public Sub New(Optional bOnlyLaser As Boolean = False)
|
||||||
' This call is required by the designer.
|
' This call is required by the designer.
|
||||||
@@ -71,11 +79,17 @@ Public Class MachineButtonsUC
|
|||||||
GetToggleButton(nIndex + 1).Visibility = Windows.Visibility.Hidden
|
GetToggleButton(nIndex + 1).Visibility = Windows.Visibility.Hidden
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' notifico nella variabile pubblica il numero di pulsanti inseriti nella barra
|
||||||
|
nCountButton = m_nCount
|
||||||
|
|
||||||
' Se variabile di stato "Nothing"/"DoorOpened"/"DoorClosed" imposto immagine fissa
|
' Se variabile di stato "Nothing"/"DoorOpened"/"DoorClosed" imposto immagine fissa
|
||||||
For nIndex As Integer = 0 To m_nCount - 1
|
For nIndex As Integer = 0 To m_nCount - 1
|
||||||
If StateFlagArray(nIndex) = BTN_STATE_NOTHING OrElse
|
If StateFlagArray(nIndex) = BTN_STATE_NOTHING OrElse
|
||||||
StateFlagArray(nIndex) = BTN_STATE_DOOR_OPENED OrElse
|
StateFlagArray(nIndex) = BTN_STATE_DOOR_OPENED OrElse
|
||||||
StateFlagArray(nIndex) = BTN_STATE_DOOR_CLOSED Then
|
StateFlagArray(nIndex) = BTN_STATE_DOOR_CLOSED OrElse
|
||||||
|
StateFlagArray(nIndex) = BTN_ENABLE_PC OrElse
|
||||||
|
StateFlagArray(nIndex) = BTN_ENABLE_ZONE_1 OrElse
|
||||||
|
StateFlagArray(nIndex) = BTN_ENABLE_ZONE_2 Then
|
||||||
' mostra immagine fissa
|
' mostra immagine fissa
|
||||||
Try
|
Try
|
||||||
Dim s As String
|
Dim s As String
|
||||||
@@ -121,6 +135,8 @@ Public Class MachineButtonsUC
|
|||||||
CurrToggleBtn.Content = "Z - C"
|
CurrToggleBtn.Content = "Z - C"
|
||||||
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
|
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
|
||||||
CurrToggleBtn.Content = "Z - B"
|
CurrToggleBtn.Content = "Z - B"
|
||||||
|
ElseIf StateFlagArray(nIndex) = K_REMOTE Then
|
||||||
|
CurrToggleBtn.Content = "Remote"
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
|
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
|
||||||
@@ -132,7 +148,8 @@ Public Class MachineButtonsUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MachineButton_Click(sender As Object, e As RoutedEventArgs) Handles MachineButton1.Click, MachineButton2.Click, MachineButton3.Click, MachineButton4.Click, MachineButton5.Click,
|
Private Sub MachineButton_Click(sender As Object, e As RoutedEventArgs) Handles MachineButton1.Click, MachineButton2.Click, MachineButton3.Click, MachineButton4.Click, MachineButton5.Click,
|
||||||
MachineButton6.Click, MachineButton7.Click, MachineButton8.Click, MachineButton9.Click, MachineButton10.Click
|
MachineButton6.Click, MachineButton7.Click, MachineButton8.Click, MachineButton9.Click, MachineButton10.Click,
|
||||||
|
MachineButton11.Click
|
||||||
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
||||||
' recupero l'inidce del bottone selezionato
|
' recupero l'inidce del bottone selezionato
|
||||||
Dim nIndex As Integer = GetToggleButtonIndex(CurrentBtn) - 1
|
Dim nIndex As Integer = GetToggleButtonIndex(CurrentBtn) - 1
|
||||||
@@ -151,6 +168,18 @@ Public Class MachineButtonsUC
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' Se il bottone chiamantè quello per la selezione del pannello di controllo
|
||||||
|
If nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_PC) Then
|
||||||
|
Dim sTLuaFile As String = sBaseDir & CommandArrayY(nIndex)
|
||||||
|
Dim sFLuaFile As String = sBaseDir & CommandArrayN(nIndex)
|
||||||
|
If m_CN.nEnablePc = 1 Then
|
||||||
|
ExecuteMDICommand(CurrentBtn, sTLuaFile)
|
||||||
|
ElseIf m_CN.nEnablePc = 2 Then
|
||||||
|
ExecuteMDICommand(CurrentBtn, sFLuaFile)
|
||||||
|
End If
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
If CurrentBtn.IsChecked() Then
|
If CurrentBtn.IsChecked() Then
|
||||||
'EgtLuaExecFile(sBaseDir & CommandArrayY(nIndex))
|
'EgtLuaExecFile(sBaseDir & CommandArrayY(nIndex))
|
||||||
sLuaFileName = sBaseDir & CommandArrayY(nIndex)
|
sLuaFileName = sBaseDir & CommandArrayY(nIndex)
|
||||||
@@ -244,9 +273,62 @@ Public Class MachineButtonsUC
|
|||||||
End If
|
End If
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
' CONTROLLO FANUC
|
||||||
|
Case 4
|
||||||
|
' ------------------------------------ FANUC ------------------------------------
|
||||||
|
' eventuale scrittura di linea di comando MDI
|
||||||
|
If Not String.IsNullOrEmpty(CmdString) Then
|
||||||
|
' attivo mpdalità MDI
|
||||||
|
m_CN.DGeneralFunctions_WriteCncMode(2)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
' salvo la stringa di comando ricevuta dal file lua
|
||||||
|
m_CN.sz_ManualDataInput = CmdString
|
||||||
|
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||||
|
m_CN.MDI_command()
|
||||||
|
End If
|
||||||
|
' attivo modalità AUTO
|
||||||
|
m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
If String.IsNullOrEmpty(EValue) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
m_CN.NC_pulse_bit(ENumber)
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If ENumber.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue As Boolean
|
||||||
|
If EValue.Trim = "1" Then bEValue = True
|
||||||
|
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
||||||
|
End If
|
||||||
|
' eventale caricamento seconda variabile
|
||||||
|
If String.IsNullOrEmpty(EValue2) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
m_CN.NC_pulse_bit(ENumber2)
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If ENumber2.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue2 As Boolean
|
||||||
|
If EValue2.Trim = "1" Then bEValue2 = True
|
||||||
|
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
||||||
|
End If
|
||||||
|
Return
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim nResult As Short
|
Dim nResult As Short
|
||||||
' Imposto modalità MDI per controlli num
|
' Imposto modalità MDI per controlli num
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||||
@@ -263,6 +345,8 @@ Public Class MachineButtonsUC
|
|||||||
m_CN.DGeneralFunctions_CycleStart()
|
m_CN.DGeneralFunctions_CycleStart()
|
||||||
Case 3
|
Case 3
|
||||||
'Per il siemens non devo fare nulla
|
'Per il siemens non devo fare nulla
|
||||||
|
Case 4
|
||||||
|
' Nicola: 27/03/2023 attivazione della funzione M# indicata?
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If b2Start Then
|
If b2Start Then
|
||||||
@@ -297,6 +381,17 @@ Public Class MachineButtonsUC
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
||||||
End If
|
End If
|
||||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
||||||
|
' versione 2.5e1
|
||||||
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||||
|
Dim sToolPos As String = String.Empty
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
||||||
|
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
||||||
|
End If
|
||||||
|
Dim dToolDiam As Double = 0
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
||||||
@@ -342,6 +437,7 @@ Public Class MachineButtonsUC
|
|||||||
" EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
|
" EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "STATE CHANGED"
|
||||||
|
|
||||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_SPINDLE)
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_SPINDLE)
|
||||||
@@ -548,7 +644,11 @@ Public Class MachineButtonsUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub DoorStateChanged(DoorState As Integer)
|
Friend Sub DoorStateChanged(DoorState As Integer)
|
||||||
' recupero le asscociazioni con i bottoni
|
If IsNothing(DoorState) Then
|
||||||
|
EgtOutLog("Error: door state null!")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' recupero le associazioni con i bottoni
|
||||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_OPENED)
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_OPENED)
|
||||||
If nIndex = -1 Then Return
|
If nIndex = -1 Then Return
|
||||||
' bottone di apertura porte
|
' bottone di apertura porte
|
||||||
@@ -558,7 +658,7 @@ Public Class MachineButtonsUC
|
|||||||
' bottone di chiusura porte
|
' bottone di chiusura porte
|
||||||
Dim DoorClosedButton As Primitives.ToggleButton = GetToggleButton(nIndex + 1)
|
Dim DoorClosedButton As Primitives.ToggleButton = GetToggleButton(nIndex + 1)
|
||||||
' modifico il colore dei bottoni
|
' modifico il colore dei bottoni
|
||||||
If Not IsNothing(DoorState) Then
|
If Not IsNothing(DoorState) AndAlso Not IsNothing(DoorClosedButton) Then
|
||||||
Select Case DoorState
|
Select Case DoorState
|
||||||
Case 0
|
Case 0
|
||||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
|
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
|
||||||
@@ -566,7 +666,7 @@ Public Class MachineButtonsUC
|
|||||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(DoorState) Then
|
If Not IsNothing(DoorState) AndAlso Not IsNothing(DoorOpenedButton) Then
|
||||||
Select Case DoorState
|
Select Case DoorState
|
||||||
Case 0
|
Case 0
|
||||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||||
@@ -578,6 +678,237 @@ Public Class MachineButtonsUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ParkingStateChanged(ParkingState As Boolean)
|
||||||
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_PARKING)
|
||||||
|
If nIndex = -1 Then Return
|
||||||
|
If ParkingState Then
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = True
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub HomeStateChanged(HomeState As Boolean)
|
||||||
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_HOME)
|
||||||
|
If nIndex = -1 Then Return
|
||||||
|
If HomeState Then
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = True
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub EnableZoneStateChanged(ZoneState As Integer)
|
||||||
|
Dim sFlag As String = String.Empty
|
||||||
|
If ZoneState = 1 Then
|
||||||
|
sFlag = BTN_ENABLE_ZONE_1
|
||||||
|
ElseIf ZoneState = 2 Then
|
||||||
|
sFlag = BTN_ENABLE_ZONE_2
|
||||||
|
End If
|
||||||
|
' recupero il bottone che deve essere acceso (quindi spengo l'altro)
|
||||||
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, sFlag)
|
||||||
|
|
||||||
|
' se non trovo nessun riferimento allora spengo entrambi i comandi
|
||||||
|
If nIndex = -1 Then
|
||||||
|
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_1)
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_2)
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ZoneState = 1 Then
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = True
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
' spengo l'altro bottone (lo stato dei due bottoni sono gestiti da una sola variabile)
|
||||||
|
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_2)
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
|
||||||
|
ElseIf ZoneState = 2 Then
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = True
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
' spengo l'altro bottone (lo stato dei due bottoni sono gestiti da una sola variabile)
|
||||||
|
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_1)
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub EnablePcStateChanged(PcState As Integer)
|
||||||
|
' il comando ButtonY accendo il Pannello_1, il comando ButtonN accendo il Pannello_2 (uno è la negazione dell'altro)
|
||||||
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_ENABLE_PC)
|
||||||
|
If nIndex = -1 Then Return
|
||||||
|
If PcState = 1 Then
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = True
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
ElseIf PcState = 2 Then
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = True
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayN(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayN(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
' nessuno dei due pannelli attivo
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub TableUpChanged(TableUpState As Boolean)
|
||||||
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_TABLEUP)
|
||||||
|
If nIndex = -1 Then Return
|
||||||
|
If TableUpState Then
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = True
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayN(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayN(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub TableDownChanged(TableDownState As Boolean)
|
||||||
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_TABLEDOWN)
|
||||||
|
If nIndex = -1 Then Return
|
||||||
|
If TableDownState Then
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = True
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayN(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayN(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
'----------------- Queste funzioni determina lo stato del bottone direttamente dalla lettura delle variabili CN
|
'----------------- Queste funzioni determina lo stato del bottone direttamente dalla lettura delle variabili CN
|
||||||
Friend Sub XYJogChanged(ByVal bXYAxes As Boolean)
|
Friend Sub XYJogChanged(ByVal bXYAxes As Boolean)
|
||||||
' recupero le asscociazioni con i bottoni
|
' recupero le asscociazioni con i bottoni
|
||||||
@@ -602,80 +933,97 @@ Public Class MachineButtonsUC
|
|||||||
' selezoiono lo stato del bottone
|
' selezoiono lo stato del bottone
|
||||||
GetToggleButton(nIndex + 1).IsChecked = bBCAxes
|
GetToggleButton(nIndex + 1).IsChecked = bBCAxes
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub RemoteChanged(ByVal bRemote As Boolean)
|
||||||
|
' recupero le asscociazioni con i bottoni
|
||||||
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_REMOTE)
|
||||||
|
If nIndex = -1 Then Return
|
||||||
|
' selezoiono lo stato del bottone
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = bRemote
|
||||||
|
End Sub
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#End Region ' State changed
|
||||||
|
|
||||||
Private Function GetToggleButton(ByVal nIndex As Integer) As Primitives.ToggleButton
|
Private Function GetToggleButton(ByVal nIndex As Integer) As Primitives.ToggleButton
|
||||||
Select Case nIndex
|
Select Case nIndex
|
||||||
Case 1
|
Case 1
|
||||||
Return MachineButton1
|
Return MachineButton1
|
||||||
Case 2
|
Case 2
|
||||||
Return MachineButton2
|
Return MachineButton2
|
||||||
Case 3
|
Case 3
|
||||||
Return MachineButton3
|
Return MachineButton3
|
||||||
Case 4
|
Case 4
|
||||||
Return MachineButton4
|
Return MachineButton4
|
||||||
Case 5
|
Case 5
|
||||||
Return MachineButton5
|
Return MachineButton5
|
||||||
Case 6
|
Case 6
|
||||||
Return MachineButton6
|
Return MachineButton6
|
||||||
Case 7
|
Case 7
|
||||||
Return MachineButton7
|
Return MachineButton7
|
||||||
Case 8
|
Case 8
|
||||||
Return MachineButton8
|
Return MachineButton8
|
||||||
Case 9
|
Case 9
|
||||||
Return MachineButton9
|
Return MachineButton9
|
||||||
Case Else
|
Case 10
|
||||||
Return MachineButton10
|
Return MachineButton10
|
||||||
|
Case Else
|
||||||
|
Return MachineButton11
|
||||||
End Select
|
End Select
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function GetToggleButtonIndex(ByVal nBtnName As Primitives.ToggleButton) As Integer
|
Private Function GetToggleButtonIndex(ByVal nBtnName As Primitives.ToggleButton) As Integer
|
||||||
Select Case nBtnName.Name
|
Select Case nBtnName.Name
|
||||||
Case MachineButton1.Name
|
Case MachineButton1.Name
|
||||||
Return 1
|
Return 1
|
||||||
Case MachineButton2.Name
|
Case MachineButton2.Name
|
||||||
Return 2
|
Return 2
|
||||||
Case MachineButton3.Name
|
Case MachineButton3.Name
|
||||||
Return 3
|
Return 3
|
||||||
Case MachineButton4.Name
|
Case MachineButton4.Name
|
||||||
Return 4
|
Return 4
|
||||||
Case MachineButton5.Name
|
Case MachineButton5.Name
|
||||||
Return 5
|
Return 5
|
||||||
Case MachineButton6.Name
|
Case MachineButton6.Name
|
||||||
Return 6
|
Return 6
|
||||||
Case MachineButton7.Name
|
Case MachineButton7.Name
|
||||||
Return 7
|
Return 7
|
||||||
Case MachineButton8.Name
|
Case MachineButton8.Name
|
||||||
Return 8
|
Return 8
|
||||||
Case MachineButton9.Name
|
Case MachineButton9.Name
|
||||||
Return 9
|
Return 9
|
||||||
Case Else
|
Case MachineButton10.Name
|
||||||
Return 10
|
Return 10
|
||||||
|
Case Else
|
||||||
|
Return 11
|
||||||
End Select
|
End Select
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function GetImage(ByVal nInd As Integer) As Image
|
Private Function GetImage(ByVal nInd As Integer) As Image
|
||||||
Select Case nInd
|
Select Case nInd
|
||||||
Case 1
|
Case 1
|
||||||
Return ImageButton1
|
Return ImageButton1
|
||||||
Case 2
|
Case 2
|
||||||
Return ImageButton2
|
Return ImageButton2
|
||||||
Case 3
|
Case 3
|
||||||
Return ImageButton3
|
Return ImageButton3
|
||||||
Case 4
|
Case 4
|
||||||
Return ImageButton4
|
Return ImageButton4
|
||||||
Case 5
|
Case 5
|
||||||
Return ImageButton5
|
Return ImageButton5
|
||||||
Case 6
|
Case 6
|
||||||
Return ImageButton6
|
Return ImageButton6
|
||||||
Case 7
|
Case 7
|
||||||
Return ImageButton7
|
Return ImageButton7
|
||||||
Case 8
|
Case 8
|
||||||
Return ImageButton8
|
Return ImageButton8
|
||||||
Case 9
|
Case 9
|
||||||
Return ImageButton9
|
Return ImageButton9
|
||||||
Case Else
|
Case 10
|
||||||
Return ImageButton10
|
Return ImageButton10
|
||||||
|
Case Else
|
||||||
|
Return ImageButton11
|
||||||
End Select
|
End Select
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -69,10 +69,10 @@
|
|||||||
<EgtWPFLib:EgtTextBox x:Name="L3TxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox x:Name="L3TxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<Button x:Name="R1Btn" Grid.Row="4" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
<Button x:Name="R1Btn" Grid.Row="4" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
<EgtWPFLib:EgtTextBox x:Name="R1TxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox x:Name="R1TxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<Button x:Name="R2Btn" Grid.Row="5" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
<Button x:Name="R2Btn" Grid.Row="5" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
<EgtWPFLib:EgtTextBox x:Name="R2TxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox x:Name="R2TxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||||
|
|||||||
@@ -21,10 +21,12 @@ Public Class ManualAxesMoveUC
|
|||||||
' Messaggi
|
' Messaggi
|
||||||
L1SawThChBx.Content = EgtMsg(90232) ' Spessore lama
|
L1SawThChBx.Content = EgtMsg(90232) ' Spessore lama
|
||||||
L2SawThChBx.Content = EgtMsg(90232) ' Spessore lama
|
L2SawThChBx.Content = EgtMsg(90232) ' Spessore lama
|
||||||
|
|
||||||
AddHandler m_Timer.Tick, AddressOf Timer_tick
|
AddHandler m_Timer.Tick, AddressOf Timer_tick
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ManualAxesMove_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub ManualAxesMove_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
|
m_CN = m_MainWindow.m_DirectCutPageUC.m_CN
|
||||||
' Valori feed e speed da lama corrente
|
' Valori feed e speed da lama corrente
|
||||||
Dim dTemp As Double = 0
|
Dim dTemp As Double = 0
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||||
@@ -201,12 +203,13 @@ Public Class ManualAxesMoveUC
|
|||||||
EgtOutLog("CmdString=" & CmdString)
|
EgtOutLog("CmdString=" & CmdString)
|
||||||
' Eseguo in MDI
|
' Eseguo in MDI
|
||||||
m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI
|
m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI
|
||||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
System.Threading.Thread.Sleep(150)
|
||||||
m_CN.sz_ManualDataInput = CmdString
|
m_CN.sz_ManualDataInput = CmdString
|
||||||
m_CN.MDI_command()
|
m_CN.MDI_command()
|
||||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
System.Threading.Thread.Sleep(150)
|
||||||
m_CN.DGeneralFunctions_CycleStart()
|
m_CN.DGeneralFunctions_CycleStart()
|
||||||
m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||||
|
' m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||||
m_MoveClicked = False
|
m_MoveClicked = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -337,7 +340,7 @@ Public Class ManualAxesMoveUC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
Private Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub G0Btn_Checked(sender As Object, e As RoutedEventArgs) Handles G0Btn.Checked
|
Private Sub G0Btn_Checked(sender As Object, e As RoutedEventArgs) Handles G0Btn.Checked
|
||||||
|
|||||||
+32
-23
@@ -35,12 +35,17 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||||
Margin="6,0,6,0">
|
Margin="6,0,6,0">
|
||||||
@@ -63,12 +68,12 @@
|
|||||||
|
|
||||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
|
<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
|
||||||
@@ -119,70 +124,70 @@
|
|||||||
|
|
||||||
<TextBlock Name="Num1TxBl" Grid.Column="0" Grid.Row="0"
|
<TextBlock Name="Num1TxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz1TxBx" Grid.Column="1" Grid.Row="0" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz1TxBx" Grid.Column="1" Grid.Row="0" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz1TxBx" Grid.Column="3" Grid.Row="0" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz1TxBx" Grid.Column="3" Grid.Row="0" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz2TxBx" Grid.Column="1" Grid.Row="1" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz2TxBx" Grid.Column="1" Grid.Row="1" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz2TxBx" Grid.Column="3" Grid.Row="1" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz2TxBx" Grid.Column="3" Grid.Row="1" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz3TxBx" Grid.Column="1" Grid.Row="2" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz3TxBx" Grid.Column="1" Grid.Row="2" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz3TxBx" Grid.Column="3" Grid.Row="2" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz3TxBx" Grid.Column="3" Grid.Row="2" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num4TxBl" Grid.Column="0" Grid.Row="3"
|
<TextBlock Name="Num4TxBl" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz5TxBx" Grid.Column="1" Grid.Row="4" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz5TxBx" Grid.Column="1" Grid.Row="4" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz5TxBx" Grid.Column="3" Grid.Row="4" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz5TxBx" Grid.Column="3" Grid.Row="4" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz6TxBx" Grid.Column="1" Grid.Row="5" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz6TxBx" Grid.Column="1" Grid.Row="5" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz6TxBx" Grid.Column="3" Grid.Row="5" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz6TxBx" Grid.Column="3" Grid.Row="5" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
|
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz7TxBx" Grid.Column="1" Grid.Row="6" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz7TxBx" Grid.Column="1" Grid.Row="6" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz7TxBx" Grid.Column="3" Grid.Row="6" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz7TxBx" Grid.Column="3" Grid.Row="6" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
|
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz8TxBx" Grid.Column="1" Grid.Row="7" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz8TxBx" Grid.Column="1" Grid.Row="7" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz8TxBx" Grid.Column="3" Grid.Row="7" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz8TxBx" Grid.Column="3" Grid.Row="7" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
|
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz9TxBx" Grid.Column="1" Grid.Row="8" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz9TxBx" Grid.Column="1" Grid.Row="8" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz9TxBx" Grid.Column="3" Grid.Row="8" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz9TxBx" Grid.Column="3" Grid.Row="8" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
|
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz10TxBx" Grid.Column="1" Grid.Row="9" Width="75"
|
<EgtWPFLib:EgtTextBox Name="NumPz10TxBx" Grid.Column="1" Grid.Row="9" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz10TxBx" Grid.Column="3" Grid.Row="9" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz10TxBx" Grid.Column="3" Grid.Row="9" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -256,12 +261,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
</Button>
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
</Button>
|
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Grid>
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
+109
-36
@@ -38,7 +38,8 @@ Public Class MultipleCut
|
|||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
' Layer per crocette temporanee
|
' Layer per crocette temporanee
|
||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
|
' Gestione spessore lama
|
||||||
|
Private m_bSawTh As Boolean = False
|
||||||
' Costanti
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||||
Private Const MIN_CUT_LEN As Double = 10.0
|
Private Const MIN_CUT_LEN As Double = 10.0
|
||||||
@@ -63,8 +64,8 @@ Public Class MultipleCut
|
|||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||||
@@ -72,8 +73,8 @@ Public Class MultipleCut
|
|||||||
NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17)
|
NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17)
|
||||||
DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18)
|
DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18)
|
||||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||||
Num1TxBl.Text = "1"
|
Num1TxBl.Text = "1"
|
||||||
Num2TxBl.Text = "2"
|
Num2TxBl.Text = "2"
|
||||||
Num3TxBl.Text = "3"
|
Num3TxBl.Text = "3"
|
||||||
@@ -90,9 +91,14 @@ Public Class MultipleCut
|
|||||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||||
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||||
For nI As Integer = 0 To 9
|
For nI As Integer = 0 To 9
|
||||||
m_nNum( nI) = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_MULT_NUM & (nI+1).ToString(), 0, m_MainWindow.GetIniFile())
|
m_nNum(nI) = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_MULT_NUM & (nI + 1).ToString(), 0, m_MainWindow.GetIniFile())
|
||||||
m_dDim( nI) = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_DIM & (nI+1).ToString(), 0, m_MainWindow.GetIniFile())
|
m_dDim(nI) = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_MULT_DIM & (nI + 1).ToString(), 0, m_MainWindow.GetIniFile())
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
|
||||||
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_MULT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_MULT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||||
@@ -168,6 +174,11 @@ Public Class MultipleCut
|
|||||||
NumPz10TxBx.Text = m_nNum(9).ToString()
|
NumPz10TxBx.Text = m_nNum(9).ToString()
|
||||||
DimPz10TxBx.Text = LenToString( m_dDim(9), 1)
|
DimPz10TxBx.Text = LenToString( m_dDim(9), 1)
|
||||||
SideChBx.IsChecked = m_bHeadSide
|
SideChBx.IsChecked = m_bHeadSide
|
||||||
|
|
||||||
|
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
|
||||||
' Reset taglio e disabilito bottone esecuzione
|
' Reset taglio e disabilito bottone esecuzione
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
@@ -195,7 +206,7 @@ Public Class MultipleCut
|
|||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||||
' Rimuovo layer temporaneo per crocette
|
' Rimuovo layer temporaneo per crocette
|
||||||
EgtErase(m_nTempLay)
|
EgtErase(m_nTempLay)
|
||||||
' Rimuovo eventuale pezzo per taglio diretto
|
' Rimuovo eventuale pezzo per taglio diretto
|
||||||
@@ -213,6 +224,10 @@ Public Class MultipleCut
|
|||||||
m_bActive = False
|
m_bActive = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SetEnableParam(ByVal bIsSaw As Boolean)
|
||||||
|
DepthTxBx.IsEnabled = bIsSaw
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateSimulOkBtn()
|
Private Sub UpdateSimulOkBtn()
|
||||||
If m_bCutOk Then
|
If m_bCutOk Then
|
||||||
SimulBtn.IsEnabled = True
|
SimulBtn.IsEnabled = True
|
||||||
@@ -270,12 +285,31 @@ Public Class MultipleCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Recupero dati utensile e testa corrente
|
||||||
|
Dim sTool As String = ""
|
||||||
|
Dim sHead As String = ""
|
||||||
|
Dim nExit As Integer = 0
|
||||||
|
EgtGetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
|
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -283,18 +317,20 @@ Public Class MultipleCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
|
||||||
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -312,10 +348,9 @@ Public Class MultipleCut
|
|||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Ricavo dati lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Imposto la lama corrente
|
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
|
||||||
End If
|
End If
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
CreateMultipleCut()
|
CreateMultipleCut()
|
||||||
@@ -343,12 +378,31 @@ Public Class MultipleCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Recupero dati utensile e testa corrente
|
||||||
|
Dim sTool As String = ""
|
||||||
|
Dim sHead As String = ""
|
||||||
|
Dim nExit As Integer = 0
|
||||||
|
EgtGetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
|
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -356,18 +410,18 @@ Public Class MultipleCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -383,10 +437,9 @@ Public Class MultipleCut
|
|||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
' Ricavo dati lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Imposto la lama corrente
|
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||||
@@ -419,7 +472,7 @@ Public Class MultipleCut
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -524,6 +577,7 @@ Public Class MultipleCut
|
|||||||
m_bSimul = True
|
m_bSimul = True
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||||
@@ -552,19 +606,21 @@ Public Class MultipleCut
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreateMultipleCut() As Boolean
|
Private Function CreateMultipleCut() As Boolean
|
||||||
@@ -589,6 +645,22 @@ Public Class MultipleCut
|
|||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
ptStart.z = 0
|
ptStart.z = 0
|
||||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||||
|
|
||||||
|
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
' Recupero spessore lama corrente
|
||||||
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
|
EgtTdbSetCurrTool(sSaw)
|
||||||
|
Dim dThick As Double = 0
|
||||||
|
' Se è impostata una lavorazione di lama
|
||||||
|
If Not String.IsNullOrEmpty(sSawing) Then
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
|
End If
|
||||||
|
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
|
||||||
|
EgtOffsetCurve(nCutId, -dThick, OFF_TYPE.EXTEND)
|
||||||
|
End If
|
||||||
|
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||||
|
|
||||||
' Imposto affondamento e angolo di fianco sul taglio
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||||
@@ -681,6 +753,7 @@ Public Class MultipleCut
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||||
|
ptP += New Vector3d(0, 0, 0.15)
|
||||||
' Aggiungo crocette
|
' Aggiungo crocette
|
||||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||||
Dim vtCrossY As New Vector3d(0, 20, 0)
|
Dim vtCrossY As New Vector3d(0, 20, 0)
|
||||||
|
|||||||
@@ -63,12 +63,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
</Button>
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
</Button>
|
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Grid>
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ Public Class Polishing
|
|||||||
' Riferimenti a pagine
|
' Riferimenti a pagine
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||||
|
Private m_refControlDirectCutUC As ControlsDirectCutUC1
|
||||||
|
|
||||||
' Flag di pagina attiva
|
' Flag di pagina attiva
|
||||||
Private m_bActive As Boolean = False
|
Private m_bActive As Boolean = False
|
||||||
' Flag di simulazione in corso
|
' Flag di simulazione in corso
|
||||||
@@ -23,13 +25,14 @@ Public Class Polishing
|
|||||||
|
|
||||||
Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
' Attivo la pagina
|
' Attivo la pagina
|
||||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||||
|
m_refControlDirectCutUC = m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC1
|
||||||
m_bActive = True
|
m_bActive = True
|
||||||
' Se rientro da simulazione
|
' Se rientro da simulazione
|
||||||
If m_bSimul Then
|
If m_bSimul Then
|
||||||
@@ -60,7 +63,7 @@ Public Class Polishing
|
|||||||
If PolishingCmBx.SelectedIndex < 0 Then
|
If PolishingCmBx.SelectedIndex < 0 Then
|
||||||
m_bPoliOk = False
|
m_bPoliOk = False
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
End If
|
End If
|
||||||
' Rendo semitrasparente il grezzo
|
' Rendo semitrasparente il grezzo
|
||||||
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
||||||
EgtSetAlpha( nRawSolidId, 60)
|
EgtSetAlpha( nRawSolidId, 60)
|
||||||
@@ -72,7 +75,7 @@ Public Class Polishing
|
|||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut
|
||||||
' Cancello eventuali lucidature
|
' Cancello eventuali lucidature
|
||||||
RemovePolishings()
|
RemovePolishings()
|
||||||
' Riattivo eventuali lavorazioni presenti
|
' Riattivo eventuali lavorazioni presenti
|
||||||
@@ -148,6 +151,7 @@ Public Class Polishing
|
|||||||
m_bSimul = True
|
m_bSimul = True
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
|
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||||
@@ -176,19 +180,21 @@ Public Class Polishing
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreatePolishing( sKitName As String) As Boolean
|
Private Function CreatePolishing( sKitName As String) As Boolean
|
||||||
|
|||||||
+21
-12
@@ -37,12 +37,17 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||||
Margin="6,0,6,0">
|
Margin="6,0,6,0">
|
||||||
@@ -65,7 +70,7 @@
|
|||||||
|
|
||||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="5"
|
||||||
@@ -80,12 +85,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
</Button>
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
</Button>
|
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Grid>
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ Public Class SawTestUC
|
|||||||
' Riferimenti a pagine
|
' Riferimenti a pagine
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||||
|
Private m_refControlDirectCutUC As ControlsDirectCutUC1
|
||||||
' Flag di pagina attiva
|
' Flag di pagina attiva
|
||||||
Private m_bActive As Boolean = False
|
Private m_bActive As Boolean = False
|
||||||
' Flag di simulazione in corso
|
' Flag di simulazione in corso
|
||||||
@@ -58,14 +59,14 @@ Public Class SawTestUC
|
|||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||||
' Carico i dati dell'ultimo test
|
' Carico i dati dell'ultimo test
|
||||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||||
@@ -76,6 +77,7 @@ Public Class SawTestUC
|
|||||||
Private Sub SawTest_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub SawTest_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
' Attivo la pagina
|
' Attivo la pagina
|
||||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||||
|
m_refControlDirectCutUC = m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC1
|
||||||
m_bActive = True
|
m_bActive = True
|
||||||
' Se rientro da simulazione
|
' Se rientro da simulazione
|
||||||
If m_bSimul Then
|
If m_bSimul Then
|
||||||
@@ -139,7 +141,7 @@ Public Class SawTestUC
|
|||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_TEST_OFFSET, DoubleToString( m_dOffset, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString( S_DIRECTCUTS, K_DC_TEST_OFFSET, DoubleToString( m_dOffset, 2), m_MainWindow.GetIniFile())
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut1
|
||||||
' Rimuovo layer temporaneo per crocette
|
' Rimuovo layer temporaneo per crocette
|
||||||
EgtErase(m_nTempLay)
|
EgtErase(m_nTempLay)
|
||||||
' Rimuovo eventuale pezzo per taglio diretto
|
' Rimuovo eventuale pezzo per taglio diretto
|
||||||
@@ -208,17 +210,30 @@ Public Class SawTestUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(m_sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -226,10 +241,10 @@ Public Class SawTestUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -278,17 +293,30 @@ Public Class SawTestUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(m_sSaw, "H1", 1)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -296,10 +324,10 @@ Public Class SawTestUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -349,7 +377,7 @@ Public Class SawTestUC
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -419,6 +447,7 @@ Public Class SawTestUC
|
|||||||
m_bSimul = True
|
m_bSimul = True
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
|
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||||
@@ -447,19 +476,21 @@ Public Class SawTestUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreateSingleCut() As Boolean
|
Private Function CreateSingleCut() As Boolean
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ Public Class SingleCutAuto
|
|||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||||
' Rimuovo layer temporaneo per crocette
|
' Rimuovo layer temporaneo per crocette
|
||||||
EgtErase(m_nTempLay)
|
EgtErase(m_nTempLay)
|
||||||
' Rimuovo eventuale pezzo per taglio diretto
|
' Rimuovo eventuale pezzo per taglio diretto
|
||||||
@@ -715,6 +715,7 @@ Public Class SingleCutAuto
|
|||||||
m_bSimul = True
|
m_bSimul = True
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||||
@@ -758,7 +759,7 @@ Public Class SingleCutAuto
|
|||||||
' reimposto il precedetne utensile e lavorazione
|
' reimposto il precedetne utensile e lavorazione
|
||||||
m_MainWindow.m_CurrentMachine.sCurrSaw = m_PrecSaw
|
m_MainWindow.m_CurrentMachine.sCurrSaw = m_PrecSaw
|
||||||
m_MainWindow.m_CurrentMachine.sCurrSawing = m_PrecSawing
|
m_MainWindow.m_CurrentMachine.sCurrSawing = m_PrecSawing
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreateSingleCut() As Boolean
|
Private Function CreateSingleCut() As Boolean
|
||||||
|
|||||||
@@ -38,11 +38,16 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
@@ -64,12 +69,12 @@
|
|||||||
|
|
||||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="6"
|
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="6"
|
||||||
@@ -106,10 +111,14 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
+149
-57
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports System.Windows.Threading
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class SingleCutUC
|
Public Class SingleCutUC
|
||||||
|
|
||||||
@@ -39,10 +40,14 @@ Public Class SingleCutUC
|
|||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
' Costanti
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
Private Const MAX_TAB_DEPTH As Double = 10.0 ' sostituita da un m_MaxTabDepth letto da file ini macchina
|
||||||
Private Const MIN_CUT_LEN As Double = 10.0
|
Private Const MIN_CUT_LEN As Double = 10.0
|
||||||
Private Const MAX_SIDE_ANG As Double = 60.0
|
Private Const MAX_SIDE_ANG As Double = 60.0
|
||||||
' Costanti che indicano la modalità di acquisizione dei punti
|
' Costanti che indicano la modalità di acquisizione dei punti
|
||||||
|
|
||||||
|
' Utilizzato per aggiornare la posizione della macchina
|
||||||
|
Private m_RefreshTimer As New DispatcherTimer
|
||||||
|
|
||||||
Private Enum PT_MODE As Integer
|
Private Enum PT_MODE As Integer
|
||||||
SAW = 0
|
SAW = 0
|
||||||
LASER = 1
|
LASER = 1
|
||||||
@@ -57,25 +62,25 @@ Public Class SingleCutUC
|
|||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' Assegno messaggi
|
' Assegno messaggi
|
||||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||||
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
|
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
|
||||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||||
' Carico i dati dell'ultimo taglio
|
' Carico i dati dell'ultimo taglio
|
||||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
m_dLen = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||||
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||||
m_dOffset = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_OFFSET, m_dOffset, m_MainWindow.GetIniFile())
|
m_dOffset = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_OFFSET, m_dOffset, m_MainWindow.GetIniFile())
|
||||||
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SingleCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub SingleCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
@@ -92,6 +97,10 @@ Public Class SingleCutUC
|
|||||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
' riavvio il timer per visualizzare la poszione della macchina
|
||||||
|
If Not IsNothing(m_RefreshTimer) Then
|
||||||
|
m_RefreshTimer.Start()
|
||||||
|
End If
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Disabilito registrazione progetto modificato
|
' Disabilito registrazione progetto modificato
|
||||||
@@ -114,7 +123,7 @@ Public Class SingleCutUC
|
|||||||
m_bPointP1Ok = False
|
m_bPointP1Ok = False
|
||||||
m_bPointP2Ok = False
|
m_bPointP2Ok = False
|
||||||
' Inizializzo primo punto acquisito dal disegno
|
' Inizializzo primo punto acquisito dal disegno
|
||||||
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
|
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||||
m_ptPrev.z = m_ptRawMax.z
|
m_ptPrev.z = m_ptRawMax.z
|
||||||
' Disegno crocetta che indica il punto acquisito
|
' Disegno crocetta che indica il punto acquisito
|
||||||
CreateCross(m_nTempLay, m_ptPrev)
|
CreateCross(m_nTempLay, m_ptPrev)
|
||||||
@@ -137,24 +146,46 @@ Public Class SingleCutUC
|
|||||||
Point2Btn.IsEnabled = False
|
Point2Btn.IsEnabled = False
|
||||||
' Deseleziono bottone primo punto
|
' Deseleziono bottone primo punto
|
||||||
Point1Btn.IsChecked = False
|
Point1Btn.IsChecked = False
|
||||||
|
|
||||||
|
' la visualizzazione dei comandi è gestita dalla DirectCutPageUC richiamando la funzione ReloadParam
|
||||||
|
|
||||||
|
' forzo la macchina ad essere visibile fin da subito
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_nMachLook = MCH_LOOK.TAB
|
||||||
|
' Creo il timer il timer per aggiornare il posizionamento della macchina
|
||||||
|
AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_tick
|
||||||
|
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(1000)
|
||||||
|
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
|
||||||
|
' Avvi il timer
|
||||||
|
m_RefreshTimer.Start()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RefreshTimer_tick()
|
||||||
|
' se è impostata la visualizzazione della sola tavola allora non aggiorno il disegno
|
||||||
|
If m_MainWindow.m_DirectCutPageUC.m_nMachLook = MCH_LOOK.TAB Then Return
|
||||||
|
' Aggiorno visualizzazione
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
' Aggiorno il disegno
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub SingleCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Friend Sub SingleCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
' Salvo i dati correnti
|
' Salvo i dati correnti
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_LENGTH, DoubleToString( m_dLen, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_LENGTH, DoubleToString(m_dLen, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_ANGV, DoubleToString( m_dAngV, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_ANGV, DoubleToString(m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_OFFSET, DoubleToString(m_dOffset, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_OFFSET, DoubleToString(m_dOffset, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_SAWTH, If(m_bSawTh, "1", "0"), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_SAWTH, If(m_bSawTh, "1", "0"), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||||
' Rimuovo layer temporaneo per crocette
|
' Rimuovo layer temporaneo per crocette
|
||||||
EgtErase(m_nTempLay)
|
EgtErase(m_nTempLay)
|
||||||
' Rimuovo eventuale pezzo per taglio diretto
|
' Rimuovo eventuale pezzo per taglio diretto
|
||||||
@@ -168,10 +199,18 @@ Public Class SingleCutUC
|
|||||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
|
' interrompo il Timer per aggiornare la visualizzazione del posizionamento macchina
|
||||||
|
m_RefreshTimer.Stop()
|
||||||
' Dichiaro pagina non attiva
|
' Dichiaro pagina non attiva
|
||||||
m_bActive = False
|
m_bActive = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SetEnableParam(ByVal bIsSaw As Boolean)
|
||||||
|
' se macchina solo WaterJet Disabilito/Nascondo parametri della lama
|
||||||
|
DepthTxBx.IsEnabled = bIsSaw
|
||||||
|
SawThChBx.IsEnabled = bIsSaw
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateSimulOkBtn()
|
Private Sub UpdateSimulOkBtn()
|
||||||
If m_bCutOk Then
|
If m_bCutOk Then
|
||||||
SimulBtn.IsEnabled = True
|
SimulBtn.IsEnabled = True
|
||||||
@@ -229,11 +268,30 @@ Public Class SingleCutUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Recupero dati utensile e testa corrente
|
||||||
|
Dim sTool As String = ""
|
||||||
|
Dim sHead As String = ""
|
||||||
|
Dim nExit As Integer = 0
|
||||||
|
EgtGetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Se acquisizione lama o laser
|
' Se acquisizione lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -241,18 +299,20 @@ Public Class SingleCutUC
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
EgtOutLog("Coordinate punto 1 da H3: " & m_ptTipP1.x.ToString & " ," & m_ptTipP1.y.ToString)
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
' Reimposto eventuale precedente utensile
|
||||||
' Altrimenti da lama
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
|
EgtOutLog("Coordinate punto 1 da H1: " & m_ptTipP1.x.ToString & " ," & m_ptTipP1.y.ToString)
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -264,17 +324,15 @@ Public Class SingleCutUC
|
|||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||||
|
|
||||||
' Altrimenti punto da click di mouse
|
' Altrimenti punto da click di mouse
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
m_ptTipP1 = m_ptPrev
|
m_ptTipP1 = m_ptPrev
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Ricavo dati lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Imposto la lama corrente
|
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -284,6 +342,7 @@ Public Class SingleCutUC
|
|||||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
|
||||||
' Seleziono il bottone per indicare che il primo punto è stato acquisito
|
' Seleziono il bottone per indicare che il primo punto è stato acquisito
|
||||||
Point1Btn.IsChecked = True
|
Point1Btn.IsChecked = True
|
||||||
' Abilito e deseleziono secondo punto
|
' Abilito e deseleziono secondo punto
|
||||||
@@ -303,11 +362,30 @@ Public Class SingleCutUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
If bIsMultiCut Then
|
||||||
|
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Recupero dati utensile e testa corrente
|
||||||
|
Dim sTool As String = ""
|
||||||
|
Dim sHead As String = ""
|
||||||
|
Dim nExit As Integer = 0
|
||||||
|
EgtGetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Se acquisizone lama o laser
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -315,18 +393,20 @@ Public Class SingleCutUC
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
' Ora imposto la lama corrente
|
EgtOutLog("Coordinate punto 2 da H3: " & m_ptTipP2.x.ToString & " ," & m_ptTipP2.y.ToString)
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
' Reimposto eventuale precedente utensile
|
||||||
' Altrimenti da lama
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -336,17 +416,15 @@ Public Class SingleCutUC
|
|||||||
m_dAngV = 90 - dTAngV
|
m_dAngV = 90 - dTAngV
|
||||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||||
|
|
||||||
' Altrimenti punto da click di mouse
|
' Altrimenti punto da click di mouse
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||||
m_ptTipP2 = m_ptPrev
|
m_ptTipP2 = m_ptPrev
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
' Ricavo dati lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Imposto la lama corrente
|
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||||
@@ -361,6 +439,7 @@ Public Class SingleCutUC
|
|||||||
m_dAngO = dAngOrizzDeg
|
m_dAngO = dAngOrizzDeg
|
||||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
|
EgtOutLog("Lunghezza taglio: " & dLen.ToString & "Angolo: " & dAngOrizzDeg.ToString)
|
||||||
CreateSingleCut()
|
CreateSingleCut()
|
||||||
' Disegno la macchina nella sua posizione reale
|
' Disegno la macchina nella sua posizione reale
|
||||||
SetMachineInCurrPos()
|
SetMachineInCurrPos()
|
||||||
@@ -378,7 +457,7 @@ Public Class SingleCutUC
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -456,7 +535,7 @@ Public Class SingleCutUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SawThick_Click( sender As Object, e As RoutedEventArgs) Handles SawThChBx.Click
|
Private Sub SawThick_Click(sender As Object, e As RoutedEventArgs) Handles SawThChBx.Click
|
||||||
' Recupero lo stato di check
|
' Recupero lo stato di check
|
||||||
m_bSawTh = SawThChBx.IsChecked()
|
m_bSawTh = SawThChBx.IsChecked()
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -504,6 +583,7 @@ Public Class SingleCutUC
|
|||||||
m_bSimul = True
|
m_bSimul = True
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||||
@@ -515,9 +595,9 @@ Public Class SingleCutUC
|
|||||||
m_CurrProjPage.SetWarningMessage( "Trial Version")
|
m_CurrProjPage.SetWarningMessage( "Trial Version")
|
||||||
#Else
|
#Else
|
||||||
' Verifico non sia versione Ufficio
|
' Verifico non sia versione Ufficio
|
||||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico ci sia un taglio valido
|
' Verifico ci sia un taglio valido
|
||||||
If Not m_bCutOk Then Return
|
If Not m_bCutOk Then Return
|
||||||
@@ -532,24 +612,27 @@ Public Class SingleCutUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreateSingleCut() As Boolean
|
Private Function CreateSingleCut() As Boolean
|
||||||
' Verifico sia definito il punto iniziale e il grezzo
|
' Verifico sia definito il punto iniziale e il grezzo
|
||||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||||
|
EgtOutLog("Primo punto non valido")
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -559,9 +642,13 @@ Public Class SingleCutUC
|
|||||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||||
' Recupero spessore lama corrente
|
' Recupero spessore lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
|
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
EgtTdbSetCurrTool(sSaw)
|
EgtTdbSetCurrTool(sSaw)
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
' Se è impostata una lavorazione di lama
|
||||||
|
If Not String.IsNullOrEmpty(sSawing) Then
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
|
End If
|
||||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||||
EraseDirectCutPart()
|
EraseDirectCutPart()
|
||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
@@ -574,14 +661,19 @@ Public Class SingleCutUC
|
|||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
ptStart.z = 0
|
ptStart.z = 0
|
||||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||||
If Math.Abs(m_dOffset) > 10 * EPS_SMALL Then
|
' Applico la correzione di spessore lama -> anche se Offset=0! ver_2.5b1
|
||||||
Dim dTotOffset = m_dOffset
|
Dim dTotOffset = m_dOffset
|
||||||
If m_bSawTh Then dTotOffset += If( m_dOffset > 0, dThick, -dThick)
|
If m_bSawTh Then
|
||||||
|
dTotOffset += If(m_dOffset > 0, dThick, -dThick)
|
||||||
|
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||||
|
Else
|
||||||
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||||
End If
|
End If
|
||||||
' Imposto affondamento e angolo di fianco sul taglio
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||||
|
' Imposto se disabilitare l'inversine di direzione del taglio
|
||||||
|
If Not m_MainWindow.m_CurrentMachine.bEnableInvert Then EgtSetInfo(nCutId, INFO_ENABLE_INVERT, 0)
|
||||||
' Creo layer per crocetta di riferimento
|
' Creo layer per crocetta di riferimento
|
||||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
||||||
' Aggiungo crocetta/e
|
' Aggiungo crocetta/e
|
||||||
|
|||||||
@@ -38,8 +38,10 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -77,8 +79,12 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
Public Class SingleDrillUC
|
Public Class SingleDrillUC
|
||||||
' Riferimenti a pagine
|
' Riferimenti a pagine
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
@@ -37,6 +38,8 @@ Public Class SingleDrillUC
|
|||||||
|
|
||||||
Private m_dDiameter As Double = 0
|
Private m_dDiameter As Double = 0
|
||||||
|
|
||||||
|
Private m_sCurrDrill As String = String.Empty
|
||||||
|
|
||||||
' Costanti
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||||
Private Const MIN_CUT_LEN As Double = 10.0
|
Private Const MIN_CUT_LEN As Double = 10.0
|
||||||
@@ -61,14 +64,20 @@ Public Class SingleDrillUC
|
|||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
|
|
||||||
' Assegno messaggi
|
' Assegno messaggi
|
||||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
|
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
||||||
|
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
||||||
|
' rimuovo utensile su uscite 1
|
||||||
|
EgtSetCalcTool("", "H1", 1)
|
||||||
|
' imposto utensile su uscita 2
|
||||||
|
EgtSetCalcTool(m_sCurrDrill, "H1", 2)
|
||||||
' recupero informazioni del foretto usato
|
' recupero informazioni del foretto usato
|
||||||
EgtTdbSetCurrTool(m_CurrentMachine.sCurrDrill)
|
EgtTdbSetCurrTool(m_sCurrDrill)
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
||||||
|
|
||||||
' Attivo la pagina
|
' Attivo la pagina
|
||||||
@@ -130,7 +139,7 @@ Public Class SingleDrillUC
|
|||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||||
' Rimuovo layer temporaneo per crocette
|
' Rimuovo layer temporaneo per crocette
|
||||||
EgtErase(m_nTempLay)
|
EgtErase(m_nTempLay)
|
||||||
' Rimuovo eventuale pezzo per taglio diretto
|
' Rimuovo eventuale pezzo per taglio diretto
|
||||||
@@ -207,21 +216,33 @@ Public Class SingleDrillUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||||
|
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
|
' Ricavo dati lama corrente
|
||||||
|
Dim sDrill As String = m_sCurrDrill
|
||||||
|
If bIsMultiCut Then
|
||||||
|
EgtSetCalcTool(sDrill, "H1", 2)
|
||||||
|
End If
|
||||||
|
|
||||||
' Se acquisizione lama o laser
|
' Se acquisizione lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
|
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
' Ricavo dati Foretto corrente
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
Dim sDrill As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
' Ora imposto la lama corrente
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -229,10 +250,10 @@ Public Class SingleDrillUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' Trasformo in posizione punta utensile in basso
|
||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||||
End If
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -244,10 +265,8 @@ Public Class SingleDrillUC
|
|||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -261,6 +280,42 @@ Public Class SingleDrillUC
|
|||||||
Point1Btn.IsChecked = True
|
Point1Btn.IsChecked = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'Private Sub GetDrillFromDrilling(ByRef sCurrDrill As String)
|
||||||
|
' If String.IsNullOrEmpty(sCurrDrill) Or String.IsNullOrWhiteSpace(sCurrDrill) Then
|
||||||
|
' ' creo l'elenco degli utensili di foratura
|
||||||
|
' Dim sToolName As String = String.Empty
|
||||||
|
' Dim nType As Integer = MCH_TY.NONE
|
||||||
|
' Dim DrillToolList As New ObservableCollection(Of String)
|
||||||
|
' DrillToolList.Clear()
|
||||||
|
' If EgtTdbGetFirstTool(MCH_TF.DRILLBIT, sToolName, nType) Then
|
||||||
|
' DrillToolList.Add(sToolName)
|
||||||
|
' While EgtTdbGetNextTool(MCH_TF.DRILLBIT, sToolName, nType)
|
||||||
|
' DrillToolList.Add(sToolName)
|
||||||
|
' End While
|
||||||
|
' End If
|
||||||
|
' ' recupero l'utensile associato alla lavorazione
|
||||||
|
' Dim sCurrDrilling As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||||
|
' Dim ToolString As String = String.Empty
|
||||||
|
' EgtMdbSetCurrMachining(sCurrDrilling)
|
||||||
|
' ' Recupero nome utensile tramite TUUID
|
||||||
|
' Dim sTuuid As String = String.Empty
|
||||||
|
' EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||||
|
' EgtTdbGetToolFromUUID(sTuuid, ToolString)
|
||||||
|
' Dim bToolExist As Boolean = False
|
||||||
|
' For Each CurrTool As IEnumerable In DrillToolList
|
||||||
|
' If CurrTool.ToString() = ToolString Then
|
||||||
|
' bToolExist = True
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' If bToolExist Then
|
||||||
|
' sCurrDrill = ToolString
|
||||||
|
' Else
|
||||||
|
' sCurrDrill = String.Empty
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
|
||||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||||
' Recupero il valore della coordinata (in 0 Tab)
|
' Recupero il valore della coordinata (in 0 Tab)
|
||||||
Dim dXcoord As Double = 0
|
Dim dXcoord As Double = 0
|
||||||
@@ -300,6 +355,7 @@ Public Class SingleDrillUC
|
|||||||
m_bSimul = True
|
m_bSimul = True
|
||||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||||
@@ -328,8 +384,10 @@ Public Class SingleDrillUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
@@ -340,7 +398,7 @@ Public Class SingleDrillUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreateSingleDrill() As Boolean
|
Private Function CreateSingleDrill() As Boolean
|
||||||
@@ -354,10 +412,11 @@ Public Class SingleDrillUC
|
|||||||
' Spessore grezzo
|
' Spessore grezzo
|
||||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||||
' Recupero spessore lama corrente
|
' Recupero spessore lama corrente
|
||||||
Dim sDrill As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
Dim sDrill As String = m_sCurrDrill
|
||||||
|
GetDrillFromDrilling(sDrill, m_MainWindow.m_CurrentMachine.sCurrDrilling)
|
||||||
EgtTdbSetCurrTool(sDrill)
|
EgtTdbSetCurrTool(sDrill)
|
||||||
Dim dThick As Double = 0
|
Dim dDiam As Double = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
|
||||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||||
EraseDirectCutPart()
|
EraseDirectCutPart()
|
||||||
' Disattivo eventuali lavorazioni presenti
|
' Disattivo eventuali lavorazioni presenti
|
||||||
@@ -387,9 +446,9 @@ Public Class SingleDrillUC
|
|||||||
ptIns.z = dRawHeight
|
ptIns.z = dRawHeight
|
||||||
' Inserisco il pezzo nel grezzo
|
' Inserisco il pezzo nel grezzo
|
||||||
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
||||||
|
EgtSetCurrPhase(1)
|
||||||
' Inserisco la lavorazione
|
' Inserisco la lavorazione
|
||||||
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
||||||
EgtSetCurrPhase(1)
|
|
||||||
' Eventuale eliminazione Home finale
|
' Eventuale eliminazione Home finale
|
||||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||||
RemoveFinalHome()
|
RemoveFinalHome()
|
||||||
|
|||||||
@@ -0,0 +1,162 @@
|
|||||||
|
<UserControl x:Class="SquaringUC"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
|
||||||
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
|
|
||||||
|
<!-- Definizione della Grid MultipleCut -->
|
||||||
|
<Grid Name="SingleCutGrid" >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
</Grid>-->
|
||||||
|
|
||||||
|
<!--<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||||
|
Margin="6,0,6,0">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>-->
|
||||||
|
|
||||||
|
<!--<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||||
|
|
||||||
|
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="OffsetTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
|
<TextBlock Name="ExtraLenTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="ExtraLenTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
|
<!--<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
|
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||||
|
|
||||||
|
<!--<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1.5*"/>
|
||||||
|
<ColumnDefinition Width="2"/>
|
||||||
|
<ColumnDefinition Width="1.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" Background="Black" />
|
||||||
|
|
||||||
|
<TextBlock Name="NumPzXTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
|
||||||
|
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
|
<TextBlock Name="NumPzYTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
|
||||||
|
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<TextBlock Name="SideTxBl" Grid.Row="6" Grid.ColumnSpan="2"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
|
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>-->
|
||||||
|
|
||||||
|
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||||
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,444 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class SquaringUC
|
||||||
|
|
||||||
|
' Riferimenti a pagine
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||||
|
' Flag di pagina attiva
|
||||||
|
Private m_bActive As Boolean = False
|
||||||
|
' Flag di simulazione in corso
|
||||||
|
Private m_bSimul As Boolean = False
|
||||||
|
|
||||||
|
' Origine tavola e dati grezzo
|
||||||
|
Private m_bRawOk As Boolean = False
|
||||||
|
Private m_ptTabOri As Point3d
|
||||||
|
Private m_ptRawMin As Point3d
|
||||||
|
Private m_ptRawMax As Point3d
|
||||||
|
' Parametri P1 acquisito
|
||||||
|
Private m_ptTipP1 As Point3d
|
||||||
|
Private m_vtToolP1 As Vector3d
|
||||||
|
' Parametri P2 acquisito
|
||||||
|
Private m_ptTipP2 As Point3d
|
||||||
|
Private m_vtToolP2 As Vector3d
|
||||||
|
' Parametri della lavorazione
|
||||||
|
Private m_bCutOk As Boolean = False
|
||||||
|
Private m_dDepth As Double = 0
|
||||||
|
Private m_dOffsetSquaring As Double = 150
|
||||||
|
Private m_dExtraLength As Double = 0
|
||||||
|
Private m_dAngO As Double = 180
|
||||||
|
Private m_dAngV As Double = 0
|
||||||
|
Private m_nNumX As Integer = 0
|
||||||
|
Private m_dDimX As Double = 0
|
||||||
|
Private m_nNumY As Integer = 0
|
||||||
|
Private m_dDimY As Double = 0
|
||||||
|
Private m_bHeadSide As Boolean = False
|
||||||
|
|
||||||
|
' Punto selezionato nel disegno
|
||||||
|
Private m_ptPrev As Point3d
|
||||||
|
' Layer per crocette temporanee
|
||||||
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
|
' Costanti
|
||||||
|
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||||
|
Private Const MIN_CUT_LEN As Double = 10.0
|
||||||
|
Private Const MAX_SIDE_ANG As Double = 60.0
|
||||||
|
|
||||||
|
'Costante che indica il lato in cui posizionare i tagli
|
||||||
|
Private Enum CutSide As Integer
|
||||||
|
Left
|
||||||
|
Right
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private Sub GridCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||||
|
' 90260=Extra length
|
||||||
|
ExtraLenTxBl.Text = EgtMsg(90260)
|
||||||
|
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||||
|
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||||
|
|
||||||
|
' Carico i dati dell'ultimo taglio
|
||||||
|
m_dOffsetSquaring = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_OFFSET_SQUARING, m_dOffsetSquaring, m_MainWindow.GetIniFile())
|
||||||
|
m_dExtraLength = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_EXTRA_LEN_SQUARING, m_dExtraLength, m_MainWindow.GetIniFile())
|
||||||
|
m_dDepth = 0
|
||||||
|
m_dAngO = 90
|
||||||
|
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||||
|
m_nNumX = 1
|
||||||
|
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||||
|
m_nNumY = 1
|
||||||
|
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
||||||
|
m_bHeadSide = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Squaring_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
|
' Attivo la pagina
|
||||||
|
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||||
|
m_bActive = True
|
||||||
|
' Se rientro da simulazione
|
||||||
|
If m_bSimul Then
|
||||||
|
m_bSimul = False
|
||||||
|
' Disabilito registrazione progetto modificato
|
||||||
|
EgtDisableModified()
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||||
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
|
EgtDraw()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Disabilito registrazione progetto modificato
|
||||||
|
EgtDisableModified()
|
||||||
|
' Creo layer temporaneo per crocette
|
||||||
|
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
|
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||||
|
' Origine tavola
|
||||||
|
m_bRawOk = True
|
||||||
|
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||||
|
m_bRawOk = False
|
||||||
|
EgtOutLog("Error on TableRef1")
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Dati del grezzo
|
||||||
|
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
|
||||||
|
m_bRawOk = False
|
||||||
|
EgtOutLog("Error on RawBox")
|
||||||
|
End If
|
||||||
|
' calcolo lalavorazione di squadratura
|
||||||
|
RefreshSquaring()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RefreshSquaring()
|
||||||
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
Dim m_ThickSaw As Double
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, m_ThickSaw)
|
||||||
|
|
||||||
|
m_dDepth = CamAuto.GetRawHeight()
|
||||||
|
m_dDimX = Math.Abs(m_ptRawMax.x - m_ptRawMin.x) - 2 * (m_dOffsetSquaring)
|
||||||
|
m_dDimY = Math.Abs(m_ptRawMax.y - m_ptRawMin.y) - 2 * (m_dOffsetSquaring)
|
||||||
|
|
||||||
|
Dim ptStart As New Point3d(m_ptRawMin.x + m_dOffsetSquaring - m_ThickSaw, m_ptRawMin.y + m_dOffsetSquaring, m_ptRawMin.z)
|
||||||
|
Dim ptEnd As New Point3d(ptStart.x + m_dDimX, ptStart.y, m_ptRawMin.z)
|
||||||
|
|
||||||
|
SetCoordVisibility(True)
|
||||||
|
ShowCoord()
|
||||||
|
|
||||||
|
OffsetTxBx.Text = LenToString(m_dOffsetSquaring, 1)
|
||||||
|
ExtraLenTxBx.Text = LenToString(m_dExtraLength, 1)
|
||||||
|
m_bCutOk = False
|
||||||
|
UpdateSimulOkBtn()
|
||||||
|
|
||||||
|
SquaringPoint(ptStart, ptEnd)
|
||||||
|
m_ptPrev = ptStart
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub Squaring_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
|
' Salvo i dati correnti
|
||||||
|
' Salvo i dati correnti
|
||||||
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_OFFSET_SQUARING, DoubleToString(m_dOffsetSquaring, 2), m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_EXTRA_LEN_SQUARING, DoubleToString(m_dExtraLength, 2), m_MainWindow.GetIniFile())
|
||||||
|
' Se non vado in simulazione
|
||||||
|
If Not m_bSimul Then
|
||||||
|
' Dichiaro sottopagina da non riattivare
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||||
|
' Rimuovo layer temporaneo per crocette
|
||||||
|
EgtErase(m_nTempLay)
|
||||||
|
' Rimuovo eventuale pezzo per taglio diretto
|
||||||
|
EraseDirectCutPart()
|
||||||
|
' Riattivo eventuali lavorazioni presenti
|
||||||
|
ActivateAllMachinings()
|
||||||
|
' Abilito registrazione progetto modificato
|
||||||
|
EgtEnableModified()
|
||||||
|
' Nascondo la macchina
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||||
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
' Dichiaro pagina non attiva
|
||||||
|
m_bActive = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UpdateSimulOkBtn()
|
||||||
|
If m_bCutOk Then
|
||||||
|
SimulBtn.IsEnabled = True
|
||||||
|
SimulBtn.Foreground = Brushes.Black
|
||||||
|
OkBtn.IsEnabled = True
|
||||||
|
OkBtn.Foreground = Brushes.Black
|
||||||
|
Else
|
||||||
|
SimulBtn.IsEnabled = False
|
||||||
|
SimulBtn.Foreground = Brushes.DarkGray
|
||||||
|
OkBtn.IsEnabled = False
|
||||||
|
OkBtn.Foreground = Brushes.DarkGray
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SquaringPoint(ptMin As Point3d, ptMax As Point3d)
|
||||||
|
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||||
|
EgtEmptyGroup(m_nTempLay)
|
||||||
|
' Verifico configurazione tavola e grezzo
|
||||||
|
If Not m_bRawOk Then Return
|
||||||
|
|
||||||
|
' Recupero dati utensile e testa corrente
|
||||||
|
Dim sTool As String = ""
|
||||||
|
Dim sHead As String = ""
|
||||||
|
Dim nExit As Integer = 0
|
||||||
|
EgtGetCalcTool(sTool, sHead, nExit)
|
||||||
|
'------------- BOTTOM LEFT -------------------
|
||||||
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
|
m_ptTipP1 = ptMin
|
||||||
|
' Porto il tip nell'origine tavola
|
||||||
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
|
' Reimposto eventuale precedente utensile
|
||||||
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
'------------- TOP RIGHT -------------------
|
||||||
|
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||||
|
m_ptTipP2 = ptMax
|
||||||
|
' Porto il tip nell'origine tavola
|
||||||
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
|
' Reimposto eventuale precedente utensile
|
||||||
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
|
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||||
|
Dim vtDiff As Vector3d = m_ptTipP2 - m_ptTipP1
|
||||||
|
vtDiff.z = 0
|
||||||
|
Dim dLen As Double
|
||||||
|
Dim dAngVertDeg As Double
|
||||||
|
Dim dAngOrizzDeg As Double
|
||||||
|
vtDiff.ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||||
|
If dLen > EPS_SMALL Then
|
||||||
|
m_dAngO = dAngOrizzDeg
|
||||||
|
CreateGridCut()
|
||||||
|
' visuliazzo tavola
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||||
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OffsetTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsetTxBx.EgtClosed
|
||||||
|
' Verifico che l'offset impostato non sia superiore a quello massimo
|
||||||
|
Dim dMaxOffset As Double = Math.Min(m_dDimX, m_dDimY) / 2 - 15
|
||||||
|
Dim dOffset As Double = 0
|
||||||
|
StringToLen(OffsetTxBx.Text, dOffset)
|
||||||
|
If dOffset < 0 Then
|
||||||
|
dOffset = 0
|
||||||
|
ElseIf dOffset > dMaxOffset Then
|
||||||
|
dOffset = dMaxOffset
|
||||||
|
End If
|
||||||
|
m_dOffsetSquaring = dOffset
|
||||||
|
OffsetTxBx.Text = LenToString(m_dOffsetSquaring, 2)
|
||||||
|
' Disegno il taglio
|
||||||
|
RefreshSquaring()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ExtraLength_EgtClosed(sender As Object, e As EventArgs) Handles ExtraLenTxBx.EgtClosed
|
||||||
|
' Verifico che il valore indicato sia almeno maggiore dell'offset indicato
|
||||||
|
Dim dOffset As Double = 0
|
||||||
|
StringToLen(OffsetTxBx.Text, dOffset)
|
||||||
|
Dim MadExtraLeng As Double = Math.Abs(dOffset)
|
||||||
|
Dim dExtraLen As Double
|
||||||
|
StringToLen(ExtraLenTxBx.Text, dExtraLen)
|
||||||
|
If dExtraLen < 0 AndAlso dExtraLen < -MadExtraLeng Then
|
||||||
|
dExtraLen = 0
|
||||||
|
End If
|
||||||
|
m_dExtraLength = dExtraLen
|
||||||
|
ExtraLenTxBx.Text = LenToString(m_dExtraLength, 2)
|
||||||
|
' Disegno il taglio
|
||||||
|
RefreshSquaring()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
|
||||||
|
' Verifico ci sia un taglio valido
|
||||||
|
If Not m_bCutOk Then Return
|
||||||
|
' Salvo il progetto con le lavorazioni
|
||||||
|
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||||
|
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||||
|
' Predispongo passaggio a simulazione
|
||||||
|
m_bSimul = True
|
||||||
|
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||||
|
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||||
|
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||||
|
m_MainWindow.m_ActivePage = MainWindow.Pages.Simulation
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
|
#If TRIAL Then
|
||||||
|
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||||
|
#Else
|
||||||
|
' Verifico non sia versione Ufficio
|
||||||
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||||
|
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Verifico ci sia un taglio valido
|
||||||
|
If Not m_bCutOk Then Return
|
||||||
|
' Salvo il progetto con le lavorazioni
|
||||||
|
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||||
|
' Genero file CNC (lancio anche se errore in precedenza)
|
||||||
|
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||||
|
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut ver." & m_MainWindow.GetVersion())
|
||||||
|
' Se errore in generazione, segnalo l'errore ed esco
|
||||||
|
If Not bOk Then
|
||||||
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
|
' lancio eventuale lua post-trasmissione
|
||||||
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
|
End If
|
||||||
|
#End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function CreateGridCut() As Boolean
|
||||||
|
' Verifico sia definito il punto iniziale e il grezzo
|
||||||
|
If Not m_bRawOk Then
|
||||||
|
m_bCutOk = False
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
' Spessore grezzo
|
||||||
|
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||||
|
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||||
|
EraseDirectCutPart()
|
||||||
|
' Disattivo eventuali lavorazioni presenti
|
||||||
|
DeactivateAllMachinings()
|
||||||
|
' Creo nuovo pezzo per il taglio diretto
|
||||||
|
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
|
EgtSetName(nPartId, NAME_DIRECTCUT)
|
||||||
|
Dim nLayerId = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||||
|
' Creo il taglio parallelo alla lama
|
||||||
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
ptStart.z = 0
|
||||||
|
' Funzione che crea i tagli successivi al primo
|
||||||
|
MultiplyCut(nLayerId)
|
||||||
|
' Calcolo punto di inserimento nel grezzo
|
||||||
|
Dim ptMin, ptMax As Point3d
|
||||||
|
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||||
|
Dim ptIns As Point3d = ptMin + (m_ptTabOri - m_ptRawMin)
|
||||||
|
ptIns.z = dRawHeight
|
||||||
|
' Inserisco il pezzo nel grezzo
|
||||||
|
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
||||||
|
' Inserisco la lavorazione
|
||||||
|
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
||||||
|
EgtSetCurrPhase(1)
|
||||||
|
' Eventuale eliminazione Home finale
|
||||||
|
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||||
|
RemoveFinalHome()
|
||||||
|
End If
|
||||||
|
UpdateSimulOkBtn()
|
||||||
|
Return m_bCutOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function MultiplyCut(nLayerId As Integer) As Boolean
|
||||||
|
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
|
||||||
|
Dim nType As Integer = 0
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||||
|
Dim dThick As Double = 0
|
||||||
|
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
|
||||||
|
' Ricalcolo lo spessore in base all'inclinazione
|
||||||
|
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
||||||
|
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
|
||||||
|
Dim dRotAngOX As Double = 90
|
||||||
|
' Recupero dati da interfaccia
|
||||||
|
Dim dDimPzX As Double = m_dDimX
|
||||||
|
Dim nNumPzX As Integer = m_nNumX
|
||||||
|
Dim dDimPzY As Double = m_dDimY
|
||||||
|
Dim nNumPzY As Integer = m_nNumY
|
||||||
|
' Definisco vettore di spostamento
|
||||||
|
Dim vtDelta As Vector3d
|
||||||
|
' Calcolo primo taglio parallelo
|
||||||
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
|
ptStart.z = 0
|
||||||
|
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||||
|
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||||
|
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||||
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
|
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||||
|
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||||
|
' Allungo la geometria
|
||||||
|
EgtExtendCurveStartByLen(nCutParaId, m_dOffsetSquaring + m_dExtraLength)
|
||||||
|
EgtExtendCurveEndByLen(nCutParaId, m_dOffsetSquaring + +m_dExtraLength)
|
||||||
|
' Calcolo vettore di spostamento
|
||||||
|
vtDelta = Vector3d.FromPolar((dDimPzY + dThick), m_dAngO)
|
||||||
|
' Ruoto il vettore di traslazione
|
||||||
|
vtDelta.Rotate(Vector3d.Z_AX, dRotAngOX)
|
||||||
|
For Index As Integer = 1 To nNumPzY
|
||||||
|
Dim vtPerpMove As Vector3d = Index * vtDelta
|
||||||
|
' Creo copie
|
||||||
|
Dim nCut2Id = EgtCopyGlob(nCutParaId, nLayerId)
|
||||||
|
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
||||||
|
Next
|
||||||
|
' Calcolo primo taglio perpendicolare
|
||||||
|
Dim dLenY As Double = dThick + (dDimPzY + dThick) * nNumPzY
|
||||||
|
' Arretro il punto di partenza di uno spessore lama
|
||||||
|
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
||||||
|
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
|
||||||
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
|
EgtSetInfo(nCutPerpId, INFO_DEPTH, m_dDepth)
|
||||||
|
EgtSetInfo(nCutPerpId, INFO_SIDE_ANGLE, m_dAngV)
|
||||||
|
' Allungo la geometria
|
||||||
|
EgtExtendCurveStartByLen(nCutPerpId, m_dOffsetSquaring + m_dExtraLength)
|
||||||
|
EgtExtendCurveEndByLen(nCutPerpId, m_dOffsetSquaring + +m_dExtraLength)
|
||||||
|
' Calcolo secondo vettore di spostamento
|
||||||
|
vtDelta = Vector3d.FromPolar((dDimPzX + dThick), m_dAngO)
|
||||||
|
For Index As Integer = 1 To nNumPzX
|
||||||
|
Dim vtPerpMove As Vector3d = vtDelta * Index
|
||||||
|
' Creo copie
|
||||||
|
Dim nCut3Id = EgtCopyGlob(nCutPerpId, nLayerId)
|
||||||
|
EgtMove(nCut3Id, vtPerpMove, GDB_RT.GLOB)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub SetCoordVisibility(bShow As Boolean)
|
||||||
|
XcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
|
XcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
|
YcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
|
YcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ShowCoord()
|
||||||
|
Dim ptText As Point3d = m_ptPrev
|
||||||
|
ptText.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
|
XcoordTxBx.Text = LenToString(ptText.x, 2)
|
||||||
|
YcoordTxBx.Text = LenToString(ptText.y, 2)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function SetMachineInCurrPos() As Boolean
|
||||||
|
' Recupero la posizione macchina
|
||||||
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False
|
||||||
|
' Recupero il nome degli assi macchina
|
||||||
|
Dim sL1 As String = String.Empty
|
||||||
|
Dim sL2 As String = String.Empty
|
||||||
|
Dim sL3 As String = String.Empty
|
||||||
|
Dim sR1 As String = String.Empty
|
||||||
|
Dim sR2 As String = String.Empty
|
||||||
|
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
|
||||||
|
' Visualizzo macchina in posizione
|
||||||
|
EgtSetAxisPos(sL1, dL1)
|
||||||
|
EgtSetAxisPos(sL2, dL2)
|
||||||
|
EgtSetAxisPos(sL3, dL3)
|
||||||
|
EgtSetAxisPos(sR1, dR1)
|
||||||
|
EgtSetAxisPos(sR2, dR2)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
@@ -22,6 +22,9 @@ Public Class VacuumMachineButtonUC
|
|||||||
Friend m_CN As CN_generico
|
Friend m_CN As CN_generico
|
||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
|
' visualizzo l'elenco degli elementi della pagina sono al primo avvio
|
||||||
|
Friend m_OutLogTypeButton As Boolean = True
|
||||||
|
|
||||||
' Creazione converter da String a ImageSource
|
' Creazione converter da String a ImageSource
|
||||||
Dim ImageConverter As New ImageSourceConverter
|
Dim ImageConverter As New ImageSourceConverter
|
||||||
|
|
||||||
@@ -71,10 +74,37 @@ Public Class VacuumMachineButtonUC
|
|||||||
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
|
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
OutLogTypeButton(MachineButton)
|
||||||
|
Next
|
||||||
|
m_OutLogTypeButton = False
|
||||||
|
|
||||||
NotifyPropertyChanged("ButtonList")
|
NotifyPropertyChanged("ButtonList")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "STATE CHANGED"
|
||||||
|
' ------------------------------------------------------------------------------
|
||||||
|
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
|
||||||
|
'-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Friend Sub OutLogTypeButton(CurrMachineButton As MachineButton)
|
||||||
|
If Not m_OutLogTypeButton Then Return
|
||||||
|
Dim BtnType As Type = CurrMachineButton.GetType
|
||||||
|
If BtnType Is GetType(NoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(0) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(TwoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(1) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(ThreeStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(2) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(DoubleCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(3) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(PressedCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(4) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub VacuumUpChanged(VacuumUpState As Boolean)
|
Friend Sub VacuumUpChanged(VacuumUpState As Boolean)
|
||||||
Dim VacuumUpButton As TwoStateButton = Nothing
|
Dim VacuumUpButton As TwoStateButton = Nothing
|
||||||
For Each MachineButton As MachineButton In m_ButtonList
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
@@ -371,6 +401,8 @@ Public Class VacuumMachineButtonUC
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' State Range
|
||||||
|
|
||||||
Public Function GetPrivateProfileMachineButtons(
|
Public Function GetPrivateProfileMachineButtons(
|
||||||
ByVal lpAppName As String,
|
ByVal lpAppName As String,
|
||||||
ByVal lpKeyName As String,
|
ByVal lpKeyName As String,
|
||||||
|
|||||||
@@ -165,12 +165,13 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.55*"/>
|
||||||
|
<RowDefinition Height="0.55*"/>
|
||||||
|
<RowDefinition Height="0.55*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<!--<RowDefinition Height="1*"/>-->
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- Altezza delle alette -->
|
||||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
Text="Offset"
|
Text="Offset"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
@@ -187,22 +188,36 @@
|
|||||||
Width="60" Height="30" Margin="0,0,0,0"
|
Width="60" Height="30" Margin="0,0,0,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
|
<!-- Delta angolo (abilitato solo per i frontalini) -->
|
||||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||||
Text="Offset2"
|
Text="Offset2"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
|
<!-- temporaneamente disabilito la definizione delta angolo per alzatine -->
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2ATxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter2ATxBx"
|
||||||
|
IsEnabled="False"
|
||||||
|
Visibility="Collapsed"
|
||||||
Grid.Column="2" Grid.Row="1"
|
Grid.Column="2" Grid.Row="1"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Width="60" Height="30" Margin="0,0,0,0"
|
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2FTxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter2FTxBx"
|
||||||
Grid.Column="3" Grid.Row="1"
|
Grid.Column="3" Grid.Row="1"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
|
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
|
<!-- Spessore aletta -->
|
||||||
|
<TextBlock Name="Parameter5TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||||
|
Text="Offset2"
|
||||||
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||||
|
Grid.Column="2" Grid.Row="2"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
Width="60" Height="30" Margin="0,0,0,0"
|
Width="60" Height="30" Margin="0,0,0,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<!--Gestisco nello spazio di una TextBox due TextBoxs--><!--
|
<!--Gestisco nello spazio di una TextBox due TextBoxs--><!--
|
||||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||||
@@ -236,7 +251,7 @@
|
|||||||
Width="85" Height="30"
|
Width="85" Height="30"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||||
|
|
||||||
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="2">
|
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
|
||||||
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
|
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
|
||||||
<Button Name="Vuoto" Visibility="Hidden"/>
|
<Button Name="Vuoto" Visibility="Hidden"/>
|
||||||
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
|
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ Public Class AlzFrontUC
|
|||||||
|
|
||||||
' nome della info riferita alle alzatine e ai frontalini (1=Alz, 2=Front, 0=niente)
|
' nome della info riferita alle alzatine e ai frontalini (1=Alz, 2=Front, 0=niente)
|
||||||
Private Const INFO_ALZFRONT As String = "AF"
|
Private Const INFO_ALZFRONT As String = "AF"
|
||||||
|
Private Const INFO_ENABLE As String = "EnableAF"
|
||||||
|
|
||||||
' Properties
|
' Properties
|
||||||
Private m_sCompoDir As String = String.Empty
|
Private m_sCompoDir As String = String.Empty
|
||||||
@@ -75,8 +76,9 @@ Public Class AlzFrontUC
|
|||||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||||
|
|
||||||
' nome dei parametri condivisi
|
' nome dei parametri condivisi
|
||||||
Parameter1TxBl.Text = "Altezza"
|
Parameter1TxBl.Text = EgtMsg(91134)
|
||||||
Parameter2TxBl.Text = "Delta angolo"
|
Parameter2TxBl.Text = EgtMsg(91135)
|
||||||
|
Parameter5TxBl.Text = EgtMsg(91136)
|
||||||
|
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -94,10 +96,17 @@ Public Class AlzFrontUC
|
|||||||
Dim LabelId As Integer = GDB_ID.NULL
|
Dim LabelId As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
' definisco i valori delle altezza e degli angoli di spoglia per le alzatine e i frontalini (letti da file ini del programma)
|
' definisco i valori delle altezza e degli angoli di spoglia per le alzatine e i frontalini (letti da file ini del programma)
|
||||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", Parameter1ATxBx.Text, m_MainWindow.GetIniFile)
|
Dim sVal As String = String.Empty
|
||||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile)
|
Dim dVal As Double = 0
|
||||||
|
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", sVal, m_MainWindow.GetIniFile)
|
||||||
|
Utility.StringToDouble(sVal, dVal)
|
||||||
|
Parameter1ATxBx.Text = Utility.LenToString(dVal, 4)
|
||||||
|
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", sVal, m_MainWindow.GetIniFile)
|
||||||
|
Utility.StringToDouble(sVal, dVal)
|
||||||
|
Parameter1FTxBx.Text = Utility.LenToString(dVal, 4)
|
||||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_DELTA_ANG, "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile)
|
GetPrivateProfileString(S_ALZFRONT, K_ALZ_DELTA_ANG, "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile)
|
||||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_DELTA_ANG, "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile)
|
GetPrivateProfileString(S_ALZFRONT, K_FRONT_DELTA_ANG, "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile)
|
||||||
|
Parameter5TxBx.Text = Utility.LenToString(m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight, 2)
|
||||||
|
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||||
@@ -138,31 +147,41 @@ Public Class AlzFrontUC
|
|||||||
|
|
||||||
' inserisco il lato nella lista
|
' inserisco il lato nella lista
|
||||||
While CurrLine <> GDB_ID.NULL
|
While CurrLine <> GDB_ID.NULL
|
||||||
' escludo tutte le forme che non sono delle linee
|
Dim NextId As Integer = EgtGetNext(CurrLine)
|
||||||
If EgtGetType(CurrLine) = GDB_TY.CRV_LINE Then
|
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup(LoopId)
|
||||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere una alzatina o un frontalino
|
If VerifySideAnglePossible(PrevLine, CurrLine, NextId, bOutLoop) Then
|
||||||
Dim sNameCurrLine As String = String.Empty
|
|
||||||
Dim nInfo As Integer = 0
|
|
||||||
Dim dSideAng As Integer = 0
|
|
||||||
EgtSetName(CurrLine, "A" & nEntityIndex.ToString)
|
|
||||||
EgtGetName(CurrLine, sNameCurrLine)
|
|
||||||
' inserisco la numerazione dei lati della figura
|
|
||||||
AddTextToLine(sNameCurrLine, LabelId, CurrLine, 20, m_dBBoxRad, True)
|
|
||||||
' recupero l'informazione
|
|
||||||
EgtGetInfo(CurrLine, INFO_ALZFRONT, nInfo)
|
|
||||||
If nInfo = 1 Then
|
|
||||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.ALZATINA))
|
|
||||||
ElseIf nInfo = 2 Then
|
|
||||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.FRONTALINO))
|
|
||||||
Else
|
|
||||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine))
|
|
||||||
End If
|
|
||||||
nEntityIndex += 1
|
|
||||||
Else
|
|
||||||
EgtSetName(CurrLine, "B" & nOtherIndex.ToString)
|
|
||||||
nOtherIndex = nOtherIndex + 1
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
If ApprovedSideToAlzFront(CurrLine) Then
|
||||||
|
' Aggiungo il lato alla lista di quelli su cui è possibile mettere una alzatina o un frontalino
|
||||||
|
Dim sNameCurrLine As String = String.Empty
|
||||||
|
Dim nInfo As Integer = 0
|
||||||
|
Dim dSideAng As Integer = 0
|
||||||
|
EgtSetName(CurrLine, "A" & nEntityIndex.ToString)
|
||||||
|
EgtGetName(CurrLine, sNameCurrLine)
|
||||||
|
' inserisco la numerazione dei lati della figura
|
||||||
|
AddTextToLine(sNameCurrLine, LabelId, CurrLine, 20, m_dBBoxRad, True)
|
||||||
|
' recupero l'informazione
|
||||||
|
EgtGetInfo(CurrLine, INFO_ALZFRONT, nInfo)
|
||||||
|
If nInfo = 1 Then
|
||||||
|
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.ALZATINA))
|
||||||
|
ElseIf nInfo = 2 Then
|
||||||
|
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.FRONTALINO))
|
||||||
|
Else
|
||||||
|
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine))
|
||||||
|
End If
|
||||||
|
' inserisco riferimento univoco al lato (solo se non esiste)
|
||||||
|
Dim sInfoRef As String = String.Empty
|
||||||
|
EgtGetInfo(CurrLine, "RefAF", sInfoRef)
|
||||||
|
If String.IsNullOrEmpty(sInfoRef) Then
|
||||||
|
Dim sRefGUID As String = System.Guid.NewGuid().ToString()
|
||||||
|
EgtSetInfo(CurrLine, "RefAF", sRefGUID)
|
||||||
|
End If
|
||||||
|
nEntityIndex += 1
|
||||||
|
Else
|
||||||
|
EgtSetName(CurrLine, "B" & nOtherIndex.ToString)
|
||||||
|
nOtherIndex = nOtherIndex + 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
PrevLine = CurrLine
|
PrevLine = CurrLine
|
||||||
CurrLine = EgtGetNext(CurrLine)
|
CurrLine = EgtGetNext(CurrLine)
|
||||||
End While
|
End While
|
||||||
@@ -266,6 +285,26 @@ Public Class AlzFrontUC
|
|||||||
bInternalSelection = False
|
bInternalSelection = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' restituisce vero se il lato possiede delle info legate al sideangle
|
||||||
|
Private Function VerifyIsThereSideAngle(nCurrLine As Integer) As Boolean
|
||||||
|
Dim dSideAngle As Double
|
||||||
|
return EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, dSideAngle)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' restituisce vero se il lato possiede delle info legate alle alette
|
||||||
|
Private Function VerifyIsThereAlzFront(nCurrLine As Integer) As Boolean
|
||||||
|
Dim nAlzFront As Integer
|
||||||
|
return EgtGetInfo(nCurrLine, INFO_ALZFRONT, nAlzFront) AndAlso nAlzFront <> 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' approvo la costruzione dell'aletta sul lato indicato
|
||||||
|
Private Function ApprovedSideToAlzFront(nCurrLine As Integer) As Boolean
|
||||||
|
If VerifyIsThereSideAngle(nCurrLine) And Not VerifyIsThereAlzFront(nCurrLine) Then
|
||||||
|
' se esiste SideAngle e un'aletta allora NON approvo
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
' Permette di aggiugere accanto alla linea passata
|
' Permette di aggiugere accanto alla linea passata
|
||||||
Friend Function AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double,
|
Friend Function AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double,
|
||||||
@@ -574,9 +613,9 @@ Public Class AlzFrontUC
|
|||||||
Private Sub ParameterA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1ATxBx.EgtClosed
|
Private Sub ParameterA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1ATxBx.EgtClosed
|
||||||
' Nuovo angolo di inclinazione
|
' Nuovo angolo di inclinazione
|
||||||
Dim dValue As Double
|
Dim dValue As Double
|
||||||
StringToDouble(Parameter1ATxBx.Text, dValue)
|
StringToLen(Parameter1ATxBx.Text, dValue)
|
||||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||||
WritePrivateProfileString("Alz&Front", "A_Height", Parameter1ATxBx.Text, m_MainWindow.GetIniFile())
|
WritePrivateProfileString("Alz&Front", "A_Height", DoubleToString(dValue, 3), m_MainWindow.GetIniFile())
|
||||||
' aggiorno il disegno
|
' aggiorno il disegno
|
||||||
LoadCurrentCompo()
|
LoadCurrentCompo()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -585,9 +624,9 @@ Public Class AlzFrontUC
|
|||||||
Private Sub Parameter1FTxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1FTxBx.EgtClosed
|
Private Sub Parameter1FTxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1FTxBx.EgtClosed
|
||||||
' Nuovo angolo di inclinazione
|
' Nuovo angolo di inclinazione
|
||||||
Dim dValue As Double
|
Dim dValue As Double
|
||||||
StringToDouble(Parameter1FTxBx.Text, dValue)
|
StringToLen(Parameter1FTxBx.Text, dValue)
|
||||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||||
WritePrivateProfileString("Alz&Front", "F_Height", Parameter1FTxBx.Text, m_MainWindow.GetIniFile())
|
WritePrivateProfileString("Alz&Front", "F_Height", DoubleToString(dValue, 3), m_MainWindow.GetIniFile())
|
||||||
' aggiorno il disegno
|
' aggiorno il disegno
|
||||||
LoadCurrentCompo()
|
LoadCurrentCompo()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -614,6 +653,13 @@ Public Class AlzFrontUC
|
|||||||
LoadCurrentCompo()
|
LoadCurrentCompo()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Parameter5TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter5TxBx.EgtClosed
|
||||||
|
Dim dValue As Double
|
||||||
|
StringToDouble(Parameter5TxBx.Text, dValue)
|
||||||
|
' aggiorno il disegno
|
||||||
|
LoadCurrentCompo()
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Altezza, delta angolo di spoglia
|
#End Region ' Altezza, delta angolo di spoglia
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
@@ -749,6 +795,9 @@ Public Class AlzFrontUC
|
|||||||
If StringToLen(Parameter2FTxBx.Text, dVal) Then
|
If StringToLen(Parameter2FTxBx.Text, dVal) Then
|
||||||
EgtLuaSetGlobNumVar("CMP.F_DeltaAng", dVal)
|
EgtLuaSetGlobNumVar("CMP.F_DeltaAng", dVal)
|
||||||
End If
|
End If
|
||||||
|
If StringToLen(Parameter5TxBx.Text, dVal) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMP.ThicknessRaw", dVal)
|
||||||
|
End If
|
||||||
' parametri per la scrittura dei caratteri
|
' parametri per la scrittura dei caratteri
|
||||||
EgtLuaSetGlobNumVar("CMP.BBoxRad", m_dBBoxRad)
|
EgtLuaSetGlobNumVar("CMP.BBoxRad", m_dBBoxRad)
|
||||||
EgtLuaSetGlobNumVar("CMP.HeightText", m_dH)
|
EgtLuaSetGlobNumVar("CMP.HeightText", m_dH)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Public Class CompoDimensionUC
|
|||||||
InternComponentBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 47) ' Componenti interni
|
InternComponentBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 47) ' Componenti interni
|
||||||
If Not String.IsNullOrEmpty(sCompoDir) Then
|
If Not String.IsNullOrEmpty(sCompoDir) Then
|
||||||
bEnableAlzFront = True
|
bEnableAlzFront = True
|
||||||
AlzFrontBtn.Content = "Alzatine & Frontalini"
|
AlzFrontBtn.Content = EgtMsg(91137)
|
||||||
Else
|
Else
|
||||||
AlzFrontBtn.Visibility = Visibility.Collapsed
|
AlzFrontBtn.Visibility = Visibility.Collapsed
|
||||||
End If
|
End If
|
||||||
@@ -75,6 +75,7 @@ Public Class CompoDimensionUC
|
|||||||
m_DrawPage.sCompoName.StartsWith("PBagno") Then
|
m_DrawPage.sCompoName.StartsWith("PBagno") Then
|
||||||
ShowInternalBtn(True)
|
ShowInternalBtn(True)
|
||||||
ShowAlzFrontBtn(bEnableAlzFront)
|
ShowAlzFrontBtn(bEnableAlzFront)
|
||||||
|
m_DrawPage.MessageGrid.Visibility = Visibility.Hidden
|
||||||
Else
|
Else
|
||||||
ShowInternalBtn(False)
|
ShowInternalBtn(False)
|
||||||
ShowAlzFrontBtn(False)
|
ShowAlzFrontBtn(False)
|
||||||
@@ -106,8 +107,10 @@ Public Class CompoDimensionUC
|
|||||||
Friend Sub ShowAlzFrontBtn(ByVal value As Boolean)
|
Friend Sub ShowAlzFrontBtn(ByVal value As Boolean)
|
||||||
If value Then
|
If value Then
|
||||||
AlzFrontBtn.Visibility = Visibility.Visible
|
AlzFrontBtn.Visibility = Visibility.Visible
|
||||||
|
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Hidden
|
||||||
Else
|
Else
|
||||||
AlzFrontBtn.Visibility = Visibility.Hidden
|
AlzFrontBtn.Visibility = Visibility.Hidden
|
||||||
|
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -336,6 +339,7 @@ Public Class CompoDimensionUC
|
|||||||
Dim nCmpInfo As Integer = 0
|
Dim nCmpInfo As Integer = 0
|
||||||
If EgtGetInfo(nId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
If EgtGetInfo(nId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||||
EgtSetStatus(nId, GDB_ST.OFF)
|
EgtSetStatus(nId, GDB_ST.OFF)
|
||||||
|
UpdateInLoopReference(nCmp)
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
nId = EgtGetNextName(nId, "HoleLabels")
|
nId = EgtGetNextName(nId, "HoleLabels")
|
||||||
@@ -379,5 +383,42 @@ Public Class CompoDimensionUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UpdateInLoopReference(nCmp As Integer)
|
||||||
|
' aggiorno il layer "FiloTop"
|
||||||
|
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||||
|
While nIdInLoop <> GDB_ID.NULL
|
||||||
|
Dim nCmpInfoIL As Integer = 0
|
||||||
|
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||||
|
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||||
|
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||||
|
If nLayFiloTop <> GDB_ID.NULL Then
|
||||||
|
Dim LocalList As New List(Of Integer) From {nIdInLoop}
|
||||||
|
m_DrawPage.m_FiloTopUC.CreateFiloTopPreView(LocalList)
|
||||||
|
EgtSetStatus(nLayFiloTop, GDB_ST.ON_)
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' riceve la info "ID" della componente
|
||||||
|
Public Sub SetStatusVisibilityInLoopReference(nCmp As Integer, Status As GDB_ST)
|
||||||
|
' aggiorno il layer "FiloTop"
|
||||||
|
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||||
|
While nIdInLoop <> GDB_ID.NULL
|
||||||
|
Dim nCmpInfoIL As Integer = 0
|
||||||
|
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||||
|
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||||
|
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||||
|
If nLayFiloTop <> GDB_ID.NULL Then
|
||||||
|
EgtSetStatus(nLayFiloTop, Status)
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' METHODS for InternalCompo
|
#End Region ' METHODS for InternalCompo
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ Public Class CompoTrfData
|
|||||||
|
|
||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
DialogResult = True
|
DialogResult = True
|
||||||
|
SaveData()
|
||||||
Close()
|
Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -32,7 +33,30 @@ Public Class CompoTrfData
|
|||||||
Close()
|
Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SaveData()
|
||||||
|
WritePrivateProfileString(S_TRF, K_ORDCODE, OrdCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_TRF, K_ORDDESC, OrdDescTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_TRF, K_PARTCODE, PartCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_TRF, K_MATCODE, MatCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_TRF, K_SURFCODE, SurfCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
' prima di salvare lo spessore converto in mm e poi di nuovo in stringa
|
||||||
|
Dim dVal As Double = 0
|
||||||
|
StringToLen(ThicknessTxBx.Text, dVal)
|
||||||
|
WritePrivateProfileString(S_TRF, K_TRFTHICKNESS, DoubleToString(dVal, 4), m_MainWindow.GetIniFile())
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
||||||
|
' se verifico che non sono stati iniziliazzti i campi allora provvedo a leggere il file ini del programma
|
||||||
|
If sOrdCode = "" And sOrdDesc = "" And sPartCode = "" And sMatCode = "" And sSurfCode = "" Then
|
||||||
|
GetPrivateProfileString(S_TRF, K_ORDCODE, sOrdCode, sOrdCode, m_MainWindow.GetIniFile())
|
||||||
|
GetPrivateProfileString(S_TRF, K_ORDDESC, sOrdDesc, sOrdDesc, m_MainWindow.GetIniFile())
|
||||||
|
GetPrivateProfileString(S_TRF, K_PARTCODE, sPartCode, sPartCode, m_MainWindow.GetIniFile())
|
||||||
|
GetPrivateProfileString(S_TRF, K_MATCODE, sMatCode, sMatCode, m_MainWindow.GetIniFile())
|
||||||
|
GetPrivateProfileString(S_TRF, K_SURFCODE, sSurfCode, sSurfCode, m_MainWindow.GetIniFile())
|
||||||
|
' recupero il dato dello spessore che deve essere in mm
|
||||||
|
dTh = GetPrivateProfileDouble(S_TRF, K_TRFTHICKNESS, dTh, m_MainWindow.GetIniFile())
|
||||||
|
End If
|
||||||
|
' inizializzo i campi della finestra
|
||||||
OrdCodeTxBx.Text = sOrdCode
|
OrdCodeTxBx.Text = sOrdCode
|
||||||
OrdDescTxBx.Text = sOrdDesc
|
OrdDescTxBx.Text = sOrdDesc
|
||||||
PartCodeTxBx.Text = sPartCode
|
PartCodeTxBx.Text = sPartCode
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<ToggleButton Name="DimensionBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowToggleButton}" Visibility="Collapsed"/>
|
<ToggleButton Name="DimensionBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowToggleButton}" Visibility="Collapsed"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Name="VariablesGrd" Grid.Row="1" Grid.ColumnSpan="2"/>
|
<Grid Name="VariablesGrd" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"/>
|
||||||
|
|
||||||
<Grid Name="MessageGrid" Grid.Row="2" Grid.ColumnSpan="2">
|
<Grid Name="MessageGrid" Grid.Row="2" Grid.ColumnSpan="2">
|
||||||
<TextBlock Name="MessageTxBl" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="MessageTxBl" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
|
|
||||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||||
TextAlignment="Right"/>
|
TextAlignment="Right"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60"
|
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
+211
-57
@@ -41,6 +41,9 @@ Public Class DrawPageUC
|
|||||||
Friend m_bDrawOk As Boolean = False
|
Friend m_bDrawOk As Boolean = False
|
||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
|
Private m_SelListHole As New List(Of Integer)
|
||||||
|
Private m_DeselectListHole As New List(Of Integer)
|
||||||
|
|
||||||
' questa variabile serve per risalire al nome della componente che ospita i componenti interni att
|
' questa variabile serve per risalire al nome della componente che ospita i componenti interni att
|
||||||
Friend m_sMainCompo As String = String.Empty
|
Friend m_sMainCompo As String = String.Empty
|
||||||
|
|
||||||
@@ -105,6 +108,9 @@ Public Class DrawPageUC
|
|||||||
Return m_nSelectedLayer
|
Return m_nSelectedLayer
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public Sub SetCurrLayer(ByVal nCurrLayer As Integer)
|
||||||
|
m_nSelectedLayer = nCurrLayer
|
||||||
|
End Sub
|
||||||
|
|
||||||
Enum Pages
|
Enum Pages
|
||||||
MainComponent
|
MainComponent
|
||||||
@@ -277,6 +283,19 @@ Public Class DrawPageUC
|
|||||||
m_sCsvOrder = ""
|
m_sCsvOrder = ""
|
||||||
m_sCsvList = ""
|
m_sCsvList = ""
|
||||||
m_sCsvName = ""
|
m_sCsvName = ""
|
||||||
|
|
||||||
|
' Visuliazzazione dei bottoni per modifica dei componenti
|
||||||
|
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||||
|
SideAngleBtn.Visibility = Visibility.Hidden
|
||||||
|
FiloTopBtn.Visibility = Visibility.Hidden
|
||||||
|
EngraveBtn.Visibility = Visibility.Hidden
|
||||||
|
DripCutBtn.Visibility = Visibility.Hidden
|
||||||
|
Else
|
||||||
|
SideAngleBtn.Visibility = Visibility.Visible
|
||||||
|
FiloTopBtn.Visibility = Visibility.Visible
|
||||||
|
EngraveBtn.Visibility = Visibility.Visible
|
||||||
|
DripCutBtn.Visibility = Visibility.Visible
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' recupero il click sulla scena ed assegno il metodo a secondo della pagina aperta
|
' recupero il click sulla scena ed assegno il metodo a secondo della pagina aperta
|
||||||
@@ -357,6 +376,8 @@ Public Class DrawPageUC
|
|||||||
Dim nCmpInfo As Integer = 0
|
Dim nCmpInfo As Integer = 0
|
||||||
If EgtGetInfo(nHLId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
If EgtGetInfo(nHLId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||||
EgtSetStatus(nHLId, GDB_ST.ON_)
|
EgtSetStatus(nHLId, GDB_ST.ON_)
|
||||||
|
' nascondo eventuali FiloTop
|
||||||
|
m_CompoDimension.SetStatusVisibilityInLoopReference(nCmp, GDB_ST.OFF)
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
nHLId = EgtGetNextName(nHLId, "HoleLabels")
|
nHLId = EgtGetNextName(nHLId, "HoleLabels")
|
||||||
@@ -459,21 +480,25 @@ Public Class DrawPageUC
|
|||||||
EgtDeselectObj(nId)
|
EgtDeselectObj(nId)
|
||||||
EgtDeselectObj(nLayId)
|
EgtDeselectObj(nLayId)
|
||||||
Dim sLayName As String = ""
|
Dim sLayName As String = ""
|
||||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||||
EgtRemoveInfo( nLayId, INFO_FILOTOP)
|
EgtRemoveInfo(nLayId, INFO_FILOTOP)
|
||||||
EgtRemoveInfo( nLayId, INFO_OFFSET)
|
EgtRemoveInfo(nLayId, INFO_OFFSET)
|
||||||
EgtRemoveInfo( nLayId, INFO_DEPTH)
|
EgtRemoveInfo(nLayId, INFO_DEPTH)
|
||||||
EgtResetColor( nLayId)
|
EgtResetColor(nLayId)
|
||||||
End If
|
End If
|
||||||
|
m_DeselectListHole.Add(nLayId)
|
||||||
|
m_SelListHole.Remove(nLayId)
|
||||||
Else
|
Else
|
||||||
Dim sLayName As String = ""
|
Dim sLayName As String = ""
|
||||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||||
EgtSelectObj( nId)
|
EgtSelectObj(nId)
|
||||||
EgtSelectObj( nLayId)
|
EgtSelectObj(nLayId)
|
||||||
EgtSetInfo( nLayId, INFO_FILOTOP, 1)
|
EgtSetInfo(nLayId, INFO_FILOTOP, 1)
|
||||||
EgtSetInfo( nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
EgtSetInfo(nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||||
EgtSetInfo( nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
EgtSetInfo(nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||||
EgtSetColor( nLayId, New Color3d(255, 255, 255))
|
EgtSetColor(nLayId, New Color3d(255, 255, 255))
|
||||||
|
m_SelListHole.Add(nLayId)
|
||||||
|
m_DeselectListHole.Remove(nLayId)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -481,6 +506,8 @@ Public Class DrawPageUC
|
|||||||
End If
|
End If
|
||||||
nId = EgtGetNextObjInSelWin()
|
nId = EgtGetNextObjInSelWin()
|
||||||
End While
|
End While
|
||||||
|
m_FiloTopUC.CreateFiloTopPreView(m_SelListHole)
|
||||||
|
m_FiloTopUC.EraseFiloTopPreview(m_DeselectListHole)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles DrawScene.OnShowDistanceVector
|
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles DrawScene.OnShowDistanceVector
|
||||||
@@ -539,6 +566,7 @@ Public Class DrawPageUC
|
|||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' Navigazione nelle due pagine per la selezione dei componenti da disegnare
|
||||||
Friend Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
Friend Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
DrawPage_Unloaded(sender, e)
|
DrawPage_Unloaded(sender, e)
|
||||||
@@ -630,10 +658,17 @@ Public Class DrawPageUC
|
|||||||
m_CompoDimension.GetNameEdit(j).Text = m_CVars(i - 1).m_sName
|
m_CompoDimension.GetNameEdit(j).Text = m_CVars(i - 1).m_sName
|
||||||
m_CompoDimension.GetNameEdit(j).Visibility = Windows.Visibility.Visible
|
m_CompoDimension.GetNameEdit(j).Visibility = Windows.Visibility.Visible
|
||||||
m_CompoDimension.GetValueEdit(j).Text = m_CVars(i - 1).ToString()
|
m_CompoDimension.GetValueEdit(j).Text = m_CVars(i - 1).ToString()
|
||||||
|
'Dim dVal As Double
|
||||||
|
'StringToLen(m_CVars(i - 1).ToString(), dVal)
|
||||||
|
'm_CompoDimension.GetValueEdit(j).Text = LenToString(dVal, 3)
|
||||||
m_CompoDimension.GetValueEdit(j).Visibility = Windows.Visibility.Visible
|
m_CompoDimension.GetValueEdit(j).Visibility = Windows.Visibility.Visible
|
||||||
If m_CVars(i - 1).m_nType = 5 Then
|
If m_CVars(i - 1).m_nType = 5 Then
|
||||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Alphanumeric
|
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Alphanumeric
|
||||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 600
|
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 600
|
||||||
|
ElseIf m_CVars(i - 1).m_nType = 4 Then
|
||||||
|
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Calculator
|
||||||
|
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).IsLength = False
|
||||||
|
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 300
|
||||||
Else
|
Else
|
||||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Calculator
|
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Calculator
|
||||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 300
|
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 300
|
||||||
@@ -879,6 +914,9 @@ Public Class DrawPageUC
|
|||||||
|
|
||||||
' permette di inserire più di un part
|
' permette di inserire più di un part
|
||||||
Private Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
|
Private Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
|
||||||
|
|
||||||
|
Dim InsertColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
' Imposto il contesto corrente
|
' Imposto il contesto corrente
|
||||||
EgtSetCurrentContext(DrawScene.GetCtx())
|
EgtSetCurrentContext(DrawScene.GetCtx())
|
||||||
Dim Pz As Integer = -1
|
Dim Pz As Integer = -1
|
||||||
@@ -887,11 +925,12 @@ Public Class DrawPageUC
|
|||||||
' Cancello layer regioni per selezione buchi
|
' Cancello layer regioni per selezione buchi
|
||||||
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||||
|
|
||||||
|
' identificativo univoico del gruppo di pezzi, se più di un pezzo
|
||||||
|
Dim sGUICode As String = String.Empty
|
||||||
|
|
||||||
While Pz <> -1
|
While Pz <> -1
|
||||||
' imposto il contesto corrente
|
' imposto il contesto corrente
|
||||||
EgtSetCurrentContext(DrawScene.GetCtx())
|
EgtSetCurrentContext(DrawScene.GetCtx())
|
||||||
' salvo il file temporaneo per studio delle alzatine
|
|
||||||
EgtSaveFile("c:\EgtData\OmagCUT\Temp\TempAlzatine.nge", NGE.CMPTEXT)
|
|
||||||
' cerco un altro pezzo nell'elenco
|
' cerco un altro pezzo nell'elenco
|
||||||
NxtPz = EgtGetNextPart(Pz)
|
NxtPz = EgtGetNextPart(Pz)
|
||||||
|
|
||||||
@@ -1014,11 +1053,20 @@ Public Class DrawPageUC
|
|||||||
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
||||||
' Imposto colore testi
|
' Imposto colore testi
|
||||||
Utility.SetTextColor(nRegLayId)
|
Utility.SetTextColor(nRegLayId)
|
||||||
|
' Imposto il colore del pezzo inserito nel progetto
|
||||||
|
EgtSetColor(nRegLayId, InsertColor)
|
||||||
|
Dim EntId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||||
|
While EntId <> GDB_ID.NULL
|
||||||
|
If EgtGetType( EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||||
|
EntId = EgtGetNext(EntId)
|
||||||
|
End While
|
||||||
|
|
||||||
' Esporto il pezzo in un file temporaneo
|
' Esporto il pezzo in un file temporaneo
|
||||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPartCompo.Nge"
|
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPartCompo.Nge"
|
||||||
If Not EgtSaveObjToFile(Pz, sTmpFile, NGE.BIN) Then
|
If Not EgtSaveObjToFile(Pz, sTmpFile, NGE.BIN) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Passo al contesto principale
|
' Passo al contesto principale
|
||||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
||||||
@@ -1027,6 +1075,11 @@ Public Class DrawPageUC
|
|||||||
EgtEraseEmptyParts()
|
EgtEraseEmptyParts()
|
||||||
' Area dei nuovi pezzi
|
' Area dei nuovi pezzi
|
||||||
Dim dNewArea As Double = 0
|
Dim dNewArea As Double = 0
|
||||||
|
|
||||||
|
If nNbr > 1 Then
|
||||||
|
sGUICode = System.Guid.NewGuid.ToString
|
||||||
|
End If
|
||||||
|
|
||||||
' Se esiste il file del pezzo
|
' Se esiste il file del pezzo
|
||||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||||
' eseguo inserimento
|
' eseguo inserimento
|
||||||
@@ -1041,15 +1094,33 @@ Public Class DrawPageUC
|
|||||||
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", m_TrfOrderCode & "-" & nId2.ToString())
|
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", m_TrfOrderCode & "-" & nId2.ToString())
|
||||||
' Aggiorno l'area dei nuovi pezzi
|
' Aggiorno l'area dei nuovi pezzi
|
||||||
dNewArea += GeomCalc.GetPartArea(nId2)
|
dNewArea += GeomCalc.GetPartArea(nId2)
|
||||||
' Inserisco in parcheggio
|
|
||||||
|
' assegno l'identificatico del pezzo, se esiste
|
||||||
|
If Not String.IsNullOrEmpty(sGUICode) Then
|
||||||
|
Dim sPreGuid As String = CreatePreGuidCode(nId2)
|
||||||
|
EgtSetInfo(nId2, INFO_REFGROUP, sPreGuid & sGUICode)
|
||||||
|
End If
|
||||||
|
' muovo il pezzo nella prima posizione di parcheggio libera
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
||||||
' Se richiesto posizionamento diretto, lo eseguo
|
|
||||||
If bDirect Then
|
' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.InsertOnePart(nId2) Then
|
' verifico che il pezzo sia un Piano Cucina o un Piano Bagno o un'Aletta
|
||||||
' Eventuale notifica al VeinMatching
|
Dim sCMP As String = String.Empty
|
||||||
VeinMatching.OnInsertPartInRaw(nId2)
|
EgtGetInfo(nId2, "CMP", sCMP)
|
||||||
|
If sCMP.StartsWith("PCucina") Or sCMP.StartsWith("PBagno") Or sCMP.StartsWith("AlzFront") Then
|
||||||
|
' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||||
|
VeinMatching.SetRefOnPart(nId2)
|
||||||
|
VeinMatching.AddPartFromDraw(nId2)
|
||||||
|
' Se richiesto posizionamento diretto, lo eseguo
|
||||||
|
If bDirect Then
|
||||||
|
If m_MainWindow.m_CadCutPageUC.m_NestPage.InsertOnePart(nId2) Then
|
||||||
|
' Eventuale notifica al VeinMatching
|
||||||
|
VeinMatching.OnInsertPartInRaw(nId2)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||||
|
|
||||||
Next
|
Next
|
||||||
' Cancello il file
|
' Cancello il file
|
||||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||||
@@ -1067,6 +1138,33 @@ Public Class DrawPageUC
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function MakeSectionFrameInsert(ByVal nNbr As Integer) As Boolean
|
||||||
|
' m_MainWindow.m_ImportPageUC.LoadFrame()
|
||||||
|
' recupero il primo layer del primo pezzo
|
||||||
|
Dim nLayerId As Integer = EgtGetFirstLayer(EgtGetFirstPart())
|
||||||
|
If nLayerId = GDB_ID.NULL Then Return False
|
||||||
|
' percorso in cui salvare tempora
|
||||||
|
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\Frame.Nge"
|
||||||
|
If Not EgtSaveObjToFile(nLayerId, sTmpFile, NGE.BIN) Then Return False
|
||||||
|
' Passo al contesto principale
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
' Inserisco il pezzo
|
||||||
|
If Not My.Computer.FileSystem.FileExists(sTmpFile) Then Return False
|
||||||
|
' eseguo inserimento
|
||||||
|
For i As Integer = 1 To nNbr
|
||||||
|
EgtInsertFile(sTmpFile)
|
||||||
|
' Ne recupero l'Id
|
||||||
|
Dim nPartId As Integer = EgtGetLastPart()
|
||||||
|
' Creo la cornice
|
||||||
|
m_MainWindow.m_FrameCutPageUC.CreateFrame(nPartId)
|
||||||
|
' Ricalcolo lavorazioni
|
||||||
|
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||||
|
Next
|
||||||
|
' Cancello il file
|
||||||
|
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
m_bBackFromInternalCompo = False
|
m_bBackFromInternalCompo = False
|
||||||
m_bInternalCompo = False
|
m_bInternalCompo = False
|
||||||
@@ -1082,22 +1180,45 @@ Public Class DrawPageUC
|
|||||||
Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text)
|
Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text)
|
||||||
' Passo al contesto principale
|
' Passo al contesto principale
|
||||||
'MakeInsert(InsNbr, sPartName)
|
'MakeInsert(InsNbr, sPartName)
|
||||||
MakeMultipleInsert(InsNbr, sPartName)
|
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||||
' Aggiorno ambiente principale
|
MakeSectionFrameInsert(InsNbr)
|
||||||
EgtZoom(ZM.ALL)
|
Else
|
||||||
' Elimino nome del componente precedente
|
MakeMultipleInsert(InsNbr, sPartName)
|
||||||
m_sCompoName = String.Empty
|
End If
|
||||||
' Reset inclinazioni
|
Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0
|
||||||
m_SideAngleUC.DeleteSideAngle()
|
' Se Shift premuto eseguo il contrario
|
||||||
' Chiudo compo interni nel caso siano aperti
|
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
||||||
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
bExitPage = Not bExitPage
|
||||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
End If
|
||||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
If bExitPage Then
|
||||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
' Aggiorno ambiente principale
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
EgtZoom(ZM.ALL)
|
||||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
' Elimino nome del componente precedente
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
m_sCompoName = String.Empty
|
||||||
|
' Reset inclinazioni
|
||||||
|
m_SideAngleUC.DeleteSideAngle()
|
||||||
|
' Chiudo compo interni nel caso siano aperti
|
||||||
|
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
||||||
|
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||||
|
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||||
|
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||||
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||||
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
|
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||||
|
Else
|
||||||
|
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
|
DrawPage_Unloaded(sender, e)
|
||||||
|
' Elimino nome del componente precedente
|
||||||
|
m_sCompoName = String.Empty
|
||||||
|
' Reset inclinazioni
|
||||||
|
m_SideAngleUC.DeleteSideAngle()
|
||||||
|
If String.IsNullOrEmpty(m_MainComponentPage.m_SecondaryComponentPage.m_sCurrCompo) Then
|
||||||
|
DrawPage_Loaded(sender, e)
|
||||||
|
Else
|
||||||
|
LoadSecondaryPage()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' esco dalla pagina corrente
|
' esco dalla pagina corrente
|
||||||
@@ -1117,14 +1238,16 @@ Public Class DrawPageUC
|
|||||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
||||||
If m_bTrfData Then
|
If m_bTrfData Then
|
||||||
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
|
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
|
||||||
|
' carico i dati appena salvati nella pagina
|
||||||
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||||
If DlgTrfData.ShowDialog() Then
|
If DlgTrfData.ShowDialog() Then
|
||||||
|
' recupero i dati salvati nella pagina
|
||||||
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||||
End If
|
End If
|
||||||
ElseIf m_bCsvData Then
|
ElseIf m_bCsvData Then
|
||||||
@@ -1203,6 +1326,8 @@ Public Class DrawPageUC
|
|||||||
Private Sub EngraveBtn_Click(sender As Object, e As RoutedEventArgs) Handles EngraveBtn.Click
|
Private Sub EngraveBtn_Click(sender As Object, e As RoutedEventArgs) Handles EngraveBtn.Click
|
||||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
If EngraveBtn.IsChecked Then
|
If EngraveBtn.IsChecked Then
|
||||||
|
' Aumento lo spazio disponibile per inserirei i parametri (tolgo spazio ad eventuali messaggi)
|
||||||
|
Grid.SetRowSpan(VariablesGrd, 2)
|
||||||
' Imposto modalità
|
' Imposto modalità
|
||||||
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.ENGRAVE
|
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.ENGRAVE
|
||||||
If m_ActiveComponentPage = Pages.CompoDimension Then
|
If m_ActiveComponentPage = Pages.CompoDimension Then
|
||||||
@@ -1234,6 +1359,7 @@ Public Class DrawPageUC
|
|||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||||
Else
|
Else
|
||||||
|
Grid.SetRowSpan(VariablesGrd, 2)
|
||||||
VariablesGrd.Children.Remove(m_SideAngleUC)
|
VariablesGrd.Children.Remove(m_SideAngleUC)
|
||||||
If m_PrevSideAnglePage = Pages.CompoDimension Then
|
If m_PrevSideAnglePage = Pages.CompoDimension Then
|
||||||
VariablesGrd.Children.Add(m_CompoDimension)
|
VariablesGrd.Children.Add(m_CompoDimension)
|
||||||
@@ -1323,6 +1449,8 @@ Public Class DrawPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FiloTopBtn_Click(sender As Object, e As RoutedEventArgs) Handles FiloTopBtn.Click
|
Private Sub FiloTopBtn_Click(sender As Object, e As RoutedEventArgs) Handles FiloTopBtn.Click
|
||||||
|
m_SelListHole.Clear()
|
||||||
|
m_DeselectListHole.Clear()
|
||||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
If FiloTopBtn.IsChecked Then
|
If FiloTopBtn.IsChecked Then
|
||||||
' Imposto modalità
|
' Imposto modalità
|
||||||
@@ -1336,25 +1464,25 @@ Public Class DrawPageUC
|
|||||||
m_PrevSideAnglePage = Pages.AlzFront
|
m_PrevSideAnglePage = Pages.AlzFront
|
||||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||||
End If
|
End If
|
||||||
VariablesGrd.Children.Add( m_FiloTopUC)
|
VariablesGrd.Children.Add(m_FiloTopUC)
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
EngraveBtn.IsEnabled = False
|
EngraveBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
DripCutBtn.IsEnabled = False
|
||||||
MessageGrid.Visibility = Windows.Visibility.Hidden
|
MessageGrid.Visibility = Windows.Visibility.Hidden
|
||||||
BackBtn.Visibility = Windows.Visibility.Hidden
|
BackBtn.Visibility = Windows.Visibility.Hidden
|
||||||
MessageTxBx.Text = EgtMsg( MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
' In ogni caso, nascondo layer delle misure
|
' In ogni caso, nascondo layer delle misure
|
||||||
Dim PartId As Integer = EgtGetFirstInGroup( GDB_ID.ROOT)
|
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup( PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup( PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup( PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||||
Else
|
Else
|
||||||
VariablesGrd.Children.Remove( m_FiloTopUC)
|
VariablesGrd.Children.Remove(m_FiloTopUC)
|
||||||
If m_PrevSideAnglePage = Pages.CompoDimension Then
|
If m_PrevSideAnglePage = Pages.CompoDimension Then
|
||||||
VariablesGrd.Children.Add( m_CompoDimension)
|
VariablesGrd.Children.Add(m_CompoDimension)
|
||||||
ElseIf m_PrevSideAnglePage = Pages.InternalComponent Then
|
ElseIf m_PrevSideAnglePage = Pages.InternalComponent Then
|
||||||
LeftButtonGrd.Children.Add( m_CompoDimension.m_InternalCompoPage)
|
LeftButtonGrd.Children.Add(m_CompoDimension.m_InternalCompoPage)
|
||||||
End If
|
End If
|
||||||
SideAngleBtn.IsEnabled = m_bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_bEnableSideAngle
|
||||||
EngraveBtn.IsEnabled = True
|
EngraveBtn.IsEnabled = True
|
||||||
@@ -1382,17 +1510,39 @@ Public Class DrawPageUC
|
|||||||
' Seleziono la Tab e la Page di apertura
|
' Seleziono la Tab e la Page di apertura
|
||||||
Select Case m_ActiveComponentPage
|
Select Case m_ActiveComponentPage
|
||||||
Case Pages.MainComponent
|
Case Pages.MainComponent
|
||||||
LeftButtonGrd.Children.Remove( m_MainComponentPage)
|
LeftButtonGrd.Children.Remove(m_MainComponentPage)
|
||||||
|
|
||||||
Case Pages.SecondaryComponent
|
Case Pages.SecondaryComponent
|
||||||
LeftButtonGrd.Children.Remove( m_MainComponentPage.m_SecondaryComponentPage)
|
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
||||||
|
|
||||||
Case Pages.InternalComponent
|
Case Pages.InternalComponent
|
||||||
LeftButtonGrd.Children.Remove( m_MainWindow.m_DrawPageUC.m_CompoDimension.m_InternalCompoPage)
|
LeftButtonGrd.Children.Remove(m_MainWindow.m_DrawPageUC.m_CompoDimension.m_InternalCompoPage)
|
||||||
|
|
||||||
Case Pages.CompoDimension
|
Case Pages.CompoDimension
|
||||||
VariablesGrd.Children.Remove( m_CompoDimension)
|
VariablesGrd.Children.Remove(m_CompoDimension)
|
||||||
|
|
||||||
Case Pages.SideAngle
|
Case Pages.SideAngle
|
||||||
VariablesGrd.Children.Remove( m_SideAngleUC)
|
Select Case m_SideAngleUC.m_Mode
|
||||||
|
Case SideAngleUC.ModeOpt.SIDEANGLE
|
||||||
|
SideAngleBtn.IsChecked = False
|
||||||
|
SideAngleBtn_Click(Nothing, Nothing)
|
||||||
|
Case SideAngleUC.ModeOpt.ENGRAVE
|
||||||
|
EngraveBtn.IsChecked = False
|
||||||
|
EngraveBtn_Click(Nothing, Nothing)
|
||||||
|
Case SideAngleUC.ModeOpt.DRIP
|
||||||
|
DripCutBtn.IsChecked = False
|
||||||
|
DripCutBtn_Click(Nothing, Nothing)
|
||||||
|
End Select
|
||||||
|
VariablesGrd.Children.Remove(m_SideAngleUC)
|
||||||
|
|
||||||
Case Pages.FiloTop
|
Case Pages.FiloTop
|
||||||
|
FiloTopBtn.IsChecked = False
|
||||||
|
FiloTopBtn_Click(Nothing, Nothing)
|
||||||
VariablesGrd.Children.Remove(m_FiloTopUC)
|
VariablesGrd.Children.Remove(m_FiloTopUC)
|
||||||
|
|
||||||
|
Case Pages.AlzFront
|
||||||
|
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
' Pulisco l'ambiente lua
|
' Pulisco l'ambiente lua
|
||||||
@@ -1428,7 +1578,10 @@ Public Class DrawPageUC
|
|||||||
Case 2 ' intero
|
Case 2 ' intero
|
||||||
Return m_nVal.ToString()
|
Return m_nVal.ToString()
|
||||||
Case 3 ' lunghezza
|
Case 3 ' lunghezza
|
||||||
Return DoubleToString(EgtToUiUnits(m_dVal), 4)
|
'Dim dVal As Double
|
||||||
|
'StringToLen(m_sVal, dVal)
|
||||||
|
Return LenToString(m_dVal, 4)
|
||||||
|
'Return DoubleToString(EgtToUiUnits(m_dVal), 4)
|
||||||
Case 4 ' double
|
Case 4 ' double
|
||||||
Return DoubleToString(m_dVal, 4)
|
Return DoubleToString(m_dVal, 4)
|
||||||
Case 5 ' stringa
|
Case 5 ' stringa
|
||||||
@@ -1453,12 +1606,13 @@ Public Class DrawPageUC
|
|||||||
End If
|
End If
|
||||||
Case 3 ' lunghezza
|
Case 3 ' lunghezza
|
||||||
Dim dVal As Double
|
Dim dVal As Double
|
||||||
If StringToDouble(sVal, dVal) Then
|
If bConvertUnits Then
|
||||||
If bConvertUnits Then
|
StringToLen(sVal, dVal)
|
||||||
m_dVal = EgtFromUiUnits(dVal)
|
m_dVal = dVal
|
||||||
Else
|
Return True
|
||||||
m_dVal = dVal
|
Else
|
||||||
End If
|
StringToDouble(sVal, dVal)
|
||||||
|
m_dVal = dVal
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
Case 4 ' double
|
Case 4 ' double
|
||||||
|
|||||||
@@ -41,7 +41,11 @@
|
|||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
|
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
<TextBlock Name="Parameter3TxBl" Grid.Row="12" Text="Arrotonda"
|
||||||
</Grid>
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
|
<CheckBox Name="Parameter3ChBx" Grid.Row="12" Grid.Column="1" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Center" Margin="0,0,6,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+189
-13
@@ -7,6 +7,8 @@ Public Class FiloTopUC
|
|||||||
' Riferimento alla pagina che ha aperto SideAngleUC
|
' Riferimento alla pagina che ha aperto SideAngleUC
|
||||||
Private m_CallingPage As MainWindow.Pages
|
Private m_CallingPage As MainWindow.Pages
|
||||||
|
|
||||||
|
Private m_SelList As New List(Of Integer)
|
||||||
|
|
||||||
' Offset della sfilettatura
|
' Offset della sfilettatura
|
||||||
Private m_dFiloTopOffset As Double = 0
|
Private m_dFiloTopOffset As Double = 0
|
||||||
Friend ReadOnly Property FiloTopOffset As Double
|
Friend ReadOnly Property FiloTopOffset As Double
|
||||||
@@ -23,34 +25,46 @@ Public Class FiloTopUC
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
' esegue l'arrotindamento sugli angoli del percorso utensile
|
||||||
|
Private m_bCornerradius As Boolean = False
|
||||||
|
Friend ReadOnly Property bCornerRadius As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bCornerradius
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Sub FiloTopUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub FiloTopUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
' Imposto riferimenti ad altre pagine
|
' Imposto riferimenti ad altre pagine
|
||||||
m_CallingPage = m_MainWindow.m_ActivePage
|
m_CallingPage = m_MainWindow.m_ActivePage
|
||||||
|
|
||||||
' Imposto messaggi
|
' Imposto messaggi
|
||||||
ParameterTxBl.Text = EgtMsg( MSG_IMPORTPAGEUC + 10) ' Offset
|
ParameterTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||||
Parameter2TxBl.Text = EgtMsg( MSG_IMPORTPAGEUC + 11) ' Affondamento
|
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||||
|
Parameter3TxBl.Text = EgtMsg(91138)
|
||||||
|
|
||||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||||
' Imposto questa come pagina correntemente visualizzata nella drawpage
|
' Imposto questa come pagina correntemente visualizzata nella drawpage
|
||||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.FiloTop
|
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.FiloTop
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext( m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext( m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Gestisco visualizzazione dei parametri
|
' Gestisco visualizzazione dei parametri
|
||||||
Parameter2TxBl.Visibility = Windows.Visibility.Visible
|
ParameterTxBl.Visibility = Windows.Visibility.Visible
|
||||||
Parameter2TxBx.Visibility = Windows.Visibility.Visible
|
Parameter2TxBx.Visibility = Windows.Visibility.Visible
|
||||||
|
Parameter3TxBl.Visibility = Windows.Visibility.Visible
|
||||||
|
|
||||||
' Aggiorno valori
|
' Aggiorno valori
|
||||||
m_dFiloTopOffset = GetPrivateProfileDouble( S_SIDES, K_FILOTOPOFFSET, 5, m_MainWindow.GetIniFile())
|
m_dFiloTopOffset = GetPrivateProfileDouble(S_SIDES, K_FILOTOPOFFSET, 5, m_MainWindow.GetIniFile())
|
||||||
ParameterTxBx.Text = LenToString( m_dFiloTopOffset, 3)
|
ParameterTxBx.Text = LenToString(m_dFiloTopOffset, 3)
|
||||||
m_dFiloTopDepth = GetPrivateProfileDouble( S_SIDES, K_FILOTOPDEPTH, 5, m_MainWindow.GetIniFile())
|
m_dFiloTopDepth = GetPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5, m_MainWindow.GetIniFile())
|
||||||
Parameter2TxBx.Text = LenToString( m_dFiloTopDepth, 3)
|
Parameter2TxBx.Text = LenToString(m_dFiloTopDepth, 3)
|
||||||
|
m_bCornerradius = GetPrivateProfileInt(S_SIDES, K_ROUNDOFF, 0, m_MainWindow.GetIniFile()) <> 0
|
||||||
|
Parameter3ChBx.IsChecked = m_bCornerradius
|
||||||
|
m_SelList.Clear()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FiloTopUC_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Private Sub FiloTopUC_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
@@ -67,13 +81,15 @@ Public Class FiloTopUC
|
|||||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||||
While nLayId <> GDB_ID.NULL
|
While nLayId <> GDB_ID.NULL
|
||||||
Dim sLayName As String = ""
|
Dim sLayName As String = ""
|
||||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||||
EgtSetInfo( nLayId, INFO_OFFSET, m_dFiloTopOffset)
|
EgtSetInfo(nLayId, INFO_OFFSET, m_dFiloTopOffset)
|
||||||
End If
|
End If
|
||||||
nLayId = EgtGetNextLayer(nLayId)
|
nLayId = EgtGetNextLayer(nLayId)
|
||||||
End While
|
End While
|
||||||
nPartId = EgtGetNextPart(nPartId)
|
nPartId = EgtGetNextPart(nPartId)
|
||||||
End While
|
End While
|
||||||
|
' aggiorno la preview
|
||||||
|
CreateFiloTopPreView(m_SelList, False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Parameter2TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter2TxBx.EgtClosed
|
Private Sub Parameter2TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter2TxBx.EgtClosed
|
||||||
@@ -86,8 +102,8 @@ Public Class FiloTopUC
|
|||||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||||
While nLayId <> GDB_ID.NULL
|
While nLayId <> GDB_ID.NULL
|
||||||
Dim sLayName As String = ""
|
Dim sLayName As String = ""
|
||||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||||
EgtSetInfo( nLayId, INFO_DEPTH, m_dFiloTopDepth)
|
EgtSetInfo(nLayId, INFO_DEPTH, m_dFiloTopDepth)
|
||||||
End If
|
End If
|
||||||
nLayId = EgtGetNextLayer(nLayId)
|
nLayId = EgtGetNextLayer(nLayId)
|
||||||
End While
|
End While
|
||||||
@@ -95,4 +111,164 @@ Public Class FiloTopUC
|
|||||||
End While
|
End While
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Parameter3ChBx_Checked() Handles Parameter3ChBx.Click
|
||||||
|
' Assegno il valore
|
||||||
|
m_bCornerradius = Parameter3ChBx.IsChecked
|
||||||
|
WritePrivateProfileString(S_SIDES, K_ROUNDOFF, If(m_bCornerradius, "1", "0"), m_MainWindow.GetIniFile())
|
||||||
|
' Aggiorno le info del profilo
|
||||||
|
Dim nPartId As Integer = EgtGetFirstPart()
|
||||||
|
While nPartId <> GDB_ID.NULL
|
||||||
|
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||||
|
While nLayId <> GDB_ID.NULL
|
||||||
|
Dim sLayName As String = ""
|
||||||
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||||
|
EgtSetInfo(nLayId, INFO_ROUNDOFF, If(m_bCornerradius, 1, 0))
|
||||||
|
End If
|
||||||
|
nLayId = EgtGetNextLayer(nLayId)
|
||||||
|
End While
|
||||||
|
nPartId = EgtGetNextPart(nPartId)
|
||||||
|
End While
|
||||||
|
' aggiorno la preview (False = blocco la lettura dei dati della componente)
|
||||||
|
CreateFiloTopPreView(m_SelList, False)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub CreateFiloTopPreView(SelList As List(Of Integer), Optional bReadInfo As Boolean = True)
|
||||||
|
m_SelList = SelList
|
||||||
|
If m_SelList.Count < 1 Then Return
|
||||||
|
Dim nPartId As Integer = EgtGetFirstPart()
|
||||||
|
While nPartId <> GDB_ID.NULL
|
||||||
|
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||||
|
While nLayId <> GDB_ID.NULL
|
||||||
|
Dim sLayName As String = ""
|
||||||
|
' verifico che lemento corrente appartenga all'elenco degli elementi selezionati
|
||||||
|
Dim bIsSelected As Boolean = m_SelList.Find(Function(value As Integer)
|
||||||
|
Return value = nLayId
|
||||||
|
End Function) <> 0
|
||||||
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) AndAlso bIsSelected Then
|
||||||
|
' ---------------------- Inizio GESTIONE PREVIEW percorso -------------------------------
|
||||||
|
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||||
|
Dim nInLoopRef As Integer = GDB_ID.NULL
|
||||||
|
nLayFiloTop = EgtGetFirstNameInGroup(nPartId, "FiloTop")
|
||||||
|
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||||
|
' verifico il Layer "FiloTop" sia associato all'InLoop corrente
|
||||||
|
While (nLayFiloTop <> GDB_ID.NULL AndAlso nInLoopRef <> nLayId)
|
||||||
|
nLayFiloTop = EgtGetNextName(nLayFiloTop, "FiloTop")
|
||||||
|
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||||
|
End While
|
||||||
|
|
||||||
|
' se non esiste il Layer "FiloTop"
|
||||||
|
If nLayFiloTop = GDB_ID.NULL Then
|
||||||
|
' lo creo
|
||||||
|
nLayFiloTop = EgtCreateGroup(nPartId)
|
||||||
|
EgtSetName(nLayFiloTop, "FiloTop")
|
||||||
|
EgtSetInfo(nLayFiloTop, "InLoopRef", nLayId)
|
||||||
|
EgtSetInfo(nLayId, "FiloTopRef", nLayFiloTop)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' carico i dati del filo top selezionato
|
||||||
|
If bReadInfo Then
|
||||||
|
EgtGetInfo(nLayFiloTop, INFO_OFFSET, m_dFiloTopOffset)
|
||||||
|
ParameterTxBx.Text = LenToString(m_dFiloTopOffset, 3)
|
||||||
|
EgtGetInfo(nLayFiloTop, INFO_DEPTH, m_dFiloTopDepth)
|
||||||
|
Parameter2TxBx.Text = LenToString(m_dFiloTopDepth, 3)
|
||||||
|
Dim nVal As Integer = If(m_bCornerradius, 1, 0)
|
||||||
|
EgtGetInfo(nLayFiloTop, INFO_ROUNDOFF, nVal)
|
||||||
|
Parameter3ChBx.IsChecked = If(nVal = 1, True, False)
|
||||||
|
m_bCornerradius = Parameter3ChBx.IsChecked
|
||||||
|
End If
|
||||||
|
|
||||||
|
' procedo alla creazione della curva
|
||||||
|
Dim nIdCompoCurve As Integer = GDB_ID.NULL
|
||||||
|
' cancello un eventuale curva composita creata in precedenza
|
||||||
|
nIdCompoCurve = EgtGetFirstNameInGroup(nLayFiloTop, "OffsetPreView")
|
||||||
|
If nIdCompoCurve <> GDB_ID.NULL Then
|
||||||
|
EgtErase(nIdCompoCurve)
|
||||||
|
End If
|
||||||
|
Dim nCompoCurve As New List(Of Integer)
|
||||||
|
' costruisco il percorso chiuso dati i lati di contorno
|
||||||
|
Dim nLine As Integer = EgtGetFirstInGroup(nLayId)
|
||||||
|
While nLine <> GDB_ID.NULL
|
||||||
|
nCompoCurve.Add(nLine)
|
||||||
|
nLine = EgtGetNext(nLine)
|
||||||
|
End While
|
||||||
|
Dim PtNearStart As Point3d
|
||||||
|
Dim nInfoRoundOff As Integer = If(m_bCornerradius, 1, 0)
|
||||||
|
|
||||||
|
nIdCompoCurve = EgtCreateCurveCompoByChain(nLayFiloTop, nCompoCurve.ToArray, PtNearStart, False)
|
||||||
|
EgtSetName(nIdCompoCurve, "OffsetPreView")
|
||||||
|
|
||||||
|
' salvo i dati nel layer FiloTop
|
||||||
|
EgtSetInfo(nLayFiloTop, INFO_OFFSET, m_dFiloTopOffset)
|
||||||
|
EgtSetInfo(nLayFiloTop, INFO_DEPTH, m_dFiloTopDepth)
|
||||||
|
EgtSetInfo(nLayFiloTop, INFO_ROUNDOFF, nInfoRoundOff)
|
||||||
|
|
||||||
|
Dim bOk As Boolean = False
|
||||||
|
' leggo che tipo di offset applicare (Round, Extend)
|
||||||
|
If nInfoRoundOff <> 1 Then
|
||||||
|
bOk = EgtOffsetCurve(nIdCompoCurve, -m_dFiloTopOffset, OFF_TYPE.EXTEND)
|
||||||
|
Else
|
||||||
|
bOk = EgtOffsetCurve(nIdCompoCurve, -m_dFiloTopOffset, OFF_TYPE.FILLET)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' se la generazione della curva non va a buon fine
|
||||||
|
If Not bOk Then
|
||||||
|
EgtErase(nLayFiloTop)
|
||||||
|
EgtRemoveInfo(nLayId, "FiloTopRef")
|
||||||
|
EgtOutLog("Error in generation OffsetPreView in TopEgde ")
|
||||||
|
Else
|
||||||
|
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = ""
|
||||||
|
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Brushes.Transparent
|
||||||
|
End If
|
||||||
|
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||||
|
End If
|
||||||
|
nLayId = EgtGetNextLayer(nLayId)
|
||||||
|
End While
|
||||||
|
nPartId = EgtGetNextPart(nPartId)
|
||||||
|
End While
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' riceve la lista dei LayerFiloTop che devono essere eliminati
|
||||||
|
Public Sub EraseFiloTopPreview(EraseList As List(Of Integer))
|
||||||
|
Dim m_EraseList As List(Of Integer) = EraseList
|
||||||
|
If m_EraseList.Count < 1 Then Return
|
||||||
|
Dim nPartId As Integer = EgtGetFirstPart()
|
||||||
|
While nPartId <> GDB_ID.NULL
|
||||||
|
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||||
|
While nLayId <> GDB_ID.NULL
|
||||||
|
Dim sLayName As String = ""
|
||||||
|
Dim bIsSelected As Boolean = m_EraseList.Find(Function(value As Integer)
|
||||||
|
Return value = nLayId
|
||||||
|
End Function) <> 0
|
||||||
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso bIsSelected Then
|
||||||
|
' ---------------------- Inizio GESTIONE PREVIEW percorso -------------------------------
|
||||||
|
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||||
|
Dim nInLoopRef As Integer = GDB_ID.NULL
|
||||||
|
nLayFiloTop = EgtGetFirstNameInGroup(nPartId, "FiloTop")
|
||||||
|
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||||
|
' cerco il Layer associato all'InLoop corrente
|
||||||
|
While (nLayFiloTop <> GDB_ID.NULL AndAlso nInLoopRef <> nLayId)
|
||||||
|
nLayFiloTop = EgtGetNextName(nLayFiloTop, "FiloTop")
|
||||||
|
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||||
|
End While
|
||||||
|
|
||||||
|
' se non esiste il Layer
|
||||||
|
If nLayFiloTop = GDB_ID.NULL Then
|
||||||
|
' esco
|
||||||
|
Return
|
||||||
|
Else
|
||||||
|
' lo elimino
|
||||||
|
EgtErase(nLayFiloTop)
|
||||||
|
EraseList.Remove(nLayId)
|
||||||
|
End If
|
||||||
|
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||||
|
End If
|
||||||
|
nLayId = EgtGetNextLayer(nLayId)
|
||||||
|
End While
|
||||||
|
nPartId = EgtGetNextPart(nPartId)
|
||||||
|
End While
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+117
-102
@@ -7,116 +7,131 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
|
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
|
||||||
|
|
||||||
<!-- Definizione della ImportPage -->
|
<!-- Definizione della ImportPage -->
|
||||||
<Border>
|
<Border>
|
||||||
<Grid Name="ImportPageGrid" >
|
<Grid Name="ImportPageGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="3*"/>
|
|
||||||
<ColumnDefinition Width="12*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="8*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Definizione della Grid superiore per Button -->
|
|
||||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="12*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="7*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
|
||||||
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
|
||||||
<ToggleButton Name="DripCutBtn" Grid.Column="2" Padding="0"
|
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
|
||||||
<ToggleButton Name="DripDrillBtn" Grid.Column="3" Padding="0"
|
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
|
||||||
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
|
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Definizione della Grid laterale -->
|
|
||||||
<Grid Name="LeftGrid" Grid.RowSpan="3">
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="8*"/>
|
||||||
<RowDefinition Height="8*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
|
||||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
|
||||||
ItemsSource="{Binding ItemList}"/>
|
|
||||||
|
|
||||||
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
<!-- Definizione della Grid superiore per Button -->
|
||||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<Grid.ColumnDefinitions>
|
||||||
</Border>
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="7*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
</Grid>
|
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<!-- Definizione della Grid inferiore per Button -->
|
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
||||||
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<Grid.ColumnDefinitions>
|
<ToggleButton Name="DripCutBtn" Grid.Column="2" Padding="0"
|
||||||
<ColumnDefinition Width="1*"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ToggleButton Name="EngraveBtn" Grid.Column="2"
|
||||||
<ColumnDefinition Width="1*"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ToggleButton Name="DripDrillBtn" Grid.Column="3" Padding="0"
|
||||||
<ColumnDefinition Width="1*"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
|
||||||
<ColumnDefinition Width="1*"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Button Name="UseLayerBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
<Button Name="UseClosedCurveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
<Button Name="UseRegionBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
<Button Name="ResetBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
|
|
||||||
<RadioButton Name="mmBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
|
||||||
<RadioButton Name="inchBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
|
||||||
|
|
||||||
<Button Name="OrderListBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
|
|
||||||
<ToggleButton Name="TopBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
|
||||||
|
|
||||||
<Grid Name="PartNumberGrd" Grid.Column="8" Grid.ColumnSpan="2">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
|
||||||
TextAlignment="Right"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60"
|
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
<!-- Definizione della Grid laterale -->
|
||||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Grid Name="LeftGrid" Grid.RowSpan="3">
|
||||||
</Button>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="7.25*"/>
|
||||||
|
<RowDefinition Height="0.75*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||||
|
ItemsSource="{Binding ItemList}"/>
|
||||||
|
|
||||||
|
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
||||||
|
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
||||||
|
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||||
|
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||||
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Definizione della Grid inferiore per Button -->
|
||||||
|
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="UseLayerBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
<Button Name="UseClosedCurveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
<Button Name="UseRegionBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
<Button Name="ResetBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
|
<RadioButton Name="mmBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||||
|
<RadioButton Name="inchBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||||
|
|
||||||
|
<Button Name="OrderListBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
|
<ToggleButton Name="TopBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||||
|
|
||||||
|
<Grid Name="PartNumberGrd" Grid.Column="8" Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||||
|
TextAlignment="Right"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+281
-36
@@ -19,6 +19,9 @@ Public Class ImportPageUC
|
|||||||
Friend WithEvents ImportScene As New Scene
|
Friend WithEvents ImportScene As New Scene
|
||||||
Private ImportSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
Private ImportSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
||||||
|
|
||||||
|
Private m_SelListHole As New List(Of Integer)
|
||||||
|
Private m_DeselectListHole As New List(Of Integer)
|
||||||
|
|
||||||
' Properties
|
' Properties
|
||||||
Private m_sCurrDir As String = String.Empty
|
Private m_sCurrDir As String = String.Empty
|
||||||
Private m_sCurrFile As String = String.Empty
|
Private m_sCurrFile As String = String.Empty
|
||||||
@@ -85,6 +88,7 @@ Public Class ImportPageUC
|
|||||||
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclina lati
|
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclina lati
|
||||||
FiloTopBtn.Content = EgtMsg( 90400) 'Filo Top
|
FiloTopBtn.Content = EgtMsg( 90400) 'Filo Top
|
||||||
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
|
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
|
||||||
|
EngraveBtn.Content = "Engrave"
|
||||||
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
|
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
|
||||||
Cad2dBtn.Content = "Cad 2d"
|
Cad2dBtn.Content = "Cad 2d"
|
||||||
|
|
||||||
@@ -101,6 +105,8 @@ Public Class ImportPageUC
|
|||||||
' abilitazione Ordine e Distinta per importazione DXF
|
' abilitazione Ordine e Distinta per importazione DXF
|
||||||
m_bEnableOrderList = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
m_bEnableOrderList = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
||||||
GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
' rendo visibilie il pulsante di ricerca file
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
|
|
||||||
If m_bFirst Then
|
If m_bFirst Then
|
||||||
' imposto colore di default
|
' imposto colore di default
|
||||||
@@ -158,6 +164,10 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
' Pulisco tutto
|
' Pulisco tutto
|
||||||
ClearView()
|
ClearView()
|
||||||
|
' Definizione di quale comando deve essere visualizzato
|
||||||
|
DripCutBtn.Visibility = If(String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw), Visibility.Hidden, Visibility.Visible)
|
||||||
|
EngraveBtn.Visibility = If(DripCutBtn.Visibility <> Visibility.Visible, Visibility.Visible, Visibility.Hidden)
|
||||||
|
|
||||||
FileListBox.UnselectAll()
|
FileListBox.UnselectAll()
|
||||||
' inibisco selezione diretta da Scene
|
' inibisco selezione diretta da Scene
|
||||||
ImportScene.SetStatusNull()
|
ImportScene.SetStatusNull()
|
||||||
@@ -196,7 +206,6 @@ Public Class ImportPageUC
|
|||||||
PartNumTxBx.Text = "1"
|
PartNumTxBx.Text = "1"
|
||||||
' disabilito ok
|
' disabilito ok
|
||||||
OkBtn.IsEnabled = False
|
OkBtn.IsEnabled = False
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LoadGridData()
|
Private Sub LoadGridData()
|
||||||
@@ -297,6 +306,36 @@ Public Class ImportPageUC
|
|||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
|
||||||
|
' Elimino spazi iniziali e finali
|
||||||
|
FindTxBx.Text = FindTxBx.Text.Trim()
|
||||||
|
' ricarico la lista dei file
|
||||||
|
LoadCurrDir()
|
||||||
|
Dim UpdateListFile As New List(Of IconListBoxItem)
|
||||||
|
' Se esiste un nome
|
||||||
|
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
|
||||||
|
For Each Item As IconListBoxItem In FileListBox.ItemsSource
|
||||||
|
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
|
||||||
|
UpdateListFile.Add(Item)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If UpdateListFile.Count > 0 Then
|
||||||
|
FileListBox.ItemsSource = UpdateListFile
|
||||||
|
Else
|
||||||
|
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
|
||||||
|
' svuoto la text
|
||||||
|
FindTxBx.Text = ""
|
||||||
|
' ricarico la lista dei file
|
||||||
|
LoadCurrDir()
|
||||||
|
' e aggiorno la lista dei file
|
||||||
|
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function ClearView() As Boolean
|
Private Function ClearView() As Boolean
|
||||||
' Pulisco il DB geometrico locale
|
' Pulisco il DB geometrico locale
|
||||||
EgtNewFile()
|
EgtNewFile()
|
||||||
@@ -309,13 +348,18 @@ Public Class ImportPageUC
|
|||||||
ResetBtn.IsEnabled = False
|
ResetBtn.IsEnabled = False
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
' Evito di settare le proprietà di oggeti che sono con visibilità Hidden
|
||||||
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function LoadCurrFile() As Boolean
|
Private Function LoadCurrFile() As Boolean
|
||||||
' Pulisco il DB geometrico locale
|
' Pulisco il DB geometrico locale
|
||||||
Dim bOk As Boolean = EgtNewFile()
|
Dim bOk As Boolean = EgtNewFile()
|
||||||
' Costruisco path completa del file
|
' Costruisco path completa del file
|
||||||
Dim sPath = IO.Path.Combine(m_sCurrDir, m_sCurrFile)
|
Dim sPath = IO.Path.Combine(m_sCurrDir, m_sCurrFile)
|
||||||
@@ -327,6 +371,10 @@ Public Class ImportPageUC
|
|||||||
Dim dScale As Double = If(m_bMM, ONEMM, ONEINCH)
|
Dim dScale As Double = If(m_bMM, ONEMM, ONEINCH)
|
||||||
' Importo file DXF
|
' Importo file DXF
|
||||||
bOk = bOk AndAlso EgtImportDxf(sPath, dScale)
|
bOk = bOk AndAlso EgtImportDxf(sPath, dScale)
|
||||||
|
' riporto al piano tutte le superifici
|
||||||
|
EgtSelectAll()
|
||||||
|
EgtScale(GDB_ID.SEL, Frame3d.GLOB, 1, 1, 0)
|
||||||
|
EgtDeselectAll()
|
||||||
ElseIf m_nFileType = FT.NGE Then
|
ElseIf m_nFileType = FT.NGE Then
|
||||||
' Carico Nge
|
' Carico Nge
|
||||||
bOk = bOk AndAlso EgtOpenFile(sPath)
|
bOk = bOk AndAlso EgtOpenFile(sPath)
|
||||||
@@ -366,7 +414,11 @@ Public Class ImportPageUC
|
|||||||
OkBtn.IsEnabled = False
|
OkBtn.IsEnabled = False
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
ElseIf m_nFileType = FT_TRF Or m_nFileType = FT_CUT Then
|
ElseIf m_nFileType = FT_TRF Or m_nFileType = FT_CUT Then
|
||||||
' abilito bottone Insert, disabilito bottoni UseLayer, UseClosedCurve, UseRegion e Reset
|
' abilito bottone Insert, disabilito bottoni UseLayer, UseClosedCurve, UseRegion e Reset
|
||||||
@@ -382,10 +434,14 @@ Public Class ImportPageUC
|
|||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
End If
|
End If
|
||||||
' altrimenti import per cornici
|
' altrimenti import per cornici
|
||||||
Else
|
Else
|
||||||
mmBtn.IsEnabled = (m_nFileType = FT.DXF)
|
mmBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||||
inchBtn.IsEnabled = (m_nFileType = FT.DXF)
|
inchBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||||
@@ -395,10 +451,10 @@ Public Class ImportPageUC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportScene.OnMouseDownScene
|
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportScene.OnMouseDownScene
|
||||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked Then
|
||||||
OnMouseDownSceneSideAngle( e)
|
OnMouseDownSceneSideAngle(e)
|
||||||
ElseIf DripDrillBtn.IsChecked() Then
|
ElseIf DripDrillBtn.IsChecked() Then
|
||||||
OnMouseDownSceneUnderDrill( e)
|
OnMouseDownSceneUnderDrill(e)
|
||||||
ElseIf FiloTopBtn.IsChecked() Then
|
ElseIf FiloTopBtn.IsChecked() Then
|
||||||
OnMouseDownSceneFiloTop( e)
|
OnMouseDownSceneFiloTop( e)
|
||||||
End If
|
End If
|
||||||
@@ -539,6 +595,8 @@ Public Class ImportPageUC
|
|||||||
EgtSetColor(nEntId, New Color3d(127, 63, 0))
|
EgtSetColor(nEntId, New Color3d(127, 63, 0))
|
||||||
nEntId = EgtGetNext( nEntId)
|
nEntId = EgtGetNext( nEntId)
|
||||||
End While
|
End While
|
||||||
|
m_DeselectListHole.Add(nLayId)
|
||||||
|
m_SelListHole.Remove(nLayId)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim nLayId As Integer = GDB_ID.NULL
|
Dim nLayId As Integer = GDB_ID.NULL
|
||||||
@@ -555,6 +613,8 @@ Public Class ImportPageUC
|
|||||||
EgtSetColor(nEntId, New Color3d(255, 255, 255))
|
EgtSetColor(nEntId, New Color3d(255, 255, 255))
|
||||||
nEntId = EgtGetNext( nEntId)
|
nEntId = EgtGetNext( nEntId)
|
||||||
End While
|
End While
|
||||||
|
m_SelListHole.Add(nLayId)
|
||||||
|
m_DeselectListHole.Remove(nLayId)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -562,6 +622,12 @@ Public Class ImportPageUC
|
|||||||
End If
|
End If
|
||||||
nId = EgtGetNextObjInSelWin()
|
nId = EgtGetNextObjInSelWin()
|
||||||
End While
|
End While
|
||||||
|
m_FiloTopUC.CreateFiloTopPreView(m_SelListHole)
|
||||||
|
m_FiloTopUC.EraseFiloTopPreview(m_DeselectListHole)
|
||||||
|
If m_SelListHole.Count > 0 Then
|
||||||
|
MessageTxBx.Text = ""
|
||||||
|
MessageBrd.Background = Brushes.Transparent
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles ImportScene.OnShowDistanceVector
|
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles ImportScene.OnShowDistanceVector
|
||||||
@@ -571,11 +637,41 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub SelectedPartChanged()
|
Private Sub SelectedPartChanged()
|
||||||
' Se sono in modalità inclinazioni o gocciolatoio calcolo lati inclinabili e creo testi
|
' Se sono in modalità inclinazioni o gocciolatoio calcolo lati inclinabili e creo testi
|
||||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked() Then
|
||||||
m_SideAngleUC.ReLoadSideAnglePage()
|
m_SideAngleUC.ReLoadSideAnglePage()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' metodo utilizzato per definire il colore dei pezzi DXF importati
|
||||||
|
Private Sub ColorRegion(nCtx As Integer)
|
||||||
|
|
||||||
|
' Leggo dati corrispondenza colore
|
||||||
|
Dim InsertColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
|
' Imposto contesto corrente
|
||||||
|
EgtSetCurrentContext(nCtx)
|
||||||
|
' Ciclo sui pezzi
|
||||||
|
Dim PartId As Integer = EgtGetFirstPart()
|
||||||
|
While PartId <> GDB_ID.NULL
|
||||||
|
' Ciclo sui layer delle regioni
|
||||||
|
Dim RegionId As Integer = EgtGetFirstNameInGroup(PartId, NAME_REGION)
|
||||||
|
While RegionId <> GDB_ID.NULL
|
||||||
|
EgtSetColor(RegionId, InsertColor)
|
||||||
|
' Ciclo sulle regioni
|
||||||
|
Dim EntId As Integer = EgtGetFirstInGroup(RegionId)
|
||||||
|
While EntId <> GDB_ID.NULL
|
||||||
|
If EgtGetType( EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||||
|
EntId = EgtGetNext(EntId)
|
||||||
|
End While
|
||||||
|
RegionId = EgtGetNextName(PartId, NAME_REGION)
|
||||||
|
End While
|
||||||
|
' passo al pezzo successico
|
||||||
|
PartId = EgtGetNextPart(PartId)
|
||||||
|
End While
|
||||||
|
' Aggiorno scritte per angoli sui lati
|
||||||
|
WriteSideAngleForNest(nCtx)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub UseLayerBtn_Click(sender As Object, e As RoutedEventArgs) Handles UseLayerBtn.Click
|
Private Sub UseLayerBtn_Click(sender As Object, e As RoutedEventArgs) Handles UseLayerBtn.Click
|
||||||
' Creo i pezzi
|
' Creo i pezzi
|
||||||
Dim nType As Integer = If(m_nFileType = FT.NGE, FPC_TYPE.NGE, FPC_TYPE.LAYER)
|
Dim nType As Integer = If(m_nFileType = FT.NGE, FPC_TYPE.NGE, FPC_TYPE.LAYER)
|
||||||
@@ -589,6 +685,8 @@ Public Class ImportPageUC
|
|||||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||||
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
||||||
End If
|
End If
|
||||||
|
' gestico il colore degli elementi da importare (devono avere una regione definita!
|
||||||
|
ColorRegion(ImportScene.GetCtx())
|
||||||
' Eseguo zoom
|
' Eseguo zoom
|
||||||
ImportScene.ZoomAll()
|
ImportScene.ZoomAll()
|
||||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||||
@@ -600,8 +698,12 @@ Public Class ImportPageUC
|
|||||||
' abilito bottone angoli su lati esterni
|
' abilito bottone angoli su lati esterni
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -619,6 +721,8 @@ Public Class ImportPageUC
|
|||||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||||
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
||||||
End If
|
End If
|
||||||
|
' gestico il colore degli elementi da importare (devono avere una regione definita!
|
||||||
|
ColorRegion(ImportScene.GetCtx())
|
||||||
' Eseguo zoom
|
' Eseguo zoom
|
||||||
ImportScene.ZoomAll()
|
ImportScene.ZoomAll()
|
||||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||||
@@ -630,8 +734,12 @@ Public Class ImportPageUC
|
|||||||
' abilito bottone angoli su lati esterni
|
' abilito bottone angoli su lati esterni
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -649,6 +757,8 @@ Public Class ImportPageUC
|
|||||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||||
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
||||||
End If
|
End If
|
||||||
|
' gestico il colore degli elementi da importare (devono avere una regione definita!
|
||||||
|
ColorRegion(ImportScene.GetCtx())
|
||||||
' Eseguo zoom
|
' Eseguo zoom
|
||||||
ImportScene.ZoomAll()
|
ImportScene.ZoomAll()
|
||||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||||
@@ -660,8 +770,12 @@ Public Class ImportPageUC
|
|||||||
' abilito bottone angoli su lati esterni
|
' abilito bottone angoli su lati esterni
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -772,6 +886,10 @@ Public Class ImportPageUC
|
|||||||
EgtErase(EgtGetFirstNameInGroup(PartId, SELECT_REGION_LAYER))
|
EgtErase(EgtGetFirstNameInGroup(PartId, SELECT_REGION_LAYER))
|
||||||
PartId = EgtGetNextPart(PartId)
|
PartId = EgtGetNextPart(PartId)
|
||||||
End While
|
End While
|
||||||
|
|
||||||
|
' identificativo univoico del gruppo di pezzi, se più di un "Repeat"
|
||||||
|
Dim sGUICode As New List(Of String)
|
||||||
|
|
||||||
' Scrivo testi per nesting
|
' Scrivo testi per nesting
|
||||||
SideAngle.WriteSideAngleForNest(ImportScene.GetCtx())
|
SideAngle.WriteSideAngleForNest(ImportScene.GetCtx())
|
||||||
' Imposto riferimento sul centro geometrico di ogni pezzo
|
' Imposto riferimento sul centro geometrico di ogni pezzo
|
||||||
@@ -781,26 +899,54 @@ Public Class ImportPageUC
|
|||||||
' Salvo tutti i pezzi in un file temporaneo
|
' Salvo tutti i pezzi in un file temporaneo
|
||||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPart" & ".Nge"
|
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPart" & ".Nge"
|
||||||
If Not EgtSaveFile(sTmpFile, NGE.BIN) Then Return
|
If Not EgtSaveFile(sTmpFile, NGE.BIN) Then Return
|
||||||
|
|
||||||
|
' Determino numero ripetizioni
|
||||||
|
Dim nRepeat = 1
|
||||||
|
StringToInt(PartNumTxBx.Text, nRepeat)
|
||||||
|
nRepeat = Math.Min(Math.Max(1, nRepeat), 50)
|
||||||
|
' creo il riferimento
|
||||||
|
If nRepeat > 1 Then
|
||||||
|
' per ogni pezze del file DXF creo un gruppo
|
||||||
|
Dim nIdTemp As Integer = EgtGetFirstPart()
|
||||||
|
While nIdTemp <> GDB_ID.NULL
|
||||||
|
Dim sPreGuid As String = CreatePreGuidCode(nIdTemp)
|
||||||
|
sGUICode.Add(sPreGuid & System.Guid.NewGuid.ToString)
|
||||||
|
nIdTemp = EgtGetNextPart(nIdTemp)
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
|
||||||
' Passo al contesto principale
|
' Passo al contesto principale
|
||||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
||||||
Dim bDirect As Boolean = (GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0)
|
Dim bDirect As Boolean = (GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
' Elimino eventuali precedenti pezzi vuoti
|
' Elimino eventuali precedenti pezzi vuoti
|
||||||
EgtEraseEmptyParts()
|
EgtEraseEmptyParts()
|
||||||
' Determino numero ripetizioni
|
|
||||||
Dim nRepeat = 1
|
|
||||||
StringToInt(PartNumTxBx.Text, nRepeat)
|
|
||||||
nRepeat = Math.Min(Math.Max(1, nRepeat), 50)
|
|
||||||
' Inserisco i pezzi nell'ambiente principale e recupero Id primo pezzo inserito
|
' Inserisco i pezzi nell'ambiente principale e recupero Id primo pezzo inserito
|
||||||
Dim nFirstId As Integer = EgtGetLastPart()
|
Dim nFirstId As Integer = EgtGetLastPart()
|
||||||
For nInd As Integer = 1 To nRepeat
|
For nInd As Integer = 1 To nRepeat
|
||||||
Dim nFirst2Id As Integer = EgtGetLastPart()
|
Dim nFirst2Id As Integer = EgtGetLastPart()
|
||||||
EgtInsertFile(sTmpFile)
|
EgtInsertFile(sTmpFile)
|
||||||
|
|
||||||
|
Dim FirstOfImport As Integer = EgtGetNextPart(nFirst2Id)
|
||||||
|
If FirstOfImport = GDB_ID.NULL Then FirstOfImport = EgtGetFirstPart()
|
||||||
|
Dim Index As Integer = 1
|
||||||
|
While FirstOfImport <> GDB_ID.NULL And Index <= sGUICode.Count
|
||||||
|
If Not String.IsNullOrEmpty(sGUICode(Index - 1)) Then
|
||||||
|
EgtSetInfo(FirstOfImport, INFO_REFGROUP, sGUICode(Index - 1))
|
||||||
|
Index += 1
|
||||||
|
Else
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
FirstOfImport = EgtGetNextPart(FirstOfImport)
|
||||||
|
End While
|
||||||
|
|
||||||
nFirst2Id = If(nFirst2Id <> GDB_ID.NULL, EgtGetNextPart(nFirst2Id), EgtGetFirstPart())
|
nFirst2Id = If(nFirst2Id <> GDB_ID.NULL, EgtGetNextPart(nFirst2Id), EgtGetFirstPart())
|
||||||
' Eventuale inserimento pezzi in VeinMatching
|
' Eventuale inserimento pezzi in VeinMatching
|
||||||
VeinMatching.AddParts(sTmpFile, nFirst2Id)
|
VeinMatching.AddParts(sTmpFile, nFirst2Id)
|
||||||
Next
|
Next
|
||||||
nFirstId = If(nFirstId <> GDB_ID.NULL, EgtGetNextPart(nFirstId), EgtGetFirstPart())
|
nFirstId = If(nFirstId <> GDB_ID.NULL, EgtGetNextPart(nFirstId), EgtGetFirstPart())
|
||||||
|
|
||||||
' Cancello il file
|
' Cancello il file
|
||||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||||
@@ -809,7 +955,7 @@ Public Class ImportPageUC
|
|||||||
Dim dNewArea As Double = 0
|
Dim dNewArea As Double = 0
|
||||||
Dim nId As Integer = nFirstId
|
Dim nId As Integer = nFirstId
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
dNewArea += GeomCalc.GetPartArea( nId)
|
dNewArea += GeomCalc.GetPartArea(nId)
|
||||||
' Passo al pezzo successivo
|
' Passo al pezzo successivo
|
||||||
nId = EgtGetNextPart(nId)
|
nId = EgtGetNextPart(nId)
|
||||||
End While
|
End While
|
||||||
@@ -820,6 +966,7 @@ Public Class ImportPageUC
|
|||||||
' Passo al pezzo successivo
|
' Passo al pezzo successivo
|
||||||
nId = EgtGetNextPart(nId)
|
nId = EgtGetNextPart(nId)
|
||||||
End While
|
End While
|
||||||
|
|
||||||
' Ciclo sui pezzi inseriti
|
' Ciclo sui pezzi inseriti
|
||||||
nId = nFirstId
|
nId = nFirstId
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
@@ -832,26 +979,26 @@ Public Class ImportPageUC
|
|||||||
If m_nFileType = FT.DXF Or m_nFileType = FT.NGE Then
|
If m_nFileType = FT.DXF Or m_nFileType = FT.NGE Then
|
||||||
' Eventuale testo per indicare il sopra
|
' Eventuale testo per indicare il sopra
|
||||||
If TopBtn.IsChecked() Then
|
If TopBtn.IsChecked() Then
|
||||||
Utility.AddTopToPartRegion( nRegId)
|
Utility.AddTopToPartRegion(nRegId)
|
||||||
End If
|
End If
|
||||||
' Se richiesti, inserisco dati Ordine, Distinta, Nome, Origine
|
' Se richiesti, inserisco dati Ordine, Distinta, Nome, Origine
|
||||||
If m_bEnableOrderList Then
|
If m_bEnableOrderList Then
|
||||||
' Cerco il nome del pezzo
|
' Cerco il nome del pezzo
|
||||||
Dim sName As String = ""
|
Dim sName As String = ""
|
||||||
EgtGetName( nId, sName)
|
EgtGetName(nId, sName)
|
||||||
' Recupero il box del pezzo
|
' Recupero il box del pezzo
|
||||||
Dim b3Reg As New BBox3d : EgtGetBBox( nRegId, GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Reg)
|
Dim b3Reg As New BBox3d : EgtGetBBox(nRegId, GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Reg)
|
||||||
' Aggiungo info equivalenti a CSV
|
' Aggiungo info equivalenti a CSV
|
||||||
EgtSetInfo(nId, INFO_CSV_PART, sName)
|
EgtSetInfo(nId, INFO_CSV_PART, sName)
|
||||||
EgtSetInfo(nId, INFO_CSV_ORD, m_sOrder)
|
EgtSetInfo(nId, INFO_CSV_ORD, m_sOrder)
|
||||||
EgtSetInfo(nId, INFO_CSV_DIST, m_sList)
|
EgtSetInfo(nId, INFO_CSV_DIST, m_sList)
|
||||||
EgtSetInfo(nId, INFO_CSV_MAT, m_MainWindow.m_CurrentMachine.CurrMat.sName)
|
EgtSetInfo(nId, INFO_CSV_MAT, m_MainWindow.m_CurrentMachine.CurrMat.sName)
|
||||||
EgtSetInfo(nId, INFO_CSV_V1, DoubleToString( b3Reg.DimX(), 1))
|
EgtSetInfo(nId, INFO_CSV_V1, DoubleToString(b3Reg.DimX(), 1))
|
||||||
EgtSetInfo(nId, INFO_CSV_V2, DoubleToString( b3Reg.DimY(), 1))
|
EgtSetInfo(nId, INFO_CSV_V2, DoubleToString(b3Reg.DimY(), 1))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Imposto colore testi
|
' Imposto colore testi
|
||||||
Utility.SetTextColor( nRegId)
|
Utility.SetTextColor(nRegId)
|
||||||
' Imposto path di provenienza
|
' Imposto path di provenienza
|
||||||
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
||||||
' Inserisco in parcheggio
|
' Inserisco in parcheggio
|
||||||
@@ -871,7 +1018,7 @@ Public Class ImportPageUC
|
|||||||
' Eventuale aggiornamento VeinMatching
|
' Eventuale aggiornamento VeinMatching
|
||||||
VeinMatching.ZoomAll()
|
VeinMatching.ZoomAll()
|
||||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||||
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea( dNewArea)
|
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea(dNewArea)
|
||||||
m_MainWindow.m_CurrentProjectPageUC.UpdateToProduceArea()
|
m_MainWindow.m_CurrentProjectPageUC.UpdateToProduceArea()
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||||
' Aggiorno ambiente principale
|
' Aggiorno ambiente principale
|
||||||
@@ -912,22 +1059,24 @@ Public Class ImportPageUC
|
|||||||
' Salvo direttorio corrente
|
' Salvo direttorio corrente
|
||||||
WritePrivateProfileString(S_FLATPARTS, K_FLPCURRDIR, m_sCurrDir, m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_FLATPARTS, K_FLPCURRDIR, m_sCurrDir, m_MainWindow.GetIniFile())
|
||||||
' Tolgo pagina inclinazioni/gocciolatoi se attiva
|
' Tolgo pagina inclinazioni/gocciolatoi se attiva
|
||||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked() Then
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||||
If SideAngleBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Then
|
||||||
SideAngleBtn.IsChecked = False
|
SideAngleBtn.IsChecked = False
|
||||||
|
ElseIf EngraveBtn.IsChecked() Then
|
||||||
|
EngraveBtn.IsChecked = False
|
||||||
Else
|
Else
|
||||||
DripCutBtn.IsChecked() = False
|
DripCutBtn.IsChecked() = False
|
||||||
End If
|
End If
|
||||||
' Tolgo pagina fori da sotto se attiva
|
' Tolgo pagina fori da sotto se attiva
|
||||||
ElseIf DripDrillBtn.IsChecked() Then
|
ElseIf DripDrillBtn.IsChecked() Then
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
LeftGrid.Children.Remove(m_UnderDrillUC)
|
LeftGrid.Children.Remove(m_UnderDrillUC)
|
||||||
DripDrillBtn.IsChecked() = False
|
DripDrillBtn.IsChecked() = False
|
||||||
' Tolgo pagina Filo Top se attiva
|
' Tolgo pagina Filo Top se attiva
|
||||||
ElseIf FiloTopBtn.IsChecked() Then
|
ElseIf FiloTopBtn.IsChecked() Then
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
@@ -941,6 +1090,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub SideAngleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SideAngleBtn.Click
|
Private Sub SideAngleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SideAngleBtn.Click
|
||||||
If SideAngleBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
' Aggiungo regioni per percorsi interni
|
' Aggiungo regioni per percorsi interni
|
||||||
AdjustSelectRegions()
|
AdjustSelectRegions()
|
||||||
' Dichiaro nessuna selezione
|
' Dichiaro nessuna selezione
|
||||||
@@ -953,7 +1103,11 @@ Public Class ImportPageUC
|
|||||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||||
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
@@ -963,6 +1117,7 @@ Public Class ImportPageUC
|
|||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
Else
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
' Rimuovo regioni per percorsi interni
|
' Rimuovo regioni per percorsi interni
|
||||||
RemoveSelectRegions()
|
RemoveSelectRegions()
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
@@ -974,8 +1129,72 @@ Public Class ImportPageUC
|
|||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
|
mmBtn.IsEnabled = True
|
||||||
|
inchBtn.IsEnabled = True
|
||||||
|
' Elimino scritte angoli per input e inserisco quelle definitive
|
||||||
|
SideAngle.WriteSideAngleForNest(ImportScene.GetCtx())
|
||||||
|
' Riabilito bottone reset
|
||||||
|
ResetBtn.IsEnabled = True
|
||||||
|
' Pulisco area messaggi
|
||||||
|
MessageTxBx.Text = ""
|
||||||
|
MessageBrd.Background = Brushes.Transparent
|
||||||
|
End If
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub EngraveBtn_Click(sender As Object, e As RoutedEventArgs) Handles EngraveBtn.Click
|
||||||
|
If EngraveBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
|
' Aggiungo regioni per percorsi interni
|
||||||
|
AdjustSelectRegions()
|
||||||
|
' Dichiaro nessuna selezione
|
||||||
|
m_nSelectedPart = GDB_ID.NULL
|
||||||
|
m_nSelectedLayer = GDB_ID.NULL
|
||||||
|
' Imposto modalità sideangle
|
||||||
|
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.ENGRAVE
|
||||||
|
LeftGrid.Children.Add(m_SideAngleUC)
|
||||||
|
FilePathTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
|
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||||
|
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
|
SideAngleBtn.IsEnabled = False
|
||||||
|
FiloTopBtn.IsEnabled = False
|
||||||
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
|
DripDrillBtn.IsEnabled = False
|
||||||
|
mmBtn.IsEnabled = False
|
||||||
|
inchBtn.IsEnabled = False
|
||||||
|
' Disabilito bottone reset
|
||||||
|
ResetBtn.IsEnabled = False
|
||||||
|
' Messaggio di selezione da effettuare
|
||||||
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||||
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
|
' Rimuovo regioni per percorsi interni
|
||||||
|
RemoveSelectRegions()
|
||||||
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
|
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||||
|
' Deseleziono eventuali pezzi rimasti selezionati
|
||||||
|
m_nSelectedPart = GDB_ID.NULL
|
||||||
|
m_nSelectedLayer = GDB_ID.NULL
|
||||||
|
EgtDeselectAll()
|
||||||
|
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
@@ -993,6 +1212,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub DripCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripCutBtn.Click
|
Private Sub DripCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripCutBtn.Click
|
||||||
If DripCutBtn.IsChecked() Then
|
If DripCutBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
' Dichiaro nessuna selezione
|
' Dichiaro nessuna selezione
|
||||||
m_nSelectedPart = GDB_ID.NULL
|
m_nSelectedPart = GDB_ID.NULL
|
||||||
m_nSelectedLayer = GDB_ID.NULL
|
m_nSelectedLayer = GDB_ID.NULL
|
||||||
@@ -1004,6 +1224,9 @@ Public Class ImportPageUC
|
|||||||
' Disabilito SideAngleBtn,FiloTop, DripDrillBtn e unità di misura
|
' Disabilito SideAngleBtn,FiloTop, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
|
If DripCutBtn.Visibility <> Visibility.Visible Then
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
@@ -1013,6 +1236,7 @@ Public Class ImportPageUC
|
|||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
Else
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||||
@@ -1023,8 +1247,9 @@ Public Class ImportPageUC
|
|||||||
' Riabilito SideAngleBtn, FiloTop, DripDrillBtn e unità di misura
|
' Riabilito SideAngleBtn, FiloTop, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility <> Visibility.Visible Then
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
inchBtn.IsEnabled = True
|
inchBtn.IsEnabled = True
|
||||||
' Elimino scritte angoli per input e inserisco quelle definitive
|
' Elimino scritte angoli per input e inserisco quelle definitive
|
||||||
@@ -1043,6 +1268,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub DripDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripDrillBtn.Click
|
Private Sub DripDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripDrillBtn.Click
|
||||||
If DripDrillBtn.IsChecked() Then
|
If DripDrillBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
' Aggiungo regioni di selezione per percorsi interni
|
' Aggiungo regioni di selezione per percorsi interni
|
||||||
AdjustSelectRegions()
|
AdjustSelectRegions()
|
||||||
' Imposto modalità fori da sotto
|
' Imposto modalità fori da sotto
|
||||||
@@ -1052,7 +1278,11 @@ Public Class ImportPageUC
|
|||||||
' Disabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
' Disabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
' Disabilito bottone reset
|
' Disabilito bottone reset
|
||||||
@@ -1061,6 +1291,7 @@ Public Class ImportPageUC
|
|||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 15) ' Selezionare uno o più fori
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 15) ' Selezionare uno o più fori
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
Else
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
' Rimuovo regioni per percorsi interni
|
' Rimuovo regioni per percorsi interni
|
||||||
RemoveSelectRegions()
|
RemoveSelectRegions()
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
@@ -1073,8 +1304,12 @@ Public Class ImportPageUC
|
|||||||
' Riabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
' Riabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
inchBtn.IsEnabled = True
|
inchBtn.IsEnabled = True
|
||||||
' Riabilito bottone reset
|
' Riabilito bottone reset
|
||||||
@@ -1088,6 +1323,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub FiloTopBtn_Click(sender As Object, e As RoutedEventArgs) Handles FiloTopBtn.Click
|
Private Sub FiloTopBtn_Click(sender As Object, e As RoutedEventArgs) Handles FiloTopBtn.Click
|
||||||
If FiloTopBtn.IsChecked() Then
|
If FiloTopBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
' Aggiungo regioni per percorsi interni
|
' Aggiungo regioni per percorsi interni
|
||||||
AdjustSelectRegions()
|
AdjustSelectRegions()
|
||||||
' Dichiaro nessuna selezione
|
' Dichiaro nessuna selezione
|
||||||
@@ -1099,7 +1335,11 @@ Public Class ImportPageUC
|
|||||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||||
' Disabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Disabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
@@ -1109,6 +1349,7 @@ Public Class ImportPageUC
|
|||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno interno
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno interno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
Else
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
' Rimuovo regioni per percorsi interni
|
' Rimuovo regioni per percorsi interni
|
||||||
RemoveSelectRegions()
|
RemoveSelectRegions()
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
@@ -1120,8 +1361,12 @@ Public Class ImportPageUC
|
|||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
' Riabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Riabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports System.IO
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class InternalComponentPageUC
|
Public Class InternalComponentPageUC
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ Public Class InternalComponentPageUC
|
|||||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||||
' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no
|
' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no
|
||||||
Dim nCount As Integer = GetPrivateProfileInt("InternalCompo", "Count", 0, m_MainWindow.GetIniFile())
|
Dim nCount As Integer = GetPrivateProfileInt(S_INTCOMPO, K_INT_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
If nCount > 8 Then
|
If nCount > 8 Then
|
||||||
Compo9.Visibility = Windows.Visibility.Visible
|
Compo9.Visibility = Windows.Visibility.Visible
|
||||||
Else
|
Else
|
||||||
@@ -163,10 +164,10 @@ Public Class InternalComponentPageUC
|
|||||||
|
|
||||||
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
|
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
|
||||||
CurrentBtn = e.Source
|
CurrentBtn = e.Source
|
||||||
Dim CompoName As String = "InternalCompo" & GetIndexFromButton(CurrentBtn).ToString
|
Dim CompoName As String = S_INTCOMPO & GetIndexFromButton(CurrentBtn).ToString
|
||||||
m_sCurrCompoFam = CompoName
|
m_sCurrCompoFam = CompoName
|
||||||
' m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
' m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
||||||
Dim nCount As Integer = GetPrivateProfileInt(CompoName, "Count", 0, m_MainWindow.GetIniFile())
|
Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
If nCount > 1 Then
|
If nCount > 1 Then
|
||||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
||||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent
|
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent
|
||||||
@@ -252,7 +253,7 @@ Public Class InternalComponentPageUC
|
|||||||
Private Sub LoadPage()
|
Private Sub LoadPage()
|
||||||
Dim nDeltaSecondPage As Integer = 8
|
Dim nDeltaSecondPage As Integer = 8
|
||||||
' Leggo numero di componenti presenti
|
' Leggo numero di componenti presenti
|
||||||
Dim nCompoNumber As Integer = GetPrivateProfileInt("InternalCompo", "Count", 0, m_MainWindow.GetIniFile())
|
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_INTCOMPO, K_INT_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
' Calcolo indici a seconda della pagina in cui sono
|
' Calcolo indici a seconda della pagina in cui sono
|
||||||
If m_bIsFirstPage Then
|
If m_bIsFirstPage Then
|
||||||
ClearButton(nCompoNumber)
|
ClearButton(nCompoNumber)
|
||||||
@@ -286,12 +287,22 @@ Public Class InternalComponentPageUC
|
|||||||
If sCompoImage.Length <> 0 Then
|
If sCompoImage.Length <> 0 Then
|
||||||
Try
|
Try
|
||||||
Dim sPath As String = m_MainWindow.GetResourcesDir() & "\" & sCompoImage
|
Dim sPath As String = m_MainWindow.GetResourcesDir() & "\" & sCompoImage
|
||||||
sCompoImageSource = ImageConverter.ConvertFromString(sPath)
|
If File.Exists(sPath) Then
|
||||||
GetImage(index).Height = 65
|
sCompoImageSource = ImageConverter.ConvertFromString(sPath)
|
||||||
GetImage(index).Width = 65
|
GetImage(index).Height = 65
|
||||||
GetImage(index).Source = sCompoImageSource
|
GetImage(index).Width = 65
|
||||||
GetLabel(index).SetValue(Grid.ColumnProperty, 1)
|
GetImage(index).Source = sCompoImageSource
|
||||||
GetLabel(index).SetValue(Grid.ColumnSpanProperty, 1)
|
GetLabel(index).SetValue(Grid.ColumnProperty, 1)
|
||||||
|
GetLabel(index).SetValue(Grid.ColumnSpanProperty, 1)
|
||||||
|
Else
|
||||||
|
sCompoImage = String.Empty
|
||||||
|
GetImage(index).Height = 0
|
||||||
|
GetImage(index).Width = 0
|
||||||
|
CustomThickness.Right = 0
|
||||||
|
GetImage(index).Margin = CustomThickness
|
||||||
|
GetLabel(index).SetValue(Grid.ColumnProperty, 0)
|
||||||
|
GetLabel(index).SetValue(Grid.ColumnSpanProperty, 2)
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
EgtOutLog("Error loading image " & sCompoImage)
|
EgtOutLog("Error loading image " & sCompoImage)
|
||||||
sCompoImage = String.Empty
|
sCompoImage = String.Empty
|
||||||
|
|||||||
@@ -33,14 +33,31 @@ Public Class MainComponentPageUC
|
|||||||
m_bIsFirstPage = True
|
m_bIsFirstPage = True
|
||||||
LoadPage()
|
LoadPage()
|
||||||
CurrentBtn = Nothing
|
CurrentBtn = Nothing
|
||||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
' se il numero delle componenti è superiore a 8 allora inserisco la seconda pagina
|
||||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
If GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile()) > 8 Then
|
||||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
OthersBackGr.Visibility = Visibility.Visible
|
||||||
|
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||||
|
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||||
|
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||||
|
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||||
|
Else
|
||||||
|
OthersBackGr.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
OthersBackGr.Visibility = Visibility.Visible
|
||||||
|
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||||
|
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||||
|
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||||
|
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = False
|
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = False
|
||||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = False
|
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = False
|
||||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = False
|
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = False
|
||||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||||
|
m_MainWindow.m_DrawPageUC.m_bBackFromInternalCompo = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetButton(ByVal nInd As Integer) As Button
|
Private Function GetButton(ByVal nInd As Integer) As Button
|
||||||
@@ -167,10 +184,10 @@ Public Class MainComponentPageUC
|
|||||||
|
|
||||||
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
|
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
|
||||||
CurrentBtn = DirectCast(e.Source, Button)
|
CurrentBtn = DirectCast(e.Source, Button)
|
||||||
Dim CompoName As String = "Compo" & GetIndexFromButton(CurrentBtn).ToString
|
Dim CompoName As String = If(m_MainWindow.FrameCutBtn.IsChecked, S_FRAMECOMPO, S_COMPO) & GetIndexFromButton(CurrentBtn).ToString
|
||||||
m_sCurrCompoFam = CompoName
|
m_sCurrCompoFam = CompoName
|
||||||
m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
||||||
Dim nCount As Integer = GetPrivateProfileInt(CompoName, "Count", 0, m_MainWindow.GetIniFile())
|
Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
If nCount > 1 Then
|
If nCount > 1 Then
|
||||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
||||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent
|
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent
|
||||||
@@ -251,13 +268,18 @@ Public Class MainComponentPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LoadPage()
|
Private Sub LoadPage()
|
||||||
|
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||||
|
LoadFramePage()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
Dim nDeltaSecondPage As Integer = 8
|
Dim nDeltaSecondPage As Integer = 8
|
||||||
' Leggo numero di componenti presenti
|
' Leggo numero di componenti presenti
|
||||||
Dim nCompoNumber As Integer = GetPrivateProfileInt("Compo", "Count", 0, m_MainWindow.GetIniFile())
|
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_COMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
' Calcolo indici a seconda della pagina in cui sono
|
' Calcolo indici a seconda della pagina in cui sono
|
||||||
If m_bIsFirstPage Then
|
If m_bIsFirstPage Then
|
||||||
ClearButton(nCompoNumber)
|
ClearButton(nCompoNumber)
|
||||||
nDeltaSecondPage = 0
|
nDeltaSecondPage = 0
|
||||||
Else
|
Else
|
||||||
ClearButton(nCompoNumber)
|
ClearButton(nCompoNumber)
|
||||||
nDeltaSecondPage = 8
|
nDeltaSecondPage = 8
|
||||||
@@ -325,16 +347,86 @@ Public Class MainComponentPageUC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LoadFramePage()
|
||||||
|
Dim nDeltaSecondPage As Integer = 8
|
||||||
|
' Leggo numero di componenti presenti
|
||||||
|
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
|
' Calcolo indici a seconda della pagina in cui sono
|
||||||
|
If m_bIsFirstPage Then
|
||||||
|
ClearButton(nCompoNumber)
|
||||||
|
nDeltaSecondPage = 0
|
||||||
|
Else
|
||||||
|
ClearButton(nCompoNumber)
|
||||||
|
nDeltaSecondPage = 8
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Creazione converter da String a ImageSource
|
||||||
|
Dim ImageConverter As New ImageSourceConverter
|
||||||
|
Dim ThicknessConverter As New ThicknessConverter
|
||||||
|
|
||||||
|
'Assegnazione immagine e testo ai Button
|
||||||
|
For index As Integer = 1 To 8
|
||||||
|
Dim CustomThickness As New Thickness(0)
|
||||||
|
Dim nCompoName As Integer = GetPrivateProfileInt(S_FRAMECOMPO & index + nDeltaSecondPage, "Name", 0, m_MainWindow.GetIniFile())
|
||||||
|
Dim sCompoImage As String = ""
|
||||||
|
Dim sCompoImageSource As ImageSource
|
||||||
|
|
||||||
|
'verifico presenza immagine e la aggiungo
|
||||||
|
If GetPrivateProfileString(S_FRAMECOMPO & index + nDeltaSecondPage, "Image", "", sCompoImage, m_MainWindow.GetIniFile()) <> 0 Then
|
||||||
|
Try
|
||||||
|
sCompoImageSource = ImageConverter.ConvertFromString(m_MainWindow.GetResourcesDir() & "\" & sCompoImage)
|
||||||
|
GetImage(index).Height = 65
|
||||||
|
GetImage(index).Width = 65
|
||||||
|
GetImage(index).Source = sCompoImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & sCompoImage)
|
||||||
|
sCompoImage = String.Empty
|
||||||
|
GetImage(index).Height = 0
|
||||||
|
GetImage(index).Width = 0
|
||||||
|
CustomThickness.Right = 0
|
||||||
|
GetImage(index).Margin = CustomThickness
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
'Se non c'è l'immagine azzero la distanza tra testo e immagine
|
||||||
|
CustomThickness.Right = 0
|
||||||
|
GetImage(index).Margin = CustomThickness
|
||||||
|
End If
|
||||||
|
|
||||||
|
'verifico presenza testo
|
||||||
|
If nCompoName > 0 Then
|
||||||
|
Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
||||||
|
'verifico presenza immagine
|
||||||
|
If sCompoImage.Length > 0 Then
|
||||||
|
'se la lunghezza del testo è maggiore di 15 lo taglio
|
||||||
|
If sCompoName.Length > 15 Then
|
||||||
|
sCompoName = sCompoName.Substring(0, 15)
|
||||||
|
End If
|
||||||
|
GetLabel(index).Text = sCompoName
|
||||||
|
'Se ci sono sia testo che immagine imposto un margine di 10
|
||||||
|
CustomThickness.Right = 10
|
||||||
|
GetImage(index).Margin = CustomThickness
|
||||||
|
Else
|
||||||
|
'se l'immagine non c'è e il testo è maggiore di 20 lo taglio
|
||||||
|
If sCompoName.Length > 20 Then
|
||||||
|
sCompoName = sCompoName.Substring(0, 20)
|
||||||
|
End If
|
||||||
|
GetLabel(index).Text = sCompoName
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'Se non c'è testo azzero la distanza tra testo e immagine
|
||||||
|
CustomThickness.Right = 0
|
||||||
|
GetImage(index).Margin = CustomThickness
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
' Gestione bottone altri componenti
|
' Gestione bottone altri componenti
|
||||||
Private Sub Compo9_Click(sender As Object, e As RoutedEventArgs) Handles Compo9.Click
|
Private Sub Compo9_Click(sender As Object, e As RoutedEventArgs) Handles Compo9.Click
|
||||||
If m_bIsFirstPage Then
|
If m_bIsFirstPage Then
|
||||||
m_bIsFirstPage = False
|
m_bIsFirstPage = False
|
||||||
LoadPage()
|
LoadPage()
|
||||||
'Compo9.SetValue(Grid.ColumnProperty, 1)
|
|
||||||
'Compo9.SetValue(Grid.ColumnSpanProperty, 1)
|
|
||||||
'ImageCompo9.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NumericKeyboardArrow.png", UriKind.Relative))
|
|
||||||
'ImageCompo9.Visibility = Windows.Visibility.Visible
|
|
||||||
'LabelCompo9.Visibility = Windows.Visibility.Hidden
|
|
||||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||||
|
|||||||
@@ -26,17 +26,17 @@ Public Class SecondaryComponentPageUC
|
|||||||
Dim ImageConverter As New ImageSourceConverter
|
Dim ImageConverter As New ImageSourceConverter
|
||||||
Dim ThicknessConverter As New ThicknessConverter
|
Dim ThicknessConverter As New ThicknessConverter
|
||||||
|
|
||||||
m_sMainCompoName = m_MainComponentPage.m_sCurrCompoFam '"Compo" & m_MainComponentPage.GetIndexFromButton(CurrentMainBtn)
|
m_sMainCompoName = m_MainComponentPage.m_sCurrCompoFam
|
||||||
|
|
||||||
'Assegnazione immagine e testo ai Button
|
'Assegnazione immagine e testo ai Button
|
||||||
Dim nCount As Integer = GetPrivateProfileInt(m_sMainCompoName, "Count", 0, m_MainWindow.GetIniFile())
|
Dim nCount As Integer = GetPrivateProfileInt(m_sMainCompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
ClearButton(nCount)
|
ClearButton(nCount)
|
||||||
For index As Integer = 1 To nCount
|
For index As Integer = 1 To nCount
|
||||||
Dim CustomThickness As Thickness = ThicknessConverter.ConvertFromString("0")
|
Dim CustomThickness As Thickness = ThicknessConverter.ConvertFromString("0")
|
||||||
Dim nCompoName As Integer = GetPrivateProfileInt(m_sMainCompoName, "Compo" & index, 0, m_MainWindow.GetIniFile())
|
Dim nCompoName As Integer = GetPrivateProfileInt(m_sMainCompoName, S_EXTCOMPO & index, 0, m_MainWindow.GetIniFile())
|
||||||
Dim sCompo As String = ""
|
Dim sCompo As String = ""
|
||||||
Dim sCompoImage As String = ""
|
Dim sCompoImage As String = ""
|
||||||
m_MainComponentPage.GetPrivateProfileCompo(m_sMainCompoName, "Compo" & index, nCompoName, sCompo, sCompoImage, m_MainWindow.GetIniFile())
|
m_MainComponentPage.GetPrivateProfileCompo(m_sMainCompoName, S_EXTCOMPO & index, nCompoName, sCompo, sCompoImage, m_MainWindow.GetIniFile())
|
||||||
Dim sCompoImageSource As ImageSource
|
Dim sCompoImageSource As ImageSource
|
||||||
|
|
||||||
'verifico presenza immagine e la aggiungo
|
'verifico presenza immagine e la aggiungo
|
||||||
|
|||||||
+14
-14
@@ -159,7 +159,7 @@ Module SideAngle
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function WriteSideAngleOnLoop(LoopId As Integer, TextLayId As Integer) As Boolean
|
Friend Function WriteSideAngleOnLoop(LoopId As Integer, TextLayId As Integer) As Boolean
|
||||||
' Verifiche
|
' Verifiche
|
||||||
If LoopId = GDB_ID.NULL Or TextLayId = GDB_ID.NULL Then Return False
|
If LoopId = GDB_ID.NULL Or TextLayId = GDB_ID.NULL Then Return False
|
||||||
' Calcolo dimensione ingombro Loop
|
' Calcolo dimensione ingombro Loop
|
||||||
@@ -201,7 +201,7 @@ Module SideAngle
|
|||||||
Friend Sub ColorToSideAngle(nCtx As Integer)
|
Friend Sub ColorToSideAngle(nCtx As Integer)
|
||||||
' Leggo dati corrispondenza colore-angolo
|
' Leggo dati corrispondenza colore-angolo
|
||||||
Dim CurrCSA As New ColorSideAngs
|
Dim CurrCSA As New ColorSideAngs
|
||||||
CurrCSA.Read( m_MainWindow.GetIniFile)
|
CurrCSA.Read(m_MainWindow.GetIniFile)
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext(nCtx)
|
EgtSetCurrentContext(nCtx)
|
||||||
' Ciclo sui pezzi
|
' Ciclo sui pezzi
|
||||||
@@ -212,27 +212,27 @@ Module SideAngle
|
|||||||
Dim LoopId As Integer = EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP)
|
Dim LoopId As Integer = EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP)
|
||||||
While LoopId <> GDB_ID.NULL
|
While LoopId <> GDB_ID.NULL
|
||||||
' Ciclo sulle curve
|
' Ciclo sulle curve
|
||||||
Dim PrevId As Integer = EgtGetLastInGroup( LoopId)
|
Dim PrevId As Integer = EgtGetLastInGroup(LoopId)
|
||||||
Dim EntId As Integer = EgtGetFirstInGroup( LoopId)
|
Dim EntId As Integer = EgtGetFirstInGroup(LoopId)
|
||||||
While EntId <> GDB_ID.NULL
|
While EntId <> GDB_ID.NULL
|
||||||
Dim NextId As Integer = EgtGetNext( EntId)
|
Dim NextId As Integer = EgtGetNext(EntId)
|
||||||
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup( LoopId)
|
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup(LoopId)
|
||||||
If VerifySideAnglePossible( PrevId, EntId, NextId, bOutLoop) Then
|
If VerifySideAnglePossible(PrevId, EntId, NextId, bOutLoop) Then
|
||||||
Dim colEnt As Color3d
|
Dim colEnt As Color3d
|
||||||
If EgtGetColor( EntId, colEnt) Then
|
If EgtGetColor(EntId, colEnt) Then
|
||||||
Dim dAng As Double
|
Dim dAng As Double
|
||||||
Dim dHeel As Double
|
Dim dHeel As Double
|
||||||
If CurrCSA.GetSideAngHeel( colEnt, dAng, dHeel) Then
|
If CurrCSA.GetSideAngHeel(colEnt, dAng, dHeel) Then
|
||||||
EgtSetInfo( EntId, INFO_SIDE_ANGLE, dAng)
|
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
|
||||||
EgtSetInfo( EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||||
EgtSetInfo( EntId, INFO_HEEL, dHeel)
|
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
PrevId = EntId
|
PrevId = EntId
|
||||||
EntId = EgtGetNext( EntId)
|
EntId = EgtGetNext(EntId)
|
||||||
End While
|
End While
|
||||||
If bOutLoop then
|
If bOutLoop Then
|
||||||
bOutLoop = False
|
bOutLoop = False
|
||||||
LoopId = EgtGetFirstNameInGroup(PartId, NAME_INLOOP)
|
LoopId = EgtGetFirstNameInGroup(PartId, NAME_INLOOP)
|
||||||
Else
|
Else
|
||||||
|
|||||||
+29
-18
@@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
d:DesignHeight="636.9" d:DesignWidth="255.9">
|
||||||
|
|
||||||
<!-- Definizione della Grid Laterale -->
|
<!-- Definizione della Grid Laterale -->
|
||||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.2*"/>
|
<RowDefinition Height="0.2*"/>
|
||||||
<RowDefinition Height="4*"/>
|
<RowDefinition Height="5*"/>
|
||||||
<!--<RowDefinition Height="0.5*"/>
|
<!--<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>-->
|
<RowDefinition Height="0.5*"/>-->
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A2" Grid.Column="1" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A2" Grid.Column="1" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A3" Grid.Column="1" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A3" Grid.Column="1" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A4" Grid.Column="1" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A4" Grid.Column="1" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A5" Grid.Column="1" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A5" Grid.Column="1" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A6" Grid.Column="1" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A6" Grid.Column="1" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A7" Grid.Column="1" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A7" Grid.Column="1" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A8" Grid.Column="1" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A8" Grid.Column="1" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A9" Grid.Column="1" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A9" Grid.Column="1" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
@@ -128,14 +128,14 @@
|
|||||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="A10" Grid.Column="1" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A10" Grid.Column="1" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60"
|
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60" IsLength="False"
|
||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
|
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="0.3*"/>
|
<ColumnDefinition Width="0.3*"/>
|
||||||
@@ -143,10 +143,11 @@
|
|||||||
<ColumnDefinition Width="0.6*"/>
|
<ColumnDefinition Width="0.6*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="0.9*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="0.9*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="0.9*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="0.9*"/>
|
||||||
|
<RowDefinition Height="0.9*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
@@ -168,7 +169,7 @@
|
|||||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||||
Grid.Column="2" Grid.Row="12"
|
Grid.Column="2" Grid.Row="12"
|
||||||
Width="40" Height="30"
|
Width="40" Height="30" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
||||||
Grid.Column="3" Grid.Row="12"
|
Grid.Column="3" Grid.Row="12"
|
||||||
@@ -196,6 +197,16 @@
|
|||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Width="85" Height="30"
|
Width="85" Height="30"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||||
|
Text="Angolo"
|
||||||
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||||
|
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
||||||
|
Margin="0,0,0,-2"
|
||||||
|
Width="85" Height="30" IsLength="False"
|
||||||
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
|
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
|
||||||
|
|||||||
+148
-16
@@ -34,7 +34,9 @@ Public Class SideAngleUC
|
|||||||
Friend m_dDripOffset2 As Double = 0
|
Friend m_dDripOffset2 As Double = 0
|
||||||
Friend m_nEngrNbr2 As Integer = 1
|
Friend m_nEngrNbr2 As Integer = 1
|
||||||
Friend m_dDripDepth As Double = 10
|
Friend m_dDripDepth As Double = 10
|
||||||
|
Friend m_dEngraveDepth2 As Double = 15
|
||||||
Friend m_dDripShort As Double = 0
|
Friend m_dDripShort As Double = 0
|
||||||
|
Friend m_dEngraveAngle As Double = 0
|
||||||
|
|
||||||
Private CurrEntityDrip As DripEntity
|
Private CurrEntityDrip As DripEntity
|
||||||
|
|
||||||
@@ -75,10 +77,12 @@ Public Class SideAngleUC
|
|||||||
|
|
||||||
' Inizializzo lati per angoli e per gocciolatoi (ne compilo la lista e aggiungo la scritta nel disegno)
|
' Inizializzo lati per angoli e per gocciolatoi (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||||
InitSides()
|
InitSides()
|
||||||
' Aggiorno testi nel disegno e creo i gocciolatoi
|
'' Aggiorno testi nel disegno e creo i gocciolatoi
|
||||||
RefreshSideAngleText()
|
'RefreshSideAngleText()
|
||||||
' Aggiorno check e valori
|
' Aggiorno check e valori
|
||||||
RefreshCheckAndValue()
|
RefreshCheckAndValue()
|
||||||
|
' Aggiorno testi nel disegno e creo i gocciolatoi
|
||||||
|
RefreshSideAngleText()
|
||||||
|
|
||||||
' Gestisco visualizzazione di tutti i parametri
|
' Gestisco visualizzazione di tutti i parametri
|
||||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||||
@@ -103,6 +107,9 @@ Public Class SideAngleUC
|
|||||||
' Accorciamento
|
' Accorciamento
|
||||||
Parameter4TxBl.Visibility = Windows.Visibility.Hidden
|
Parameter4TxBl.Visibility = Windows.Visibility.Hidden
|
||||||
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
|
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
|
||||||
|
' Angolo
|
||||||
|
Parameter5TxBl.Visibility = Windows.Visibility.Hidden
|
||||||
|
Parameter5TxBx.Visibility = Windows.Visibility.Hidden
|
||||||
Else
|
Else
|
||||||
' se aggiungo gli ENGRAVE e i DRIP
|
' se aggiungo gli ENGRAVE e i DRIP
|
||||||
|
|
||||||
@@ -114,10 +121,12 @@ Public Class SideAngleUC
|
|||||||
GetAngleTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
GetAngleTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||||
GetHeelTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
GetHeelTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||||
Next
|
Next
|
||||||
|
|
||||||
' Offset
|
' Offset
|
||||||
Parameter1TxBl.Visibility = Windows.Visibility.Visible
|
Parameter1TxBl.Visibility = Windows.Visibility.Visible
|
||||||
Parameter1TxBx.Visibility = Windows.Visibility.Visible
|
Parameter1TxBx.Visibility = Windows.Visibility.Visible
|
||||||
Parameter2TxBl.Visibility = Windows.Visibility.Visible
|
Parameter2TxBl.Visibility = Windows.Visibility.Visible
|
||||||
|
|
||||||
' Offset2
|
' Offset2
|
||||||
If m_Mode <> ModeOpt.ENGRAVE Then
|
If m_Mode <> ModeOpt.ENGRAVE Then
|
||||||
Parameter2TxBx.Visibility = Windows.Visibility.Visible
|
Parameter2TxBx.Visibility = Windows.Visibility.Visible
|
||||||
@@ -128,12 +137,33 @@ Public Class SideAngleUC
|
|||||||
Parameter2aTxBx.Visibility = Windows.Visibility.Visible
|
Parameter2aTxBx.Visibility = Windows.Visibility.Visible
|
||||||
Parameter2bTxBx.Visibility = Windows.Visibility.Visible
|
Parameter2bTxBx.Visibility = Windows.Visibility.Visible
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Affondamento
|
' Affondamento
|
||||||
Parameter3TxBl.Visibility = Windows.Visibility.Visible
|
Parameter3TxBl.Visibility = Windows.Visibility.Visible
|
||||||
Parameter3TxBx.Visibility = Windows.Visibility.Visible
|
Parameter3TxBx.Visibility = Windows.Visibility.Visible
|
||||||
|
|
||||||
' Accorciamento
|
' Accorciamento
|
||||||
Parameter4TxBl.Visibility = Windows.Visibility.Hidden
|
If m_Mode = ModeOpt.ENGRAVE Then
|
||||||
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
|
' modifico il nome del messaggio
|
||||||
|
Parameter4TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) & "2" ' Affondamento2
|
||||||
|
Parameter4TxBl.Visibility = Windows.Visibility.Visible
|
||||||
|
Parameter4TxBx.Visibility = Windows.Visibility.Visible
|
||||||
|
Else
|
||||||
|
Parameter4TxBl.Visibility = Windows.Visibility.Hidden
|
||||||
|
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Angolo
|
||||||
|
If m_Mode = ModeOpt.ENGRAVE Then
|
||||||
|
' modifico il nome del messaggio
|
||||||
|
Parameter5TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
|
||||||
|
Parameter5TxBl.Visibility = Windows.Visibility.Visible
|
||||||
|
Parameter5TxBx.Visibility = Windows.Visibility.Visible
|
||||||
|
Else
|
||||||
|
Parameter5TxBl.Visibility = Windows.Visibility.Hidden
|
||||||
|
Parameter5TxBx.Visibility = Windows.Visibility.Hidden
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
|
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
|
||||||
@@ -154,12 +184,14 @@ Public Class SideAngleUC
|
|||||||
m_nEngrNbr2 = GetPrivateProfileInt( S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
|
m_nEngrNbr2 = GetPrivateProfileInt( S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
|
||||||
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
|
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||||
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
|
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
|
||||||
m_dDripShort = GetPrivateProfileDouble( S_SIDES, K_ENGRAVESHORT, 0, m_MainWindow.GetIniFile())
|
m_dEngraveDepth2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0, m_MainWindow.GetIniFile())
|
||||||
Parameter1TxBx.Text = LenToString( m_dDripOffset, 3)
|
m_dEngraveAngle = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0, m_MainWindow.GetIniFile())
|
||||||
|
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
||||||
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
|
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
|
||||||
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
|
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
|
||||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
||||||
Parameter4TxBx.Text = LenToString( m_dDripShort, 3)
|
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
|
||||||
|
Parameter5TxBx.Text = DoubleToString(m_dEngraveAngle, 3)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
@@ -179,6 +211,10 @@ Public Class SideAngleUC
|
|||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||||
' Ricavo nome primo pezzo e lo sistemo
|
' Ricavo nome primo pezzo e lo sistemo
|
||||||
|
If m_Mode = ModeOpt.ENGRAVE And m_MainWindow.m_DrawPageUC.SelectedLayer = GDB_ID.NULL Then
|
||||||
|
PartId = EgtGetFirstPart()
|
||||||
|
m_MainWindow.m_DrawPageUC.SetCurrLayer(EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP))
|
||||||
|
End If
|
||||||
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
|
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
|
||||||
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
||||||
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
||||||
@@ -275,8 +311,8 @@ Public Class SideAngleUC
|
|||||||
' Attualmente il vaore m_nCount è inizializzato ad "1"..
|
' Attualmente il vaore m_nCount è inizializzato ad "1"..
|
||||||
' Bottoni Prev Next
|
' Bottoni Prev Next
|
||||||
If m_nCount <= MAX_LINES Then
|
If m_nCount <= MAX_LINES Then
|
||||||
PrevBtn.Visibility = Windows.Visibility.Hidden
|
PrevBtn.Visibility= Windows.Visibility.Hidden
|
||||||
NextBtn.Visibility = Windows.Visibility.Hidden
|
NextBtn.Visibility= Windows.Visibility.Hidden
|
||||||
Else
|
Else
|
||||||
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
|
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
|
||||||
PrevBtn.Visibility = Windows.Visibility.Visible
|
PrevBtn.Visibility = Windows.Visibility.Visible
|
||||||
@@ -483,7 +519,9 @@ Public Class SideAngleUC
|
|||||||
WritePrivateProfileString( S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
|
WritePrivateProfileString( S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
|
||||||
'WritePrivateProfileString( S_SIDES, K_ENGRAVESHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
|
'WritePrivateProfileString( S_SIDES, K_ENGRAVESHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_SIDES, K_ENGRAVEANGLE, LenToString(m_dEngraveAngle, 3), m_MainWindow.GetIniFile())
|
||||||
End If
|
End If
|
||||||
|
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -497,11 +535,10 @@ Public Class SideAngleUC
|
|||||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||||
' Ricavo nome primo pezzo
|
|
||||||
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
|
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
|
||||||
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
||||||
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
||||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||||
' Recupero nome pezzo
|
' Recupero nome pezzo
|
||||||
@@ -568,8 +605,20 @@ Public Class SideAngleUC
|
|||||||
' verifico se l'entità ha un gocciolatoio
|
' verifico se l'entità ha un gocciolatoio
|
||||||
GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip
|
GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip
|
||||||
' aggiorno i valore delle caselle di testo per le entità caricate (Start/End)
|
' aggiorno i valore delle caselle di testo per le entità caricate (Start/End)
|
||||||
GetAngleTxBxFromIndex(nChIndex).Text = DoubleToString(Entity.dShortStart, 1)
|
If m_Mode = ModeOpt.ENGRAVE Then
|
||||||
GetHeelTxBxFromIndex(nChIndex).Text = LenToString(Entity.dShortStart, 1)
|
Dim dVal As Double = 0
|
||||||
|
If StringToLen(GetPrivateProfileDouble(S_SIDES, K_ENGRAVESHORT & "A" & nIndex.ToString & "_Start", 0, m_MainWindow.GetIniFile()), dVal) Then
|
||||||
|
Entity.dShortStart = dVal
|
||||||
|
End If
|
||||||
|
If StringToLen(GetPrivateProfileDouble(S_SIDES, K_ENGRAVESHORT & "A" & nIndex.ToString & "_End", 0, m_MainWindow.GetIniFile()), dVal) Then
|
||||||
|
Entity.dShortEnd = dVal
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'GetAngleTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_Start", 0, m_MainWindow.GetIniFile())
|
||||||
|
'GetHeelTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_End", 0, m_MainWindow.GetIniFile())
|
||||||
|
End If
|
||||||
|
GetAngleTxBxFromIndex(nChIndex).Text = LenToString(Entity.dShortStart, 1)
|
||||||
|
GetHeelTxBxFromIndex(nChIndex).Text = LenToString(Entity.dShortEnd, 1)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -618,7 +667,7 @@ Public Class SideAngleUC
|
|||||||
SideAngle.AddTextToLine(sEntityName, TextLayer, CurrLine, 20, dBBoxRad, True)
|
SideAngle.AddTextToLine(sEntityName, TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Funzione che crea le geometrie dei gocciolatoi
|
' Funzione che crea le geometrie dei gocciolatoi (NON UTILIZZATA)
|
||||||
Friend Sub CreateDripGeomOLD(nPartId As Integer)
|
Friend Sub CreateDripGeomOLD(nPartId As Integer)
|
||||||
' Recupero Id layer di contorno esterno
|
' Recupero Id layer di contorno esterno
|
||||||
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
||||||
@@ -738,6 +787,10 @@ Public Class SideAngleUC
|
|||||||
vJoint.Add(False)
|
vJoint.Add(False)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' se non riesco a generare un elenco allora esco
|
||||||
|
If vJoint.Count < 1 Then Return
|
||||||
|
|
||||||
If vJoint(0) And vJoint(vJoint.Count - 1) Then
|
If vJoint(0) And vJoint(vJoint.Count - 1) Then
|
||||||
bJointStart = True
|
bJointStart = True
|
||||||
End If
|
End If
|
||||||
@@ -809,6 +862,9 @@ Public Class SideAngleUC
|
|||||||
Dim nCrvId = EgtGetFirstInGroup(DripLayer)
|
Dim nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||||
While nCrvId <> GDB_ID.NULL
|
While nCrvId <> GDB_ID.NULL
|
||||||
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
|
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
|
||||||
|
If m_Mode = ModeOpt.ENGRAVE Then
|
||||||
|
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||||
|
End If
|
||||||
nCrvId = EgtGetNext(nCrvId)
|
nCrvId = EgtGetNext(nCrvId)
|
||||||
End While
|
End While
|
||||||
' Eventuali curve aggiuntive con offset2
|
' Eventuali curve aggiuntive con offset2
|
||||||
@@ -819,10 +875,16 @@ Public Class SideAngleUC
|
|||||||
For i As Integer = 1 To m_nEngrNbr2
|
For i As Integer = 1 To m_nEngrNbr2
|
||||||
Dim nNewId As Integer = EgtCopy(nCrvId, nCrvId, GDB_POS.AFTER)
|
Dim nNewId As Integer = EgtCopy(nCrvId, nCrvId, GDB_POS.AFTER)
|
||||||
EgtOffsetCurve(nNewId, -i * m_dDripOffset2, OFF_TYPE.EXTEND)
|
EgtOffsetCurve(nNewId, -i * m_dDripOffset2, OFF_TYPE.EXTEND)
|
||||||
|
If m_Mode = ModeOpt.ENGRAVE Then
|
||||||
|
EgtSetInfo(nNewId, INFO_DEPTH, m_dEngraveDepth2)
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
nCrvId = nNextCrvId
|
nCrvId = nNextCrvId
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim ListEngraveSideAng As New List(Of Integer)
|
||||||
|
|
||||||
If m_Mode = ModeOpt.DRIP Then
|
If m_Mode = ModeOpt.DRIP Then
|
||||||
' Esplodo nelle curve componenti
|
' Esplodo nelle curve componenti
|
||||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||||
@@ -842,14 +904,70 @@ Public Class SideAngleUC
|
|||||||
End While
|
End While
|
||||||
Else
|
Else
|
||||||
' Assegno colore e attributi
|
' Assegno colore e attributi
|
||||||
|
Dim nInd As Integer = 0
|
||||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||||
While nCrvId <> GDB_ID.NULL
|
While nCrvId <> GDB_ID.NULL
|
||||||
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
|
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
|
||||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
'EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||||
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
|
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
|
||||||
|
If nInd = 0 Then
|
||||||
|
' solo se m_dEngraveAngle > 0
|
||||||
|
If Math.Abs(m_dEngraveAngle) > EPS_ANG_SMALL Then
|
||||||
|
' salvo l'Id della curva che deve essere manipolato separatamente
|
||||||
|
ListEngraveSideAng.Add(nCrvId)
|
||||||
|
Else
|
||||||
|
EgtRemoveInfo(nCrvId, INFO_SIDE_ANGLE)
|
||||||
|
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If nInd = m_nEngrNbr2 Then
|
||||||
|
nInd = -1
|
||||||
|
End If
|
||||||
|
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||||
|
End If
|
||||||
|
nInd = nInd + 1
|
||||||
|
If nInd > m_nEngrNbr2 Then nInd = 0
|
||||||
nCrvId = EgtGetNext(nCrvId)
|
nCrvId = EgtGetNext(nCrvId)
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
|
SplitJointedSideEngrave(ListEngraveSideAng)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SplitJointedSideEngrave(ListEngraveSideAngId As List(Of Integer))
|
||||||
|
For Each nCrvId As Integer In ListEngraveSideAngId
|
||||||
|
' eventualmente separo il taglio inclinato
|
||||||
|
Dim dUs, dUe As Double
|
||||||
|
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||||
|
Dim dU As Double = dUs
|
||||||
|
While dU < dUe ' + EPS_ZERO
|
||||||
|
Dim ptCurr As Point3d
|
||||||
|
EgtAtParamPoint(nCrvId, dU + 1, nCrvId, ptCurr)
|
||||||
|
' separa la curva in questo punto
|
||||||
|
Dim nNewCurvId As Integer = GDB_ID.NULL
|
||||||
|
If dUe > 1 Then
|
||||||
|
nNewCurvId = EgtSplitCurveAtPoint(nCrvId, ptCurr, GDB_RT.LOC)
|
||||||
|
Else
|
||||||
|
nNewCurvId = nCrvId
|
||||||
|
End If
|
||||||
|
EgtSetColor(nCrvId, COL_MCH_ONENGRAVE_ANG())
|
||||||
|
EgtSetInfo(nCrvId, INFO_SIDE_ANGLE, m_dEngraveAngle)
|
||||||
|
' recupero il vettore di estrusione della curva e la direzione della curva
|
||||||
|
Dim vtAux As Vector3d
|
||||||
|
EgtStartVector(nCrvId, vtAux)
|
||||||
|
Dim vtExtrusion As Vector3d
|
||||||
|
EgtCurveExtrusion(nCrvId, vtExtrusion)
|
||||||
|
' ruoto il vetottore nella nuova direzione
|
||||||
|
vtExtrusion.Rotate(vtAux, -m_dEngraveAngle)
|
||||||
|
' assegno il vettore di estrusione nella nuova direzione indicata (segno negativo perchè dentro il pezzo)
|
||||||
|
EgtModifyCurveExtrusion(nCrvId, vtExtrusion)
|
||||||
|
Dim ExtendFactor As Double = New Vector3d(0, 0, 1) * vtExtrusion
|
||||||
|
EgtModifyCurveThickness(nCrvId, -m_dDripDepth / ExtendFactor)
|
||||||
|
If dUe = 1 Then Exit While
|
||||||
|
nCrvId = nNewCurvId
|
||||||
|
' aggiorno i valori del dominio della curva che rimane
|
||||||
|
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||||
|
End While
|
||||||
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
|
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
|
||||||
@@ -1283,11 +1401,25 @@ Public Class SideAngleUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Parameter4TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter4TxBx.EgtClosed
|
Private Sub Parameter4TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter4TxBx.EgtClosed
|
||||||
If m_Mode = ModeOpt.DRIP Or m_Mode = ModeOpt.ENGRAVE Then
|
If m_Mode = ModeOpt.DRIP Then
|
||||||
' Recupero il valore
|
' Recupero il valore
|
||||||
StringToLen(Parameter4TxBx.Text, m_dDripShort)
|
StringToLen(Parameter4TxBx.Text, m_dDripShort)
|
||||||
' Creo le geometrie dei gocciolatoi
|
' Creo le geometrie dei gocciolatoi
|
||||||
RefreshSideAngleText()
|
RefreshSideAngleText()
|
||||||
|
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||||
|
' Recupero il valore
|
||||||
|
StringToLen(Parameter4TxBx.Text, m_dEngraveDepth2)
|
||||||
|
' Creo le geometrie dei gocciolatoi
|
||||||
|
RefreshSideAngleText()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Parameter5TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter5TxBx.EgtClosed
|
||||||
|
If m_Mode = ModeOpt.ENGRAVE Then
|
||||||
|
' Recupero il valore
|
||||||
|
StringToDouble(Parameter5TxBx.Text, m_dEngraveAngle)
|
||||||
|
' Creo le geometrie dei gocciolatoi
|
||||||
|
RefreshSideAngleText()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
+158
-11
@@ -1,16 +1,48 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary x:Class="EgtDictionary"
|
||||||
x:Class="EgtDictionary"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:Project="clr-namespace:OmagCUT"
|
||||||
xmlns:Project="clr-namespace:OmagCUT"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
xmlns:EgtPHOTOLib="clr-namespace:EgtPHOTOLib;assembly=EgtPHOTOLib"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
||||||
|
|
||||||
<!--Template che permette di andare a capo-->
|
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
|
||||||
|
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||||
|
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||||
|
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||||
|
|
||||||
|
<EgtPHOTOLib:ProjectSlabVM x:Key="ProjectSlabVM"/>
|
||||||
|
<EgtPHOTOLib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
|
||||||
|
<EgtPHOTOLib:ListPageSlabVM x:Key="ListPageSlabVM"/>
|
||||||
|
<EgtPHOTOLib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
|
||||||
|
<EgtPHOTOLib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
|
||||||
|
<EgtPHOTOLib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
|
||||||
|
|
||||||
|
<!--Colori predefiniti-->
|
||||||
|
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
||||||
|
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
|
||||||
|
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
|
||||||
|
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
|
||||||
|
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
|
||||||
|
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
|
||||||
|
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
|
||||||
|
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
|
||||||
|
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
|
||||||
|
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF095CA8" />
|
||||||
|
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
|
||||||
|
|
||||||
|
<!--Template che permette di andare a capo-->
|
||||||
<DataTemplate x:Key="Button_DataTemplate_Wrap">
|
<DataTemplate x:Key="Button_DataTemplate_Wrap">
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding}"/>
|
<TextBlock TextWrapping="Wrap" Text="{Binding}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<!--ButtonBase-->
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
|
<!-- Button Style -->
|
||||||
|
|
||||||
<Style TargetType="{x:Type Button}">
|
<Style TargetType="{x:Type Button}">
|
||||||
<Setter Property="FocusVisualStyle">
|
<Setter Property="FocusVisualStyle">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
@@ -71,7 +103,44 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<!--Template che permette di andare a capo-->
|
||||||
|
<DataTemplate x:Key="WrapButton_DataTemplate">
|
||||||
|
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Width" Value="30"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Width" Value="80"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="60"/>
|
||||||
|
<Setter Property="Width" Value="60"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||||
|
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Height" Value="45"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="60"/>
|
||||||
|
<Setter Property="Width" Value="60"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="40"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Width" Value="60"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!--Template che permette di andare a capo-->
|
<!--Template che permette di andare a capo-->
|
||||||
<DataTemplate x:Key="CheckBox_DataTemplate_Wrap">
|
<DataTemplate x:Key="CheckBox_DataTemplate_Wrap">
|
||||||
@@ -375,7 +444,59 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Width" Value="30"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Width" Value="70"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
|
<Setter Property="Height" Value="60"/>
|
||||||
|
<Setter Property="Width" Value="60"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
|
<Setter Property="Height" Value="40"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="CompoWindow_WrapToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
|
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||||
|
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
||||||
|
<Setter Property="Height" Value="40"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Padding" Value="5"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="#FFB8C3CD"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="OpacityMask" Value="#33FF0000"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Background" Value="#FFF4F4F4"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
|
||||||
|
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!--TreeViewBase-->
|
<!--TreeViewBase-->
|
||||||
<!--Style e colori della freccia di espansione, necessari per modificare il ContainerItemStyle perchè contiene riferimenti ad essi-->
|
<!--Style e colori della freccia di espansione, necessari per modificare il ContainerItemStyle perchè contiene riferimenti ad essi-->
|
||||||
@@ -431,6 +552,32 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
|
<!-- EgtCustomWindow -->
|
||||||
|
|
||||||
|
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||||
|
<Setter Property="TitleBarHeight" Value="32"/>
|
||||||
|
<Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
|
<!-- EgtFloatingPanel -->
|
||||||
|
|
||||||
|
<Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||||
|
<Setter Property="IsToolBar" Value="False"/>
|
||||||
|
<Setter Property="TitleBarOrientation" Value="Vertical"/>
|
||||||
|
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
+130
-104
@@ -7,120 +7,146 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||||
|
|
||||||
<!-- Definizione della FrameCutPage -->
|
<!-- Definizione della FrameCutPage -->
|
||||||
<Grid Name="FrameCutPageGrid" >
|
<Grid Name="FrameCutPageGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="12*"/>
|
<ColumnDefinition Width="12*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="8*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- Definizione della Grid superiore -->
|
|
||||||
<Grid Grid.Column="1" Grid.Row="0" >
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="4*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
|
||||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
|
||||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
<ToggleButton Name="MachiningBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
|
||||||
<Image Source="{DynamicResource FrameMachiningImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Grid Name="LeftGrid" Grid.Row="1">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="7*"/>
|
<RowDefinition Height="8*"/>
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
<Grid Grid.Row="1">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="0.6*"/>
|
|
||||||
<RowDefinition Height="0.8*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.8*"/>
|
|
||||||
<RowDefinition Height="2.5*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<ComboBox Name="AlongAxCmBx" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
<!-- Definizione della Grid superiore -->
|
||||||
Width="200" MaxDropDownHeight="300">
|
<Grid Grid.Column="1" Grid.Row="0" >
|
||||||
<ComboBox.ItemTemplate>
|
<Grid.ColumnDefinitions>
|
||||||
<DataTemplate>
|
<ColumnDefinition Width="1*"/>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</DataTemplate>
|
<ColumnDefinition Width="1*"/>
|
||||||
</ComboBox.ItemTemplate>
|
<ColumnDefinition Width="1*"/>
|
||||||
</ComboBox>
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Button Name="SelSectionBtn"
|
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
</Button>
|
||||||
|
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
|
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="CompoBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
|
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="SelSectionBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Grid>
|
|
||||||
<Button Name="SelGuideBtn"
|
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
<UniformGrid Name="ArcGrid" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
|
||||||
<TextBlock Name="ArcRadTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="ArcRadTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
|
||||||
<TextBlock Name="ArcAngTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="ArcAngTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
|
||||||
</UniformGrid>
|
|
||||||
</Grid>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
<TextBlock Name="OffsZTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
<ToggleButton Name="MachiningBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource FrameMachiningImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Name="LeftGrid" Grid.Row="1">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="7*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.6*"/>
|
||||||
|
<RowDefinition Height="0.8*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.8*"/>
|
||||||
|
<RowDefinition Height="0.8*"/>
|
||||||
|
<RowDefinition Height="1.7*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ComboBox Name="AlongAxCmBx" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||||
|
Width="200" MaxDropDownHeight="300">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||||
|
<!--<Button Name="SelSectionBtn"
|
||||||
|
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>-->
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Button Name="SelGuideBtn" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
<UniformGrid Name="ArcGrid" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||||
|
<TextBlock Name="ArcRadTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="ArcRadTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
<TextBlock Name="ArcAngTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="ArcAngTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Grid>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
<TextBlock Name="OffsZTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OffsZTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
<EgtWPFLib:EgtTextBox Name="OffsZTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="OffsXyTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
<TextBlock Name="OffsXyTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OffsXyTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
<EgtWPFLib:EgtTextBox Name="OffsXyTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="OffsYyTxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
<TextBlock Name="OffsYyTxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" Width="50"
|
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" Width="50"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
<TextBlock Name="OffsXInteryTxBl" Grid.Row="5" Grid.ColumnSpan="2"
|
||||||
<Button Name="MirrorPartBtn"
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
<EgtWPFLib:EgtTextBox Name="OffsXInteryTxBx" Grid.Column="2" Grid.Row="5" Width="50"
|
||||||
<Button Name="RemovePartBtn"
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
<!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3"
|
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||||
|
<Button Name="MirrorPartBtn"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
|
<Image Source="{DynamicResource SpecchiaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="RemovePartBtn"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
|
<Image Source="{DynamicResource Rimuovi_eliminaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
<!--<UniformGrid Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="2" >
|
||||||
|
<Button Name="CompoBtn"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
|
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</UniformGrid>-->
|
||||||
|
|
||||||
|
<!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
|
||||||
<ComboBox Name="SawRoughingCmBx" Grid.Row="5" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="SawRoughingCmBx" Grid.Row="5" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||||
@@ -178,10 +204,10 @@
|
|||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>-->
|
</ComboBox>-->
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ Public Class FrameCutPageUC
|
|||||||
OffsXyTxBx.Text = LenToString(dOffsXY, 3)
|
OffsXyTxBx.Text = LenToString(dOffsXY, 3)
|
||||||
Dim dOffsYY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSYY, 5, m_MainWindow.GetIniFile())
|
Dim dOffsYY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSYY, 5, m_MainWindow.GetIniFile())
|
||||||
OffsYyTxBx.Text = LenToString(dOffsYY, 3)
|
OffsYyTxBx.Text = LenToString(dOffsYY, 3)
|
||||||
|
Dim dOffsXInterY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSXINTERY, 5, m_MainWindow.GetIniFile())
|
||||||
|
OffsXInteryTxBx.Text = LenToString(dOffsXInterY, 3)
|
||||||
|
|
||||||
' Imposto i messaggi letti dal file dei messaggi
|
' Imposto i messaggi letti dal file dei messaggi
|
||||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 1)) 'Lungo X
|
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 1)) 'Lungo X
|
||||||
@@ -65,11 +67,12 @@ Public Class FrameCutPageUC
|
|||||||
SelGuideBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 16) 'Guida
|
SelGuideBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 16) 'Guida
|
||||||
ArcRadTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 17) 'Rad
|
ArcRadTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 17) 'Rad
|
||||||
ArcAngTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 18) 'Ang
|
ArcAngTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 18) 'Ang
|
||||||
MirrorPartBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice
|
MirrorPartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice
|
||||||
RemovePartBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice
|
RemovePartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice
|
||||||
OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra
|
OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra
|
||||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
||||||
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
|
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
|
||||||
|
OffsXInteryTxBl.Text = EgtMsg(90645) 'Interasse
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FrameCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub FrameCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
@@ -81,6 +84,12 @@ Public Class FrameCutPageUC
|
|||||||
m_ProjectMgr.CSVBtn.Visibility = Windows.Visibility.Hidden
|
m_ProjectMgr.CSVBtn.Visibility = Windows.Visibility.Hidden
|
||||||
m_ProjectMgr.VeinMatchingBtn.Visibility = Windows.Visibility.Hidden
|
m_ProjectMgr.VeinMatchingBtn.Visibility = Windows.Visibility.Hidden
|
||||||
m_ProjectMgr.RegisterBtn.Visibility = Windows.Visibility.Hidden
|
m_ProjectMgr.RegisterBtn.Visibility = Windows.Visibility.Hidden
|
||||||
|
' Visualizzo il bottone per l'importazione dei compo frame
|
||||||
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.COMPOFRAME) AndAlso GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile()) > 0 Then
|
||||||
|
CompoBtn.Visibility = Visibility.Visible
|
||||||
|
Else
|
||||||
|
CompoBtn.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
' Recupero dimensioni e kerf del grezzo
|
' Recupero dimensioni e kerf del grezzo
|
||||||
m_nRawId = EgtGetFirstRawPart()
|
m_nRawId = EgtGetFirstRawPart()
|
||||||
GetRawBox(m_RawBox)
|
GetRawBox(m_RawBox)
|
||||||
@@ -271,7 +280,7 @@ Public Class FrameCutPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed
|
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed, OffsXInteryTxBx.EgtClosed
|
||||||
' Forzo aggiornamento grezzo nella pagina di Nesting
|
' Forzo aggiornamento grezzo nella pagina di Nesting
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
||||||
' Parcheggio pezzi presenti nel grezzo
|
' Parcheggio pezzi presenti nel grezzo
|
||||||
@@ -296,9 +305,13 @@ Public Class FrameCutPageUC
|
|||||||
WritePrivateProfileString(S_FRAME, K_OFFSXY, DoubleToString(dOffsXy, 3), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_FRAME, K_OFFSXY, DoubleToString(dOffsXy, 3), m_MainWindow.GetIniFile())
|
||||||
End If
|
End If
|
||||||
Dim dOffsYy As Double = 0
|
Dim dOffsYy As Double = 0
|
||||||
If StringToLen(OffsYyTxBx.Text, dOffsYY) Then
|
If StringToLen(OffsYyTxBx.Text, dOffsYy) Then
|
||||||
WritePrivateProfileString(S_FRAME, K_OFFSYY, DoubleToString(dOffsYy, 3), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_FRAME, K_OFFSYY, DoubleToString(dOffsYy, 3), m_MainWindow.GetIniFile())
|
||||||
End If
|
End If
|
||||||
|
Dim dOffsXIntery As Double = 0
|
||||||
|
If StringToLen(OffsXInteryTxBx.Text, dOffsXIntery) Then
|
||||||
|
WritePrivateProfileString(S_FRAME, K_OFFSXINTERY, DoubleToString(dOffsXIntery, 3), m_MainWindow.GetIniFile())
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MirrorPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles MirrorPartBtn.Click
|
Private Sub MirrorPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles MirrorPartBtn.Click
|
||||||
@@ -436,6 +449,16 @@ Public Class FrameCutPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CompoBtn_Click(sender As Object, e As RoutedEventArgs) Handles CompoBtn.Click
|
||||||
|
m_MainWindow.TestOff()
|
||||||
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
||||||
|
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Function CreateFrame(nPartId As Integer) As Boolean
|
Friend Function CreateFrame(nPartId As Integer) As Boolean
|
||||||
If Not MyCreateFrame( nPartId) Then
|
If Not MyCreateFrame( nPartId) Then
|
||||||
EgtErase( nPartId)
|
EgtErase( nPartId)
|
||||||
@@ -936,12 +959,18 @@ Public Class FrameCutPageUC
|
|||||||
' Determino distanza da spessore lama
|
' Determino distanza da spessore lama
|
||||||
Dim dMinDist As Double = 0
|
Dim dMinDist As Double = 0
|
||||||
Dim dSawThick As Double = 0
|
Dim dSawThick As Double = 0
|
||||||
|
Dim dOffsXIntery As Double = 0
|
||||||
|
StringToLen(OffsXInteryTxBx.Text, dOffsXIntery)
|
||||||
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
|
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dSawThick) Then
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dSawThick) Then
|
||||||
dMinDist = dSawThick + 5 * EPS_SMALL
|
If dOffsXIntery <= dSawThick Then
|
||||||
|
dMinDist = dSawThick + 5 * EPS_SMALL
|
||||||
|
Else
|
||||||
|
dMinDist = dOffsXIntery + 5 * EPS_SMALL
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Not found current saw for frames mindist")
|
EgtOutLog("Not found current saw for frames mindist")
|
||||||
dMinDist = 0
|
dMinDist = dOffsXIntery
|
||||||
End If
|
End If
|
||||||
' Inserisco il pezzo nel grezzo
|
' Inserisco il pezzo nel grezzo
|
||||||
Dim ptIns As Point3d
|
Dim ptIns As Point3d
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<Window x:Class="LicenseWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
|
Title="OpenFile" Height="500.6" Width="426.6" WindowStyle="None"
|
||||||
|
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||||
|
Background="Transparent">
|
||||||
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1.5*"/>
|
||||||
|
<RowDefinition Height="5.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Center">
|
||||||
|
<TextBlock Name="IconTxBl" Foreground="White" FontSize="32"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||||
|
<TextBlock Name="LicenseTxBl"
|
||||||
|
Foreground="White" FontSize="20"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
|
TextWrapping="Wrap"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Center">
|
||||||
|
<ScrollViewer Name="MyScrollViewer" VerticalScrollBarVisibility="Auto">
|
||||||
|
<TextBlock Name="LicenseMsgTxBl" MaxWidth="340"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Foreground="{DynamicResource Omag_White}" FontSize="20" VerticalAlignment="Center"
|
||||||
|
TextWrapping="Wrap"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
</StackPanel>
|
||||||
|
<Grid Grid.Column="1" Grid.Row="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
Public Class LicenseWindow
|
||||||
|
|
||||||
|
Private m_sMessage As String = String.Empty
|
||||||
|
Private m_sTitle As String = String.Empty
|
||||||
|
|
||||||
|
Public Sub New(Owner As Window, sMsg As String, sTitle As String)
|
||||||
|
Me.Owner = Owner
|
||||||
|
m_sMessage = sMsg
|
||||||
|
m_sTitle = sTitle
|
||||||
|
|
||||||
|
' La chiamata è richiesta dalla finestra di progettazione.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub Init() Handles Me.Initialized
|
||||||
|
IconTxBl.Text = "⚠️"
|
||||||
|
LicenseTxBl.Text = "Warning" & vbCrLf & m_sTitle
|
||||||
|
m_sMessage = m_sMessage.Replace("/n", "£")
|
||||||
|
Dim sItems As String() = m_sMessage.Split("£")
|
||||||
|
For Index As Integer = 0 To sItems.Count - 1
|
||||||
|
If Index = 0 Then
|
||||||
|
m_sMessage = sItems(Index)
|
||||||
|
Else
|
||||||
|
m_sMessage &= vbCrLf & sItems(Index)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
LicenseMsgTxBl.Text = m_sMessage
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub Exit_Click() Handles ExitBtn.Click
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
+250
-176
@@ -20,7 +20,7 @@
|
|||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="2*"/>
|
<RowDefinition Height="2*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
|
||||||
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="1.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
@@ -30,195 +30,246 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--Costruisco le riche per la colonna 3-->
|
<!--Costruisco le riche per la colonna 3-->
|
||||||
<Grid Grid.Column="2" Grid.RowSpan="9">
|
<Grid Grid.Column="2" Grid.RowSpan="9">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<!--GruopBox: taglio lama-->
|
<!--GruopBox: taglio lama-->
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<!--GruopBoxs: Fresatura/>Foratura/WaterJet-->
|
<!--GruopBoxs: Fresatura/>Foratura/WaterJet-->
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<!--GroupBox: vai ad Home-->
|
<!--GroupBox: vai ad Home-->
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.375*"/>
|
<RowDefinition Height="0.375*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
|
||||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
|
||||||
<!--definizione della grigli ainterna-->
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
|
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||||
|
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
||||||
|
<!--definizione della grigli ainterna-->
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="ExtArcMinRadTxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="ExtArcMinRadTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ExtArcMinRadTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="ExtArcMinRadTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="IntArcMaxSideAngTxBl" Grid.Column="0" Grid.Row="3"
|
<TextBlock Name="IntArcMaxSideAngTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="IntArcMaxSideAngTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="IntArcMaxSideAngTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="PreCutExitTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="PreCutExitTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right"/>
|
HorizontalAlignment="Right"/>
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</GroupBox>
|
</Grid>
|
||||||
|
|
||||||
<Grid Grid.Column="2" Grid.Row="4" Grid.RowSpan="8">
|
</GroupBox>
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!--Parametri fori: 4 Parametri-->
|
<Grid Grid.Column="2" Grid.Row="4" Grid.RowSpan="8">
|
||||||
<GroupBox Name="HolesGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3"
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--Parametri fori: 4 Parametri-->
|
||||||
|
<GroupBox Name="HolesGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3"
|
||||||
Style="{DynamicResource OmagCut_GroupBox}">
|
Style="{DynamicResource OmagCut_GroupBox}">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="145*"/>
|
<ColumnDefinition Width="145*"/>
|
||||||
<ColumnDefinition Width="23*"/>
|
<ColumnDefinition Width="23*"/>
|
||||||
<ColumnDefinition Width="169*"/>
|
<ColumnDefinition Width="169*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="HolesOffsetTxBl" Grid.Column="0" Grid.Row="0"
|
<TextBlock Name="HolesOffsetTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="HolesOffsetTxBx" Grid.Column="2" Grid.Row="0" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="HolesOffsetTxBx" Grid.Column="2" Grid.Row="0" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="HolesOverlapTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="HolesOverlapTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="HolesOverlapTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="HolesOverlapTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="HolesToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="HolesToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="HolesToleranceTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="HolesToleranceTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="OneHoleInCornerTxBl" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3"
|
<TextBlock Name="OneHoleInCornerTxBl" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||||
<CheckBox Name="OneHoleInCornerChBx" Grid.Column="2" Grid.Row="3" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="OneHoleInCornerChBx" Grid.Column="2" Grid.Row="3" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<!--Parametri Fresatura: 3 Parametri-->
|
<!--Parametri Fresatura: 3 Parametri-->
|
||||||
<GroupBox Name="MillingsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
<GroupBox Name="MillingsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||||
<Grid Grid.Column="3" Grid.Row="2">
|
<Grid Grid.Column="3" Grid.Row="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="CornerCutsTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
<TextBlock Name="CornerCutsTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="CornerCutsChBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="CornerCutsChBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
<TextBlock Name="InternalCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
<TextBlock Name="InternalCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||||
<CheckBox Name="InternalCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="InternalCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
<TextBlock Name="ShortTxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="ShortTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ShortTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="ShortTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<!--Parametri WaterJet: 1 Parametro (se questo GroupBox attivo allora nascondo Fori/Fresatura)-->
|
<!--Parametri rettifica tagli sottosquadra: 1 Parametro -->
|
||||||
<GroupBox Name="WjsParamGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="1"
|
<GroupBox Name="RectificationWJParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" >
|
||||||
|
<Grid Grid.Column="3" Grid.Row="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="EnableRectificationTxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
|
<CheckBox Name="EnableRectificationChBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
|
<!--<TextBlock Name="OffsetRectificationTxBl" Grid.Row="1" Grid.Column="0"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="OffsetRectificationTxBx" Grid.Row="1" Grid.Column="1" Margin="10,0,10,0"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>-->
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
<!--Parametri WaterJet: 5 Parametro (se questo GroupBox attivo allora nascondo Fori/Fresatura)-->
|
||||||
|
<GroupBox Name="WjsParamGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="4"
|
||||||
Style="{DynamicResource OmagCut_GroupBox}">
|
Style="{DynamicResource OmagCut_GroupBox}">
|
||||||
<Grid Grid.Column="3" Grid.Row="2">
|
<Grid Grid.Column="3" Grid.Row="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="145*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="23*"/>
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition Width="169*"/>
|
||||||
<Grid.RowDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="*"/>
|
<Grid.RowDefinitions>
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="WjIntCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
<TextBlock Name="WjIntCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||||
<CheckBox Name="WjIntCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="WjIntCutsChBx" Grid.Column="2" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</GroupBox>
|
|
||||||
|
|
||||||
</Grid>
|
<TextBlock Name="HolesDiameterWJTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="HolesDiameterWJTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
<!--Parametri Taglio diretto: 1 Parametro-->
|
<TextBlock Name="HolesOffsetWJTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="12" Grid.RowSpan="2">
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||||
<Grid>
|
<EgtWPFLib:EgtTextBox Name="HolesOffsetWJTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
|
||||||
<TextBlock Name="FinalHomeTxBl"
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
|
||||||
<CheckBox Name="FinalHomeChBx" Style="{StaticResource OmagCut_CheckBox_Single}"
|
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</GroupBox>
|
<TextBlock Name="MinRadiusWJTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="MinRadiusWJTxBx" Grid.Column="2" Grid.Row="3" Margin="10,0,10,0"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
|
<TextBlock Name="OneHoleInCornerWJTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
|
||||||
|
<CheckBox Name="OneHoleInCornerWJChBx" Grid.Column="2" Grid.Row="4" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<!--Parametri Taglio diretto: 1 Parametro-->
|
||||||
|
<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="12" Grid.RowSpan="2">
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Name="FinalHomeTxBl"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
|
<CheckBox Name="FinalHomeChBx" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<Grid Grid.RowSpan="3">
|
<Grid Grid.RowSpan="3">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1.75*"/>
|
<RowDefinition Height="1.75*"/>
|
||||||
@@ -292,15 +343,15 @@
|
|||||||
<TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
<TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
Visibility="Hidden"/>
|
Visibility="Hidden"/>
|
||||||
<ComboBox Name="CurrCupWheelCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
<ComboBox Name="CurrCupWheelCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
<TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
Visibility="Hidden"/>
|
Visibility="Hidden"/>
|
||||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||||
@@ -479,9 +530,9 @@
|
|||||||
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
@@ -496,8 +547,18 @@
|
|||||||
|
|
||||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
<Grid Grid.Column="1" Grid.Row="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="5*"/>
|
||||||
|
<ColumnDefinition Width="1.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="0" Margin="10,0,5,0"
|
||||||
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingQualityTxBx" Grid.Column="1" Margin="0,0,10,0"
|
||||||
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
@@ -614,7 +675,7 @@
|
|||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
@@ -623,27 +684,27 @@
|
|||||||
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
<!--Allineato-->
|
<!--Allineato-->
|
||||||
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
<!--Ghigliottina-->
|
<!--Ghigliottina-->
|
||||||
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
<!--Automatico-->
|
<!--Automatico-->
|
||||||
<TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
<TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
@@ -661,9 +722,9 @@
|
|||||||
|
|
||||||
<Grid Grid.ColumnSpan="2">
|
<Grid Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="BackImageBtn" Grid.Column="1"
|
<Button Name="BackImageBtn" Grid.Column="1"
|
||||||
@@ -702,13 +763,13 @@
|
|||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CfrPercTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CfrPercTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<!--Incisioni-->
|
<!--Incisioni-->
|
||||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||||
Grid.Row="3" Grid.RowSpan="3">
|
Grid.Row="3" Grid.RowSpan="3">
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -722,17 +783,17 @@
|
|||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--Utilizza fresa-->
|
<!--Utilizza fresa-->
|
||||||
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="TmEnableChBx" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="TmEnableChBx" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||||
<!--Affondamento-->
|
<!--Affondamento-->
|
||||||
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="TmDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="TmDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<!--Larghezza-->
|
<!--Larghezza-->
|
||||||
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="TmWidthTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="TmWidthTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||||
@@ -774,30 +835,43 @@
|
|||||||
|
|
||||||
<!--Cornici-->
|
<!--Cornici-->
|
||||||
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
|
<TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<UniformGrid Columns="4" Grid.Row="8">
|
<Grid Grid.Column="0" Grid.Row="8">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="4.5*"/>
|
||||||
|
<ColumnDefinition Width="1.8*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="SawProbingBtn"
|
<Button x:Name="SawProbingBtn"
|
||||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||||
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button x:Name="ExecLuaBtn" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource PlayImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
</UniformGrid>
|
<TextBlock Name="UseLaserOriginTxBl" Grid.Column="2"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
|
<CheckBox Name="UseLaserOriginChBx" Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="3"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+236
-26
@@ -29,7 +29,7 @@ Public Class AlarmsPageUC
|
|||||||
|
|
||||||
Private Sub AlarmsPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub AlarmsPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
|
||||||
'Assegno liste a combobox
|
' Assegno liste a combobox
|
||||||
CurrSawCmBx.ItemsSource = m_SawList
|
CurrSawCmBx.ItemsSource = m_SawList
|
||||||
CurrDrillCmBx.ItemsSource = m_DrillList
|
CurrDrillCmBx.ItemsSource = m_DrillList
|
||||||
CurrMillCmBx.ItemsSource = m_MillList
|
CurrMillCmBx.ItemsSource = m_MillList
|
||||||
@@ -37,14 +37,24 @@ Public Class AlarmsPageUC
|
|||||||
CurrWJetCmBx.ItemsSource = m_WaterJetList
|
CurrWJetCmBx.ItemsSource = m_WaterJetList
|
||||||
AuxiliaryToolCmBx.ItemsSource = m_AuxToolTypeList
|
AuxiliaryToolCmBx.ItemsSource = m_AuxToolTypeList
|
||||||
|
|
||||||
|
' Variabile che accorcia il riferimento alla macchina corrente
|
||||||
|
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||||
|
|
||||||
' Assegno lista ad elenco materiali
|
' Assegno lista ad elenco materiali
|
||||||
MaterialsLstBx.ItemsSource = m_MainWindow.m_CurrentMachine.Materials
|
MaterialsLstBx.ItemsSource = m_CurrentMachine.Materials
|
||||||
|
|
||||||
' Se non è impostato il controllo numerico, nascondo il bottone di tastatura lama
|
' Se non è impostato il controllo numerico, nascondo il bottone di tastatura lama
|
||||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||||
SawProbingBtn.Visibility = Windows.Visibility.Hidden
|
SawProbingBtn.Visibility = Windows.Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' Se esiste un file lua valido allora mostro il pulsante per l'esecuzione dello script
|
||||||
|
If Not String.IsNullOrEmpty(GetExecLuaFile()) And
|
||||||
|
ExecLuaBtn.Visibility = Visibility.Visible Then
|
||||||
|
Else
|
||||||
|
ExecLuaBtn.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
|
|
||||||
' Imposto i messaggi letti dal file dei messaggi
|
' Imposto i messaggi letti dal file dei messaggi
|
||||||
CurrSawTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 1)
|
CurrSawTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 1)
|
||||||
AuxiliaryToolTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 2)
|
AuxiliaryToolTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 2)
|
||||||
@@ -81,7 +91,16 @@ Public Class AlarmsPageUC
|
|||||||
TmDepthTxBl.Text = EgtMsg( 91063) ' Profondità
|
TmDepthTxBl.Text = EgtMsg( 91063) ' Profondità
|
||||||
TmWidthTxBl.Text = EgtMsg( 91064) ' Larghezza
|
TmWidthTxBl.Text = EgtMsg( 91064) ' Larghezza
|
||||||
WJsParamGpBx.Header = EgtMsg( 91058) ' Parametri waterjet
|
WJsParamGpBx.Header = EgtMsg( 91058) ' Parametri waterjet
|
||||||
WjIntCutsTxBl.Text = EgtMsg( 90930) ' Sempre sugli interni
|
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||||
|
'-- INIZIO -- nuovi parametri per preforo lavello
|
||||||
|
HolesDiameterWJTxBl.Text = "Diameter"
|
||||||
|
HolesOffsetWJTxBl.Text = "Offset"
|
||||||
|
MinRadiusWJTxBl.Text = "Min Radius"
|
||||||
|
OneHoleInCornerWJTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 26)
|
||||||
|
'-- INIZIO -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||||
|
REctificationWJParamGpBx.Header = "Rectification"
|
||||||
|
EnableRectificationTxBl.Text = "Enable (on subsquare angle)"
|
||||||
|
'-- FINE -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||||
NestingParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 31) ' Nesting
|
NestingParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 31) ' Nesting
|
||||||
AlignTxBl.Text = EgtMsg(90932) ' Allineato
|
AlignTxBl.Text = EgtMsg(90932) ' Allineato
|
||||||
GhigliottinaTxBl.Text = EgtMsg(91066) ' Ghigliottina
|
GhigliottinaTxBl.Text = EgtMsg(91066) ' Ghigliottina
|
||||||
@@ -109,14 +128,21 @@ Public Class AlarmsPageUC
|
|||||||
CurrDripDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 6) ' DripDrilling
|
CurrDripDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 6) ' DripDrilling
|
||||||
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
||||||
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
||||||
|
UseLaserOriginTxBl.Text = EgtMsg(91129) ' Usa laser per origine
|
||||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AlarmsPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub AlarmsPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
|
|
||||||
If m_bFirst Then
|
If m_bFirst Then
|
||||||
' Variabile che accorcia il riferimento alla macchina corrente
|
|
||||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||||
|
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||||
|
SawGpBx.Visibility = Visibility.Hidden
|
||||||
|
TopMillGpBx.Visibility = Visibility.Hidden
|
||||||
|
CurrSawTxBl.Visibility = Visibility.Hidden
|
||||||
|
CurrSawCmBx.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
|
|
||||||
' Verifico la configurazione della macchina per creare i combobox
|
' Verifico la configurazione della macchina per creare i combobox
|
||||||
Select Case m_CurrentMachine.MountedToolConfig
|
Select Case m_CurrentMachine.MountedToolConfig
|
||||||
@@ -132,7 +158,7 @@ Public Class AlarmsPageUC
|
|||||||
' Disattivo il gruppo dei parametri fori
|
' Disattivo il gruppo dei parametri fori
|
||||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||||
'Non faccio alcunchè
|
'Non faccio alcunchè
|
||||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||||
'Da implementare
|
'Da implementare
|
||||||
End Select
|
End Select
|
||||||
@@ -151,7 +177,8 @@ Public Class AlarmsPageUC
|
|||||||
|
|
||||||
' Se non previsti tagli waterjet, disabilito relativo box
|
' Se non previsti tagli waterjet, disabilito relativo box
|
||||||
If Not m_CurrentMachine.bWaterJetting Then
|
If Not m_CurrentMachine.bWaterJetting Then
|
||||||
WJsParamGpBx.Visibility = Visibility.Hidden
|
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||||
|
RectificationWJParamGpBx.Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Abilitazione box per contorni grezzo da foto
|
' Abilitazione box per contorni grezzo da foto
|
||||||
@@ -164,7 +191,7 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' Abilitazione Feed ridotta su inizio/fine tagli
|
' Abilitazione Feed ridotta su inizio/fine tagli
|
||||||
If m_CurrentMachine.bFsevEnable Then
|
If m_CurrentMachine.bFsevEnable And EgtGetHeadId("H1") <> GDB_ID.NULL Then
|
||||||
CutFredGpBx.Visibility = Windows.Visibility.Visible
|
CutFredGpBx.Visibility = Windows.Visibility.Visible
|
||||||
Else
|
Else
|
||||||
CutFredGpBx.Visibility = Windows.Visibility.Hidden
|
CutFredGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -184,6 +211,11 @@ Public Class AlarmsPageUC
|
|||||||
' Seleziono lama corrente
|
' Seleziono lama corrente
|
||||||
CurrSawCmBx.SelectedItem = m_CurrentMachine.sCurrSaw
|
CurrSawCmBx.SelectedItem = m_CurrentMachine.sCurrSaw
|
||||||
|
|
||||||
|
' nascondo la lista dei materiali solo se macchina WaterJet
|
||||||
|
If m_CurrentMachine.bWaterJet Then
|
||||||
|
MaterialsGpBx.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
|
|
||||||
' Verifico la configurazione della macchina per creare i combobox
|
' Verifico la configurazione della macchina per creare i combobox
|
||||||
Select Case m_CurrentMachine.MountedToolConfig
|
Select Case m_CurrentMachine.MountedToolConfig
|
||||||
Case CurrentMachine.MountedToolConfigs.SAW
|
Case CurrentMachine.MountedToolConfigs.SAW
|
||||||
@@ -311,12 +343,24 @@ Public Class AlarmsPageUC
|
|||||||
EgtMdbSave()
|
EgtMdbSave()
|
||||||
' Leggo lavorazione angoli con fresa
|
' Leggo lavorazione angoli con fresa
|
||||||
CornerCutsChBx.IsChecked =
|
CornerCutsChBx.IsChecked =
|
||||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
' Leggo lavorazione interni con fresa
|
' Leggo lavorazione interni con fresa
|
||||||
InternalCutsChBx.IsChecked =
|
InternalCutsChBx.IsChecked =
|
||||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
WjIntCutsChBx.IsChecked =
|
WjIntCutsChBx.IsChecked =
|
||||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
|
' Lavorazione preforo lavello con WaterJet
|
||||||
|
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_DIAMITERWJ, 0, m_MainWindow.GetMachIniFile())
|
||||||
|
HolesDiameterWJTxBx.Text = LenToString(dVal, 2)
|
||||||
|
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_OFFSETWJ, 0, m_MainWindow.GetMachIniFile())
|
||||||
|
HolesOffsetWJTxBx.Text = LenToString(dVal, 2)
|
||||||
|
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MIN_RADIUSWJ, 0, m_MainWindow.GetMachIniFile())
|
||||||
|
MinRadiusWJTxBx.Text = LenToString(dVal, 2)
|
||||||
|
OneHoleInCornerWJChBx.IsChecked =
|
||||||
|
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
|
' leggo se attiva la rettifica degli angoli per WaterJet
|
||||||
|
EnableRectificationChBx.IsChecked =
|
||||||
|
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
' Leggo accorciamento angoli con fresa
|
' Leggo accorciamento angoli con fresa
|
||||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||||
ShortTxBx.Text = LenToString(dVal, 2)
|
ShortTxBx.Text = LenToString(dVal, 2)
|
||||||
@@ -329,7 +373,7 @@ Public Class AlarmsPageUC
|
|||||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_ENGRAVING_WIDTH, 0, m_MainWindow.GetMachIniFile())
|
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_ENGRAVING_WIDTH, 0, m_MainWindow.GetMachIniFile())
|
||||||
TmWidthTxBx.Text = LenToString(dVal, 2)
|
TmWidthTxBx.Text = LenToString(dVal, 2)
|
||||||
' Flag per movimento in home alla fine dei tagli diretti
|
' Flag per movimento in home alla fine dei tagli diretti
|
||||||
FinalHomeChBx.IsChecked = m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome
|
FinalHomeChBx.IsChecked = m_CurrentMachine.bDirectCutsFinalHome
|
||||||
' Leggo tagli ridotti per interferenza in nesting
|
' Leggo tagli ridotti per interferenza in nesting
|
||||||
CompleteCutsChBx.IsChecked =
|
CompleteCutsChBx.IsChecked =
|
||||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) = 0)
|
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) = 0)
|
||||||
@@ -351,7 +395,7 @@ Public Class AlarmsPageUC
|
|||||||
AdditionalTableTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 36) & " " & GetCurrentTable().ToString()
|
AdditionalTableTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 36) & " " & GetCurrentTable().ToString()
|
||||||
End If
|
End If
|
||||||
' Leggo altezza sovratavola
|
' Leggo altezza sovratavola
|
||||||
dVal = m_MainWindow.m_CurrentMachine.dAdditionalTable
|
dVal = m_CurrentMachine.dAdditionalTable
|
||||||
AdditionalTableTxBx.Text = LenToString(dVal, 2)
|
AdditionalTableTxBx.Text = LenToString(dVal, 2)
|
||||||
' Leggo soglia e tolleranza per contorno grezzo da foto
|
' Leggo soglia e tolleranza per contorno grezzo da foto
|
||||||
ThresholdTxBx.Text = m_MainWindow.m_Camera.Threshold.ToString()
|
ThresholdTxBx.Text = m_MainWindow.m_Camera.Threshold.ToString()
|
||||||
@@ -369,11 +413,22 @@ Public Class AlarmsPageUC
|
|||||||
If nWashing = -1 Then
|
If nWashing = -1 Then
|
||||||
WashingGpBx.Visibility = Visibility.Hidden
|
WashingGpBx.Visibility = Visibility.Hidden
|
||||||
Else
|
Else
|
||||||
WashingChBx.IsChecked = ( nWashing <> 0)
|
WashingChBx.IsChecked = (nWashing <> 0)
|
||||||
End If
|
End If
|
||||||
' Leggo parametri per variazione feed in tagli
|
' Leggo parametri per variazione feed in tagli
|
||||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||||
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||||
|
|
||||||
|
' leggo flag per tavola definita da laser
|
||||||
|
Dim nUseLaserOrigin As Integer = GetPrivateProfileInt(S_TABLE, K_USELASERORIGIN, -1, m_MainWindow.GetMachIniFile())
|
||||||
|
If nUseLaserOrigin = -1 Then
|
||||||
|
UseLaserOriginTxBl.Visibility = Visibility.Hidden
|
||||||
|
UseLaserOriginChBx.Visibility = Visibility.Hidden
|
||||||
|
Else
|
||||||
|
UseLaserOriginTxBl.Visibility = Visibility.Visible
|
||||||
|
UseLaserOriginChBx.IsChecked = (nUseLaserOrigin <> 0)
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||||
@@ -414,9 +469,26 @@ Public Class AlarmsPageUC
|
|||||||
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrWaterJetting
|
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrWaterJetting
|
||||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
||||||
|
If m_CurrentMachine.bFromDBWaterJet Then
|
||||||
|
CurrWaterJettingTxBx.SetValue(Grid.ColumnSpanProperty, 1)
|
||||||
|
CurrWaterJettingTxBx.SetValue(MarginProperty, New Thickness(CurrWaterJettingTxBx.Margin.Left,
|
||||||
|
CurrWaterJettingTxBx.Margin.Top,
|
||||||
|
5,
|
||||||
|
CurrWaterJettingTxBx.Margin.Bottom))
|
||||||
|
CurrWaterJettingQualityTxBx.Text = m_CurrentMachine.sCurrWaterJettingQuality
|
||||||
|
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Visible
|
||||||
|
Else
|
||||||
|
CurrWaterJettingTxBx.SetValue(Grid.ColumnSpanProperty, 2)
|
||||||
|
CurrWaterJettingTxBx.SetValue(MarginProperty, New Thickness(CurrWaterJettingTxBx.Margin.Left,
|
||||||
|
CurrWaterJettingTxBx.Margin.Top,
|
||||||
|
10,
|
||||||
|
CurrWaterJettingTxBx.Margin.Bottom))
|
||||||
|
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Collapsed
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Hidden
|
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Hidden
|
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
|
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
If m_CurrentMachine.sCurrDripSawing <> String.Empty Then
|
If m_CurrentMachine.sCurrDripSawing <> String.Empty Then
|
||||||
CurrDripSawingTxBx.Text = m_CurrentMachine.sCurrDripSawing
|
CurrDripSawingTxBx.Text = m_CurrentMachine.sCurrDripSawing
|
||||||
@@ -536,6 +608,33 @@ Public Class AlarmsPageUC
|
|||||||
String.Compare(sMchTool, m_CurrentMachine.sCurrSaw, True) <> 0 Then
|
String.Compare(sMchTool, m_CurrentMachine.sCurrSaw, True) <> 0 Then
|
||||||
m_CurrentMachine.sCurrSawing = String.Empty
|
m_CurrentMachine.sCurrSawing = String.Empty
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Dim sVal As String = String.Empty
|
||||||
|
'Dim dVal As Double = 0
|
||||||
|
'If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSawing, false) Then
|
||||||
|
' StringToDouble(sVal, dVal)
|
||||||
|
' m_CurrentMachine.SetFsevLength(dVal)
|
||||||
|
'End If
|
||||||
|
'If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSawing, false) Then
|
||||||
|
' StringToDouble(sVal, dVal)
|
||||||
|
' m_CurrentMachine.SetFsevPerc(dVal)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Dim sVal As String = String.Empty
|
||||||
|
Dim dVal As Double = 0
|
||||||
|
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||||
|
StringToDouble(sVal, dVal)
|
||||||
|
m_CurrentMachine.SetFsevLength(dVal)
|
||||||
|
End If
|
||||||
|
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||||
|
StringToDouble(sVal, dVal)
|
||||||
|
m_CurrentMachine.SetFsevPerc(dVal)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Leggo parametri per variazione feed in tagli aggiornati in funzione della lama
|
||||||
|
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||||
|
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||||
|
|
||||||
' Aggiorno utensili per lavoro in corso
|
' Aggiorno utensili per lavoro in corso
|
||||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||||
' aggiorno la lista delle lavorazioni
|
' aggiorno la lista delle lavorazioni
|
||||||
@@ -549,7 +648,7 @@ Public Class AlarmsPageUC
|
|||||||
If CurrDrillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
If CurrDrillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||||
m_CurrentMachine.sCurrDrill = String.Empty
|
m_CurrentMachine.sCurrDrill = String.Empty
|
||||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||||
' Assegno foretto
|
' Assegno foretto
|
||||||
Else
|
Else
|
||||||
m_CurrentMachine.sCurrDrill = CurrDrillCmBx.SelectedItem.ToString()
|
m_CurrentMachine.sCurrDrill = CurrDrillCmBx.SelectedItem.ToString()
|
||||||
' Reset fresa, waterjet e relative lavorazioni
|
' Reset fresa, waterjet e relative lavorazioni
|
||||||
@@ -584,7 +683,7 @@ Public Class AlarmsPageUC
|
|||||||
If CurrMillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
If CurrMillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||||
m_CurrentMachine.sCurrMill = String.Empty
|
m_CurrentMachine.sCurrMill = String.Empty
|
||||||
m_CurrentMachine.sCurrMilling = String.Empty
|
m_CurrentMachine.sCurrMilling = String.Empty
|
||||||
' Assegno fresa
|
' Assegno fresa
|
||||||
Else
|
Else
|
||||||
m_CurrentMachine.sCurrMill = CurrMillCmBx.SelectedItem.ToString()
|
m_CurrentMachine.sCurrMill = CurrMillCmBx.SelectedItem.ToString()
|
||||||
' Reset foretto, waterjet e relative lavorazioni
|
' Reset foretto, waterjet e relative lavorazioni
|
||||||
@@ -654,7 +753,7 @@ Public Class AlarmsPageUC
|
|||||||
If CurrWJetCmBx.SelectedItem.ToString() = NO_TOOL Then
|
If CurrWJetCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||||
' Assegno Waterjet
|
' Assegno Waterjet
|
||||||
Else
|
Else
|
||||||
m_CurrentMachine.sCurrWaterJet = CurrWJetCmBx.SelectedItem.ToString()
|
m_CurrentMachine.sCurrWaterJet = CurrWJetCmBx.SelectedItem.ToString()
|
||||||
' Reset foretto, fresa e relative lavorazioni
|
' Reset foretto, fresa e relative lavorazioni
|
||||||
@@ -851,13 +950,51 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' -- INIZIO -- nuovi parametri per prefori WaterJet
|
||||||
|
Private Sub HolesDiameterWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesDiameterWJTxBx.EgtClosed
|
||||||
|
Dim dVal As Double = 0
|
||||||
|
StringToLen(HolesDiameterWJTxBx.Text, dVal)
|
||||||
|
WritePrivateProfileString(S_MACH_NEST, K_HOLES_DIAMITERWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub HolesOffsetWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesOffsetWJTxBx.EgtClosed
|
||||||
|
Dim dVal As Double = 0
|
||||||
|
StringToLen(HolesOffsetWJTxBx.Text, dVal)
|
||||||
|
WritePrivateProfileString(S_MACH_NEST, K_HOLES_OFFSETWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MinRadiusWJTxBx_Click(sender As Object, e As EventArgs) Handles MinRadiusWJTxBx.EgtClosed
|
||||||
|
Dim dVal As Double = 0
|
||||||
|
StringToLen(MinRadiusWJTxBx.Text, dVal)
|
||||||
|
WritePrivateProfileString(S_MACH_NEST, K_MIN_RADIUSWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OneHoleInCornerWJChBx_Click(sender As Object, e As EventArgs) Handles OneHoleInCornerWJChBx.Click
|
||||||
|
If OneHoleInCornerWJChBx.IsChecked() Then
|
||||||
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||||
|
Else
|
||||||
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
' -- FINE -- nuovi parametri per prefori WaterJet
|
||||||
|
|
||||||
|
' -- INIZIO -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||||
|
Private Sub EnableRectificationChBx_Click(sender As Object, e As EventArgs) Handles EnableRectificationChBx.Click
|
||||||
|
If EnableRectificationChBx.IsChecked() Then
|
||||||
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "1", m_MainWindow.GetMachIniFile)
|
||||||
|
Else
|
||||||
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "0", m_MainWindow.GetMachIniFile)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
' -- FINE -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||||
|
|
||||||
Private Sub TmEnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles TmEnableChBx.Click
|
Private Sub TmEnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles TmEnableChBx.Click
|
||||||
If TmEnableChBx.IsChecked() Then
|
If TmEnableChBx.IsChecked() Then
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "1", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "1", m_MainWindow.GetMachIniFile())
|
||||||
Else
|
Else
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "0", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "0", m_MainWindow.GetMachIniFile())
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub TmDepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles TmDepthTxBx.EgtClosed
|
Private Sub TmDepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles TmDepthTxBx.EgtClosed
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
@@ -873,9 +1010,9 @@ Public Class AlarmsPageUC
|
|||||||
|
|
||||||
Private Sub FinalHomeChBx_Click(sender As Object, e As RoutedEventArgs) Handles FinalHomeChBx.Click
|
Private Sub FinalHomeChBx_Click(sender As Object, e As RoutedEventArgs) Handles FinalHomeChBx.Click
|
||||||
If FinalHomeChBx.IsChecked() Then
|
If FinalHomeChBx.IsChecked() Then
|
||||||
m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome = True
|
m_CurrentMachine.bDirectCutsFinalHome = True
|
||||||
Else
|
Else
|
||||||
m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome = False
|
m_CurrentMachine.bDirectCutsFinalHome = False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -917,7 +1054,7 @@ Public Class AlarmsPageUC
|
|||||||
Private Sub AdditionalTableTxBx_EgtClosed(sender As Object, e As EventArgs) Handles AdditionalTableTxBx.EgtClosed
|
Private Sub AdditionalTableTxBx_EgtClosed(sender As Object, e As EventArgs) Handles AdditionalTableTxBx.EgtClosed
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
StringToLen(AdditionalTableTxBx.Text, dVal)
|
StringToLen(AdditionalTableTxBx.Text, dVal)
|
||||||
m_MainWindow.m_CurrentMachine.dAdditionalTable = dVal
|
m_CurrentMachine.dAdditionalTable = dVal
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub NewMatBtn_Click(sender As Object, e As RoutedEventArgs) Handles NewMatBtn.Click
|
Private Sub NewMatBtn_Click(sender As Object, e As RoutedEventArgs) Handles NewMatBtn.Click
|
||||||
@@ -993,6 +1130,14 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UseLaserOriginChBx_Click() Handles UseLaserOriginChBx.Click
|
||||||
|
If UseLaserOriginChBx.IsChecked() Then
|
||||||
|
WritePrivateProfileString(S_TABLE, K_USELASERORIGIN, "1", m_MainWindow.GetMachIniFile())
|
||||||
|
Else
|
||||||
|
WritePrivateProfileString(S_TABLE, K_USELASERORIGIN, "0", m_MainWindow.GetMachIniFile())
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub WashingChBx_Click(sender As Object, e As RoutedEventArgs) Handles WashingChBx.Click
|
Private Sub WashingChBx_Click(sender As Object, e As RoutedEventArgs) Handles WashingChBx.Click
|
||||||
If WashingChBx.IsChecked() Then
|
If WashingChBx.IsChecked() Then
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_WASHING, "1", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_WASHING, "1", m_MainWindow.GetMachIniFile())
|
||||||
@@ -1026,8 +1171,20 @@ Public Class AlarmsPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawProbingBtn.Click
|
Private Sub SawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawProbingBtn.Click
|
||||||
|
' imposto modo automatico
|
||||||
|
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||||
|
Case 1, 2
|
||||||
|
' in attesa di verifica
|
||||||
|
Case 3
|
||||||
|
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(0)
|
||||||
|
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
|
||||||
|
Case 4
|
||||||
|
' FANUC - Manual:7, Edit:1
|
||||||
|
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||||
|
EgtOutLog("Impostata modalità manuale: esito " & nResult.ToString)
|
||||||
|
End Select
|
||||||
' Recupero file LUA
|
' Recupero file LUA
|
||||||
EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\SawProbing.lua")
|
EgtLuaExecFile(m_CurrentMachine.sMachDir() & "\DirectCmd\SawProbing.lua")
|
||||||
' Recupero utensile da tastare
|
' Recupero utensile da tastare
|
||||||
Dim ToolForProbing As ToolPos = ChooseToolForProbing()
|
Dim ToolForProbing As ToolPos = ChooseToolForProbing()
|
||||||
If IsNothing(ToolForProbing) OrElse String.IsNullOrWhiteSpace(ToolForProbing.m_ToolName) Then Return
|
If IsNothing(ToolForProbing) OrElse String.IsNullOrWhiteSpace(ToolForProbing.m_ToolName) Then Return
|
||||||
@@ -1036,6 +1193,7 @@ Public Class AlarmsPageUC
|
|||||||
Dim dToolDiam As Double = 0
|
Dim dToolDiam As Double = 0
|
||||||
Dim dToolThick As Double = 0
|
Dim dToolThick As Double = 0
|
||||||
Dim dToolLen As Double = 0
|
Dim dToolLen As Double = 0
|
||||||
|
Dim dCore As Double = 0
|
||||||
Dim sToolParam As String = String.Empty
|
Dim sToolParam As String = String.Empty
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sToolParam)
|
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sToolParam)
|
||||||
EgtLuaSetGlobStringVar("CMD.HEAD", sToolParam)
|
EgtLuaSetGlobStringVar("CMD.HEAD", sToolParam)
|
||||||
@@ -1047,6 +1205,14 @@ Public Class AlarmsPageUC
|
|||||||
EgtLuaSetGlobNumVar("CMD.THICK", dToolThick * 1000)
|
EgtLuaSetGlobNumVar("CMD.THICK", dToolThick * 1000)
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, dToolLen)
|
EgtTdbGetCurrToolParam(MCH_TP.LEN, dToolLen)
|
||||||
EgtLuaSetGlobNumVar("CMD.LENGTH", dToolLen * 1000)
|
EgtLuaSetGlobNumVar("CMD.LENGTH", dToolLen * 1000)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore)
|
||||||
|
EgtLuaSetGlobNumVar("CMD.CORE", dCore * 1000)
|
||||||
|
' Nuova varibile per gestione tastatura utensili Frankfurt (Polishing)
|
||||||
|
Dim nType As Integer
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||||
|
If m_CurrentMachine.bPolishingWheel AndAlso nType = MCH_TY.MILL_POLISHING Then
|
||||||
|
EgtLuaSetGlobStringVar("CMD.POLISHING", "1")
|
||||||
|
End If
|
||||||
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
||||||
EgtLuaCallFunction("CMD.CmdString")
|
EgtLuaCallFunction("CMD.CmdString")
|
||||||
' Leggo variabili
|
' Leggo variabili
|
||||||
@@ -1066,7 +1232,7 @@ Public Class AlarmsPageUC
|
|||||||
' Modifico stringa per inserire i newline
|
' Modifico stringa per inserire i newline
|
||||||
CmdString = CmdString.Replace("<br/>", Environment.NewLine)
|
CmdString = CmdString.Replace("<br/>", Environment.NewLine)
|
||||||
' Creo file...
|
' Creo file...
|
||||||
Dim FilePath As String = m_MainWindow.GetCncDir() & "\SawProbing" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
Dim FilePath As String = m_MainWindow.GetCncDir() & "\SawProbing" & m_CurrentMachine.sIsoFileExt
|
||||||
' ...e ci scrivo
|
' ...e ci scrivo
|
||||||
Dim Writer As New IO.StreamWriter(FilePath, False)
|
Dim Writer As New IO.StreamWriter(FilePath, False)
|
||||||
Writer.Write(CmdString)
|
Writer.Write(CmdString)
|
||||||
@@ -1090,6 +1256,11 @@ Public Class AlarmsPageUC
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
|
' Se fanuc passo in modalità AUTO e attivo
|
||||||
|
If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||||
|
Dim nResult As Short = m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_WriteCncMode(0)
|
||||||
|
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
|
||||||
|
End If
|
||||||
' Aspetto e lo avvio
|
' Aspetto e lo avvio
|
||||||
System.Threading.Thread.Sleep(300)
|
System.Threading.Thread.Sleep(300)
|
||||||
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
||||||
@@ -1139,6 +1310,10 @@ Public Class AlarmsPageUC
|
|||||||
Dim bRead As Boolean = False
|
Dim bRead As Boolean = False
|
||||||
Dim SawDiameterNameVar As String = String.Empty
|
Dim SawDiameterNameVar As String = String.Empty
|
||||||
GetPrivateProfileString(S_MACH_PROBING, K_SAWDIAMETER, "", SawDiameterNameVar, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_MACH_PROBING, K_SAWDIAMETER, "", SawDiameterNameVar, m_MainWindow.GetMachIniFile())
|
||||||
|
' Se utensile non lama, allora la variabile in cui leggo il dato potrebbe essere differente
|
||||||
|
If Not ToolForProbing.m_IsSaw Then
|
||||||
|
GetPrivateProfileString(S_MACH_PROBING, K_TOOLLENGTH, SawDiameterNameVar, SawDiameterNameVar, m_MainWindow.GetMachIniFile())
|
||||||
|
End If
|
||||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||||
For I As Integer = 0 To 20
|
For I As Integer = 0 To 20
|
||||||
' Devo rileggere la variabile ad ogni ciclo
|
' Devo rileggere la variabile ad ogni ciclo
|
||||||
@@ -1147,7 +1322,10 @@ Public Class AlarmsPageUC
|
|||||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||||
bRead = True
|
bRead = True
|
||||||
Dim dVal As Double = m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value
|
Dim dVal As Double = m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value
|
||||||
dVal = dVal / 1000
|
' Se fanuc il dato è in mm (NON MICRON)
|
||||||
|
If m_MainWindow.m_CNCommunication.m_nNCType <> 4 Then
|
||||||
|
dVal = dVal / 1000
|
||||||
|
End If
|
||||||
MsgBoxStateInfo.LoadingPrBr_Value = 100
|
MsgBoxStateInfo.LoadingPrBr_Value = 100
|
||||||
' Tastatura conclusa con successo
|
' Tastatura conclusa con successo
|
||||||
Dim sOut As String = EgtMsg(MSG_DIRECTCUTPAGEUC + 43) & " : " & DoubleToString(dVal, 1)
|
Dim sOut As String = EgtMsg(MSG_DIRECTCUTPAGEUC + 43) & " : " & DoubleToString(dVal, 1)
|
||||||
@@ -1194,9 +1372,9 @@ Public Class AlarmsPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ChooseToolForProbing() As ToolPos
|
Private Function ChooseToolForProbing() As ToolPos
|
||||||
Select Case m_MainWindow.m_CurrentMachine.MountedToolConfig
|
Select Case m_CurrentMachine.MountedToolConfig
|
||||||
Case CurrentMachine.MountedToolConfigs.SAW
|
Case CurrentMachine.MountedToolConfigs.SAW
|
||||||
Return New ToolPos(m_MainWindow.m_CurrentMachine.sCurrSaw, "T100", True)
|
Return New ToolPos(m_CurrentMachine.sCurrSaw, "T100", True)
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||||
Dim ChooseTool As New ChooseToolWD(m_MainWindow)
|
Dim ChooseTool As New ChooseToolWD(m_MainWindow)
|
||||||
If ChooseTool.ShowDialog Then
|
If ChooseTool.ShowDialog Then
|
||||||
@@ -1242,4 +1420,36 @@ Public Class AlarmsPageUC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ExecLuaBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExecLuaBtn.Click
|
||||||
|
Dim sExecFile As String = GetExecLuaFile()
|
||||||
|
' Eseguo file LUA e recupero risultato
|
||||||
|
Dim nErr As Integer = 999
|
||||||
|
EgtLuaExecFile(sExecFile)
|
||||||
|
EgtLuaGetGlobIntVar("ELS.ERR", nErr)
|
||||||
|
' Reset lua
|
||||||
|
EgtLuaResetGlobVar("ELS")
|
||||||
|
' Verifico condizioni di errore
|
||||||
|
If nErr Then
|
||||||
|
' Errore...
|
||||||
|
EgtOutLog("Error executing file: " & sExecFile & ", ELS.ERR=" & nErr.ToString)
|
||||||
|
' Error executing script
|
||||||
|
Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(90259), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Recupero il percorso del file lua da eseguire
|
||||||
|
Private Function GetExecLuaFile() As String
|
||||||
|
Dim sFile As String = String.Empty
|
||||||
|
If GetPrivateProfileString(S_EXECLUA, K_FILESCRIPT_LUA, "", sFile, m_MainWindow.GetMachIniFile()) <> 0 Then
|
||||||
|
' Sistemo nome file
|
||||||
|
sFile = sFile.Trim()
|
||||||
|
If Not sFile.EndsWith(".lua") Then sFile = sFile & ".lua"
|
||||||
|
' Creo path
|
||||||
|
Dim sPath As String = m_CurrentMachine.sMachDir() & "\Scripts\" & sFile
|
||||||
|
If File.Exists(sPath) Then Return sPath
|
||||||
|
End If
|
||||||
|
Return String.Empty
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent">
|
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None"
|
||||||
|
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||||
|
Background="Transparent">
|
||||||
|
|
||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
|||||||
+447
-12
@@ -1,5 +1,7 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports EgtWPFLib5
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class CurrentMachine
|
Public Class CurrentMachine
|
||||||
|
|
||||||
@@ -28,6 +30,9 @@ Public Class CurrentMachine
|
|||||||
Private m_nThreadSleep As Integer = 150
|
Private m_nThreadSleep As Integer = 150
|
||||||
|
|
||||||
' Dati su linea di produzione
|
' Dati su linea di produzione
|
||||||
|
Private m_bDemo As Boolean = False
|
||||||
|
Public nLastProjSentToViewDEMO As Integer = 0
|
||||||
|
|
||||||
Private m_bProdLine As Boolean = False
|
Private m_bProdLine As Boolean = False
|
||||||
Private m_sVarProg1 As String = "E80021"
|
Private m_sVarProg1 As String = "E80021"
|
||||||
Private m_nProg1 As Integer = 901
|
Private m_nProg1 As Integer = 901
|
||||||
@@ -47,6 +52,10 @@ Public Class CurrentMachine
|
|||||||
Private m_sProdLiProbingState2Var As String = ""
|
Private m_sProdLiProbingState2Var As String = ""
|
||||||
Private m_sProdLiProbingTcPos2Var As String = ""
|
Private m_sProdLiProbingTcPos2Var As String = ""
|
||||||
Private m_sProdLiSawDiameter2Var As String = ""
|
Private m_sProdLiSawDiameter2Var As String = ""
|
||||||
|
Private m_sClickState As String = "E80028"
|
||||||
|
Private m_sClickDir As String = ""
|
||||||
|
' Gestione speciale per canali CN
|
||||||
|
Private m_sExtFileCN As String = ".0"
|
||||||
|
|
||||||
' Numero e tipo di utensili correntemente disponibili sulla macchina
|
' Numero e tipo di utensili correntemente disponibili sulla macchina
|
||||||
Private m_MountedToolConfig As MountedToolConfigs = MountedToolConfigs.SAW
|
Private m_MountedToolConfig As MountedToolConfigs = MountedToolConfigs.SAW
|
||||||
@@ -73,6 +82,12 @@ Public Class CurrentMachine
|
|||||||
Private m_bPolishingWheel As Boolean = False
|
Private m_bPolishingWheel As Boolean = False
|
||||||
Private m_bWaterJet As Boolean = False
|
Private m_bWaterJet As Boolean = False
|
||||||
|
|
||||||
|
' Flag che indica se gesire l'inversione del taglio nei tagli singoli
|
||||||
|
Private m_bEnableInvetrt As Boolean = True
|
||||||
|
|
||||||
|
' Abilitazione DB WaterJet
|
||||||
|
Private m_bFromDBWaterJet As Boolean = False
|
||||||
|
|
||||||
' Flag per visualizzazione TcPos, Testa/uscita e Note utente
|
' Flag per visualizzazione TcPos, Testa/uscita e Note utente
|
||||||
Private m_nShowToolChanger As Integer = 0 ' 0=no, 1=tutti utensili, 2=solo lame
|
Private m_nShowToolChanger As Integer = 0 ' 0=no, 1=tutti utensili, 2=solo lame
|
||||||
Private m_bShowHeadExit As Boolean = False
|
Private m_bShowHeadExit As Boolean = False
|
||||||
@@ -111,6 +126,7 @@ Public Class CurrentMachine
|
|||||||
Private m_sCurrDripSawing As String = String.Empty
|
Private m_sCurrDripSawing As String = String.Empty
|
||||||
Private m_sCurrDripDrilling As String = String.Empty
|
Private m_sCurrDripDrilling As String = String.Empty
|
||||||
Private m_sCurrWaterJetting As String = String.Empty
|
Private m_sCurrWaterJetting As String = String.Empty
|
||||||
|
Private m_sCurrWaterJettingQuality As String = String.Empty
|
||||||
|
|
||||||
' Spessore sottopezzo
|
' Spessore sottopezzo
|
||||||
Private m_dAdditionalTable As Double = 0
|
Private m_dAdditionalTable As Double = 0
|
||||||
@@ -123,6 +139,8 @@ Public Class CurrentMachine
|
|||||||
Private m_dPhotoOffsetY As Double = 0
|
Private m_dPhotoOffsetY As Double = 0
|
||||||
Private m_dTab2PhotoOffsetX As Double = 0
|
Private m_dTab2PhotoOffsetX As Double = 0
|
||||||
Private m_dTab2PhotoOffsetY As Double = 0
|
Private m_dTab2PhotoOffsetY As Double = 0
|
||||||
|
Private m_dHQPhotoOffsetX As Double = 0
|
||||||
|
Private m_dHQPhotoOffsetY As Double = 0
|
||||||
|
|
||||||
' Abilitazione scelta restart
|
' Abilitazione scelta restart
|
||||||
Private m_bEnableRestart As Boolean = False
|
Private m_bEnableRestart As Boolean = False
|
||||||
@@ -154,6 +172,9 @@ Public Class CurrentMachine
|
|||||||
' Lista dei materiali
|
' Lista dei materiali
|
||||||
Private m_Materials As New ObservableCollection(Of Material)
|
Private m_Materials As New ObservableCollection(Of Material)
|
||||||
|
|
||||||
|
' Lista delle qualità di lavorazioni disponibili nel WaterJet
|
||||||
|
Private m_Qualities As New ObservableCollection(Of String)
|
||||||
|
|
||||||
' Massimo id della lista materiali nel file ini
|
' Massimo id della lista materiali nel file ini
|
||||||
Private m_MaxIdMat As Integer = 0
|
Private m_MaxIdMat As Integer = 0
|
||||||
|
|
||||||
@@ -180,8 +201,15 @@ Public Class CurrentMachine
|
|||||||
' Massimo numero di utensili su Tc manuale
|
' Massimo numero di utensili su Tc manuale
|
||||||
Friend MAX_TCMAN_TOOLS As Integer = 60
|
Friend MAX_TCMAN_TOOLS As Integer = 60
|
||||||
|
|
||||||
|
' Massima profondità lavorabile nei tagli diretti
|
||||||
|
Private m_MaxTabDepth As Double = 10.0
|
||||||
|
|
||||||
#Region "Proprietà che leggono e scrivono i valori anche da o su file ini"
|
#Region "Proprietà che leggono e scrivono i valori anche da o su file ini"
|
||||||
|
Friend ReadOnly Property MaxTabDepth As Double
|
||||||
|
Get
|
||||||
|
Return m_MaxTabDepth
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend ReadOnly Property sMachineName As String
|
Friend ReadOnly Property sMachineName As String
|
||||||
Get
|
Get
|
||||||
@@ -225,6 +253,12 @@ Public Class CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property bDemo As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bDemo
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend ReadOnly Property bProdLine As Boolean
|
Friend ReadOnly Property bProdLine As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_bProdLine
|
Return m_bProdLine
|
||||||
@@ -296,7 +330,7 @@ Public Class CurrentMachine
|
|||||||
Return m_bAskNewOnResend
|
Return m_bAskNewOnResend
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Friend ReadOnly Property nProdLiSawProbe As Integer
|
Friend ReadOnly Property nProdLiSawProbe As Integer
|
||||||
Get
|
Get
|
||||||
@@ -304,6 +338,24 @@ Public Class CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property sClickState As String
|
||||||
|
Get
|
||||||
|
Return m_sClickState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property sClickDir As String
|
||||||
|
Get
|
||||||
|
Return m_sClickDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property sExtFileCN As String
|
||||||
|
Get
|
||||||
|
Return m_sExtFileCN
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend Function sProdLiProbingStateVar(nI As Integer) As String
|
Friend Function sProdLiProbingStateVar(nI As Integer) As String
|
||||||
If nI = 1 Then Return m_sProdLiProbingStateVar
|
If nI = 1 Then Return m_sProdLiProbingStateVar
|
||||||
If nI = 2 Then Return m_sProdLiProbingState2Var
|
If nI = 2 Then Return m_sProdLiProbingState2Var
|
||||||
@@ -422,6 +474,12 @@ Public Class CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property bFromDBWaterJet As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bFromDBWaterJet
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend ReadOnly Property ShowToolChanger As Integer
|
Friend ReadOnly Property ShowToolChanger As Integer
|
||||||
Get
|
Get
|
||||||
Return m_nShowToolChanger
|
Return m_nShowToolChanger
|
||||||
@@ -586,6 +644,18 @@ Public Class CurrentMachine
|
|||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
|
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
|
||||||
m_sCurrSawing = value
|
m_sCurrSawing = value
|
||||||
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||||
|
'' aggiorno il file ini della macchina con i valori correnti della lavorazione
|
||||||
|
'Dim sVal As String = String.Empty
|
||||||
|
'Dim dVal As Double = m_dFsevLength
|
||||||
|
'If GetUserNote("FsevLength", sVal, m_sCurrSawing, False) Then
|
||||||
|
' StringToDouble(sVal, dVal)
|
||||||
|
' SetFsevLength(dVal)
|
||||||
|
'End If
|
||||||
|
'dVal = m_dFsevPerc
|
||||||
|
'If GetUserNote("FsevPerc", sVal, m_sCurrSawing, False) Then
|
||||||
|
' StringToDouble(sVal, m_dFsevPerc)
|
||||||
|
' SetFsevPerc(dVal)
|
||||||
|
'End If
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -696,6 +766,21 @@ Public Class CurrentMachine
|
|||||||
Set(value As String)
|
Set(value As String)
|
||||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, value, sMachIniFile) Then
|
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, value, sMachIniFile) Then
|
||||||
m_sCurrWaterJetting = value
|
m_sCurrWaterJetting = value
|
||||||
|
If m_MainWindow.m_CurrentMachine.bWaterJet And EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend Property sCurrWaterJettingQuality As String
|
||||||
|
Get
|
||||||
|
Return m_sCurrWaterJettingQuality
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, value, sMachIniFile) Then
|
||||||
|
m_sCurrWaterJettingQuality = value
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -706,6 +791,12 @@ Public Class CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property bEnableInvert As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bEnableInvetrt
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend Property dAdditionalTable As Double
|
Friend Property dAdditionalTable As Double
|
||||||
Get
|
Get
|
||||||
Select Case GetCurrentTable()
|
Select Case GetCurrentTable()
|
||||||
@@ -718,6 +809,7 @@ Public Class CurrentMachine
|
|||||||
End Select
|
End Select
|
||||||
End Get
|
End Get
|
||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
|
Dim dValue As Double = 0
|
||||||
Select Case GetCurrentTable()
|
Select Case GetCurrentTable()
|
||||||
Case 3
|
Case 3
|
||||||
If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And
|
If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And
|
||||||
@@ -726,6 +818,11 @@ Public Class CurrentMachine
|
|||||||
m_dTab3AdditionalTable = value
|
m_dTab3AdditionalTable = value
|
||||||
' Aggiorno il progetto corrente
|
' Aggiorno il progetto corrente
|
||||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||||
|
' salvo il valore della sovratavola nel progetto
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, dValue)
|
||||||
|
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||||
|
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, value)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Case 2
|
Case 2
|
||||||
If Math.Abs(value - m_dTab2AdditionalTable) > EPS_SMALL And
|
If Math.Abs(value - m_dTab2AdditionalTable) > EPS_SMALL And
|
||||||
@@ -734,6 +831,11 @@ Public Class CurrentMachine
|
|||||||
m_dTab2AdditionalTable = value
|
m_dTab2AdditionalTable = value
|
||||||
' Aggiorno il progetto corrente
|
' Aggiorno il progetto corrente
|
||||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||||
|
' salvo il valore della sovratavola nel progetto
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB2_ADDITIONALTABLE, dValue)
|
||||||
|
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||||
|
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB2_ADDITIONALTABLE, value)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Case Else
|
Case Else
|
||||||
If Math.Abs(value - m_dAdditionalTable) > EPS_SMALL And
|
If Math.Abs(value - m_dAdditionalTable) > EPS_SMALL And
|
||||||
@@ -742,6 +844,11 @@ Public Class CurrentMachine
|
|||||||
m_dAdditionalTable = value
|
m_dAdditionalTable = value
|
||||||
' Aggiorno il progetto corrente
|
' Aggiorno il progetto corrente
|
||||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||||
|
' salvo il valore della sovratavola nel progetto
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_ADDITIONALTABLE, dValue)
|
||||||
|
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||||
|
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_ADDITIONALTABLE, value)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
End Set
|
End Set
|
||||||
@@ -759,6 +866,10 @@ Public Class CurrentMachine
|
|||||||
Case 2
|
Case 2
|
||||||
Return New Vector3d(m_dTab2PhotoOffsetX, m_dTab2PhotoOffsetY, 0)
|
Return New Vector3d(m_dTab2PhotoOffsetX, m_dTab2PhotoOffsetY, 0)
|
||||||
Case Else
|
Case Else
|
||||||
|
' verifico quale delle due fotocamere è attualmente attiva
|
||||||
|
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||||
|
Return New Vector3d(m_dHQPhotoOffsetX, m_dHQPhotoOffsetY, 0)
|
||||||
|
End If
|
||||||
Return New Vector3d(m_dPhotoOffsetX, m_dPhotoOffsetY, 0)
|
Return New Vector3d(m_dPhotoOffsetX, m_dPhotoOffsetY, 0)
|
||||||
End Select
|
End Select
|
||||||
End Get
|
End Get
|
||||||
@@ -811,9 +922,18 @@ Public Class CurrentMachine
|
|||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
|
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
m_dFsevLength = value
|
m_dFsevLength = value
|
||||||
|
' salvo il dato nelle UserNote della lavorazione
|
||||||
|
'MdbSetCurrMachiningUserNote("FsevLength", m_dFsevLength.ToString, sCurrSawing, false)
|
||||||
|
' salvo il dato nelle UserNote dell'utensile
|
||||||
|
TdbSetCurrToolUserNote("FsevLength", m_dFsevLength.ToString, sCurrSaw)
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Friend Sub SetFsevLength(value As Double)
|
||||||
|
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
|
m_dFsevLength = value
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Property dFsevPerc As Double
|
Friend Property dFsevPerc As Double
|
||||||
Get
|
Get
|
||||||
@@ -822,9 +942,18 @@ Public Class CurrentMachine
|
|||||||
Set(value As Double)
|
Set(value As Double)
|
||||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
|
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
m_dFsevPerc = value
|
m_dFsevPerc = value
|
||||||
|
'' salvo il dato nelle UserNote della lavorazione
|
||||||
|
'MdbSetCurrMachiningUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSawing)
|
||||||
|
' salvo il dato nelle UserNote dell'utensile
|
||||||
|
TdbSetCurrToolUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSaw)
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Friend Sub SetFsevPerc(value As Double)
|
||||||
|
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
|
||||||
|
m_dFsevPerc = value
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend ReadOnly Property ToolChangerNbr As Integer
|
Friend ReadOnly Property ToolChangerNbr As Integer
|
||||||
Get
|
Get
|
||||||
@@ -894,6 +1023,12 @@ Public Class CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property Qualities As ObservableCollection(Of String)
|
||||||
|
Get
|
||||||
|
Return m_Qualities
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend Sub AddMaterial(value As Material)
|
Friend Sub AddMaterial(value As Material)
|
||||||
For Each Material As Material In Materials
|
For Each Material As Material In Materials
|
||||||
If Material.nId = value.nId Then
|
If Material.nId = value.nId Then
|
||||||
@@ -975,7 +1110,11 @@ Public Class CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Material)
|
Set(value As Material)
|
||||||
Dim CurrMatId As String = If(Not IsNothing(value), value.nId.ToString, "")
|
Dim CurrMatId As String = If(Not IsNothing(value), value.nId.ToString, "")
|
||||||
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId, sMachIniFile)
|
If bWaterJet And bFromDBWaterJet Then
|
||||||
|
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId & If(Not IsNothing(value), "." & value.SubId, ""), sMachIniFile)
|
||||||
|
Else
|
||||||
|
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId, sMachIniFile)
|
||||||
|
End If
|
||||||
m_CurrMat = value
|
m_CurrMat = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -1021,6 +1160,8 @@ Public Class CurrentMachine
|
|||||||
m_sMachIniFile = m_MainWindow.GetMachinesRootDir & "\" & sMachineName & "\" & sMachineName & ".ini"
|
m_sMachIniFile = m_MainWindow.GetMachinesRootDir & "\" & sMachineName & "\" & sMachineName & ".ini"
|
||||||
' Leggo estensione del file programma pezzo
|
' Leggo estensione del file programma pezzo
|
||||||
GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, "xpi", m_sIsoFileExt, sMachIniFile)
|
GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, "xpi", m_sIsoFileExt, sMachIniFile)
|
||||||
|
' per gestione canali separati (macchina NUM con più di 5 Assi) ver. 2.5g1
|
||||||
|
GetPrivateProfileString(S_PARTPROGRAM, K_EXTFILECN, ".0", m_sExtFileCN, sMachIniFile)
|
||||||
If m_sIsoFileExt(0) <> "." Then m_sIsoFileExt = "." & m_sIsoFileExt
|
If m_sIsoFileExt(0) <> "." Then m_sIsoFileExt = "." & m_sIsoFileExt
|
||||||
' Leggo flag incremento asse C
|
' Leggo flag incremento asse C
|
||||||
m_dDeltaC = GetPrivateProfileDouble(S_AXES, K_DELTA_C, 0.0, sMachIniFile)
|
m_dDeltaC = GetPrivateProfileDouble(S_AXES, K_DELTA_C, 0.0, sMachIniFile)
|
||||||
@@ -1034,6 +1175,7 @@ Public Class CurrentMachine
|
|||||||
m_bProdLine = False
|
m_bProdLine = False
|
||||||
EgtOutLog("Error - Production line requested but not key enabled")
|
EgtOutLog("Error - Production line requested but not key enabled")
|
||||||
End If
|
End If
|
||||||
|
m_bDemo = (GetPrivateProfileInt(S_PRODUCTIONLINE, "Demo", 0, sMachIniFile) <> 0)
|
||||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG1, "", m_sVarProg1, sMachIniFile)
|
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG1, "", m_sVarProg1, sMachIniFile)
|
||||||
m_nProg1 = GetPrivateProfileInt(S_PRODUCTIONLINE, K_NAMEPROG1, 0, m_MainWindow.GetMachIniFile())
|
m_nProg1 = GetPrivateProfileInt(S_PRODUCTIONLINE, K_NAMEPROG1, 0, m_MainWindow.GetMachIniFile())
|
||||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG2, "", m_sVarProg2, sMachIniFile)
|
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG2, "", m_sVarProg2, sMachIniFile)
|
||||||
@@ -1053,6 +1195,13 @@ Public Class CurrentMachine
|
|||||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLIPROBINGTCPOS2VAR, "0", m_sProdLiProbingTcPos2Var, sMachIniFile)
|
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLIPROBINGTCPOS2VAR, "0", m_sProdLiProbingTcPos2Var, sMachIniFile)
|
||||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLISAWDIAMETER2VAR, "", m_sProdLiSawDiameter2Var, sMachIniFile)
|
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLISAWDIAMETER2VAR, "", m_sProdLiSawDiameter2Var, sMachIniFile)
|
||||||
|
|
||||||
|
GetPrivateProfileString(S_POLISHLINE, K_CLICKSTATE, "", m_sClickState, sMachIniFile)
|
||||||
|
GetPrivateProfileString(S_POLISHLINE, k_CLICKDIR, "", m_sClickDir, sMachIniFile)
|
||||||
|
If Not Directory.Exists(m_sClickDir) Then
|
||||||
|
m_sClickState = ""
|
||||||
|
EgtOutLog("Directory " & m_sClickDir & " does not exist")
|
||||||
|
End If
|
||||||
|
|
||||||
' Leggo configurazione degli utensili in macchina
|
' Leggo configurazione degli utensili in macchina
|
||||||
m_MountedToolConfig = GetPrivateProfileInt(S_TOOLS, K_MOUNTEDTOOLCONFIG, 0, sMachIniFile)
|
m_MountedToolConfig = GetPrivateProfileInt(S_TOOLS, K_MOUNTEDTOOLCONFIG, 0, sMachIniFile)
|
||||||
' Leggo flag presenza tipologie utensili
|
' Leggo flag presenza tipologie utensili
|
||||||
@@ -1072,6 +1221,8 @@ Public Class CurrentMachine
|
|||||||
' waterjet
|
' waterjet
|
||||||
m_bWaterJet = (GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachIniFile) > 0) And
|
m_bWaterJet = (GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachIniFile) > 0) And
|
||||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
||||||
|
' Leggo abilitazione DB WaterJet
|
||||||
|
m_bFromDBWaterJet = (GetPrivateProfileInt(S_MATERIALS, K_FROMDBWATERJET, 0, sMachIniFile) > 0)
|
||||||
' Leggo abilitazione visualizzazione TcPos, Head/exit e Note utente
|
' Leggo abilitazione visualizzazione TcPos, Head/exit e Note utente
|
||||||
m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile)
|
m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile)
|
||||||
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
||||||
@@ -1107,6 +1258,8 @@ Public Class CurrentMachine
|
|||||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
||||||
' possibilità di definire attacco speciale per materiali ceramici
|
' possibilità di definire attacco speciale per materiali ceramici
|
||||||
m_bSawingSpecialLeadIn = (GetPrivateProfileInt(S_MACHININGS, K_SAWINGSPECIALLEADIN, 0, sMachIniFile) > 0)
|
m_bSawingSpecialLeadIn = (GetPrivateProfileInt(S_MACHININGS, K_SAWINGSPECIALLEADIN, 0, sMachIniFile) > 0)
|
||||||
|
' mantengo la direzione del taglio definita nel taglio diretto
|
||||||
|
m_bEnableInvetrt = (GetPrivateProfileInt(S_DIRECTCUTS, K_ENABLEINVERT, 1, sMachIniFile) <> 0)
|
||||||
|
|
||||||
' Leggo utensili correnti
|
' Leggo utensili correnti
|
||||||
' lama
|
' lama
|
||||||
@@ -1147,6 +1300,8 @@ Public Class CurrentMachine
|
|||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
||||||
' waterjetting
|
' waterjetting
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
||||||
|
' waterjettingquality
|
||||||
|
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, Nothing, m_sCurrWaterJettingQuality, sMachIniFile)
|
||||||
|
|
||||||
' Leggo numero di portautensili
|
' Leggo numero di portautensili
|
||||||
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
||||||
@@ -1187,6 +1342,8 @@ Public Class CurrentMachine
|
|||||||
m_dPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_OFFSETY, 0, sMachIniFile)
|
m_dPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_OFFSETY, 0, sMachIniFile)
|
||||||
m_dTab2PhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETX, 0, sMachIniFile)
|
m_dTab2PhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETX, 0, sMachIniFile)
|
||||||
m_dTab2PhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETY, 0, sMachIniFile)
|
m_dTab2PhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETY, 0, sMachIniFile)
|
||||||
|
m_dHQPhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_HQ_OFFSETX, 0, sMachIniFile)
|
||||||
|
m_dHQPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_HQ_OFFSETY, 0, sMachIniFile)
|
||||||
|
|
||||||
' Leggo abilitazione per restart
|
' Leggo abilitazione per restart
|
||||||
m_bEnableRestart = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENABLERESTART, 0, sMachIniFile) <> 0)
|
m_bEnableRestart = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENABLERESTART, 0, sMachIniFile) <> 0)
|
||||||
@@ -1200,6 +1357,7 @@ Public Class CurrentMachine
|
|||||||
|
|
||||||
' Leggo dati per feed ridotta all'inizio/fine dei tagli
|
' Leggo dati per feed ridotta all'inizio/fine dei tagli
|
||||||
m_bFsevEnable = (GetPrivateProfileInt(S_NEST, K_MACH_CUTFSEVENABLE, 0, sMachIniFile) <> 0)
|
m_bFsevEnable = (GetPrivateProfileInt(S_NEST, K_MACH_CUTFSEVENABLE, 0, sMachIniFile) <> 0)
|
||||||
|
' sposto la lettura nel DB delle lavorazioni della lama corrente!
|
||||||
m_dFsevLength = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVLEN, 0, sMachIniFile)
|
m_dFsevLength = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVLEN, 0, sMachIniFile)
|
||||||
m_dFsevPerc = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVPERC, 0, sMachIniFile)
|
m_dFsevPerc = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVPERC, 0, sMachIniFile)
|
||||||
|
|
||||||
@@ -1208,27 +1366,287 @@ Public Class CurrentMachine
|
|||||||
' Leggo la lista dei materiali
|
' Leggo la lista dei materiali
|
||||||
Dim Material As Material = Nothing
|
Dim Material As Material = Nothing
|
||||||
Dim nIndex As Integer = 1
|
Dim nIndex As Integer = 1
|
||||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
|
||||||
m_Materials.Add(Material)
|
If m_bWaterJet And m_bFromDBWaterJet Then
|
||||||
nIndex += 1
|
LoadWJMaterial(True)
|
||||||
End While
|
Else
|
||||||
|
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||||
|
m_Materials.Add(Material)
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
|
||||||
' Salvo massimo indice a cui sono arrivato per usarlo quando devo aggiungere nuovi elementi alla lista
|
' Salvo massimo indice a cui sono arrivato per usarlo quando devo aggiungere nuovi elementi alla lista
|
||||||
m_MaxIdMat = nIndex - 1
|
m_MaxIdMat = nIndex - 1
|
||||||
|
|
||||||
' Leggo materiale correntemente attivo
|
' Leggo materiale correntemente attivo
|
||||||
Dim CurrMatId As Integer = GetPrivateProfileInt(S_MATERIALS, K_CURRMATERIAL, 0, sMachIniFile)
|
Dim sCurrMatId As String = String.Empty
|
||||||
For Each Material In Materials
|
EgtUILib.GetPrivateProfileString(S_MATERIALS, K_CURRMATERIAL, "0", sCurrMatId, sMachIniFile)
|
||||||
If Material.nId = CurrMatId Then
|
If bWaterJet And bFromDBWaterJet Then
|
||||||
m_CurrMat = Material
|
Dim sCurrMatIds As String()
|
||||||
Exit For
|
sCurrMatIds = sCurrMatId.Split("."c)
|
||||||
|
If sCurrMatIds.Length > 1 Then
|
||||||
|
Dim nCurrMatId As Integer
|
||||||
|
Dim nCurrSubMatId As Integer
|
||||||
|
If Not Integer.TryParse(sCurrMatIds(0), nCurrMatId) Then nCurrMatId = 0
|
||||||
|
If Not Integer.TryParse(sCurrMatIds(1), nCurrSubMatId) Then nCurrSubMatId = 0
|
||||||
|
For Each Material In Materials
|
||||||
|
If Material.nId = nCurrMatId AndAlso Material.SubId = nCurrSubMatId Then
|
||||||
|
m_CurrMat = Material
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
Next
|
Else
|
||||||
|
Dim nCurrMatId As Integer
|
||||||
|
If Not Integer.TryParse(sCurrMatId, nCurrMatId) Then nCurrMatId = 0
|
||||||
|
For Each Material In Materials
|
||||||
|
If Material.nId = nCurrMatId Then
|
||||||
|
m_CurrMat = Material
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
' leggo se la macchina ha il tastatore dello spessore tavola
|
' leggo se la macchina ha il tastatore dello spessore tavola
|
||||||
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
||||||
' leggo se la macchina ha il lettore di codice a barre della lastra
|
' leggo se la macchina ha il lettore di codice a barre della lastra
|
||||||
m_nEnableBarCodeReader = GetPrivateProfileInt(S_MACH_BARCODEREADER, K_ENABLEBCR, 0, sMachIniFile)
|
m_nEnableBarCodeReader = GetPrivateProfileInt(S_MACH_BARCODEREADER, K_ENABLEBCR, 0, sMachIniFile)
|
||||||
|
|
||||||
|
' affonadamento massimo oltre la tavola (inidicata in positivo!)
|
||||||
|
m_MaxTabDepth = GetPrivateProfileDouble(S_MACH_NEST, "MaxTabDepth", 10.0, m_MainWindow.GetMachIniFile())
|
||||||
|
If m_MaxTabDepth < 0 Then
|
||||||
|
m_MaxTabDepth = 10.0
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' Per il controllo FANUC al momento dell'inizializzazione del CN devono essere lette alcune variabili
|
||||||
|
Public Sub InitFANUC(CN_Generic As CN_generico)
|
||||||
|
' Leggo ritardo tra reset e send per NUM
|
||||||
|
m_nResetSendDelay = GetPrivateProfileInt(S_NCFANUC, K_RESETSENDDELAY, 1000, sMachIniFile)
|
||||||
|
' Leggo ritardo tra reset e send per NUM
|
||||||
|
m_nThreadSleep = GetPrivateProfileInt(S_NCFANUC, K_THREADSLEEP, 150, sMachIniFile)
|
||||||
|
' Leggo i dati strettamente correlati alla comunicazione NC-PC
|
||||||
|
Dim CN As CN_generico = CN_Generic
|
||||||
|
' Leggo l'indirizzo in cui scrivere lo stato macchina
|
||||||
|
Dim dAddNcMode As String = CN.s_addr_set_nc_mode
|
||||||
|
GetPrivateProfileString(S_NCFANUC, K_SETNCMODE, CN.s_addr_set_nc_mode, CN.s_addr_set_nc_mode, sMachIniFile)
|
||||||
|
' Leggo primo indirizzo libero delle variabili di tipo intero
|
||||||
|
CN.n_Base_addr_int_vars = GetPrivateProfileInt(S_NCFANUC, K_BASEADDRINT, CN.n_Base_addr_int_vars, sMachIniFile)
|
||||||
|
' Leggo primo indirizzo libero delle variabili di tipo bit
|
||||||
|
CN.n_Base_addr_byte_for_bits_vars = GetPrivateProfileInt(S_NCFANUC, K_BASEADDRBIT, CN.n_Base_addr_byte_for_bits_vars, sMachIniFile)
|
||||||
|
' Leggo numero di variabili di tipo intero
|
||||||
|
CN.n_num_var_int_to_read = CShort(GetPrivateProfileInt(S_NCFANUC, K_NUMVARINT, CInt(CN.n_num_var_int_to_read), sMachIniFile))
|
||||||
|
' Leggo numero di varibili di tipo bit
|
||||||
|
CN.n_num_var_byte_for_bits_to_read = CShort(GetPrivateProfileInt(S_NCFANUC, K_NUMVARBIT, CInt(CN.n_num_var_byte_for_bits_to_read), sMachIniFile))
|
||||||
|
' Leggo variabile abilitata alla gestione di FeedHold
|
||||||
|
GetPrivateProfileString(S_NCFANUC, K_SETNCMODE, CN.s_addr_feedhold, CN.s_addr_feedhold, sMachIniFile)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||||
|
Dim TempCurrMat As Material = CurrMat
|
||||||
|
' Svuoto l'attuale lista di materiali
|
||||||
|
m_Materials.Clear()
|
||||||
|
' Leggo valori da file Data e li carico nelle proprietà
|
||||||
|
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||||
|
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||||
|
Local_MaterialList = WaterjetDbWindowVM_OmagCUT.LoadWjMaterials(sFilePath)
|
||||||
|
' definisco la lista delle qualità (solo se è vuota)
|
||||||
|
If m_Qualities.Count < 1 Then
|
||||||
|
m_Qualities.Add("Q1")
|
||||||
|
m_Qualities.Add("Q2")
|
||||||
|
m_Qualities.Add("Q3")
|
||||||
|
m_Qualities.Add("Q4")
|
||||||
|
m_Qualities.Add("Q5")
|
||||||
|
m_Qualities.Add("QExtra")
|
||||||
|
End If
|
||||||
|
' inserisco il materiale generico di default -- IN SOSPESO
|
||||||
|
'm_Materials.Add(New Material(0, "***", 0))
|
||||||
|
' costruiscoi la lista
|
||||||
|
Dim i As Integer = 0
|
||||||
|
Dim sName As String = String.Empty
|
||||||
|
For i = 0 To Local_MaterialList.Count - 1
|
||||||
|
sName = Local_MaterialList(i).Name
|
||||||
|
Dim j As Integer = 0
|
||||||
|
For j = 0 To Local_MaterialList(i).SubMaterialList.Count - 1
|
||||||
|
m_Materials.Add(New Material(i + 1, sName & "." & Local_MaterialList(i).SubMaterialList(j).Name, j + 1))
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
If Not bIsStart Then CurrMat = TempCurrMat
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function GetMaxThicknessCurrMaterial(sCurMat As String) As Double
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
Dim dMaxThick As Double = 0
|
||||||
|
' Leggo valori da file Data e li carico nelle proprietà
|
||||||
|
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||||
|
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||||
|
Local_MaterialList = WaterjetDbWindowVM_OmagCUT.LoadWjMaterials(sFilePath)
|
||||||
|
Dim sItems() As String = sCurMat.Split("."c)
|
||||||
|
If sItems.Count > 1 Then
|
||||||
|
Dim sMat As String = sItems(0)
|
||||||
|
Dim sSubMat As String = sItems(1)
|
||||||
|
For Each ItemMat As EgtWPFLib5.WjMaterial In Local_MaterialList
|
||||||
|
If ItemMat.Name = sMat Then
|
||||||
|
For Each ItemSubMat As EgtWPFLib5.WjSubMaterial In ItemMat.SubMaterialList
|
||||||
|
If ItemSubMat.Name = sSubMat Then
|
||||||
|
For Each ItemParam As EgtWPFLib5.WjParam In ItemSubMat.ParamList
|
||||||
|
Dim dParamThick As Double
|
||||||
|
StringToDouble(ItemParam.Thickness, dParamThick)
|
||||||
|
If dParamThick > dMaxThick Then
|
||||||
|
dMaxThick = dParamThick
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
bFound = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
If bFound Then Exit For
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If bFound Then Exit For
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
' il valore resituito è già nell'unità corrente del programma -> converto il dato in mm
|
||||||
|
Dim dValmm As Double = 0
|
||||||
|
StringToLen(DoubleToString(dMaxThick, 3), dValmm)
|
||||||
|
Return dValmm
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#Region "USERNOTE"
|
||||||
|
|
||||||
|
' recupero le note UserNote associate alla LAVORAZIONE Machining
|
||||||
|
Friend Function MdbGetCurrMachiningUserNote(Machining As String) As String
|
||||||
|
Dim UserNotes As String = String.Empty
|
||||||
|
' lavorazione corrente
|
||||||
|
Dim CurrMach As String = String.Empty
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
|
||||||
|
' Imposto utensile lama corrente
|
||||||
|
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
|
||||||
|
' leggo nel db corrente della lavorazione questa info
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.USERNOTES, UserNotes)
|
||||||
|
' reimposto lavorazione corrente
|
||||||
|
EgtMdbSetCurrMachining(CurrMach)
|
||||||
|
End If
|
||||||
|
Return UserNotes
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' recupero le note UserNote associate all'UTENSILE Tool
|
||||||
|
Friend Function TdbGetCurrToolUserNote(Tool As String) As String
|
||||||
|
Dim UserNotes As String = String.Empty
|
||||||
|
' lavorazione corrente
|
||||||
|
Dim CurrTool As String = String.Empty
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
|
||||||
|
' Imposto utensile lama corrente
|
||||||
|
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
|
||||||
|
' leggo nel db corrente della lavorazione questa info
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, UserNotes)
|
||||||
|
' reimposto lavorazione corrente
|
||||||
|
EgtTdbSetCurrTool(CurrTool)
|
||||||
|
End If
|
||||||
|
Return UserNotes
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' imposta il nuovo valore in UserNote della LAVORAZIONE Machining
|
||||||
|
Friend Sub MdbSetCurrMachiningUserNote(sKeyUserNote As String, sValUserNote As String, Machining As String)
|
||||||
|
' lavorazione corrente
|
||||||
|
Dim CurrMach As String = String.Empty
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
|
||||||
|
' Imposto utensile lama corrente
|
||||||
|
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
|
||||||
|
Dim UserNotes As String = String.Empty
|
||||||
|
' salvo nel db corrente della lavorazione questa info → devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
|
||||||
|
EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Machining))
|
||||||
|
EgtMdbSaveCurrMachining()
|
||||||
|
EgtMdbSave()
|
||||||
|
' reimposto lavorazione corrente
|
||||||
|
EgtMdbSetCurrMachining(CurrMach)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' imposta il nuovo valore in UserNote dell'UTENSILE Tool
|
||||||
|
Friend Sub TdbSetCurrToolUserNote(sKeyUserNote As String, sValUserNote As String, Tool As String)
|
||||||
|
' lavorazione corrente
|
||||||
|
Dim CurrTool As String = String.Empty
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
|
||||||
|
' Imposto utensile lama corrente
|
||||||
|
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
|
||||||
|
Dim UserNotes As String = String.Empty
|
||||||
|
' salvo nel db corrente della lavorazione questa info → devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
|
||||||
|
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Tool))
|
||||||
|
EgtTdbSaveCurrTool()
|
||||||
|
EgtTdbSave()
|
||||||
|
' reimposto lavorazione corrente
|
||||||
|
EgtTdbSetCurrTool(Tool)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' separa la le note UserNote della LAVORAZIONE
|
||||||
|
Private Function SplitUserNoteMachinig(Machining As String) As String()
|
||||||
|
Dim sUserNotes As String = MdbGetCurrMachiningUserNote(Machining)
|
||||||
|
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
|
||||||
|
Dim sItems As String() = sUserNotes.Split(";"c)
|
||||||
|
Return sItems
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' separa la le note UserNote della LAVORAZIONE
|
||||||
|
Private Function SplitUserNoteTool(Tool As String) As String()
|
||||||
|
Dim sUserNotes As String = TdbGetCurrToolUserNote(Tool)
|
||||||
|
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
|
||||||
|
Dim sItems As String() = sUserNotes.Split(";"c)
|
||||||
|
Return sItems
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' recupera il valore della associato alla chiave per la lavorazione oppure utensile (bIsToolNote)
|
||||||
|
Friend Function GetUserNote(sKeyUserNote As String, ByRef sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As Boolean
|
||||||
|
Dim sUserNotesList As String() = Nothing
|
||||||
|
If bIsToolNote Then
|
||||||
|
sUserNotesList = SplitUserNoteTool(sName)
|
||||||
|
Else
|
||||||
|
sUserNotesList = SplitUserNoteMachinig(sName)
|
||||||
|
End If
|
||||||
|
If IsNothing(sUserNotesList) Then Return False
|
||||||
|
For Index As Integer = 0 To sUserNotesList.Count - 1
|
||||||
|
Dim sNote As String() = sUserNotesList(Index).Split("="c)
|
||||||
|
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
|
||||||
|
sValUserNote = sNote(1).Trim
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' ricostruisce la stringa UserNote da salvare
|
||||||
|
Friend Function AssembUserNote(sKeyUserNote As String, sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As String
|
||||||
|
Dim sUserNotes As String = String.Empty
|
||||||
|
Dim sUserNotesList As String() = Nothing
|
||||||
|
If bIsToolNote Then
|
||||||
|
sUserNotesList = SplitUserNoteTool(sName)
|
||||||
|
Else
|
||||||
|
sUserNotesList = SplitUserNoteMachinig(sName)
|
||||||
|
End If
|
||||||
|
Dim bExists As Boolean = False
|
||||||
|
If Not IsNothing(sUserNotesList) Then
|
||||||
|
For Index As Integer = 0 To sUserNotesList.Count - 1
|
||||||
|
Dim sNote As String() = sUserNotesList(Index).Split("="c)
|
||||||
|
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
|
||||||
|
sUserNotesList(Index) = sKeyUserNote & "=" & sValUserNote
|
||||||
|
bExists = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' riassemblo la stringa
|
||||||
|
For Each Item As String In sUserNotesList
|
||||||
|
If Not String.IsNullOrWhiteSpace(Item) Then
|
||||||
|
sUserNotes &= Item & ";"
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not bExists Then
|
||||||
|
sUserNotes &= sKeyUserNote & "=" & sValUserNote & ";"
|
||||||
|
End If
|
||||||
|
Return sUserNotes
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' USERNOTE
|
||||||
|
|
||||||
Friend Function IsVacuumMovePossible() As Boolean
|
Friend Function IsVacuumMovePossible() As Boolean
|
||||||
' Recupero diametro lama corrente
|
' Recupero diametro lama corrente
|
||||||
EgtTdbSetCurrTool(sCurrSaw)
|
EgtTdbSetCurrTool(sCurrSaw)
|
||||||
@@ -1323,6 +1741,7 @@ Friend Class Material
|
|||||||
|
|
||||||
Private m_nId As Integer
|
Private m_nId As Integer
|
||||||
Private m_sName As String
|
Private m_sName As String
|
||||||
|
Private m_SubId As Integer = 0
|
||||||
|
|
||||||
Public ReadOnly Property nId As Integer
|
Public ReadOnly Property nId As Integer
|
||||||
Get
|
Get
|
||||||
@@ -1339,6 +1758,15 @@ Friend Class Material
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property SubId As Integer
|
||||||
|
Get
|
||||||
|
Return m_SubId
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_SubId = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
||||||
Dim nMaxId As Integer = 0
|
Dim nMaxId As Integer = 0
|
||||||
For Each Material As Material In MaterialList
|
For Each Material As Material In MaterialList
|
||||||
@@ -1355,4 +1783,11 @@ Friend Class Material
|
|||||||
m_sName = sName
|
m_sName = sName
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||||
|
m_nId = nId
|
||||||
|
m_sName = sName
|
||||||
|
m_SubId = nSubId
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,139 @@
|
|||||||
|
<Window x:Class="ImportExportMachiningWindowWD"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
|
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
|
||||||
|
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||||
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="7*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ScrollViewer Grid.Row="0" Margin="20">
|
||||||
|
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||||
|
<TreeView.Resources>
|
||||||
|
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningFamily}" ItemsSource="{Binding MachiningList}">
|
||||||
|
|
||||||
|
<Grid Height="20">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||||
|
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- multibinding quando sono attivi.-->
|
||||||
|
<HierarchicalDataTemplate.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TreeViewItem}" >
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
|
||||||
|
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||||
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition MinWidth="19" Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||||
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Border>
|
||||||
|
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
|
||||||
|
<Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsExpanded" Value="false">
|
||||||
|
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="HasItems" Value="false">
|
||||||
|
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelected" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}" />
|
||||||
|
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
|
||||||
|
<Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
|
||||||
|
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
||||||
|
</Trigger>
|
||||||
|
<!--<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsSelected" Value="true"/>
|
||||||
|
<Condition Property="IsSelectionActive" Value="false"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
|
</MultiTrigger>-->
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningItem}">
|
||||||
|
<Grid Height="20">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||||
|
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15"
|
||||||
|
Margin="-15,0,5,0" VerticalContentAlignment="Center"
|
||||||
|
IsChecked="{Binding Active}"
|
||||||
|
Visibility="{Binding Path=DataContext.Active_Visibility,
|
||||||
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||||
|
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
||||||
|
Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
</TreeView.Resources>
|
||||||
|
</TreeView>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<Grid Grid.Column="1" Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="OkBtn" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||||
|
Margin="5,-10,5,15"
|
||||||
|
Command="{Binding OkCommand}">
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||||
|
Margin="5,-10,5,15"
|
||||||
|
IsCancel="True">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
Imports EgtWPFLib5
|
||||||
|
Public Class ImportExportMachiningWindowWD
|
||||||
|
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
|
Private WithEvents m_ImportExportMachiningWindowVM As ImportExportMachiningWindowVM
|
||||||
|
|
||||||
|
Private m_OkResult As Boolean = False
|
||||||
|
Public ReadOnly Property OkResult As Boolean
|
||||||
|
Get
|
||||||
|
Return m_OkResult
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportMachiningWindowVM)
|
||||||
|
Me.Owner = Owner
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = ImportExportToolWindowVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_ImportExportMachiningWindowVM = ImportExportToolWindowVM
|
||||||
|
End Sub
|
||||||
|
Private Sub OkCloseDialogWD() Handles OkBtn.Click
|
||||||
|
m_OkResult = True
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CancelCloseDialogWD() Handles ExitBtn.Click
|
||||||
|
m_OkResult = False
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
<Window x:Class="ImportExportToolWD"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
|
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
|
||||||
|
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||||
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="7*"/>
|
||||||
|
<RowDefinition Height="2*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ScrollViewer Grid.Row="0" Margin="20">
|
||||||
|
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||||
|
<TreeView.Resources>
|
||||||
|
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpToolFamily}" ItemsSource="{Binding ToolList}">
|
||||||
|
|
||||||
|
<Grid Height="20">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||||
|
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
<!-- multibinding quando sono attivi.-->
|
||||||
|
<HierarchicalDataTemplate.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TreeViewItem}" >
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
|
||||||
|
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||||
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition MinWidth="19" Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||||
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Border>
|
||||||
|
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
|
||||||
|
<Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsExpanded" Value="false">
|
||||||
|
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="HasItems" Value="false">
|
||||||
|
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelected" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}" />
|
||||||
|
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
|
||||||
|
<Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
|
||||||
|
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
||||||
|
</Trigger>
|
||||||
|
<!--<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsSelected" Value="true"/>
|
||||||
|
<Condition Property="IsSelectionActive" Value="false"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
|
</MultiTrigger>-->
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||||
|
</HierarchicalDataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpToolItem}">
|
||||||
|
<Grid Height="20">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||||
|
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15"
|
||||||
|
Margin="-15,0,5,0" VerticalContentAlignment="Center"
|
||||||
|
IsChecked="{Binding Active}"
|
||||||
|
Visibility="{Binding Path=DataContext.Active_Visibility,
|
||||||
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||||
|
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
||||||
|
Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
</TreeView.Resources>
|
||||||
|
</TreeView>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<Grid Grid.Column="1" Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="OkBtn" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||||
|
Margin="5,-10,5,15"
|
||||||
|
Command="{Binding OkCommand}">
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||||
|
Margin="5,-10,5,15"
|
||||||
|
IsCancel="True">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
Imports EgtWPFLib5
|
||||||
|
Public Class ImportExportToolWD
|
||||||
|
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
|
Private WithEvents m_ImportExportToolWindowVM As ImportExportToolWindowVM
|
||||||
|
|
||||||
|
Private m_OkResult As Boolean = False
|
||||||
|
Public ReadOnly Property OkResult As Boolean
|
||||||
|
Get
|
||||||
|
Return m_OkResult
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportToolWindowVM)
|
||||||
|
Me.Owner = Owner
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = ImportExportToolWindowVM
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
m_ImportExportToolWindowVM = ImportExportToolWindowVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ImportExportToolWindowVM.m_CloseWindow
|
||||||
|
' Me.DialogResult = bDialogResult
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
Private Sub OkCloseDialogWD() Handles OkBtn.Click
|
||||||
|
m_OkResult = True
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CancelCloseDialogWD() Handles ExitBtn.Click
|
||||||
|
m_OkResult = False
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -7,105 +7,123 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="768" d:DesignWidth="1280">
|
d:DesignHeight="768" d:DesignWidth="1280">
|
||||||
|
|
||||||
<!-- Definizione della ImportPage -->
|
<!-- Definizione della ImportPage -->
|
||||||
<Border Background="{DynamicResource OmagCut_Gray}" >
|
<Border Background="{DynamicResource OmagCut_Gray}" >
|
||||||
|
|
||||||
<Grid Name="ImportPageGrid">
|
<Grid Name="ImportPageGrid">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="7.5*"/>
|
<ColumnDefinition Width="7.5*"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="5*"/>
|
<ColumnDefinition Width="5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="1.5*"/>
|
||||||
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="1.5*"/>
|
||||||
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="1.5*"/>
|
||||||
<RowDefinition Height="4.5*"/>
|
<RowDefinition Height="4.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<GroupBox Name="CNModeGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.ColumnSpan="2" Margin="0,0,4,0">
|
<GroupBox Name="CNModeGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.ColumnSpan="2" Margin="0,0,4,0">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="AutoBtn" Grid.Column="0"
|
<ToggleButton Name="AutoBtn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||||
<Button Name="ManualBtn" Grid.Column="1"
|
Foreground="White"/>
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
<ToggleButton Name="ManualBtn" Grid.Column="1"
|
||||||
<Button Name="MDIBtn" Grid.Column="2"
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Foreground="White"/>
|
||||||
<Button Name="SingleBtn" Grid.Column="3"
|
<ToggleButton Name="MDIBtn" Grid.Column="2"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||||
<Button Name="HomeBtn" Grid.Column="4"
|
Foreground="White"/>
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
<ToggleButton Name="SingleBtn" Grid.Column="3"
|
||||||
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||||
|
Foreground="White"/>
|
||||||
|
<ToggleButton Name="HomeBtn" Grid.Column="4"
|
||||||
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||||
|
Foreground="White"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="CommandsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.ColumnSpan="2">
|
<GroupBox Name="CommandsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.ColumnSpan="2">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="StartBtn" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
<Button Name="StartBtn" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
<Button Name="StopBtn" Grid.Column="1"
|
<Button Name="StopBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
<Button Name="ResetBtn" Grid.Column="2"
|
<Button Name="ResetBtn" Grid.Column="2"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="MDICommandGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="1">
|
<GroupBox Name="MDICommandGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="1">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="6*"/>
|
<ColumnDefinition Width="6*"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<EgtWPFLib:EgtTextBox Name="MDITxBx" Margin="10,0,10,0" Style="{DynamicResource OmagCut_MDIKeyboardTextBox}"/>
|
<EgtWPFLib:EgtTextBox Name="MDITxBx" Margin="10,0,10,0" Style="{DynamicResource OmagCut_MDIKeyboardTextBox}"/>
|
||||||
<Button Name="MDIConfirmBtn" Grid.Column="1"
|
<Button Name="MDIConfirmBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="PartProgTransferGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
<GroupBox Name="CameraHQ" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ToggleButton Name="CameraHQBtn" Grid.Column="2"
|
||||||
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||||
|
Foreground="White"/>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
<GroupBox Name="PartProgTransferGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||||
Grid.ColumnSpan="3">
|
Grid.ColumnSpan="3">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="DownloadBtn" Grid.Column="0"
|
<Button Name="DownloadBtn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
<Button Name="UploadBtn" Grid.Column="1"
|
<Button Name="UploadBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
<Button Name="ActivateBtn" Grid.Column="2"
|
<Button Name="ActivateBtn" Grid.Column="2"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
<Button Name="DeleteBtn" Grid.Column="3"
|
<Button Name="DeleteBtn" Grid.Column="3"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DULoadTxBx" Grid.Column="4" Width="100" Text="900.0"
|
<EgtWPFLib:EgtTextBox Name="DULoadTxBx" Grid.Column="4" Width="100" Text="900.0"
|
||||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="PowerGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
<GroupBox Name="PowerGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||||
Grid.Column="3" Grid.ColumnSpan="3" Margin="5,0,0,0">
|
Grid.Column="3" Grid.ColumnSpan="3" Margin="5,0,0,0">
|
||||||
@@ -126,18 +144,18 @@
|
|||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="ErrorLstGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="3" Grid.ColumnSpan="4">
|
<GroupBox Name="ErrorLstGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="3" Grid.ColumnSpan="4">
|
||||||
<ListBox Name="ErrorLstBx">
|
<ListBox Name="ErrorLstBx">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ Public Class MachineCNPageUC
|
|||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
Private m_ButtonPower As New List(Of MachineButton)
|
Private m_ButtonPower As New List(Of MachineButton)
|
||||||
|
|
||||||
|
Private m_nCurrMode As Integer = 0
|
||||||
|
|
||||||
Private Sub TestingPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub TestingPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
StartBtn.Content = EgtMsg(MSG_MACHINECNPAGEUC + 1)
|
StartBtn.Content = EgtMsg(MSG_MACHINECNPAGEUC + 1)
|
||||||
StopBtn.Content = EgtMsg(MSG_MACHINECNPAGEUC + 2)
|
StopBtn.Content = EgtMsg(MSG_MACHINECNPAGEUC + 2)
|
||||||
@@ -27,6 +29,7 @@ Public Class MachineCNPageUC
|
|||||||
MDICommandGpBx.Header = EgtMsg(MSG_MACHINECNPAGEUC + 16)
|
MDICommandGpBx.Header = EgtMsg(MSG_MACHINECNPAGEUC + 16)
|
||||||
PartProgTransferGpBx.Header = EgtMsg(MSG_MACHINECNPAGEUC + 17)
|
PartProgTransferGpBx.Header = EgtMsg(MSG_MACHINECNPAGEUC + 17)
|
||||||
ErrorLstGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 12)
|
ErrorLstGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 12)
|
||||||
|
|
||||||
' Attivo gruppo PartProgTransferGpBx leggendo la variabile nel file ini
|
' Attivo gruppo PartProgTransferGpBx leggendo la variabile nel file ini
|
||||||
If GetPrivateProfileInt(S_GENERAL, K_TESTINGPAGE, 0, m_MainWindow.GetIniFile()) = 1 Then
|
If GetPrivateProfileInt(S_GENERAL, K_TESTINGPAGE, 0, m_MainWindow.GetIniFile()) = 1 Then
|
||||||
PartProgTransferGpBx.Visibility = Windows.Visibility.Visible
|
PartProgTransferGpBx.Visibility = Windows.Visibility.Visible
|
||||||
@@ -42,6 +45,28 @@ Public Class MachineCNPageUC
|
|||||||
Else
|
Else
|
||||||
PowerGpBx.Visibility = Visibility.Collapsed
|
PowerGpBx.Visibility = Visibility.Collapsed
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' verifico che sia attiva la modalità per l'uso di due fotocamere
|
||||||
|
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||||
|
CameraHQ.Visibility = Visibility.Visible
|
||||||
|
CameraHQ.Header = "Photo on table"
|
||||||
|
CameraHQBtn.Content = "HQ"
|
||||||
|
' verifico quale camera è impostata
|
||||||
|
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||||
|
CameraHQBtn.IsChecked = True
|
||||||
|
If Not IsNothing(m_MainWindow.m_CadCutPageUC.PhotoIMG) Then
|
||||||
|
m_MainWindow.m_CadCutPageUC.PhotoIMG.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/icone-tagli-1HQ.png", UriKind.Relative))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CameraHQBtn.IsChecked = False
|
||||||
|
If Not IsNothing(m_MainWindow.m_CadCutPageUC.PhotoIMG) Then
|
||||||
|
m_MainWindow.m_CadCutPageUC.PhotoIMG.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/icone-tagli-1.png", UriKind.Relative))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CameraHQ.Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub TestingPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub TestingPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
@@ -51,6 +76,9 @@ Public Class MachineCNPageUC
|
|||||||
PartProgTransferGpBx.Visibility = Windows.Visibility.Hidden
|
PartProgTransferGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' gestione visuliazzazione ToggleButton Auto/Sinlge/Mdi/Manula/Home
|
||||||
|
SetCncMode()
|
||||||
|
|
||||||
'------ NUOVI BOTTONI ----------
|
'------ NUOVI BOTTONI ----------
|
||||||
' Lettura configurazione bottoni (per impostare l'uso del Joystick) da Ini di macchina
|
' Lettura configurazione bottoni (per impostare l'uso del Joystick) da Ini di macchina
|
||||||
m_ButtonPower.Clear()
|
m_ButtonPower.Clear()
|
||||||
@@ -98,6 +126,53 @@ Public Class MachineCNPageUC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetCncMode()
|
||||||
|
Dim Mode As Integer = m_nCurrMode
|
||||||
|
Select Case Mode
|
||||||
|
Case 0
|
||||||
|
' Auoto
|
||||||
|
MDIConfirmBtn.IsEnabled = False
|
||||||
|
AutoBtn.IsChecked = True
|
||||||
|
SingleBtn.IsChecked = False
|
||||||
|
MDIBtn.IsChecked = False
|
||||||
|
ManualBtn.IsChecked = False
|
||||||
|
HomeBtn.IsChecked = False
|
||||||
|
Case 1
|
||||||
|
' Single
|
||||||
|
MDIConfirmBtn.IsEnabled = False
|
||||||
|
AutoBtn.IsChecked = False
|
||||||
|
SingleBtn.IsChecked = True
|
||||||
|
MDIBtn.IsChecked = False
|
||||||
|
ManualBtn.IsChecked = False
|
||||||
|
HomeBtn.IsChecked = False
|
||||||
|
Case 2
|
||||||
|
' Mdi
|
||||||
|
MDIConfirmBtn.IsEnabled = True
|
||||||
|
AutoBtn.IsChecked = False
|
||||||
|
SingleBtn.IsChecked = False
|
||||||
|
MDIBtn.IsChecked = True
|
||||||
|
ManualBtn.IsChecked = False
|
||||||
|
HomeBtn.IsChecked = False
|
||||||
|
Case 7
|
||||||
|
' Manual
|
||||||
|
MDIConfirmBtn.IsEnabled = False
|
||||||
|
AutoBtn.IsChecked = False
|
||||||
|
SingleBtn.IsChecked = False
|
||||||
|
MDIBtn.IsChecked = False
|
||||||
|
ManualBtn.IsChecked = True
|
||||||
|
HomeBtn.IsChecked = False
|
||||||
|
Case 8
|
||||||
|
' Home
|
||||||
|
MDIConfirmBtn.IsEnabled = False
|
||||||
|
AutoBtn.IsChecked = False
|
||||||
|
SingleBtn.IsChecked = False
|
||||||
|
MDIBtn.IsChecked = False
|
||||||
|
ManualBtn.IsChecked = False
|
||||||
|
HomeBtn.IsChecked = True
|
||||||
|
End Select
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub StartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StartBtn.Click
|
Private Sub StartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StartBtn.Click
|
||||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||||
Dim sDBVarPath As String = ""
|
Dim sDBVarPath As String = ""
|
||||||
@@ -151,6 +226,20 @@ Public Class MachineCNPageUC
|
|||||||
m_CN.DGeneralFunctions_WriteCncMode(8)
|
m_CN.DGeneralFunctions_WriteCncMode(8)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CameraHQBtn_Click(sender As Object, e As RoutedEventArgs) Handles CameraHQBtn.Click
|
||||||
|
Dim sEnableHQ As String = If(CameraHQBtn.IsChecked, "1", "0")
|
||||||
|
WritePrivateProfileString(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, sEnableHQ, m_MainWindow.GetMachIniFile())
|
||||||
|
If CameraHQBtn.IsChecked Then
|
||||||
|
If Not IsNothing(m_MainWindow.m_CadCutPageUC.PhotoIMG) Then
|
||||||
|
m_MainWindow.m_CadCutPageUC.PhotoIMG.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/icone-tagli-1HQ.png", UriKind.Relative))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not IsNothing(m_MainWindow.m_CadCutPageUC.PhotoIMG) Then
|
||||||
|
m_MainWindow.m_CadCutPageUC.PhotoIMG.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/icone-tagli-1.png", UriKind.Relative))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub MDITxBx_KeyDown(sender As Object, e As KeyEventArgs) Handles MDITxBx.KeyDown
|
Private Sub MDITxBx_KeyDown(sender As Object, e As KeyEventArgs) Handles MDITxBx.KeyDown
|
||||||
If e.Key = Key.Return Then
|
If e.Key = Key.Return Then
|
||||||
' leggo se stato reset
|
' leggo se stato reset
|
||||||
@@ -278,4 +367,9 @@ Public Class MachineCNPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub CncModeChange(nMode As Integer)
|
||||||
|
m_nCurrMode = nMode
|
||||||
|
SetCncMode()
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -24,9 +24,10 @@
|
|||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
@@ -38,11 +39,16 @@
|
|||||||
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource DB-utensiliImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource DB-utensiliImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowToggleButton}"></ToggleButton>
|
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
||||||
<ToggleButton Name="TestingPageBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<!--<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton Name="WaterJetBtn" Grid.Column="4" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
||||||
|
<!--<Image Source="{DynamicResource WaterJetImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton Name="TestingPageBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
<ToggleButton Name="StatisticsBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
||||||
|
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Public Class MachinePageUC
|
|||||||
Friend m_ToolsDbPageUC As ToolsDbPageUC
|
Friend m_ToolsDbPageUC As ToolsDbPageUC
|
||||||
Friend m_MachiningDbPageUC As MachiningDbPageUC
|
Friend m_MachiningDbPageUC As MachiningDbPageUC
|
||||||
Friend m_PolishingsPageUC As PolishingsPageUC
|
Friend m_PolishingsPageUC As PolishingsPageUC
|
||||||
|
Friend m_WaterJetPageUC As WaterJetPageUC
|
||||||
Friend m_MachineCNPageUC As MachineCNPageUC
|
Friend m_MachineCNPageUC As MachineCNPageUC
|
||||||
Friend m_StatisticsPageUC As StatisticsPageUC
|
Friend m_StatisticsPageUC As StatisticsPageUC
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ Public Class MachinePageUC
|
|||||||
ToolsDb
|
ToolsDb
|
||||||
MachiningDb
|
MachiningDb
|
||||||
Polishings
|
Polishings
|
||||||
|
WaterJet
|
||||||
MachineCN
|
MachineCN
|
||||||
Statistics
|
Statistics
|
||||||
End Enum
|
End Enum
|
||||||
@@ -32,6 +34,7 @@ Public Class MachinePageUC
|
|||||||
m_ToolsDbPageUC = New ToolsDbPageUC
|
m_ToolsDbPageUC = New ToolsDbPageUC
|
||||||
m_MachiningDbPageUC = New MachiningDbPageUC
|
m_MachiningDbPageUC = New MachiningDbPageUC
|
||||||
m_PolishingsPageUC = New PolishingsPageUC
|
m_PolishingsPageUC = New PolishingsPageUC
|
||||||
|
m_WaterJetPageUC = New WaterJetPageUC
|
||||||
m_MachineCNPageUC = New MachineCNPageUC
|
m_MachineCNPageUC = New MachineCNPageUC
|
||||||
m_StatisticsPageUC = New StatisticsPageUC
|
m_StatisticsPageUC = New StatisticsPageUC
|
||||||
|
|
||||||
@@ -40,6 +43,7 @@ Public Class MachinePageUC
|
|||||||
m_ToolsDbPageUC.SetValue(Grid.RowProperty, 1)
|
m_ToolsDbPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
m_MachiningDbPageUC.SetValue(Grid.RowProperty, 1)
|
m_MachiningDbPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
m_PolishingsPageUC.SetValue(Grid.RowProperty, 1)
|
m_PolishingsPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_WaterJetPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
|
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
|
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
|
|
||||||
@@ -47,6 +51,7 @@ Public Class MachinePageUC
|
|||||||
ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
||||||
MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||||
PolishingsBtn.Content = EgtMsg(91090)
|
PolishingsBtn.Content = EgtMsg(91090)
|
||||||
|
WaterJetBtn.Content = EgtMsg(91128)
|
||||||
TestingPageBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
TestingPageBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
||||||
StatisticsBtn.Content = EgtMsg(90709)
|
StatisticsBtn.Content = EgtMsg(90709)
|
||||||
|
|
||||||
@@ -55,10 +60,14 @@ Public Class MachinePageUC
|
|||||||
m_ActiveMachinePage = MachinePages.Alarms
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
|
|
||||||
' Se lucidature non abilitate, disattivo la pagina DB lucidature
|
' Se lucidature non abilitate, disattivo la pagina DB lucidature
|
||||||
If Not m_MainWindow.m_CurrentMachine.bPolishing Then
|
If Not m_MainWindow.m_CurrentMachine.bPolishing Then
|
||||||
PolishingsBtn.IsEnabled = False
|
PolishingsBtn.IsEnabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not m_MainWindow.m_CurrentMachine.bWaterJet Or Not m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||||
|
WaterJetBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
' Se controllo numerico 0, disattivo la pagina macchina
|
' Se controllo numerico 0, disattivo la pagina macchina
|
||||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||||
TestingPageBtn.IsEnabled = False
|
TestingPageBtn.IsEnabled = False
|
||||||
@@ -134,6 +143,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.Alarms
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||||
|
AlarmsBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
AlarmsBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
AlarmsBtn.IsChecked = True
|
AlarmsBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -188,6 +213,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.ToolsDb
|
m_ActiveMachinePage = MachinePages.ToolsDb
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
'Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||||
|
ToolsDBBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
ToolsDBBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.ToolsDb
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
ToolsDBBtn.IsChecked = True
|
ToolsDBBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -242,6 +283,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.MachiningDb
|
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||||
|
MachiningDBBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
MachiningDBBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
MachiningDBBtn.IsChecked = True
|
MachiningDBBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -299,6 +356,22 @@ Public Class MachinePageUC
|
|||||||
m_ActiveMachinePage = MachinePages.Polishings
|
m_ActiveMachinePage = MachinePages.Polishings
|
||||||
Case MachinePages.Polishings
|
Case MachinePages.Polishings
|
||||||
PolishingsBtn.IsChecked = True
|
PolishingsBtn.IsChecked = True
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||||
|
PolishingsBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
PolishingsBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_PolishingsPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.Polishings
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
PolishingsBtn.IsChecked = True
|
PolishingsBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -314,6 +387,77 @@ Public Class MachinePageUC
|
|||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub WaterJetBtn_Click(sender As Object, e As RoutedEventArgs) Handles WaterJetBtn.Click
|
||||||
|
Select Case m_ActiveMachinePage
|
||||||
|
Case MachinePages.Alarms
|
||||||
|
AlarmsBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
MachinePageGrid.Children.Remove(m_AlarmsPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
'DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM).RefreshDImensionPage()
|
||||||
|
Case MachinePages.ToolsDb
|
||||||
|
' Verifica ed eventuale salvataggio utensile corrente
|
||||||
|
If Not m_ToolsDbPageUC.SaveCurrTool() Then
|
||||||
|
PolishingsBtn.IsChecked = False
|
||||||
|
ToolsDBBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' salvo il DB utensili
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
EgtTdbSave()
|
||||||
|
' passo alla pagina WaterJet
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
ToolsDBBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_ToolsDbPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
Case MachinePages.MachiningDb
|
||||||
|
' Verifica ed eventuale salvataggio lavorazione corrente
|
||||||
|
If Not m_MachiningDbPageUC.SaveCurrMachining() Then
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachiningDBBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' salvo il DB lavorazioni
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
EgtMdbSave()
|
||||||
|
' passo alla pagina WaterJet
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
MachiningDBBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_MachiningDbPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
Case MachinePages.Polishings
|
||||||
|
' Verifica ed eventuale salvataggio Lucidatura corrente
|
||||||
|
If Not m_PolishingsPageUC.SaveKit() Then
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
PolishingsBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' passo alla pagina WaterJet
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
PolishingsBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Case MachinePages.MachineCN
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
TestingPageBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_MachineCNPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
Case MachinePages.Statistics
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
StatisticsBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub TestingPageBtn_Checked(sender As Object, e As RoutedEventArgs) Handles TestingPageBtn.Checked
|
Private Sub TestingPageBtn_Checked(sender As Object, e As RoutedEventArgs) Handles TestingPageBtn.Checked
|
||||||
Select Case m_ActiveMachinePage
|
Select Case m_ActiveMachinePage
|
||||||
Case MachinePages.Alarms
|
Case MachinePages.Alarms
|
||||||
@@ -367,6 +511,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.MachineCN
|
m_ActiveMachinePage = MachinePages.MachineCN
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||||
|
TestingPageBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
TestingPageBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.MachineCN
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
TestingPageBtn.IsChecked = True
|
TestingPageBtn.IsChecked = True
|
||||||
Case MachinePages.Statistics
|
Case MachinePages.Statistics
|
||||||
@@ -431,6 +591,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.Statistics
|
m_ActiveMachinePage = MachinePages.Statistics
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||||
|
StatisticsBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
TestingPageBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.Statistics
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
StatisticsBtn.IsChecked = True
|
StatisticsBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -467,6 +643,19 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.Alarms
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Lucidatura corrente
|
||||||
|
'If Not m_PolishingsPageUC.SaveKit() Then
|
||||||
|
' AlarmsBtn.IsChecked = False
|
||||||
|
' PolishingsBtn.IsChecked = True
|
||||||
|
' Return
|
||||||
|
'End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
AlarmsBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
AlarmsBtn.IsChecked = True
|
AlarmsBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
|
|||||||
@@ -423,8 +423,8 @@
|
|||||||
|
|
||||||
<TextBlock Grid.Column="0" Name="ConsumptionNameTxBx" Text="A"
|
<TextBlock Grid.Column="0" Name="ConsumptionNameTxBx" Text="A"
|
||||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||||
<TextBlock Grid.Column="1" Name="ConsumptionTxBx" Text="25"
|
<TextBlock Grid.Column="1" Name="ConsumptionTxBx" Text="25.00"
|
||||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
Style="{StaticResource OmagCut_LowerBarValueTextBlock}" FontSize="22"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -248,16 +248,16 @@ Public Class MachineStatusUC
|
|||||||
dL3 = ptTip.z
|
dL3 = ptTip.z
|
||||||
End If
|
End If
|
||||||
' Visualizzazione
|
' Visualizzazione
|
||||||
Axis1TxBx.Text = LenToString(dL1, -3)
|
Axis1TxBx.Text = LenToString(dL1, -3, True)
|
||||||
Axis2TxBx.Text = LenToString(dL2, -3)
|
Axis2TxBx.Text = LenToString(dL2, -3, True)
|
||||||
Axis3TxBx.Text = LenToString(dL3, -3)
|
Axis3TxBx.Text = LenToString(dL3, -3, True)
|
||||||
Axis4TxBx.Text = DoubleToString(dR1, -3)
|
Axis4TxBx.Text = DoubleToString(dR1, -3)
|
||||||
Axis5TxBx.Text = DoubleToString(dR2, -3)
|
Axis5TxBx.Text = DoubleToString(dR2, -3)
|
||||||
If m_AxesNumber >= 6 Then Axis6TxBx.Text = DoubleToString(dA6, -3)
|
If m_AxesNumber >= 6 Then Axis6TxBx.Text = DoubleToString(dA6, -3)
|
||||||
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, -3)
|
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, -3, True)
|
||||||
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, -3)
|
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, -3, True)
|
||||||
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, -3)
|
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, -3, True)
|
||||||
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, -3)
|
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, -3, True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub DisplayPositionDelta()
|
Sub DisplayPositionDelta()
|
||||||
@@ -265,22 +265,28 @@ Public Class MachineStatusUC
|
|||||||
Dim dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10 As Double
|
Dim dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10 As Double
|
||||||
m_MainWindow.m_CNCommunication.GetAxesDeltas(dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10)
|
m_MainWindow.m_CNCommunication.GetAxesDeltas(dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10)
|
||||||
' Visualizzazione
|
' Visualizzazione
|
||||||
DeltaAxis1TxBx.Text = LenToString(dL1, -3)
|
DeltaAxis1TxBx.Text = LenToString(dL1, -3, True)
|
||||||
DeltaAxis2TxBx.Text = LenToString(dL2, -3)
|
DeltaAxis2TxBx.Text = LenToString(dL2, -3, True)
|
||||||
DeltaAxis3TxBx.Text = LenToString(dL3, -3)
|
DeltaAxis3TxBx.Text = LenToString(dL3, -3, True)
|
||||||
DeltaAxis4TxBx.Text = DoubleToString(dR1, -3)
|
DeltaAxis4TxBx.Text = DoubleToString(dR1, -3)
|
||||||
DeltaAxis5TxBx.Text = DoubleToString(dR2, -3)
|
DeltaAxis5TxBx.Text = DoubleToString(dR2, -3)
|
||||||
If m_AxesNumber >= 6 Then DeltaAxis6TxBx.Text = DoubleToString(dA6, -3)
|
If m_AxesNumber >= 6 Then DeltaAxis6TxBx.Text = DoubleToString(dA6, -3)
|
||||||
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, -3)
|
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, -3, True)
|
||||||
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, -3)
|
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, -3, True)
|
||||||
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, -3)
|
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, -3, True)
|
||||||
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, -3)
|
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, -3, True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub DisplayFeed()
|
Sub DisplayFeed()
|
||||||
Dim dRealFeed As Double = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
Dim dRealFeed As Double = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||||
|
' modifica richiesta 26/05/2023 da Rosario per cliente Lanzetta
|
||||||
|
If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||||
|
dRealFeed = m_CN.d_DInterpo_Prog_Feed
|
||||||
|
Else
|
||||||
|
dRealFeed = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||||
|
End If
|
||||||
'Feed = DoubleToString(dRealFeed, 0)
|
'Feed = DoubleToString(dRealFeed, 0)
|
||||||
FeedTxBx.Text = LenToString(dRealFeed, 0)
|
FeedTxBx.Text = LenToString(dRealFeed, 0, True)
|
||||||
'FeedOverride = DoubleToString(m_CN.d_DInterpo_Feed_override, 0) & "%"
|
'FeedOverride = DoubleToString(m_CN.d_DInterpo_Feed_override, 0) & "%"
|
||||||
Dim dFeedOverride As Double = m_CN.d_DInterpo_Feed_override
|
Dim dFeedOverride As Double = m_CN.d_DInterpo_Feed_override
|
||||||
FeedOverrideTxBx.Text = DoubleToString(dFeedOverride, 0) & "%"
|
FeedOverrideTxBx.Text = DoubleToString(dFeedOverride, 0) & "%"
|
||||||
@@ -302,8 +308,18 @@ Public Class MachineStatusUC
|
|||||||
Dim dSpindleOvr As Double
|
Dim dSpindleOvr As Double
|
||||||
' se attivi nuovi comandi MDI su siemens
|
' se attivi nuovi comandi MDI su siemens
|
||||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||||
dSpindlePower = m_CN.d_data(0)
|
|
||||||
dSpindleOvr = m_CN.d_data(1)
|
If m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||||
|
dSpindlePower = m_CN.d_spindle_power
|
||||||
|
'dSpindleOvr = If(m_CN.bPowerOvr > 0, m_CN.d_spindle_power / m_CN.bPowerOvr * 100, 0)
|
||||||
|
dSpindleOvr = m_CN.bPowerOvr
|
||||||
|
Else
|
||||||
|
' questo sistema è deprecabile dalla versione 2.6d2 (nuova gestione dei vettori)
|
||||||
|
dSpindlePower = m_CN.d_data(0)
|
||||||
|
dSpindleOvr = m_CN.d_data(1)
|
||||||
|
End If
|
||||||
|
ElseIf m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||||
|
dSpindlePower = m_CN.d_spindle_power / 1000
|
||||||
Else
|
Else
|
||||||
dSpindlePower = m_CN.d_spindle_power
|
dSpindlePower = m_CN.d_spindle_power
|
||||||
dSpindleOvr = If(m_CN.bPowerOvr > 0, m_CN.d_spindle_power / m_CN.bPowerOvr * 100, 0)
|
dSpindleOvr = If(m_CN.bPowerOvr > 0, m_CN.d_spindle_power / m_CN.bPowerOvr * 100, 0)
|
||||||
|
|||||||
@@ -246,7 +246,7 @@
|
|||||||
|
|
||||||
<TextBlock Name="SideAngleTxBl" Grid.Column="2" Grid.Row="3" Grid.RowSpan="3"
|
<TextBlock Name="SideAngleTxBl" Grid.Column="2" Grid.Row="3" Grid.RowSpan="3"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="3" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,15,0"
|
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="3" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,15,0" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="StepTypeTxBl" Grid.Column="0" Grid.Row="6" Grid.RowSpan="3"
|
<TextBlock Name="StepTypeTxBl" Grid.Column="0" Grid.Row="6" Grid.RowSpan="3"
|
||||||
@@ -576,7 +576,7 @@
|
|||||||
|
|
||||||
<TextBlock Name="ForwardAngleTxBl" Grid.Column="0" Grid.Row="6" Grid.RowSpan="3"
|
<TextBlock Name="ForwardAngleTxBl" Grid.Column="0" Grid.Row="6" Grid.RowSpan="3"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ForwardAngleTxBx" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3"
|
<EgtWPFLib:EgtTextBox Name="ForwardAngleTxBx" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
||||||
|
|
||||||
<Border Name="LiHoleBrd" Grid.Column="0" Grid.Row="9" Grid.ColumnSpan="4" Grid.RowSpan="6"
|
<Border Name="LiHoleBrd" Grid.Column="0" Grid.Row="9" Grid.ColumnSpan="4" Grid.RowSpan="6"
|
||||||
@@ -605,12 +605,12 @@
|
|||||||
|
|
||||||
<TextBlock Name="LpTurnsTxBl" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2"
|
<TextBlock Name="LpTurnsTxBl" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="LpTurnsTxBx" Grid.Column="1" Grid.Row="1"
|
<EgtWPFLib:EgtTextBox Name="LpTurnsTxBx" Grid.Column="1" Grid.Row="1" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
||||||
|
|
||||||
<TextBlock Name="HpTurnsTxBl" Grid.Column="2" Grid.Row="1"
|
<TextBlock Name="HpTurnsTxBl" Grid.Column="2" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="HpTurnsTxBx" Grid.Column="3" Grid.Row="1"
|
<EgtWPFLib:EgtTextBox Name="HpTurnsTxBx" Grid.Column="3" Grid.Row="1" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -725,7 +725,7 @@
|
|||||||
|
|
||||||
<TextBlock Name="SpeedTxBl" Grid.Column="0"
|
<TextBlock Name="SpeedTxBl" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1"
|
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_MachToolCalculatorTextBox}" />
|
Style="{DynamicResource OmagCut_MachToolCalculatorTextBox}" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -931,14 +931,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="11*"/>
|
<ColumnDefinition Width="10*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||||
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||||
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||||
|
<Button Name="ExportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||||
|
<Button Name="ImportBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Imports System.ComponentModel
|
|||||||
Imports OmagCUT.TreeViewItem
|
Imports OmagCUT.TreeViewItem
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib
|
Imports EgtWPFLib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class MachiningDbPageUC
|
Public Class MachiningDbPageUC
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ Public Class MachiningDbPageUC
|
|||||||
StepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39), EgtMsg(MSG_COMBOBOXPARAM + 40)}
|
StepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39), EgtMsg(MSG_COMBOBOXPARAM + 40)}
|
||||||
RouFinStepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39)}
|
RouFinStepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39)}
|
||||||
ExtCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44), EgtMsg(MSG_COMBOBOXPARAM + 45)}
|
ExtCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44), EgtMsg(MSG_COMBOBOXPARAM + 45)}
|
||||||
IntCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44)}
|
IntCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44), EgtMsg(90852)}
|
||||||
|
|
||||||
' Assegno array a combobox
|
' Assegno array a combobox
|
||||||
WorkSideCmBx.ItemsSource = WorkSide
|
WorkSideCmBx.ItemsSource = WorkSide
|
||||||
@@ -78,6 +79,8 @@ Public Class MachiningDbPageUC
|
|||||||
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 16)
|
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 16)
|
||||||
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
||||||
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
||||||
|
ExportBtn.Content = "Export"
|
||||||
|
ImportBtn.Content = "Import"
|
||||||
|
|
||||||
NameTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 1)
|
NameTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 1)
|
||||||
DepthTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 2)
|
DepthTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 2)
|
||||||
@@ -205,7 +208,7 @@ Public Class MachiningDbPageUC
|
|||||||
MillTool.Clear()
|
MillTool.Clear()
|
||||||
bFound = EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType)
|
bFound = EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType)
|
||||||
While bFound
|
While bFound
|
||||||
If nType = MCH_TY.MILL_STD Then MillTool.Add( sToolName)
|
If nType = MCH_TY.MILL_STD And sToolName.Trim.ToLower <> "probe" Then MillTool.Add(sToolName)
|
||||||
bFound = EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
|
bFound = EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
|
||||||
End While
|
End While
|
||||||
PocketTool.Clear()
|
PocketTool.Clear()
|
||||||
@@ -321,6 +324,193 @@ Public Class MachiningDbPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ExportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ExportBtn.Click
|
||||||
|
' contesto corrente
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
|
||||||
|
' creo lista lavorazioni per esportazione
|
||||||
|
Dim MachiningToExportList As New ObservableCollection(Of ImpExpMachiningFamily)
|
||||||
|
Dim Family As CathegoryItem
|
||||||
|
Dim Machining As CustomItem
|
||||||
|
For Each Family In MachiningsList
|
||||||
|
Dim ImpExpMachiningFamily As New ImpExpMachiningFamily(Family.Name, Family.nTType)
|
||||||
|
For Each Machining In Family.Items
|
||||||
|
ImpExpMachiningFamily.MachiningList.Add(New ImpExpMachiningItem(Machining.Name, False))
|
||||||
|
Next
|
||||||
|
MachiningToExportList.Add(ImpExpMachiningFamily)
|
||||||
|
Next
|
||||||
|
Dim ExportWndVM As New ImportExportMachiningWindowVM(MachiningToExportList, true)
|
||||||
|
Dim ExportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ExportWndVM)
|
||||||
|
|
||||||
|
ExportWnd.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ImoportBtn_Click() Handles ImportBtn.Click
|
||||||
|
' contesto corrente
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
' apro dialogo di scelta file
|
||||||
|
Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||||
|
.Title = EgtMsg(31161) & " " & EgtMsg(31163),
|
||||||
|
.DefaultExt = ".data",
|
||||||
|
.Filter = "Machinings (.data)|*.data",
|
||||||
|
.CheckFileExists = True,
|
||||||
|
.ValidateNames = True
|
||||||
|
}
|
||||||
|
If ImportFileDlg.ShowDialog() <> True Then Return
|
||||||
|
Dim ImportFilePath As String = ImportFileDlg.FileName
|
||||||
|
' recupero liste utensili da importare
|
||||||
|
Dim ImportFileMachiningNameList As String() = Nothing
|
||||||
|
Dim ImportFileMachiningFamilyList As Integer() = Nothing
|
||||||
|
If Not EgtMdbToBeImported(ImportFilePath, ImportFileMachiningNameList, ImportFileMachiningFamilyList) Then Return
|
||||||
|
' li inserisco in lista per finestra di scelta
|
||||||
|
Dim MachinigToImportList As New ObservableCollection(Of ImpExpMachiningFamily)
|
||||||
|
' creo famiglie di utensili in base a quelle trovate in lista importata
|
||||||
|
For MachiningIndex As Integer = 0 To ImportFileMachiningNameList.Count - 1
|
||||||
|
Dim MachiningName As String = ImportFileMachiningNameList(MachiningIndex)
|
||||||
|
Dim MachiningFamily As Integer = ImportFileMachiningFamilyList(MachiningIndex)
|
||||||
|
MachiningFamily = MachiningFamily And
|
||||||
|
(MCH_MY.DRILLING Or
|
||||||
|
MCH_MY.SAWING Or
|
||||||
|
MCH_MY.MILLING Or
|
||||||
|
MCH_MY.POCKETING Or
|
||||||
|
MCH_MY.MORTISING Or
|
||||||
|
MCH_MY.SAWROUGHING Or
|
||||||
|
MCH_MY.SAWFINISHING Or
|
||||||
|
MCH_MY.GENMACHINING Or
|
||||||
|
MCH_MY.CHISELING Or
|
||||||
|
MCH_MY.SURFROUGHING Or
|
||||||
|
MCH_MY.SURFFINISHING Or
|
||||||
|
MCH_MY.WATERJETTING)
|
||||||
|
Dim bFounded As Boolean = False
|
||||||
|
Dim MachinigToImportFamily As ImpExpMachiningFamily
|
||||||
|
For Each MachinigToImportFamily In MachinigToImportList
|
||||||
|
If (MachiningFamily = MachinigToImportFamily.FamilyType) Then
|
||||||
|
MachinigToImportFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
|
||||||
|
bFounded = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not bFounded Then
|
||||||
|
Dim NewFamily As New ImpExpMachiningFamily(GetMachiningFamilyName(MachiningFamily), MachiningFamily)
|
||||||
|
NewFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
|
||||||
|
MachinigToImportList.Add(NewFamily)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim ImportWndVM As New ImportExportMachiningWindowVM(MachinigToImportList, False, ImportFilePath, ImportFileMachiningNameList)
|
||||||
|
Dim ImportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ImportWndVM)
|
||||||
|
|
||||||
|
ImportWnd.ShowDialog()
|
||||||
|
' Aggiungo all'albero visualizzato gli utensili appena importati
|
||||||
|
If ImportWnd.OkResult Then
|
||||||
|
LoadImportedMachineMachinings(ImportWndVM.vsImported)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function AlreadyExist(MachiningName As String) As Boolean
|
||||||
|
Dim MachiningFamily As CathegoryItem
|
||||||
|
For Each MachiningFamily In MachiningsList
|
||||||
|
Dim MachiningItem As CustomItem
|
||||||
|
For Each MachiningItem In MachiningFamily.Items
|
||||||
|
If MachiningName = MachiningItem.Name Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetMachiningFamilyName(NewMachinigFamily As Integer) As String
|
||||||
|
Dim MachiningFamily As CathegoryItem
|
||||||
|
For Each MachiningFamily In MachiningsList
|
||||||
|
If NewMachinigFamily = MachiningFamily.nTType Then
|
||||||
|
Return MachiningFamily.Name
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return ""
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub LoadImportedMachineMachinings(vsImportedMachinings As String())
|
||||||
|
' Leggo tutte le lavorazioni presenti nella Macchina (quindi anche quelli appena importati).
|
||||||
|
Dim ActiveMachiningsFamilies() As MachiningsType = MyReadMachiningFamilies(m_MainWindow.m_CurrentMachine.sMachIniFile)
|
||||||
|
Dim MachiningsFamilyIndex As Integer = 0
|
||||||
|
Dim MachiningsFamilyItem As MachiningsType
|
||||||
|
For Each MachiningsFamilyItem In ActiveMachiningsFamilies
|
||||||
|
Dim FamilyTreeView As New CathegoryItem(MachiningsFamilyItem.Name, MachiningsFamilyItem.Id)
|
||||||
|
Dim MachiningFamilyItem = MachiningsList.FirstOrDefault(Function(MachiningFamily) MachiningsFamilyItem.Id = MachiningFamily.nTType)
|
||||||
|
If IsNothing(MachiningFamilyItem) Then
|
||||||
|
MachiningsList.Insert(MachiningsFamilyIndex, FamilyTreeView)
|
||||||
|
End If
|
||||||
|
Dim nType As Integer = 0
|
||||||
|
Dim MachiningName As String = String.Empty
|
||||||
|
Dim MachiningIndex As Integer = 0
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
Dim bFound As Boolean = EgtMdbGetFirstMachining(MachiningsFamilyItem.Id, MachiningName)
|
||||||
|
While bFound
|
||||||
|
Dim MachiningItem = MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName)
|
||||||
|
Dim bInList As Boolean = vsImportedMachinings.Contains(MachiningName)
|
||||||
|
If bInList Then
|
||||||
|
' Se una lavorazione è presente nella MachiningsList visualizzata ma nel contempo è nell'array vsImported
|
||||||
|
' vuol dire che è stata sovrascritta perciò la rimuovo
|
||||||
|
MachiningsList(MachiningsFamilyIndex).Items.Remove(MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName))
|
||||||
|
End If
|
||||||
|
If bInList OrElse IsNothing(MachiningItem) Then
|
||||||
|
' recupero tuuid
|
||||||
|
EgtMdbSetCurrMachining(MachiningName)
|
||||||
|
Dim sCurrMachTUUID As String = String.Empty
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sCurrMachTUUID)
|
||||||
|
' aggiungo la lavorazione importata
|
||||||
|
MachiningsList(MachiningsFamilyIndex).Items.Insert(MachiningIndex, New CustomItem(MachiningName, MachiningsFamilyItem.Id, ToolDbUtility.IsToolInDb(sCurrMachTUUID)))
|
||||||
|
' eventualmente evidezio l'ultimo elemento inserito (ERRORE: non espando l'albero)
|
||||||
|
'MachiningsList(MachiningsFamilyIndex).Items(MachiningIndex).IsSelected = True
|
||||||
|
End If
|
||||||
|
MachiningIndex += 1
|
||||||
|
bFound = EgtMdbGetNextMachining(MachiningsFamilyItem.Id, MachiningName)
|
||||||
|
End While
|
||||||
|
MachiningsFamilyIndex += 1
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function MyReadMachiningFamilies(sMachineIniPath As String) As MachiningsType()
|
||||||
|
Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
|
||||||
|
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Foratura e Taglio di lama nelle famiglie di lavorazioni attive è invertito
|
||||||
|
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWING, .Name = EgtMsg(31200 + 2)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.DRILLING, .Name = EgtMsg(31200 + 1)})
|
||||||
|
End If
|
||||||
|
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MILLING, .Name = EgtMsg(31200 + 3)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.POCKETING, .Name = EgtMsg(31200 + 4)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MORTISING, .Name = EgtMsg(31200 + 5)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWROUGHING, .Name = EgtMsg(31200 + 6)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWFINISHING, .Name = EgtMsg(31200 + 7)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_GENMACHINING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.GENMACHINING, .Name = EgtMsg(31200 + 8)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.CHISELING, .Name = EgtMsg(31200 + 9)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SURFFINISHING, .Name = EgtMsg(31211)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.WATERJETTING, .Name = EgtMsg(31210)})
|
||||||
|
End If
|
||||||
|
Return ActiveMachiningsFamiliesList.ToArray
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub InitializeMachiningFamily(bEnabled As Boolean, nFType As Integer, sFName As String)
|
Private Sub InitializeMachiningFamily(bEnabled As Boolean, nFType As Integer, sFName As String)
|
||||||
If Not bEnabled Then Return
|
If Not bEnabled Then Return
|
||||||
' Inserisco categoria ed eventuali elementi
|
' Inserisco categoria ed eventuali elementi
|
||||||
@@ -362,12 +552,15 @@ Public Class MachiningDbPageUC
|
|||||||
HeadSideCmBx.SelectedIndex = ToolInt - 1
|
HeadSideCmBx.SelectedIndex = ToolInt - 1
|
||||||
EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, ToolInt)
|
EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, ToolInt)
|
||||||
If LeadInTypeCmBx.Items.Count > 0 Then
|
If LeadInTypeCmBx.Items.Count > 0 Then
|
||||||
LeadInTypeCmBx.SelectedItem = LeadInTypeCmBx.Items(0)
|
LeadInTypeCmBx.SelectedItem = LeadInTypeCmBx.Items(0)
|
||||||
Else
|
Else
|
||||||
LeadInTypeCmBx.SelectedItem = Nothing
|
LeadInTypeCmBx.SelectedItem = Nothing
|
||||||
End If
|
End If
|
||||||
For Each LInType As IdNameStruct In LeadInTypeCmBx.Items
|
For Each LInType As IdNameStruct In LeadInTypeCmBx.Items
|
||||||
If ToolInt = LInType.Id Then LeadInTypeCmBx.SelectedItem = LInType
|
If ToolInt = LInType.Id Then
|
||||||
|
LeadInTypeCmBx.SelectedItem = LInType
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
EgtMdbGetCurrMachiningParam(MCH_MP.EXTLINKTYPE, ToolInt)
|
EgtMdbGetCurrMachiningParam(MCH_MP.EXTLINKTYPE, ToolInt)
|
||||||
ExtLinkTypeCmBx.SelectedIndex = ToolInt
|
ExtLinkTypeCmBx.SelectedIndex = ToolInt
|
||||||
@@ -515,7 +708,11 @@ Public Class MachiningDbPageUC
|
|||||||
' Lista materiali
|
' Lista materiali
|
||||||
m_MaterialsList.Clear()
|
m_MaterialsList.Clear()
|
||||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
||||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||||
|
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName, Material.SubId))
|
||||||
|
Else
|
||||||
|
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
||||||
If ToolString <> String.Empty Then
|
If ToolString <> String.Empty Then
|
||||||
@@ -523,14 +720,30 @@ Public Class MachiningDbPageUC
|
|||||||
Dim Index As Integer = 0
|
Dim Index As Integer = 0
|
||||||
For Each Material As MachiningMaterial In m_MaterialsList
|
For Each Material As MachiningMaterial In m_MaterialsList
|
||||||
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
||||||
|
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||||
Dim nParId As Integer = 0
|
Dim nParId As Integer = 0
|
||||||
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
Dim nSubParId As Integer = 0
|
||||||
StringToDouble(Param(1), Material.dMinThickness)
|
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||||
StringToDouble(Param(2), Material.dMaxThickness)
|
If StringToInt(SubParam(0), nParId) AndAlso nParId = Material.nId AndAlso SubParam.Count > 1 AndAlso
|
||||||
Material.VerifyIfActive()
|
StringToInt(SubParam(1), nSubParId) AndAlso nSubParId = Material.nSubId Then
|
||||||
Index += 1
|
|
||||||
|
StringToDouble(Param(1), Material.dMinThickness)
|
||||||
|
StringToDouble(Param(2), Material.dMaxThickness)
|
||||||
|
Material.VerifyIfActive()
|
||||||
|
Index += 1
|
||||||
|
Else
|
||||||
|
Material.VerifyIfActive()
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Material.VerifyIfActive()
|
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
||||||
|
|
||||||
|
StringToDouble(Param(1), Material.dMinThickness)
|
||||||
|
StringToDouble(Param(2), Material.dMaxThickness)
|
||||||
|
Material.VerifyIfActive()
|
||||||
|
Index += 1
|
||||||
|
Else
|
||||||
|
Material.VerifyIfActive()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -609,13 +822,13 @@ Public Class MachiningDbPageUC
|
|||||||
' Parmetri nascosti di svuotatura
|
' Parmetri nascosti di svuotatura
|
||||||
If nMachiningType = MCH_MY.POCKETING Then
|
If nMachiningType = MCH_MY.POCKETING Then
|
||||||
EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALOUT)
|
EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALOUT)
|
||||||
EgtMdbSetCurrMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
' EgtMdbSetCurrMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
||||||
Dim dToolDiam As Double = 100
|
Dim dToolDiam As Double = 100
|
||||||
If Not IsNothing(ToolCmBx.SelectedItem) Then
|
If Not IsNothing(ToolCmBx.SelectedItem) Then
|
||||||
EgtTdbSetCurrTool( ToolCmBx.SelectedItem.ToString())
|
EgtTdbSetCurrTool( ToolCmBx.SelectedItem.ToString())
|
||||||
EgtTdbGetCurrToolParam( MCH_TP.DIAM, dToolDiam)
|
EgtTdbGetCurrToolParam( MCH_TP.DIAM, dToolDiam)
|
||||||
End If
|
End If
|
||||||
EgtMdbSetCurrMachiningParam( MCH_MP.LITANG, 0.495 * dToolDiam)
|
EgtMdbSetCurrMachiningParam(MCH_MP.LITANG, 0.99 * dToolDiam)
|
||||||
EgtMdbSetCurrMachiningParam( MCH_MP.LIELEV, 2.0)
|
EgtMdbSetCurrMachiningParam( MCH_MP.LIELEV, 2.0)
|
||||||
End If
|
End If
|
||||||
' Parametri WaterJetting
|
' Parametri WaterJetting
|
||||||
@@ -684,8 +897,14 @@ Public Class MachiningDbPageUC
|
|||||||
' Scrivo stringa materiali da lista
|
' Scrivo stringa materiali da lista
|
||||||
Dim sMaterialString As String = String.Empty
|
Dim sMaterialString As String = String.Empty
|
||||||
For Each Material As MachiningMaterial In m_MaterialsList
|
For Each Material As MachiningMaterial In m_MaterialsList
|
||||||
If Material.bIsActive Then
|
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
If Material.bIsActive Then
|
||||||
|
sMaterialString += Material.nId.ToString & "." & Material.nSubId.ToString & "," & DoubleToString(Material.dMinThickness, 3) & "," & DoubleToString(Material.dMaxThickness, 3) & ";"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Material.bIsActive Then
|
||||||
|
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 3) & "," & DoubleToString(Material.dMaxThickness, 3) & ";"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
EgtMdbSetCurrMachiningParam(MCH_MP.SYSNOTES, sMaterialString)
|
EgtMdbSetCurrMachiningParam(MCH_MP.SYSNOTES, sMaterialString)
|
||||||
@@ -922,30 +1141,26 @@ Public Class MachiningDbPageUC
|
|||||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||||
If RowNum > 2 Then
|
If RowNum > 2 Then
|
||||||
|
' elimino eventuali righe in eccesso
|
||||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||||
Next
|
Next
|
||||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
|
||||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
|
||||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
|
||||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
|
||||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
|
||||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
|
||||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
|
||||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
|
||||||
ElseIf RowNum < 2 Then
|
ElseIf RowNum < 2 Then
|
||||||
' costruiso una riga in più da inserire
|
' costruiso una riga in più da inserire
|
||||||
Dim Row As New RowDefinition
|
Dim Row As New RowDefinition
|
||||||
TypeGrd.RowDefinitions.Add(Row)
|
TypeGrd.RowDefinitions.Add(Row)
|
||||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
|
||||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
|
||||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
|
||||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
|
||||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
|
||||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
|
||||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
|
||||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
|
||||||
End If
|
End If
|
||||||
|
LeadInTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||||
|
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||||
|
LeadInTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||||
|
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||||
|
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||||
|
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||||
|
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||||
|
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||||
|
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||||
|
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||||
|
|
||||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -1563,7 +1778,7 @@ Public Class MachiningDbPageUC
|
|||||||
StepTypeTxBl.Visibility = Windows.Visibility.Hidden
|
StepTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
StepTypeCmBx.Visibility = Windows.Visibility.Hidden
|
StepTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||||
SideBrd.SetValue(Grid.RowProperty, 9)
|
SideBrd.SetValue(Grid.RowProperty, 9)
|
||||||
SideBrd.Visibility = Windows.Visibility.Visible
|
SideBrd.Visibility = Windows.Visibility.Hidden
|
||||||
WorkSideTxBl.Visibility = Windows.Visibility.Hidden
|
WorkSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
WorkSideCmBx.Visibility = Windows.Visibility.Hidden
|
WorkSideCmBx.Visibility = Windows.Visibility.Hidden
|
||||||
HeadSideTxBl.Visibility = Windows.Visibility.Hidden
|
HeadSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -1575,15 +1790,22 @@ Public Class MachiningDbPageUC
|
|||||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||||
Next
|
Next
|
||||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
ElseIf RowNum < 2 Then
|
||||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
' costruiso una riga in più da inserire
|
||||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
Dim Row As New RowDefinition
|
||||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
TypeGrd.RowDefinitions.Add(Row)
|
||||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
|
||||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
|
||||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
|
||||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
|
||||||
End If
|
End If
|
||||||
|
LeadInTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||||
|
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||||
|
LeadInTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||||
|
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||||
|
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||||
|
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||||
|
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||||
|
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||||
|
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||||
|
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||||
|
|
||||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -2068,6 +2290,16 @@ Public Class MachiningDbPageUC
|
|||||||
|
|
||||||
Private Sub MaxThicknessTxBx_EgtClosed(sender As Object, e As EventArgs) Handles MaxThicknessTxBx.EgtClosed
|
Private Sub MaxThicknessTxBx_EgtClosed(sender As Object, e As EventArgs) Handles MaxThicknessTxBx.EgtClosed
|
||||||
Dim SelectedMaterial As MachiningMaterial = MaterialsList.SelectedItem
|
Dim SelectedMaterial As MachiningMaterial = MaterialsList.SelectedItem
|
||||||
|
Dim dMaxThick As Double = 0
|
||||||
|
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||||
|
' solo per water jet controllo lo spessore massimo ammissibile
|
||||||
|
dMaxThick = m_MainWindow.m_CurrentMachine.GetMaxThicknessCurrMaterial(SelectedMaterial.Name)
|
||||||
|
Dim dVal As Double
|
||||||
|
StringToLen(MaxThicknessTxBx.Text, dVal)
|
||||||
|
If dVal > dMaxThick Then
|
||||||
|
MaxThicknessTxBx.Text = LenToString(dMaxThick, 3)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
StringToLen(MaxThicknessTxBx.Text, SelectedMaterial.dMaxThickness)
|
StringToLen(MaxThicknessTxBx.Text, SelectedMaterial.dMaxThickness)
|
||||||
SelectedMaterial.VerifyIfActive()
|
SelectedMaterial.VerifyIfActive()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -2143,7 +2375,6 @@ Public Class MachiningDbPageUC
|
|||||||
Case MCH_MY.POCKETING
|
Case MCH_MY.POCKETING
|
||||||
LeadInTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
LeadInTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
||||||
{New IdNameStruct(MCH_POCK_LI.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
|
{New IdNameStruct(MCH_POCK_LI.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
|
||||||
New IdNameStruct(MCH_POCK_LI.GLIDE, EgtMsg(MSG_COMBOBOXPARAM + 48)),
|
|
||||||
New IdNameStruct(MCH_POCK_LI.ZIGZAG, EgtMsg(MSG_COMBOBOXPARAM + 38)),
|
New IdNameStruct(MCH_POCK_LI.ZIGZAG, EgtMsg(MSG_COMBOBOXPARAM + 38)),
|
||||||
New IdNameStruct(MCH_POCK_LI.HELIX, EgtMsg(MSG_COMBOBOXPARAM + 49))})
|
New IdNameStruct(MCH_POCK_LI.HELIX, EgtMsg(MSG_COMBOBOXPARAM + 49))})
|
||||||
LeadOutTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
LeadOutTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
||||||
@@ -2215,6 +2446,7 @@ Class MachiningMaterial
|
|||||||
Implements INotifyPropertyChanged
|
Implements INotifyPropertyChanged
|
||||||
|
|
||||||
Private m_nId As Integer
|
Private m_nId As Integer
|
||||||
|
Private m_nSubId As Integer
|
||||||
Private m_sName As String
|
Private m_sName As String
|
||||||
Private m_dMinThickness As Double
|
Private m_dMinThickness As Double
|
||||||
Private m_dMaxThickness As Double
|
Private m_dMaxThickness As Double
|
||||||
@@ -2226,6 +2458,12 @@ Class MachiningMaterial
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nSubId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nSubId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property Name As String
|
Public ReadOnly Property Name As String
|
||||||
Get
|
Get
|
||||||
Return m_sName
|
Return m_sName
|
||||||
@@ -2264,6 +2502,15 @@ Class MachiningMaterial
|
|||||||
m_bIsActive = False
|
m_bIsActive = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||||
|
m_nId = nId
|
||||||
|
m_nSubId = nSubId
|
||||||
|
m_sName = sName
|
||||||
|
m_dMinThickness = 0
|
||||||
|
m_dMaxThickness = 0
|
||||||
|
m_bIsActive = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub VerifyIfActive()
|
Public Sub VerifyIfActive()
|
||||||
Dim bIsActive As Boolean = ( m_dMaxThickness > m_dMinThickness + EPS_SMALL)
|
Dim bIsActive As Boolean = ( m_dMaxThickness > m_dMinThickness + EPS_SMALL)
|
||||||
If bIsActive <> m_bIsActive Then
|
If bIsActive <> m_bIsActive Then
|
||||||
|
|||||||
@@ -158,6 +158,9 @@
|
|||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
@@ -165,10 +168,12 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--Decrizione immagini-->
|
||||||
<Border Grid.Row="1" Grid.Column="1" Margin="10">
|
<Border Grid.Row="1" Grid.Column="1" Margin="10">
|
||||||
<Image Source="../Resources/Contour.png" Stretch="Uniform"/>
|
<Image Source="../Resources/Contour.png" Stretch="Uniform"/>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -178,24 +183,45 @@
|
|||||||
<Border Grid.Row="3" Grid.Column="1" Margin="10">
|
<Border Grid.Row="3" Grid.Column="1" Margin="10">
|
||||||
<Image Source="../Resources/ZigZagY.png" Stretch="Uniform"/>
|
<Image Source="../Resources/ZigZagY.png" Stretch="Uniform"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
<Border Grid.Row="4" Grid.Column="1" Margin="10">
|
||||||
|
<Image Source="../Resources/Spiral.png" Stretch="Uniform"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<TextBlock Name="MotionTxBl" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
<!--Titolazione colonne-->
|
||||||
<TextBlock Name="RepeatTxBl" Grid.Row="0" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
<TextBlock Name="MotionTxBl" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||||
<TextBlock Name="StepTxBl" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
<TextBlock Name="RepeatTxBl" Grid.Row="0" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||||
<TextBlock Name="OffSetTxBl" Grid.Row="0" Grid.Column="4" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
<TextBlock Name="StepTxBl" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||||
|
<TextBlock Name="OffSetTxBl" Grid.Row="0" Grid.Column="4" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||||
|
<TextBlock Name="RadiusTxBl" Grid.Row="0" Grid.Column="5" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||||
|
<TextBlock Name="DistanceTxBl" Grid.Row="0" Grid.Column="6" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||||
|
|
||||||
<EgtWPFLib:EgtTextBox Name="ContourTxBx" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<!--Contornatura-->
|
||||||
<EgtWPFLib:EgtTextBox Name="OffContourTxBx" Grid.Row="1" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<EgtWPFLib:EgtTextBox Name="ContourTxBx" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="OffContourTxBx" Grid.Row="1" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
|
||||||
<EgtWPFLib:EgtTextBox Name="ZigZagXTxBx" Grid.Row="2" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<!--Cammino orizzontale X-->
|
||||||
<EgtWPFLib:EgtTextBox Name="StepXTxBx" Grid.Row="2" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<EgtWPFLib:EgtTextBox Name="ZigZagXTxBx" Grid.Row="2" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OffZigZagXTxBx" Grid.Row="2" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<EgtWPFLib:EgtTextBox Name="StepXTxBx" Grid.Row="2" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="OffZigZagXTxBx" Grid.Row="2" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ZigZagYTxBx" Grid.Row="3" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<EgtWPFLib:EgtTextBox Name="RadiusXTxBx" Grid.Row="2" Grid.Column="5" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="StepYTxBx" Grid.Row="3" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<EgtWPFLib:EgtTextBox Name="DistanceXTxBx" Grid.Row="2" Grid.Column="6" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OffZigZagYTxBx" Grid.Row="3" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
|
||||||
|
|
||||||
<GroupBox Name="LiLoGpBx" Grid.Row="4" Grid.Column="1" Grid.RowSpan="2" Grid.ColumnSpan="3" Style="{DynamicResource OmagCut_GroupBox}">
|
<!--Cammino verticale Y-->
|
||||||
|
<EgtWPFLib:EgtTextBox Name="ZigZagYTxBx" Grid.Row="3" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="StepYTxBx" Grid.Row="3" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="OffZigZagYTxBx" Grid.Row="3" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="RadiusYTxBx" Grid.Row="3" Grid.Column="5" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="DistanceYTxBx" Grid.Row="3" Grid.Column="6" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||||
|
|
||||||
|
<!--Cammino a spirale-->
|
||||||
|
<EgtWPFLib:EgtTextBox Name="SpiralTxBx" Grid.Row="4" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="StepSpiralTxBx" Grid.Row="4" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="OffSpiralTxBx" Grid.Row="4" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="RadiusSpiralTxBx" Grid.Row="4" Grid.Column="5" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="DistanceSpiralTxBx" Grid.Row="4" Grid.Column="6" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
|
||||||
|
<!--Parametri di lavoro condivisi-->
|
||||||
|
<GroupBox Name="LiLoGpBx" Grid.Row="5" Grid.Column="1" Grid.RowSpan="2" Grid.ColumnSpan="5" Style="{DynamicResource OmagCut_GroupBox}">
|
||||||
<Grid Name="LiLoGrd">
|
<Grid Name="LiLoGrd">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
@@ -212,11 +238,11 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="LiLenTxBl" Grid.Row="1" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
<TextBlock Name="LiLenTxBl" Grid.Row="1" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="LiLenTxBx" Grid.Row="1" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<EgtWPFLib:EgtTextBox Name="LiLenTxBx" Grid.Row="1" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
<TextBlock Name="LiHeightTxBl" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
<TextBlock Name="LiHeightTxBl" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="LiHeightTxBx" Grid.Row="1" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<EgtWPFLib:EgtTextBox Name="LiHeightTxBx" Grid.Row="1" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
<TextBlock Name="LiLoadTxBl" Grid.Row="3" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
<TextBlock Name="LiLoadTxBl" Grid.Row="3" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="LiLoadTxBx" Grid.Row="3" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
<EgtWPFLib:EgtTextBox Name="LiLoadTxBx" Grid.Row="3" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|||||||
+427
-101
@@ -61,6 +61,8 @@ Public Class PolishingsPageUC
|
|||||||
RepeatTxBl.Text = EgtMsg(91093) ' Ripetizioni
|
RepeatTxBl.Text = EgtMsg(91093) ' Ripetizioni
|
||||||
StepTxBl.Text = EgtMsg(90787) ' Passo
|
StepTxBl.Text = EgtMsg(90787) ' Passo
|
||||||
OffSetTxBl.Text = EgtMsg(91089) ' Offset
|
OffSetTxBl.Text = EgtMsg(91089) ' Offset
|
||||||
|
RadiusTxBl.Text = EgtMsg(91139) ' Raggio
|
||||||
|
DistanceTxBl.Text = EgtMsg(91140) ' Distanza
|
||||||
LiLoGpBx.Header = EgtMsg(91094) ' Attacco/Uscita
|
LiLoGpBx.Header = EgtMsg(91094) ' Attacco/Uscita
|
||||||
LiLenTxBl.Text = EgtMsg(91097) ' Lunghezza
|
LiLenTxBl.Text = EgtMsg(91097) ' Lunghezza
|
||||||
LiHeightTxBl.Text = EgtMsg(91095) ' Altezza
|
LiHeightTxBl.Text = EgtMsg(91095) ' Altezza
|
||||||
@@ -452,7 +454,9 @@ Public Class PolishingsPageUC
|
|||||||
If KitMachItem.m_IsModifiedId OrElse KitMachItem.m_IsModifiedToolUUID OrElse KitMachItem.m_IsModifiedToolName OrElse KitMachItem.m_IsModifiedSelTool OrElse
|
If KitMachItem.m_IsModifiedId OrElse KitMachItem.m_IsModifiedToolUUID OrElse KitMachItem.m_IsModifiedToolName OrElse KitMachItem.m_IsModifiedSelTool OrElse
|
||||||
KitMachItem.m_IsModifiedActive OrElse KitMachItem.m_IsModifiedContour OrElse KitMachItem.m_IsModifiedOffCnt OrElse KitMachItem.m_IsModifiedZigZagX OrElse
|
KitMachItem.m_IsModifiedActive OrElse KitMachItem.m_IsModifiedContour OrElse KitMachItem.m_IsModifiedOffCnt OrElse KitMachItem.m_IsModifiedZigZagX OrElse
|
||||||
KitMachItem.m_IsModifiedOffZigZagX OrElse KitMachItem.m_IsModifiedZigZagY OrElse KitMachItem.m_IsModifiedStepX OrElse KitMachItem.m_IsModifiedStepY OrElse
|
KitMachItem.m_IsModifiedOffZigZagX OrElse KitMachItem.m_IsModifiedZigZagY OrElse KitMachItem.m_IsModifiedStepX OrElse KitMachItem.m_IsModifiedStepY OrElse
|
||||||
KitMachItem.m_IsModifiedOffZigZagY OrElse KitMachItem.m_IsModifiedLiLen OrElse KitMachItem.m_IsModifiedLiHeight OrElse KitMachItem.m_IsModifiedLiLoad Then
|
KitMachItem.m_IsModifiedOffZigZagY OrElse KitMachItem.m_IsModifiedSpiral OrElse KitMachItem.m_IsModifiedOffSpiral OrElse KitMachItem.m_IsModifiedStepSpiral OrElse
|
||||||
|
KitMachItem.m_IsModifiedRadiusSpiral OrElse KitMachItem.m_IsModifiedDistanceSpiral OrElse KitMachItem.m_IsModifiedLiLen OrElse KitMachItem.m_IsModifiedLiHeight OrElse
|
||||||
|
KitMachItem.m_IsModifiedLiLoad Then
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -476,10 +480,19 @@ Public Class PolishingsPageUC
|
|||||||
KitMachItem.m_IsModifiedOffCnt = False
|
KitMachItem.m_IsModifiedOffCnt = False
|
||||||
KitMachItem.m_IsModifiedZigZagX = False
|
KitMachItem.m_IsModifiedZigZagX = False
|
||||||
KitMachItem.m_IsModifiedOffZigZagX = False
|
KitMachItem.m_IsModifiedOffZigZagX = False
|
||||||
|
KitMachItem.m_IsModifiedRadiusX = False
|
||||||
|
KitMachItem.m_IsModifiedDistanceX = False
|
||||||
KitMachItem.m_IsModifiedZigZagY = False
|
KitMachItem.m_IsModifiedZigZagY = False
|
||||||
KitMachItem.m_IsModifiedOffZigZagY = False
|
KitMachItem.m_IsModifiedOffZigZagY = False
|
||||||
|
KitMachItem.m_IsModifiedRadiusY = False
|
||||||
|
KitMachItem.m_IsModifiedDistanceY = False
|
||||||
|
KitMachItem.m_IsModifiedSpiral = False
|
||||||
|
KitMachItem.m_IsModifiedOffSpiral = False
|
||||||
|
KitMachItem.m_IsModifiedRadiusSpiral = False
|
||||||
|
KitMachItem.m_IsModifiedDistanceSpiral = False
|
||||||
KitMachItem.m_IsModifiedStepX = False
|
KitMachItem.m_IsModifiedStepX = False
|
||||||
KitMachItem.m_IsModifiedStepY = False
|
KitMachItem.m_IsModifiedStepY = False
|
||||||
|
KitMachItem.m_IsModifiedStepSpiral = False
|
||||||
KitMachItem.m_IsModifiedLiLen = False
|
KitMachItem.m_IsModifiedLiLen = False
|
||||||
KitMachItem.m_IsModifiedLiHeight = False
|
KitMachItem.m_IsModifiedLiHeight = False
|
||||||
KitMachItem.m_IsModifiedLiLoad = False
|
KitMachItem.m_IsModifiedLiLoad = False
|
||||||
@@ -493,20 +506,29 @@ Public Class PolishingsPageUC
|
|||||||
OffContourTxBx.Text = LenToString(kmShow.dOffsetCnt, 3)
|
OffContourTxBx.Text = LenToString(kmShow.dOffsetCnt, 3)
|
||||||
ZigZagXTxBx.Text = kmShow.nZigZagX.ToString()
|
ZigZagXTxBx.Text = kmShow.nZigZagX.ToString()
|
||||||
OffZigZagXTxBx.Text = LenToString(kmShow.dOffZigZagX, 3)
|
OffZigZagXTxBx.Text = LenToString(kmShow.dOffZigZagX, 3)
|
||||||
StepXTxBx.Text = LenToString( kmShow.dStepX, 3)
|
StepXTxBx.Text = LenToString(kmShow.dStepX, 3)
|
||||||
|
RadiusXTxBx.Text = LenToString(kmShow.dRadiusX, 3)
|
||||||
|
DistanceXTxBx.Text = LenToString(kmShow.dDistanceX, 3)
|
||||||
ZigZagYTxBx.Text = kmShow.nZigZagY.ToString()
|
ZigZagYTxBx.Text = kmShow.nZigZagY.ToString()
|
||||||
OffZigZagYTxBx.Text = LenToString(kmShow.dOffZigZagY, 3)
|
OffZigZagYTxBx.Text = LenToString(kmShow.dOffZigZagY, 3)
|
||||||
StepYTxBx.Text = LenToString( kmShow.dStepY, 3)
|
StepYTxBx.Text = LenToString(kmShow.dStepY, 3)
|
||||||
LiLenTxBx.Text = LenToString( kmShow.dLiLen, 3)
|
RadiusYTxBx.Text = LenToString(kmShow.dRadiusY, 3)
|
||||||
LiHeightTxBx.Text = LenToString( kmShow.dLiHeight, 3)
|
DistanceYTxBx.Text = LenToString(kmShow.dDistanceY, 3)
|
||||||
LiLoadTxBx.Text = LenToString( kmShow.dLiLoad, 3)
|
SpiralTxBx.Text = kmShow.nSpiral.ToString()
|
||||||
|
StepSpiralTxBx.Text = LenToString(kmShow.dStepSpiral, 3)
|
||||||
|
OffSpiralTxBx.Text = LenToString(kmShow.dOffSpiral, 3)
|
||||||
|
RadiusSpiralTxBx.Text = LenToString(kmShow.dRadiusSpiral, 3)
|
||||||
|
DistanceSpiralTxBx.Text = LenToString(kmShow.dDistanceSpiral, 3)
|
||||||
|
LiLenTxBx.Text = LenToString(kmShow.dLiLen, 3)
|
||||||
|
LiHeightTxBx.Text = LenToString(kmShow.dLiHeight, 3)
|
||||||
|
LiLoadTxBx.Text = LenToString(kmShow.dLiLoad, 3)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub KitMachsLstBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles KitMachsLstBx.SelectionChanged
|
Private Sub KitMachsLstBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles KitMachsLstBx.SelectionChanged
|
||||||
Dim SelectedKitMach As KitMach = KitMachsLstBx.SelectedItem
|
Dim SelectedKitMach As KitMach = KitMachsLstBx.SelectedItem
|
||||||
If Not IsNothing(SelectedKitMach) Then
|
If Not IsNothing(SelectedKitMach) Then
|
||||||
' visualizzo i parametri relativi al KitMach selezionato
|
' visualizzo i parametri relativi al KitMach selezionato
|
||||||
ShowKitMach( SelectedKitMach)
|
ShowKitMach(SelectedKitMach)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -520,14 +542,16 @@ Public Class PolishingsPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OffContourTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffContourTxBx.EgtClosed
|
Private Sub OffContourTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffContourTxBx.EgtClosed
|
||||||
Dim nTemp As Integer = 0
|
Dim dTemp As Double = 0
|
||||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
nTemp = OffContourTxBx.Text
|
StringToLen(OffContourTxBx.Text, dTemp)
|
||||||
KitMachsLstBx.SelectedItem.dOffsetCnt = nTemp
|
KitMachsLstBx.SelectedItem.dOffsetCnt = dTemp
|
||||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffsetCnt = nTemp
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffsetCnt = dTemp
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "ZigZag X"
|
||||||
|
|
||||||
Private Sub ZigZagXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ZigZagXTxBx.EgtClosed
|
Private Sub ZigZagXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ZigZagXTxBx.EgtClosed
|
||||||
Dim nTemp As Integer = 0
|
Dim nTemp As Integer = 0
|
||||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
@@ -538,11 +562,11 @@ Public Class PolishingsPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OffZigZagXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffZigZagXTxBx.EgtClosed
|
Private Sub OffZigZagXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffZigZagXTxBx.EgtClosed
|
||||||
Dim nTemp As Integer = 0
|
Dim dTemp As Double = 0
|
||||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
nTemp = OffZigZagXTxBx.Text
|
StringToLen(OffZigZagXTxBx.Text, dTemp)
|
||||||
KitMachsLstBx.SelectedItem.dOffZigZagX = nTemp
|
KitMachsLstBx.SelectedItem.dOffZigZagX = dTemp
|
||||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagX = nTemp
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagX = dTemp
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -555,6 +579,28 @@ Public Class PolishingsPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RadiusXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RadiusXTxBx.EgtClosed
|
||||||
|
Dim dTemp As Double = 0
|
||||||
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
|
StringToLen(RadiusXTxBx.Text, dTemp)
|
||||||
|
KitMachsLstBx.SelectedItem.dRadiusX = dTemp
|
||||||
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dRadiusX = dTemp
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DistanceXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DistanceXTxBx.EgtClosed
|
||||||
|
Dim dTemp As Double = 0
|
||||||
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
|
StringToLen(DistanceXTxBx.Text, dTemp)
|
||||||
|
KitMachsLstBx.SelectedItem.dDistanceX = dTemp
|
||||||
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dDistanceX = dTemp
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ZigZag X
|
||||||
|
|
||||||
|
#Region "ZizZag Y"
|
||||||
|
|
||||||
Private Sub ZigZagYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ZigZagYTxBx.EgtClosed
|
Private Sub ZigZagYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ZigZagYTxBx.EgtClosed
|
||||||
Dim nTemp As Integer = 0
|
Dim nTemp As Integer = 0
|
||||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
@@ -565,11 +611,11 @@ Public Class PolishingsPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OffZigZagYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffZigZagYTxBx.EgtClosed
|
Private Sub OffZigZagYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffZigZagYTxBx.EgtClosed
|
||||||
Dim nTemp As Integer = 0
|
Dim dTemp As Double = 0
|
||||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
nTemp = OffZigZagYTxBx.Text
|
StringToLen(OffZigZagYTxBx.Text, dTemp)
|
||||||
KitMachsLstBx.SelectedItem.dOffZigZagY = nTemp
|
KitMachsLstBx.SelectedItem.dOffZigZagY = dTemp
|
||||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagY = nTemp
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagY = dTemp
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -582,6 +628,75 @@ Public Class PolishingsPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RadiusYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RadiusYTxBx.EgtClosed
|
||||||
|
Dim dTemp As Double = 0
|
||||||
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
|
StringToLen(RadiusYTxBx.Text, dTemp)
|
||||||
|
KitMachsLstBx.SelectedItem.dRadiusY = dTemp
|
||||||
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dRadiusY = dTemp
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DistanceYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DistanceYTxBx.EgtClosed
|
||||||
|
Dim dTemp As Double = 0
|
||||||
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
|
StringToLen(DistanceYTxBx.Text, dTemp)
|
||||||
|
KitMachsLstBx.SelectedItem.dDistanceY = dTemp
|
||||||
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dDistanceY = dTemp
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ZigZagY
|
||||||
|
|
||||||
|
#Region "Spirale"
|
||||||
|
|
||||||
|
Private Sub SpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles SpiralTxBx.EgtClosed
|
||||||
|
Dim nTemp As Integer = 0
|
||||||
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
|
nTemp = SpiralTxBx.Text
|
||||||
|
KitMachsLstBx.SelectedItem.nSpiral = nTemp
|
||||||
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).nSpiral = nTemp
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OffSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffSpiralTxBx.EgtClosed
|
||||||
|
Dim dTemp As Double = 0
|
||||||
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
|
StringToLen(OffSpiralTxBx.Text, dTemp)
|
||||||
|
KitMachsLstBx.SelectedItem.dOffSpiral = dTemp
|
||||||
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffSpiral = dTemp
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub StepSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepSpiralTxBx.EgtClosed
|
||||||
|
Dim dTemp As Double = 0
|
||||||
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
|
StringToLen(StepSpiralTxBx.Text, dTemp)
|
||||||
|
KitMachsLstBx.SelectedItem.dStepSpiral = dTemp
|
||||||
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dStepSpiral = dTemp
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RadiusSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RadiusSpiralTxBx.EgtClosed
|
||||||
|
Dim dTemp As Double = 0
|
||||||
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
|
StringToLen(RadiusSpiralTxBx.Text, dTemp)
|
||||||
|
KitMachsLstBx.SelectedItem.dRadiusSpiral = dTemp
|
||||||
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dRadiusSpiral = dTemp
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DistanceSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DistanceSpiralTxBx.EgtClosed
|
||||||
|
Dim dTemp As Double = 0
|
||||||
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
|
StringToLen(DistanceSpiralTxBx.Text, dTemp)
|
||||||
|
KitMachsLstBx.SelectedItem.dDistanceSpiral = dTemp
|
||||||
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dDistanceSpiral = dTemp
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Spirale
|
||||||
|
|
||||||
Private Sub LiLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles LiLenTxBx.EgtClosed
|
Private Sub LiLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles LiLenTxBx.EgtClosed
|
||||||
Dim dTemp As Double = 0
|
Dim dTemp As Double = 0
|
||||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
@@ -616,11 +731,11 @@ Public Class PolishingsPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ToolCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
Private Sub ToolCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
||||||
If Not IsNothing( KitMachsLstBx.SelectedItem) Then
|
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).SelTool = KitMachsLstBx.SelectedItem.SelTool
|
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).SelTool = KitMachsLstBx.SelectedItem.SelTool
|
||||||
If KitMachsLstBx.SelectedItem.SelTool >= 0 then
|
If KitMachsLstBx.SelectedItem.SelTool >= 0 Then
|
||||||
KitMachsLstBx.SelectedItem.sToolName = m_ToolList( KitMachsLstBx.SelectedItem.SelTool)
|
KitMachsLstBx.SelectedItem.sToolName = m_ToolList(KitMachsLstBx.SelectedItem.SelTool)
|
||||||
KitMachsLstBx.SelectedItem.sToolUUID = m_ToolUuidList( KitMachsLstBx.SelectedItem.SelTool)
|
KitMachsLstBx.SelectedItem.sToolUUID = m_ToolUuidList(KitMachsLstBx.SelectedItem.SelTool)
|
||||||
Else
|
Else
|
||||||
KitMachsLstBx.SelectedItem.sToolName = "---"
|
KitMachsLstBx.SelectedItem.sToolName = "---"
|
||||||
KitMachsLstBx.SelectedItem.sToolUUID = "---"
|
KitMachsLstBx.SelectedItem.sToolUUID = "---"
|
||||||
@@ -630,143 +745,176 @@ Public Class PolishingsPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ReadKitName( nKitIndex As Integer) As String
|
Private Function ReadKitName(nKitIndex As Integer) As String
|
||||||
' Leggo il nome del kit
|
' Leggo il nome del kit
|
||||||
Dim sKey As String = K_KIT & nKitIndex.ToString("D2")
|
Dim sKey As String = K_KIT & nKitIndex.ToString("D2")
|
||||||
Dim sName As String = ""
|
Dim sName As String = ""
|
||||||
GetPrivateProfileString( S_HEADER, sKey, "", sName, m_sKitFile)
|
GetPrivateProfileString(S_HEADER, sKey, "", sName, m_sKitFile)
|
||||||
Return sName
|
Return sName
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ReadKit( nKitIndex As Integer, removeFlag As Boolean, ByRef Kit As Kit) As Boolean
|
Private Function ReadKit(nKitIndex As Integer, removeFlag As Boolean, ByRef Kit As Kit) As Boolean
|
||||||
' Leggo il nome del kit
|
' Leggo il nome del kit
|
||||||
Dim sName As String = ReadKitName( nKitIndex)
|
Dim sName As String = ReadKitName(nKitIndex)
|
||||||
If String.IsNullOrWhiteSpace( sName) Then Return False
|
If String.IsNullOrWhiteSpace(sName) Then Return False
|
||||||
' Creo il kit
|
' Creo il kit
|
||||||
Kit = New Kit( If( removeFlag, nKitIndex - 1, nKitIndex), sName)
|
Kit = New Kit(If(removeFlag, nKitIndex - 1, nKitIndex), sName)
|
||||||
' Leggo le sue lavorazioni
|
' Leggo le sue lavorazioni
|
||||||
For nkitMachIndex As Integer = 1 To 100
|
For nkitMachIndex As Integer = 1 To 100
|
||||||
Dim kmItem As KitMach = Nothing
|
Dim kmItem As KitMach = Nothing
|
||||||
if ReadKitMach( sName, nkitMachIndex, kmItem) Then
|
If ReadKitMach(sName, nkitMachIndex, kmItem) Then
|
||||||
Kit.AddKitMach( kmItem)
|
Kit.AddKitMach(kmItem)
|
||||||
Else
|
Else
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
' Se non sono state trovate lavorazioni, ne aggiungo una standard
|
' Se non sono state trovate lavorazioni, ne aggiungo una standard
|
||||||
If Kit.KitMachList.Count() = 0 Then
|
If Kit.KitMachList.Count() = 0 Then
|
||||||
Kit.AddKitMach( New KitMach( 1))
|
Kit.AddKitMach(New KitMach(1))
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ReadKitMach( sKitName As String, nKitMachIndex As Integer, ByRef kmItem As KitMach) As Boolean
|
Private Function ReadKitMach(sKitName As String, nKitMachIndex As Integer, ByRef kmItem As KitMach) As Boolean
|
||||||
' Verifico esistenza lavorazione del kit
|
' Verifico esistenza lavorazione del kit
|
||||||
Dim sSect As String = S_KIT & "." & sKitName
|
Dim sSect As String = S_KIT & "." & sKitName
|
||||||
Dim sKeyInd As String = nkitMachIndex.ToString("D2") & "."
|
Dim sKeyInd As String = nKitMachIndex.ToString("D2") & "."
|
||||||
Dim sName As String = ""
|
Dim sName As String = ""
|
||||||
If GetPrivateProfileString( sSect, sKeyInd & K_TOOLNAME, "", sName, m_sKitFile) = 0 Then Return False
|
If GetPrivateProfileString(sSect, sKeyInd & K_TOOLNAME, "", sName, m_sKitFile) = 0 Then Return False
|
||||||
' Lettura completa
|
' Lettura completa
|
||||||
kmItem = New KitMach
|
kmItem = New KitMach
|
||||||
kmItem.sToolName = sName
|
kmItem.sToolName = sName
|
||||||
kmItem.nId = nkitMachIndex
|
kmItem.nId = nKitMachIndex
|
||||||
GetPrivateProfileString( sSect, sKeyInd & K_TOOL, "", kmItem.sToolUUID, m_sKitFile)
|
GetPrivateProfileString(sSect, sKeyInd & K_TOOL, "", kmItem.sToolUUID, m_sKitFile)
|
||||||
kmItem.bActive = ( GetPrivateProfileInt( sSect, sKeyInd & K_ACTIVE, 0, m_sKitFile) = 1)
|
kmItem.bActive = (GetPrivateProfileInt(sSect, sKeyInd & K_ACTIVE, 0, m_sKitFile) = 1)
|
||||||
kmItem.nContour = GetPrivateProfileInt(sSect, sKeyInd & K_CONTOUR, 0, m_sKitFile)
|
kmItem.nContour = GetPrivateProfileInt(sSect, sKeyInd & K_CONTOUR, 0, m_sKitFile)
|
||||||
kmItem.dOffsetCnt = GetPrivateProfileInt(sSect, sKeyInd & K_OFFSETCNT, 0, m_sKitFile)
|
kmItem.dOffsetCnt = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFSETCNT, 0, m_sKitFile)
|
||||||
kmItem.nZigZagX = GetPrivateProfileInt(sSect, sKeyInd & K_ZIGZAGX, 0, m_sKitFile)
|
kmItem.nZigZagX = GetPrivateProfileInt(sSect, sKeyInd & K_ZIGZAGX, 0, m_sKitFile)
|
||||||
kmItem.dOffZigZagX = GetPrivateProfileInt(sSect, sKeyInd & K_OFFZIGZAGX, 0, m_sKitFile)
|
kmItem.dOffZigZagX = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFZIGZAGX, 0, m_sKitFile)
|
||||||
kmItem.dStepX = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPX, 0, m_sKitFile)
|
kmItem.dStepX = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPX, 0, m_sKitFile)
|
||||||
|
kmItem.dRadiusX = GetPrivateProfileDouble(sSect, sKeyInd & K_RADIUSX, 0, m_sKitFile)
|
||||||
|
kmItem.dDistanceX = GetPrivateProfileDouble(sSect, sKeyInd & K_DISTANCEX, 0, m_sKitFile)
|
||||||
kmItem.nZigZagY = GetPrivateProfileInt(sSect, sKeyInd & K_ZIGZAGY, 0, m_sKitFile)
|
kmItem.nZigZagY = GetPrivateProfileInt(sSect, sKeyInd & K_ZIGZAGY, 0, m_sKitFile)
|
||||||
kmItem.dOffZigZagY = GetPrivateProfileInt(sSect, sKeyInd & K_OFFZIGZAGY, 0, m_sKitFile)
|
kmItem.dOffZigZagY = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFZIGZAGY, 0, m_sKitFile)
|
||||||
kmItem.dStepY = GetPrivateProfileDouble( sSect, sKeyInd & K_STEPY, 0, m_sKitFile)
|
kmItem.dStepY = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPY, 0, m_sKitFile)
|
||||||
kmItem.dLiLen = GetPrivateProfileDouble( sSect, sKeyInd & K_LILEN, 0, m_sKitFile)
|
kmItem.dRadiusY = GetPrivateProfileDouble(sSect, sKeyInd & K_RADIUSY, 0, m_sKitFile)
|
||||||
kmItem.dLiHeight = GetPrivateProfileDouble( sSect, sKeyInd & K_LIHEIGHT, 0, m_sKitFile)
|
kmItem.dDistanceY = GetPrivateProfileDouble(sSect, sKeyInd & K_DISTANCEY, 0, m_sKitFile)
|
||||||
kmItem.dLiLoad = GetPrivateProfileDouble( sSect, sKeyInd & K_LILOAD, 0, m_sKitFile)
|
|
||||||
|
kmItem.nSpiral = GetPrivateProfileInt(sSect, sKeyInd & K_SPIRAL, 0, m_sKitFile)
|
||||||
|
kmItem.dOffSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFSPIRAL, 0, m_sKitFile)
|
||||||
|
kmItem.dStepSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPSPIRAL, 0, m_sKitFile)
|
||||||
|
kmItem.dRadiusSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_RADIUSSPIRAL, 0, m_sKitFile)
|
||||||
|
kmItem.dDistanceSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_DISTANCESPIRAL, 0, m_sKitFile)
|
||||||
|
|
||||||
|
kmItem.dLiLen = GetPrivateProfileDouble(sSect, sKeyInd & K_LILEN, 0, m_sKitFile)
|
||||||
|
kmItem.dLiHeight = GetPrivateProfileDouble(sSect, sKeyInd & K_LIHEIGHT, 0, m_sKitFile)
|
||||||
|
kmItem.dLiLoad = GetPrivateProfileDouble(sSect, sKeyInd & K_LILOAD, 0, m_sKitFile)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function WriteKitName( nKitIndex As Integer, sKitName As String) As Boolean
|
Friend Function WriteKitName(nKitIndex As Integer, sKitName As String) As Boolean
|
||||||
Dim sKey As String = K_KIT & nKitIndex.ToString("D2")
|
Dim sKey As String = K_KIT & nKitIndex.ToString("D2")
|
||||||
Return WritePrivateProfileString( S_HEADER, sKey, sKitName, m_sKitFile)
|
Return WritePrivateProfileString(S_HEADER, sKey, sKitName, m_sKitFile)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function WriteKitMach( nKitIndex As Integer, nKitMachIndex As Integer, kmItem As KitMach) As Boolean
|
Private Function WriteKitMach(nKitIndex As Integer, nKitMachIndex As Integer, kmItem As KitMach) As Boolean
|
||||||
' Leggo il nome del kit
|
' Leggo il nome del kit
|
||||||
Dim sKitName As String = ReadKitName( nKitIndex)
|
Dim sKitName As String = ReadKitName(nKitIndex)
|
||||||
If String.IsNullOrWhiteSpace( sKitName) Then Return False
|
If String.IsNullOrWhiteSpace(sKitName) Then Return False
|
||||||
' Sezione
|
' Sezione
|
||||||
Dim sSect As String = S_KIT & "." & sKitName
|
Dim sSect As String = S_KIT & "." & sKitName
|
||||||
' Indice
|
' Indice
|
||||||
Dim sKeyInd As String = nKitMachIndex.ToString("D2") & "."
|
Dim sKeyInd As String = nKitMachIndex.ToString("D2") & "."
|
||||||
' Scrivo i dati della lavorazione
|
' Scrivo i dati della lavorazione
|
||||||
If Not IsNothing( kmItem) Then
|
If Not IsNothing(kmItem) Then
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOL, kmItem.sToolUUID, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_TOOL, kmItem.sToolUUID, m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOLNAME, kmItem.sToolName, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_TOOLNAME, kmItem.sToolName, m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_ACTIVE, If( kmItem.bActive, "1", "0"), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_ACTIVE, If(kmItem.bActive, "1", "0"), m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_CONTOUR, kmItem.nContour.ToString(), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_CONTOUR, kmItem.nContour.ToString(), m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, kmItem.dOffsetCnt.ToString(), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, DoubleToString(kmItem.dOffsetCnt, 3), m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGX, kmItem.nZigZagX.ToString(), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGX, kmItem.nZigZagX.ToString(), m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, kmItem.dOffZigZagX.ToString(), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, DoubleToString(kmItem.dOffZigZagX.ToString, 3), m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPX, DoubleToString( kmItem.dStepX, 3), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_STEPX, DoubleToString(kmItem.dStepX, 3), m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSX, DoubleToString(kmItem.dRadiusX, 3), m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEX, DoubleToString(kmItem.dDistanceX, 3), m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGY, kmItem.nZigZagY.ToString(), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGY, kmItem.nZigZagY.ToString(), m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, kmItem.dOffZigZagY.ToString(), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, DoubleToString(kmItem.dOffZigZagY, 3), m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPY, DoubleToString( kmItem.dStepY, 3), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_STEPY, DoubleToString(kmItem.dStepY, 3), m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_LILEN, DoubleToString( kmItem.dLiLen, 3), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSY, DoubleToString(kmItem.dRadiusY, 3), m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_LIHEIGHT, DoubleToString( kmItem.dLiHeight, 3), m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEY, DoubleToString(kmItem.dDistanceY, 3), m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_LILOAD, DoubleToString( kmItem.dLiLoad, 3), m_sKitFile)
|
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_SPIRAL, kmItem.nSpiral.ToString(), m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_OFFSPIRAL, DoubleToString(kmItem.dOffSpiral.ToString, 3), m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_STEPSPIRAL, DoubleToString(kmItem.dStepSpiral, 3), m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSSPIRAL, DoubleToString(kmItem.dRadiusSpiral, 3), m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCESPIRAL, DoubleToString(kmItem.dDistanceSpiral, 3), m_sKitFile)
|
||||||
|
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_LILEN, DoubleToString(kmItem.dLiLen, 3), m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_LIHEIGHT, DoubleToString(kmItem.dLiHeight, 3), m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_LILOAD, DoubleToString(kmItem.dLiLoad, 3), m_sKitFile)
|
||||||
Else
|
Else
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOL, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_TOOL, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOLNAME, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_TOOLNAME, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_ACTIVE, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_ACTIVE, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_CONTOUR, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_CONTOUR, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGX, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGX, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPX, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_STEPX, Nothing, m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSX, Nothing, m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEX, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGY, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGY, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPY, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_STEPY, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_LILEN, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSY, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_LIHEIGHT, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEY, Nothing, m_sKitFile)
|
||||||
WritePrivateProfileString( sSect, sKeyInd & K_LILOAD, Nothing, m_sKitFile)
|
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_SPIRAL, Nothing, m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_OFFSPIRAL, Nothing, m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_STEPSPIRAL, Nothing, m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSSPIRAL, Nothing, m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCESPIRAL, Nothing, m_sKitFile)
|
||||||
|
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_LILEN, Nothing, m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_LIHEIGHT, Nothing, m_sKitFile)
|
||||||
|
WritePrivateProfileString(sSect, sKeyInd & K_LILOAD, Nothing, m_sKitFile)
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function EraseKit( nKitIndex As Integer) As Boolean
|
Private Function EraseKit(nKitIndex As Integer) As Boolean
|
||||||
' Leggo il nome del kit
|
' Leggo il nome del kit
|
||||||
Dim sKitName As String = ReadKitName( nKitIndex)
|
Dim sKitName As String = ReadKitName(nKitIndex)
|
||||||
If String.IsNullOrWhiteSpace( sKitName) Then Return False
|
If String.IsNullOrWhiteSpace(sKitName) Then Return False
|
||||||
' Lo elimino dalla lista dei kit scalando tutti di una posizione e eliminando l'ultimo
|
' Lo elimino dalla lista dei kit scalando tutti di una posizione e eliminando l'ultimo
|
||||||
Dim nNextKitIndex As Integer = nKitIndex + 1
|
Dim nNextKitIndex As Integer = nKitIndex + 1
|
||||||
Dim sNextKitName As String = ReadKitName( nNextKitIndex)
|
Dim sNextKitName As String = ReadKitName(nNextKitIndex)
|
||||||
while Not String.IsNullOrWhiteSpace( sNextKitName)
|
While Not String.IsNullOrWhiteSpace(sNextKitName)
|
||||||
WriteKitName( nNextKitIndex - 1, sNextKitName)
|
WriteKitName(nNextKitIndex - 1, sNextKitName)
|
||||||
nNextKitIndex += 1
|
nNextKitIndex += 1
|
||||||
sNextKitName = ReadKitName( nNextKitIndex)
|
sNextKitName = ReadKitName(nNextKitIndex)
|
||||||
End While
|
End While
|
||||||
WriteKitName( nNextKitIndex - 1, Nothing)
|
WriteKitName(nNextKitIndex - 1, Nothing)
|
||||||
' Sezione
|
' Sezione
|
||||||
Dim sSect As String = S_KIT & "." & sKitName
|
Dim sSect As String = S_KIT & "." & sKitName
|
||||||
' Cancello tutte le lavorazioni del kit
|
' Cancello tutte le lavorazioni del kit
|
||||||
WritePrivateProfileString( sSect, Nothing, Nothing, m_sKitFile)
|
WritePrivateProfileString(sSect, Nothing, Nothing, m_sKitFile)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function EraseKitMach( nKitIndex As Integer, nKitMachIndex As Integer) As Boolean
|
Private Function EraseKitMach(nKitIndex As Integer, nKitMachIndex As Integer) As Boolean
|
||||||
' Leggo il nome del kit
|
' Leggo il nome del kit
|
||||||
Dim sKitName As String = ReadKitName( nKitIndex)
|
Dim sKitName As String = ReadKitName(nKitIndex)
|
||||||
If String.IsNullOrWhiteSpace( sKitName) Then Return False
|
If String.IsNullOrWhiteSpace(sKitName) Then Return False
|
||||||
' Lo elimino dali KitMach scalando tutti di una posizione e eliminando l'ultimo
|
' Lo elimino dali KitMach scalando tutti di una posizione e eliminando l'ultimo
|
||||||
Dim kmCurr As KitMach = Nothing
|
Dim kmCurr As KitMach = Nothing
|
||||||
Dim nNextKitMachIndex As Integer = nKitMachIndex + 1
|
Dim nNextKitMachIndex As Integer = nKitMachIndex + 1
|
||||||
While ReadKitMach( sKitName, nNextKitMachIndex, kmCurr)
|
While ReadKitMach(sKitName, nNextKitMachIndex, kmCurr)
|
||||||
kmCurr.nId = nNextKitMachIndex - 1
|
kmCurr.nId = nNextKitMachIndex - 1
|
||||||
WriteKitMach( nKitIndex, nNextKitMachIndex - 1, kmCurr)
|
WriteKitMach(nKitIndex, nNextKitMachIndex - 1, kmCurr)
|
||||||
nNextKitMachIndex += 1
|
nNextKitMachIndex += 1
|
||||||
End While
|
End While
|
||||||
WriteKitMach( nKitIndex, nNextKitMachIndex - 1, Nothing)
|
WriteKitMach(nKitIndex, nNextKitMachIndex - 1, Nothing)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -804,7 +952,7 @@ Class Kit
|
|||||||
Get
|
Get
|
||||||
Return m_nId
|
Return m_nId
|
||||||
End Get
|
End Get
|
||||||
Set( value As Integer)
|
Set(value As Integer)
|
||||||
m_nId = value
|
m_nId = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -824,7 +972,7 @@ Class Kit
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Sub New( nId As Integer, sName As String)
|
Sub New(nId As Integer, sName As String)
|
||||||
m_nId = nId
|
m_nId = nId
|
||||||
m_sName = sName
|
m_sName = sName
|
||||||
|
|
||||||
@@ -832,21 +980,21 @@ Class Kit
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New( nId As Integer, sName As String, kitSou As Kit)
|
Sub New(nId As Integer, sName As String, kitSou As Kit)
|
||||||
m_nId = nId
|
m_nId = nId
|
||||||
m_sName = sName
|
m_sName = sName
|
||||||
|
|
||||||
m_KitMachList = New List(Of KitMach)
|
m_KitMachList = New List(Of KitMach)
|
||||||
|
|
||||||
If IsNothing( kitSou) Then Return
|
If IsNothing(kitSou) Then Return
|
||||||
|
|
||||||
For Each kmItem As KitMach In kitSou.m_KitMachList
|
For Each kmItem As KitMach In kitSou.m_KitMachList
|
||||||
AddKitMach( kmItem)
|
AddKitMach(kmItem)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub AddKitMach( kitMachItem As KitMach)
|
Sub AddKitMach(kitMachItem As KitMach)
|
||||||
m_KitMachList.Add(kitMachItem)
|
m_KitMachList.Add(kitMachItem)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -862,15 +1010,29 @@ Class KitMach
|
|||||||
Private m_sToolName As String
|
Private m_sToolName As String
|
||||||
Private m_SelTool As Integer
|
Private m_SelTool As Integer
|
||||||
Friend Shared m_ToolList As List(Of String)
|
Friend Shared m_ToolList As List(Of String)
|
||||||
|
|
||||||
Private m_bActive As Boolean
|
Private m_bActive As Boolean
|
||||||
Private m_nContour As Integer
|
Private m_nContour As Integer
|
||||||
Private m_dOffsetCnt As Double
|
Private m_dOffsetCnt As Double
|
||||||
|
|
||||||
Private m_nZigZagX As Integer
|
Private m_nZigZagX As Integer
|
||||||
Private m_dStepX As Double
|
Private m_dStepX As Double
|
||||||
Private m_dOffZigZagX As Double
|
Private m_dOffZigZagX As Double
|
||||||
|
Private m_dRadiusX As Double
|
||||||
|
Private m_dDistanceX As Double
|
||||||
|
|
||||||
Private m_nZigZagY As Integer
|
Private m_nZigZagY As Integer
|
||||||
Private m_dStepY As Double
|
Private m_dStepY As Double
|
||||||
Private m_dOffZigZagY As Double
|
Private m_dOffZigZagY As Double
|
||||||
|
Private m_dRadiusY As Double
|
||||||
|
Private m_dDistanceY As Double
|
||||||
|
|
||||||
|
Private m_nSpiral As Integer
|
||||||
|
Private m_dOffSpiral As Double
|
||||||
|
Private m_dStepSpiral As Double
|
||||||
|
Private m_dRadiusSpiral As Double
|
||||||
|
Private m_dDistanceSpiral As Double
|
||||||
|
|
||||||
Private m_dLiLen As Double
|
Private m_dLiLen As Double
|
||||||
Private m_dLiHeight As Double
|
Private m_dLiHeight As Double
|
||||||
Private m_dLiLoad As Double
|
Private m_dLiLoad As Double
|
||||||
@@ -958,6 +1120,8 @@ Class KitMach
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#Region "Contorno"
|
||||||
|
|
||||||
Public m_IsModifiedActive As Boolean = False
|
Public m_IsModifiedActive As Boolean = False
|
||||||
Public Property bActive As Boolean
|
Public Property bActive As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -985,11 +1149,11 @@ Class KitMach
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public m_IsModifiedOffCnt As Boolean = False
|
Public m_IsModifiedOffCnt As Boolean = False
|
||||||
Public Property dOffsetCnt As Integer
|
Public Property dOffsetCnt As Double
|
||||||
Get
|
Get
|
||||||
Return m_dOffsetCnt
|
Return m_dOffsetCnt
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Double)
|
||||||
If value <> m_dOffsetCnt Then
|
If value <> m_dOffsetCnt Then
|
||||||
m_dOffsetCnt = value
|
m_dOffsetCnt = value
|
||||||
m_IsModifiedOffCnt = True
|
m_IsModifiedOffCnt = True
|
||||||
@@ -997,6 +1161,10 @@ Class KitMach
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Contorno
|
||||||
|
|
||||||
|
#Region "ZigZag X"
|
||||||
|
|
||||||
Public m_IsModifiedZigZagX As Boolean = False
|
Public m_IsModifiedZigZagX As Boolean = False
|
||||||
Public Property nZigZagX As Integer
|
Public Property nZigZagX As Integer
|
||||||
Get
|
Get
|
||||||
@@ -1011,11 +1179,11 @@ Class KitMach
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public m_IsModifiedOffZigZagX As Boolean = False
|
Public m_IsModifiedOffZigZagX As Boolean = False
|
||||||
Public Property dOffZigZagX As Integer
|
Public Property dOffZigZagX As Double
|
||||||
Get
|
Get
|
||||||
Return m_dOffZigZagX
|
Return m_dOffZigZagX
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Double)
|
||||||
If value <> m_dOffZigZagX Then
|
If value <> m_dOffZigZagX Then
|
||||||
m_dOffZigZagX = value
|
m_dOffZigZagX = value
|
||||||
m_IsModifiedOffZigZagX = True
|
m_IsModifiedOffZigZagX = True
|
||||||
@@ -1036,6 +1204,36 @@ Class KitMach
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public m_IsModifiedRadiusX As Boolean = False
|
||||||
|
Public Property dRadiusX As Double
|
||||||
|
Get
|
||||||
|
Return m_dRadiusX
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
If value <> m_dRadiusX Then
|
||||||
|
m_dRadiusX = value
|
||||||
|
m_IsModifiedRadiusX = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public m_IsModifiedDistanceX As Boolean = False
|
||||||
|
Public Property dDistanceX As Double
|
||||||
|
Get
|
||||||
|
Return m_dDistanceX
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
If value <> m_dDistanceX Then
|
||||||
|
m_dDistanceX = value
|
||||||
|
m_IsModifiedDistanceX = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' ZigZag X
|
||||||
|
|
||||||
|
#Region "ZigZag Y"
|
||||||
|
|
||||||
Public m_IsModifiedZigZagY As Boolean = False
|
Public m_IsModifiedZigZagY As Boolean = False
|
||||||
Public Property nZigZagY As Integer
|
Public Property nZigZagY As Integer
|
||||||
Get
|
Get
|
||||||
@@ -1050,11 +1248,11 @@ Class KitMach
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public m_IsModifiedOffZigZagY As Boolean = False
|
Public m_IsModifiedOffZigZagY As Boolean = False
|
||||||
Public Property dOffZigZagY As Integer
|
Public Property dOffZigZagY As Double
|
||||||
Get
|
Get
|
||||||
Return m_dOffZigZagY
|
Return m_dOffZigZagY
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Double)
|
||||||
If value <> m_dOffZigZagY Then
|
If value <> m_dOffZigZagY Then
|
||||||
m_dOffZigZagY = value
|
m_dOffZigZagY = value
|
||||||
m_IsModifiedOffZigZagY = True
|
m_IsModifiedOffZigZagY = True
|
||||||
@@ -1075,6 +1273,105 @@ Class KitMach
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public m_IsModifiedRadiusY As Boolean = False
|
||||||
|
Public Property dRadiusY As Double
|
||||||
|
Get
|
||||||
|
Return m_dRadiusY
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
If value <> m_dRadiusY Then
|
||||||
|
m_dRadiusY = value
|
||||||
|
m_IsModifiedRadiusY = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public m_IsModifiedDistanceY As Boolean = False
|
||||||
|
Public Property dDistanceY As Double
|
||||||
|
Get
|
||||||
|
Return m_dDistanceY
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
If value <> m_dDistanceY Then
|
||||||
|
m_dDistanceY = value
|
||||||
|
m_IsModifiedDistanceY = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' ZigZag Y
|
||||||
|
|
||||||
|
#Region "Spirale"
|
||||||
|
|
||||||
|
Public m_IsModifiedSpiral As Boolean = False
|
||||||
|
Public Property nSpiral As Integer
|
||||||
|
Get
|
||||||
|
Return m_nSpiral
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
If value <> m_nSpiral Then
|
||||||
|
m_nSpiral = value
|
||||||
|
m_IsModifiedSpiral = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public m_IsModifiedOffSpiral As Boolean = False
|
||||||
|
Public Property dOffSpiral As Double
|
||||||
|
Get
|
||||||
|
Return m_dOffSpiral
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
If value <> m_dOffSpiral Then
|
||||||
|
m_dOffSpiral = value
|
||||||
|
m_IsModifiedOffSpiral = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public m_IsModifiedStepSpiral As Boolean = False
|
||||||
|
Public Property dStepSpiral As Double
|
||||||
|
Get
|
||||||
|
Return m_dStepSpiral
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
If value <> m_dStepSpiral Then
|
||||||
|
m_dStepSpiral = value
|
||||||
|
m_IsModifiedStepSpiral = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public m_IsModifiedRadiusSpiral As Boolean = False
|
||||||
|
Public Property dRadiusSpiral As Double
|
||||||
|
Get
|
||||||
|
Return m_dRadiusSpiral
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
If value <> m_dRadiusSpiral Then
|
||||||
|
m_dRadiusSpiral = value
|
||||||
|
m_IsModifiedRadiusSpiral = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public m_IsModifiedDistanceSpiral As Boolean = False
|
||||||
|
Public Property dDistanceSpiral As Double
|
||||||
|
Get
|
||||||
|
Return m_dDistanceSpiral
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
If value <> m_dDistanceSpiral Then
|
||||||
|
m_dDistanceSpiral = value
|
||||||
|
m_IsModifiedDistanceSpiral = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Spirale
|
||||||
|
|
||||||
|
#Region "Parametri lavorazione"
|
||||||
|
|
||||||
Public m_IsModifiedLiLen As Boolean = False
|
Public m_IsModifiedLiLen As Boolean = False
|
||||||
Public Property dLiLen As Double
|
Public Property dLiLen As Double
|
||||||
Get
|
Get
|
||||||
@@ -1114,6 +1411,8 @@ Class KitMach
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
#End Region ' Parametri lavorazione
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
m_nId = 0
|
m_nId = 0
|
||||||
m_SelTool = 0
|
m_SelTool = 0
|
||||||
@@ -1125,15 +1424,24 @@ Class KitMach
|
|||||||
m_nZigZagX = 0
|
m_nZigZagX = 0
|
||||||
m_dOffZigZagX = 0
|
m_dOffZigZagX = 0
|
||||||
m_dStepX = 0
|
m_dStepX = 0
|
||||||
|
m_dRadiusX = 0
|
||||||
|
m_dDistanceX = 0
|
||||||
m_nZigZagY = 0
|
m_nZigZagY = 0
|
||||||
m_dOffZigZagY = 0
|
m_dOffZigZagY = 0
|
||||||
m_dStepY = 0
|
m_dStepY = 0
|
||||||
|
m_dRadiusY = 0
|
||||||
|
m_dDistanceY = 0
|
||||||
|
m_nSpiral = 0
|
||||||
|
m_dOffSpiral = 0
|
||||||
|
m_dStepSpiral = 0
|
||||||
|
m_dRadiusSpiral = 0
|
||||||
|
m_dDistanceSpiral = 0
|
||||||
m_dLiLen = 0
|
m_dLiLen = 0
|
||||||
m_dLiHeight = 0
|
m_dLiHeight = 0
|
||||||
m_dLiLoad = 0
|
m_dLiLoad = 0
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New( nId As Integer)
|
Sub New(nId As Integer)
|
||||||
m_nId = nId
|
m_nId = nId
|
||||||
m_SelTool = 0
|
m_SelTool = 0
|
||||||
m_sToolUUID = "---"
|
m_sToolUUID = "---"
|
||||||
@@ -1144,17 +1452,26 @@ Class KitMach
|
|||||||
m_nZigZagX = 0
|
m_nZigZagX = 0
|
||||||
m_dOffZigZagX = 0
|
m_dOffZigZagX = 0
|
||||||
m_dStepX = 0
|
m_dStepX = 0
|
||||||
|
m_dRadiusX = 0
|
||||||
|
m_dDistanceX = 0
|
||||||
m_nZigZagY = 0
|
m_nZigZagY = 0
|
||||||
m_dOffZigZagY = 0
|
m_dOffZigZagY = 0
|
||||||
m_dStepY = 0
|
m_dStepY = 0
|
||||||
|
m_dRadiusY = 0
|
||||||
|
m_dDistanceY = 0
|
||||||
|
m_nSpiral = 0
|
||||||
|
m_dOffSpiral = 0
|
||||||
|
m_dStepSpiral = 0
|
||||||
|
m_dRadiusSpiral = 0
|
||||||
|
m_dDistanceSpiral = 0
|
||||||
m_dLiLen = 0
|
m_dLiLen = 0
|
||||||
m_dLiHeight = 0
|
m_dLiHeight = 0
|
||||||
m_dLiLoad = 0
|
m_dLiLoad = 0
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New( kmSou As KitMach)
|
Sub New(kmSou As KitMach)
|
||||||
m_nId = kmSou.nId
|
m_nId = kmSou.nId
|
||||||
m_SelTool = kmSou.selTool
|
m_SelTool = kmSou.SelTool
|
||||||
m_sToolUUID = kmSou.sToolUUID
|
m_sToolUUID = kmSou.sToolUUID
|
||||||
m_sToolName = kmSou.sToolName
|
m_sToolName = kmSou.sToolName
|
||||||
m_bActive = kmSou.bActive
|
m_bActive = kmSou.bActive
|
||||||
@@ -1163,9 +1480,18 @@ Class KitMach
|
|||||||
m_nZigZagX = kmSou.nZigZagX
|
m_nZigZagX = kmSou.nZigZagX
|
||||||
m_dOffZigZagX = kmSou.dOffZigZagX
|
m_dOffZigZagX = kmSou.dOffZigZagX
|
||||||
m_dStepX = kmSou.dStepX
|
m_dStepX = kmSou.dStepX
|
||||||
|
m_dRadiusX = kmSou.dRadiusX
|
||||||
|
m_dDistanceX = kmSou.dDistanceX
|
||||||
m_nZigZagY = kmSou.nZigZagY
|
m_nZigZagY = kmSou.nZigZagY
|
||||||
m_dOffZigZagY = kmSou.dOffZigZagY
|
m_dOffZigZagY = kmSou.dOffZigZagY
|
||||||
m_dStepY = kmSou.dStepY
|
m_dStepY = kmSou.dStepY
|
||||||
|
m_dRadiusY = kmSou.dRadiusY
|
||||||
|
m_dDistanceY = kmSou.dDistanceY
|
||||||
|
m_nSpiral = kmSou.nSpiral
|
||||||
|
m_dOffSpiral = kmSou.dOffSpiral
|
||||||
|
m_dStepSpiral = kmSou.dStepSpiral
|
||||||
|
m_dRadiusSpiral = kmSou.dRadiusSpiral
|
||||||
|
m_dDistanceSpiral = kmSou.dDistanceSpiral
|
||||||
m_dLiLen = kmSou.dLiLen
|
m_dLiLen = kmSou.dLiLen
|
||||||
m_dLiHeight = kmSou.dLiHeight
|
m_dLiHeight = kmSou.dLiHeight
|
||||||
m_dLiLoad = kmSou.m_dLiLoad
|
m_dLiLoad = kmSou.m_dLiLoad
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Public Class StatisticsPageUC
|
|||||||
DayTxBl.Text = sDay
|
DayTxBl.Text = sDay
|
||||||
' Leggo il numero della settimana
|
' Leggo il numero della settimana
|
||||||
Dim nWeek As Integer = GetPrivateProfileInt(S_STATDATA, K_SD_WEEK, -1, m_MainWindow.GetIniFile())
|
Dim nWeek As Integer = GetPrivateProfileInt(S_STATDATA, K_SD_WEEK, -1, m_MainWindow.GetIniFile())
|
||||||
WeekTxBl.Text = ( nWeek + 1).ToString()
|
WeekTxBl.Text = (nWeek).ToString()
|
||||||
|
|
||||||
' Leggo area pezzi del giorno
|
' Leggo area pezzi del giorno
|
||||||
Dim dDayParts As Double = GetPrivateProfileDouble(S_STATDATA, K_SD_DAYPARTS, 0, m_MainWindow.GetIniFile())
|
Dim dDayParts As Double = GetPrivateProfileDouble(S_STATDATA, K_SD_DAYPARTS, 0, m_MainWindow.GetIniFile())
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<!-- Definizione del ToolHolderUc -->
|
<!-- Definizione del ToolHolderUc -->
|
||||||
<Grid>
|
<Grid>
|
||||||
<Image Source="/Resources/ToolChangerPos.png"/>
|
<Image Source="/Resources/ToolChangerPos.png"/>
|
||||||
<ToggleButton Name="Tool" Width="50" Height="50" Margin="22,40,26,8" Background="#7FB4B4B4">
|
<ToggleButton Name="Tool" Width="50" Height="50" Margin="62,10,16,10" Background="#7FB4B4B4">
|
||||||
<ToggleButton.Template>
|
<ToggleButton.Template>
|
||||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
</ToggleButton.Template>
|
</ToggleButton.Template>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<TextBlock Name="PositionNameTxBl" Height="22" Width="68" FontSize="16" Margin="12,16,41,61"/>
|
<TextBlock Name="PositionNameTxBl" Height="22" Width="50" FontSize="16" Margin="20,40,70,53"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -281,12 +281,12 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="SpeedTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
<TextBlock Name="SpeedTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1"
|
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||||
|
|
||||||
<TextBlock Name="MaxSpeedTxBl" Grid.Column="2"
|
<TextBlock Name="MaxSpeedTxBl" Grid.Column="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="MaxSpeedTxBx" Grid.Column="3"
|
<EgtWPFLib:EgtTextBox Name="MaxSpeedTxBx" Grid.Column="3" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
|
|
||||||
<TextBlock Name="MaxAbsorptionTxBl" Grid.Column="0"
|
<TextBlock Name="MaxAbsorptionTxBl" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="1" ScrollViewer.VerticalScrollBarVisibility="Disabled" TextWrapping="Wrap"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="1" ScrollViewer.VerticalScrollBarVisibility="Disabled" TextWrapping="Wrap"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="MaxAbsorptionTxBx" Grid.Column="1"
|
<EgtWPFLib:EgtTextBox Name="MaxAbsorptionTxBx" Grid.Column="1" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_LeftCalculatorTextBoxInBorder}" />
|
Style="{DynamicResource OmagCut_LeftCalculatorTextBoxInBorder}" />
|
||||||
|
|
||||||
<TextBlock Name="MinFeedTxBl" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
<TextBlock Name="MinFeedTxBl" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
@@ -434,13 +434,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="11*"/>
|
<ColumnDefinition Width="10*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||||
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||||
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||||
|
<Button Name="ExportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||||
|
<Button Name="ImportBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
+309
-28
@@ -3,6 +3,7 @@ Imports OmagCUT.TreeViewItem
|
|||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib
|
Imports EgtWPFLib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class ToolsDbPageUC
|
Public Class ToolsDbPageUC
|
||||||
|
|
||||||
@@ -16,6 +17,8 @@ Public Class ToolsDbPageUC
|
|||||||
Dim ToolsList As New ObservableCollection(Of CathegoryItem)
|
Dim ToolsList As New ObservableCollection(Of CathegoryItem)
|
||||||
' Proprietà
|
' Proprietà
|
||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
|
' Flag nuova gestione parametri lama in disegno
|
||||||
|
Private m_bNewSawbladeMaker As Boolean = False
|
||||||
' Stringa identificativa variabile geometrica in modifica
|
' Stringa identificativa variabile geometrica in modifica
|
||||||
Private m_sCurrVar As String = String.Empty
|
Private m_sCurrVar As String = String.Empty
|
||||||
' Parametri dell'utensile corrente
|
' Parametri dell'utensile corrente
|
||||||
@@ -53,6 +56,8 @@ Public Class ToolsDbPageUC
|
|||||||
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 15)
|
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 15)
|
||||||
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
||||||
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
||||||
|
ExportBtn.Content = EgtMsg(91126)
|
||||||
|
ImportBtn.Content = EgtMsg(91127)
|
||||||
|
|
||||||
NameTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 1)
|
NameTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 1)
|
||||||
TCPosTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 2)
|
TCPosTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 2)
|
||||||
@@ -170,6 +175,10 @@ Public Class ToolsDbPageUC
|
|||||||
If Not m_CurrMachine.bShowHeadExit Then
|
If Not m_CurrMachine.bShowHeadExit Then
|
||||||
MoveParam()
|
MoveParam()
|
||||||
End If
|
End If
|
||||||
|
' Verifico se macchina con nuovo SawbladeMaker
|
||||||
|
Dim sSawBladeMaker As String = ""
|
||||||
|
GetPrivateProfileString(S_TOOLS, K_SAWBLADEMAKER, "", sSawBladeMaker, m_MainWindow.GetIniFile())
|
||||||
|
m_bNewSawbladeMaker = String.Compare(sSawBladeMaker, "MakeStoneSawBlade.lua", True)
|
||||||
m_bFirst = False
|
m_bFirst = False
|
||||||
Else
|
Else
|
||||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
@@ -239,17 +248,17 @@ Public Class ToolsDbPageUC
|
|||||||
Next
|
Next
|
||||||
' Determino il tipo di utensile
|
' Determino il tipo di utensile
|
||||||
Dim nType As Integer
|
Dim nType As Integer
|
||||||
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType)
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||||
' Imposto testa e uscita
|
' Imposto testa e uscita
|
||||||
' Sempre lame su H1.1 e utensili foretto, fresa e mola da scasso su H1.2
|
' Sempre lame su H1.1 e utensili foretto, fresa e mola da scasso su H1.2
|
||||||
If ( nType And MCH_TF.WATERJET) = 0 then
|
If (nType And MCH_TF.WATERJET) = 0 Then
|
||||||
Dim bSaw As Boolean = ((nType And MCH_TF.SAWBLADE) <> 0)
|
Dim bSaw As Boolean = ((nType And MCH_TF.SAWBLADE) <> 0)
|
||||||
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H1")
|
EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H1")
|
||||||
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, If(bSaw, 1, 2))
|
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, If(bSaw, 1, 2))
|
||||||
' Waterjet sempre su H2.1
|
' Waterjet sempre su H2.1
|
||||||
Else
|
Else
|
||||||
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H2")
|
EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H2")
|
||||||
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, 1)
|
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, 1)
|
||||||
End If
|
End If
|
||||||
' Per macchine senza ToolChanger, resetto la posizione su questo
|
' Per macchine senza ToolChanger, resetto la posizione su questo
|
||||||
If m_CurrMachine.ShowToolChanger = 0 Then
|
If m_CurrMachine.ShowToolChanger = 0 Then
|
||||||
@@ -317,8 +326,8 @@ Public Class ToolsDbPageUC
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, CurrType)
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, CurrType)
|
||||||
For Each ToolFamily As CathegoryItem In ToolsList
|
For Each ToolFamily As CathegoryItem In ToolsList
|
||||||
If ToolFamily.nTType = CurrType Then
|
If ToolFamily.nTType = CurrType Then
|
||||||
Dim NewToolItem As New CustomItem( NewName, CurrType)
|
Dim NewToolItem As New CustomItem(NewName, CurrType)
|
||||||
ToolFamily.Items.Add( NewToolItem)
|
ToolFamily.Items.Add(NewToolItem)
|
||||||
NewToolItem.IsSelected = True
|
NewToolItem.IsSelected = True
|
||||||
GetToolParams()
|
GetToolParams()
|
||||||
m_OldItem = ToolTreeView.SelectedItem
|
m_OldItem = ToolTreeView.SelectedItem
|
||||||
@@ -354,15 +363,15 @@ Public Class ToolsDbPageUC
|
|||||||
Dim sItems() As String = sUserNotes.Split(";".ToCharArray)
|
Dim sItems() As String = sUserNotes.Split(";".ToCharArray)
|
||||||
For i As Integer = 0 To sItems.Count() - 1
|
For i As Integer = 0 To sItems.Count() - 1
|
||||||
If sItems(i).Contains("CODE=") Then
|
If sItems(i).Contains("CODE=") Then
|
||||||
CodeTxBx.Text = sItems(i).Substring( 5)
|
CodeTxBx.Text = sItems(i).Substring(5)
|
||||||
ElseIf sItems(i).Contains("SUPPL=") Then
|
ElseIf sItems(i).Contains("SUPPL=") Then
|
||||||
SupplierTxBx.Text = sItems(i).Substring( 6)
|
SupplierTxBx.Text = sItems(i).Substring(6)
|
||||||
ElseIf sItems(i).Contains("S/N=") Then
|
ElseIf sItems(i).Contains("S/N=") Then
|
||||||
SerNbrTxBx.Text = sItems(i).Substring( 4)
|
SerNbrTxBx.Text = sItems(i).Substring(4)
|
||||||
ElseIf sItems(i).Contains("END=") Then
|
ElseIf sItems(i).Contains("END=") Then
|
||||||
EndLifeChBx.IsChecked = True
|
EndLifeChBx.IsChecked = True
|
||||||
m_sEndLife = sItems(i).Substring( 4)
|
m_sEndLife = sItems(i).Substring(4)
|
||||||
ElseIf Not String.IsNullOrWhiteSpace(sItems(i))
|
ElseIf Not String.IsNullOrWhiteSpace(sItems(i)) Then
|
||||||
sToShow &= sItems(i) & ";"
|
sToShow &= sItems(i) & ";"
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -383,7 +392,7 @@ Public Class ToolsDbPageUC
|
|||||||
sUserNotes &= "SUPPL=" & SupplierTxBx.Text & ";"
|
sUserNotes &= "SUPPL=" & SupplierTxBx.Text & ";"
|
||||||
sUserNotes &= "S/N=" & SerNbrTxBx.Text & ";"
|
sUserNotes &= "S/N=" & SerNbrTxBx.Text & ";"
|
||||||
If EndLifeChBx.IsChecked Then
|
If EndLifeChBx.IsChecked Then
|
||||||
If String.IsNullOrWhiteSpace( m_sEndLife) Then
|
If String.IsNullOrWhiteSpace(m_sEndLife) Then
|
||||||
m_sEndLife = My.Computer.Clock.LocalTime.ToString("dd.MM.yyyy HH:mm:ss")
|
m_sEndLife = My.Computer.Clock.LocalTime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||||
End If
|
End If
|
||||||
sUserNotes &= "END=" & m_sEndLife & ";"
|
sUserNotes &= "END=" & m_sEndLife & ";"
|
||||||
@@ -479,18 +488,226 @@ Public Class ToolsDbPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ExportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ExportBtn.Click
|
||||||
|
' contesto corrente
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
|
||||||
|
' creo lista utensili per esportazione
|
||||||
|
Dim ToolToExportList = New ObservableCollection(Of ImpExpToolFamily)
|
||||||
|
Dim Family As CathegoryItem
|
||||||
|
Dim Tool As CustomItem
|
||||||
|
For Each Family In ToolsList
|
||||||
|
Dim ImpExpToolFamily As New ImpExpToolFamily(Family.Name, Family.nTType)
|
||||||
|
ImpExpToolFamily.PictureString = "/Resources/ToolsTreeviewImages/Folder.png"
|
||||||
|
For Each Tool In Family.Items
|
||||||
|
Dim CurrTool = New ImpExpToolItem(Tool.Name, False)
|
||||||
|
ImpExpToolFamily.ToolList.Add(CurrTool)
|
||||||
|
Next
|
||||||
|
ToolToExportList.Add(ImpExpToolFamily)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim ExportWndVM As New ImportExportToolWindowVM(ToolToExportList, True)
|
||||||
|
Dim ExportWnd As New ImportExportToolWD(Application.Current.MainWindow, ExportWndVM)
|
||||||
|
|
||||||
|
ExportWnd.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ImportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
||||||
|
' contesto corrente
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
' apro dialogo di scelta file
|
||||||
|
Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||||
|
.Title = EgtMsg(31161) & " " & EgtMsg(31163),
|
||||||
|
.DefaultExt = ".data",
|
||||||
|
.Filter = "Tools (.data)|*.data",
|
||||||
|
.CheckFileExists = True,
|
||||||
|
.ValidateNames = True
|
||||||
|
}
|
||||||
|
If ImportFileDlg.ShowDialog() <> True Then Return
|
||||||
|
Dim ImportFilePath As String = ImportFileDlg.FileName
|
||||||
|
' recupero liste utensili da importare
|
||||||
|
Dim ImportFileToolNameList As String() = Nothing
|
||||||
|
Dim ImportFileToolFamilyList As Integer() = Nothing
|
||||||
|
If Not EgtTdbToBeImported(ImportFilePath, ImportFileToolNameList, ImportFileToolFamilyList) Then Return
|
||||||
|
' li inserisco in lista per finestra di scelta
|
||||||
|
Dim ToolToImportList As New ObservableCollection(Of ImpExpToolFamily)
|
||||||
|
' creo famiglie di utensili in base a quelle trovate in lista importata
|
||||||
|
For ToolIndex As Integer = 0 To ImportFileToolNameList.Count - 1
|
||||||
|
Dim ToolName As String = ImportFileToolNameList(ToolIndex)
|
||||||
|
Dim ToolFamily As Integer = ImportFileToolFamilyList(ToolIndex)
|
||||||
|
ToolFamily = ToolFamily And
|
||||||
|
(MCH_TF.DRILLBIT Or
|
||||||
|
MCH_TF.SAWBLADE Or
|
||||||
|
MCH_TF.MILL Or
|
||||||
|
MCH_TF.MORTISE Or
|
||||||
|
MCH_TF.CHISEL Or
|
||||||
|
MCH_TF.WATERJET Or
|
||||||
|
MCH_TF.COMPO)
|
||||||
|
Dim bFounded As Boolean = False
|
||||||
|
Dim ToolToImportFamily As ImpExpToolFamily
|
||||||
|
For Each ToolToImportFamily In ToolToImportList
|
||||||
|
If (ToolFamily = ToolToImportFamily.FamilyType) Then
|
||||||
|
ToolToImportFamily.ToolList.Add(New ImpExpToolItem(ToolName, AlreadyExist(ToolName)))
|
||||||
|
bFounded = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not bFounded Then
|
||||||
|
Dim NewFamily As New ImpExpToolFamily(GetToolFamilyName(ToolFamily), ToolFamily)
|
||||||
|
NewFamily.ToolList.Add(New ImpExpToolItem(ToolName, AlreadyExist(ToolName)))
|
||||||
|
ToolToImportList.Add(NewFamily)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim ImportWndVM As New ImportExportToolWindowVM(ToolToImportList, False, ImportFilePath, ImportFileToolNameList)
|
||||||
|
Dim ImportWnd As New ImportExportToolWD(Application.Current.MainWindow, ImportWndVM)
|
||||||
|
|
||||||
|
ImportWnd.ShowDialog()
|
||||||
|
' Aggiungo all'albero visualizzato gli utensili appena importati
|
||||||
|
If ImportWnd.OkResult Then
|
||||||
|
LoadImportedMachineTools(ImportWndVM.vsImported)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function AlreadyExist(ToolName As String) As Boolean
|
||||||
|
Dim ToolFamily As CathegoryItem
|
||||||
|
For Each ToolFamily In ToolsList
|
||||||
|
Dim ToolItem As CustomItem
|
||||||
|
For Each ToolItem In ToolFamily.Items
|
||||||
|
If ToolName = ToolItem.Name Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetToolFamilyName(NewToolFamily As Integer) As String
|
||||||
|
Dim ToolFamily As CathegoryItem
|
||||||
|
For Each ToolFamily In ToolsList
|
||||||
|
If NewToolFamily = ToolFamily.nTType Then
|
||||||
|
Return ToolFamily.Name
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return ""
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub LoadImportedMachineTools(vsImportedTools As String())
|
||||||
|
' Leggo tutti gli utensili presenti nella Macchina (quindi anche quelli appena importati).
|
||||||
|
Dim ActiveToolsFamilies() As ToolsFamily = MyReadToolFamilies(m_CurrMachine.sMachIniFile)
|
||||||
|
Dim ToolsFamilyIndex As Integer = 0
|
||||||
|
Dim ToolsFamilyItem As ToolsFamily
|
||||||
|
For Each ToolsFamilyItem In ActiveToolsFamilies
|
||||||
|
' dalla lista che ho ricavato dalla libreria recupero gli utensili associati
|
||||||
|
Dim FamilyTreeView As New CathegoryItem(ToolsFamilyItem.Name, ToolsFamilyItem.Id)
|
||||||
|
Dim ToolFamilyItem = ToolsList.FirstOrDefault(Function(ToolFamily) ToolFamily.nTType = ToolsFamilyItem.Id)
|
||||||
|
If IsNothing(ToolFamilyItem) Then
|
||||||
|
ToolsList.Insert(ToolsFamilyIndex, FamilyTreeView)
|
||||||
|
Else
|
||||||
|
' ricerco l'indice nella lista Tools
|
||||||
|
|
||||||
|
End If
|
||||||
|
Dim nType As Integer = 0
|
||||||
|
Dim ToolName As String = String.Empty
|
||||||
|
Dim ToolIndex As Integer = 0
|
||||||
|
'EgtSetCurrentContext(ToolScene.GetCtx())
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
If EgtTdbGetFirstTool(ToolsFamilyItem.Id, ToolName, nType) Then
|
||||||
|
Dim ToolItem = ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName)
|
||||||
|
If IsNothing(ToolItem) Then
|
||||||
|
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
|
||||||
|
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||||
|
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||||
|
'NewToolName.IsSelected = True
|
||||||
|
ElseIf vsImportedTools.Contains(ToolName) Then
|
||||||
|
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
|
||||||
|
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
|
||||||
|
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
|
||||||
|
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||||
|
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||||
|
'NewToolName.IsSelected = True
|
||||||
|
End If
|
||||||
|
ToolIndex += 1
|
||||||
|
While EgtTdbGetNextTool(ToolsFamilyItem.Id, ToolName, nType)
|
||||||
|
ToolItem = ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName)
|
||||||
|
If IsNothing(ToolItem) Then
|
||||||
|
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
|
||||||
|
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||||
|
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||||
|
'NewToolName.IsSelected = True
|
||||||
|
ElseIf vsImportedTools.Contains(ToolName) Then
|
||||||
|
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
|
||||||
|
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
|
||||||
|
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
|
||||||
|
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||||
|
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||||
|
'NewToolName.IsSelected = True
|
||||||
|
End If
|
||||||
|
ToolIndex += 1
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
ToolsFamilyIndex += 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function MyReadToolFamilies(sMachineIniPath As String) As ToolsFamily()
|
||||||
|
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
|
||||||
|
|
||||||
|
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Punta e Lama nelle famiglie di utensili attivi è invertito
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.SAWBLADE, EgtMsg(31000 + 2)))
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.DRILLBIT, EgtMsg(31000 + 1)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(31000 + 3)))
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_TOOLS, "CupWheel", 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(90754)))
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_TOOLS, "PolishingWheel", 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(90756)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MORTISE, EgtMsg(31000 + 4)))
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_CHISEL, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.CHISEL, EgtMsg(31000 + 9)))
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.COMPO, EgtMsg(31000 + 5)))
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachineIniPath) <> 0 Then
|
||||||
|
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.WATERJET, EgtMsg(31010)))
|
||||||
|
End If
|
||||||
|
Return ActiveToolsFamiliesList.ToArray
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Sub InitializeToolGroup(bEnabled As Boolean, nTType As Integer, sFName As String)
|
Friend Sub InitializeToolGroup(bEnabled As Boolean, nTType As Integer, sFName As String)
|
||||||
If Not bEnabled Then Return
|
If Not bEnabled Then Return
|
||||||
' Inserisco categoria ed eventuali elementi
|
' Inserisco categoria ed eventuali elementi
|
||||||
Dim ToolCathegory As New CathegoryItem( sFName, nTType)
|
Dim ToolCathegory As New CathegoryItem(sFName, nTType)
|
||||||
Dim nType As Integer = 0
|
Dim nType As Integer = 0
|
||||||
Dim ToolName As String = String.Empty
|
Dim ToolName As String = String.Empty
|
||||||
Dim bFound As Boolean = EgtTdbGetFirstTool( nTType, ToolName, nType)
|
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
|
||||||
While bFound
|
While bFound
|
||||||
If nType = nTType Then ToolCathegory.Items.Add( New CustomItem( ToolName, nType))
|
Dim nDebug As Integer = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
|
||||||
bFound = EgtTdbGetNextTool( nTType, ToolName, nType)
|
If nType = nTType Then
|
||||||
|
If nTType <> MCH_TY.MILL_STD Then
|
||||||
|
' se utensile diverso da MILL
|
||||||
|
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||||
|
ElseIf nTType = MCH_TY.MILL_STD And (ToolName.Trim.ToLower <> "probe" Or nDebug > 4) Then
|
||||||
|
' Se utensile MILL con nome "probe" aggiungo solo se livello debug maggiore di 4
|
||||||
|
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
|
||||||
End While
|
End While
|
||||||
ToolsList.Add( ToolCathegory)
|
ToolsList.Add(ToolCathegory)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GetToolParams()
|
Private Sub GetToolParams()
|
||||||
@@ -545,7 +762,7 @@ Public Class ToolsDbPageUC
|
|||||||
HeadTxBx.Text = ToolString
|
HeadTxBx.Text = ToolString
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, ToolInt)
|
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, ToolInt)
|
||||||
ExitTxBx.Text = ToolInt.ToString()
|
ExitTxBx.Text = ToolInt.ToString()
|
||||||
if Not GetSpecials() Then
|
If Not GetSpecials() Then
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, ToolString)
|
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, ToolString)
|
||||||
UserNotesTxBx.Text = ToolString
|
UserNotesTxBx.Text = ToolString
|
||||||
End If
|
End If
|
||||||
@@ -601,7 +818,7 @@ Public Class ToolsDbPageUC
|
|||||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, HeadTxBx.Text)
|
EgtTdbSetCurrToolParam(MCH_TP.HEAD, HeadTxBx.Text)
|
||||||
Int32.TryParse(ExitTxBx.Text, nTemp)
|
Int32.TryParse(ExitTxBx.Text, nTemp)
|
||||||
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, nTemp)
|
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, nTemp)
|
||||||
if Not SetSpecials() Then
|
If Not SetSpecials() Then
|
||||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, UserNotesTxBx.Text)
|
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, UserNotesTxBx.Text)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -637,7 +854,7 @@ Public Class ToolsDbPageUC
|
|||||||
Dim bShowUserNotes As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowUserNotes <> 0) Or m_CurrMachine.ShowUserNotes = 1)
|
Dim bShowUserNotes As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowUserNotes <> 0) Or m_CurrMachine.ShowUserNotes = 1)
|
||||||
UserNotesTxBl.Visibility = If(bShowUserNotes, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
UserNotesTxBl.Visibility = If(bShowUserNotes, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
UserNotesTxBx.Visibility = If(bShowUserNotes, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
UserNotesTxBx.Visibility = If(bShowUserNotes, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
Dim bShowSpecials As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowSpecials <> 0) Or m_CurrMachine.ShowSpecials = 1)
|
Dim bShowSpecials As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowSpecials <> 0) Or m_CurrMachine.ShowSpecials = 1)
|
||||||
SerNbrTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
SerNbrTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
SerNbrTxBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
SerNbrTxBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
CodeTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
CodeTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||||
@@ -759,6 +976,10 @@ Public Class ToolsDbPageUC
|
|||||||
nMsg = MSG_TOOLSDBPAGEUC + 23 ' Spessore
|
nMsg = MSG_TOOLSDBPAGEUC + 23 ' Spessore
|
||||||
Case MCH_TP.MAXMAT
|
Case MCH_TP.MAXMAT
|
||||||
nMsg = MSG_TOOLSDBPAGEUC + 24 ' Tagliente
|
nMsg = MSG_TOOLSDBPAGEUC + 24 ' Tagliente
|
||||||
|
Case MCH_TP.CORE
|
||||||
|
nMsg = 90720 ' Anima
|
||||||
|
Case STEM
|
||||||
|
nMsg = 90719 ' Lunghezza portautensile
|
||||||
End Select
|
End Select
|
||||||
' Predispongo calcolatrice (converto sempre in UIUnits perchè tutte lunghezze)
|
' Predispongo calcolatrice (converto sempre in UIUnits perchè tutte lunghezze)
|
||||||
Dim EgtCalculator As New EgtCalculatorWD(m_MainWindow, EgtToUiUnits(dVal), 300, WidthType.PIXEL, 0, 0, EgtMsg(nMsg))
|
Dim EgtCalculator As New EgtCalculatorWD(m_MainWindow, EgtToUiUnits(dVal), 300, WidthType.PIXEL, 0, 0, EgtMsg(nMsg))
|
||||||
@@ -776,7 +997,7 @@ Public Class ToolsDbPageUC
|
|||||||
Private Sub RecreateToolDraw(ByVal dVal As Double)
|
Private Sub RecreateToolDraw(ByVal dVal As Double)
|
||||||
' Salvo il vecchio valore
|
' Salvo il vecchio valore
|
||||||
Dim dOldVal As Double
|
Dim dOldVal As Double
|
||||||
GetVariableValue( dOldVal)
|
GetVariableValue(dOldVal)
|
||||||
' Aggiorno dati utensile
|
' Aggiorno dati utensile
|
||||||
SetVariableValue(dVal)
|
SetVariableValue(dVal)
|
||||||
' Creo utensile
|
' Creo utensile
|
||||||
@@ -789,7 +1010,20 @@ Public Class ToolsDbPageUC
|
|||||||
Private Function GetVariableValue(ByRef dVal As Double) As Boolean
|
Private Function GetVariableValue(ByRef dVal As Double) As Boolean
|
||||||
' Recupero valore variabile
|
' Recupero valore variabile
|
||||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
Return EgtTdbGetCurrToolParam(GetVariableType(), dVal)
|
Dim nVarType As Integer = GetVariableType()
|
||||||
|
If m_nToolType <> MCH_TY.SAW_STD OrElse nVarType <> STEM Then
|
||||||
|
Return EgtTdbGetCurrToolParam(nVarType, dVal)
|
||||||
|
Else
|
||||||
|
Dim dL, dCore, dTh As Double
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.LEN, dL) AndAlso
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) Then
|
||||||
|
dVal = Math.Max(dL - (dCore + dTh) / 2, 0.0)
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function SetVariableValue(ByVal dVal As Double) As Boolean
|
Private Function SetVariableValue(ByVal dVal As Double) As Boolean
|
||||||
@@ -803,6 +1037,30 @@ Public Class ToolsDbPageUC
|
|||||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dVal + 1)
|
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dVal + 1)
|
||||||
Case MCH_TP.DIAM
|
Case MCH_TP.DIAM
|
||||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||||
|
Case MCH_TP.THICK
|
||||||
|
If m_bNewSawbladeMaker Then
|
||||||
|
Dim dTh, dLen As Double
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) AndAlso
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen) Then
|
||||||
|
Dim dNewLen As Double = dLen + ((dVal - dTh) / 2)
|
||||||
|
EgtTdbSetCurrToolParam(MCH_TP.LEN, dNewLen)
|
||||||
|
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dNewLen + 1)
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case MCH_TP.CORE
|
||||||
|
If m_bNewSawbladeMaker Then
|
||||||
|
Dim dCore, dLen As Double
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen) Then
|
||||||
|
Dim dNewLen As Double = dLen + ((dVal - dCore) / 2)
|
||||||
|
EgtTdbSetCurrToolParam(MCH_TP.LEN, dNewLen)
|
||||||
|
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dNewLen + 1)
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Select
|
End Select
|
||||||
ElseIf m_nToolType = MCH_TY.DRILL_STD Then
|
ElseIf m_nToolType = MCH_TY.DRILL_STD Then
|
||||||
Select Case nType
|
Select Case nType
|
||||||
@@ -828,7 +1086,19 @@ Public Class ToolsDbPageUC
|
|||||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
Return EgtTdbSetCurrToolParam(nType, dVal)
|
If m_nToolType <> MCH_TY.SAW_STD OrElse nType <> STEM Then
|
||||||
|
Return EgtTdbSetCurrToolParam(nType, dVal)
|
||||||
|
Else
|
||||||
|
Dim dCore, dTh As Double
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) Then
|
||||||
|
Dim dL As Double = Math.Max(dVal, 0.0) + ((dCore + dTh) / 2)
|
||||||
|
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dL + 1)
|
||||||
|
Return EgtTdbSetCurrToolParam(MCH_TP.LEN, dL)
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function GetVariableType() As Integer
|
Private Function GetVariableType() As Integer
|
||||||
@@ -841,6 +1111,10 @@ Public Class ToolsDbPageUC
|
|||||||
nType = MCH_TP.THICK
|
nType = MCH_TP.THICK
|
||||||
ElseIf m_sCurrVar = "MAXMAT" Then
|
ElseIf m_sCurrVar = "MAXMAT" Then
|
||||||
nType = MCH_TP.MAXMAT
|
nType = MCH_TP.MAXMAT
|
||||||
|
ElseIf m_sCurrVar = "CORE" Then
|
||||||
|
nType = MCH_TP.CORE
|
||||||
|
ElseIf m_sCurrVar = "STEM" Then
|
||||||
|
nType = STEM
|
||||||
End If
|
End If
|
||||||
Return nType
|
Return nType
|
||||||
End Function
|
End Function
|
||||||
@@ -902,6 +1176,13 @@ Public Class ToolsDbPageUC
|
|||||||
EgtTdbSetCurrToolParam(MCH_TP.THICK, dToolThick)
|
EgtTdbSetCurrToolParam(MCH_TP.THICK, dToolThick)
|
||||||
EgtOutLog("ToolThick too small ->" & DoubleToString(dToolThick, 1))
|
EgtOutLog("ToolThick too small ->" & DoubleToString(dToolThick, 1))
|
||||||
End If
|
End If
|
||||||
|
Dim dToolCore As Double
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.CORE, dToolCore)
|
||||||
|
If dToolCore < EPS_SMALL Then
|
||||||
|
dToolCore = If(dToolLen >= dToolThick, dToolThick - 1, 2 * dToolLen - dToolThick)
|
||||||
|
EgtTdbSetCurrToolParam(MCH_TP.CORE, dToolCore)
|
||||||
|
EgtOutLog("ToolCore too small ->" & DoubleToString(dToolCore, 1))
|
||||||
|
End If
|
||||||
Dim dToolMaxMat As Double
|
Dim dToolMaxMat As Double
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dToolMaxMat)
|
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dToolMaxMat)
|
||||||
If dToolMaxMat < EPS_SMALL Then
|
If dToolMaxMat < EPS_SMALL Then
|
||||||
@@ -1004,7 +1285,7 @@ Public Class ToolsDbPageUC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function CreateToolDraw() As Boolean
|
Private Function CreateToolDraw() As Boolean
|
||||||
Dim nErr As Integer = EgtTdbCurrToolDraw( m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx(), ToolScene.GetCtx())
|
Dim nErr As Integer = EgtTdbCurrToolDraw(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx(), ToolScene.GetCtx())
|
||||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||||
Return (nErr = 0)
|
Return (nErr = 0)
|
||||||
End Function
|
End Function
|
||||||
@@ -1057,4 +1338,4 @@ Public Class ToolsDbPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user