Compare commits
1522 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d7a931f87 | |||
| 377a6cef07 | |||
| 4b9ed93a7a | |||
| 67944bfdcb | |||
| 82063e8bc5 | |||
| 99958851dc | |||
| dbac290ec7 | |||
| ef3b9f62c5 | |||
| 0c97563c69 | |||
| e23497b4e5 | |||
| 4a1318957d | |||
| 155a241ae6 | |||
| 9e15741de1 | |||
| e446f21069 | |||
| 7b4f8529c3 | |||
| 64d1bc7525 | |||
| 31b379bb3d | |||
| f1a8c8912d | |||
| 36747a9faa | |||
| b5ea865a73 | |||
| 2ae8427be4 | |||
| 838c9b27e9 | |||
| 788ebfb604 | |||
| d7c65e1296 | |||
| 420af319a1 | |||
| 6df62b999e | |||
| 69c58ddbd9 | |||
| 8d4da30cf8 | |||
| 6bc913530a | |||
| 46548eeeb0 | |||
| f605ba5b84 | |||
| 5c1f149aa9 | |||
| 239258bbce | |||
| 621da814e8 | |||
| 750995f4fc | |||
| d7fb59678f | |||
| 1cb77bc27a | |||
| e66e974688 | |||
| e603793dc0 | |||
| ce0d645b2c | |||
| df24013894 | |||
| e5332ace0f | |||
| e13aceda26 | |||
| 013da60ba3 | |||
| 96c5630a6f | |||
| c50af75c2e | |||
| ffc87c789f | |||
| b4e5dfced8 | |||
| d11e1af13f | |||
| e900b69552 | |||
| a63c7a78ff | |||
| 8e752ceabd | |||
| 876b15af6b | |||
| eb6f278423 | |||
| 600591b64f | |||
| 0bb65431a7 | |||
| 83d748ace8 | |||
| b6b68c4459 | |||
| f903f80433 | |||
| 801aa5cb6e | |||
| f64b0b152b | |||
| 0eb8baf370 | |||
| 935eae5608 | |||
| 78cb995cec | |||
| fa36371028 | |||
| 1fd88af50b | |||
| 223a818355 | |||
| 707384baee | |||
| 5620fb1b35 | |||
| f063aca195 | |||
| 10c6e99546 | |||
| a3fa949b19 | |||
| 02b07bc717 | |||
| d4adcfc8e1 | |||
| 1e028fcb28 | |||
| 7fc2fc1691 | |||
| 8d46a7fe16 | |||
| 91f98e83fb | |||
| 85796d1862 | |||
| df36d4f495 | |||
| 2cfc0383ff | |||
| 1dd37a243c | |||
| 0fadc020e3 | |||
| b10cfb3913 | |||
| 5277b78f94 | |||
| 37a5029bf4 | |||
| 5e669d25d0 | |||
| c3dff38c7f | |||
| a79445f152 | |||
| a30430268e | |||
| bf08cf4f86 | |||
| b128b56c4b | |||
| 71c9815296 | |||
| 29ce306644 | |||
| 65931a5102 | |||
| e5c5b72c7e | |||
| ff849a7708 | |||
| 4c97b3a6f6 | |||
| b79baafa8f | |||
| 530e715217 | |||
| 261e0f5949 | |||
| d577d6fdb0 | |||
| b87d27230c | |||
| 43893b19ce | |||
| 048c95edb8 | |||
| 7fceefc63e | |||
| 9e4ed436ab | |||
| 76a3fa6b78 | |||
| 1ab69a9cf3 | |||
| 7ed7ad27ee | |||
| fa608ec498 | |||
| 0e2163e0a8 | |||
| 059b45043d | |||
| 24b9809353 | |||
| 59693349f3 | |||
| 8c1b0c7633 | |||
| 3138f9b93b | |||
| f4e4f26275 | |||
| 97d8b2d7a9 | |||
| 66e93f1054 | |||
| 9a183182c0 | |||
| 7fe32007d8 | |||
| 528b3072da | |||
| 6d829dc168 | |||
| 909df83969 | |||
| 51dcc4243b | |||
| 7b94cb8e3f | |||
| 8d0c8b6428 | |||
| 6fb87c8c33 | |||
| 632679b6fd | |||
| 58ce34a857 | |||
| 300403e0ea | |||
| 09639dbd81 | |||
| b8ec7661ac | |||
| 40cc369244 | |||
| b30406f1fc | |||
| 647614e67e | |||
| 3899026713 | |||
| 76c8766528 | |||
| 0657c9b101 | |||
| f1a7d0dfba | |||
| 9d626bd8d8 | |||
| 29246fb70c | |||
| a64e93c866 | |||
| 8dd1e8e4b7 | |||
| c67b31c17b | |||
| ca9d376928 | |||
| f4e2167c9b | |||
| c6ed8b63ba | |||
| 925601090f | |||
| be8ded7c9a | |||
| 579c57083f | |||
| 4514a1a967 | |||
| 9c2e02943a | |||
| c4819f5b27 | |||
| c216e04276 | |||
| 773efbcb25 | |||
| e9d061a083 | |||
| 76bf4e6485 | |||
| 375406c196 | |||
| 6e0ae88f72 | |||
| afae12547e | |||
| 727138c6dd | |||
| 54f890e2c1 | |||
| 47e3a32714 | |||
| 0ca180f6f2 | |||
| d33a34830e | |||
| fdca416dca | |||
| 00ce92d369 | |||
| ee82b9b0fb | |||
| 42beb7125e | |||
| 207778d595 | |||
| 888aa76c36 | |||
| 189a632d94 | |||
| e7dbb80da2 | |||
| f08a7bdef7 | |||
| 71c65a28bb | |||
| c986f46861 | |||
| 6ff8987a14 | |||
| 47d8ec273e | |||
| 40c233e34f | |||
| e10ab83e4b | |||
| 9afe215b53 | |||
| b6a68f06a3 | |||
| 6fd4184732 | |||
| 5527a7e316 | |||
| ecb05a29c9 | |||
| 6829a7c203 | |||
| e6601930c4 | |||
| 4040a1ab98 | |||
| 9db39a5d45 | |||
| af1be57395 | |||
| 8ae20fe129 | |||
| ba8422bcb1 | |||
| ef5a5d337c | |||
| 4fd271bf4c | |||
| cfa1910f25 | |||
| dfbcfa435a | |||
| bcc9ecb9db | |||
| feb943cfb1 | |||
| e878069ffd | |||
| 4a0e8365bb | |||
| b563997e43 | |||
| 0049122199 | |||
| da0ee72bcc | |||
| b19d11be18 | |||
| f22fa79fee | |||
| 64881c5869 | |||
| bb61a85132 | |||
| 6591de143a | |||
| aee76d1150 | |||
| 5eb75a9c38 | |||
| c7b7aec302 | |||
| 1e49806662 | |||
| ccc824489b | |||
| 62db5e4a42 | |||
| fffbf3676f | |||
| ac46e13c54 | |||
| 3c84e91735 | |||
| fab3b0fe14 | |||
| 6ce4fa7641 | |||
| 51707cc973 | |||
| a9e463141e | |||
| 1e2023234e | |||
| b305d8be17 | |||
| ac9d0dc076 | |||
| a2a3642ecf | |||
| 1051bf0f58 | |||
| 3e03d44840 | |||
| 4730c0ef42 | |||
| 9eac34222f | |||
| f2c5b60acc | |||
| 5c5dae5e3a | |||
| c400973972 | |||
| 9522cd6d4e | |||
| f0ce11dad7 | |||
| 493c63ece2 | |||
| 33d18efcc2 | |||
| 07c67e0987 | |||
| 07753855cd | |||
| d1e95372e1 | |||
| 9865028f99 | |||
| ecb2055690 | |||
| 187fdde32b | |||
| 5e66d99528 | |||
| 79f0b3ee9f | |||
| feafc44022 | |||
| d376fdca3e | |||
| cc43198e05 | |||
| 82892c2460 | |||
| 92656e997e | |||
| 32d576111a | |||
| 17ebba3e11 | |||
| eed9456c8d | |||
| 3f56e563c1 | |||
| 9c9b00d661 | |||
| 4d2e18ebf1 | |||
| 8692baafff | |||
| b9a89fa212 | |||
| 9d572699a2 | |||
| 1794d475ea | |||
| 8a73b3cab8 | |||
| 86010b41c1 | |||
| 6d8d3a1c1f | |||
| b48b63bd4d | |||
| 05feb0ab8b | |||
| deca9cd4c0 | |||
| 8b36b65b37 | |||
| 06899fadfd | |||
| 80e9ea4c15 | |||
| ad47a070ef | |||
| d99ea84058 | |||
| 069df21cfa | |||
| 7def1b8d5d | |||
| 82aea136c2 | |||
| 55260fe380 | |||
| 4bdbba6599 | |||
| 0d38b47f24 | |||
| 2332eccef9 | |||
| a3481659f2 | |||
| 4b90d2e915 | |||
| bb0a3b385a | |||
| 0c82debdf4 | |||
| 995650aac2 | |||
| f7a85a0680 | |||
| 910e54cae8 | |||
| ea2cb64886 | |||
| c785adbcdf | |||
| 9546248819 | |||
| 13b2dd29d1 | |||
| 55879d431e | |||
| 43268045a1 | |||
| 5abbb927a7 | |||
| 9aa89adf29 | |||
| e1184b723c | |||
| f68b4384e0 | |||
| 6188c67845 | |||
| 5dbacabbac | |||
| e66b65c3ba | |||
| 1874f0aa4b | |||
| 966b8ea26d | |||
| 854cd2a937 | |||
| 73ede8520a | |||
| fb3a53be59 | |||
| af8fbf8a3d | |||
| a2da16761f | |||
| 7f964cd55b | |||
| 95a1cc8f3c | |||
| 963c515da4 | |||
| 1f654dc708 | |||
| 5febbf0805 | |||
| 09baa238d8 | |||
| 6c580fecdb | |||
| 616e1fba47 | |||
| ab5defd090 | |||
| e29abf6a4f | |||
| 64beb381ca | |||
| 7f5d678dbd | |||
| d781989da9 | |||
| 387d1241b2 | |||
| c2f4d38d32 | |||
| d731248ffc | |||
| 701071aab0 | |||
| 24bb030080 | |||
| 9de7422f1a | |||
| e69f85e5e1 | |||
| f6c736ef40 | |||
| 0d134324da | |||
| a224660a00 | |||
| 580a454ad1 | |||
| 971628a549 | |||
| ec73d2944b | |||
| caf0a0ea3a | |||
| 83fd6bda1b | |||
| a624b67848 | |||
| c244f3e87b | |||
| 487efdd029 | |||
| a9e961a0ee | |||
| c53c9f090b | |||
| 46f82e0286 | |||
| 05b2b1d73f | |||
| ca00c134e9 | |||
| b2eba855ac | |||
| 47be6b2859 | |||
| ea54e9dc50 | |||
| 6d13c9478b | |||
| 49ed63e2d4 | |||
| 330a4d6238 | |||
| a12ab8f531 | |||
| df9ee8bdb4 | |||
| b290bdf8a1 | |||
| 316a22d4bb | |||
| 651c1e32af | |||
| 114255bb87 | |||
| 4499a042f8 | |||
| f9f0d90334 | |||
| f8a9eb544d | |||
| 80f06890c4 | |||
| 14e7c35b6a | |||
| a1b5053ca1 | |||
| c1986982ec | |||
| e75a9915aa | |||
| 65f1458ec1 | |||
| 7005a2dfb6 | |||
| 5d1a24b5a1 | |||
| e6741228f8 | |||
| 09e6b4a633 | |||
| ca0e3cab8b | |||
| 021aca8847 | |||
| 19f0ed75a4 | |||
| 05bf06d1e2 | |||
| 957ad00657 | |||
| 5be9816bbd | |||
| 3064e3c9bf | |||
| 088b9ce3cf | |||
| e2f9d0f508 | |||
| f43fac953e | |||
| bf521d11b3 | |||
| ec20f9db1c | |||
| 59afa97425 | |||
| 30f625ad77 | |||
| a428a170c9 | |||
| a6cd836e0d | |||
| fbb0e948b3 | |||
| 9bb1b49883 | |||
| 5d4bd85f85 | |||
| 8169b5298a | |||
| cfda9196be | |||
| d5a2a25ade | |||
| 3e9f6c546d | |||
| c151ed09f8 | |||
| d1c5ab7093 | |||
| f6641c858e | |||
| 6fe32752e1 | |||
| 4fead794f3 | |||
| 827c955d1d | |||
| 8b96a07386 | |||
| 3d957138ee | |||
| 12efe7f0ee | |||
| 8315c6925c | |||
| c38f9305c6 | |||
| 923757bd8c | |||
| f34b58a636 | |||
| 138499fdf4 | |||
| edfe32daed | |||
| ecaedb0ed2 | |||
| 9a0f478529 | |||
| 958421f4f5 | |||
| 70761248ff | |||
| a723d3caee | |||
| 3646c5832c | |||
| 2de010d596 | |||
| 18db57fca9 | |||
| c76b8550f8 | |||
| 804dee9236 | |||
| 1acf67aaa0 | |||
| b86ea9b7f8 | |||
| 891045ec4e | |||
| 641b1eb6d3 | |||
| ef59f66c67 | |||
| 14bf36ed68 | |||
| 10f1420395 | |||
| 20357a3ebc | |||
| 06bac914ef | |||
| 1b956580c9 | |||
| 625f12a1e8 | |||
| a6ef84ab32 | |||
| a8eb4910bc | |||
| 6e4da2e5ff | |||
| 192839961b | |||
| dd2cbb696f | |||
| dd0071244e | |||
| c73bd50beb | |||
| f2c5325e67 | |||
| 9a01374845 | |||
| 4f29587989 | |||
| aac9b09da7 | |||
| 9caa404aa5 | |||
| d06929d1dd | |||
| 970aabee17 | |||
| b181396c87 | |||
| 5132c3af81 | |||
| b87faa551f | |||
| 76169b0516 | |||
| 922d648ecc | |||
| f229e08ecf | |||
| 5bc70f9ff6 | |||
| 97957e0365 | |||
| df46f3b5a5 | |||
| 7e88899e05 | |||
| 408b59ee9c | |||
| 860e47c0a3 | |||
| 5017e96cde | |||
| 9b34053fde | |||
| 3588ea8e41 | |||
| f359184505 | |||
| 84dffd8966 | |||
| 293f007f2e | |||
| 2c3e3f74f9 | |||
| 91d943d0a7 | |||
| e1954b3731 | |||
| fe0db46b69 | |||
| 3fc4c235f7 | |||
| 23b2606cbc | |||
| 7cd0fdd14a | |||
| ce20fa0eb3 | |||
| c32715a4b5 | |||
| 52c0b6b194 | |||
| a83752e565 | |||
| 60e72aaf22 | |||
| ec2ce96b3b | |||
| d131e0b42d | |||
| efea14db89 | |||
| c09d8a6b0f | |||
| 946ad1d29c | |||
| c5f1d1669f | |||
| 689e81219b | |||
| 05ec565f84 | |||
| 0e7866922d | |||
| fb92f9faea | |||
| f65d07ab22 | |||
| bc7381de63 | |||
| f140b6df54 | |||
| b6d22cca55 | |||
| 7bfd834b0e | |||
| 947c776d83 | |||
| 441ddc4397 | |||
| 9f16294994 | |||
| f7a7b80bd0 | |||
| fd4e961b39 | |||
| b77a893f12 | |||
| 7156ca93d0 | |||
| 8c42493382 | |||
| 7a6eebcdab | |||
| e1b4dc52cb | |||
| 99ea410056 | |||
| ae19eae94d | |||
| 5f321fba3a | |||
| 3401bb7557 | |||
| b7a127c1cd | |||
| 8f6eaf5a53 | |||
| 80150b508a | |||
| 34089f946f | |||
| 7bc58a74e1 | |||
| 92f347cd7e | |||
| 1817870dfe | |||
| 7def088b9d | |||
| 810a61ea0d | |||
| 70cbef0efb | |||
| ec6c44d036 | |||
| 5d42576da1 | |||
| 227ded2e88 | |||
| 1c81e7fdb4 | |||
| d37014272f | |||
| dc8fcae112 | |||
| 3e84659fca | |||
| 638461a4e3 | |||
| bf1dd1d526 | |||
| 7d121b2bd5 | |||
| 0fc7d826a8 | |||
| dfb3e1f74a | |||
| 8980da46be | |||
| 531da47cbc | |||
| b279a287ec | |||
| 79db35220b | |||
| d7ba34527f | |||
| 7622117281 | |||
| b331126f8a | |||
| 8b6c9b38cc | |||
| 3133c1d78c | |||
| 2ae08165f4 | |||
| f77ea8309c | |||
| 3a9e8651e7 | |||
| eddd7b93ca | |||
| 1d9182f96d | |||
| c3916dcf41 | |||
| 15bfc1bc15 | |||
| cee4375ea3 | |||
| 5b04080f35 | |||
| 0d7cc99a2d | |||
| d48deed9e0 | |||
| 4d8f0d6411 | |||
| 1cff7af4a6 | |||
| c3cc4518d8 | |||
| 04debf6b51 | |||
| cc71f0a34f | |||
| 3787b4e1f5 | |||
| 88b9226bcb | |||
| 9f4e025305 | |||
| ecbd6ecd66 | |||
| c968befafb | |||
| df3b6ae657 | |||
| 668a37c6da | |||
| f4b18d962d | |||
| eaa43c6209 | |||
| 99dd1b6807 | |||
| 5b6f719349 | |||
| 93b3ddec79 | |||
| dd2f75abf1 | |||
| 2922c0e6ef | |||
| e701f54c07 | |||
| 2a2728505f | |||
| a5dc629e21 | |||
| c7fbe8a26a | |||
| b43a8ff2bb | |||
| 6cf303deca | |||
| 855762095f | |||
| 733fd4dc09 | |||
| 71a4985392 | |||
| 0d4d9a4520 | |||
| 622439de62 | |||
| 618d02d7c6 | |||
| d37df9d0f4 | |||
| 011673510d | |||
| ff52b9a79b | |||
| 85a5200e6b | |||
| 0e665ef1b0 | |||
| 2b99df6238 | |||
| 39ea11a8c4 | |||
| 79c7e3e536 | |||
| e4eb264abb | |||
| 500aa2eacf | |||
| b55810f235 | |||
| b898346efb | |||
| 586e4689ae | |||
| 7668aa5766 | |||
| e64090bfaf | |||
| 7c71fd4842 | |||
| 888bf0fcf8 | |||
| 009f22e146 | |||
| ef14b08737 | |||
| 8f9bd3ecb7 | |||
| 3eb6518ea4 | |||
| b15eb92785 | |||
| 96511ca335 | |||
| 974dee54da | |||
| 7e52ce986f | |||
| 4fc4875b91 | |||
| b3138d1982 | |||
| e87622ef5d | |||
| aafe52d2da | |||
| ffe53bf725 | |||
| 832ea7aec5 | |||
| 6d9a157b35 | |||
| 71afc6554e | |||
| bc40da74ab | |||
| 405fde996c | |||
| 8321f09af8 | |||
| 391583b9ea | |||
| 5cf0472806 | |||
| 89598c154e | |||
| 785792d63b | |||
| 5874a39b25 | |||
| 43f3f2f6d8 | |||
| 79a883a303 | |||
| e3f88296e5 | |||
| e207ed7ece | |||
| e97175765b | |||
| 6a0ebb9fee | |||
| 0a698dae34 | |||
| b74c052dd1 | |||
| 330e501277 | |||
| b7d62ace2c | |||
| c6f353ec35 | |||
| 0b7bdd6ade | |||
| 3febbbbcbf | |||
| 31874a8b92 | |||
| c75d9d6bc2 | |||
| 96dd92c3d3 | |||
| ebc41183bc | |||
| feb7982bef | |||
| f241b72453 | |||
| 2b306763c6 | |||
| f1b0a28e71 | |||
| 121f02fb0c | |||
| 848b6d98a5 | |||
| 0589565b8e | |||
| 1109a91dd9 | |||
| 37cb1dbb6a | |||
| 152788fe1b | |||
| 534b363a04 | |||
| 3f13706b97 | |||
| 1f804ab6fc | |||
| 21dd6fbbb1 | |||
| da73acc8a0 | |||
| f9825db2ac | |||
| a3ea3bd1eb | |||
| 805a3acf54 | |||
| f21f2a6422 | |||
| b25d73c0cb | |||
| 50d9603598 | |||
| fae8018df9 | |||
| 3b2715ee58 | |||
| d7c8e8e21d | |||
| 9d11e6e9ca | |||
| 8d90714a82 | |||
| 429d7f58e4 | |||
| 7e15ef9dd1 | |||
| 6060746412 | |||
| 2b4f3d93dc | |||
| f365c7a593 | |||
| fc797ff4a7 | |||
| 63b1f1532a | |||
| b861c647fc | |||
| fa7d95cc53 | |||
| cdb0414097 | |||
| 48ac0a878f | |||
| 804992e485 | |||
| 4ef9497514 | |||
| 3c939a9e5b | |||
| aaddb6897f | |||
| b0db630d56 | |||
| e608fd3a52 | |||
| 573cc1478a | |||
| 25d7516c7a | |||
| 8ac3c4879b | |||
| b551120fcc | |||
| b1846bb804 | |||
| 399a1f466f | |||
| c1ca70adce | |||
| 364520f9a3 | |||
| c0bfe75fd7 | |||
| 1d9618d797 | |||
| 1ac9f823a4 | |||
| 73950690ff | |||
| 2bc79ad2de | |||
| 9ad45b9ea4 | |||
| 89cb9e06f1 | |||
| 3b77f647a6 | |||
| 71c5b20782 | |||
| 08ac48d16e | |||
| 90ac144f2a | |||
| f5b98f803c | |||
| 8f05ef25f6 | |||
| 0022aacbd3 | |||
| ba64c8e231 | |||
| 431c30935c | |||
| 47d0fef508 | |||
| 6decc2f690 | |||
| 2bbd407019 | |||
| abc2c4fe07 | |||
| 2b8342111a | |||
| d57dd30fa0 | |||
| 06d3c53122 | |||
| 5a20897641 | |||
| ae65d448a9 | |||
| df9395e808 | |||
| 402e17b57d | |||
| 3d867dfa3a | |||
| 03a6936f8a | |||
| a4a48f3c3b | |||
| 1d7c390180 | |||
| adb4636513 | |||
| fb0c02e790 | |||
| b5ef4567b6 | |||
| 1a6c2fa340 | |||
| 21784ab491 | |||
| d5147e3dd1 | |||
| bfb1dea84b | |||
| e927a5334a | |||
| 3310eb039c | |||
| 946b4e0e42 | |||
| ff7661f1e0 | |||
| f4eaaf2d59 | |||
| b5fef75133 | |||
| 09035439bd | |||
| 22ed5c599c | |||
| 8822da5d09 | |||
| c4d01b7aff | |||
| c8e962d709 | |||
| cb7819c687 | |||
| ebd9092565 | |||
| 167c6bf39d | |||
| def20a48a3 | |||
| 0945aaf9d0 | |||
| 07dbd89849 | |||
| fa511c5c2c | |||
| 6c065fedfc | |||
| 7858480cde | |||
| c388cb7b21 | |||
| 4d11248b0e | |||
| e2040f2153 | |||
| b19b44f86d | |||
| eb37f8bb8f | |||
| b83a03e36a | |||
| 6d11f6345f | |||
| 32e8cf7923 | |||
| ac2167f5ea | |||
| 8236b0ff96 | |||
| 78cde47c01 | |||
| 2d51bbaeb5 | |||
| 620a87105a | |||
| ab40ad056c | |||
| 62f85d6f92 | |||
| 01ac9d36da | |||
| a466e85b70 | |||
| 5c9fd216bc | |||
| 4685717a8a | |||
| 08ae91e412 | |||
| 145b3ccbe8 | |||
| 4cea9959c9 | |||
| 7118efbc2d | |||
| 4a4613454d | |||
| 45464ab85d | |||
| 22539226e6 | |||
| e9eaff2685 | |||
| 66567d8ec6 | |||
| 1715b5c5b1 | |||
| 2ad4c5af21 | |||
| 27a1618265 | |||
| a3c9d256b4 | |||
| 5c6febf055 | |||
| feecab95ab | |||
| d5a338a902 | |||
| 8763400f06 | |||
| 34ddc826f8 | |||
| 1b3c46fbae | |||
| b05fbac9fe | |||
| 42353d4b04 | |||
| 52ce04727a | |||
| 87b4ebca64 | |||
| c7a50d88b7 | |||
| fef7112f46 | |||
| 98025f02a4 | |||
| f4b4d5ee90 | |||
| 6337113437 | |||
| b7b2606c84 | |||
| c79a584ab7 | |||
| f7435ab895 | |||
| ccd9a70c0c | |||
| 04c8f8eba2 | |||
| e8870ca050 | |||
| 6900eedd63 | |||
| 5848bc2b0c | |||
| 795f202b0c | |||
| e41cb24fc9 | |||
| ed72c7a4e1 | |||
| 8c3ff80547 | |||
| 28de1c6791 | |||
| 4e814d73c6 | |||
| 402015af8a | |||
| e4d1514047 | |||
| 33da807eb5 | |||
| 43a755febd | |||
| 24ed23f161 | |||
| ba6a718119 | |||
| 9a7db0207d | |||
| e35f51e0c8 | |||
| 4502f1162c | |||
| 370b270d95 | |||
| 70f26de43f | |||
| ef626eaaf9 | |||
| 2ebbfd5662 | |||
| 5244caf8e2 | |||
| 89ab7bf961 | |||
| 331b9341be | |||
| fe5d09a8bd | |||
| 312722d3c3 | |||
| 5f37a796e6 | |||
| 0a9fe6f8b6 | |||
| 8f12378299 | |||
| affd519bc8 | |||
| 9434211413 | |||
| 01959dde1f | |||
| fc6c07c613 | |||
| c6e59dd6bb | |||
| fc1f07a01b | |||
| 11d6425de3 | |||
| da79e8b833 | |||
| 4a1bdf2397 | |||
| 40bcfde47c | |||
| 08db55b69f | |||
| 914b7317e8 | |||
| be2c5e1774 | |||
| dcdc612569 | |||
| 6798c0faa5 | |||
| 3758957946 | |||
| cb755b8869 | |||
| ffedabc0f3 | |||
| 557f53bc66 | |||
| 24770cc9f4 | |||
| d07d441e5d | |||
| 2d1de6ccf3 | |||
| 457da42970 | |||
| 527a3bc3b9 | |||
| e6047e51c6 | |||
| 77f225f866 | |||
| 0e662a8799 | |||
| ca2828958d | |||
| 97d6b26df5 | |||
| e01104dba3 | |||
| 443f72d86a | |||
| 794b45e4f3 | |||
| 456a4e6fb0 | |||
| 52b111aff3 | |||
| e3a436ff4d | |||
| cc04872cc1 | |||
| 4075563e9f | |||
| c68efe69be | |||
| bb0a838d91 | |||
| 217a3b6fcc | |||
| a7de0d3b1e | |||
| 77be897037 | |||
| 2ef75b21d0 | |||
| b5066816e1 | |||
| 34e5b6ec55 | |||
| 14e3fa908a | |||
| 81427b38b3 | |||
| d95bd48d9e | |||
| 342472c625 | |||
| 694feab56e | |||
| d7262bfbb6 | |||
| 1f510bfae8 | |||
| a054c472cf | |||
| 24827b336a | |||
| d9681dbcb5 | |||
| dd9ff98329 | |||
| 3fe0400219 | |||
| 5cf6343518 | |||
| 69a2905d9b | |||
| b1254c3247 | |||
| c2a3fdfbd4 | |||
| fd92dbbe23 | |||
| 0218880d93 | |||
| 057d31ab49 | |||
| 1ec1e4539f | |||
| 1c2f87d79f | |||
| 5d0a7705d5 | |||
| e357e54152 | |||
| e598c7af90 | |||
| ab930e2e90 | |||
| 3752846faa | |||
| 7deafdde51 | |||
| 145ba2afda | |||
| 31822c78a4 | |||
| a36313b9b2 | |||
| 9e7be2740e | |||
| 5f6572d0ef | |||
| ce794f55dc | |||
| bd13256399 | |||
| 76bdc0bb19 | |||
| 83bfe07c50 | |||
| cd940ccf7e | |||
| ae7474445d | |||
| ebec1bb583 | |||
| 3ddc441674 | |||
| acd66d7738 | |||
| 7be48bd00a | |||
| 136de45c47 | |||
| 93c4e02633 | |||
| f47bf047b8 | |||
| b0c6bb52f8 | |||
| 7642884442 | |||
| f8dc8d075b | |||
| 927f171cd6 | |||
| 5ca6f13899 | |||
| b68f6bfeee | |||
| cefff881f5 | |||
| 923f1ab7ff | |||
| f1b2e66b97 | |||
| b5daa71abf | |||
| ee558cecd6 | |||
| c87210873f | |||
| 0535036d36 | |||
| 77333dfc9e | |||
| a6b9fcd2ba | |||
| 568e98aec8 | |||
| 4548e468a1 | |||
| a73af5928f | |||
| 5385547af6 | |||
| 46f2db3415 | |||
| 2aa61e5141 | |||
| 007c9c0edc | |||
| ba807e89bc | |||
| 53ca42389e | |||
| 35cc8959da | |||
| 467284d008 | |||
| 51a2cbf17c | |||
| 8e8d1c2a91 | |||
| 7a2c45fc4b | |||
| 19b1b8d984 | |||
| 1767aa7f97 | |||
| 652ce25a83 | |||
| 6c2d3bb7b5 | |||
| 4257a92486 | |||
| ac621d9dc0 | |||
| 6f56ae6686 | |||
| e19032f3cb | |||
| 92b770f448 | |||
| 27d8eb37e8 | |||
| dfb3774943 | |||
| a9b003d9ec | |||
| 8c9f2ce613 | |||
| b833d6c4ec | |||
| 111c59ea46 | |||
| 21a91b5202 | |||
| c1fba27b1f | |||
| 7225bad678 | |||
| 6b2aa1a8d1 | |||
| f95ce8d671 | |||
| 54ed7dc11c | |||
| 69beb83764 | |||
| faa8aada54 | |||
| 4dcd4a1fa0 | |||
| e4178317a9 | |||
| a9b25e1a30 | |||
| 32d099f5cc | |||
| fe21d5e65e | |||
| 241b392036 | |||
| fb90d5a98c | |||
| 9db10d8cde | |||
| aeb60213b6 | |||
| 69111c057a | |||
| 44e97c3452 | |||
| 8112616b96 | |||
| 0f6179bcd1 | |||
| f52f48c57e | |||
| 1d596e8d41 | |||
| 0651a225ff | |||
| 8fbed00523 | |||
| 0bdb218488 | |||
| dae912e76c | |||
| e2d226a0f9 | |||
| b33baf8288 | |||
| 5c3b677c20 | |||
| 30b4b60d53 | |||
| 73978d1ca9 | |||
| 52eec22b63 | |||
| 863605838b | |||
| 9257a2fd3a | |||
| bb68659510 | |||
| 04f3e94e50 | |||
| 5dbb4601a5 | |||
| 25c4864c63 | |||
| ab1bac7a79 | |||
| a286caf8f5 | |||
| ce4aa010ab | |||
| 502a38449f | |||
| 752de23e13 | |||
| 9794378382 | |||
| 8f6cac5d75 | |||
| 4c6e74cac1 | |||
| 505ec32b74 | |||
| 949f0b9c7f | |||
| 7e4b77f321 | |||
| 843ea293a9 | |||
| b52786ef2b | |||
| 1298aeaf85 | |||
| 46d9be852b | |||
| b319b84e20 | |||
| dcad21374b | |||
| 28ca22ee35 | |||
| c4af3eedd4 | |||
| 5e9d068078 | |||
| 791ed3480c | |||
| a26e25b253 | |||
| 1db314e077 | |||
| fb81c84ab2 | |||
| defe2a36d0 | |||
| 71b13d514a | |||
| 6c4bb9d0a7 | |||
| 82d18f368e | |||
| 4152a7aa1b | |||
| 5dd829e205 | |||
| 7218459c24 | |||
| 8592f8d65f | |||
| e5a3f0c68a | |||
| e168545ec8 | |||
| 84a6cf3c2f | |||
| a5c142f25c | |||
| 99bd24fe38 | |||
| 69e010e147 | |||
| ccf903acfc | |||
| 76b96a41e3 | |||
| 44518a00a5 | |||
| 95cf5e2195 | |||
| 5a7e359ab8 | |||
| ea05a73a4b | |||
| d071bcb321 | |||
| 4c27716ba2 | |||
| 6ccb91b658 | |||
| 4f0ba7382e | |||
| bcf45654a2 | |||
| 7ab408c2ea | |||
| 299a09d34d | |||
| bad8f85e26 | |||
| 07262542e3 | |||
| 4c3773c22f | |||
| ee06c05a77 | |||
| 6d3be63778 | |||
| 243b9b6a1a | |||
| f9b94ef999 | |||
| 889e45bf31 | |||
| b6fbf4e425 | |||
| ea0aa78530 | |||
| e539b83041 | |||
| c7bd1dc1f9 | |||
| 474a1c1217 | |||
| 66dbb529e1 | |||
| e32dc440c1 | |||
| 766e758ed1 | |||
| 3041753cb9 | |||
| 4d20011478 | |||
| 78470c8ad0 | |||
| 5666c271a3 | |||
| ace6bbc35c | |||
| 61a634edab | |||
| 5b9be206a7 | |||
| 73bf46d466 | |||
| f4d1728c6a | |||
| 4bac0bb1a3 | |||
| 380f4f337c | |||
| 42f0a18d71 | |||
| b10493ab11 | |||
| 753a07de3b | |||
| 70cb04a2b2 | |||
| 2ec91830e4 | |||
| c211557cdd | |||
| f1bff666c2 | |||
| b4a58d9f4f | |||
| 17dfbf2701 | |||
| 3ec694db3a | |||
| 15c965c5b2 | |||
| 6482a4c1b8 | |||
| 9de7cb546a | |||
| 0a352fe1dd | |||
| f7fdc4aad8 | |||
| 3ed7bb01f8 | |||
| 0fa73dbc06 | |||
| 7f6cbee96e | |||
| be1b98d3d9 | |||
| 13d87a180d | |||
| d827fd0c57 | |||
| eea875458d | |||
| ef5009e274 | |||
| f26e5126b7 | |||
| 42fc5935f3 | |||
| 0dde9fe328 | |||
| 06dbef5ed1 | |||
| e2973d5e31 | |||
| 9d36b42c19 | |||
| 3ba60a9fa6 | |||
| 4dc7629b35 | |||
| 7bb4401cc7 | |||
| aae8557dca | |||
| e980b4203d | |||
| 2aceb33c79 | |||
| 2f0d375b70 | |||
| 044c62fc5e | |||
| a957ae1183 | |||
| e8b262b34a | |||
| d1f3a44aec | |||
| c7a7261070 | |||
| 07d1545ef6 | |||
| b6ace3b35f | |||
| 82e0abbbaf | |||
| 57d087db85 | |||
| 6e22857086 | |||
| cefe870899 | |||
| 4881f35fa3 | |||
| 9f06f6e75d | |||
| 1ae01e0939 | |||
| 35f5266745 | |||
| ae496e7aab | |||
| f6638eea9e | |||
| 1444babea7 | |||
| e975d227f6 | |||
| efc3b5da34 | |||
| 2f78a26dfa | |||
| 59253eb4de | |||
| ae795ae501 | |||
| e0693c6463 | |||
| f804a7ea58 | |||
| b9dd34abd4 | |||
| 7d2e32108e | |||
| c3a306a8fd | |||
| ad9a25556c | |||
| ad796bb971 | |||
| 18f701d3fa | |||
| 445d2c0778 | |||
| 0063ae8ab2 | |||
| cbed398eae | |||
| d6031231e5 | |||
| 93c4c50fa2 | |||
| a1ebb8adb9 | |||
| 52cde60512 | |||
| c9e67777ef | |||
| 2af621914c | |||
| 3d383392f6 | |||
| 0fa9e62487 | |||
| fa283cf17e | |||
| 5a719ab11b | |||
| bfe5de52c6 | |||
| 63e2141024 | |||
| 6e1f08d24a | |||
| d25350bb25 | |||
| d6b3ebf0ae | |||
| f295ca1ac5 | |||
| eba6d775f5 | |||
| e1835d4d94 | |||
| d22b840264 | |||
| c8cf01e724 | |||
| 3c1f9c32eb | |||
| a8778abc97 | |||
| ff7dc48efb | |||
| c39ed46b98 | |||
| d611f66d43 | |||
| 3c1231937a | |||
| bf7300310b | |||
| 903c1eba65 | |||
| 24cfabec05 | |||
| b4e8d68c62 | |||
| f6e411264b | |||
| 708654e98a | |||
| 2b10b7c9d1 | |||
| d15844f55b | |||
| 4e7017041d | |||
| a9290d84ce | |||
| 6c75191729 | |||
| 8cd82722fe | |||
| 4a3be724f3 | |||
| c238d68095 | |||
| 13c86bdcdb | |||
| 37b727c52a | |||
| d56246e95b | |||
| 46d6c2b360 | |||
| 5ac81297ad | |||
| 49fbb772e2 | |||
| 7abb957ab2 | |||
| 9a0fdff213 | |||
| 346da073a3 | |||
| e1d77a37b6 | |||
| eb9fddccaf | |||
| 0a7b93561e | |||
| 4b294c992a | |||
| 211cbd1f9b | |||
| c5507a7543 | |||
| a84d4a0223 | |||
| e41af36b20 | |||
| 15562bd9ca | |||
| 58c7fa5408 | |||
| 651de09d7d | |||
| 23844a542f | |||
| 895af630e3 | |||
| e826a0ed1d | |||
| d79f3aa848 | |||
| 2361e1f6f8 | |||
| f1640f75f8 | |||
| a58f7d9fda | |||
| a20f40085c | |||
| 89975169a2 | |||
| 8a2d9fc4ea | |||
| ed68b0da5c | |||
| 2a5ecc4a09 | |||
| 095d155f1a | |||
| fdc7adb0da | |||
| b67bf887e9 | |||
| ddad3ea228 | |||
| 60032d5336 | |||
| 2d9dcfa12a | |||
| 97727d097e | |||
| bece291a6e | |||
| 80dd455ef3 | |||
| 82bfdb7473 | |||
| 7a0d4f33f1 | |||
| 37df943c08 | |||
| da972cdd0a | |||
| 454024d4bd | |||
| 1828b88382 | |||
| 891bbd4a08 | |||
| 1fb7699382 | |||
| c9f47e23f2 | |||
| c0b007994a | |||
| 18d1368c8c | |||
| 49610fba06 | |||
| da5456b13a | |||
| 1cddcb28dc | |||
| b9517e1cc5 | |||
| f3ed0cf817 | |||
| 26f96d42c6 | |||
| 8624dd6fc6 | |||
| 90dc9ddd4e | |||
| d8c2a94c75 | |||
| f24dcd0bc5 | |||
| 3b368ac504 | |||
| f5ac9ddac2 | |||
| 3f4547179c | |||
| a5866a8eb6 | |||
| ae736a9fff | |||
| 05da1f2d9e | |||
| a8c2154444 | |||
| bac7b490be | |||
| 907e8c355c | |||
| ab2925ba74 | |||
| 747e25315d | |||
| 922b1a4787 | |||
| 1a926d8f49 | |||
| b4140ce9ab | |||
| b6f255695c | |||
| 29250f344c | |||
| b3b7ea865a | |||
| 9903c41009 | |||
| d4fc382a51 | |||
| 846597b01f | |||
| 83e9f051a5 | |||
| 685d899df0 | |||
| 8fcdbca3cf | |||
| 8618fd332e | |||
| 941d896ffa | |||
| 88dd388fe3 | |||
| 7aef151a44 | |||
| d7edf38d57 | |||
| 85f9703353 | |||
| 9aa27dd21d | |||
| f01f6b9ef6 | |||
| b8f8ae8af1 | |||
| c3c45157d3 | |||
| 29accd4f35 | |||
| c6c5936f41 | |||
| 25dd993b7c | |||
| 6f9e4e43bf | |||
| cfefeaa4c5 | |||
| e76f650ced | |||
| 9580911f63 | |||
| d3b4afb8ff | |||
| 26779d2120 | |||
| 4ae90231e1 | |||
| bb55e2acb4 | |||
| 66b2fbca9a | |||
| b977e106ef | |||
| 5f4cd60bd3 | |||
| 6117506135 | |||
| 84fa23e76c | |||
| 5c38d688b1 | |||
| ee7bfba114 | |||
| a8fb99c9cf | |||
| f58fa27908 | |||
| 898f9a7703 | |||
| 8d95fccef2 | |||
| f62792c650 | |||
| fc8730683f | |||
| 2075661927 | |||
| bbb0545ff4 | |||
| e11c3991ac | |||
| f8d7b95149 | |||
| 276a2d21a3 | |||
| 31a06ab64a | |||
| 0b5ae544a5 | |||
| c09a74e92c | |||
| 3b9749ef67 | |||
| a938f2cc6e | |||
| 699bc24318 | |||
| f4b12de2f0 | |||
| 2f8ef75ce7 | |||
| fc1a9828dc | |||
| f7c7e3a7f5 | |||
| 3eb25c3533 | |||
| 208ee3a883 | |||
| 4c1289ed2d | |||
| 91798cdd00 | |||
| dceabbfa37 | |||
| a477a93186 | |||
| dd536c8cbb | |||
| b1ce12e110 | |||
| c28555080a | |||
| 95f867dfe3 | |||
| e5c8544c59 | |||
| 70082e03a5 | |||
| 3f7f352919 | |||
| 60260ea451 | |||
| 2fc81d3258 | |||
| 9d2b78fd4d | |||
| 376f54ab37 | |||
| 07a26632dd | |||
| 23ac186eb1 | |||
| ceb9bf2d18 | |||
| bb772e4a1f | |||
| bab90cf7dc | |||
| 4471fd4564 | |||
| 4d9211ae20 | |||
| e14101134c | |||
| f73e59a434 | |||
| 4ed15194b4 | |||
| c652d5930f | |||
| 23cbb48527 | |||
| ddc36ba729 | |||
| 443bd8e9d8 | |||
| cbcbc3e854 | |||
| 1368f15957 | |||
| c26a186dcb | |||
| a341659996 | |||
| 0857ec3c1b | |||
| 37d6941eeb | |||
| bbdbaf823c | |||
| 2d34c70a1b | |||
| 18745e3158 | |||
| 184fc1ad77 | |||
| 9caf440696 | |||
| b167342437 | |||
| 376cdfaff9 | |||
| ff839b5d8a | |||
| 9b86c92639 | |||
| 8cb610cdf9 | |||
| 24594a4d24 | |||
| ebcba6dec3 | |||
| d99d34af7f | |||
| 084220230c | |||
| 4177c1a0ae | |||
| dbf0d6211b | |||
| c77e8bd6a5 | |||
| 5a39cd80d3 | |||
| 2295305bf1 | |||
| fcff7cfbb7 | |||
| 025c57d78f | |||
| 49d75d575a | |||
| 4e9e17d937 | |||
| bc47a8d419 | |||
| a2ba210f74 | |||
| e5695049fe | |||
| 6b340a6ec8 | |||
| 57e7d8e099 | |||
| ee422c8e17 | |||
| 0457bed4ba | |||
| 49c30cbb5b | |||
| bbf97f7066 | |||
| 814b94bf97 | |||
| 86bd547f8d | |||
| 7dca4d63b4 | |||
| 528bbf6fb6 | |||
| 5b29302b93 | |||
| 2f325ff7fd | |||
| 5ec47d3a9c | |||
| eb52018b83 | |||
| 807759a331 | |||
| 9dccb99d38 | |||
| 9de97768b3 | |||
| daf8045b10 | |||
| f8c2c28ada | |||
| 985c28332f | |||
| 5494838ed4 | |||
| c5308cb6f5 | |||
| 19c42bfa8e | |||
| 32f6f72a1a | |||
| 3a113c97bb | |||
| 515ce5ef33 | |||
| 7fc702df50 | |||
| 272c6f46db | |||
| e64a89f3f1 | |||
| 1ebffd8e93 | |||
| 8d8ae29cc8 | |||
| 6b7d3ce6b5 | |||
| 53ed0b4775 | |||
| 5e69f0dd5c | |||
| 86feb7e9a3 | |||
| 74dfb67dae | |||
| bd9e3def79 | |||
| 2f03f59eea | |||
| 421e2e2214 | |||
| 00d43473f5 | |||
| afe64db075 | |||
| d039e39205 | |||
| 96538f600f | |||
| ca37a2f3c2 | |||
| 415ae0a39c | |||
| b576276c7a | |||
| af17747b38 | |||
| 152d57de16 | |||
| 78505e0f2b | |||
| 540afe7c6a | |||
| 180068f667 | |||
| be50c87b7f | |||
| 11e6cc449c | |||
| cd23546c4b | |||
| f4fb37c9d2 | |||
| a128b42bb4 | |||
| 81d4f42849 | |||
| f9328f9684 | |||
| b99c7b8ba6 | |||
| f82cc3be10 | |||
| fb7b160512 | |||
| bfa01f1d8d | |||
| 44014b9144 | |||
| a25e80dd49 | |||
| e64cbb521b | |||
| 5b7f50686c | |||
| 7ac80309e8 | |||
| fa63d82dc5 | |||
| 4b06fbfaf3 | |||
| a252ff0568 | |||
| cde144de29 | |||
| b7b50ed222 | |||
| 7f9e637626 | |||
| 30aba16ed3 | |||
| f355f80743 | |||
| 60dddcbba4 | |||
| 7b89a46487 | |||
| 21f2695cfe | |||
| dd920d2bff | |||
| f865d73ec3 | |||
| da501c6e68 | |||
| a1bfaeee75 | |||
| b50732100b | |||
| 4e35f56bcb | |||
| f194128738 | |||
| c153189ffa | |||
| 7b2425773d | |||
| 4dc269ebf7 | |||
| 7599503601 | |||
| 9ceed14f85 | |||
| ffd4ae2e46 | |||
| 8f0b47bd64 | |||
| 6295d882a0 | |||
| 3bd0d4759f | |||
| c1b7e80d6f | |||
| 9e5bbfcb39 | |||
| 7c06122527 | |||
| 90dc459d99 | |||
| 48957218be | |||
| cc1eb18ca2 | |||
| 79da5a3ac0 | |||
| 42424414b3 | |||
| 78106ea7ca | |||
| e2cc1b3ae8 | |||
| 75c791666a | |||
| 29c371fcae | |||
| 0698dd4c0c | |||
| 636abf6402 | |||
| 2ece2b096a | |||
| 6e6861b803 | |||
| a8bcb1cef3 | |||
| ca749abe53 | |||
| 2d366b5ac2 | |||
| 95a70cb6d4 | |||
| 1697185723 | |||
| c04a38177a | |||
| ee872d762c | |||
| 0560862d5f | |||
| 7b72f03b9b | |||
| bb2e666695 | |||
| 26b802c5ed | |||
| 969eb267af | |||
| b6bced549f | |||
| 463d4962e0 | |||
| ec4eb8adb5 | |||
| a5f05181c4 | |||
| 3dbd1b43ea | |||
| b8c8ec9e79 | |||
| 07231a4bcf | |||
| d93f1fae04 | |||
| b1994e504a | |||
| 7e34c83653 | |||
| e1e388ff9d | |||
| 8a5a1997b3 | |||
| a522044c12 | |||
| 6483a2812d | |||
| 19d1344263 | |||
| b34580450f | |||
| 5609e073bb | |||
| 475a8299bd | |||
| ac7d85ce9d | |||
| 7e07024942 | |||
| 3dd82f8c16 |
@@ -327,3 +327,4 @@ _UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
|
||||
.ionide/symbolCache.db
|
||||
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
variables:
|
||||
NUGET_PATH: 'C:\Tools\nuget.exe'
|
||||
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
|
||||
ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools'
|
||||
EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\GPW\Release'
|
||||
DEPLOY_FOLDER: 'c:\Projects\Deploy\GPW\Builds'
|
||||
APP_NAME: 'EgtBEAMWALL'
|
||||
APP_NAMEG: 'EgtBEAMWALL'
|
||||
NEW_REL: ''
|
||||
VERS_RD: 'Release'
|
||||
ARCH: 'x86'
|
||||
ARCH64: 'x64'
|
||||
OUTPUT_DIR: ''
|
||||
NET_SHARE: '\\10.74.82.201\Artifacts\EgtProg\EgtBEAMWALL'
|
||||
NET_USER: 'steamw\steamware'
|
||||
|
||||
# helper x mount cartella Artifacts su truenas
|
||||
.ReplicaCompiled: &ReplicaCompiled
|
||||
- |
|
||||
rm -Recurse Z:\$CI_COMMIT_BRANCH\$env:ARCH\*.*
|
||||
rm -Recurse Z:\$CI_COMMIT_BRANCH\$env:ARCH\*.*
|
||||
ROBOCOPY /E $env:APP_NAME\bin\$env:ARCH\$env:VERS_RD Z:\$CI_COMMIT_BRANCH\$env:ARCH /XF *.xml /XF *.pdb
|
||||
ROBOCOPY /E $env:APP_NAME2\bin\$env:ARCH\$env:VERS_RD Z:\$CI_COMMIT_BRANCH\$env:ARCH /XF *.xml /XF *.pdb
|
||||
SLEEP 2
|
||||
net use Z: /delete
|
||||
|
||||
.ReplicaCompileds2: &ReplicaCompileds2
|
||||
- |
|
||||
ROBOCOPY /E $env:APP_NAME\bin\$env:ARCH64\$env:VERS_RD Z:\$CI_COMMIT_BRANCH\$env:ARCH64 /XF *.xml /XF *.pdb
|
||||
ROBOCOPY /E $env:APP_NAME2\bin\$env:ARCH64\$env:VERS_RD Z:\$CI_COMMIT_BRANCH\$env:ARCH64 /XF *.xml /XF *.pdb
|
||||
SLEEP 2
|
||||
net use Z: /delete
|
||||
|
||||
.MakeFolderM: &MakeFolderM
|
||||
- |
|
||||
net use Z: /delete
|
||||
new-item c:\EgtProg\EgtBEAMWALL -itemtype directory
|
||||
net use Z: $env:NET_SHARE
|
||||
|
||||
.nuget-fix: &nuget-fix
|
||||
- |
|
||||
$hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C
|
||||
if ($hasSource -eq 0) {
|
||||
C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`""
|
||||
} else {
|
||||
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`""
|
||||
}
|
||||
echo $hasSource
|
||||
|
||||
|
||||
# helper creazione hash files
|
||||
.hashBuild: &hashBuild
|
||||
- |
|
||||
$Target = "Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
|
||||
$MD5 = Get-FileHash $Target -Algorithm MD5
|
||||
$SHA1 = Get-FileHash $Target -Algorithm SHA1
|
||||
New-Item $Target".md5"
|
||||
New-Item $Target".sha1"
|
||||
$MD5.Hash | Set-Content -Path $Target".md5"
|
||||
$SHA1.Hash | Set-Content -Path $Target".sha1"
|
||||
|
||||
echo "Created HASH files for $Target"
|
||||
|
||||
.cleanup-dir: &cleanup-dir
|
||||
- |
|
||||
rm $env:APP_NAME\bin\$env:ARCH\$env:VERS_RD\*.xml
|
||||
rm $env:APP_NAME\bin\$env:ARCH\$env:VERS_RD\*.pdb
|
||||
rm $env:APP_NAME\bin\$env:ARCH64\$env:VERS_RD\*.xml
|
||||
rm $env:APP_NAME\bin\$env:ARCH64\$env:VERS_RD\*.pdb
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
X86:build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
only:
|
||||
- main
|
||||
- master
|
||||
- develop
|
||||
variables:
|
||||
APP_NAME: EgtBEAMWALL.Supervisor
|
||||
APP_NAME2: EgtBEAMWALL.ViewerOptimizer
|
||||
VERS_RD: 'Release'
|
||||
ARCH: 'x86'
|
||||
ARCH64: 'x64'
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- '& "$env:NUGET_PATH" restore EgtBEAMWALL.sln -verbosity quiet'
|
||||
- *MakeFolderM
|
||||
script:
|
||||
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.vbproj" -target:Build /p:Configuration=$env:VERS_RD /p:Platform="$env:ARCH" /p:OutputPath=bin/$env:ARCH/$env:VERS_RD/ /verbosity:minimal /m'
|
||||
- '& "$env:MSBUILD_PATH" "$env:APP_NAME2\$env:APP_NAME2.vbproj" -target:Build /p:Configuration=$env:VERS_RD /p:Platform="$env:ARCH" /p:OutputPath=bin/$env:ARCH/$env:VERS_RD/ /verbosity:minimal /m'
|
||||
- *ReplicaCompiled
|
||||
|
||||
|
||||
X64:build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
only:
|
||||
- main
|
||||
- master
|
||||
- develop
|
||||
variables:
|
||||
APP_NAME: EgtBEAMWALL.Supervisor
|
||||
APP_NAME2: EgtBEAMWALL.ViewerOptimizer
|
||||
VERS_RD: 'Release'
|
||||
ARCH: 'x86'
|
||||
ARCH64: 'x64'
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- '& "$env:NUGET_PATH" restore EgtBEAMWALL.sln -verbosity quiet'
|
||||
- *MakeFolderM
|
||||
script:
|
||||
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.vbproj" -target:Build /p:Configuration=$env:VERS_RD /p:Platform="$env:ARCH64" /p:OutputPath=bin/$env:ARCH64/$env:VERS_RD/ /verbosity:minimal /m'
|
||||
- '& "$env:MSBUILD_PATH" "$env:APP_NAME2\$env:APP_NAME2.vbproj" -target:Build /p:Configuration=$env:VERS_RD /p:Platform="$env:ARCH64" /p:OutputPath=bin/$env:ARCH64/$env:VERS_RD/ /verbosity:minimal /m'
|
||||
- *ReplicaCompileds2
|
||||
|
||||
+254
-144
@@ -1,15 +1,12 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class BTLFeatureM
|
||||
|
||||
' Feature a cui appartiene il parametro
|
||||
Protected m_ParentPart As BTLPartM
|
||||
Public ReadOnly Property ParentPart As BTLPartM
|
||||
Protected m_ParentPart As Object
|
||||
Public ReadOnly Property ParentPart As Object
|
||||
Get
|
||||
Return m_ParentPart
|
||||
End Get
|
||||
@@ -90,6 +87,16 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nPriority As Integer = 0
|
||||
Public Overridable Property nPriority As Integer
|
||||
Get
|
||||
Return m_nPriority
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPriority = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Nome
|
||||
Protected m_sName As String
|
||||
Public ReadOnly Property sName As String
|
||||
@@ -121,6 +128,16 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_VARIANTList As New ObservableCollection(Of Integer)()
|
||||
Public Property VARIANTList As ObservableCollection(Of Integer)
|
||||
Get
|
||||
Return m_VARIANTList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of Integer))
|
||||
m_VARIANTList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sDES As String = String.Empty
|
||||
Public Property sDES As String
|
||||
Get
|
||||
@@ -131,6 +148,16 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overridable Property nSelVARIANT As Integer
|
||||
Get
|
||||
Dim nDes As Integer = 0
|
||||
Return If(Integer.TryParse(m_sDES, nDes), nDes, 0)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_sDES = value.ToString()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_frFRAME As New Frame3d
|
||||
Public Property frFRAME As Frame3d
|
||||
Get
|
||||
@@ -171,20 +198,10 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_FALL As Integer
|
||||
Public Property nCALC_FALL As Integer
|
||||
Get
|
||||
Return m_nCALC_FALL
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_FALL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sCALC_MSG As String
|
||||
Public Property sCALC_MSG As String
|
||||
Get
|
||||
Return m_sCALC_MSG
|
||||
Return MessageFromLuaMsg(m_sCALC_MSG)
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sCALC_MSG = value
|
||||
@@ -202,17 +219,6 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' lista dei parametri della feature
|
||||
Protected m_QBTLParamMList As List(Of BTLParamM)
|
||||
Public Property QBTLParamMList As List(Of BTLParamM)
|
||||
Get
|
||||
Return m_QBTLParamMList
|
||||
End Get
|
||||
Set(value As List(Of BTLParamM))
|
||||
m_QBTLParamMList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "MESSAGES"
|
||||
|
||||
Public ReadOnly Property Name_Msg As String
|
||||
@@ -244,95 +250,101 @@ Public Class BTLFeatureM
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Protected Sub New()
|
||||
CreateVariantList()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewBTLFeature() As BTLFeatureM
|
||||
Return New BTLFeatureM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateBTLFeature(ParentPart As BTLPartM, nFeatureId As Integer) As BTLFeatureM
|
||||
Public Shared Function CreateBTLFeature(ParentPart As Object, nFeatureId As Integer, Optional bIsBTL As Boolean = True) As BTLFeatureM
|
||||
Dim NewBTLFeature As New BTLFeatureM
|
||||
NewBTLFeature.m_ParentPart = ParentPart
|
||||
NewBTLFeature.m_nFeatureId = nFeatureId
|
||||
' leggo gruppo, numero feature e lato
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_GRP, NewBTLFeature.nSelGRP)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRC, NewBTLFeature.nPRC)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_SIDE, NewBTLFeature.nSelSIDE)
|
||||
' leggo gruppo, numero feature, lato e priorità
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_GRP, NewBTLFeature.m_nSelGRP)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRC, NewBTLFeature.m_nPRC)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_SIDE, NewBTLFeature.m_nSelSIDE)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, NewBTLFeature.m_nPriority)
|
||||
Dim nDO As Integer = 1
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_DO, nDO) Then
|
||||
NewBTLFeature.bDO = (nDO <> 0)
|
||||
NewBTLFeature.m_bDO = (nDO <> 0)
|
||||
Else
|
||||
NewBTLFeature.bDO = True
|
||||
NewBTLFeature.m_bDO = True
|
||||
End If
|
||||
' leggo des,prid e frame
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_DES, NewBTLFeature.sDES)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRID, NewBTLFeature.nPRID)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_FRAME, NewBTLFeature.frFRAME)
|
||||
' leggo calc error
|
||||
Dim nErr As Integer = 0
|
||||
Dim nRot As Integer = 0
|
||||
Dim nFall As Integer = 0
|
||||
Dim sMsg As String = ""
|
||||
Dim bCalc As Boolean = False
|
||||
bCalc = EgtGetInfo(NewBTLFeature.nFeatureId, ITG_PROJ_ERR, nErr)
|
||||
EgtGetInfo(nFeatureId, ITG_PROJ_ROT, nRot)
|
||||
EgtGetInfo(nFeatureId, ITG_PROJ_FALL, nFall)
|
||||
EgtGetInfo(nFeatureId, ITG_PROJ_MSG, sMsg)
|
||||
If Not bCalc Then
|
||||
NewBTLFeature.nState = CalcStates.NOTCALCULATED
|
||||
NewBTLFeature.nCALC_ERR = 0
|
||||
NewBTLFeature.nCALC_ROT = 0
|
||||
NewBTLFeature.nCALC_FALL = 0
|
||||
NewBTLFeature.sCALC_MSG = ""
|
||||
Else
|
||||
NewBTLFeature.nCALC_ERR = nErr
|
||||
NewBTLFeature.nCALC_ROT = nRot
|
||||
NewBTLFeature.nCALC_FALL = nFall
|
||||
NewBTLFeature.sCALC_MSG = sMsg
|
||||
If nErr = 0 Then
|
||||
NewBTLFeature.nState = 0
|
||||
ElseIf nErr > 1 Then
|
||||
NewBTLFeature.nState = 1
|
||||
ElseIf nErr < 1 Then
|
||||
NewBTLFeature.nState = -1
|
||||
End If
|
||||
End If
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_DES, NewBTLFeature.m_sDES)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRID, NewBTLFeature.m_nPRID)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_FRAME, NewBTLFeature.m_frFRAME)
|
||||
' leggo parametri della feature
|
||||
GetBeamPrivateProfileGRPList(CalcBeamPrivateProfileGRP(NewBTLFeature.nSelGRP), NewBTLFeature.nPRC, NewBTLFeature.GRPList)
|
||||
GetBeamPrivateProfileName(NewBTLFeature.nSelGRP, NewBTLFeature.nPRC, NewBTLFeature)
|
||||
GetBeamPrivateProfileGRPList(CalcBeamPrivateProfileGRP(NewBTLFeature.m_nSelGRP), NewBTLFeature.m_nPRC, NewBTLFeature.m_GRPList)
|
||||
GetBeamPrivateProfileName(NewBTLFeature.m_nSelGRP, NewBTLFeature.m_nPRC, NewBTLFeature)
|
||||
' crea parametri per questa feature da file ini
|
||||
NewBTLFeature.CreateFeatureParams(NewBTLFeature)
|
||||
' leggo parametri delle feature
|
||||
NewBTLFeature.ReadFeatureParams()
|
||||
' leggo calc error
|
||||
Dim nErr As Integer = 0
|
||||
Dim nRot As Integer = 0
|
||||
Dim sMsg As String = ""
|
||||
Dim bCalc As Boolean = False
|
||||
If bIsBTL Then
|
||||
bCalc = EgtGetInfo(NewBTLFeature.nFeatureId, ITG_PROJ_ERR, nErr)
|
||||
EgtGetInfo(nFeatureId, ITG_PROJ_ROT, nRot)
|
||||
EgtGetInfo(nFeatureId, ITG_PROJ_MSG, sMsg)
|
||||
Else
|
||||
bCalc = EgtGetInfo(NewBTLFeature.nFeatureId, ITG_PROD_ERR, nErr)
|
||||
EgtGetInfo(nFeatureId, ITG_PROD_ROT, nRot)
|
||||
EgtGetInfo(nFeatureId, ITG_PROD_MSG, sMsg)
|
||||
End If
|
||||
If Not bCalc Then
|
||||
NewBTLFeature.m_nState = CalcStates.NOTCALCULATED
|
||||
NewBTLFeature.m_nCALC_ERR = 0
|
||||
NewBTLFeature.m_nCALC_ROT = 0
|
||||
NewBTLFeature.m_sCALC_MSG = ""
|
||||
Else
|
||||
NewBTLFeature.m_nCALC_ERR = nErr
|
||||
NewBTLFeature.m_nCALC_ROT = nRot
|
||||
NewBTLFeature.m_sCALC_MSG = sMsg
|
||||
Select Case nErr
|
||||
Case 0
|
||||
NewBTLFeature.nState = CalcStates.OK
|
||||
Case 22
|
||||
NewBTLFeature.nState = CalcStates.COLLISION
|
||||
Case 17, 19
|
||||
NewBTLFeature.nState = CalcStates.WARNING
|
||||
Case < 0
|
||||
NewBTLFeature.nState = CalcStates.INFO
|
||||
Case > 0
|
||||
NewBTLFeature.nState = CalcStates.ERROR_
|
||||
End Select
|
||||
End If
|
||||
Return NewBTLFeature
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateBTLFeature(nPRC As Integer, nGRP As Integer, nSIDE As Integer) As BTLFeatureM
|
||||
Dim NewBTLFeature As New BTLFeatureM
|
||||
NewBTLFeature.nPRC = nPRC
|
||||
NewBTLFeature.nSelGRP = nGRP
|
||||
NewBTLFeature.nSelSIDE = nSIDE
|
||||
NewBTLFeature.bDO = True
|
||||
Dim NewBTLFeature As New BTLFeatureM With {
|
||||
.m_nPRC = nPRC,
|
||||
.m_nSelGRP = nGRP,
|
||||
.m_nSelSIDE = nSIDE,
|
||||
.m_nPriority = 0,
|
||||
.m_bDO = True,
|
||||
.nSelVARIANT = 0
|
||||
}
|
||||
' crea parametri per questa feature da file ini
|
||||
NewBTLFeature.CreateFeatureParams(NewBTLFeature)
|
||||
Return NewBTLFeature
|
||||
End Function
|
||||
|
||||
'Sub New(ParentPart As BTLPartM, nFeatureId As Integer)
|
||||
' m_ParentPart = ParentPart
|
||||
' m_nFeatureId = nFeatureId
|
||||
' m_PParamList = New ObservableCollection(Of BTLParam)
|
||||
' m_QParamList = New ObservableCollection(Of BTLParam)
|
||||
'End Sub
|
||||
|
||||
'Sub New(nPRC As Integer, nGRP As Integer, nSIDE As Integer)
|
||||
' m_PParamList = New ObservableCollection(Of BTLParam)
|
||||
' m_QParamList = New ObservableCollection(Of BTLParam)
|
||||
' m_nPRC = nPRC
|
||||
' m_nSelGRP = nGRP
|
||||
' m_nSelSIDE = nSIDE
|
||||
' m_bDO = True
|
||||
'End Sub
|
||||
Private Sub CreateVariantList()
|
||||
Dim sMaxIndex As String = ""
|
||||
Dim nMaxIndex As Integer = 0
|
||||
EgtUILib.GetPrivateProfileString([VARIANT], K_MAXINDEX, "", sMaxIndex, m_sBTLIniFile)
|
||||
Integer.TryParse(sMaxIndex, nMaxIndex)
|
||||
For Index As Integer = 0 To nMaxIndex
|
||||
m_VARIANTList.Add(Index)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
@@ -348,20 +360,10 @@ Public Class BTLFeatureM
|
||||
RaiseEvent PBTLParamAdded(Me, New BTLParamAddedEventArgs(BTLparamM))
|
||||
End If
|
||||
End Sub
|
||||
Public Sub AddQBTLParam(BTLparamM As BTLParamM)
|
||||
If IsNothing(BTLparamM) Then Return
|
||||
If Not m_QBTLParamMList.Contains(BTLparamM) Then
|
||||
m_QBTLParamMList.Add(BTLparamM)
|
||||
RaiseEvent QBTLParamAdded(Me, New BTLParamAddedEventArgs(BTLparamM))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function GetPBTLParams() As List(Of BTLParamM)
|
||||
Return New List(Of BTLParamM)(m_PBTLParamMList)
|
||||
End Function
|
||||
Public Function GetQBTLParams() As List(Of BTLParamM)
|
||||
Return New List(Of BTLParamM)(m_QBTLParamMList)
|
||||
End Function
|
||||
|
||||
' funzione che crea l'elenco dei parametri
|
||||
Public Sub CreateFeatureParams(NewBTLFeature As BTLFeatureM)
|
||||
@@ -369,58 +371,124 @@ Public Class BTLFeatureM
|
||||
Dim TempList As New List(Of BTLParamM)
|
||||
Dim NewBTLParam As BTLParamM = Nothing
|
||||
' leggo tutti i P della feature
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, True, ParamIndex, Me, NewBTLParam)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, True, ParamIndex, Me, NewBTLParam)
|
||||
TempList.Add(NewBTLParam)
|
||||
ParamIndex += 1
|
||||
End While
|
||||
If TempList.Count <= 0 Then
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, 0, True, ParamIndex, Me, NewBTLParam)
|
||||
TempList.Add(NewBTLParam)
|
||||
ParamIndex += 1
|
||||
End While
|
||||
End If
|
||||
NewBTLFeature.PBTLParamMList = TempList
|
||||
' leggo tutti i Q della feature
|
||||
ParamIndex = 1
|
||||
TempList = New List(Of BTLParamM)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, False, ParamIndex, Me, NewBTLParam)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, False, ParamIndex, Me, NewBTLParam)
|
||||
TempList.Add(NewBTLParam)
|
||||
ParamIndex += 1
|
||||
End While
|
||||
NewBTLFeature.QBTLParamMList = TempList
|
||||
End Sub
|
||||
|
||||
' funzione che legge il valore corrente del parametro
|
||||
Public Function ReadFeatureParams() As Boolean
|
||||
Return ReadFeatureParams(m_PBTLParamMList) And ReadFeatureParams(m_QBTLParamMList)
|
||||
Return ReadFeatureParams(m_PBTLParamMList)
|
||||
End Function
|
||||
Private Function ReadFeatureParams(ParamList As List(Of BTLParamM)) As Boolean
|
||||
Dim bToRecalc As Boolean = False
|
||||
' leggo valore parametro da struttura geometrica
|
||||
For Each Param As BTLParamM In ParamList
|
||||
If Param.nType = BTLParamType.DOUBLE_ Or Param.nType = BTLParamType.LENGTH Then
|
||||
Dim dParamValue As Double = 0
|
||||
If Not EgtGetInfo(m_nFeatureId, Param.sName, dParamValue) Then
|
||||
Dim sReadName As String = Param.sName
|
||||
If IsFreeContour() Then
|
||||
Select Case Param.sName
|
||||
Case "P05"
|
||||
sReadName = "DEPTH"
|
||||
Case "P07"
|
||||
sReadName = "PCKT"
|
||||
Case "P13"
|
||||
sReadName = "CNT_TYPE"
|
||||
Case "P14"
|
||||
sReadName = "CNT_DATA"
|
||||
Case "P15"
|
||||
sReadName = "CNT_PAR"
|
||||
End Select
|
||||
End If
|
||||
If Not EgtGetInfo(m_nFeatureId, sReadName, dParamValue) Then
|
||||
dParamValue = 0
|
||||
End If
|
||||
Param.dValue = dParamValue
|
||||
' se è un parametro P setto il valore letto nel DB
|
||||
If Param.bIsP Then
|
||||
Param.SetValue(dParamValue)
|
||||
Else
|
||||
' recupero info Custom
|
||||
Dim nCustom As Integer = 0
|
||||
EgtGetInfo(nFeatureId, Param.sName & "A", nCustom)
|
||||
'se pezzo parent di tipo Part
|
||||
If TypeOf m_ParentPart Is PartM Then
|
||||
Param.SetValue(dParamValue)
|
||||
' se è un parametro Q verifico nel progetto se sia un valore custom
|
||||
ElseIf nCustom = 1 Then
|
||||
Param.SetValue(dParamValue)
|
||||
Param.bCustom = True
|
||||
' altrimenti lo setto al valore di default
|
||||
Else
|
||||
Param.SetValue(Param.dDefault)
|
||||
Dim dReadValue As Double = 0
|
||||
EgtGetInfo(m_nFeatureId, Param.sName, dReadValue)
|
||||
If dReadValue <> Param.dDefault Then
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
EgtSetInfo(m_nFeatureId, Param.sName, Param.dDefault)
|
||||
'se pezzo parent di tipo BTL
|
||||
If TypeOf m_ParentPart Is BTLPartM AndAlso m_bDO Then
|
||||
Dim BTLPartM As BTLPartM = DirectCast(m_ParentPart, BTLPartM)
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_ERR)
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_MSG)
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_FALL)
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_ROT)
|
||||
End If
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
bToRecalc = True
|
||||
End If
|
||||
Param.bCustom = False
|
||||
End If
|
||||
End If
|
||||
ElseIf Param.nType = BTLParamType.STRING_ Then
|
||||
Dim sParamValue As String = String.Empty
|
||||
EgtGetInfo(m_nFeatureId, Param.sName, sParamValue)
|
||||
Param.sValue = sParamValue
|
||||
Param.SetValue(sParamValue)
|
||||
ElseIf Param.nType = BTLParamType.COMBO Then
|
||||
Dim nParamValue As Integer
|
||||
EgtGetInfo(m_nFeatureId, Param.sName, nParamValue)
|
||||
Param.nSelValue = nParamValue
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
' Se necessario ricalcolo, lo eseguo
|
||||
If Not IsFreeContour() And bToRecalc Then
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
UpdateParams()
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' funzione che setta i valori di default a tutti i parametri
|
||||
Public Function SetDefaultValues() As Boolean
|
||||
Return SetDefaultValues(m_PBTLParamMList) And SetDefaultValues(m_QBTLParamMList)
|
||||
Return SetDefaultValues(m_PBTLParamMList)
|
||||
End Function
|
||||
Private Function SetDefaultValues(ParamList As List(Of Core.BTLParamM)) As Boolean
|
||||
' leggo valore parametro da struttura geometrica
|
||||
For Each Param As BTLParamM In ParamList
|
||||
If Param.nType = BTLParamType.DOUBLE_ Or Param.nType = BTLParamType.LENGTH Then
|
||||
Param.dValue = Param.dDefault
|
||||
Param.SetValue(Param.dDefault)
|
||||
ElseIf Param.nType = BTLParamType.STRING_ Then
|
||||
Param.sValue = ""
|
||||
Param.SetValue(Param.sDefault)
|
||||
ElseIf Param.nType = BTLParamType.COMBO Then
|
||||
Param.nSelValue = Param.dDefault
|
||||
End If
|
||||
@@ -429,55 +497,68 @@ Public Class BTLFeatureM
|
||||
End Function
|
||||
|
||||
' funzione che calcola array dei valori dei parametri
|
||||
Public Function CalcParamArray(ByRef vPar() As Double, ByRef sPar As String) As Boolean
|
||||
Public Function CalcParamArray(ByRef vPar() As Double, ByRef sPar As String, ByRef vParQ() As String) As Boolean
|
||||
' verifico che lista parametri non sia vuota
|
||||
If IsNothing(m_PBTLParamMList) OrElse m_PBTLParamMList.Count = 0 Then Return False
|
||||
' caclcolo lunghezza array
|
||||
Dim nLastParId As Integer = m_PBTLParamMList(m_PBTLParamMList.Count - 1).nId - 1
|
||||
Dim vTempPar(nLastParId) As Double
|
||||
Dim sTempPar As String = String.Empty
|
||||
' carico tutti i parametri su array
|
||||
For ParIndex = 0 To m_PBTLParamMList.Count - 1
|
||||
Dim BTLPar As BTLParamM = DirectCast(m_PBTLParamMList(ParIndex), BTLParamM)
|
||||
Select Case BTLPar.nType
|
||||
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
|
||||
vTempPar(BTLPar.nId - 1) = BTLPar.dValue
|
||||
Case BTLParamType.STRING_
|
||||
sTempPar = BTLPar.sValue
|
||||
'Case BTLParamType.COMBO
|
||||
' Dim cBTLPar As BTLParamCombo = DirectCast(ParentFeature.PParamList(ParIndex), BTLParamCombo)
|
||||
' vPar(ParIndex) = cBTLPar.
|
||||
End Select
|
||||
Next
|
||||
vPar = vTempPar
|
||||
If String.IsNullOrEmpty(sTempPar) Then
|
||||
sPar = " "
|
||||
Else
|
||||
sPar = sTempPar
|
||||
If Not IsNothing(m_PBTLParamMList) AndAlso m_PBTLParamMList.Count > 0 Then
|
||||
' calcolo lunghezza array Parametri
|
||||
Dim nLastParId As Integer = m_PBTLParamMList(m_PBTLParamMList.Count - 1).nId - 1
|
||||
Dim vTempPar(nLastParId) As Double
|
||||
Dim sTempPar As String = String.Empty
|
||||
' carico tutti i parametri su array
|
||||
For ParIndex = 0 To m_PBTLParamMList.Count - 1
|
||||
Dim BTLPar As BTLParamM = DirectCast(m_PBTLParamMList(ParIndex), BTLParamM)
|
||||
Select Case BTLPar.nType
|
||||
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
|
||||
vTempPar(BTLPar.nId - 1) = BTLPar.dValue
|
||||
Case BTLParamType.STRING_
|
||||
sTempPar = BTLPar.sValue
|
||||
End Select
|
||||
Next
|
||||
vPar = vTempPar
|
||||
sPar = If(String.IsNullOrEmpty(sTempPar), " ", sTempPar)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' funzione che aggiorna parametri della feature
|
||||
Public Function UpdateParams(nNewGRP As Integer, nNewPRC As Integer, nNewSIDE As Integer, sNewDesc As String, nNewProcId As Integer,
|
||||
frNewRef As Frame3d, vNewPar() As Double, sNewPar As String) As Boolean
|
||||
' aggiorno la feature con nuovo valore
|
||||
Dim vPar() As Double = Nothing
|
||||
frNewRef As Frame3d, vNewParP() As Double, sNewPar As String, vNewParQ As String(), Optional bUpdate As Boolean = True) As Boolean
|
||||
' Recupero parametri originali della feature
|
||||
Dim vPar() As Double = {}
|
||||
Dim sPar As String = String.Empty
|
||||
CalcParamArray(vPar, sPar)
|
||||
Dim vParQ() As String = {}
|
||||
CalcParamArray(vPar, sPar, vParQ)
|
||||
' recupero eventuali percorsi originali della feature
|
||||
Dim nCrvId As Integer = GDB_ID.NULL
|
||||
Dim nCrv2Id As Integer = GDB_ID.NULL
|
||||
GetFreeContourPaths(nCrvId, nCrv2Id)
|
||||
' modifica della feature con i nuovi parametri
|
||||
Dim nFeatureId As Integer = EgtBeamModifyProcess(Me.nFeatureId, nNewGRP, nNewPRC, nNewSIDE, sNewDesc, nNewProcId,
|
||||
frNewRef, vNewPar, sNewPar)
|
||||
If nFeatureId <> GDB_ID.NULL Then
|
||||
frNewRef, vNewParP, sNewPar, vNewParQ, nCrvId, nCrv2Id, bUpdate)
|
||||
Dim bOk As Boolean = nFeatureId <> GDB_ID.NULL
|
||||
If bOk Then
|
||||
EgtSetInfo(nFeatureId, BTL_FTR_PRIORITY, nPriority)
|
||||
SetFeatureId(nFeatureId)
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(ParentPart.nPartId)
|
||||
Return True
|
||||
MyMachGroupPanelM.SetDuploModified(ParentPart.nPartId)
|
||||
bOk = True
|
||||
Else
|
||||
MessageBox.Show("Impossible create feature with this values", "Error")
|
||||
nFeatureId = EgtBeamModifyProcess(Me.nFeatureId, Me.nSelGRP, Me.nPRC, Me.nSelSIDE, "", Me.nPRID, New Frame3d(), vPar, sPar)
|
||||
' Impossibile creare una feature con questi valori - ERRORE
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61852), EgtMsg(30007))
|
||||
nFeatureId = EgtBeamModifyProcess(Me.nFeatureId, Me.nSelGRP, Me.nPRC, Me.nSelSIDE, "", Me.nPRID,
|
||||
Me.frFRAME, vPar, sPar, vParQ, nCrvId, nCrv2Id)
|
||||
SetFeatureId(nFeatureId)
|
||||
Return False
|
||||
bOk = False
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
Public Function UpdateParams(Optional bUpdate As Boolean = True) As Boolean
|
||||
' aggiorno la feature con nuovo valore
|
||||
Dim vPar() As Double = {}
|
||||
Dim sPar As String = String.Empty
|
||||
Dim vParQ() As String = {}
|
||||
CalcParamArray(vPar, sPar, vParQ)
|
||||
Return UpdateParams(Me.nSelGRP, Me.nPRC, Me.nSelSIDE, Me.sDES, Me.nPRID, Me.frFRAME, vPar, sPar, vParQ, bUpdate)
|
||||
End Function
|
||||
|
||||
' funzione che restituisce se la feature è un contorno libero
|
||||
@@ -485,6 +566,35 @@ Public Class BTLFeatureM
|
||||
Return m_nPRC = 250 OrElse m_nPRC = 251 OrElse m_nPRC = 252
|
||||
End Function
|
||||
|
||||
' funzione che restituisce i percorsi associati ai contorni liberi
|
||||
Public Function GetFreeContourPaths(ByRef nCrvId As Integer, ByRef nCrv2Id As Integer) As Boolean
|
||||
' imposto eventuali percorsi
|
||||
nCrvId = GDB_ID.NULL
|
||||
nCrv2Id = GDB_ID.NULL
|
||||
If IsFreeContour() Then
|
||||
Dim sAuxId As String = ""
|
||||
If EgtGetInfo(nFeatureId, "AUXID", sAuxId) Then
|
||||
Dim sAuxIdSplit() As String = sAuxId.Split(","c)
|
||||
Dim nAuxId As Integer
|
||||
If Integer.TryParse(sAuxIdSplit(0), nAuxId) Then
|
||||
nCrvId = nFeatureId + nAuxId
|
||||
Dim nAux2Id As Integer
|
||||
If sAuxIdSplit.Count > 1 Then
|
||||
If Integer.TryParse(sAuxIdSplit(1), nAux2Id) Then
|
||||
nCrv2Id = nFeatureId + nAux2Id
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' funzione che restituisce se la feature è un Variant
|
||||
Public Function IsVariant() As Boolean
|
||||
Return m_nPRC = 900
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -1,13 +1,7 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class BTLParamM
|
||||
|
||||
|
||||
' parametro che dice se il parametro e' P o Q
|
||||
Protected m_bIsP As Boolean = True
|
||||
Public ReadOnly Property bIsP As Boolean
|
||||
@@ -16,6 +10,17 @@ Public Class BTLParamM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' parametro che dice se il parametro e' stato modificato
|
||||
Protected m_bIsModified As Boolean
|
||||
Public Property bIsModified As Boolean
|
||||
Get
|
||||
Return m_bIsModified
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsModified = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' parametri da struttura
|
||||
Protected m_sName As String
|
||||
Public Property sName As String
|
||||
@@ -82,6 +87,10 @@ Public Class BTLParamM
|
||||
m_dValue = value
|
||||
End Set
|
||||
End Property
|
||||
Public Sub SetValue(value As Double)
|
||||
m_dValue = value
|
||||
End Sub
|
||||
|
||||
Protected m_sValue As String
|
||||
Public Overridable Property sValue As String
|
||||
Get
|
||||
@@ -91,6 +100,9 @@ Public Class BTLParamM
|
||||
m_sValue = value
|
||||
End Set
|
||||
End Property
|
||||
Public Sub SetValue(value As String)
|
||||
m_sValue = value
|
||||
End Sub
|
||||
|
||||
Protected m_nSelValue As Integer
|
||||
Public Property nSelValue As Integer
|
||||
@@ -103,10 +115,23 @@ Public Class BTLParamM
|
||||
End Property
|
||||
|
||||
Protected m_dDefault As Double
|
||||
Public ReadOnly Property dDefault As Double
|
||||
Public Property dDefault As Double
|
||||
Get
|
||||
Return m_dDefault
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dDefault = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sDefault As String
|
||||
Public Property sDefault As String
|
||||
Get
|
||||
Return m_sDefault
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sDefault = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' tipo della variabile
|
||||
@@ -116,6 +141,9 @@ Public Class BTLParamM
|
||||
Return m_nType
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetType(value As BTLParamType)
|
||||
m_nType = value
|
||||
End Sub
|
||||
|
||||
' Feature a cui appartiene il parametro
|
||||
Protected m_ParentFeature As BTLFeatureM
|
||||
@@ -125,6 +153,26 @@ Public Class BTLParamM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_bCustom As Boolean
|
||||
Public Property bCustom As Boolean
|
||||
Get
|
||||
Return m_bCustom
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bCustom = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sBWType As String
|
||||
Public Property sBWType As String
|
||||
Get
|
||||
Return m_sBWType
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sBWType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "MESSAGES"
|
||||
|
||||
Public ReadOnly Property Name_Msg As String
|
||||
@@ -191,10 +239,33 @@ Public Class BTLParamM
|
||||
Return NewBTLParam
|
||||
End Function
|
||||
|
||||
' new per double e length (con tipo Beam o Wall)
|
||||
Public Shared Function CreateBTLParam(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String,
|
||||
dMin As Double, dMax As Double, dDefault As Double, sDescription As String, sBWType As String) As BTLParamM
|
||||
Dim NewBTLParam As New BTLParamM
|
||||
|
||||
NewBTLParam.StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
NewBTLParam.dMin = dMin
|
||||
NewBTLParam.dMax = dMax
|
||||
NewBTLParam.m_dDefault = dDefault
|
||||
NewBTLParam.m_sBWType = sBWType
|
||||
Return NewBTLParam
|
||||
End Function
|
||||
|
||||
' new per stringhe
|
||||
Public Shared Function CreateBTLParam(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, sDescription As String)
|
||||
Public Shared Function CreateBTLParam(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, sDefault As String, sDescription As String)
|
||||
Dim NewBTLParam As New BTLParamM
|
||||
NewBTLParam.StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
NewBTLParam.m_sDefault = sDefault
|
||||
Return NewBTLParam
|
||||
End Function
|
||||
|
||||
' new per stringhe (con tipo Beam o Wall)
|
||||
Public Shared Function CreateBTLParam(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, sDefault As String, sDescription As String, sBWType As String)
|
||||
Dim NewBTLParam As New BTLParamM
|
||||
NewBTLParam.StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
NewBTLParam.m_sDefault = sDefault
|
||||
NewBTLParam.m_sBWType = sBWType
|
||||
Return NewBTLParam
|
||||
End Function
|
||||
|
||||
@@ -209,6 +280,18 @@ Public Class BTLParamM
|
||||
Return NewBTLParam
|
||||
End Function
|
||||
|
||||
' new per combobox (con tipo Beam o Wall)
|
||||
Public Shared Function CreateBTLParam(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, nMin As Integer, nMax As Integer, nDefault As Integer, sDescription As String, ValueList As List(Of String), sBWType As String)
|
||||
Dim NewBTLParam As New BTLParamM
|
||||
NewBTLParam.StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
NewBTLParam.dMin = nMin
|
||||
NewBTLParam.dMax = nMax
|
||||
NewBTLParam.m_dDefault = nDefault
|
||||
NewBTLParam.m_ValueList = ValueList
|
||||
NewBTLParam.m_sBWType = sBWType
|
||||
Return NewBTLParam
|
||||
End Function
|
||||
|
||||
' new per parametro vuoto
|
||||
Public Shared Function CreateBTLParam(IsP As Boolean, nType As BTLParamType, sParamName As String)
|
||||
Dim NewBTLParam As New BTLParamM
|
||||
@@ -216,33 +299,6 @@ Public Class BTLParamM
|
||||
Return NewBTLParam
|
||||
End Function
|
||||
|
||||
'' new per double e length
|
||||
'Sub New(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, dMin As Double, dMax As Double, dDefault As Double, sDescription As String)
|
||||
' StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
' m_dMin = dMin
|
||||
' m_dMax = dMax
|
||||
' m_dDefault = dDefault
|
||||
'End Sub
|
||||
|
||||
'' new per stringhe
|
||||
'Sub New(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, sDescription As String)
|
||||
' StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
'End Sub
|
||||
|
||||
'' new per combobox
|
||||
'Sub New(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, nMin As Integer, nMax As Integer, nDefault As Integer, sDescription As String, ValueList As List(Of String))
|
||||
' StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
' m_dMin = nMin
|
||||
' m_dMax = nMax
|
||||
' m_dDefault = nDefault
|
||||
' m_ValueList = ValueList
|
||||
'End Sub
|
||||
|
||||
'' new per parametro vuoto
|
||||
'Sub New(IsP As Boolean, nType As BTLParamType, sParamName As String)
|
||||
' StdInit(Nothing, IsP, nType, sParamName, "")
|
||||
'End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
@@ -4,14 +4,6 @@ Imports EgtWPFLib5
|
||||
|
||||
Public Class BTLPartM
|
||||
|
||||
'' Feature a cui appartiene il parametro
|
||||
'Public m_BTLStructureM As BTLStructureM
|
||||
'Public ReadOnly Property BTLStructureM As BTLStructureM
|
||||
' Get
|
||||
' Return m_BTLStructureM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
' Id geometrico del pezzo
|
||||
Public m_nPartId As Integer
|
||||
Public ReadOnly Property nPartId As Integer
|
||||
@@ -26,6 +18,17 @@ Public Class BTLPartM
|
||||
End Property
|
||||
|
||||
' Info del pezzo
|
||||
|
||||
Public m_nPROJ As Integer
|
||||
Public Property nPROJ As Integer
|
||||
Get
|
||||
Return m_nPROJ
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPROJ = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_nPDN As Integer
|
||||
Public Property nPDN As Integer
|
||||
Get
|
||||
@@ -56,33 +59,33 @@ Public Class BTLPartM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_dL As Double
|
||||
Public Property dL As Double
|
||||
Public m_dBtlL As Double
|
||||
Public Property dBtlL As Double
|
||||
Get
|
||||
Return m_dL
|
||||
Return m_dBtlL
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dL = value
|
||||
m_dBtlL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_dW As Double
|
||||
Public Property dW As Double
|
||||
Public m_dBtlW As Double
|
||||
Public Property dBtlW As Double
|
||||
Get
|
||||
Return m_dW
|
||||
Return m_dBtlW
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dW = value
|
||||
m_dBtlW = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_dH As Double
|
||||
Public Property dH As Double
|
||||
Public m_dBtlH As Double
|
||||
Public Property dBtlH As Double
|
||||
Get
|
||||
Return m_dH
|
||||
Return m_dBtlH
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dH = value
|
||||
m_dBtlH = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -548,6 +551,18 @@ Public Class BTLPartM
|
||||
|
||||
#End Region ' Parametri pezzo
|
||||
|
||||
' volume del pezzo
|
||||
Private m_dVolume As Double
|
||||
Public Property dVolume As Double
|
||||
Get
|
||||
Return m_dVolume
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dVolume = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' numero di pezzi da fare da BTL
|
||||
Public m_nCNT As Integer
|
||||
Public Property nCNT As Integer
|
||||
Get
|
||||
@@ -558,6 +573,39 @@ Public Class BTLPartM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' numero di pezzi aggiunti (da fare in piu' rispetto a CNT)
|
||||
Public m_nADDED As Integer
|
||||
Public Property nADDED As Integer
|
||||
Get
|
||||
Return m_nADDED
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If EgtSetInfo(nPartId, BTL_PRT_ADDED, value) Then
|
||||
m_nADDED = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' numero di pezzi inseriti nelle barre (in PROD), quindi numero di duplo del pezzo
|
||||
Public ReadOnly Property nINPROD As Integer
|
||||
Get
|
||||
Dim INPROD As Integer = 0
|
||||
EgtDuploInRawCount(m_nPartId, INPROD)
|
||||
Return INPROD
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' numero di pezzi gia' prodotti
|
||||
Public m_nDONE As Integer
|
||||
Public Property nDONE As Integer
|
||||
Get
|
||||
Return m_nDONE
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nDONE = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nINVERTED As Integer
|
||||
Public Property nINVERTED As Integer
|
||||
Get
|
||||
@@ -568,6 +616,16 @@ Public Class BTLPartM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bLockInversion As Boolean = False
|
||||
Public Property bLockInversion As Boolean
|
||||
Get
|
||||
Return m_bLockInversion
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bLockInversion = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nROTATED As Integer
|
||||
Public Property nROTATED As Integer
|
||||
Get
|
||||
@@ -578,6 +636,16 @@ Public Class BTLPartM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bLockRotation As Boolean = False
|
||||
Public Property bLockRotation As Boolean
|
||||
Get
|
||||
Return m_bLockRotation
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bLockRotation = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nCALC_ERR As Integer
|
||||
Public Property nCALC_ERR As Integer
|
||||
Get
|
||||
@@ -601,7 +669,7 @@ Public Class BTLPartM
|
||||
Private m_sCALC_MSG As String
|
||||
Public Property sCALC_MSG As String
|
||||
Get
|
||||
Return m_sCALC_MSG
|
||||
Return MessageFromLuaMsg(m_sCALC_MSG)
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sCALC_MSG = value
|
||||
@@ -638,6 +706,26 @@ Public Class BTLPartM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nFeaturesGlobalState As CalcStates
|
||||
Public Property nFeaturesGlobalState As CalcStates
|
||||
Get
|
||||
Return m_nFeaturesGlobalState
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
m_nFeaturesGlobalState = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nCALC_GlobalERR As Integer
|
||||
Public Property nCALC_GlobalERR As Integer
|
||||
Get
|
||||
Return m_nCALC_GlobalERR
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_GlobalERR = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_nState As CalcStates = -1
|
||||
Public Property nState As CalcStates
|
||||
Get
|
||||
@@ -675,7 +763,8 @@ Public Class BTLPartM
|
||||
Dim sValArray() As String
|
||||
Dim sValue As String = String.Empty
|
||||
Dim nValue As Integer = 0
|
||||
EgtGetInfo(nPartId, BTL_PRT_PDN, NewBTLPart.nPDN)
|
||||
EgtGetInfo(nPartId, BTL_PRT_PROJ, NewBTLPart.m_nPROJ)
|
||||
EgtGetInfo(nPartId, BTL_PRT_PDN, NewBTLPart.m_nPDN)
|
||||
Dim nDO As Integer = 1
|
||||
If EgtGetInfo(nPartId, BTL_PRT_DO, nDO) Then
|
||||
NewBTLPart.m_bDO = (nDO <> 0)
|
||||
@@ -683,10 +772,11 @@ Public Class BTLPartM
|
||||
NewBTLPart.m_bDO = True
|
||||
End If
|
||||
EgtGetInfo(nPartId, BTL_PRT_NAM, NewBTLPart.m_sNAM)
|
||||
EgtGetInfo(nPartId, BTL_PRT_L, NewBTLPart.m_dL)
|
||||
EgtGetInfo(nPartId, BTL_PRT_W, NewBTLPart.m_dW)
|
||||
EgtGetInfo(nPartId, BTL_PRT_H, NewBTLPart.m_dH)
|
||||
EgtGetInfo(nPartId, BTL_PRT_L, NewBTLPart.m_dBtlL)
|
||||
EgtGetInfo(nPartId, BTL_PRT_W, NewBTLPart.m_dBtlW)
|
||||
EgtGetInfo(nPartId, BTL_PRT_H, NewBTLPart.m_dBtlH)
|
||||
EgtGetInfo(nPartId, BTL_PRT_CNT, NewBTLPart.m_nCNT)
|
||||
EgtGetInfo(nPartId, BTL_PRT_ADDED, NewBTLPart.m_nADDED)
|
||||
EgtGetInfo(nPartId, BTL_PRT_ASSEMBLYNUM, NewBTLPart.m_sASSEMBLYNUM)
|
||||
EgtGetInfo(nPartId, BTL_PRT_ORDERNUM, NewBTLPart.m_nORDERNUM)
|
||||
EgtGetInfo(nPartId, BTL_PRT_DESIGNATION, NewBTLPart.m_sDESIGN)
|
||||
@@ -711,15 +801,15 @@ Public Class BTLPartM
|
||||
Dim vtVersY As New Vector3d
|
||||
sValArray = sValue.Split({","}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If sValArray.Count() >= 9 Then
|
||||
StringToLen(sValArray(0), ptOri.x)
|
||||
StringToLen(sValArray(1), ptOri.y)
|
||||
StringToLen(sValArray(2), ptOri.z)
|
||||
StringToDouble(sValArray(3), vtVersX.x)
|
||||
StringToDouble(sValArray(4), vtVersX.y)
|
||||
StringToDouble(sValArray(5), vtVersX.z)
|
||||
StringToDouble(sValArray(6), vtVersY.x)
|
||||
StringToDouble(sValArray(7), vtVersY.y)
|
||||
StringToDouble(sValArray(8), vtVersY.z)
|
||||
StringToLenAdv(sValArray(0), ptOri.x)
|
||||
StringToLenAdv(sValArray(1), ptOri.y)
|
||||
StringToLenAdv(sValArray(2), ptOri.z)
|
||||
StringToDoubleAdv(sValArray(3), vtVersX.x)
|
||||
StringToDoubleAdv(sValArray(4), vtVersX.y)
|
||||
StringToDoubleAdv(sValArray(5), vtVersX.z)
|
||||
StringToDoubleAdv(sValArray(6), vtVersY.x)
|
||||
StringToDoubleAdv(sValArray(7), vtVersY.y)
|
||||
StringToDoubleAdv(sValArray(8), vtVersY.z)
|
||||
NewBTLPart.m_refTransf.ChangeOrigin(ptOri)
|
||||
NewBTLPart.m_refTransf.Setup(ptOri, ptOri + vtVersX, ptOri + vtVersY)
|
||||
End If
|
||||
@@ -727,12 +817,12 @@ Public Class BTLPartM
|
||||
ind = ind + 1
|
||||
End While
|
||||
EgtGetInfo(nPartId, BTL_PRT_CAMBER, sValue)
|
||||
sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If sValArray.Count() >= 5 Then
|
||||
StringToLen(sValArray(3), NewBTLPart.m_dCamberLen1)
|
||||
StringToLen(sValArray(5), NewBTLPart.m_dCamberLen2)
|
||||
StringToLen(sValArray(7), NewBTLPart.m_dCamberLen3)
|
||||
StringToLen(sValArray(9), NewBTLPart.m_dCamberCross3)
|
||||
sValArray = sValue.Split(New String() {":", "P"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If sValArray.Count() >= 10 Then
|
||||
StringToLenAdv(sValArray(3), NewBTLPart.m_dCamberLen1)
|
||||
StringToLenAdv(sValArray(5), NewBTLPart.m_dCamberLen2)
|
||||
StringToLenAdv(sValArray(7), NewBTLPart.m_dCamberLen3)
|
||||
StringToLenAdv(sValArray(9), NewBTLPart.m_dCamberCross3)
|
||||
End If
|
||||
Dim pFrom As Integer = sValue.IndexOf("SIDE: ") + "SIDE: ".Length
|
||||
Dim pTo As Integer = sValue.LastIndexOf(" P01")
|
||||
@@ -742,42 +832,63 @@ Public Class BTLPartM
|
||||
End If
|
||||
|
||||
EgtGetInfo(nPartId, BTL_PRT_PARTOFFSET, sValue)
|
||||
sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If sValArray.Count() >= 5 Then
|
||||
StringToLen(sValArray(3), NewBTLPart.m_dPartOffsetSide1)
|
||||
StringToLen(sValArray(5), NewBTLPart.m_dPartOffsetSide2)
|
||||
StringToLen(sValArray(7), NewBTLPart.m_dPartOffsetSide3)
|
||||
StringToLen(sValArray(9), NewBTLPart.m_dPartOffsetSide4)
|
||||
sValArray = sValue.Split(New String() {":", "P"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If sValArray.Count() >= 10 Then
|
||||
StringToLenAdv(sValArray(3), NewBTLPart.m_dPartOffsetSide1)
|
||||
StringToLenAdv(sValArray(5), NewBTLPart.m_dPartOffsetSide2)
|
||||
StringToLenAdv(sValArray(7), NewBTLPart.m_dPartOffsetSide3)
|
||||
StringToLenAdv(sValArray(9), NewBTLPart.m_dPartOffsetSide4)
|
||||
End If
|
||||
pFrom = sValue.IndexOf("P04: ") + "P04: ".Length
|
||||
pTo = sValue.LastIndexOf(" P11")
|
||||
If pTo >= 0 Then
|
||||
NewBTLPart.m_SelREFSIDEFIXCLAMP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue.Substring(pFrom, pTo - pFrom),
|
||||
NewBTLPart.ocREFSIDEFIXCLAMP),
|
||||
NewBTLPart.ocREFSIDEFIXCLAMP)
|
||||
NewBTLPart.ocREFSIDEFIXCLAMP)
|
||||
End If
|
||||
|
||||
Dim EnumIndex As Integer = 0
|
||||
EgtGetInfo(nPartId, BTL_PRT_PROCESSINGQUALITY, sValue)
|
||||
NewBTLPart.m_SelPROCESSINGQUALITY = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, NewBTLPart.ocPROCESSINGQUALITY),
|
||||
NewBTLPart.ocPROCESSINGQUALITY)
|
||||
For ind = 1 To NewBTLPart.ocPROCESSINGQUALITY.Count
|
||||
Dim sEnumName = [Enum].GetName(GetType(ProcessingQuality), ind)
|
||||
If sEnumName.Equals(sValue) Then
|
||||
EnumIndex = ind
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
NewBTLPart.m_SelPROCESSINGQUALITY = EnumIndex - 1
|
||||
EgtGetInfo(nPartId, BTL_PRT_RECESS, sValue)
|
||||
NewBTLPart.m_SelRECESS = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, NewBTLPart.ocRECESS), NewBTLPart.ocRECESS)
|
||||
EnumIndex = 0
|
||||
For ind = 1 To NewBTLPart.ocRECESS.Count
|
||||
Dim sEnumName = [Enum].GetName(GetType(Recess), ind)
|
||||
If sEnumName.Equals(sValue) Then
|
||||
EnumIndex = ind
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
NewBTLPart.m_SelRECESS = EnumIndex - 1
|
||||
EgtGetInfo(nPartId, BTL_PRT_STOREYTYPE, sValue)
|
||||
NewBTLPart.m_SelSTOREYTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, NewBTLPart.ocSTOREYTYPE),
|
||||
NewBTLPart.ocSTOREYTYPE)
|
||||
EnumIndex = 0
|
||||
For ind = 1 To NewBTLPart.ocSTOREYTYPE.Count
|
||||
Dim sEnumName = [Enum].GetName(GetType(StoreyType), ind)
|
||||
If sEnumName.Equals(sValue) Then
|
||||
EnumIndex = ind
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
NewBTLPart.m_SelSTOREYTYPE = EnumIndex - 1
|
||||
EgtGetInfo(nPartId, BTL_PRT_ELEMENTNUM, NewBTLPart.m_sELEMENTNUM)
|
||||
EgtGetInfo(nPartId, BTL_PRT_LAYER, NewBTLPart.m_nLAYER)
|
||||
EgtGetInfo(nPartId, BTL_PRT_MODULENUM, NewBTLPart.m_sMODULENUM)
|
||||
'EgtGetInfo(nPartId, BTL_PRT_USERATTRIBUTE, m_sUSERATTRIBUTE)
|
||||
EgtGetInfo(nPartId, BTL_PRT_COMMENT, NewBTLPart.m_sCOMMENT)
|
||||
|
||||
EgtGetInfo(nPartId, BTL_PRT_GRAINDIR, sValue)
|
||||
NewBTLPart.m_refGrainDir = New Vector3d
|
||||
sValArray = sValue.Split(New String() {",", ";"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If sValArray.Count() >= 4 Then
|
||||
StringToDouble(sValArray(0), NewBTLPart.m_refGrainDir.x)
|
||||
StringToDouble(sValArray(1), NewBTLPart.m_refGrainDir.y)
|
||||
StringToDouble(sValArray(2), NewBTLPart.m_refGrainDir.z)
|
||||
StringToDoubleAdv(sValArray(0), NewBTLPart.m_refGrainDir.x)
|
||||
StringToDoubleAdv(sValArray(1), NewBTLPart.m_refGrainDir.y)
|
||||
StringToDoubleAdv(sValArray(2), NewBTLPart.m_refGrainDir.z)
|
||||
NewBTLPart.m_bGRAINDIRALIGN = (CInt(sValArray(3)) = 1)
|
||||
End If
|
||||
|
||||
@@ -792,18 +903,16 @@ Public Class BTLPartM
|
||||
sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If sValArray.Count() >= 2 Then
|
||||
NewBTLPart.m_SelALIGNLOCATION = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), NewBTLPart.ocALIGNLOCATION),
|
||||
NewBTLPart.ocALIGNLOCATION)
|
||||
NewBTLPart.m_SelALIGNENDTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(1).Trim(),
|
||||
NewBTLPart.ocALIGNENDTYPE),
|
||||
NewBTLPart.ocALIGNENDTYPE)
|
||||
NewBTLPart.ocALIGNLOCATION)
|
||||
NewBTLPart.m_SelALIGNENDTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(1).Trim(), NewBTLPart.ocALIGNENDTYPE),
|
||||
NewBTLPart.ocALIGNENDTYPE)
|
||||
End If
|
||||
|
||||
EgtGetInfo(nPartId, BTL_PRT_MATERIALTYPE, sValue)
|
||||
sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If sValArray.Count() >= 1 Then
|
||||
NewBTLPart.m_SelMATERIALTYPEGRP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0),
|
||||
NewBTLPart.ocMATERIALTYPEGRP),
|
||||
NewBTLPart.ocMATERIALTYPEGRP)
|
||||
NewBTLPart.m_SelMATERIALTYPEGRP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), NewBTLPart.ocMATERIALTYPEGRP),
|
||||
NewBTLPart.ocMATERIALTYPEGRP)
|
||||
If sValArray.Count() >= 2 Then NewBTLPart.m_sMATERIALTYPESPEC = sValArray(1).Trim()
|
||||
End If
|
||||
|
||||
@@ -813,8 +922,14 @@ Public Class BTLPartM
|
||||
If Not EgtGetInfo(nPartId, BTL_PRT_INVERTED, NewBTLPart.m_nINVERTED) Then
|
||||
NewBTLPart.m_nINVERTED = 0
|
||||
End If
|
||||
If EgtGetInfo(nPartId, BTL_PRT_MATERIAL, NewBTLPart.m_sMATERIAL) Then
|
||||
EgtGetInfo(nPartId, BTL_PRT_MATERIAL, NewBTLPart.m_sMATERIAL)
|
||||
If Not EgtGetInfo(nPartId, LOCK_ROT, NewBTLPart.m_bLockRotation) Then
|
||||
NewBTLPart.m_bLockRotation = False
|
||||
End If
|
||||
If Not EgtGetInfo(nPartId, LOCK_FLIP, NewBTLPart.m_bLockInversion) Then
|
||||
NewBTLPart.m_bLockInversion = False
|
||||
End If
|
||||
EgtGetInfo(nPartId, BTL_PRT_VOLUME, NewBTLPart.m_dVolume)
|
||||
' Leggo outline e features
|
||||
NewBTLPart.m_BTLFeatureMList = LoadFeatures(nPartId, NewBTLPart)
|
||||
' leggo calc error
|
||||
@@ -828,24 +943,32 @@ Public Class BTLPartM
|
||||
EgtGetInfo(nPartId, ITG_PROJ_FALL, nFall)
|
||||
EgtGetInfo(nPartId, ITG_PROJ_MSG, sMsg)
|
||||
If Not bCalc Then
|
||||
NewBTLPart.nState = CalcStates.NOTCALCULATED
|
||||
NewBTLPart.nCALC_ERR = -1
|
||||
NewBTLPart.nCALC_ROT = 0
|
||||
NewBTLPart.nCALC_FALL = 0
|
||||
NewBTLPart.sCALC_MSG = ""
|
||||
NewBTLPart.m_nState = CalcStates.NOTCALCULATED
|
||||
NewBTLPart.m_nCALC_ERR = 0
|
||||
NewBTLPart.m_nCALC_ROT = 0
|
||||
NewBTLPart.m_nCALC_FALL = 0
|
||||
NewBTLPart.m_sCALC_MSG = ""
|
||||
Else
|
||||
NewBTLPart.nCALC_ERR = nErr
|
||||
NewBTLPart.nCALC_ROT = nRot
|
||||
NewBTLPart.nCALC_FALL = nFall
|
||||
NewBTLPart.sCALC_MSG = sMsg
|
||||
If nErr = 0 Then
|
||||
NewBTLPart.nState = CalcStates.OK
|
||||
ElseIf nErr > 1 Then
|
||||
NewBTLPart.nState = CalcStates.ERROR_
|
||||
ElseIf nErr < 1 Then
|
||||
NewBTLPart.nState = CalcStates.NOTCALCULATED
|
||||
End If
|
||||
NewBTLPart.m_nCALC_ERR = nErr
|
||||
NewBTLPart.m_nCALC_ROT = nRot
|
||||
NewBTLPart.m_nCALC_FALL = nFall
|
||||
NewBTLPart.m_sCALC_MSG = sMsg
|
||||
Select Case nErr
|
||||
Case 0
|
||||
NewBTLPart.nState = CalcStates.OK
|
||||
Case 22
|
||||
NewBTLPart.nState = CalcStates.COLLISION
|
||||
Case 17
|
||||
NewBTLPart.nState = CalcStates.SECTION
|
||||
Case 19
|
||||
NewBTLPart.nState = CalcStates.WARNING
|
||||
Case < 0
|
||||
NewBTLPart.nState = CalcStates.INFO
|
||||
Case > 0
|
||||
NewBTLPart.nState = CalcStates.ERROR_
|
||||
End Select
|
||||
End If
|
||||
EgtGetInfo(nPartId, ITG_PROJ_TIME, NewBTLPart.m_nCALC_TIME)
|
||||
Return NewBTLPart
|
||||
End Function
|
||||
|
||||
@@ -869,206 +992,18 @@ Public Class BTLPartM
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia una feature
|
||||
Dim nGRP As Integer
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_GRP, nGRP) Then
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_GRP, nGRP) AndAlso Not EgtExistsInfo(nFeatureId, BTL_FTR_MAINID) Then
|
||||
' creo la feature
|
||||
TempList.Add(BTLFeatureM.CreateBTLFeature(NewBTLPart, nFeatureId))
|
||||
Dim NewFeature As BTLFeatureM = BTLFeatureM.CreateBTLFeature(NewBTLPart, nFeatureId)
|
||||
TempList.Add(NewFeature)
|
||||
' aggiorno Id feature perchè potrebbe essere stata ricalcolata
|
||||
nFeatureId = NewFeature.nFeatureId
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
End While
|
||||
Return TempList
|
||||
End Function
|
||||
|
||||
'Sub New(ParentStructure As BTLStructureVM, nPartId As Integer)
|
||||
' MyBase.New(ParentStructure, nPartId)
|
||||
' ' leggo info pezzo
|
||||
' Dim sValArray() As String
|
||||
' Dim sValue As String = String.Empty
|
||||
' Dim nValue As Integer = 0
|
||||
' EgtGetInfo(nPartId, BTL_PRT_PDN, nPDN)
|
||||
' Dim nDO As Integer = 1
|
||||
' If EgtGetInfo(nPartId, BTL_PRT_DO, nDO) Then
|
||||
' m_bDO = (nDO <> 0)
|
||||
' Else
|
||||
' m_bDO = True
|
||||
' End If
|
||||
' EgtGetInfo(nPartId, BTL_PRT_NAM, m_sNAM)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_L, m_dL)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_W, m_dW)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_H, m_dH)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_CNT, m_nCNT)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_ASSEMBLYNUM, m_sASSEMBLYNUM)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_ORDERNUM, m_nORDERNUM)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_DESIGNATION, m_sDESIGN)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_ANNOTATION, m_sANNOT)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_STOREY, m_sSTOREY)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_GROUP, m_sGROUP)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_PACKAGE, m_sPACKAGE)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_TIMBERGRADE, m_sTIMBERGRADE)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_QUALITYGRADE, m_sQUALITYGRADE)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_COLOUR, sValue)
|
||||
' m_colCOLOR.FromString(sValue)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_PLANINGLENGTH, m_dPLANINGLEN)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_STARTOFFSET, m_dSTARTOFFSET)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_ENDOFFSET, m_dENDOFFSET)
|
||||
|
||||
' Dim ind As Integer = 1
|
||||
' While EgtGetInfo(nPartId, BTL_PRT_UID & ind, nValue)
|
||||
' ocUID.Add(nValue)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_TRANSFORMATION & ind, sValue)
|
||||
' m_refTransf = New Frame3d
|
||||
' Dim ptOri As New Point3d
|
||||
' Dim vtVersX As New Vector3d
|
||||
' Dim vtVersY As New Vector3d
|
||||
' sValArray = sValue.Split({","}, StringSplitOptions.RemoveEmptyEntries)
|
||||
' If sValArray.Count() >= 9 Then
|
||||
' StringToLen(sValArray(0), ptOri.x)
|
||||
' StringToLen(sValArray(1), ptOri.y)
|
||||
' StringToLen(sValArray(2), ptOri.z)
|
||||
' StringToDouble(sValArray(3), vtVersX.x)
|
||||
' StringToDouble(sValArray(4), vtVersX.y)
|
||||
' StringToDouble(sValArray(5), vtVersX.z)
|
||||
' StringToDouble(sValArray(6), vtVersY.x)
|
||||
' StringToDouble(sValArray(7), vtVersY.y)
|
||||
' StringToDouble(sValArray(8), vtVersY.z)
|
||||
' m_refTransf.ChangeOrigin(ptOri)
|
||||
' m_refTransf.Setup(ptOri, ptOri + vtVersX, ptOri + vtVersY)
|
||||
' End If
|
||||
' refTransfList.Add(m_refTransf)
|
||||
' ind = ind + 1
|
||||
' End While
|
||||
|
||||
' EgtGetInfo(nPartId, BTL_PRT_CAMBER, sValue)
|
||||
' sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
' If sValArray.Count() >= 5 Then
|
||||
' StringToLen(sValArray(3), m_dCamberLen1)
|
||||
' StringToLen(sValArray(5), m_dCamberLen2)
|
||||
' StringToLen(sValArray(7), m_dCamberLen3)
|
||||
' StringToLen(sValArray(9), m_dCamberCross3)
|
||||
' End If
|
||||
' Dim pFrom As Integer = sValue.IndexOf("SIDE: ") + "SIDE: ".Length
|
||||
' Dim pTo As Integer = sValue.LastIndexOf(" P01")
|
||||
' If pTo >= 0 Then
|
||||
' nValue = CInt(sValue.Substring(pFrom, pTo - pFrom))
|
||||
' m_SelCAMBERSIDE = ocCAMBERSIDE.IndexOf(CInt(sValue.Substring(pFrom, pTo - pFrom)))
|
||||
' End If
|
||||
|
||||
' EgtGetInfo(nPartId, BTL_PRT_PARTOFFSET, sValue)
|
||||
' sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
' If sValArray.Count() >= 5 Then
|
||||
' StringToLen(sValArray(3), m_dPartOffsetSide1)
|
||||
' StringToLen(sValArray(5), m_dPartOffsetSide2)
|
||||
' StringToLen(sValArray(7), m_dPartOffsetSide3)
|
||||
' StringToLen(sValArray(9), m_dPartOffsetSide4)
|
||||
' End If
|
||||
' pFrom = sValue.IndexOf("P04: ") + "P04: ".Length
|
||||
' pTo = sValue.LastIndexOf(" P11")
|
||||
' If pTo >= 0 Then
|
||||
' m_SelREFSIDEFIXCLAMP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue.Substring(pFrom, pTo - pFrom), ocREFSIDEFIXCLAMP), ocREFSIDEFIXCLAMP)
|
||||
' End If
|
||||
|
||||
' EgtGetInfo(nPartId, BTL_PRT_PROCESSINGQUALITY, sValue)
|
||||
' m_SelPROCESSINGQUALITY = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, ocPROCESSINGQUALITY), ocPROCESSINGQUALITY)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_RECESS, sValue)
|
||||
' m_SelRECESS = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, ocRECESS), ocRECESS)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_STOREYTYPE, sValue)
|
||||
' m_SelSTOREYTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, ocSTOREYTYPE), ocSTOREYTYPE)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_ELEMENTNUM, m_sELEMENTNUM)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_LAYER, m_nLAYER)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_MODULENUM, m_sMODULENUM)
|
||||
' 'EgtGetInfo(nPartId, BTL_PRT_USERATTRIBUTE, m_sUSERATTRIBUTE)
|
||||
' EgtGetInfo(nPartId, BTL_PRT_COMMENT, m_sCOMMENT)
|
||||
|
||||
' EgtGetInfo(nPartId, BTL_PRT_GRAINDIR, sValue)
|
||||
' m_refGrainDir = New Vector3d
|
||||
' sValArray = sValue.Split(New String() {",", ";"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
' If sValArray.Count() >= 4 Then
|
||||
' StringToDouble(sValArray(0), m_refGrainDir.x)
|
||||
' StringToDouble(sValArray(1), m_refGrainDir.y)
|
||||
' StringToDouble(sValArray(2), m_refGrainDir.z)
|
||||
' m_bGRAINDIRALIGN = (CInt(sValArray(3)) = 1)
|
||||
' End If
|
||||
|
||||
' EgtGetInfo(nPartId, BTL_PRT_REFSIDE, sValue)
|
||||
' sValArray = sValue.Split({";"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
' If sValArray.Count() >= 2 Then
|
||||
' m_SelREFSIDE = ocREFSIDE.IndexOf(CInt(sValArray(0)))
|
||||
' m_bREFSIDEALIGN = (CInt(sValArray(1)) = 1)
|
||||
' End If
|
||||
|
||||
' EgtGetInfo(nPartId, BTL_PRT_ALIGNMENT, sValue)
|
||||
' sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
' If sValArray.Count() >= 2 Then
|
||||
' m_SelALIGNLOCATION = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), ocALIGNLOCATION), ocALIGNLOCATION)
|
||||
' m_SelALIGNENDTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(1).Trim(), ocALIGNENDTYPE), ocALIGNENDTYPE)
|
||||
' End If
|
||||
|
||||
' EgtGetInfo(nPartId, BTL_PRT_MATERIALTYPE, sValue)
|
||||
' sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
|
||||
' If sValArray.Count() >= 1 Then
|
||||
' m_SelMATERIALTYPEGRP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), ocMATERIALTYPEGRP), ocMATERIALTYPEGRP)
|
||||
' If sValArray.Count() >= 2 Then m_sMATERIALTYPESPEC = sValArray(1).Trim()
|
||||
' End If
|
||||
|
||||
' If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, m_nROTATED) Then
|
||||
' m_nROTATED = 0
|
||||
' End If
|
||||
' If Not EgtGetInfo(nPartId, BTL_PRT_INVERTED, m_nINVERTED) Then
|
||||
' m_nINVERTED = 0
|
||||
' End If
|
||||
' If EgtGetInfo(nPartId, BTL_PRT_MATERIAL, m_sMATERIAL) Then
|
||||
' If Not ParentStructure.MaterialList.Contains(m_sMATERIAL) Then
|
||||
' ParentStructure.MaterialList.Add(m_sMATERIAL)
|
||||
' End If
|
||||
' End If
|
||||
' If Not ParentStructure.SectionList.Contains(Section) Then
|
||||
' ParentStructure.SectionList.Add(Section)
|
||||
' End If
|
||||
' ' Leggo outline
|
||||
' Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
|
||||
' Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayerId)
|
||||
' While nOutlineId <> GDB_ID.NULL
|
||||
' ' verifico che sia una feature
|
||||
' Dim nGRP As Integer
|
||||
' If EgtGetInfo(nOutlineId, BTL_FTR_GRP, nGRP) Then
|
||||
' ' creo la feature
|
||||
' m_FeatureList.Add(New BTLFeatureVM(Me, nOutlineId))
|
||||
' End If
|
||||
' nOutlineId = EgtGetNext(nOutlineId)
|
||||
' End While
|
||||
' ' Leggo feature
|
||||
' Dim nProcessingId As Integer = EgtGetFirstNameInGroup(nPartId, PROCESSINGS)
|
||||
' Dim nFeatureId As Integer = EgtGetFirstInGroup(nProcessingId)
|
||||
' While nFeatureId <> GDB_ID.NULL
|
||||
' ' verifico che sia una feature
|
||||
' Dim nGRP As Integer
|
||||
' If EgtGetInfo(nFeatureId, BTL_FTR_GRP, nGRP) Then
|
||||
' ' creo la feature
|
||||
' m_FeatureList.Add(New BTLFeatureVM(Me, nFeatureId))
|
||||
' End If
|
||||
' nFeatureId = EgtGetNext(nFeatureId)
|
||||
' End While
|
||||
' ' Aggiorno check DOALL
|
||||
' NotifyPropertyChanged("bDOALL")
|
||||
' ' leggo calc error
|
||||
' Dim nErr As Integer = 0
|
||||
' Dim nRot As Integer = 0
|
||||
' Dim nFall As Integer = 0
|
||||
' Dim sMsg As String = ""
|
||||
' Dim bCalc As Boolean = False
|
||||
' bCalc = EgtGetInfo(nPartId, ITG_PROJ_ERR, nErr)
|
||||
' EgtGetInfo(nPartId, ITG_PROJ_ROT, nRot)
|
||||
' EgtGetInfo(nPartId, ITG_PROJ_FALL, sMsg)
|
||||
' EgtGetInfo(nPartId, ITG_PROJ_MSG, sMsg)
|
||||
' CalcPartUpdate(bCalc, nErr, nRot, nFall, sMsg)
|
||||
' CalcFeatureUpdate()
|
||||
'End Sub
|
||||
|
||||
'Sub New(ParentStructure As BTLStructure, nPartId As Integer)
|
||||
' m_BTLStructureM = ParentStructure
|
||||
' Me.SetPartId = nPartId
|
||||
' m_FeatureList = New ObservableCollection(Of BTLFeature)
|
||||
'End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
@@ -1087,6 +1022,75 @@ Public Class BTLPartM
|
||||
Return New List(Of BTLFeatureM)(m_BTLFeatureMList)
|
||||
End Function
|
||||
|
||||
Public Function Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional bRedraw As Boolean = True, Optional dAng As Double = 90) As Boolean
|
||||
' recupero il box del pezzo
|
||||
Dim nLs As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
||||
Dim b3Solid As New BBox3d
|
||||
EgtGetBBoxGlob(nLs, GDB_BB.STANDARD, b3Solid)
|
||||
If b3Solid.IsEmpty() Then
|
||||
EgtOutLog("ERROR: Box non definito per la trave " & sNAM)
|
||||
Return False
|
||||
End If
|
||||
' eseguo rotazione di 90 gradi attorno asse X
|
||||
Dim dRot = If(IsPositive, 1, -1) * Math.Abs(dAng)
|
||||
Dim vtAxes As Vector3d
|
||||
' se travi ruoto attorno all'asse X
|
||||
If SelectedMachineType = MachineType.BEAM Then
|
||||
vtAxes = Vector3d.X_AX
|
||||
' se pareti ruoto attorno all'asse Z
|
||||
ElseIf SelectedMachineType = MachineType.WALL Then
|
||||
vtAxes = -Vector3d.Z_AX
|
||||
End If
|
||||
' se invertito
|
||||
Dim bInverted As Boolean = m_nINVERTED <> 0
|
||||
If bInverted Then
|
||||
' annullo inversione
|
||||
Inversion(SelectedMachineType)
|
||||
End If
|
||||
' eseguo rotazione
|
||||
Dim bOk As Boolean = EgtRotate(nPartId, b3Solid.Center, vtAxes, dRot, GDB_RT.GLOB)
|
||||
If bOk Then
|
||||
Dim dNewRotation As Double = (m_nROTATED + dRot) Mod 360
|
||||
m_nROTATED = If(dNewRotation >= 0, dNewRotation, 360 + dNewRotation)
|
||||
EgtSetInfo(nPartId, BTL_PRT_ROTATED, m_nROTATED)
|
||||
' imposto modificato per copie
|
||||
MyMachGroupPanelM.SetDuploModified(nPartId)
|
||||
End If
|
||||
' se era invertito
|
||||
If bInverted Then
|
||||
' ripristino inversione
|
||||
Inversion(SelectedMachineType)
|
||||
End If
|
||||
If bRedraw Then EgtRedraw()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Sub Inversion(SelectedMachineType As MachineType)
|
||||
' recupero il box del pezzo
|
||||
Dim nLs As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
||||
Dim b3Solid As New BBox3d
|
||||
EgtGetBBoxGlob(nLs, GDB_BB.STANDARD, b3Solid)
|
||||
If b3Solid.IsEmpty() Then
|
||||
EgtOutLog("ERROR: Box non definito per la trave " & sNAM)
|
||||
Return
|
||||
End If
|
||||
Dim vtAxes As Vector3d
|
||||
' se travi ruoto attorno all'asse Z
|
||||
If SelectedMachineType = MachineType.BEAM Then
|
||||
vtAxes = Vector3d.Z_AX
|
||||
' se pareti ruoto attorno all'asse X
|
||||
ElseIf SelectedMachineType = MachineType.WALL Then
|
||||
vtAxes = Vector3d.X_AX
|
||||
End If
|
||||
' eseguo rotazione di 180 gradi
|
||||
If EgtRotate(nPartId, b3Solid.Center, vtAxes, 180, GDB_RT.GLOB) Then
|
||||
m_nINVERTED = If(m_nINVERTED = 0, 180, 0)
|
||||
EgtSetInfo(nPartId, BTL_PRT_INVERTED, m_nINVERTED)
|
||||
' imposto modificato per copie
|
||||
MyMachGroupPanelM.SetDuploModified(nPartId)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function NewProcId() As Integer
|
||||
Dim nMaxProcId As Integer = 0
|
||||
If Not IsNothing(BTLFeatureMList) AndAlso BTLFeatureMList.Count > 0 Then
|
||||
+79
-14
@@ -10,6 +10,13 @@ Public Class BTLStructureM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nAsseBaseId As Integer = GDB_ID.NULL
|
||||
Public ReadOnly Property nAsseBaseId As Integer
|
||||
Get
|
||||
Return m_nAsseBaseId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' pezzi da BTL
|
||||
Public m_BTLPartMList As List(Of BTLPartM)
|
||||
Public Property BTLPartMList As List(Of BTLPartM)
|
||||
@@ -66,6 +73,16 @@ Public Class BTLStructureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_nPROJTYPE As Integer
|
||||
Public Property nPROJTYPE As Integer
|
||||
Get
|
||||
Return m_nPROJTYPE
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPROJTYPE = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_sLISTNAME As String
|
||||
Public Property sLISTNAME As String
|
||||
Get
|
||||
@@ -157,7 +174,7 @@ Public Class BTLStructureM
|
||||
End Property
|
||||
|
||||
Public m_ocRANGE As New List(Of Object)({New IdNameStruct(Range.STANDARD, EgtMsg(61710)),
|
||||
New IdNameStruct(Range.EXTENDED, EgtMsg(61711))})
|
||||
New IdNameStruct(Range.EXTENDED, EgtMsg(61711))})
|
||||
Public ReadOnly Property ocRANGE As List(Of Object)
|
||||
Get
|
||||
Return m_ocRANGE
|
||||
@@ -175,8 +192,8 @@ Public Class BTLStructureM
|
||||
End Property
|
||||
|
||||
Public m_ocPROCESSINGQUALITY As New List(Of Object)({New IdNameStruct(ProcessingQuality.AUTOMATIC, EgtMsg(61658)),
|
||||
New IdNameStruct(ProcessingQuality.VISIBLE, EgtMsg(61659)),
|
||||
New IdNameStruct(ProcessingQuality.FAST, EgtMsg(61660))})
|
||||
New IdNameStruct(ProcessingQuality.VISIBLE, EgtMsg(61659)),
|
||||
New IdNameStruct(ProcessingQuality.FAST, EgtMsg(61660))})
|
||||
Public ReadOnly Property ocPROCESSINGQUALITY As List(Of Object)
|
||||
Get
|
||||
Return m_ocPROCESSINGQUALITY
|
||||
@@ -234,7 +251,7 @@ Public Class BTLStructureM
|
||||
End Property
|
||||
|
||||
Public m_ocRECESS As New List(Of Object)({New IdNameStruct(Recess.AUTOMATIC, EgtMsg(61658)),
|
||||
New IdNameStruct(Recess.MANUAL, EgtMsg(61661))})
|
||||
New IdNameStruct(Recess.MANUAL, EgtMsg(61661))})
|
||||
Public ReadOnly Property ocRECESS As List(Of Object)
|
||||
Get
|
||||
Return m_ocRECESS
|
||||
@@ -356,14 +373,44 @@ Public Class BTLStructureM
|
||||
Return New BTLStructureM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateBTLStructure() As BTLStructureM
|
||||
Public Shared Function CreateBTLStructure(ProjId As Integer) As BTLStructureM
|
||||
Dim NewBTLStructure As New BTLStructureM
|
||||
Dim sValue As String = String.Empty
|
||||
NewBTLStructure.m_nBTLInfoId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
' se devo filtrare un progetto
|
||||
If ProjId > 0 Then
|
||||
' cerco tra i layer BTLInfo
|
||||
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
While nBTLInfoLayerId <> GDB_ID.NULL
|
||||
' verifico se il layer appartiene al ProjId
|
||||
Dim nBTLInfoLayerProjId As Integer
|
||||
EgtGetInfo(nBTLInfoLayerId, BTL_PRT_PROJ, nBTLInfoLayerProjId)
|
||||
If nBTLInfoLayerProjId = ProjId Then
|
||||
NewBTLStructure.m_nBTLInfoId = nBTLInfoLayerId
|
||||
Exit While
|
||||
End If
|
||||
nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
|
||||
End While
|
||||
' cerco tra gli AsseBase
|
||||
Dim nAsseBaseLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, ASSEBASE)
|
||||
While nAsseBaseLayerId <> GDB_ID.NULL
|
||||
' verifico se il layer appartiene al ProjId
|
||||
Dim nAsseBaseLayerProjId As Integer
|
||||
EgtGetInfo(nAsseBaseLayerId, BTL_PRT_PROJ, nAsseBaseLayerProjId)
|
||||
If nAsseBaseLayerProjId = ProjId Then
|
||||
NewBTLStructure.m_nAsseBaseId = nAsseBaseLayerId
|
||||
Exit While
|
||||
End If
|
||||
nAsseBaseLayerId = EgtGetNextName(nAsseBaseLayerId, ASSEBASE)
|
||||
End While
|
||||
Else
|
||||
NewBTLStructure.m_nAsseBaseId = EgtGetFirstNameInGroup(GDB_ID.ROOT, ASSEBASE)
|
||||
NewBTLStructure.m_nBTLInfoId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
End If
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_PROJNUM, NewBTLStructure.m_sPROJNUM)
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_PROJNAME, NewBTLStructure.m_sPROJNAME)
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_PROJPART, NewBTLStructure.m_sPROJPART)
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_PROJGUID, NewBTLStructure.m_sPROJGUID)
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_PROJTYPE, NewBTLStructure.m_nPROJTYPE)
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_LISTNAME, NewBTLStructure.m_sLISTNAME)
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_CUSTOMER, NewBTLStructure.m_sCUSTOMER)
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_ARCHITECT, NewBTLStructure.m_sARCHITECT)
|
||||
@@ -384,21 +431,29 @@ Public Class BTLStructureM
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_PRT_RECESS, sValue)
|
||||
NewBTLStructure.m_SelRECESS = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, NewBTLStructure.ocRECESS), NewBTLStructure.ocRECESS)
|
||||
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_USERATTRIBUTE, NewBTLStructure.m_sUSERATTRIBUTE)
|
||||
' setto il tipo di progetto (Beam o Wall) nel file ini del BTL
|
||||
If NewBTLStructure.m_nPROJTYPE <> BWType.NULL Then BTLIniFile.m_nBTLBWType = NewBTLStructure.m_nPROJTYPE
|
||||
' recupero i part
|
||||
NewBTLStructure.m_BTLPartMList = LoadParts()
|
||||
'Dim nPartId As Integer = EgtGetFirstPart()
|
||||
'While nPartId <> GDB_ID.NULL
|
||||
' NewBTLStructure.m_BTLPartMList.Add(BTLPartM.CreateBTLPart(nPartId))
|
||||
' nPartId = EgtGetNextPart(nPartId)
|
||||
'End While
|
||||
NewBTLStructure.m_BTLPartMList = LoadParts(ProjId)
|
||||
Return NewBTLStructure
|
||||
End Function
|
||||
|
||||
Private Shared Function LoadParts() As List(Of BTLPartM)
|
||||
Private Shared Function LoadParts(ProjId As Integer) As List(Of BTLPartM)
|
||||
Dim TempList As New List(Of BTLPartM)
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
TempList.Add(BTLPartM.CreateBTLPart(nPartId))
|
||||
' se devo filtrare un progetto
|
||||
If ProjId > 0 Then
|
||||
' verifico se il pezzo appartiene al ProjId
|
||||
Dim nPartProjId As Integer
|
||||
EgtGetInfo(nPartId, BTL_PRT_PROJ, nPartProjId)
|
||||
If nPartProjId = ProjId Then
|
||||
TempList.Add(BTLPartM.CreateBTLPart(nPartId))
|
||||
End If
|
||||
Else
|
||||
' altrimenti carico tutti
|
||||
TempList.Add(BTLPartM.CreateBTLPart(nPartId))
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
Return TempList
|
||||
@@ -418,6 +473,12 @@ Public Class BTLStructureM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub RemoveBTLPart(BTLPartM As BTLPartM)
|
||||
If IsNothing(BTLPartM) Then Return
|
||||
If Not m_BTLPartMList.Contains(BTLPartM) Then Return
|
||||
m_BTLPartMList.Remove(BTLPartM)
|
||||
End Sub
|
||||
|
||||
Public Function GetBTLParts() As List(Of BTLPartM)
|
||||
Return New List(Of BTLPartM)(m_BTLPartMList)
|
||||
End Function
|
||||
@@ -430,6 +491,10 @@ Public Class BTLStructureM
|
||||
Return nMaxPDN + 1
|
||||
End Function
|
||||
|
||||
Public Sub UpdateBTLInfoLayer()
|
||||
m_nBTLInfoId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,309 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class BTLFeatureVM
|
||||
Inherits VMBase
|
||||
|
||||
Protected WithEvents m_BTLFeatureM As BTLFeatureM
|
||||
Public ReadOnly Property BTLFeatureM As BTLFeatureM
|
||||
Get
|
||||
Return m_BTLFeatureM
|
||||
End Get
|
||||
End Property
|
||||
Protected m_BTLPartM As BTLPartM
|
||||
Protected m_PartM As PartM
|
||||
|
||||
Public ReadOnly Property nFeatureId As Integer
|
||||
Get
|
||||
Return m_BTLFeatureM.nFeatureId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable Property nSelGRP As Integer
|
||||
Get
|
||||
Return m_BTLFeatureM.nSelGRP
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_BTLFeatureM.nSelGRP = value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property sDescGRP As String
|
||||
Get
|
||||
Dim sDescConstruction As String = String.Empty
|
||||
If CalcBeamPrivateProfileGRP(m_BTLFeatureM.nSelGRP) = 0 Then
|
||||
sDescConstruction = "L"
|
||||
Else
|
||||
sDescConstruction = "T"
|
||||
End If
|
||||
sDescConstruction &= m_BTLFeatureM.nPRC.ToString("000")
|
||||
Return sDescConstruction
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property nPRC As Integer
|
||||
Get
|
||||
Return m_BTLFeatureM.nPRC
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_BTLFeatureM.nPRC = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Lato
|
||||
Public Overridable Property nSelSIDE As Integer
|
||||
Get
|
||||
Return m_BTLFeatureM.nSelSIDE
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_BTLFeatureM.nSelSIDE = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overridable Property nSelVARIANT As Integer
|
||||
Get
|
||||
Return m_BTLFeatureM.nSelVARIANT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_BTLFeatureM.nSelVARIANT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Return m_BTLFeatureM.sName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable Property bDO As Boolean
|
||||
Get
|
||||
Return m_BTLFeatureM.bDO
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_BTLFeatureM.bDO = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property nPRID As Integer
|
||||
Get
|
||||
Return m_BTLFeatureM.nPRID
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_BTLFeatureM.nPRID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property sDES As String
|
||||
Get
|
||||
Return m_BTLFeatureM.sDES
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_BTLFeatureM.sDES = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property frFRAME As Frame3d
|
||||
Get
|
||||
Return m_BTLFeatureM.frFRAME
|
||||
End Get
|
||||
Set(value As Frame3d)
|
||||
m_BTLFeatureM.frFRAME = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' proprieta' che mostra la descrizione in interfaccia
|
||||
Public ReadOnly Property sDesc As String
|
||||
Get
|
||||
Return sDescGRP & " [" & nPRID & "] " & sName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nState As CalcStates
|
||||
Get
|
||||
Return m_BTLFeatureM.nState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nCALC_ERR As Integer
|
||||
Get
|
||||
Return m_BTLFeatureM.nCALC_ERR
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nCALC_ROT As Integer
|
||||
Get
|
||||
Return m_BTLFeatureM.nCALC_ROT
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sCALC_MSG As String
|
||||
Get
|
||||
Return m_BTLFeatureM.sCALC_MSG
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||
Get
|
||||
If Not m_BTLFeatureM.bDO Then Return Brushes.Aqua
|
||||
Select Case m_BTLFeatureM.nState
|
||||
Case CalcStates.ERROR_, CalcStates.COLLISION
|
||||
Return Brushes.Red
|
||||
Case CalcStates.WARNING
|
||||
Return Brushes.Orange
|
||||
Case CalcStates.INFO, CalcStates.OK
|
||||
Return Brushes.Green
|
||||
Case CalcStates.NOTCALCULATED
|
||||
Return Brushes.LightGray
|
||||
Case Else
|
||||
Return Brushes.Red
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_BTLFeatureM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_ERR_Letter As String
|
||||
Get
|
||||
Select Case m_BTLFeatureM.nState
|
||||
Case CalcStates.COLLISION
|
||||
Return "c"
|
||||
Case CalcStates.ERROR_
|
||||
Return "e"
|
||||
Case CalcStates.WARNING
|
||||
Return "w"
|
||||
Case CalcStates.INFO
|
||||
Return "i"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
||||
Get
|
||||
Select Case m_BTLFeatureM.nState
|
||||
Case CalcStates.ERROR_, CalcStates.COLLISION
|
||||
Return Brushes.Red
|
||||
Case CalcStates.WARNING
|
||||
Return Brushes.Orange
|
||||
Case CalcStates.INFO
|
||||
Return Brushes.Green
|
||||
Case Else
|
||||
Return Brushes.Red
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' variabile che indica se rifare il pezzo
|
||||
Private m_bRedo As Boolean = True
|
||||
Public Property bRedo As Boolean
|
||||
Get
|
||||
Return m_bRedo
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bRedo = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bStrategy_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property bStrategy_Visibility As Visibility
|
||||
Get
|
||||
Return m_bStrategy_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetbStrategy_Visibility(value As Boolean)
|
||||
m_bStrategy_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(bStrategy_Visibility))
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property IsEnabled As Boolean
|
||||
Get
|
||||
Return m_PartM.nProductionState < ItemState.Assigned
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
End Sub
|
||||
|
||||
Sub New(BTLFeatureM As BTLFeatureM)
|
||||
m_BTLFeatureM = BTLFeatureM
|
||||
m_BTLPartM = Nothing
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
' funzione che seleziona la feature nella geometria
|
||||
Public Sub SelGeomFeature()
|
||||
SelGeomFeature(nFeatureId)
|
||||
End Sub
|
||||
|
||||
Private Sub SelGeomFeature(nMyFeatureId As Integer)
|
||||
EgtSelectObj(nMyFeatureId)
|
||||
Dim sVal As String = ""
|
||||
If EgtGetInfo(nMyFeatureId, BTL_FTR_ADJID, sVal) Then
|
||||
Dim vAdjId() As String = sVal.Split(","c)
|
||||
For Each sAdjId In vAdjId
|
||||
Dim nAdjId As Integer
|
||||
If Integer.TryParse(sAdjId, nAdjId) Then
|
||||
SelGeomFeature(nMyFeatureId + nAdjId)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If EgtGetInfo(nMyFeatureId, BTL_FTR_AUXID, sVal) Then
|
||||
Dim vAuxId() As String = sVal.Split(","c)
|
||||
For Each sAuxId In vAuxId
|
||||
Dim nAuxId As Integer
|
||||
If Integer.TryParse(sAuxId, nAuxId) Then
|
||||
EgtSelectObj(nMyFeatureId + nAuxId)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' funzione che seleziona la feature nella geometria
|
||||
Public Sub DeselGeomFeature()
|
||||
DeselGeomFeature(nFeatureId)
|
||||
End Sub
|
||||
|
||||
Private Sub DeselGeomFeature(nMyFeatureId As Integer)
|
||||
EgtDeselectObj(nMyFeatureId)
|
||||
Dim sVal As String = ""
|
||||
If EgtGetInfo(nMyFeatureId, BTL_FTR_ADJID, sVal) Then
|
||||
Dim vAdjId() As String = sVal.Split(","c)
|
||||
For Each sAdjId In vAdjId
|
||||
Dim nAdjId As Integer
|
||||
If Integer.TryParse(sAdjId, nAdjId) Then
|
||||
DeselGeomFeature(nMyFeatureId + nAdjId)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If EgtGetInfo(nMyFeatureId, BTL_FTR_AUXID, sVal) Then
|
||||
Dim vAuxId() As String = sVal.Split(","c)
|
||||
For Each sAuxId In vAuxId
|
||||
Dim nAuxId As Integer
|
||||
If Integer.TryParse(sAuxId, nAuxId) Then
|
||||
EgtDeselectObj(nMyFeatureId + nAuxId)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub RefreshFeature()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -1,39 +0,0 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class Beam
|
||||
Inherits Part
|
||||
|
||||
Protected m_dOffset As Double
|
||||
Public ReadOnly Property dOffset As Double
|
||||
Get
|
||||
Return m_dOffset
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Id del grezzo
|
||||
Protected m_nRawPartId As Integer = GDB_ID.NULL
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(nParentMachGroup As Core.MyMachGroup, nPartId As Integer, nRawPartId As Integer)
|
||||
MyBase.New(nParentMachGroup, nPartId)
|
||||
m_nRawPartId = nRawPartId
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
Friend Sub UpdateOffset()
|
||||
' calcolo offset
|
||||
Dim nBeamIndex As Integer = ParentMachGroup.PartList.IndexOf(Me)
|
||||
If nBeamIndex > 0 Then
|
||||
m_dOffset = dPOSX - (ParentMachGroup.PartList(nBeamIndex - 1).dPOSX + ParentMachGroup.PartList(nBeamIndex - 1).dL)
|
||||
Else
|
||||
Dim BeamMachGroup As BeamMachGroup = DirectCast(ParentMachGroup, BeamMachGroup)
|
||||
m_dOffset = BeamMachGroup.dStartCut
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,60 +0,0 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class BeamMachGroup
|
||||
Inherits MyMachGroup
|
||||
|
||||
Protected m_dStartCut As Double
|
||||
Public ReadOnly Property dStartCut As Double
|
||||
Get
|
||||
Return m_dStartCut
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, sName As String, sMachine As String)
|
||||
MyBase.New(nId, sName, sMachine)
|
||||
SetMachineType(MachineType.BEAM)
|
||||
EgtGetInfo(nId, MGR_RPT_BARLEN, dL)
|
||||
EgtGetInfo(nId, MGR_RPT_BARHEIGHT, dH)
|
||||
EgtGetInfo(nId, MGR_RPT_BARWIDTH, dW)
|
||||
m_dTotMat = dL
|
||||
For Each Part In PartList
|
||||
m_dMatForPart += Part.dL
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub RefreshPartList()
|
||||
' leggo StartCut da posizione primo pezzo
|
||||
Dim sInfo As String = ""
|
||||
Dim sSplitInfo() As String
|
||||
Dim bFound As Boolean = False
|
||||
EgtGetInfo(Id, MGR_RPT_PART & 1, sInfo)
|
||||
If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||
sSplitInfo = sInfo.Split(","c)
|
||||
StringToDouble(sSplitInfo(1), m_dStartCut)
|
||||
Else
|
||||
m_dStartCut = 0
|
||||
End If
|
||||
' aggiorno lista pezzi
|
||||
PartList.Clear()
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
While nRawPartId <> GDB_ID.NULL
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
If nPartId <> GDB_ID.NULL Then
|
||||
Dim NewBeam As Beam = New Beam(Me, nPartId, nRawPartId)
|
||||
PartList.Add(NewBeam)
|
||||
NewBeam.UpdateOffset()
|
||||
End If
|
||||
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub RefreshGroupData()
|
||||
EgtGetInfo(Id, MGR_RPT_BARLEN, dL)
|
||||
EgtGetInfo(Id, MGR_RPT_BARHEIGHT, dH)
|
||||
EgtGetInfo(Id, MGR_RPT_BARWIDTH, dW)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,160 @@
|
||||
<EgtBEAMWALLCORE:OptimizerWindow x:Class="BeamMachiningsWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
|
||||
WindowStyle="None"
|
||||
Width="500" Height="450"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ShowInTaskbar="False"
|
||||
Title="{Binding Title}"
|
||||
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TabControl ItemsSource="{Binding MachiningList}"
|
||||
SelectedItem="{Binding SelMachining}"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
Margin="5,0,5,0"
|
||||
Style="{StaticResource OnlyHeaders_TabControl}"/>
|
||||
|
||||
<Border Grid.Row="1" Margin="0,1,0,2" Style="{StaticResource Optimizer_Border}">
|
||||
|
||||
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding TableRowList}"
|
||||
SelectedIndex="{Binding SelRowIndex}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="0.5,0.5,0.5,5"
|
||||
BindingColumns="{Binding BeamMachiningsColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="Height" Value="25"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.Resources>
|
||||
<Style x:Key="DataGridCheckBoxColumn_Style"
|
||||
TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--Colonna On-->
|
||||
<DataGridCheckBoxColumn x:Key="colON" Binding="{Binding OnPar, UpdateSourceTrigger=PropertyChanged}"
|
||||
CellStyle="{StaticResource DataGridCheckBoxColumn_Style}">
|
||||
<DataGridCheckBoxColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/>
|
||||
</DataGridCheckBoxColumn.Header>
|
||||
</DataGridCheckBoxColumn>
|
||||
|
||||
<!--Colonna Name-->
|
||||
<DataGridTemplateColumn x:Key="colNAME">
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/>
|
||||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsEditable="False"
|
||||
SelectedItem="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=NamesList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="5,0,0,0"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<!--Colonna Style-->
|
||||
<DataGridTemplateColumn x:Key="colTYPE">
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.TypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/>
|
||||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsEditable="False"
|
||||
SelectedItem="{Binding Type,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=TypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Type,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="5,0,0,0"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
</DataGrid.Resources>
|
||||
|
||||
</EgtBEAMWALLCORE:EgtDataGrid>
|
||||
</Border>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,0,0,5"
|
||||
HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Content="/\"
|
||||
Command="{Binding MoveRowUp_Command}"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource EgtWPFLib5_Button}"/>
|
||||
<Button Content="\/"
|
||||
Command="{Binding MoveRowDown_Command}"
|
||||
Grid.Column="1"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource EgtWPFLib5_Button}"/>
|
||||
<Button Content="{Binding AddRowMsg}"
|
||||
Command="{Binding AddRow_Command}"
|
||||
Grid.Column="2"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource EgtWPFLib5_Button}"/>
|
||||
<Button Content="{Binding DeleteRowMsg}"
|
||||
Command="{Binding DeleteRow_Command}"
|
||||
Grid.Column="3"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource EgtWPFLib5_Button}"/>
|
||||
<Button Content="{Binding SaveMsg}"
|
||||
Command="{Binding Save_Command}"
|
||||
Grid.Column="4"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource EgtWPFLib5_Button}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</EgtBEAMWALLCORE:OptimizerWindow>
|
||||
@@ -0,0 +1,17 @@
|
||||
Public Class BeamMachiningsWindowV
|
||||
|
||||
Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM
|
||||
|
||||
Sub New(Owner As System.Windows.Window, BeamMachiningsWindowVM As MyBeamMachiningsWindowVM)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = BeamMachiningsWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_BeamMachiningsWindowVM = BeamMachiningsWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,35 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyBeamMachiningsWindowVM
|
||||
Inherits BeamMachiningsWindowVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_BeamMachiningsColumns As New ObservableCollection(Of EgtDataGridColumn)
|
||||
Public Property BeamMachiningsColumns As ObservableCollection(Of EgtDataGridColumn)
|
||||
Get
|
||||
Return m_BeamMachiningsColumns
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
||||
m_BeamMachiningsColumns = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(sTitle As String, sBaseDir As String, sMachTypePath As String, sTabTemplPath As String, Optional bIsBeam As Boolean = True)
|
||||
MyBase.New(sTitle, sBaseDir, sMachTypePath, sTabTemplPath, bIsBeam)
|
||||
' carico le colonne della datagrid
|
||||
GetPrivateProfileColumns(S_BEAMMACHININGS, BeamMachiningsColumns)
|
||||
' aggiorno la visibilità delle colonne
|
||||
For Each col In BeamMachiningsColumns
|
||||
col.ColumnVisibility = If(col.Visible, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,24 @@
|
||||
Public Class CalcEditEndEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Public Enum Results As Integer
|
||||
NULL = 0
|
||||
MODIFIED = 1
|
||||
ERROR_ = 2
|
||||
End Enum
|
||||
|
||||
Public m_End As Results
|
||||
Public Property End_ As Results
|
||||
Get
|
||||
Return m_End
|
||||
End Get
|
||||
Private Set(value As Results)
|
||||
m_End = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Result As Results)
|
||||
m_End = Result
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,36 @@
|
||||
Public Class CalcEndEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Public Enum Results As Integer
|
||||
NULL = 0
|
||||
OK = 1
|
||||
ERROR_ = 2
|
||||
EDIT = 3
|
||||
End Enum
|
||||
|
||||
Public m_End As Results
|
||||
Public Property End_ As Results
|
||||
Get
|
||||
Return m_End
|
||||
End Get
|
||||
Private Set(value As Results)
|
||||
m_End = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_CmdType As CmdTypes
|
||||
Public Property CmdType As CmdTypes
|
||||
Get
|
||||
Return m_CmdType
|
||||
End Get
|
||||
Private Set(value As CmdTypes)
|
||||
m_CmdType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(CmdType As CmdTypes, Result As Results)
|
||||
m_CmdType = CmdType
|
||||
m_End = Result
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,594 @@
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Module CalcIntegration
|
||||
|
||||
Private _thread As System.Threading.Thread
|
||||
|
||||
Public Event Calc_Ended As EventHandler(Of CalcEndEventArgs)
|
||||
Public Event Calc_ProcessResult As EventHandler(Of CalcResultEventArgs)
|
||||
Public Event Calc_ProcessEnd As EventHandler(Of CalcProcessEndEventArgs)
|
||||
|
||||
Private m_bIsSupervisor As Boolean = False
|
||||
|
||||
Public Enum CmdTypes As Integer
|
||||
GENERATE = 0
|
||||
MODIFY = 1
|
||||
SIMULATE = 2
|
||||
CHECK = 3
|
||||
CHECKGEN = 4
|
||||
POINT_CLOUD = 5
|
||||
RAWPART = 6
|
||||
EDIT = 7
|
||||
CHECKNOSIM = 8
|
||||
TOPOLOGY = 9
|
||||
FLIP_ROT = 10
|
||||
OPENTOOLDB = 11 ' Non utilizzato
|
||||
OPENMACHINIGDB = 12 ' Non utilizzato
|
||||
End Enum
|
||||
|
||||
Private Structure MyProc
|
||||
Public bEnable As Boolean
|
||||
Public Proc As Process
|
||||
Public nBar As Integer
|
||||
End Structure
|
||||
|
||||
Private m_MaxCamInstances As Integer = 1
|
||||
Public Sub SetMaxCamInstances(value As Integer)
|
||||
m_MaxCamInstances = value
|
||||
End Sub
|
||||
|
||||
Delegate Sub CallbackDlg(dProgress As Double, sProgress As String, ByRef bCancel As Boolean)
|
||||
|
||||
Public Sub Run(vBar As Bar(), sProjDirPath As String, callback As CallbackDlg, Optional bIsSupervisor As Boolean = False)
|
||||
_thread = New Thread(Sub()
|
||||
m_bIsSupervisor = bIsSupervisor
|
||||
DoJob(vBar, sProjDirPath, callback)
|
||||
End Sub)
|
||||
_thread.Start()
|
||||
End Sub
|
||||
|
||||
Private Sub DoJob(vBar As Bar(), sProjDirPath As String, callback As CallbackDlg)
|
||||
Dim bCancel As Boolean = False
|
||||
callback(0, "Init", bCancel)
|
||||
|
||||
If vBar.Count > 0 AndAlso vBar(0).nCmdType = CmdTypes.SIMULATE Then
|
||||
Dim Bar As Bar = vBar(0)
|
||||
' verifico se il pezzo e' non calcolato
|
||||
If Bar.nProgramPage = ProjectType.PROJ Then
|
||||
If Bar.nGlobState = CalcStates.NOTCALCULATED Then
|
||||
Bar.sBarPath = CreateNewProjectFromPart(Bar.nBarId, sProjDirPath)
|
||||
Else
|
||||
Dim nPDN As Integer = 0
|
||||
EgtGetInfo(Bar.nBarId, BTL_PRT_PDN, nPDN)
|
||||
Bar.sBarPath = sProjDirPath & "\" & nPDN.ToString() & ".bwe"
|
||||
End If
|
||||
ElseIf Bar.nProgramPage = ProjectType.PROD Then
|
||||
If Bar.nGlobState = CalcStates.NOTCALCULATED Then
|
||||
Bar.sBarPath = CreateNewProjectFromMachGroup(Bar.nBarId, sProjDirPath, Bar.nGlobState)
|
||||
Else
|
||||
Dim sMachGroupName As String = ""
|
||||
EgtGetMachGroupName(Bar.nBarId, sMachGroupName)
|
||||
Bar.sBarPath = sProjDirPath & "\" & sMachGroupName & ".bwe"
|
||||
End If
|
||||
End If
|
||||
ElseIf vBar(0).nCmdType <> CmdTypes.EDIT Then
|
||||
' creo progetti a seconda del tipo
|
||||
For Each Bar In vBar
|
||||
If Bar.nProgramPage = ProjectType.PROJ Then
|
||||
Bar.sBarPath = CreateNewProjectFromPart(Bar.nBarId, sProjDirPath)
|
||||
ElseIf Bar.nProgramPage = ProjectType.PROD Then
|
||||
Bar.sBarPath = CreateNewProjectFromMachGroup(Bar.nBarId, sProjDirPath, Bar.nGlobState)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Dim bIsSimulation As Boolean = False
|
||||
Dim bIsSimulationVerifyed As Boolean = False
|
||||
Dim bIsEdit As Boolean = False
|
||||
Dim LastFileWriteTime As Date
|
||||
' se sono in simulazione
|
||||
If vBar.Count > 0 AndAlso vBar(0).nCmdType = CmdTypes.SIMULATE Then
|
||||
bIsSimulation = True
|
||||
callback(0, "Simulation opened", bCancel)
|
||||
ElseIf vBar.Count > 0 AndAlso vBar(0).nCmdType = CmdTypes.EDIT Then
|
||||
bIsEdit = True
|
||||
Dim sCurrFilePath As String = ""
|
||||
EgtGetCurrFilePath(sCurrFilePath)
|
||||
vBar(0).sBarPath = sCurrFilePath
|
||||
LastFileWriteTime = File.GetLastWriteTime(sCurrFilePath)
|
||||
callback(0, "Editor opened", bCancel)
|
||||
Else
|
||||
callback(0.1, "", bCancel)
|
||||
End If
|
||||
|
||||
Dim ExePath As String = String.Empty
|
||||
GetMainPrivateProfileString(S_BEAM, K_CALCPATH, "", ExePath)
|
||||
' Numero di barre
|
||||
Dim numBars As Integer = vBar.Count
|
||||
If numBars = 0 Then Return
|
||||
|
||||
' Numero di core logici da utilizzare (minimo tra presenti sul PC e imposti da INI)
|
||||
Dim nMaxThread As Integer = Math.Min(Environment.ProcessorCount, m_MaxCamInstances)
|
||||
|
||||
Array.Resize(Of Bar)(vBar, numBars + nMaxThread - 1)
|
||||
|
||||
' Frazione di avanzamento del lavoro (in piu)
|
||||
Dim dProgress As Double = 0
|
||||
'indice incremento progress durante calcolo barra
|
||||
Dim nPgsCurrBar As Integer = 0
|
||||
Dim nPgsClock As Integer = 0
|
||||
|
||||
|
||||
' Lancio in parallelo più processi (senza superare il numero di core logici presenti)
|
||||
Dim vProc As MyProc() = New MyProc(nMaxThread - 1) {}
|
||||
For j As Integer = 0 To nMaxThread - 1
|
||||
vProc(j).nBar = -1
|
||||
vProc(j).bEnable = True
|
||||
Next
|
||||
|
||||
' Processo i Btl in parallelo
|
||||
Dim nCurrBar As Integer = 0
|
||||
Dim nDoneBar As Integer = 0
|
||||
Dim nShiftBar As Integer = 0
|
||||
Dim nActProc As Integer = 0
|
||||
|
||||
Dim bAllKO As Boolean
|
||||
|
||||
While nCurrBar < numBars + nShiftBar OrElse nActProc > 0
|
||||
|
||||
For j As Integer = 0 To nMaxThread - 1
|
||||
If Not vProc(j).bEnable Then Continue For
|
||||
Dim bDone As Boolean = False
|
||||
|
||||
If vProc(j).nBar = -1 Then
|
||||
|
||||
If nCurrBar < numBars + nShiftBar Then
|
||||
|
||||
If vBar(nCurrBar).bBarOk Then
|
||||
vProc(j).Proc = New Process()
|
||||
vProc(j).Proc.StartInfo.FileName = ExePath
|
||||
If bIsEdit Then
|
||||
vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """"
|
||||
Else
|
||||
vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """ " &
|
||||
"""" & vBar(nCurrBar).nProjType & """ " &
|
||||
"""" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType
|
||||
End If
|
||||
vProc(j).Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
If vProc(j).Proc.Start() Then
|
||||
vProc(j).nBar = nCurrBar
|
||||
nCurrBar += 1
|
||||
nActProc += 1
|
||||
End If
|
||||
Else
|
||||
If vBar(nCurrBar).nCmdType = CmdTypes.CHECK OrElse vBar(nCurrBar).nCmdType = CmdTypes.CHECKGEN OrElse vBar(nCurrBar).nCmdType = CmdTypes.CHECKNOSIM Then
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(nCurrBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
ElseIf vBar(nCurrBar).nCmdType = CmdTypes.GENERATE Then
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(nCurrBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
End If
|
||||
bDone = True
|
||||
nCurrBar += 1
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
If vProc(j).Proc.HasExited Then
|
||||
' se terminato con successo
|
||||
If vProc(j).Proc.ExitCode = 0 Then
|
||||
' salvo il risultato
|
||||
If vBar(vProc(j).nBar).nCmdType = CmdTypes.CHECK OrElse vBar(vProc(j).nBar).nCmdType = CmdTypes.CHECKGEN OrElse vBar(vProc(j).nBar).nCmdType = CmdTypes.CHECKNOSIM Then
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
ElseIf vBar(vProc(j).nBar).nCmdType = CmdTypes.GENERATE Then
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
End If
|
||||
bDone = True
|
||||
vProc(j).nBar = -1
|
||||
nActProc -= 1
|
||||
' se superato il numero di processi eseguibili in parallelo
|
||||
ElseIf vProc(j).Proc.ExitCode = 1 Then
|
||||
' aggiungo il pezzo in coda
|
||||
If numBars + nShiftBar < numBars + nMaxThread Then
|
||||
vBar(numBars + nShiftBar) = vBar(vProc(j).nBar)
|
||||
nShiftBar += 1
|
||||
End If
|
||||
' disabilito il processo
|
||||
vProc(j).bEnable = False
|
||||
vProc(j).nBar = -1
|
||||
nActProc -= 1
|
||||
' altrimenti (errore generico di esecuzione)
|
||||
Else
|
||||
' salvo il risultato
|
||||
If vBar(vProc(j).nBar).nCmdType = CmdTypes.CHECK OrElse vBar(vProc(j).nBar).nCmdType = CmdTypes.CHECKGEN OrElse vBar(vProc(j).nBar).nCmdType = CmdTypes.CHECKNOSIM Then
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
ElseIf vBar(vProc(j).nBar).nCmdType = CmdTypes.GENERATE Then
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
End If
|
||||
bDone = True
|
||||
vProc(j).nBar = -1
|
||||
nActProc -= 1
|
||||
End If
|
||||
Else
|
||||
vProc(j).Proc.Refresh()
|
||||
End If
|
||||
End If
|
||||
|
||||
If bDone Then
|
||||
' se sono in simulazione
|
||||
If bIsSimulation Then
|
||||
Dim sOriPath As String = Path.ChangeExtension(vBar(0).sBarPath, ".ori.bwe")
|
||||
If String.IsNullOrWhiteSpace(sOriPath) Then Return
|
||||
' se file modificato a mano
|
||||
If File.GetLastWriteTime(sOriPath) < File.GetLastWriteTime(vBar(0).sBarPath) Then
|
||||
' aggiorno progetto
|
||||
If File.Exists(vBar(0).sBarPath) Then File.Copy(vBar(0).sBarPath, sOriPath, True)
|
||||
|
||||
' messaggio di lancio verifica
|
||||
callback(50, "Verifying modifications...", bCancel)
|
||||
' lancio verifica
|
||||
System.Threading.Thread.Sleep(500)
|
||||
|
||||
Dim Proc As New Process()
|
||||
Proc.StartInfo.FileName = ExePath
|
||||
Proc.StartInfo.Arguments = """" & vBar(0).sBarPath & """ " &
|
||||
"""" & vBar(0).nProjType & """ " &
|
||||
"""" & vBar(0).nMachineName & """ " & CmdTypes.CHECKGEN
|
||||
Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
If Proc.Start() Then
|
||||
Dim ProgressValue As Integer = 50
|
||||
While Not Proc.HasExited
|
||||
Proc.Refresh()
|
||||
If ProgressValue < 90 Then ProgressValue += 0.001
|
||||
callback(ProgressValue, "Verifying modifications...", bCancel)
|
||||
Thread.Sleep(1)
|
||||
End While
|
||||
' se terminato con successo
|
||||
If Proc.ExitCode = 0 Then
|
||||
' salvo il risultato
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(0)))
|
||||
Thread.Sleep(500)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' messaggio di completamento simulazione
|
||||
callback(0, "Simulation closing", bCancel)
|
||||
ElseIf bIsEdit Then
|
||||
' ricarico il progetto
|
||||
Dim Result As CalcEndEventArgs.Results
|
||||
If bAllKO Then
|
||||
Result = CalcEndEventArgs.Results.ERROR_
|
||||
ElseIf bIsEdit Then
|
||||
Result = CalcEndEventArgs.Results.EDIT
|
||||
Else
|
||||
Result = CalcEndEventArgs.Results.OK
|
||||
End If
|
||||
RaiseEvent Calc_Ended(Nothing, New CalcEndEventArgs(CmdTypes.EDIT, Result))
|
||||
Return
|
||||
Else
|
||||
' Dialog con Progress Bar
|
||||
nDoneBar += 1
|
||||
dProgress = 1 / numBars * nDoneBar
|
||||
Dim sProg As String = (dProgress * 100).ToString("F1", CultureInfo.InvariantCulture)
|
||||
callback(dProgress, " Progress: " & sProg & "% Count: " & nDoneBar & " / " & numBars, bCancel)
|
||||
End If
|
||||
If bCancel Then
|
||||
' fine
|
||||
callback(1, "", bCancel)
|
||||
' riabilito interfaccia
|
||||
RaiseEvent Calc_Ended(Nothing, New CalcEndEventArgs(CmdTypes.CHECKGEN, CalcEndEventArgs.Results.OK))
|
||||
Return
|
||||
End If
|
||||
nPgsCurrBar = 0
|
||||
nPgsClock = 0
|
||||
Else
|
||||
' se non sono in simulazione
|
||||
If Not bIsSimulation AndAlso Not bIsEdit Then
|
||||
' aggiorno conteggio
|
||||
If nPgsClock >= 100 AndAlso nPgsCurrBar < 149 Then
|
||||
nPgsCurrBar += 1
|
||||
dProgress = 1 / numBars * nDoneBar + 1 / numBars / 150 * nPgsCurrBar
|
||||
Dim sProg As String = (dProgress * 100).ToString("F1", CultureInfo.InvariantCulture)
|
||||
callback(dProgress, " Progress: " & sProg & "% Count: " & nDoneBar & " / " & numBars, bCancel)
|
||||
nPgsClock = 0
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nPgsClock += 1
|
||||
Thread.Sleep(1)
|
||||
Next
|
||||
|
||||
' Verifico che i processi non siano andati tutti in errore
|
||||
bAllKO = True
|
||||
|
||||
For j As Integer = 0 To nMaxThread - 1
|
||||
If vProc(j).bEnable Then bAllKO = False
|
||||
Next
|
||||
|
||||
If bAllKO Then
|
||||
Exit While
|
||||
End If
|
||||
|
||||
Thread.Sleep(10)
|
||||
End While
|
||||
|
||||
Thread.Sleep(300)
|
||||
|
||||
' se sono in simulazione
|
||||
If bIsSimulation Then
|
||||
callback(1, "Simulation closed", bCancel)
|
||||
Else
|
||||
callback(1, "Done", bCancel)
|
||||
End If
|
||||
' riabilito interfaccia
|
||||
RaiseEvent Calc_Ended(Nothing, New CalcEndEventArgs(If(bIsSimulation And Not bIsSimulationVerifyed, CmdTypes.SIMULATE, CmdTypes.CHECKGEN), If(bAllKO, CalcEndEventArgs.Results.ERROR_, CalcEndEventArgs.Results.OK)))
|
||||
End Sub
|
||||
|
||||
Public Function CreateNewProjectFromPart(nPartId As Integer, sProjDirPath As String) As String
|
||||
' Aggiorno identificativi per segnalazione errori
|
||||
UpdateCutIdAndTaskId(nPartId)
|
||||
|
||||
' Disabilito segnalazione modificato
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
|
||||
' Recupero visibilita' pezzo e lo imposto a visibile
|
||||
Dim nOldPartMode As Integer
|
||||
EgtGetMode(nPartId, nOldPartMode)
|
||||
EgtSetMode(nPartId, GDB_MD.STD)
|
||||
|
||||
' Salvo pezzo nel suo progetto
|
||||
Dim bOk As Boolean = False
|
||||
Dim nPDN As Integer = 0
|
||||
EgtGetInfo(nPartId, BTL_PRT_PDN, nPDN)
|
||||
Dim sPartFilePath As String = sProjDirPath & "\" & nPDN.ToString() & ".bwe"
|
||||
bOk = EgtSaveObjToFile({nPartId, EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO), EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)}, sPartFilePath, NGE.CMPTEXT)
|
||||
|
||||
' Ripristino visibilita' pezzo
|
||||
EgtSetMode(nPartId, nOldPartMode)
|
||||
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
|
||||
Return If(bOk, sPartFilePath, String.Empty)
|
||||
End Function
|
||||
|
||||
Public Function CreateNewProjectFromMachGroup(nMachGroupId As Integer, sProjDirPath As String, nGlobState As Integer) As String
|
||||
' aggiorno cutid e taskid solo fuori dal supervisore o se pezzo ricalcolato
|
||||
If Not m_bIsSupervisor OrElse nGlobState = CalcStates.NOTCALCULATED Then
|
||||
Dim DisableMgr As DisableModifiedMgr = Nothing
|
||||
If m_bIsSupervisor Then
|
||||
' Disabilito segnalazione modificato
|
||||
DisableMgr = New DisableModifiedMgr
|
||||
End If
|
||||
' Aggiorno identificativi per segnalazione errori
|
||||
Dim nOldMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
If nMachGroupId <> nOldMachGroup Then EgtSetCurrMachGroup(nMachGroupId)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If EgtVerifyRawPartPhase(nRawId, 1) Then
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
UpdateCutIdAndTaskId(nPartId)
|
||||
nPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
End While
|
||||
End If
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
If nMachGroupId <> nOldMachGroup Then
|
||||
If nOldMachGroup <> GDB_ID.NULL Then
|
||||
EgtSetCurrMachGroup(nOldMachGroup)
|
||||
Else
|
||||
EgtResetCurrMachGroup()
|
||||
End If
|
||||
End If
|
||||
If m_bIsSupervisor Then
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
End If
|
||||
End If
|
||||
|
||||
' Salvo gruppo di lavorazione nel suo progetto
|
||||
Dim sMachGroupName As String = ""
|
||||
EgtGetMachGroupName(nMachGroupId, sMachGroupName)
|
||||
Dim sMachGroupFilePath As String = sProjDirPath & "\" & sMachGroupName & ".bwe"
|
||||
If EgtSaveMachGroupToFile(nMachGroupId, {EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO), EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)}, sMachGroupFilePath, NGE.CMPTEXT) Then
|
||||
Return sMachGroupFilePath
|
||||
End If
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
Private Function UpdateCutIdAndTaskId(nPartId As Integer) As Boolean
|
||||
' Assegno Id a CutId per calcoli
|
||||
EgtSetInfo(nPartId, "CUTID", nPartId, True)
|
||||
|
||||
' Assegno TASKID agli outline per calcoli
|
||||
Dim nOutLayerId As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutLayerId)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia una feature
|
||||
Dim nGRP As Integer
|
||||
If EgtGetInfo(nOutlineId, BTL_FTR_GRP, nGRP) Then
|
||||
' verifico se ha un principale
|
||||
Dim nMainOffsId As Integer = 0
|
||||
Dim nTaskId As Integer = nOutlineId
|
||||
If EgtGetInfo(nOutlineId, BTL_FTR_MAINID, nMainOffsId) Then
|
||||
nTaskId = nOutlineId + nMainOffsId
|
||||
End If
|
||||
' assegno TASKID alla feature per calcoli
|
||||
EgtSetInfo(nOutlineId, "TASKID", nTaskId)
|
||||
' recupero eventuali AuxId
|
||||
Dim sAuxIds As String = ""
|
||||
If EgtGetInfo(nOutlineId, BTL_FTR_AUXID, sAuxIds) Then
|
||||
Dim AuxIdArray() As String = sAuxIds.Split(","c)
|
||||
If AuxIdArray.Count > 0 Then
|
||||
For Each AuxId In AuxIdArray
|
||||
AuxId = AuxId.Trim()
|
||||
AuxId = AuxId.Trim("+"c)
|
||||
Dim nAuxId As Integer
|
||||
If Integer.TryParse(AuxId, nAuxId) Then
|
||||
EgtSetInfo(nOutlineId + nAuxId, "TASKID", nTaskId)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
|
||||
' Assegno TASKID alle feature per calcoli
|
||||
Dim nProcessingId As Integer = EgtGetFirstNameInGroup(nPartId, PROCESSINGS)
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nProcessingId)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia una feature
|
||||
Dim nGRP As Integer
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_GRP, nGRP) Then
|
||||
' verifico se ha un principale
|
||||
Dim nMainOffsId As Integer
|
||||
Dim nTaskId As Integer = nFeatureId
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_MAINID, nMainOffsId) Then
|
||||
nTaskId = nFeatureId + nMainOffsId
|
||||
End If
|
||||
' assegno TASKID alla feature per calcoli
|
||||
EgtSetInfo(nFeatureId, "TASKID", nTaskId)
|
||||
' recupero eventuali AuxId
|
||||
Dim sAuxIds As String = ""
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_AUXID, sAuxIds) Then
|
||||
Dim AuxIdArray() As String = sAuxIds.Split(","c)
|
||||
For Each AuxId In AuxIdArray
|
||||
AuxId = AuxId.Trim()
|
||||
AuxId = AuxId.Trim("+"c)
|
||||
Dim nAuxId As Integer
|
||||
If Integer.TryParse(AuxId, nAuxId) Then
|
||||
EgtSetInfo(nFeatureId + nAuxId, "TASKID", nTaskId)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
Public Class Bar
|
||||
Public nBarState As Integer
|
||||
Public nBarId As Integer
|
||||
Public sBarPath As String
|
||||
Public bBarOk As Boolean
|
||||
Public nCmdType As Integer
|
||||
Public nProgramPage As ProjectType
|
||||
Public nProjType As BWType
|
||||
Public nMachineName As String
|
||||
Public nGlobState As Integer
|
||||
End Class
|
||||
|
||||
Public Class ProcessResult
|
||||
|
||||
Public Enum ProcessResultTypes As Integer
|
||||
BAR = 1
|
||||
PART = 2
|
||||
TASKID = 3
|
||||
FALL = 4
|
||||
TIME = 5
|
||||
End Enum
|
||||
|
||||
Private m_Type As ProcessResultTypes
|
||||
Public ReadOnly Property Type As ProcessResultTypes
|
||||
Get
|
||||
Return m_Type
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nCUTID As Integer
|
||||
Public ReadOnly Property nCUTID As Integer
|
||||
Get
|
||||
Return m_nCUTID
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nTASKID As Integer
|
||||
Public ReadOnly Property nTASKID As Integer
|
||||
Get
|
||||
Return m_nTASKID
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nERR As Integer
|
||||
Public ReadOnly Property nERR As Integer
|
||||
Get
|
||||
Return m_nERR
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sMSG As String
|
||||
Public ReadOnly Property sMSG As String
|
||||
Get
|
||||
Return m_sMSG
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dROT As Double
|
||||
Public ReadOnly Property dROT As Double
|
||||
Get
|
||||
Return m_dROT
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetROT(value As Double)
|
||||
m_dROT = value
|
||||
End Sub
|
||||
|
||||
Private m_nFALL As Integer
|
||||
Public ReadOnly Property nFALL As Integer
|
||||
Get
|
||||
Return m_nFALL
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nTIME As Integer
|
||||
Public ReadOnly Property nTIME As Integer
|
||||
Get
|
||||
Return m_nTIME
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared Function CreateTaskResult(CUTID As Integer, TASKID As Integer, ERR As Integer, MSG As String, ROT As Double) As ProcessResult
|
||||
If CUTID <> 0 Then
|
||||
If TASKID = 0 Then
|
||||
Return New ProcessResult(ProcessResultTypes.PART, CUTID, TASKID, ERR, MSG, ROT, 0, 0)
|
||||
End If
|
||||
Return New ProcessResult(ProcessResultTypes.TASKID, CUTID, TASKID, ERR, MSG, ROT, 0, 0)
|
||||
End If
|
||||
Return New ProcessResult(ProcessResultTypes.BAR, CUTID, TASKID, ERR, MSG, ROT, 0, 0)
|
||||
End Function
|
||||
Public Shared Function CreateFallResult(CUTID As Integer, ERR As Integer, MSG As String, FALL As Integer) As ProcessResult
|
||||
Return New ProcessResult(ProcessResultTypes.FALL, CUTID, 0, ERR, MSG, 0, FALL, 0)
|
||||
End Function
|
||||
Public Shared Function CreateTimeResult(CUTID As Integer, TIME As Integer) As ProcessResult
|
||||
Return New ProcessResult(ProcessResultTypes.TIME, CUTID, 0, 0, "", 0, 0, TIME)
|
||||
End Function
|
||||
|
||||
Protected Sub New(Type As ProcessResultTypes, CUTID As Integer, TASKID As Integer, ERR As Integer, MSG As String, ROT As Double, FALL As Integer, TIME As Integer)
|
||||
m_Type = Type
|
||||
m_nCUTID = CUTID
|
||||
m_nTASKID = TASKID
|
||||
m_nERR = ERR
|
||||
m_sMSG = MSG
|
||||
m_dROT = ROT
|
||||
m_nFALL = FALL
|
||||
m_nTIME = TIME
|
||||
End Sub
|
||||
|
||||
Public Sub ResetTypeFeature()
|
||||
m_Type = ProcessResultTypes.PART
|
||||
m_nTASKID = 0
|
||||
End Sub
|
||||
Public Sub ResetTypePart()
|
||||
m_Type = ProcessResultTypes.BAR
|
||||
m_nCUTID = 0
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class CalcProcessEndEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Public m_Result As Bar
|
||||
Public Property Result As Bar
|
||||
Get
|
||||
Return m_Result
|
||||
End Get
|
||||
Private Set(value As Bar)
|
||||
m_Result = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Result As Bar)
|
||||
m_Result = Result
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,24 @@
|
||||
Public Class CalcResultEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Public Enum Results As Integer
|
||||
NULL = 0
|
||||
OK = 1
|
||||
ERROR_ = 2
|
||||
End Enum
|
||||
|
||||
Public m_Result As Bar
|
||||
Public Property Result As Bar
|
||||
Get
|
||||
Return m_Result
|
||||
End Get
|
||||
Private Set(value As Bar)
|
||||
m_Result = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Result As Bar)
|
||||
m_Result = Result
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,138 @@
|
||||
<Grid x:Class="General_ConfigurationPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Style="{StaticResource List_StackPanel}">
|
||||
<GroupBox Header="{Binding CurrentLanguage_Msg}"
|
||||
Style="{StaticResource Warehouse_GroupBox}">
|
||||
<UniformGrid Rows="2"
|
||||
Style="{StaticResource General_UniformGrid}">
|
||||
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}"
|
||||
SelectedItem="{Binding SelectedLanguage}"
|
||||
DisplayMemberPath="Name"
|
||||
Style="{StaticResource General_ComboBox}"/>
|
||||
<TextBlock Text="{Binding LanguageAdvert_Msg}"
|
||||
Style="{StaticResource General_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
<UniformGrid Columns="2"
|
||||
Style="{StaticResource AddRawPartWnd_UniformGrid}">
|
||||
<TextBlock Text="{Binding MMUnits_Msg}"
|
||||
Style="{StaticResource MMUnits_TextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelMeasureUnit}"
|
||||
Style="{StaticResource UnitMeasureList_ComboBox}"/>
|
||||
</UniformGrid>
|
||||
<GroupBox Header="{Binding Nesting_Msg}"
|
||||
Style="{StaticResource Warehouse_GroupBox}">
|
||||
<StackPanel>
|
||||
<UniformGrid Columns="2"
|
||||
Style="{StaticResource AddRawPartWnd_UniformGrid}">
|
||||
<TextBlock Text="{Binding SectionTime_Msg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2"
|
||||
Style="{StaticResource AddRawPartWnd_UniformGrid}">
|
||||
<TextBlock Grid.Row="1" Text="{Binding PartTime_Msg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding PartTime, UpdateSourceTrigger=Explicit}"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<UniformGrid Columns="2"
|
||||
Style="{StaticResource AddRawPartWnd_UniformGrid}">
|
||||
<TextBlock Text="{Binding PrintLabel_Msg}"
|
||||
Style="{StaticResource MMUnits_TextBlock}"/>
|
||||
<CheckBox IsChecked="{Binding bPrintLabel_IsChecked}"
|
||||
Style="{StaticResource General_CheckBox}"/>
|
||||
</UniformGrid>
|
||||
<GroupBox Header="{Binding BackupRestore_Msg}"
|
||||
Style="{StaticResource Optimizer_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Style="{StaticResource General_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox x:Name="ExternalBackup_CheckBox"
|
||||
IsChecked="{Binding bExternalBackupActive}"
|
||||
Style="{StaticResource PParameters_CheckBox}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding External_Msg}"
|
||||
Style="{StaticResource Ext_TextBlock}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Style="{StaticResource General_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Text="{Binding ExternalBackupFolderPath}"
|
||||
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
|
||||
Style="{StaticResource General_TextBox}"/>
|
||||
<Button Grid.Column="1"
|
||||
Content="..."
|
||||
Foreground="{StaticResource BeamWall_White}"
|
||||
Command="{Binding ChooseExternalBackupFolderPath_Command}"
|
||||
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
|
||||
Style="{StaticResource General_Button}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Remainder_Msg}"/>
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding ReminderList}"
|
||||
SelectedItem="{Binding SelReminder}"
|
||||
Style="{StaticResource GeneralConfiguration_ComboBox}" />
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="3"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<Button Content="{Binding Backup_Msg}"
|
||||
Command="{Binding Backup_Command}"
|
||||
Style="{StaticResource MovePartInRawPartWnd_Button}"/>
|
||||
<Button Content="{Binding Restore_Msg}"
|
||||
Command="{Binding Restore_Command}"
|
||||
Style="{StaticResource EgtWPFLib5_Button}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<!--<UniformGrid Columns="2"
|
||||
Style="{StaticResource GeneralConfiguration_UniformGrid}">
|
||||
<TextBlock Text="{Binding Import_Msg}"
|
||||
Style="{StaticResource MMUnits_TextBlock}"/>
|
||||
<CheckBox IsChecked="{Binding bVerifyImportBTL_IsChecked}"
|
||||
Style="{StaticResource General_CheckBox}"/>
|
||||
</UniformGrid>
|
||||
<GroupBox Header="{Binding Tema_Msg}"
|
||||
Style="{StaticResource Warehouse_GroupBox}">
|
||||
<UniformGrid Rows="2"
|
||||
Style="{StaticResource General_UniformGrid}">
|
||||
<ComboBox ItemsSource="{Binding Themes, Mode=OneWay}"
|
||||
SelectedItem="{Binding SelectedTheme}"
|
||||
DisplayMemberPath="Name"
|
||||
Style="{StaticResource General_ComboBox}"/>
|
||||
<TextBlock Text="{Binding TemaAdvert_Msg}"
|
||||
Style="{StaticResource General_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>-->
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class General_ConfigurationPageV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,81 @@
|
||||
<Grid x:Class="Machine_ConfigurationPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<GroupBox Style="{StaticResource MachineConfiguration_GroupBox}">
|
||||
<EgtBEAMWALLCORE:MachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1"
|
||||
Visibility="{Binding MachineParameter_Visibility}"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<ItemsControl ItemsSource="{Binding ConfigMachTableList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel x:Name="GroupStackPanel"
|
||||
Style="{StaticResource PartManager_StackPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<GroupBox Header="{Binding sName}"
|
||||
Style="{StaticResource MachineParam_GroupBox}">
|
||||
<ItemsControl Name="MachParamsItemsControl"
|
||||
ItemsSource="{Binding MachParamList}"
|
||||
Style="{StaticResource MachinePanel_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource Project_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Style="{StaticResource MachParam_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
ToolTip="{Binding sName}"
|
||||
Style="{StaticResource MachinePanel_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||
Style="{StaticResource MachineConfiguration_TextBox}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding sDescription}"
|
||||
ToolTip="{Binding sDescription}"
|
||||
Style="{StaticResource Description_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</GroupBox>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
|
||||
<Button Grid.Row="1"
|
||||
Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding Machine_Visibility}"
|
||||
Style="{StaticResource SaveMachinePanel_Button}">
|
||||
<Image Source="{StaticResource Save_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class Machine_ConfigurationPageV
|
||||
|
||||
End Class
|
||||
@@ -24,13 +24,15 @@
|
||||
NULL = 0
|
||||
BEAM = 1
|
||||
WALL = 2
|
||||
BOTH = 3
|
||||
End Enum
|
||||
|
||||
Enum CalcStates As Integer
|
||||
NOTCALCULATED = -1
|
||||
OK = 0
|
||||
WARNING = 1
|
||||
ERROR_ = 2
|
||||
INFO = 1
|
||||
WARNING = 2
|
||||
ERROR_ = 3
|
||||
End Enum
|
||||
|
||||
Public Enum Range As Integer
|
||||
@@ -102,156 +104,212 @@
|
||||
|
||||
Public Const BTLFEATURES_FILE_NAME As String = "BTLFeatures.ini"
|
||||
|
||||
'Public Const S_GENERAL As String = "General"
|
||||
'Public Const K_DEBUG As String = "Debug"
|
||||
|
||||
' Tipo di progetto
|
||||
Public Enum ProjectType As Integer
|
||||
PROJ = 1
|
||||
PROD = 2
|
||||
End Enum
|
||||
|
||||
Friend Const PROJ As String = "PROJ"
|
||||
Friend Const FILENAMESEPARATOR As Char = "^"c
|
||||
Friend Const BTLINFO As String = "BtlInfo"
|
||||
' Tipo di progetto (Beam o Wall)
|
||||
Public Enum BWType As Integer
|
||||
NULL = 0
|
||||
BEAM = 1
|
||||
WALL = 2
|
||||
End Enum
|
||||
|
||||
Public Const PROJ As String = "PROJ"
|
||||
Public Const FILENAMESEPARATOR As Char = "^"c
|
||||
Public Const BTLINFO As String = "BtlInfo"
|
||||
Public Const PROJECTINFO As String = "ProjectInfo"
|
||||
|
||||
' layer per assemblato
|
||||
Public Const ASSEBASE As String = "AsseBase"
|
||||
' info parametri assemblato
|
||||
Public Const BTL_ASSEBASE_N As String = "N"
|
||||
|
||||
' info parametri BTL
|
||||
Friend Const BTL_PRT_PDN As String = "PDN"
|
||||
Friend Const BTL_PRT_DO As String = "DO"
|
||||
Friend Const BTL_PRT_NAM As String = "NAM"
|
||||
Friend Const BTL_PRT_L As String = "L"
|
||||
Friend Const BTL_PRT_W As String = "W"
|
||||
Friend Const BTL_PRT_H As String = "H"
|
||||
Friend Const BTL_PRT_CNT As String = "CNT"
|
||||
Friend Const BTL_PRT_ROTATED As String = "ROTATED"
|
||||
Friend Const BTL_PRT_INVERTED As String = "INVERTED"
|
||||
Friend Const BTL_PRT_MATERIAL As String = "MATERIAL"
|
||||
Public Const BTL_PRT_PROJ As String = "PROJ"
|
||||
Public Const BTL_PRT_PDN As String = "PDN"
|
||||
Public Const BTL_PRT_DO As String = "DO"
|
||||
Public Const BTL_PRT_NAM As String = "NAM"
|
||||
Public Const BTL_PRT_L As String = "L"
|
||||
Public Const BTL_PRT_W As String = "W"
|
||||
Public Const BTL_PRT_H As String = "H"
|
||||
Public Const BTL_PRT_CNT As String = "CNT"
|
||||
Public Const BTL_PRT_ADDED As String = "ADDED"
|
||||
Public Const BTL_PRT_DONE As String = "DONE"
|
||||
Public Const BTL_PRT_ROTATED As String = "ROTATED"
|
||||
Public Const BTL_PRT_INVERTED As String = "INVERTED"
|
||||
Public Const BTL_PRT_MATERIAL As String = "MATERIAL"
|
||||
Public Const BTL_PRT_VOLUME As String = "VOLUME"
|
||||
Public Const BTL_PRT_ROT As String = "ROT"
|
||||
Public Const BTL_PRT_FLIP As String = "FLIP"
|
||||
' parametri pezzo
|
||||
Friend Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
|
||||
Friend Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
|
||||
Friend Const BTL_PRT_ORDERNUM = "ORDERNUMBER"
|
||||
Friend Const BTL_PRT_DESIGNATION = "DESIGNATION"
|
||||
Friend Const BTL_PRT_ANNOTATION = "ANNOTATION"
|
||||
Friend Const BTL_PRT_STOREY = "STOREY"
|
||||
Friend Const BTL_PRT_GROUP = "GROUP"
|
||||
Friend Const BTL_PRT_PACKAGE = "PACKAGE"
|
||||
Friend Const BTL_PRT_TIMBERGRADE = "TIMBERGRADE"
|
||||
Friend Const BTL_PRT_QUALITYGRADE = "QUALITYGRADE"
|
||||
Friend Const BTL_PRT_COLOUR = "COLOUR"
|
||||
Friend Const BTL_PRT_PLANINGLENGTH = "PLANINGLENGTH"
|
||||
Friend Const BTL_PRT_STARTOFFSET = "STARTOFFSET"
|
||||
Friend Const BTL_PRT_ENDOFFSET = "ENDOFFSET"
|
||||
Friend Const BTL_PRT_UID = "UID"
|
||||
Friend Const BTL_PRT_TRANSFORMATION = "TRANSFORMATION"
|
||||
Friend Const BTL_PRT_CAMBER = "CAMBER"
|
||||
Friend Const BTL_PRT_PARTOFFSET = "PARTOFFSET"
|
||||
Friend Const BTL_PRT_PROCESSINGQUALITY = "PROCESSINGQUALITY"
|
||||
Friend Const BTL_PRT_RECESS = "RECESS"
|
||||
Friend Const BTL_PRT_STOREYTYPE = "STOREYTYPE"
|
||||
Friend Const BTL_PRT_ELEMENTNUM = "ELEMENTNUMBER"
|
||||
Friend Const BTL_PRT_LAYER = "LAYER"
|
||||
Friend Const BTL_PRT_MODULENUM = "MODULENUMBER"
|
||||
'Friend Const BTL_PRT_USERATTRIBUTE = "USERATTRIBUTE"
|
||||
Friend Const BTL_PRT_COMMENT = "COMMENT"
|
||||
Friend Const BTL_PRT_GRAINDIR = "GRAINDIRECTION"
|
||||
Friend Const BTL_PRT_REFSIDE = "REFERENCESIDE"
|
||||
Friend Const BTL_PRT_ALIGNMENT = "ALIGNMENT"
|
||||
Friend Const BTL_PRT_MATERIALTYPE = "MATERIALTYPE"
|
||||
Public Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
|
||||
Public Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
|
||||
Public Const BTL_PRT_ORDERNUM = "ORDERNUMBER"
|
||||
Public Const BTL_PRT_DESIGNATION = "DESIGNATION"
|
||||
Public Const BTL_PRT_ANNOTATION = "ANNOTATION"
|
||||
Public Const BTL_PRT_STOREY = "STOREY"
|
||||
Public Const BTL_PRT_GROUP = "GROUP"
|
||||
Public Const BTL_PRT_PACKAGE = "PACKAGE"
|
||||
Public Const BTL_PRT_TIMBERGRADE = "TIMBERGRADE"
|
||||
Public Const BTL_PRT_QUALITYGRADE = "QUALITYGRADE"
|
||||
Public Const BTL_PRT_COLOUR = "COLOUR"
|
||||
Public Const BTL_PRT_PLANINGLENGTH = "PLANINGLENGTH"
|
||||
Public Const BTL_PRT_STARTOFFSET = "STARTOFFSET"
|
||||
Public Const BTL_PRT_ENDOFFSET = "ENDOFFSET"
|
||||
Public Const BTL_PRT_UID = "UID"
|
||||
Public Const BTL_PRT_TRANSFORMATION = "TRANSFORMATION"
|
||||
Public Const BTL_PRT_CAMBER = "CAMBER"
|
||||
Public Const BTL_PRT_PARTOFFSET = "PARTOFFSET"
|
||||
Public Const BTL_PRT_PROCESSINGQUALITY = "PROCESSINGQUALITY"
|
||||
Public Const BTL_PRT_RECESS = "RECESS"
|
||||
Public Const BTL_PRT_STOREYTYPE = "STOREYTYPE"
|
||||
Public Const BTL_PRT_ELEMENTNUM = "ELEMENTNUMBER"
|
||||
Public Const BTL_PRT_LAYER = "LAYER"
|
||||
Public Const BTL_PRT_MODULENUM = "MODULENUMBER"
|
||||
Public Const BTL_PRT_COMMENT = "COMMENT"
|
||||
Public Const BTL_PRT_GRAINDIR = "GRAINDIRECTION"
|
||||
Public Const BTL_PRT_REFSIDE = "REFERENCESIDE"
|
||||
Public Const BTL_PRT_ALIGNMENT = "ALIGNMENT"
|
||||
Public Const BTL_PRT_MATERIALTYPE = "MATERIALTYPE"
|
||||
Public Const BTL_PRT_DESCRIPTION = "NAM"
|
||||
|
||||
' parametri generici
|
||||
Friend Const BTL_GEN_PROJNUM = "PROJECTNUMBER"
|
||||
Friend Const BTL_GEN_PROJNAME = "PROJECTNAME"
|
||||
Friend Const BTL_GEN_PROJPART = "PROJECTPART"
|
||||
Friend Const BTL_GEN_PROJGUID = "PROJECTGUID"
|
||||
Friend Const BTL_GEN_LISTNAME = "LISTNAME"
|
||||
Friend Const BTL_GEN_CUSTOMER = "CUSTOMER"
|
||||
Friend Const BTL_GEN_ARCHITECT = "ARCHITECT"
|
||||
Friend Const BTL_GEN_EDITOR = "EDITOR"
|
||||
Friend Const BTL_GEN_DELIVDATE = "DELIVERYDATE"
|
||||
Friend Const BTL_GEN_EXPDATE = "EXPORTDATE"
|
||||
Friend Const BTL_GEN_EXPTIME = "EXPORTTIME"
|
||||
Friend Const BTL_GEN_EXPRELEASE = "EXPORTRELEASE"
|
||||
Friend Const BTL_GEN_LANGUAGE = "LANGUAGE"
|
||||
Friend Const BTL_GEN_RANGE = "RANGE"
|
||||
Friend Const BTL_GEN_COMPUTERNAME = "COMPUTERNAME"
|
||||
Friend Const BTL_GEN_USER = "USER"
|
||||
Friend Const BTL_GEN_SRCFILE = "SOURCEFILE"
|
||||
Friend Const BTL_GEN_EXPFILE = "EXPORTFILE"
|
||||
Friend Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE"
|
||||
Public Const BTL_GEN_BTLPATH = "BTL"
|
||||
Public Const BTL_GEN_PROJNUM = "PROJECTNUMBER"
|
||||
Public Const BTL_GEN_PROJNAME = "PROJECTNAME"
|
||||
Public Const BTL_GEN_PROJPART = "PROJECTPART"
|
||||
Public Const BTL_GEN_PROJGUID = "PROJECTGUID"
|
||||
Public Const BTL_GEN_PROJTYPE = "PROJECTTYPE"
|
||||
Public Const BTL_GEN_LISTNAME = "LISTNAME"
|
||||
Public Const BTL_GEN_CUSTOMER = "CUSTOMER"
|
||||
Public Const BTL_GEN_ARCHITECT = "ARCHITECT"
|
||||
Public Const BTL_GEN_EDITOR = "EDITOR"
|
||||
Public Const BTL_GEN_DELIVDATE = "DELIVERYDATE"
|
||||
Public Const BTL_GEN_EXPDATE = "EXPORTDATE"
|
||||
Public Const BTL_GEN_EXPTIME = "EXPORTTIME"
|
||||
Public Const BTL_GEN_EXPRELEASE = "EXPORTRELEASE"
|
||||
Public Const BTL_GEN_LANGUAGE = "LANGUAGE"
|
||||
Public Const BTL_GEN_RANGE = "RANGE"
|
||||
Public Const BTL_GEN_COMPUTERNAME = "COMPUTERNAME"
|
||||
Public Const BTL_GEN_USER = "USER"
|
||||
Public Const BTL_GEN_SRCFILE = "SOURCEFILE"
|
||||
Public Const BTL_GEN_EXPFILE = "EXPORTFILE"
|
||||
Public Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE"
|
||||
|
||||
Friend Const PROCESSINGS As String = "Processings"
|
||||
Friend Const OUTLINE As String = "Outline"
|
||||
Friend Const BTL_FTR_GRP As String = "GRP"
|
||||
Friend Const BTL_FTR_PRC As String = "PRC"
|
||||
Friend Const BTL_FTR_DO As String = "DO"
|
||||
Friend Const BTL_FTR_SIDE As String = "SIDE"
|
||||
Friend Const BTL_FTR_NAME As String = "NAME"
|
||||
Friend Const BTL_FTR_DES As String = "DES"
|
||||
Friend Const BTL_FTR_PRID As String = "PRID"
|
||||
Friend Const BTL_FTR_FRAME As String = "FRAME"
|
||||
Public Const PROCESSINGS As String = "Processings"
|
||||
Public Const [VARIANT] As String = "Variant"
|
||||
Public Const OUTLINE As String = "Outline"
|
||||
Public Const BTL_FTR_GRP As String = "GRP"
|
||||
Public Const BTL_FTR_PRC As String = "PRC"
|
||||
Public Const BTL_FTR_DO As String = "DO"
|
||||
Public Const BTL_FTR_SIDE As String = "SIDE"
|
||||
Public Const BTL_FTR_PRIORITY As String = "PRIORITY"
|
||||
Public Const BTL_FTR_VARIANT As String = "VARIANT"
|
||||
Public Const BTL_FTR_NAME As String = "NAME"
|
||||
Public Const BTL_FTR_DES As String = "DES"
|
||||
Public Const BTL_FTR_PRID As String = "PRID"
|
||||
Public Const BTL_FTR_FRAME As String = "FRAME"
|
||||
Public Const BTL_FTR_MAINID As String = "MAINID"
|
||||
Public Const BTL_FTR_ADJID As String = "ADJID"
|
||||
Public Const BTL_FTR_AUXID As String = "AUXID"
|
||||
|
||||
' parametri machgroup grezzi
|
||||
Friend Const MGR_RPT_ID As String = "ID"
|
||||
Friend Const MGR_RPT_L As String = "L"
|
||||
Friend Const MGR_RPT_W As String = "W"
|
||||
Friend Const MGR_RPT_H As String = "H"
|
||||
Friend Const MGR_RPT_WASTE As String = "WASTE"
|
||||
Friend Const MGR_RPT_USAGE As String = "USAGE"
|
||||
Friend Const MGR_RPT_STARTCUT As String = "STARTCUT"
|
||||
Friend Const MGR_RPT_MATERIAL As String = "MATERIAL"
|
||||
Public Const MGR_RPT_ID As String = "ID"
|
||||
Public Const MGR_RPT_L As String = "L"
|
||||
Public Const MGR_RPT_W As String = "W"
|
||||
Public Const MGR_RPT_H As String = "H"
|
||||
Public Const MGR_RPT_WASTE As String = "WASTE"
|
||||
Public Const MGR_RPT_USAGE As String = "USAGE"
|
||||
Public Const MGR_RPT_STARTCUT As String = "STARTCUT"
|
||||
Public Const MGR_RPT_MATERIAL As String = "MATERIAL"
|
||||
|
||||
Friend Const MGR_PRT_PDN As String = "PDN"
|
||||
Friend Const MGR_PRT_L As String = "L"
|
||||
Friend Const MGR_PRT_W As String = "W"
|
||||
Friend Const MGR_PRT_H As String = "H"
|
||||
Friend Const MGR_PRT_DES As String = "DES"
|
||||
Friend Const MGR_PRT_STARTCUT As String = "STARTCUT"
|
||||
Friend Const MGR_PRT_MATERIAL As String = "MATERIAL"
|
||||
Public Const MGR_PRT_PDN As String = "PDN"
|
||||
Public Const MGR_PRT_L As String = "L"
|
||||
Public Const MGR_PRT_W As String = "W"
|
||||
Public Const MGR_PRT_H As String = "H"
|
||||
Public Const MGR_PRT_DES As String = "DES"
|
||||
Public Const MGR_PRT_STARTCUT As String = "STARTCUT"
|
||||
Public Const MGR_PRT_MATERIAL As String = "MATERIAL"
|
||||
Public Const MGR_PRT_DO As String = "DO"
|
||||
Public Const MGR_PRT_ROT As String = "ROT"
|
||||
Public Const MGR_PRT_FLIP As String = "FLIP"
|
||||
Public Const MGR_PRT_POSX As String = "POSX"
|
||||
Public Const MGR_PRT_POSY As String = "POSY"
|
||||
|
||||
Friend Const MGR_FTR_GRP As String = "GRP"
|
||||
Friend Const MGR_FTR_PRC As String = "PRC"
|
||||
Friend Const MGR_FTR_DO As String = "DO"
|
||||
Friend Const MGR_FTR_SIDE As String = "SIDE"
|
||||
Friend Const MGR_FTR_NAME As String = "NAME"
|
||||
Friend Const MGR_FTR_DES As String = "DES"
|
||||
Friend Const MGR_FTR_PRID As String = "PRID"
|
||||
Friend Const MGR_FTR_FRAME As String = "FRAME"
|
||||
Public Const MGR_FTR_GRP As String = "GRP"
|
||||
Public Const MGR_FTR_PRC As String = "PRC"
|
||||
Public Const MGR_FTR_DO As String = "DO"
|
||||
Public Const MGR_FTR_SIDE As String = "SIDE"
|
||||
Public Const MGR_FTR_NAME As String = "NAME"
|
||||
Public Const MGR_FTR_DES As String = "DES"
|
||||
Public Const MGR_FTR_PRID As String = "PRID"
|
||||
Public Const MGR_FTR_FRAME As String = "FRAME"
|
||||
|
||||
' parametri creazione barre
|
||||
Friend Const MGR_RPT_BARLEN As String = "BARLEN"
|
||||
Friend Const MGR_RPT_BARHEIGHT As String = "BARHEIGHT"
|
||||
Friend Const MGR_RPT_BARWIDTH As String = "BARWIDTH"
|
||||
Friend Const MGR_RPT_PANELLEN As String = "PANELLEN"
|
||||
Friend Const MGR_RPT_PANELWIDTH As String = "PANELWIDTH"
|
||||
Friend Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT"
|
||||
Friend Const MGR_RPT_PART As String = "PART"
|
||||
Public Const MGR_RPT_BARLEN As String = "BARLEN"
|
||||
Public Const MGR_RPT_BARHEIGHT As String = "BARHEIGHT"
|
||||
Public Const MGR_RPT_BARWIDTH As String = "BARWIDTH"
|
||||
Public Const MGR_RPT_PANELLEN As String = "PANELLEN"
|
||||
Public Const MGR_RPT_PANELWIDTH As String = "PANELWIDTH"
|
||||
Public Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT"
|
||||
Public Const MGR_RPT_PANELPOSZ As String = "PANELPOSZ"
|
||||
Public Const MGR_RPT_PART As String = "PART"
|
||||
|
||||
' parametri P per comunicazione con la macchina
|
||||
Public Const MGR_RPT_PRODID As String = "PRODID"
|
||||
Public Const MGR_RPT_PATTID As String = "PATTID"
|
||||
|
||||
' parametri errori integration
|
||||
Friend Const ITG_CUTID As String = "CUTID"
|
||||
Friend Const ITG_TASKID As String = "TASKID"
|
||||
Friend Const ITG_PROJ_ERR As String = "PROJ_ERR"
|
||||
Friend Const ITG_PROJ_MSG As String = "PROJ_MSG"
|
||||
Friend Const ITG_PROJ_ROT As String = "PROJ_ROT"
|
||||
Friend Const ITG_PROJ_FALL As String = "PROJ_FALL"
|
||||
Friend Const ITG_PROJ_TIME As String = "PROJ_TIME"
|
||||
Public Const ITG_CUTID As String = "CUTID"
|
||||
Public Const ITG_TASKID As String = "TASKID"
|
||||
Public Const ITG_PROJ_ERR As String = "PROJ_ERR"
|
||||
Public Const ITG_PROJ_MSG As String = "PROJ_MSG"
|
||||
Public Const ITG_PROJ_ROT As String = "PROJ_ROT"
|
||||
Public Const ITG_PROJ_FALL As String = "PROJ_FALL"
|
||||
Public Const ITG_PROJ_TIME As String = "PROJ_TIME"
|
||||
|
||||
' parametri errori integration
|
||||
Friend Const ITG_PROD_ERR As String = "PROD_ERR"
|
||||
Friend Const ITG_PROD_MSG As String = "PROD_MSG"
|
||||
Friend Const ITG_PROD_ROT As String = "PROD_ROT"
|
||||
Friend Const ITG_PROD_TIME As String = "PROD_TIME"
|
||||
Public Const ITG_PROD_ERR As String = "PROD_ERR"
|
||||
Public Const ITG_PROD_MSG As String = "PROD_MSG"
|
||||
Public Const ITG_PROD_ROT As String = "PROD_ROT"
|
||||
Public Const ITG_PROD_FALL As String = "PROD_FALL"
|
||||
Public Const ITG_PROD_TIME As String = "PROD_TIME"
|
||||
|
||||
' parametri blocco rot e flip
|
||||
Public Const LOCK_ROT As String = "MANUALROT"
|
||||
Public Const LOCK_FLIP As String = "MANUALFLIP"
|
||||
|
||||
' parametri errori integration
|
||||
Friend Const DUPLO_TODELETE As String = "DUPLO_TODELETE"
|
||||
Public Const DUPLO_TODELETE As String = "DUPLO_TODELETE"
|
||||
|
||||
' parametri warehouse
|
||||
Friend Const WRH_BEAM As String = "BEAM"
|
||||
Friend Const WRH_WALL As String = "WALL"
|
||||
Friend Const WRH_CURRENT As String = "Current"
|
||||
Friend Const WRH_STARTOFFSET As String = "StartOffset"
|
||||
Friend Const WRH_OFFSET As String = "Offset"
|
||||
Friend Const WRH_L As String = "L"
|
||||
Friend Const WRH_KERF As String = "Kerf"
|
||||
Friend Const WRH_S As String = "S"
|
||||
Public Const WRH_BEAM As String = "BEAM"
|
||||
Public Const WRH_WALL As String = "WALL"
|
||||
Public Const WRH_CURRENT As String = "Current"
|
||||
Public Const WRH_STARTOFFSET As String = "StartOffset"
|
||||
Public Const WRH_OFFSET As String = "Offset"
|
||||
Public Const WRH_RANGE As String = "Range"
|
||||
Public Const WRH_QUANTITY As String = "Quantity"
|
||||
Public Const WRH_L As String = "L"
|
||||
Public Const WRH_KERF As String = "Kerf"
|
||||
Public Const WRH_S As String = "S"
|
||||
|
||||
' parametri import/export
|
||||
Public Const EXP_PROJ As String = "EXPORTPROJ"
|
||||
Public Const EXP_PROD As String = "EXPORTPROD"
|
||||
Public Const BTLFILENAME As String = "BTLFILENAME"
|
||||
Public Const EXP_PART As String = "ImportExport"
|
||||
Public Const EXP_MACHINE As String = "Machine"
|
||||
' parametro che indica se il progetto e' stato appena importato e quindi bisogna riverificare i MachGroup
|
||||
Public Const IMP_VERIFYMACHGROUP As String = "VerifyMachGroup"
|
||||
|
||||
' parametri modifica percorsi free contour
|
||||
Public Const PATH_SIDEANGLAYER As String = "SideAngLayer"
|
||||
|
||||
' Strategia
|
||||
Public Const AI_SETUP As String = "AISETUP"
|
||||
Public Const STRATEGY As String = "STRATEGY"
|
||||
End Module
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
Public Module ConstColumns
|
||||
|
||||
Public Const COL_ID As String = "colID"
|
||||
Public Const COL_DO As String = "colDO"
|
||||
Public Const COL_VALUE As String = "colVALUE"
|
||||
Public Const COL_CUSTOM As String = "colCUSTOM"
|
||||
Public Const COL_NAME As String = "colNAME"
|
||||
Public Const COL_CALC As String = "colCALC"
|
||||
Public Const COL_PDN As String = "colPDN"
|
||||
Public Const COL_STARTCUT As String = "colSTARTCUT"
|
||||
Public Const COL_W As String = "colW"
|
||||
Public Const COL_H As String = "colH"
|
||||
Public Const COL_L As String = "colL"
|
||||
Public Const COL_CNT As String = "colCNT"
|
||||
Public Const COL_ADDED As String = "colADDED"
|
||||
Public Const COL_INPROD As String = "colINPROD"
|
||||
Public Const COL_DONE As String = "colDONE"
|
||||
Public Const COL_MATERIAL As String = "colMATERIAL"
|
||||
Public Const COL_UNITVOLUME As String = "colUNITVOLUME"
|
||||
Public Const COL_TOTVOLUME As String = "colTOTVOLUME"
|
||||
Public Const COL_UNITTIME As String = "colUNITTIME"
|
||||
Public Const COL_TOTTIME As String = "colTOTTIME"
|
||||
Public Const COL_USAGE As String = "colUSAGE"
|
||||
Public Const COL_WASTE As String = "colWASTE"
|
||||
Public Const COL_POSZ As String = "colPOSZ"
|
||||
Public Const COL_ROT As String = "colROT"
|
||||
Public Const COL_FLIP As String = "colFLIP"
|
||||
Public Const COL_POSX As String = "colPOSX"
|
||||
Public Const COL_POSY As String = "colPOSY"
|
||||
Public Const COL_OFFSET As String = "colOFFSET"
|
||||
Public Const COL_REDO As String = "colREDO"
|
||||
Public Const COL_TYPE As String = "colTYPE"
|
||||
Public Const COL_DESCRIPTION As String = "colDESCRIPTION"
|
||||
Public Const COL_DESC As String = "colDESC"
|
||||
Public Const COL_SUPERVISORID As String = "colSUPERVISORID"
|
||||
Public Const COL_PRIORITY As String = "colPRIORITY"
|
||||
Public Const COL_QTY As String = "colQTY"
|
||||
Public Const COL_ARCHIVED As String = "colARCHIVED"
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,30 @@
|
||||
Public Module ConstDataGridColumnsIni
|
||||
|
||||
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.json"
|
||||
|
||||
Public Const S_OPENPROJFILEDLG_PROD As String = "DG_OpenProjectFileDialog_PROD"
|
||||
Public Const S_NEWOPENPROJFILEDLG_PROD As String = "DG_NewOpenProjectFileDialog_PROD"
|
||||
Public Const S_RAWPARTLIST_BEAM As String = "DG_RawPartList_BEAM"
|
||||
Public Const S_RAWPARTLIST_WALL As String = "DG_RawPartList_WALL"
|
||||
Public Const S_PARTINRAWPARTLIST_BEAM As String = "DG_PartInRawPartList_BEAM"
|
||||
Public Const S_PARTINRAWPARTLIST_WALL As String = "DG_PartInRawPartList_WALL"
|
||||
Public Const S_PARAMETERLIST_P As String = "DG_ParameterList_P"
|
||||
Public Const S_RAWPARTLIST_SUPERVISOR As String = "DG_RawPartList_SUPERVISOR"
|
||||
Public Const S_PARTINRAWPARTLIST_SUPERVISOR As String = "DG_PartInRawPartList_SUPERVISOR"
|
||||
Public Const S_FEATUREINPARTINRAWPARTLIST_SUPERVISOR As String = "DG_FeatureInPartInRawPartList_SUPERVISOR"
|
||||
Public Const S_PARTLIST As String = "DG_PartList"
|
||||
Public Const S_FEATUREINPARTINRAWPARTLIST As String = "DG_FeatureInPartInRawPartList"
|
||||
Public Const S_STATISTICS As String = "DG_Statistics"
|
||||
Public Const S_STATISTICS_PART As String = "DG_Statistics_PART"
|
||||
Public Const S_OPTIMIZERSTATISTICS As String = "DG_OptimizerStatistics"
|
||||
Public Const S_RAWPARTSTATISTICS As String = "DG_RawPartStatistics"
|
||||
Public Const S_SPARAMLIST_BEAM As String = "DG_SParamList_BEAM"
|
||||
Public Const S_SPARAMLIST_WALL As String = "DG_SParamList_WALL"
|
||||
Public Const S_VARIABLESLIST As String = "DG_VariablesList"
|
||||
Public Const S_MDICOMMANDS As String = "DG_MDICommands"
|
||||
Public Const S_MACHINELOG As String = "DG_MachineLog"
|
||||
Public Const S_UPDATEBTLPARTLIST As String = "DG_UpdateBTLPartList"
|
||||
|
||||
Public Const K_LOCKTABLE As String = "LockTable"
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,10 @@
|
||||
Public Class ConstDims
|
||||
|
||||
Public Const DIMENSIONS_FILE_NAME As String = "Dimensions.ini"
|
||||
|
||||
Public Const LEFTPANEL_VIEW As String = "LeftPanel_View"
|
||||
Public Const LEFTPANEL_SUPERVISOR As String = "LeftPanel_Supervisor"
|
||||
Public Const PROJECT_SUPERVISOR As String = "Project_Supervisor"
|
||||
Public Const PROJECT_AEDIFICA As String = "Project_Aedifica"
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,116 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2015-2017
|
||||
'----------------------------------------------------------------------------
|
||||
' File : ConstGen.vb Data : 10.04.17 Versione : 1.8d1
|
||||
' Contenuto : Modulo costanti generali.
|
||||
'
|
||||
'
|
||||
'
|
||||
' Modifiche : 10.04.17 DS Creazione modulo.
|
||||
'
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Public Module ConstGen
|
||||
|
||||
' File con direttorio radice dei dati
|
||||
Public Const DAT_FILE_NAME As String = "DataRoot.Ini"
|
||||
Public Const S_DATA As String = "Data"
|
||||
Public Const K_DATAROOT As String = "DataRoot"
|
||||
|
||||
' File con dati di licenza
|
||||
Public Const LIC_FILE_NAME As String = "Aedifica.lic"
|
||||
Public Const S_LICENCE As String = "Licence"
|
||||
Public Const K_LOCKID As String = "LockId"
|
||||
Public Const K_KEY As String = "Key"
|
||||
Public Const K_NESTKEY As String = "NestKey"
|
||||
Public Const K_MAXINDEX As String = "MaxIndex"
|
||||
|
||||
' Pagine del programma
|
||||
Public Enum Pages As Integer
|
||||
EMPTY = -1
|
||||
VIEW = 0
|
||||
MACHINING = 1
|
||||
SUPERVISOR = 2
|
||||
CONFIG = 3
|
||||
INPUTS = 4
|
||||
OUTPUTS = 5
|
||||
OPTIMIZERPAGE = 6
|
||||
CONFIGPROGRAM = 7
|
||||
End Enum
|
||||
|
||||
' Abilitazioni licenza
|
||||
Public Enum KEY_OPT As UInteger
|
||||
BEAM = 1
|
||||
WALL = 2
|
||||
NESTING_AUTO = 4
|
||||
SUPERVISOR = 8
|
||||
NETWORK = 16
|
||||
ANY_DB = 32
|
||||
End Enum
|
||||
|
||||
' Selezione Tab Prod / Proj
|
||||
Public Enum ProdProj As Integer
|
||||
NULL = 0
|
||||
PROJ = 1
|
||||
PROD = 2
|
||||
End Enum
|
||||
|
||||
' File di log generale
|
||||
Public Const VWOPTGENLOG_FILE_NAME As String = "Aedifica.OptimizerLog#.txt"
|
||||
Public Const SUPGENLOG_FILE_NAME As String = "Aedifica.SupervisorLog#.txt"
|
||||
|
||||
' Sottodirettorio di configurazione
|
||||
Public Const CONF_DIR As String = "Config"
|
||||
' Sottodirettorio delle risorse
|
||||
Public Const RES_DIR As String = "Resources"
|
||||
' Sottodirettorio temporaneo
|
||||
Public Const TEMP_DIR As String = "Temp"
|
||||
' Sottodirettorio per Cam automatico
|
||||
Public Const PROJS_DIR As String = "Projs"
|
||||
' Sottodirettorio per Csv automatico
|
||||
Public Const PRODS_DIR As String = "Prods"
|
||||
' Sottodirettorio per Macro
|
||||
Public Const MACRODEFAULT_DIR As String = "MacroDefault"
|
||||
' Sottodirettorio per MacroCustom
|
||||
Public Const MACROCUSTOM_DIR As String = "MacroCustom"
|
||||
' Sottodirettorio per Magazzino
|
||||
Public Const WAREHOUSE_DIR As String = "Warehouse"
|
||||
' Sottodirettorio per lavorazioni travi
|
||||
Public Const BEAM_DIR As String = "Beam"
|
||||
' Sottodirettorio per lavorazioni travi nuovo
|
||||
Public Const BEAMNEW_DIR As String = "BeamNew"
|
||||
' Sottodirettorio per lavorazioni pareti
|
||||
Public Const WALL_DIR As String = "Wall"
|
||||
' Sottodirettorio per lavorazioni pareti nuovo
|
||||
Public Const WALLNEW_DIR As String = "WallNew"
|
||||
' Sottodirettorio di default per il salvataggio con nome
|
||||
Public Const SAVE_DFL_NAMEDIR As String = "MyProjects"
|
||||
' Sottodirettorio di default per le macchine
|
||||
Public Const MACHINES_DFL_DIR As String = "Machines"
|
||||
' Sottodirettorio di default per toolmakers
|
||||
Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers"
|
||||
' Sottodirettorio di immagini
|
||||
Public Const IMAGE_DIR As String = "Image"
|
||||
' Nome file Lua con le funzioni di attrezzaggio
|
||||
Public Const SETUP_LUA As String = "SetUp.lua"
|
||||
' Nome eseguibile per stampa
|
||||
Public Const ZEBRAPRINTER_EXE As String = "ZebraPrinterUtilitiesD32.exe"
|
||||
' Sottodirettorio di default per macro
|
||||
Public Const MACRO_DFL_DIR As String = "Macro"
|
||||
' Sottodirettorio per setup strategie
|
||||
Public Const AISETUP_DIR As String = "AISetup"
|
||||
' Sottodirettorio per automatismo strategie
|
||||
Public Const STRATEGIES_DIR As String = "Strategies"
|
||||
' Sottodirettorio per automatismo strategie standard
|
||||
Public Const STANDARD_DIR As String = "Standard"
|
||||
' File contenente lista strategie per feature/topologia
|
||||
Public Const AVAILABLESTRATEGYLIST_FILE As String = "AvailableStrategyList"
|
||||
' File contente tutte le feature
|
||||
Public Const CUSTOMERCONFIG_FILE As String = "CustomerConfig"
|
||||
' File contenente i parametri generali
|
||||
Public Const GENERALPARAMETERS_FILE As String = "GeneralParameters"
|
||||
' Info per temi
|
||||
Public Const THEMES_FOLDER As String = "Themes"
|
||||
Public Const DICTIONARY_FILENAME As String = "Dictionary.xaml"
|
||||
End Module
|
||||
@@ -0,0 +1,141 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2015-2015
|
||||
'----------------------------------------------------------------------------
|
||||
' File : ConstIni.vb Data : 12.02.15 Versione : 1.6b3
|
||||
' Contenuto : Modulo costanti sezione e chiavi per file Ini.
|
||||
'
|
||||
'
|
||||
'
|
||||
' Modifiche : 12.02.15 DS Creazione modulo.
|
||||
'
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Public Module ConstIni
|
||||
|
||||
Public Const INI_FILE_NAME As String = "Aedifica.ini"
|
||||
Public Const CONFIG_FILE_NAME As String = "Config.ini"
|
||||
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_MAXCAMINST As String = "MaxCamInstances"
|
||||
Public Const K_VIEWOPTIM_INSTANCES As String = "ViewOptimInstances"
|
||||
Public Const K_SUPERVISOR_INSTANCES As String = "SupervisorInstances"
|
||||
Public Const K_VIEWOPTIMWINPLACE As String = "ViewOptimWinPlace"
|
||||
Public Const K_SUPERVISORWINPLACE As String = "SupervisorWinPlace"
|
||||
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||
Public Const K_LASTNGEXPDIR As String = "LastNgexpDir"
|
||||
Public Const K_LASTUPDATEDIR As String = "LastUpdateDir"
|
||||
Public Const K_PROJSINDEX As String = "ProjsIndex"
|
||||
Public Const K_PRODSINDEX As String = "ProdsIndex"
|
||||
Public Const K_DBADDRESS As String = "DbAddress"
|
||||
Public Const K_DBMASTERKEY As String = "DbMasterKey"
|
||||
Public Const K_SHAREDFOLDER As String = "SharedFolder"
|
||||
Public Const K_UPDATEBTL As String = "UpdateBtl"
|
||||
Public Const K_DATADIR As String = "DataDir"
|
||||
Public Const K_ENABLEEDIT As String = "EnableEdit"
|
||||
Public Const K_FASTPRODUCE As String = "FastProduce"
|
||||
Public Const K_ADDPROJ As String = "AddProj"
|
||||
Public Const K_PROJECTMODE As String = "ProjectMode"
|
||||
Public Const K_CAMEXEPATH As String = "CAMExePath"
|
||||
Public Const K_PIPELUADIR As String = "PipeLuaDir"
|
||||
|
||||
Public Const K_SHOWBUILDING As String = "ShowBuilding"
|
||||
|
||||
Public Const S_IMPORT As String = "Import"
|
||||
Public Const K_BTLFLAG As String = "BtlFlag"
|
||||
Public Const K_WALLBTLFLAG As String = "WallBtlFlag"
|
||||
Public Const K_BTLAUXDIR As String = "BtlAuxDir"
|
||||
Public Const K_WALLOPPOSITESIDENESTING As String = "WallOppositeSideNesting"
|
||||
|
||||
Public Const K_SUPERVISORMACH As String = "SupervisorMach"
|
||||
Public Const K_PASSWORD As String = "Password"
|
||||
Public Const K_CHANGEMACH As String = "ChangeMach"
|
||||
Public Const K_EXPORTBWE As String = "ExpBwe"
|
||||
|
||||
Public Const S_BEAM As String = "Beam"
|
||||
Public Const S_BEAMNEW As String = "BeamNew"
|
||||
Public Const K_CALCPATH As String = "CalcPath"
|
||||
Public Const K_BEAMBASEDIR As String = "BaseDir"
|
||||
Public Const K_BEAMBWEEXEC As String = "BweExec"
|
||||
Public Const K_FLIPROTEXEC As String = "FlipRotExec"
|
||||
|
||||
Public Const S_WALL As String = "Wall"
|
||||
Public Const S_WALLNEW As String = "WallNew"
|
||||
Public Const K_WALLBASEDIR As String = "BaseDir"
|
||||
Public Const K_WALLBWEEXEC As String = "BweExec"
|
||||
|
||||
Public Const S_EXECGROUP As String = "ExecGroup"
|
||||
Public Const K_ENVIRONMENT As String = "Environment"
|
||||
Public Const K_PIPELUAFILE As String = "PipeLuaFile"
|
||||
Public Const K_MAXCAMINSTANCES As String = "MaxCAMInstances"
|
||||
|
||||
Public Const S_MACHINELOGFILTER As String = "MachineLogFilters"
|
||||
Public Const K_PARTEVENTTYPE As String = "PartEventType"
|
||||
Public Const K_ENTITYTYPE As String = "EntityType"
|
||||
Public Const K_DAYTYPE As String = "DayType"
|
||||
Public Const K_STARTDATE As String = "StartDate"
|
||||
Public Const K_ENDDATE As String = "EndDate"
|
||||
|
||||
Public Const S_OPENFILEDIALOG As String = "OpenFileDialog"
|
||||
Public Const K_VIEWARCHIVED As String = "ViewArchived"
|
||||
|
||||
Public Const K_NESTEXEC As String = "NestExec"
|
||||
Public Const K_FLIPROT As String = "FlipRot"
|
||||
Public Const K_SECTIONTIME As String = "SectionTime"
|
||||
Public Const K_PARTTIME As String = "PartTime"
|
||||
Public Const K_RAWPARTDEF As String = "RawPartDefinition"
|
||||
Public Const K_MANUALNEST As String = "ManualNest"
|
||||
Public Const K_LDINTERSOTHER As String = "LDIntersOther"
|
||||
Public Const K_MINSCORE As String = "MinScore"
|
||||
|
||||
Public Const S_BEAMWALL As String = "BeamWall"
|
||||
Public Const K_BEAMWALLENABLE As String = "BtlEnable"
|
||||
Public Const K_BEAMWALLBASEDIR As String = "BaseDir"
|
||||
Public Const K_BEAMWALLBUTTON As String = "Button"
|
||||
|
||||
Public Const S_MRUPROJFILES As String = "MruProjFiles"
|
||||
Public Const S_MRUPRODFILES As String = "MruProdFiles"
|
||||
Public Const S_MRUSUPERVISORPRODFILES As String = "MruSupervisorProdFiles"
|
||||
|
||||
Public Const S_PRINTER As String = "Printer"
|
||||
Public Const K_LINK As String = "Link"
|
||||
Public Const K_ENABLE As String = "Enable"
|
||||
Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities"
|
||||
Public Const K_TEMPLATE As String = "Template"
|
||||
|
||||
Public Const S_BEAM_LIST As String = "Beam_List"
|
||||
Public Const S_WALL_LIST As String = "Wall_List"
|
||||
|
||||
Public Const S_WAREHOUSE As String = "Warehouse"
|
||||
Public Const K_TYPE As String = "Type"
|
||||
Public Const K_DEFAULTQUANTITY As String = "DefaultQuantity"
|
||||
Public Const K_DEFAULTLENGTH As String = "DefaultLength"
|
||||
|
||||
Public Const S_SECTION As String = "Section_Checked"
|
||||
Public Const S_IMAGE As String = "Image_Checked"
|
||||
|
||||
Public Const S_PDFEDITOR As String = "PDFEditor"
|
||||
|
||||
Public Const S_BACKUPANDRESTORE As String = "Backup&Restore"
|
||||
Public Const K_EXTERNALBACKUPACTIVE As String = "ExternalBackupActive"
|
||||
Public Const K_EXTERNALFILEPATH As String = "ExternalFilePath"
|
||||
Public Const K_REMINDERFREQUENCY As String = "ReminderFrequency"
|
||||
|
||||
Public Const K_MODIFYSETUP As String = "ModifySetup"
|
||||
Public Const K_MACHCONFIG As String = "MachConfig"
|
||||
|
||||
Public Const S_SPECIAL As String = "Special"
|
||||
Public Const K_SPECIALENABLE As String = "SpecialEnable"
|
||||
|
||||
' Server Address
|
||||
Public Const K_SERVERADDRESS As String = "ServerAddressRelease"
|
||||
Public Const K_BEAMWALL As String = "EgtBeamWall"
|
||||
|
||||
Public Const S_STRATEGY As String = "Strategy"
|
||||
Public Const K_PARAMPASSWORD As String = "ParamPassword"
|
||||
Public Const K_DEFAULTCONFIG As String = "DefaultConfiguration"
|
||||
|
||||
Public Const K_VERIFYIMPORTBTL As String = "VerifyImportBTL"
|
||||
|
||||
Public Const K_THEMA As String = "Thema"
|
||||
End Module
|
||||
@@ -0,0 +1,60 @@
|
||||
Public Module ConstMachComm
|
||||
|
||||
Public Enum ResultTypes As Integer
|
||||
NULL = 0
|
||||
EXECUTED = 1
|
||||
RESULT = 2
|
||||
End Enum
|
||||
|
||||
Public Enum CommandTypes As Integer
|
||||
ERROR_ = 1
|
||||
CONNECT = 2
|
||||
DISCONNECT = 3
|
||||
START = 4
|
||||
SOFTSTART = 5
|
||||
STOP_ = 6
|
||||
RESET = 7
|
||||
STEP_ = 8
|
||||
SETPOINT = 9
|
||||
SENDPROG = 10
|
||||
REMOVEPROG = 11
|
||||
REMOVEALLPROG = 12
|
||||
READ_TPA = 13
|
||||
WRITE = 14
|
||||
DELETEALARMS = 15
|
||||
SETOPMODE = 16
|
||||
READ_NUMFLEXIUM = 17
|
||||
STOPREAD_NUMFLEXIUM = 18
|
||||
MDI = 19
|
||||
SETCHANNEL = 20
|
||||
End Enum
|
||||
|
||||
Public Enum LogCommandTypes As Integer
|
||||
NULL = 0
|
||||
ERROR_ = 1
|
||||
CONNECT = 2
|
||||
DISCONNECT = 3
|
||||
START = 4
|
||||
SOFTSTART = 5
|
||||
STOP_ = 6
|
||||
RESET = 7
|
||||
STEP_ = 8
|
||||
SETPOINT = 9
|
||||
SENDPROG = 10
|
||||
REMOVEPROG = 11
|
||||
REMOVEALLPROG = 12
|
||||
READ = 13
|
||||
WRITE = 14
|
||||
DELETEALARMS = 15
|
||||
SETOP = 16
|
||||
ALARM = 17
|
||||
NEWOP = 18
|
||||
End Enum
|
||||
|
||||
Public Enum CommandStates As Integer
|
||||
NULL = 0
|
||||
ERROR_ = 1
|
||||
OK = 2
|
||||
End Enum
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,32 @@
|
||||
Public Module ConstMachIni
|
||||
|
||||
Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
|
||||
Public Const GETBEAMDATA_FILE_NAME As String = "GetBeamData.lua"
|
||||
Public Const GETWALLDATA_FILE_NAME As String = "GetWallData.lua"
|
||||
Public Const GETTS3DATA_FILE_NAME As String = "GetTs3Data.lua"
|
||||
|
||||
Public Const K_NCTYPE As String = "NCType"
|
||||
Public Const K_CONNECTIONSTRING As String = "ConnectionString"
|
||||
Public Const K_SUPERVISOR As String = "Supervisor"
|
||||
Public Const K_SAVECNCPATH As String = "SaveCncPath"
|
||||
Public Const K_SAVEEXT As String = "SaveExt"
|
||||
|
||||
Public Const S_CHANNELS As String = "Channels"
|
||||
|
||||
' Variables della macchina corrente
|
||||
Public Const S_MAINVARIABLES As String = "MainVariables"
|
||||
Public Const S_VARIABLES As String = "Variables"
|
||||
Public Const S_INPUTVARIABLES As String = "InputVariables"
|
||||
Public Const S_OUTPUTVARIABLES As String = "OutputVariables"
|
||||
Public Const S_MDI As String = "MDI"
|
||||
|
||||
Public Const K_BEAM As String = "Beam"
|
||||
Public Const K_WALL As String = "Wall"
|
||||
Public Const K_SCRIPT As String = "Scripts"
|
||||
Public Const K_SETUP As String = "Setup"
|
||||
Public Const K_FLOW As String = "Flow"
|
||||
|
||||
Public Const TS3DATA_FILE As String = "Ts3Data.lua"
|
||||
Public Const EBWDATA_FILE As String = "EbwData.lua"
|
||||
|
||||
End Module
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Module ConstMsg
|
||||
Public Module ConstMsg
|
||||
|
||||
Public Const MSG_SETUPERRORS As Integer = 5000 + 1470
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class PartAddedEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Public m_NewPart As PartM
|
||||
Public Property NewPart As PartM
|
||||
Get
|
||||
Return m_NewPart
|
||||
End Get
|
||||
Private Set(value As PartM)
|
||||
m_NewPart = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(NewBTLFeature As PartM)
|
||||
Me.NewPart = NewBTLFeature
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -10,8 +10,9 @@
|
||||
<AssemblyName>EgtBEAMWALL.Core</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -21,6 +22,7 @@
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>EgtBEAMWALL.Core.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -30,6 +32,7 @@
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>EgtBEAMWALL.Core.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
@@ -45,15 +48,60 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtUILib">
|
||||
<HintPath>..\dll\EgtUILib.dll</HintPath>
|
||||
<HintPath>..\ExtLibs\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<HintPath>..\dll\EgtWPFLib5.dll</HintPath>
|
||||
<HintPath>..\ExtLibs\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgwProxy.LiMan, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EgwProxy.LiMan.1.0.2408.718\lib\EgwProxy.LiMan.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgwWPFBaseLib, Version=3.1.1.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EgwWPFBaseLib.3.1.1.2\lib\EgwWPFBaseLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="RestSharp, Version=111.2.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.111.2.0\lib\net471\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=8.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.8.0.3\lib\net462\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -71,21 +119,88 @@
|
||||
<Import Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Beam.vb" />
|
||||
<Compile Include="BeamMachGroup.vb" />
|
||||
<Compile Include="Model\BTLParamAddedEventArgs.vb" />
|
||||
<Compile Include="Model\BTLFeatureM.vb" />
|
||||
<Compile Include="Model\BTLParamM.vb" />
|
||||
<Compile Include="Model\BTLFeatureAddedEventArgs.vb" />
|
||||
<Compile Include="Model\BTLPartAddedEventArgs.vb" />
|
||||
<Compile Include="Model\BTLPartM.vb" />
|
||||
<Compile Include="Model\BTLStructureM.vb" />
|
||||
<Compile Include="BTLViewModel\BTLFeatureVM.vb" />
|
||||
<Compile Include="CALCPanel\CalcEditEndEventArgs.vb" />
|
||||
<Compile Include="ConfigurationPage\Machine_ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>Machine_ConfigurationPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ConfigurationPage\General_ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>General_ConfigurationPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Constants\ConstColumns.vb" />
|
||||
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
|
||||
<Compile Include="Constants\ConstDims.vb" />
|
||||
<Compile Include="Constants\ConstGen.vb" />
|
||||
<Compile Include="Constants\ConstIni.vb" />
|
||||
<Compile Include="Constants\ConstMachComm.vb" />
|
||||
<Compile Include="Constants\ConstMachIni.vb" />
|
||||
<Compile Include="Constants\ConstMsg.vb" />
|
||||
<Compile Include="EgtColorPicker\EgtColorPickerV.xaml.vb">
|
||||
<DependentUpon>EgtColorPickerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtDataGrid\EgtDataGrid.xaml.vb">
|
||||
<DependentUpon>EgtDataGrid.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtDataGrid\DataGridColumnsIniFile.vb" />
|
||||
<Compile Include="CALCPanel\CalcProcessEndEventArgs.vb" />
|
||||
<Compile Include="CALCPanel\CalcResultEventArgs.vb" />
|
||||
<Compile Include="CALCPanel\CalcEndEventArgs.vb" />
|
||||
<Compile Include="CALCPanel\CalcIntegration.vb" />
|
||||
<Compile Include="DataAccess\PartAddedEventArgs.vb" />
|
||||
<Compile Include="DataAccess\BTLParamAddedEventArgs.vb" />
|
||||
<Compile Include="EgtManageFileDialog\EgtManageFileDialogV.xaml.vb">
|
||||
<DependentUpon>EgtManageFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
|
||||
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Lib\MachGroupAddedEventArgs.vb" />
|
||||
<Compile Include="Lib\MachGroupVM.vb" />
|
||||
<Compile Include="Lib\NewMachGroupPanelVM.vb" />
|
||||
<Compile Include="BTLModel\BTLFeatureM.vb" />
|
||||
<Compile Include="BTLModel\BTLParamM.vb" />
|
||||
<Compile Include="DataAccess\BTLFeatureAddedEventArgs.vb" />
|
||||
<Compile Include="DataAccess\BTLPartAddedEventArgs.vb" />
|
||||
<Compile Include="BTLModel\BTLPartM.vb" />
|
||||
<Compile Include="BTLModel\BTLStructureM.vb" />
|
||||
<Compile Include="Constants\ConstBeam.vb" />
|
||||
<Compile Include="Enum.vb" />
|
||||
<Compile Include="LoadingWnd\LoadingWndHelper.vb" />
|
||||
<Compile Include="LoadingWnd\LoadingWndVM.vb" />
|
||||
<Compile Include="LoadingWnd\LoadingWndV.xaml.vb">
|
||||
<DependentUpon>LoadingWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
||||
<DependentUpon>MachinePanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachiningDbWindow\MachiningDbWindowV.xaml.vb">
|
||||
<DependentUpon>MachiningDbWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogVM.vb" />
|
||||
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogV.xaml.vb">
|
||||
<DependentUpon>NewOpenProjectFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml.vb">
|
||||
<DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptmizerWindow\OptimizerWindow.vb" />
|
||||
<Compile Include="TitleBar\TitleBarV.xaml.vb">
|
||||
<DependentUpon>TitleBarV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Configuration.vb" />
|
||||
<Compile Include="ProjectFileVM\ProdItem.vb" />
|
||||
<Compile Include="Utility\DimensionsIniFile.vb" />
|
||||
<Compile Include="Utility\Enum.vb" />
|
||||
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||
<Compile Include="MachGroupPanel\MyMachGroupVM.vb" />
|
||||
<Compile Include="MachGroupPanel\PartVM.vb" />
|
||||
<Compile Include="Utility\GridDimension.vb" />
|
||||
<Compile Include="Utility\LuaMsgManager.vb" />
|
||||
<Compile Include="Utility\MachLog.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -97,17 +212,28 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="MyMachGroup.vb" />
|
||||
<Compile Include="Part.vb" />
|
||||
<Compile Include="ProdFileM.vb" />
|
||||
<Compile Include="ProjectFileM.vb" />
|
||||
<Compile Include="ProjFileM.vb" />
|
||||
<Compile Include="SectionXMaterial.vb" />
|
||||
<Compile Include="MachGroupModel\MyMachGroupM.vb" />
|
||||
<Compile Include="Lib\MachGroupM.vb" />
|
||||
<Compile Include="Lib\MachGroupPanelM.vb" />
|
||||
<Compile Include="MachGroupModel\MyMachGroupPanelM.vb" />
|
||||
<Compile Include="Utility\ManageWindow.vb" />
|
||||
<Compile Include="Utility\MyMachine.vb" />
|
||||
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogVM.vb" />
|
||||
<Compile Include="MachGroupModel\PartM.vb" />
|
||||
<Compile Include="ProjectFileVM\ProdFileM.vb" />
|
||||
<Compile Include="ProjectFileVM\ProjectFileM.vb" />
|
||||
<Compile Include="ProjectManager\ProdFileVM.vb" />
|
||||
<Compile Include="ProjectManager\ProjectFileVM.vb" />
|
||||
<Compile Include="ProjectManager\ProjFileVM.vb" />
|
||||
<Compile Include="ProjectFileVM\ProjFileM.vb" />
|
||||
<Compile Include="Utility\SectionXMaterial.vb" />
|
||||
<Compile Include="Utility\BTLIniFile.vb" />
|
||||
<Compile Include="Utility\Command.vb" />
|
||||
<Compile Include="Utility\VMBase.vb" />
|
||||
<Compile Include="Wall.vb" />
|
||||
<Compile Include="WallMachGroup.vb" />
|
||||
<Compile Include="Utility\CoreMap.vb" />
|
||||
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
||||
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
|
||||
<DependentUpon>ViewPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewPanel\ViewPanelVM.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
@@ -118,6 +244,7 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
@@ -127,9 +254,78 @@
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="ConfigurationPage\Machine_ConfigurationPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ConfigurationPage\General_ConfigurationPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="EgtColorPicker\EgtColorPickerV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtDataGrid\EgtDataGrid.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="EgtManageFileDialog\EgtManageFileDialogV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="LoadingWnd\LoadingWndV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MachinePanel\MachinePanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MachiningDbWindow\MachiningDbWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Themes\Generic.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="TitleBar\TitleBarV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ViewPanel\ViewPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgalwareLogo.ico" />
|
||||
<Content Include="Resources\PartManager\Locked.old.png" />
|
||||
<Content Include="Resources\PartManager\Unlocked.old.png" />
|
||||
<Content Include="Resources\ProjectManager\Save.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{94E38DFF-614B-4CBD-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\ViewerOptimizer\EgtBEAMWALL.Core.dll</PostBuildEvent>
|
||||
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\Aedifica\EgtBEAMWALL.Core.dll</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,218 @@
|
||||
<EgtBEAMWALLCORE:OptimizerWindow x:Class="EgtColorPickerV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight"
|
||||
ShowInTaskbar="False"
|
||||
Width="750" Height="450"
|
||||
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
|
||||
|
||||
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl>
|
||||
<TabItem Header="{Binding BasicColor_Msg}">
|
||||
<Grid Style="{StaticResource EgtColorPicker_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColors}"
|
||||
SelectedItem="{Binding SelColor}"
|
||||
Style="{StaticResource EgtColorPicker_ListBox}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Fill="{Binding Fill}"
|
||||
Style="{StaticResource EgtColorPicker_Rectangle}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPicker_Msg}">
|
||||
<TabItem.Resources>
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="BorderThickness" Value="1.5"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_White}"/>
|
||||
</Style>
|
||||
</TabItem.Resources>
|
||||
<EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
|
||||
SelectedItem="{Binding sHexSelColor}"
|
||||
Style="{StaticResource EgtHexList}">
|
||||
<EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<DataTemplate/>
|
||||
</EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
|
||||
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
</Style>
|
||||
</EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||
</EgtWPFLib5:EgtHexList>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPickerTheme_Msg}">
|
||||
<Grid Style="{StaticResource EgtColorPicker_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColorsTheme}"
|
||||
SelectedItem="{Binding SelColorTheme}"
|
||||
Style="{StaticResource BasicColor_ListBox}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Fill="{Binding Fill}"
|
||||
Style="{StaticResource EgtColorPicker_Rectangle}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1"
|
||||
Style="{StaticResource CustomerColor_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding CustomColor_Msg}"
|
||||
Style="{StaticResource EgtColorPicker_TextBlock}"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding CustomColors}"
|
||||
SelectedItem="{Binding SelCustomColor}"
|
||||
Style="{StaticResource CustomerColor_ListBox}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Fill="{Binding Fill}"
|
||||
Style="{StaticResource EgtColorPicker_Rectangle}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Style="{StaticResource CurrColor_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Style="{StaticResource AddColor_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Fill="{Binding CurrColor}"
|
||||
Style="{StaticResource CurrColor_Rectangle}"/>
|
||||
<Button Grid.Row="1"
|
||||
x:Name="SaveColor"
|
||||
Content="{Binding AddCColor_Msg}"
|
||||
Command="{Binding SaveColor_Command}"
|
||||
Style="{StaticResource EgtColorPicker_TextButton}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Red_Msg}"
|
||||
Style="{StaticResource RedColor_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource RedColor_TextBox}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding Green_Msg}"
|
||||
Style="{StaticResource GreenColor_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource GreenColor_TextBox}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding Blu_Msg}"
|
||||
Style="{StaticResource GreenColor_TextBlock}"/>
|
||||
<TextBox Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource GreenColor_TextBox}"/>
|
||||
<TextBlock Grid.Row="3"
|
||||
Text="{Binding Hexadecimal_Msg}"
|
||||
Style="{StaticResource GreenColor_TextBlock}"/>
|
||||
<TextBox Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Text="{Binding Hexadecimal}"
|
||||
Style="{StaticResource GreenColor_TextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="2"
|
||||
Rows="1"
|
||||
Style="{StaticResource EgtColorPicker_UniformGrid}">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtBEAMWALLCORE:OptimizerWindow>
|
||||
@@ -0,0 +1,67 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class EgtColorPickerV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
|
||||
|
||||
Private Shadows DialogResult As Boolean
|
||||
|
||||
Public Property CustomColors As Integer()
|
||||
Get
|
||||
Return m_EgtColorPickerVM.GetCustomColors()
|
||||
End Get
|
||||
Set(value As Integer())
|
||||
m_EgtColorPickerVM.SetCustomColors(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Color As System.Drawing.Color
|
||||
Get
|
||||
Return System.Drawing.Color.FromArgb(255, m_EgtColorPickerVM.Red, m_EgtColorPickerVM.Green, m_EgtColorPickerVM.Blue)
|
||||
End Get
|
||||
Set(value As System.Drawing.Color)
|
||||
m_EgtColorPickerVM.Red = value.R
|
||||
m_EgtColorPickerVM.Green = value.G
|
||||
m_EgtColorPickerVM.Blue = value.B
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EtgColorPickerVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtColorPickerVM = EtgColorPickerVM
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructors
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As Boolean) Handles m_EgtColorPickerVM.OnCloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Apre una finestra EgtColorPicker
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Overloads Function ShowDialog() As Boolean
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,82 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Forms
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Module DataGridColumnsIniFile
|
||||
|
||||
Public m_sDataGridColumnsIniFile As String
|
||||
|
||||
' funzione per ottenere dal file INI le colonne da caricare nelle EgtDataGrid del programma
|
||||
Public Function GetPrivateProfileColumns(ParentDGName As String, ByRef ocColumns As ObservableCollection(Of EgtDataGridColumn)) As Boolean
|
||||
Dim colIndex As Integer = 0
|
||||
Dim str = String.Empty
|
||||
While EgtUILib.GetPrivateProfileString(ParentDGName, colIndex, String.Empty, str, m_sDataGridColumnsIniFile) > 0
|
||||
Dim sColumnParams() As String = str.Split(","c)
|
||||
' verifico numero minimo di parametri
|
||||
If sColumnParams.Count >= 9 Then
|
||||
' cancello spazi
|
||||
For index = 0 To sColumnParams.Count - 1
|
||||
sColumnParams(index) = sColumnParams(index).Trim()
|
||||
Next
|
||||
' creo colonna
|
||||
Dim sName = sColumnParams(0)
|
||||
Dim bReorder As Boolean = sColumnParams(1).Equals("1")
|
||||
Dim bResize As Boolean = sColumnParams(2).Equals("1")
|
||||
Dim bSort As Boolean = sColumnParams(3).Equals("1")
|
||||
Dim bIsReadOnly As Boolean = sColumnParams(4).Equals("1")
|
||||
Dim Width As Double
|
||||
Dim WidthType As DataGridLengthUnitType
|
||||
StringToDoubleAdv(sColumnParams(5), Width)
|
||||
Integer.TryParse(sColumnParams(6), WidthType)
|
||||
Dim bVisible As Boolean = sColumnParams(7).Equals("1")
|
||||
Dim bCanUserEditVisible As Boolean = sColumnParams(8).Equals("1")
|
||||
Dim nSortDirection As SortOrder = If(sColumnParams.Count >= 10, CInt(sColumnParams(9)), 0)
|
||||
ocColumns.Add(New EgtDataGridColumn(ParentDGName, sName, bReorder, bResize, bSort, bIsReadOnly, New DataGridLength(Width, WidthType), bVisible, bCanUserEditVisible, nSortDirection))
|
||||
End If
|
||||
colIndex += 1
|
||||
End While
|
||||
Return ocColumns.Count > 0
|
||||
End Function
|
||||
|
||||
Public Function WriteColumnPrivateProfileParam(ParentDataGridName As String, DisplayIndex As String, sColumnParams As String) As Boolean
|
||||
Return WritePrivateProfileString(ParentDataGridName, DisplayIndex, sColumnParams, m_sDataGridColumnsIniFile)
|
||||
End Function
|
||||
|
||||
' funzione per ottenere dal file INI le colonne da caricare nelle EgtDataGrid del programma
|
||||
Public Function GetPrivateProfileColumn(ParentDGName As String, ByRef Column As EgtDataGridColumn) As Boolean
|
||||
Dim colIndex As Integer = 0
|
||||
Dim str = String.Empty
|
||||
While EgtUILib.GetPrivateProfileString(ParentDGName, colIndex, String.Empty, str, m_sDataGridColumnsIniFile) > 0
|
||||
Dim sColumnParams() As String = str.Split(","c)
|
||||
' verifico numero minimo di parametri
|
||||
If sColumnParams.Count >= 9 Then
|
||||
If Column.Name = sColumnParams(0) Then
|
||||
' cancello spazi
|
||||
For index = 0 To sColumnParams.Count - 1
|
||||
sColumnParams(index) = sColumnParams(index).Trim()
|
||||
Next
|
||||
' creo colonna
|
||||
Dim sName = sColumnParams(0)
|
||||
Dim bReorder As Boolean = sColumnParams(1).Equals("1")
|
||||
Dim bResize As Boolean = sColumnParams(2).Equals("1")
|
||||
Dim bSort As Boolean = sColumnParams(3).Equals("1")
|
||||
Dim bIsReadOnly As Boolean = sColumnParams(4).Equals("1")
|
||||
Dim Width As Double
|
||||
Dim WidthType As DataGridLengthUnitType
|
||||
StringToDoubleAdv(sColumnParams(5), Width)
|
||||
Integer.TryParse(sColumnParams(6), WidthType)
|
||||
Dim bVisible As Boolean = sColumnParams(7).Equals("1")
|
||||
Dim bCanUserEditVisible As Boolean = sColumnParams(8).Equals("1")
|
||||
Dim nSortDirection As SortOrder = If(sColumnParams.Count >= 10, CInt(sColumnParams(9)), 0)
|
||||
Column = New EgtDataGridColumn(ParentDGName, sName, bReorder, bResize, bSort, bIsReadOnly, New DataGridLength(Width, WidthType), bVisible, bCanUserEditVisible, nSortDirection)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
colIndex += 1
|
||||
End While
|
||||
Return Not IsNothing(Column)
|
||||
End Function
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,6 @@
|
||||
<DataGrid x:Class="EgtDataGrid"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
</DataGrid>
|
||||
|
||||
|
||||
@@ -0,0 +1,717 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Controls.Primitives
|
||||
Imports System.Windows.Data
|
||||
Imports System.Windows.Media
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtDataGrid
|
||||
|
||||
Public Event ResetSort()
|
||||
|
||||
' vecchio indice da salvare per il Reorder delle colonne
|
||||
Public OldIndex As Integer = 0
|
||||
' indice header su cui è aperto il ContextMenu per gestione check/uncheck LockTable
|
||||
Private HeaderDispIndex As Integer = 0
|
||||
' somma delle larghezze delle colonne di EgtDataGrid
|
||||
Private columnsWidth As Double = 0
|
||||
|
||||
' larghezza minima dell'ultima colonna per attivare/disattivare ScrollBar orizzontale
|
||||
Private Const LASTCOLUMN_MINWIDTH As Double = 40
|
||||
|
||||
Sub New()
|
||||
InitializeComponent()
|
||||
AddHandler Columns.CollectionChanged, AddressOf Columns_CollectionChanged
|
||||
End Sub
|
||||
|
||||
Public Shadows Property BindingColumns As ObservableCollection(Of EgtDataGridColumn)
|
||||
Get
|
||||
Return CType(MyBase.GetValue(BindingColumnsProperty), ObservableCollection(Of EgtDataGridColumn))
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
||||
MyBase.SetValue(BindingColumnsProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly BindingColumnsProperty As DependencyProperty = DependencyProperty.Register("BindingColumns", GetType(ObservableCollection(Of EgtDataGridColumn)), GetType(EgtDataGrid), New FrameworkPropertyMetadata(New ObservableCollection(Of EgtDataGridColumn), New PropertyChangedCallback(AddressOf OnDataGridColumnsPropertyChanged)) With {.BindsTwoWayByDefault = True})
|
||||
|
||||
Private Shared Sub OnDataGridColumnsPropertyChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
|
||||
Dim context = TryCast(source, EgtDataGrid)
|
||||
Dim oldItems = TryCast(e.OldValue, ObservableCollection(Of EgtDataGridColumn))
|
||||
|
||||
If oldItems IsNot Nothing Then
|
||||
|
||||
For index = 0 To oldItems.Count - 1
|
||||
Dim Column As DataGridColumn = context.FindResource(oldItems(index))
|
||||
context.Columns.Remove(Column)
|
||||
Next
|
||||
|
||||
RemoveHandler oldItems.CollectionChanged, AddressOf context.collectionChanged
|
||||
End If
|
||||
|
||||
Dim newItems = TryCast(e.NewValue, ObservableCollection(Of EgtDataGridColumn))
|
||||
|
||||
If newItems IsNot Nothing Then
|
||||
|
||||
For index = 0 To newItems.Count - 1
|
||||
Try
|
||||
Dim col As DataGridColumn = context.FindResource(newItems(index).Name)
|
||||
newItems(index).InitColumn(col)
|
||||
context.Columns.Add(col)
|
||||
Catch ex As Exception
|
||||
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), newItems(index).Name, newItems(index).ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
End Try
|
||||
Next
|
||||
|
||||
AddHandler newItems.CollectionChanged, AddressOf context.collectionChanged
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Columns_CollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||
If e.Action = NotifyCollectionChangedAction.Add Then
|
||||
For Each newColumn As DataGridColumn In e.NewItems
|
||||
Dispatcher.BeginInvoke(New Action(Sub()
|
||||
HookHeaderForColumn(newColumn)
|
||||
End Sub), DispatcherPriority.Loaded)
|
||||
Next
|
||||
ElseIf e.Action = NotifyCollectionChangedAction.Remove Then
|
||||
For Each removedColumn As DataGridColumn In e.OldItems
|
||||
Dispatcher.BeginInvoke(New Action(Sub()
|
||||
UnhookHeaderForColumn(removedColumn)
|
||||
End Sub), DispatcherPriority.Loaded)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HookHeaderForColumn(ByVal column As DataGridColumn)
|
||||
Dim headersPresenter = FindVisualChild(Of DataGridColumnHeadersPresenter)(Me)
|
||||
If headersPresenter Is Nothing Then Return
|
||||
|
||||
For Each header In FindVisualChildren(Of DataGridColumnHeader)(headersPresenter)
|
||||
|
||||
If header.Column Is column Then
|
||||
AddHandler header.SizeChanged, AddressOf ColumnHeader_SizeChanged
|
||||
AddHandler header.MouseRightButtonDown, AddressOf ColumnHeader_MouseRightButtonDown
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub UnhookHeaderForColumn(ByVal column As DataGridColumn)
|
||||
Dim headersPresenter = FindVisualChild(Of DataGridColumnHeadersPresenter)(Me)
|
||||
If headersPresenter Is Nothing Then Return
|
||||
|
||||
For Each header In FindVisualChildren(Of DataGridColumnHeader)(headersPresenter)
|
||||
|
||||
If header.Column Is column Then
|
||||
RemoveHandler header.SizeChanged, AddressOf ColumnHeader_SizeChanged
|
||||
RemoveHandler header.MouseRightButtonDown, AddressOf ColumnHeader_MouseRightButtonDown
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Function FindVisualChild(Of T As DependencyObject)(ByVal parent As DependencyObject) As T
|
||||
Dim tChild As T = Nothing
|
||||
|
||||
For i As Integer = 0 To VisualTreeHelper.GetChildrenCount(parent) - 1
|
||||
Dim child = VisualTreeHelper.GetChild(parent, i)
|
||||
tChild = TryCast(child, T)
|
||||
If tChild IsNot Nothing Then Return tChild
|
||||
Dim result = FindVisualChild(Of T)(child)
|
||||
If result IsNot Nothing Then Return result
|
||||
Next
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Private Iterator Function FindVisualChildren(Of T As DependencyObject)(ByVal parent As DependencyObject) As IEnumerable(Of T)
|
||||
Dim tChild As T = Nothing
|
||||
|
||||
For i As Integer = 0 To VisualTreeHelper.GetChildrenCount(parent) - 1
|
||||
Dim child = VisualTreeHelper.GetChild(parent, i)
|
||||
tChild = TryCast(child, T)
|
||||
If tChild IsNot Nothing Then Yield tChild
|
||||
|
||||
For Each descendant In FindVisualChildren(Of T)(child)
|
||||
Yield descendant
|
||||
Next
|
||||
Next
|
||||
End Function
|
||||
|
||||
Private Sub collectionChanged(ByVal sender As Object, ByVal e As NotifyCollectionChangedEventArgs)
|
||||
Select Case e.Action
|
||||
Case NotifyCollectionChangedAction.Add
|
||||
|
||||
If e.NewItems IsNot Nothing Then
|
||||
|
||||
For Each one As EgtDataGridColumn In e.NewItems
|
||||
Try
|
||||
Dim col As DataGridColumn = Me.FindResource(one.Name)
|
||||
one.InitColumn(col)
|
||||
Me.Columns.Insert(e.NewStartingIndex, col)
|
||||
If col.DisplayIndex <> e.NewStartingIndex Then
|
||||
Me.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), one.Name, one.ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
|
||||
Case NotifyCollectionChangedAction.Remove
|
||||
|
||||
If e.OldItems IsNot Nothing Then
|
||||
|
||||
For Each one As EgtDataGridColumn In e.OldItems
|
||||
Dim col As DataGridColumn = Me.FindResource(one.Name)
|
||||
Me.Columns.Remove(col)
|
||||
Next
|
||||
End If
|
||||
|
||||
Case NotifyCollectionChangedAction.Move
|
||||
'Dim col As DataGridColumn = Me.FindResource(BindingColumns(e.OldStartingIndex))
|
||||
'col.DisplayIndex = e.NewStartingIndex
|
||||
Me.Columns.Move(e.OldStartingIndex, e.NewStartingIndex)
|
||||
Me.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
|
||||
'Dim x = Me.Columns(e.OldStartingIndex).DisplayIndex
|
||||
Case NotifyCollectionChangedAction.Reset
|
||||
Me.Columns.Clear()
|
||||
|
||||
If e.NewItems IsNot Nothing Then
|
||||
|
||||
For Each one As DataGridColumn In e.NewItems
|
||||
Dim col As DataGridColumn = Me.FindResource(one)
|
||||
Me.Columns.Add(col)
|
||||
Next
|
||||
End If
|
||||
Case NotifyCollectionChangedAction.Replace
|
||||
Dim col As DataGridColumn = Me.FindResource(e.NewItems(0))
|
||||
Me.Columns(e.NewStartingIndex) = col
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ColumnHeader_SizeChanged(sender As Object, e As SizeChangedEventArgs)
|
||||
' ad ogni ridimensionamento della cella del ColumnHeader salvo le nuove dimensioni nell'ini
|
||||
If Not IsNothing(e.OriginalSource.Column) AndAlso Not IsNothing(BindingColumns(e.OriginalSource.Column.DisplayIndex)) Then
|
||||
' se la colonna corrente è Star ed è preceduta da una colonna Pixel non scrivo le modifiche
|
||||
If Not (e.OriginalSource.Column.Width.IsStar) Then
|
||||
BindingColumns(e.OriginalSource.Column.DisplayIndex).SaveDataGridColumn()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DataGrid_SizedChanged(sender As Object, e As SizeChangedEventArgs) Handles Me.SizeChanged
|
||||
' confronto la larghezza effettiva della EgtDataGrid con la somma delle larghezze delle colonne
|
||||
UpdateColumnsWidth()
|
||||
If BindingColumns.Count > 0 Then
|
||||
If Me.ActualWidth - LASTCOLUMN_MINWIDTH > columnsWidth Then
|
||||
' nascondo la ScrollBar orizzontale e setto lo UnitType dell'ultima colonna visibile a Star
|
||||
ScrollViewer.SetHorizontalScrollBarVisibility(Me, ScrollBarVisibility.Hidden)
|
||||
BindingColumns.Last(Function(x) x.Visible = True).Width = New DataGridLength(1, DataGridLengthUnitType.Star)
|
||||
Else
|
||||
' mostro la ScrollBar orizzontale e se UnitType delle colonne è Star lo setto a Pixel
|
||||
ScrollViewer.SetHorizontalScrollBarVisibility(Me, ScrollBarVisibility.Visible)
|
||||
For Each bc In BindingColumns
|
||||
If bc.Width.IsStar Then
|
||||
bc.Width = New DataGridLength(bc.ActualWidth, DataGridLengthUnitType.Pixel)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' scrivo nell'INI la Width dell'ultima colonna visibile
|
||||
BindingColumns.Last(Function(x) x.Visible = True).SaveDataGridColumn()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateColumnsWidth()
|
||||
' ricalcolo la somma delle larghezze delle colonne visibili
|
||||
columnsWidth = 0
|
||||
For Each col In BindingColumns
|
||||
If col.ColumnVisibility = Visibility.Visible Then
|
||||
columnsWidth += col.ActualWidth
|
||||
End If
|
||||
Next
|
||||
' alla somma calcolata tolgo la larghezza dell'ultima colonna visibile e aggiungo LASTCOLUMN_MINWIDTH
|
||||
' (in questo modo si attiva/disattiva la ScrollBar orizzontale non appena l'ultima colonna viene ristretta/estesa a LASTCOLUMN_MINWIDTH px)
|
||||
If BindingColumns.Count > 0 AndAlso
|
||||
BindingColumns.Any(Function(x) x.Visible = True) Then
|
||||
columnsWidth = columnsWidth - BindingColumns.Last(Function(x) x.Visible = True).ActualWidth + LASTCOLUMN_MINWIDTH
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ColumnHeader_MouseRightButtonDown(sender As Object, e As RoutedEventArgs)
|
||||
Dim nDispIndex As Integer = sender.DisplayIndex
|
||||
' creo il ContextMenu con gli item checkabili
|
||||
Dim cm As ContextMenu = New ContextMenu()
|
||||
Dim miReorder As MenuItem = New MenuItem()
|
||||
Dim miResize As MenuItem = New MenuItem()
|
||||
Dim miSort As MenuItem = New MenuItem()
|
||||
Dim sep1 As Separator = New Separator()
|
||||
Dim miVis As MenuItem = New MenuItem()
|
||||
Dim sep2 As Separator = New Separator()
|
||||
Dim miLock As MenuItem = New MenuItem()
|
||||
Dim miResetSort As MenuItem = New MenuItem()
|
||||
miReorder.Header = NameOf(EgtDataGridColumn.CanUserReorder)
|
||||
miResize.Header = NameOf(EgtDataGridColumn.CanUserResize)
|
||||
miSort.Header = NameOf(EgtDataGridColumn.CanUserSort)
|
||||
miVis.Header = "Columns Visibility"
|
||||
miLock.Header = "Lock Table"
|
||||
miResetSort.Header = "Reset Sort"
|
||||
miReorder.IsCheckable = True
|
||||
miResize.IsCheckable = True
|
||||
miSort.IsCheckable = True
|
||||
miLock.IsCheckable = True
|
||||
miResetSort.IsCheckable = False
|
||||
miReorder.StaysOpenOnClick = True
|
||||
miResize.StaysOpenOnClick = True
|
||||
miSort.StaysOpenOnClick = True
|
||||
miLock.StaysOpenOnClick = True
|
||||
miResetSort.StaysOpenOnClick = True
|
||||
' setto il binding
|
||||
Dim miReorderBinding As Binding = New Binding(NameOf(EgtDataGridColumn.CanUserReorder))
|
||||
Dim miResizeBinding As Binding = New Binding(NameOf(EgtDataGridColumn.CanUserResize))
|
||||
Dim miSortBinding As Binding = New Binding(NameOf(EgtDataGridColumn.CanUserSort))
|
||||
miReorderBinding.Mode = BindingMode.TwoWay
|
||||
miResizeBinding.Mode = BindingMode.TwoWay
|
||||
miSortBinding.Mode = BindingMode.TwoWay
|
||||
miReorder.DataContext = BindingColumns(nDispIndex)
|
||||
miResize.DataContext = BindingColumns(nDispIndex)
|
||||
miSort.DataContext = BindingColumns(nDispIndex)
|
||||
miReorder.SetBinding(MenuItem.IsCheckedProperty, miReorderBinding)
|
||||
miResize.SetBinding(MenuItem.IsCheckedProperty, miResizeBinding)
|
||||
miSort.SetBinding(MenuItem.IsCheckedProperty, miSortBinding)
|
||||
' setto check e enable associati a LockTable
|
||||
miLock.IsChecked = (GetPrivateProfileInt(BindingColumns(nDispIndex).ParentDataGridName, K_LOCKTABLE, 0, m_sDataGridColumnsIniFile) > 0)
|
||||
miReorder.IsChecked = If(miLock.IsChecked, False, BindingColumns(nDispIndex).CanUserReorder)
|
||||
miResize.IsChecked = If(miLock.IsChecked, False, BindingColumns(nDispIndex).CanUserResize)
|
||||
miReorder.IsEnabled = Not miLock.IsChecked
|
||||
miResize.IsEnabled = Not miLock.IsChecked
|
||||
HeaderDispIndex = nDispIndex
|
||||
AddHandler miLock.Checked, AddressOf miLock_Checked
|
||||
AddHandler miLock.Unchecked, AddressOf miLock_Unchecked
|
||||
AddHandler miResetSort.Click, AddressOf miResetSort_Click
|
||||
' aggiungo i MenuItem al ContextMenu
|
||||
cm.Items.Add(miReorder)
|
||||
cm.Items.Add(miResize)
|
||||
cm.Items.Add(miSort)
|
||||
cm.Items.Add(sep1)
|
||||
cm.Items.Add(miVis)
|
||||
cm.Items.Add(sep2)
|
||||
cm.Items.Add(miLock)
|
||||
cm.Items.Add(miResetSort)
|
||||
' creo e aggiungo gli item figli di Columns Visibility
|
||||
For Each Column In BindingColumns
|
||||
Dim mi As MenuItem = New MenuItem()
|
||||
mi.Header = Column.Name
|
||||
mi.IsCheckable = True
|
||||
Dim miBinding As Binding = New Binding(NameOf(EgtDataGridColumn.Visible))
|
||||
miBinding.Mode = BindingMode.TwoWay
|
||||
mi.DataContext = Column
|
||||
mi.SetBinding(MenuItem.IsCheckedProperty, miBinding)
|
||||
mi.StaysOpenOnClick = True
|
||||
mi.IsEnabled = Column.CanUserEditVisible
|
||||
miVis.Items.Add(mi)
|
||||
Next
|
||||
' disabilito Columns Visibility se tutti i suoi figli sono disabilitati
|
||||
Dim bIsEnabled As Boolean = False
|
||||
For Each visMenuItem In miVis.Items
|
||||
bIsEnabled = visMenuItem.IsEnabled
|
||||
Next
|
||||
cm.Items(4).IsEnabled = bIsEnabled
|
||||
|
||||
cm.PlacementTarget = TryCast(sender, Button)
|
||||
cm.IsOpen = True
|
||||
End Sub
|
||||
|
||||
Private Sub CurrDataGrid_ColumnReordering(sender As Object, e As DataGridColumnEventArgs) Handles Me.ColumnReordering
|
||||
' conservo il vecchio indice in modo da effettuare lo scambio in BindingColumns una volta riordinate graficamente
|
||||
OldIndex = e.Column.DisplayIndex
|
||||
End Sub
|
||||
|
||||
Private Sub CurrDataGrid_ColumnReordered(sender As Object, e As DataGridColumnEventArgs) Handles Me.ColumnReordered
|
||||
' scambio le colonne in BindingColumns
|
||||
BindingColumns.Move(OldIndex, e.Column.DisplayIndex)
|
||||
' scrivo tutte le colonne interessate dallo spostamento
|
||||
' (se OldIndex > e.Column.DisplayIndex, il ciclo non viene eseguito quindi lo faccio nell'altro senso)
|
||||
For index = OldIndex To e.Column.DisplayIndex
|
||||
BindingColumns(index).SaveDataGridColumn()
|
||||
Next
|
||||
For index = e.Column.DisplayIndex To OldIndex
|
||||
BindingColumns(index).SaveDataGridColumn()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub miLock_Checked(sender As Object, e As RoutedEventArgs)
|
||||
Dim miLock = DirectCast(sender, MenuItem)
|
||||
' disabilito Reorder e Resize di tutte le colonne salvandone prima il valore
|
||||
For Each Column In BindingColumns
|
||||
Column.OldCanUserReorder = Column.CanUserReorder
|
||||
Column.OldCanUserResize = Column.CanUserResize
|
||||
Column.CanUserReorder = False
|
||||
Column.CanUserResize = False
|
||||
Next
|
||||
' aggiorno il ContextMenu correntemente aperto
|
||||
Dim miReorder As MenuItem = TryCast(miLock.Parent, ContextMenu).Items(0)
|
||||
Dim miResize As MenuItem = TryCast(miLock.Parent, ContextMenu).Items(1)
|
||||
miReorder.IsChecked = False
|
||||
miResize.IsChecked = False
|
||||
miReorder.IsEnabled = False
|
||||
miResize.IsEnabled = False
|
||||
' scrivo il valore di LockTable nell'INI
|
||||
WritePrivateProfileString(BindingColumns(HeaderDispIndex).ParentDataGridName, K_LOCKTABLE, 1, m_sDataGridColumnsIniFile)
|
||||
End Sub
|
||||
|
||||
Private Sub miLock_Unchecked(sender As Object, e As RoutedEventArgs)
|
||||
Dim miLock = DirectCast(sender, MenuItem)
|
||||
' abilito Reorder e Resize di tutte le colonne ripristinando il valore precedente, se presente
|
||||
For Each Column In BindingColumns
|
||||
If Not IsNothing(Column.OldCanUserReorder) Then Column.CanUserReorder = Column.OldCanUserReorder
|
||||
If Not IsNothing(Column.OldCanUserResize) Then Column.CanUserResize = Column.OldCanUserResize
|
||||
Next
|
||||
' aggiorno il ContextMenu correntemente aperto
|
||||
Dim miReorder As MenuItem = TryCast(miLock.Parent, ContextMenu).Items(0)
|
||||
Dim miResize As MenuItem = TryCast(miLock.Parent, ContextMenu).Items(1)
|
||||
miReorder.IsChecked = If(IsNothing(BindingColumns(HeaderDispIndex).OldCanUserReorder), BindingColumns(HeaderDispIndex).CanUserReorder, BindingColumns(HeaderDispIndex).OldCanUserReorder)
|
||||
miResize.IsChecked = If(IsNothing(BindingColumns(HeaderDispIndex).OldCanUserResize), BindingColumns(HeaderDispIndex).CanUserResize, BindingColumns(HeaderDispIndex).OldCanUserResize)
|
||||
miReorder.IsEnabled = True
|
||||
miResize.IsEnabled = True
|
||||
' scrivo il valore di LockTable nell'INI
|
||||
WritePrivateProfileString(BindingColumns(HeaderDispIndex).ParentDataGridName, K_LOCKTABLE, 0, m_sDataGridColumnsIniFile)
|
||||
End Sub
|
||||
|
||||
Private Sub miResetSort_Click(sender As Object, e As RoutedEventArgs)
|
||||
' resetto le SortDirection di tutte le colonne della datagrid
|
||||
ResetSortDirections()
|
||||
End Sub
|
||||
|
||||
Private Sub CurrDataGrid_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' setto la SortDirection, se attiva, sulla colonna su cui è attiva
|
||||
Dim colIndex As Integer = 0
|
||||
For Each col In BindingColumns
|
||||
If col.SortDirection > 0 Then
|
||||
Me.Items.SortDescriptions.Add(New SortDescription(Me.Columns(colIndex).SortMemberPath, col.SortDirection - 1))
|
||||
Exit For
|
||||
End If
|
||||
colIndex += 1
|
||||
Next
|
||||
' calcolo la somma delle larghezze delle colonne visibili
|
||||
For Each col In BindingColumns
|
||||
If col.ColumnVisibility = Visibility.Visible Then
|
||||
columnsWidth += col.ActualWidth
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub CurrDataGrid_Sorting(sender As Object, e As DataGridSortingEventArgs) Handles Me.Sorting
|
||||
' salvo la SortDirection corrente della colonna prima di resettarla per tutte le colonne
|
||||
Dim CurrSortDirection As ListSortDirection? = e.Column.SortDirection
|
||||
ResetSortDirections(True)
|
||||
' ora applico la SortDirection corretta
|
||||
Select Case CurrSortDirection
|
||||
Case ListSortDirection.Ascending
|
||||
BindingColumns(e.Column.DisplayIndex).SortDirection = 2 ' la setto a Descending
|
||||
Case ListSortDirection.Descending
|
||||
BindingColumns(e.Column.DisplayIndex).SortDirection = 1 ' la setto a Ascending
|
||||
Case Else
|
||||
BindingColumns(e.Column.DisplayIndex).SortDirection = 1 ' la setto a Ascending
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ResetSortDirections(Optional bUserClick As Boolean = False)
|
||||
If bUserClick Then
|
||||
' nel caso di click dell'utente sulla colonna da sortare occorre solamente settare a 0 la SortDirection di tutte le colonne
|
||||
For Each column In BindingColumns
|
||||
column.SortDirection = 0
|
||||
Next
|
||||
Else
|
||||
' altrimenti (caso ResetSort da ContextMenu) è necessatio un Clear più ampio e anche grafico
|
||||
Me.Items.SortDescriptions.Clear()
|
||||
For Each column In BindingColumns
|
||||
column.SortDirection = 0
|
||||
' resetto graficamente anche l'header della colonna
|
||||
Me.Columns(column.DisplayIndex).SortDirection = Nothing
|
||||
Next
|
||||
RaiseEvent ResetSort()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtDataGridColumn
|
||||
Inherits VMBase
|
||||
|
||||
Private m_dgColumn As DataGridColumn
|
||||
|
||||
'Check Box per le singole colonne
|
||||
Private m_bIsCheched As Boolean
|
||||
Public Property bIsChecked As Boolean
|
||||
Get
|
||||
Return m_bIsCheched
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsCheched = value
|
||||
NotifyPropertyChanged(NameOf(bIsChecked))
|
||||
WriteMainPrivateProfileString(S_PDFEDITOR, m_Name, If(m_bIsCheched, 1, 0))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_ParentDataGridName As String
|
||||
Public Property ParentDataGridName As String
|
||||
Get
|
||||
Return m_ParentDataGridName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ParentDataGridName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Name = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_Width As DataGridLength
|
||||
Public Property Width As DataGridLength
|
||||
Get
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.Width
|
||||
Else
|
||||
Return m_Width
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataGridLength)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
m_dgColumn.Width = value
|
||||
Else
|
||||
m_Width = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ActualWidth As Double
|
||||
Get
|
||||
Return m_dgColumn.ActualWidth
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property m_DisplayIndex As Integer = -1
|
||||
Public Property DisplayIndex As Integer
|
||||
Get
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.DisplayIndex
|
||||
Else
|
||||
Return m_DisplayIndex
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
m_dgColumn.DisplayIndex = value
|
||||
Else
|
||||
m_DisplayIndex = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_OrigIsReadOnly As Boolean = True
|
||||
Private Property m_IsReadOnly As Boolean = True
|
||||
Public Property IsReadOnly As Boolean
|
||||
Get
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.IsReadOnly
|
||||
Else
|
||||
Return m_IsReadOnly
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
m_dgColumn.IsReadOnly = value
|
||||
Else
|
||||
m_IsReadOnly = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Public Sub ResetToOrigIsReadOnly()
|
||||
IsReadOnly = m_OrigIsReadOnly
|
||||
End Sub
|
||||
|
||||
Friend OldCanUserReorder As Boolean?
|
||||
Private m_CanUserReorder As Boolean
|
||||
Public Property CanUserReorder As Boolean
|
||||
Get
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.CanUserReorder
|
||||
Else
|
||||
Return m_CanUserReorder
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
m_dgColumn.CanUserReorder = value
|
||||
Else
|
||||
m_CanUserReorder = value
|
||||
End If
|
||||
SaveDataGridColumn()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend OldCanUserResize As Boolean?
|
||||
Private m_CanUserResize As Boolean
|
||||
Public Property CanUserResize As Boolean
|
||||
Get
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.CanUserResize
|
||||
Else
|
||||
Return m_CanUserResize
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
m_dgColumn.CanUserResize = value
|
||||
Else
|
||||
m_CanUserResize = value
|
||||
End If
|
||||
SaveDataGridColumn()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CanUserSort As Boolean
|
||||
Public Property CanUserSort As Boolean
|
||||
Get
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.CanUserSort
|
||||
Else
|
||||
Return m_CanUserSort
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
m_dgColumn.CanUserSort = value
|
||||
Else
|
||||
m_CanUserSort = value
|
||||
End If
|
||||
SaveDataGridColumn()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Visible As Boolean
|
||||
Public Property Visible As Boolean
|
||||
Get
|
||||
Return m_Visible
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_Visible = value
|
||||
ColumnVisibility = If(m_Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
SaveDataGridColumn()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ColumnVisibility As Visibility
|
||||
Public Property ColumnVisibility As Visibility
|
||||
Get
|
||||
Return If(m_Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_ColumnVisibility = value
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
m_dgColumn.Visibility = value
|
||||
' ricavo la EgtDataGrid a cui appartiene la DataGridColumn
|
||||
Dim propertyInfo As Reflection.PropertyInfo = m_dgColumn.GetType().GetProperty("DataGridOwner",
|
||||
Reflection.BindingFlags.Instance Or
|
||||
Reflection.BindingFlags.NonPublic)
|
||||
Dim dg As EgtDataGrid = propertyInfo.GetValue(m_dgColumn, Nothing)
|
||||
' ogni colonna visibile con UnitType a Star tranne l'ultima verrà settata a Pixel
|
||||
For Each bc In dg.BindingColumns
|
||||
If bc.Width.IsStar And Not bc.Name = dg.BindingColumns.Last(Function(x) x.Visible = True).Name Then
|
||||
bc.Width = New DataGridLength(bc.ActualWidth, DataGridLengthUnitType.Pixel)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CanUserEditVisible As Boolean
|
||||
Public Property CanUserEditVisible As Boolean
|
||||
Get
|
||||
Return m_CanUserEditVisible
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_CanUserEditVisible = value
|
||||
SaveDataGridColumn()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SortDirection As Forms.SortOrder = Forms.SortOrder.None
|
||||
Public Property SortDirection As Forms.SortOrder
|
||||
Get
|
||||
Return m_SortDirection 'If(IsNothing(m_dgColumn.SortDirection), 0, m_dgColumn.SortDirection + 1)
|
||||
End Get
|
||||
Set(value As Forms.SortOrder)
|
||||
'If Not IsNothing(m_dgColumn) Then
|
||||
' If value = 0 Then
|
||||
' m_dgColumn.SortDirection = Nothing
|
||||
' Else
|
||||
' m_dgColumn.SortDirection = value - 1
|
||||
' End If
|
||||
'Else
|
||||
m_SortDirection = value
|
||||
'End If
|
||||
SaveDataGridColumn()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sName As String)
|
||||
m_Name = sName
|
||||
End Sub
|
||||
|
||||
Sub New(sParentDG As String, sName As String, bCanUserReorder As Boolean, bCanUserResize As Boolean, bCanUserSort As Boolean, bIsReadOnly As Boolean, Width As DataGridLength, bVisible As Boolean, bCanUserEditVisible As Boolean, nSortDirection As Integer)
|
||||
m_ParentDataGridName = sParentDG
|
||||
m_Name = sName
|
||||
m_CanUserReorder = bCanUserReorder
|
||||
m_CanUserResize = bCanUserResize
|
||||
m_CanUserSort = bCanUserSort
|
||||
m_OrigIsReadOnly = bIsReadOnly
|
||||
m_IsReadOnly = bIsReadOnly
|
||||
m_Width = Width
|
||||
m_Visible = bVisible
|
||||
m_CanUserEditVisible = bCanUserEditVisible
|
||||
m_SortDirection = nSortDirection
|
||||
m_bIsCheched = GetMainPrivateProfileInt(S_PDFEDITOR, m_Name, 0) <> 0
|
||||
End Sub
|
||||
|
||||
Friend Sub InitColumn(dgColumn As DataGridColumn)
|
||||
m_dgColumn = dgColumn
|
||||
m_dgColumn.CanUserReorder = m_CanUserReorder
|
||||
m_dgColumn.CanUserResize = m_CanUserResize
|
||||
m_dgColumn.CanUserSort = m_CanUserSort
|
||||
m_dgColumn.IsReadOnly = m_IsReadOnly
|
||||
'm_dgColumn.DisplayIndex = m_DisplayIndex
|
||||
m_dgColumn.Width = m_Width
|
||||
m_dgColumn.Visibility = m_ColumnVisibility
|
||||
If CInt(m_SortDirection) > 0 Then
|
||||
m_dgColumn.SortDirection = m_SortDirection - 1 'If(CInt(m_SortDirection) = 0, Nothing, m_SortDirection - 1)
|
||||
Else
|
||||
m_dgColumn.SortDirection = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' funzione per calcolare e scrivere la stringa dei parametri della colonna nell'INI
|
||||
Public Function SaveDataGridColumn() As Boolean
|
||||
If DisplayIndex = -1 Then Return False
|
||||
Dim bOk As Boolean
|
||||
Dim sColumnParams = String.Empty
|
||||
sColumnParams = Name & "," & If(CanUserReorder, 1, 0) & "," & If(CanUserResize, 1, 0) & "," & If(CanUserSort, 1, 0) & "," & If(m_OrigIsReadOnly, 1, 0) & "," & DoubleToString(Width.Value, 6) & "," & Width.UnitType & "," & If(Visible, 1, 0) & "," & If(CanUserEditVisible, 1, 0) & "," & CInt(SortDirection)
|
||||
bOk = WriteColumnPrivateProfileParam(ParentDataGridName, DisplayIndex, sColumnParams)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,345 @@
|
||||
<EgtBEAMWALLCORE:OptimizerWindow x:Class="EgtManageFileDialogV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ShowInTaskbar="False"
|
||||
Height="650" Width="1000"
|
||||
Style="{StaticResource OptimizerWindow.Dialog}">
|
||||
|
||||
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding GoBack_Command}"
|
||||
Style="{StaticResource RightPanel_Button}">
|
||||
<Image Source="{DynamicResource Restore_Image}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sSelPath}"
|
||||
Style="{StaticResource EgtManageDialog_TextBlock}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
ItemsSource="{Binding ViewModeList}"
|
||||
SelectedItem="{Binding SelViewMode}"
|
||||
Style="{StaticResource EgtManageDialog_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Style="{StaticResource PartManager_StackPanel}">
|
||||
<Image Source="{Binding Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
<TextBlock Text="{Binding Name}"
|
||||
Style="{StaticResource ComboManageDialog_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Style="{StaticResource AddRawPartWnd_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TreeView x:Name="FileTree"
|
||||
ItemsSource="{Binding RootList}"
|
||||
Style="{StaticResource EgtManageDialog_TreeView}">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}"
|
||||
ItemsSource="{Binding TreeItemList_View}">
|
||||
<StackPanel Style="{StaticResource PartManager_StackPanel}">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}">
|
||||
<StackPanel Style="{StaticResource PartManager_StackPanel}">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
</TreeView>
|
||||
<TabControl Grid.Column="1"
|
||||
SelectedIndex="{Binding nSelTab}"
|
||||
Style="{StaticResource EgtManageDialog_TabControl}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem Header="LISTBOX">
|
||||
<ListBox Grid.Row="1"
|
||||
x:Name="FileList"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected, Mode=TwoWay}">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate x:Key="ListTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Style="{StaticResource EgtManageDialog_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="TilesTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Style="{StaticResource EgtDirectory_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Style="{StaticResource EgtManageDialog_UniformGrid}">
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource Info_TextBlock}"/>
|
||||
<TextBlock Text="{Binding ghTypeItem}"
|
||||
Style="{StaticResource Info_TextBlock}"/>
|
||||
<TextBlock Text="{Binding sDimension}"
|
||||
Style="{StaticResource Info_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ContentTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Style="{StaticResource ContentTemplate_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="2"
|
||||
Style="{StaticResource EgtManageDialog_UniformGrid}">
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource Info_TextBlock}"/>
|
||||
<TextBlock Text="{Binding ghTypeItem}"
|
||||
Style="{StaticResource Info_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="2"
|
||||
Rows="2"
|
||||
Style="{StaticResource EgtManageDialog_UniformGrid}">
|
||||
<TextBlock Text="{Binding sLastModifyDate}"
|
||||
Style="{StaticResource Info_TextBlock}"/>
|
||||
<TextBlock Text="{Binding sDimension}"
|
||||
Style="{StaticResource Info_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
<Border Grid.Row="1"
|
||||
Style="{StaticResource EgtManageDialog_Border}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<ContentControl Content="{Binding}">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="{x:Type ContentControl}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}" Value="0">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}" Value="1">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}" Value="2">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.Style>
|
||||
<Style TargetType="{x:Type ListBox}">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="IsSynchronizedWithCurrentItem" Value="True"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"
|
||||
Value="0">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource Project_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"
|
||||
Value="1">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource ProjectH_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"
|
||||
Value="2">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Style="{StaticResource EgtManageDialog_StackPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListBox.Style>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="DATAGRID">
|
||||
<DataGrid AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
HeadersVisibility="Column"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
SelectionMode="Single"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="5*">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Source_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource NameImage_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding sLastModifyDate}"
|
||||
Width="2*"
|
||||
ElementStyle="{StaticResource DataGrid_TextBlock}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding ghTypeItem}"
|
||||
Width="1*"
|
||||
ElementStyle="{StaticResource DataGrid_TextBlock}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding sDimension}"
|
||||
Width="1*"
|
||||
ElementStyle="{StaticResource DataGridR_TextBlock}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OptimizerWindow}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Style="{StaticResource AddRawPartWnd_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding FileName_Msg}"
|
||||
Style="{StaticResource FileName_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
||||
Style="{StaticResource SaveFileName_TextBox}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
ItemsSource="{Binding FilterList}"
|
||||
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
|
||||
DisplayMemberPath="sNameExstension"
|
||||
Style="{StaticResource FilterList_ComboBox}"/>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="3"
|
||||
Rows="1"
|
||||
Style="{StaticResource Command_UniformGrid}">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
Style="{StaticResource EgtManageDialogOK_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
Style="{StaticResource EgtManageDialogCancel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtBEAMWALLCORE:OptimizerWindow>
|
||||
@@ -0,0 +1,150 @@
|
||||
Imports System.Windows.Input
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class EgtManageFileDialogV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
|
||||
|
||||
Private Shadows DialogResult As Boolean
|
||||
|
||||
''' <summary>
|
||||
''' Stringa che specifica il titolo da mostrare
|
||||
''' </summary>
|
||||
Public Overloads Property Title As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sTitle
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sTitle = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Filter As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sFilter
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SelFilter As EgtExstension
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.SelFilter
|
||||
End Get
|
||||
Set(value As EgtExstension)
|
||||
m_EgtManageFileDialogVM.SelFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property InitialDirectory As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sInitialDirectory
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sInitialDirectory = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SafeFileName As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sSaveFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sSaveFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FileName As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FilterIndex As Integer
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.nFilterIndex
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_EgtManageFileDialogVM.nFilterIndex = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Mode As Integer
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.nMode
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_EgtManageFileDialogVM.nMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CheckFileExists As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bCheckFileExists
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bCheckFileExists = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ValidateNames As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bValidateNames
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bValidateNames = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property OverwritePrompt As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bOverwritePrompt
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bOverwritePrompt = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtManageFileDialogVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtManageFileDialogVM = EgtManageFileDialogVM
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As Boolean) Handles m_EgtManageFileDialogVM.OnCloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overloads Function ShowDialog() As Boolean
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
Private Sub ListBoxItem_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||
m_EgtManageFileDialogVM.MouseDoubleClick()
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,45 @@
|
||||
<EgtBEAMWALLCORE:OptimizerWindow x:Class="EgtMessageBoxV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding sTitle}"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ShowInTaskbar="False"
|
||||
Style="{StaticResource OptimizerWindow.Dialog}">
|
||||
|
||||
<Grid Style="{StaticResource EgtMessageBox_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Style="{StaticResource MessageBox_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sMessage}"
|
||||
Style="{StaticResource EgtMessageBox_TextBlock}"/>
|
||||
</Grid>
|
||||
<ItemsControl Grid.Row="1"
|
||||
ItemsSource="{Binding ButtonList}"
|
||||
Style="{StaticResource EgtMessageBox_ItemsControl}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsDefault="{Binding bIsDefault}"
|
||||
Content="{Binding sMessage}"
|
||||
Command="{Binding Command_Command}"
|
||||
Style="{StaticResource EgtColorPicker_HalfRound_Button}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</EgtBEAMWALLCORE:OptimizerWindow>
|
||||
@@ -0,0 +1,109 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class EgtMessageBoxV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
|
||||
|
||||
Private Shadows DialogResult As MessageBoxResult
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtMessageBoxVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtMessageBoxVM = EgtMessageBoxVM
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||
''' <param name="DefaultResult">Valore che specifica il bottone di default</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.OnCloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -1,16 +0,0 @@
|
||||
Public Enum CalcStates As Integer
|
||||
NOTCALCULATED = -1
|
||||
OK = 0
|
||||
WARNING = 1
|
||||
ERROR_ = 2
|
||||
End Enum
|
||||
|
||||
Public Enum ItemState As Integer
|
||||
|
||||
ND = -1
|
||||
Assigned = 0
|
||||
Confirmed = 1
|
||||
WIP = 2
|
||||
Produced = 3
|
||||
Scrapped = 4
|
||||
End Enum
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class MachGroupAddedEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Public m_NewMachGroupM As MachGroupM
|
||||
Public Property NewMachGroupM As MachGroupM
|
||||
Get
|
||||
Return m_NewMachGroupM
|
||||
End Get
|
||||
Private Set(value As MachGroupM)
|
||||
m_NewMachGroupM = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(NewMachGroupM As MachGroupM)
|
||||
Me.NewMachGroupM = NewMachGroupM
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,67 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MachGroupM
|
||||
|
||||
Protected m_Id As Integer
|
||||
Public ReadOnly Property Id As Integer
|
||||
Get
|
||||
Return m_Id
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_Name As String
|
||||
Public ReadOnly Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_Machine As String
|
||||
Public ReadOnly Property Machine As String
|
||||
Get
|
||||
Return m_Machine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_IsEnabled As Boolean
|
||||
Public Property IsEnabled As Boolean
|
||||
Get
|
||||
Return m_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_IsEnabled = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
Protected Sub New()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewMachGroup() As MachGroupM
|
||||
Return New MachGroupM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateMachGroup(nId As Integer, sName As String, sMachine As String) As MachGroupM
|
||||
Dim NewMachGroupM As New MachGroupM With {
|
||||
.m_Id = nId,
|
||||
.m_Name = sName,
|
||||
.m_Machine = sMachine
|
||||
}
|
||||
Return NewMachGroupM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateMachGroup(sName As String, sMachine As String) As MachGroupM
|
||||
' Creo il nuovo gruppo di lavorazione con i dati ottenuti a seconda del caso in cui mi trovo
|
||||
Dim NewMachGroupM As New MachGroupM With {
|
||||
.m_Id = EgtAddMachGroup(sName, sMachine)
|
||||
}
|
||||
If NewMachGroupM.m_Id = GDB_ID.NULL Then Return Nothing
|
||||
NewMachGroupM.m_Name = sName
|
||||
NewMachGroupM.m_Machine = sMachine
|
||||
Return NewMachGroupM
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,222 @@
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachGroupPanelM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Lista delle macchine disponibili
|
||||
Protected m_MachineList As List(Of Machine)
|
||||
|
||||
' Macchina di default
|
||||
Protected m_DefaultMachine As String = String.Empty
|
||||
Public ReadOnly Property DefaultMachine As String
|
||||
Get
|
||||
Return m_DefaultMachine
|
||||
End Get
|
||||
End Property
|
||||
' Variabile che definisce se il nome è automatico
|
||||
Protected m_IsGroupNameAutomatic As Boolean = True
|
||||
' Variabile che definisce se ci sono più gruppi di lavorazione
|
||||
Protected m_IsMultiMachGroup As Boolean
|
||||
Public ReadOnly Property IsMultiMachGroup As Boolean
|
||||
Get
|
||||
Return m_IsMultiMachGroup
|
||||
End Get
|
||||
End Property
|
||||
' Nome base dei gruppi
|
||||
Protected m_BaseName As String
|
||||
|
||||
Protected m_MachGroupMList As New List(Of MachGroupM)
|
||||
Public Property MachGroupMList As List(Of MachGroupM)
|
||||
Get
|
||||
Return m_MachGroupMList
|
||||
End Get
|
||||
Set(value As List(Of MachGroupM))
|
||||
m_MachGroupMList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_MachGroupPanel_Visibility As Visibility
|
||||
Public Property MachGroupPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_MachGroupPanel_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_MachGroupPanel_Visibility = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Variabile che permette di abilitare/disabilitare i bottoni aggiungi e togli MachGroup
|
||||
Protected m_IsEnabledAddRemove As Boolean
|
||||
Public Property IsEnabledAddRemove As Boolean
|
||||
Get
|
||||
Return m_IsEnabledAddRemove
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_IsEnabledAddRemove = value
|
||||
End Set
|
||||
End Property
|
||||
' Variabile che definisce lo stato (attivi/disattivi) di tutti i gruppi tranne quello selezionato
|
||||
Protected m_IsEnabledMachGroups As Boolean
|
||||
Public Property IsEnabledMachGroups As Boolean
|
||||
Get
|
||||
Return m_IsEnabledMachGroups
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_IsEnabledMachGroups = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Protected Sub New()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewMachGroupPanel() As MachGroupPanelM
|
||||
Return New MachGroupPanelM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateMachGroupPanel(IsMultiMachGroup As Boolean,
|
||||
MachineList As List(Of Machine), DefaultMachine As String,
|
||||
Optional sBaseName As String = "MachGroup_1") As MachGroupPanelM
|
||||
' Assegno nome base
|
||||
' Recupero lista macchine
|
||||
' Assegno macchina di default
|
||||
' recupero i MachGroup
|
||||
Dim NewMachGroupPanelM As New MachGroupPanelM With {
|
||||
.m_IsMultiMachGroup = IsMultiMachGroup,
|
||||
.m_BaseName = sBaseName,
|
||||
.m_MachineList = MachineList,
|
||||
.m_DefaultMachine = DefaultMachine,
|
||||
.m_MachGroupMList = LoadMachGroups()
|
||||
}
|
||||
|
||||
Return NewMachGroupPanelM
|
||||
End Function
|
||||
|
||||
Public Shared Function LoadMachGroups() As List(Of MachGroupM)
|
||||
Dim TempList As New List(Of MachGroupM)
|
||||
Dim nId = EgtGetFirstMachGroup()
|
||||
While nId <> GDB_ID.NULL
|
||||
EgtSetCurrMachGroup(nId)
|
||||
Dim sName As String = String.Empty
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetMachGroupName(nId, sName)
|
||||
EgtGetMachGroupMachineName(nId, sMachine)
|
||||
TempList.Add(MachGroupM.CreateMachGroup(nId, sName, sMachine))
|
||||
nId = EgtGetNextMachGroup(nId)
|
||||
End While
|
||||
Return TempList
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Event MachGroupAdded As EventHandler(Of MachGroupAddedEventArgs)
|
||||
Public Event MachGroupRemoved As EventHandler(Of MachGroupAddedEventArgs)
|
||||
|
||||
Public Overridable Sub AddMachGroup(MachGroupM As MachGroupM)
|
||||
If IsNothing(MachGroupM) Then Return
|
||||
If Not m_MachGroupMList.Contains(MachGroupM) Then
|
||||
m_MachGroupMList.Add(MachGroupM)
|
||||
RaiseEvent MachGroupAdded(Me, New MachGroupAddedEventArgs(MachGroupM))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub RemoveMachGroup(MachGroupM As MachGroupM)
|
||||
If IsNothing(MachGroupM) Then Return
|
||||
If m_MachGroupMList.Contains(MachGroupM) AndAlso m_MachGroupMList.Remove(MachGroupM) Then
|
||||
RaiseEvent MachGroupRemoved(Me, New MachGroupAddedEventArgs(MachGroupM))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function GetMachGroups() As List(Of MachGroupM)
|
||||
Return New List(Of MachGroupM)(m_MachGroupMList)
|
||||
End Function
|
||||
|
||||
Public Overridable Function NewMachGroup() As MachGroupM
|
||||
' Sistemazioni preliminari
|
||||
OnPreNewMachGroup()
|
||||
' Se non ci sono macchine disponibili esco con errore
|
||||
If m_MachineList.Count <= 0 Then Return Nothing
|
||||
' Creo il VM per chiedere nome e macchina a seconda del caso in cui mi trovo
|
||||
Dim NewMachGroupWndVM As NewMachGroupWndVM = Nothing
|
||||
Dim sNewMGrpName As String = m_BaseName
|
||||
Dim sNewMachName As String = m_MachineList(0).Name
|
||||
If m_IsMultiMachGroup Then
|
||||
EgtGetMachGroupNewName(sNewMGrpName)
|
||||
If m_MachineList.Count = 1 Then
|
||||
If Not m_IsGroupNameAutomatic Then
|
||||
NewMachGroupWndVM = New NewMachGroupWndVM(sNewMGrpName)
|
||||
End If
|
||||
Else
|
||||
If m_IsGroupNameAutomatic Then
|
||||
NewMachGroupWndVM = New NewMachGroupWndVM(m_DefaultMachine, m_MachineList)
|
||||
Else
|
||||
NewMachGroupWndVM = New NewMachGroupWndVM(sNewMGrpName, m_DefaultMachine, m_MachineList)
|
||||
End If
|
||||
End If
|
||||
ElseIf EgtGetMachGroupCount() = 0 Then
|
||||
If m_MachineList.Count > 1 Then
|
||||
NewMachGroupWndVM = New NewMachGroupWndVM(m_DefaultMachine, m_MachineList)
|
||||
End If
|
||||
End If
|
||||
' Se necessario, lancio finestra di acquisizione dati
|
||||
If Not IsNothing(NewMachGroupWndVM) Then
|
||||
' Se non esistono gruppi nella lista, rendo la finestra non chiudibile senza scelta
|
||||
If m_MachGroupMList.Count = 0 Then NewMachGroupWndVM.IsClosable = False
|
||||
' Lancio finestra
|
||||
Dim NewMachGroupWndV As New NewMachGroupWndV(Application.Current.MainWindow, NewMachGroupWndVM)
|
||||
If NewMachGroupWndV.ShowDialog() = False Then Return Nothing
|
||||
' Recupero dati
|
||||
If Not IsNothing(NewMachGroupWndVM.Name) Then sNewMGrpName = NewMachGroupWndVM.Name
|
||||
If Not IsNothing(NewMachGroupWndVM.SelectedMachine) Then sNewMachName = NewMachGroupWndVM.SelectedMachine.Name
|
||||
End If
|
||||
' Creo il nuovo gruppo di lavorazione con i dati ottenuti a seconda del caso in cui mi trovo
|
||||
Dim MachGroupM As MachGroupM = MachGroupM.CreateMachGroup(sNewMGrpName, sNewMachName)
|
||||
If IsNothing(MachGroupM) Then Return Nothing
|
||||
AddMachGroup(MachGroupM)
|
||||
' Sistemazioni finali
|
||||
m_DefaultMachine = sNewMachName
|
||||
OnPostNewMachGroup()
|
||||
Return MachGroupM
|
||||
End Function
|
||||
|
||||
Public Function NewMachGroupWithDefaults() As MachGroupM
|
||||
' Sistemazioni preliminari
|
||||
OnPreNewMachGroup()
|
||||
' Se non ci sono macchine disponibili esco con errore
|
||||
If m_MachineList.Count <= 0 Then Return Nothing
|
||||
' Assegno valori di default
|
||||
Dim sNewMGrpName As String = m_BaseName
|
||||
Dim sNewMachName As String = If(Machine.ExistsMachine(m_DefaultMachine, m_MachineList), m_DefaultMachine, m_MachineList(0).Name)
|
||||
' Creo il nuovo gruppo di lavorazione con i dati ottenuti a seconda del caso in cui mi trovo
|
||||
Dim MachGroupM As MachGroupM = MachGroupM.CreateMachGroup(sNewMGrpName, sNewMachName)
|
||||
If IsNothing(MachGroupM) Then Return Nothing
|
||||
AddMachGroup(MachGroupM)
|
||||
' Sistemazioni finali
|
||||
m_DefaultMachine = sNewMachName
|
||||
OnPostNewMachGroup()
|
||||
Return MachGroupM
|
||||
End Function
|
||||
|
||||
Public Overridable Function OnPreNewMachGroup() As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overridable Function OnPostNewMachGroup() As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overridable Function OnPreRemoveCurrMachGroup() As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,56 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachGroupVM
|
||||
Inherits VMBase
|
||||
|
||||
Protected m_MachGroupM As MachGroupM
|
||||
Public ReadOnly Property MachGroupM As MachGroupM
|
||||
Get
|
||||
Return m_MachGroupM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Id As Integer
|
||||
Get
|
||||
Return m_MachGroupM.Id
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Name As String
|
||||
Get
|
||||
Return m_MachGroupM.Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Machine As String
|
||||
Get
|
||||
Return m_MachGroupM.Machine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property IsEnabled As Boolean
|
||||
Get
|
||||
Return m_MachGroupM.IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_MachGroupM.IsEnabled = value
|
||||
NotifyPropertyChanged(NameOf(IsEnabled))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "ToolTip"
|
||||
|
||||
Public Overridable ReadOnly Property MachGroupToolTip As String
|
||||
Get
|
||||
Return "Name: " & m_MachGroupM.Name & Environment.NewLine &
|
||||
"Machine: " & m_MachGroupM.Machine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
Sub New(MachGroupM As MachGroupM)
|
||||
m_MachGroupM = MachGroupM
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,289 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class NewMachGroupPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Protected m_MachGroupPanelM As MachGroupPanelM
|
||||
|
||||
Public ReadOnly Property DefaultMachine As String
|
||||
Get
|
||||
Return m_MachGroupPanelM.DefaultMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_MachGroupVMList As ObservableCollection(Of MachGroupVM)
|
||||
Public Property MachGroupVMList As ObservableCollection(Of MachGroupVM)
|
||||
Get
|
||||
Return m_MachGroupVMList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of MachGroupVM))
|
||||
m_MachGroupVMList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_SelectedMachGroup As MachGroupVM
|
||||
Public Property SelectedMachGroup As MachGroupVM
|
||||
Get
|
||||
Return m_SelectedMachGroup
|
||||
End Get
|
||||
Set(value As MachGroupVM)
|
||||
m_SelectedMachGroup = value
|
||||
If Not IsNothing(value) Then
|
||||
OnPreSetCurrMachGroup()
|
||||
EgtSetCurrMachGroup(value.Id)
|
||||
OnPostSetCurrMachGroup()
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelectedMachGroup))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MachGroupPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_MachGroupPanelM.MachGroupPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub SetMachGroupPanelVisibility(IsVisible As Boolean)
|
||||
If IsVisible Then
|
||||
m_MachGroupPanelM.MachGroupPanel_Visibility = Visibility.Visible
|
||||
Else
|
||||
m_MachGroupPanelM.MachGroupPanel_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(MachGroupPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
|
||||
' Variabile che permette di abilitare/disabilitare i bottoni aggiungi e togli MachGroup
|
||||
Public Property IsEnabledAddRemove As Boolean
|
||||
Get
|
||||
Return m_MachGroupPanelM.IsEnabledAddRemove
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_MachGroupPanelM.IsEnabledAddRemove = value
|
||||
NotifyPropertyChanged(NameOf(IsEnabledAddRemove))
|
||||
End Set
|
||||
End Property
|
||||
' Variabile che definisce lo stato (attivi/disattivi) di tutti i gruppi tranne quello selezionato
|
||||
Public ReadOnly Property IsEnabledMachGroups As Boolean
|
||||
Get
|
||||
Return m_MachGroupPanelM.IsEnabledMachGroups
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdSetCurrMachGroup As ICommand
|
||||
Private m_cmdAddMachGroup As ICommand
|
||||
Private m_cmdRemoveMachGroup As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(MachGroupPanelM As MachGroupPanelM)
|
||||
m_MachGroupPanelM = MachGroupPanelM
|
||||
AddHandler m_MachGroupPanelM.MachGroupAdded, AddressOf OnMachGroupAdded
|
||||
If Not MachGroupPanelM.IsMultiMachGroup Then SetMachGroupPanelVisibility(False)
|
||||
CreateMachGroupVMList()
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overridable Sub CreateMachGroupVMList()
|
||||
Dim all As List(Of MachGroupVM) = (From MachGroupM In m_MachGroupPanelM.GetMachGroups()
|
||||
Select New MachGroupVM(MachGroupM)).ToList()
|
||||
|
||||
For Each MachGroupvM As MachGroupVM In all
|
||||
AddHandler MachGroupvM.PropertyChanged, AddressOf OnMachGroupVMPropertyChanged
|
||||
Next
|
||||
|
||||
m_MachGroupVMList = New ObservableCollection(Of MachGroupVM)(all)
|
||||
AddHandler m_MachGroupVMList.CollectionChanged, AddressOf OnMachGroupVMListChanged
|
||||
End Sub
|
||||
|
||||
Public Overridable Function InitMachGroupList(Optional bUseDefaults As Boolean = False) As Boolean
|
||||
' Svuoto precedente lista di MachGroup
|
||||
m_MachGroupPanelM.MachGroupMList.Clear()
|
||||
' verifico se esistono già gruppi di lavorazione o se devo creare il primo
|
||||
Dim bOk As Boolean
|
||||
Dim nId = EgtGetFirstMachGroup()
|
||||
If nId <> GDB_ID.NULL Then
|
||||
bOk = EgtSetCurrMachGroup(nId)
|
||||
Else
|
||||
If bUseDefaults Then
|
||||
bOk = Not IsNothing(m_MachGroupPanelM.NewMachGroupWithDefaults())
|
||||
Else
|
||||
bOk = Not IsNothing(m_MachGroupPanelM.NewMachGroup())
|
||||
End If
|
||||
End If
|
||||
If Not bOk Then Return False
|
||||
' Sistemazioni finali
|
||||
m_MachGroupPanelM.MachGroupMList = MachGroupPanelM.LoadMachGroups()
|
||||
SelectedMachGroup = MachGroupVMList(0)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Funzione che permette di abilitare o disabilitare tutti i gruppi tranne quello selezionato più i bottni Add/Remove
|
||||
Public Function SetMachGroupState(bState As Boolean) As Boolean
|
||||
If bState Then
|
||||
For Each Group In MachGroupVMList
|
||||
Group.IsEnabled = True
|
||||
Next
|
||||
m_MachGroupPanelM.IsEnabledAddRemove = True
|
||||
NotifyPropertyChanged(NameOf(IsEnabledAddRemove))
|
||||
m_MachGroupPanelM.IsEnabledMachGroups = True
|
||||
Return True
|
||||
Else
|
||||
For Each Group In MachGroupVMList
|
||||
If Group Is SelectedMachGroup Then
|
||||
Group.IsEnabled = True
|
||||
Else
|
||||
Group.IsEnabled = False
|
||||
End If
|
||||
Next
|
||||
m_MachGroupPanelM.IsEnabledAddRemove = False
|
||||
NotifyPropertyChanged(NameOf(IsEnabledAddRemove))
|
||||
m_MachGroupPanelM.IsEnabledMachGroups = False
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function OnPreSetCurrMachGroup() As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overridable Function OnPostSetCurrMachGroup() As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "AddMachGroupCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that set the selected MachGroup as the Current one.
|
||||
''' </summary>
|
||||
Public ReadOnly Property AddMachGroupCommand As ICommand
|
||||
Get
|
||||
If m_cmdAddMachGroup Is Nothing Then
|
||||
m_cmdAddMachGroup = New Command(AddressOf AddMachGroup)
|
||||
End If
|
||||
Return m_cmdAddMachGroup
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable Sub AddMachGroup()
|
||||
Dim MachGroupM As MachGroupM = m_MachGroupPanelM.NewMachGroup()
|
||||
If IsNothing(MachGroupM) Then Return
|
||||
' lo seleziono
|
||||
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MachGroupM)
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
#End Region ' AddMachGroupCommand
|
||||
|
||||
#Region "RemoveMachGroupCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that set the selected MachGroup as the Current one.
|
||||
''' </summary>
|
||||
Public ReadOnly Property RemoveMachGroupCommand As ICommand
|
||||
Get
|
||||
If m_cmdRemoveMachGroup Is Nothing Then
|
||||
m_cmdRemoveMachGroup = New Command(AddressOf RemoveMachGroup)
|
||||
End If
|
||||
Return m_cmdRemoveMachGroup
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable Sub RemoveMachGroup()
|
||||
' Calcolo indice del gruppo da cancellare
|
||||
Dim nSelectedMachGroupIndex As Integer = MachGroupVMList.IndexOf(SelectedMachGroup)
|
||||
Dim m_MessageBoxResult As MessageBoxResult
|
||||
If MachGroupVMList.Count = 1 Then
|
||||
'chiedo conferma prima di resettare il gruppo di lavorazione
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
Select Case m_MessageBoxResult
|
||||
Case MessageBoxResult.Yes
|
||||
' cancello il gruppo corrente e ne creo uno nuovo con lo stesso nome
|
||||
m_MachGroupPanelM.OnPreRemoveCurrMachGroup()
|
||||
EgtRemoveMachGroup(MachGroupVMList(0).Id)
|
||||
MachGroupVMList.Clear()
|
||||
AddMachGroup()
|
||||
EgtZoom(ZM.ALL)
|
||||
Case MessageBoxResult.No
|
||||
Return
|
||||
End Select
|
||||
Else
|
||||
'chiedo conferma prima di cancellare il gruppo di lavorazione
|
||||
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
Select Case m_MessageBoxResult
|
||||
Case MessageBoxResult.Yes
|
||||
' cancello quello selezionato (ovvero il corrente)
|
||||
m_MachGroupPanelM.OnPreRemoveCurrMachGroup()
|
||||
EgtRemoveMachGroup(MachGroupVMList(nSelectedMachGroupIndex).Id)
|
||||
' rendo corrente il gruppo di lavorazione successivo a quello da cancellare
|
||||
If nSelectedMachGroupIndex = 0 And MachGroupVMList.Count > 1 Then
|
||||
EgtSetCurrMachGroup(MachGroupVMList(nSelectedMachGroupIndex + 1).Id)
|
||||
SelectedMachGroup = MachGroupVMList(nSelectedMachGroupIndex + 1)
|
||||
' rendo corrente il gruppo di lavorazione precedente a quello da cancellare
|
||||
ElseIf nSelectedMachGroupIndex > 0 Then
|
||||
EgtSetCurrMachGroup(MachGroupVMList(nSelectedMachGroupIndex - 1).Id)
|
||||
SelectedMachGroup = MachGroupVMList(nSelectedMachGroupIndex - 1)
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
' aggiorno la lista dei gruppi
|
||||
MachGroupVMList.RemoveAt(nSelectedMachGroupIndex)
|
||||
Case MessageBoxResult.No
|
||||
Return
|
||||
End Select
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' RemoveMachGroupCommand
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Protected Overridable Sub OnMachGroupAdded(sender As Object, e As MachGroupAddedEventArgs)
|
||||
Dim MachGroupVM As MachGroupVM = New MachGroupVM(e.NewMachGroupM)
|
||||
m_MachGroupVMList.Add(MachGroupVM)
|
||||
NotifyPropertyChanged(NameOf(MachGroupVMList))
|
||||
End Sub
|
||||
|
||||
Protected Sub OnMachGroupVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||
For Each MachGroupVM As MachGroupVM In e.NewItems
|
||||
AddHandler MachGroupVM.PropertyChanged, AddressOf OnMachGroupVMPropertyChanged
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||
For Each MachGroupVM As MachGroupVM In e.OldItems
|
||||
RemoveHandler MachGroupVM.PropertyChanged, AddressOf OnMachGroupVMPropertyChanged
|
||||
m_MachGroupPanelM.MachGroupMList.Remove(MachGroupVM.MachGroupM)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub OnMachGroupVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||
Select Case e.PropertyName
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,102 @@
|
||||
Imports System.Threading
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Windows.Threading
|
||||
|
||||
Public Module LoadingWndHelper
|
||||
|
||||
Public Enum ActiveIds As Integer
|
||||
OPENPROJ = 1
|
||||
SAVEPROJ = 2
|
||||
IMPORTBTL = 3
|
||||
GOTOPROD = 4
|
||||
OPENPROD = 5
|
||||
SAVEPROD = 6
|
||||
GOTOPROJ = 7
|
||||
EXPORTPROJECT = 8
|
||||
IMPORTPROJECT = 9
|
||||
CHANGEPARAM = 10
|
||||
CREATINGPDF = 11
|
||||
CHANGEMATERIAL = 12
|
||||
BACKUP = 13
|
||||
RESTORE = 14
|
||||
End Enum
|
||||
|
||||
Dim m_MainWindow As Windows.Window
|
||||
Public Sub SetMainWindow(MainWindow As Windows.Window)
|
||||
m_MainWindow = MainWindow
|
||||
End Sub
|
||||
|
||||
Private m_bMainWindow_IsActive As Boolean = True
|
||||
Public Sub SetMainWindowIsActive(IsActive As Boolean)
|
||||
m_bMainWindow_IsActive = IsActive
|
||||
End Sub
|
||||
|
||||
Delegate Sub CallbackLoadingDlg(ByRef CurrStep As Integer, ByRef StepText As String, ByRef nProgress As Integer, ByRef nNextProgress As Integer, ByRef MainWindow_IsActive As Boolean, ByRef bClose As Boolean)
|
||||
|
||||
Private m_thread As Thread
|
||||
Private m_LoadingWndVM As Core.LoadingWndVM
|
||||
Private m_CurrStep As Integer
|
||||
Private m_StepText As String
|
||||
Private m_nProgress As Integer
|
||||
Private m_nNextProgress As Integer
|
||||
Private m_bClose As Boolean
|
||||
Private m_bActiveId As Integer = -1
|
||||
|
||||
Public Function OpenLoadingWnd(Id As Integer, nSteps As Integer, TotText As String, FirstStepText As String, nNextProgress As Integer) As Boolean
|
||||
If m_bActiveId > 0 Then Return False
|
||||
m_bActiveId = Id
|
||||
m_LoadingWndVM = Nothing
|
||||
m_CurrStep = 1
|
||||
m_StepText = FirstStepText
|
||||
m_nProgress = 1
|
||||
m_nNextProgress = nNextProgress
|
||||
m_bClose = False
|
||||
Dim Top As Double = m_MainWindow.Top + (m_MainWindow.Height / 2) - 100
|
||||
Dim Left As Double = m_MainWindow.Left + (m_MainWindow.Width / 2) - 150
|
||||
Dim WindowStartupLocation As Windows.WindowStartupLocation = Windows.WindowStartupLocation.Manual
|
||||
If m_MainWindow.WindowState = Windows.WindowState.Maximized Then
|
||||
WindowStartupLocation = Windows.WindowStartupLocation.CenterOwner
|
||||
End If
|
||||
m_thread = New Thread(Sub()
|
||||
m_LoadingWndVM = New Core.LoadingWndVM(nSteps, TotText, AddressOf LoadingCallback)
|
||||
m_LoadingWndVM.UpdateProgress(m_CurrStep, m_StepText, m_nProgress, m_nNextProgress)
|
||||
Dim LoadingWnd As New LoadingWndV(Nothing, m_LoadingWndVM)
|
||||
' posiziono la finestra
|
||||
If WindowStartupLocation = Windows.WindowStartupLocation.CenterScreen Then
|
||||
LoadingWnd.WindowStartupLocation = Windows.WindowStartupLocation.CenterScreen
|
||||
Else
|
||||
LoadingWnd.Top = Top
|
||||
LoadingWnd.Left = Left
|
||||
End If
|
||||
LoadingWnd.Show()
|
||||
Dispatcher.Run()
|
||||
End Sub)
|
||||
m_thread.SetApartmentState(ApartmentState.STA)
|
||||
m_thread.Start()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub LoadingCallback(ByRef CurrStep As Integer, ByRef StepText As String, ByRef nProgress As Integer, ByRef nNextProgress As Integer, ByRef MainWindow_IsActive As Boolean, ByRef bClose As Boolean)
|
||||
CurrStep = m_CurrStep
|
||||
StepText = m_StepText
|
||||
nProgress = m_nProgress
|
||||
nNextProgress = m_nNextProgress
|
||||
m_bMainWindow_IsActive = MainWindow_IsActive
|
||||
bClose = m_bClose
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateLoadingWnd(Id As Integer, CurrStep As Integer, StepText As String, nProgress As Integer, nNextProgress As Integer)
|
||||
If Id <> m_bActiveId Then Return
|
||||
m_CurrStep = CurrStep
|
||||
m_StepText = StepText
|
||||
m_nProgress = nProgress
|
||||
m_nNextProgress = nNextProgress
|
||||
End Sub
|
||||
|
||||
Public Sub CloseLoadingWnd(Id As Integer)
|
||||
If Id <> m_bActiveId Then Return
|
||||
m_bClose = True
|
||||
m_bActiveId = -1
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,49 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="LoadingWndV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}"
|
||||
Height="200" Width="300"
|
||||
TitleBarHeight="0"
|
||||
ResizeMode="NoResize" WindowStyle="None"
|
||||
IsClosable="False" IsMinimizable="False"
|
||||
WindowStartupLocation="Manual" ShowInTaskbar="False">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding TotText_Msg}"
|
||||
Style="{StaticResource MessageBox_TextBlock}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding StepText_Msg}"
|
||||
Visibility="{Binding StepText_Visibility}"
|
||||
Style="{StaticResource MessageBox_TextBlock}"/>
|
||||
<Grid Grid.Row="3"
|
||||
Visibility="{Binding StepProgress_Visibility}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Style="{StaticResource EgtManageDialog_Grid}"/>
|
||||
<ProgressBar Grid.Row="1"
|
||||
Value="{Binding StepProgress_Value}"
|
||||
Style="{StaticResource NestingRunningWndV_ProgressBar}"/>
|
||||
</Grid>
|
||||
<ProgressBar Grid.Row="5"
|
||||
Value="{Binding TotProgress_Value}"
|
||||
Style="{StaticResource NestingRunningWndV_ProgressBar}"/>
|
||||
<TextBlock Grid.Row="7"
|
||||
Text="{Binding TotProgress_Msg}"
|
||||
Style="{StaticResource MessageBox_TextBlock}"/>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,36 @@
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows
|
||||
|
||||
Public Class LoadingWndV
|
||||
|
||||
Private WithEvents m_LoadingWndVM As LoadingWndVM
|
||||
|
||||
Sub New(Owner As Window, LoadingWndVM As LoadingWndVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = LoadingWndVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_LoadingWndVM = LoadingWndVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_LoadingWndVM.m_CloseWindow
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub ActivateWindow() Handles m_LoadingWndVM.m_ActivateWindow
|
||||
Me.Activate()
|
||||
End Sub
|
||||
|
||||
Private Sub Me_ContentRendered() Handles Me.ContentRendered
|
||||
m_LoadingWndVM.StartFunction()
|
||||
End Sub
|
||||
|
||||
Private Sub ToolsDbView_Closing(sender As Object, e As ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,224 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class LoadingWndVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Enum LoadingTypes As Integer
|
||||
NULL = 0
|
||||
OPEN = 1
|
||||
IMPORT = 2
|
||||
End Enum
|
||||
|
||||
Delegate Sub CallbackLoadingDlg(ByRef CurrStep As Integer, ByRef StepText As String, ByRef nProgress As Integer, ByRef nNextProgress As Integer, ByRef MainWindow_IsActive As Boolean, ByRef bClose As Boolean)
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
Friend Event m_ActivateWindow()
|
||||
|
||||
Private m_CallbackLoading As CallbackLoadingDlg
|
||||
Private m_Waiting_Timer As New DispatcherTimer
|
||||
|
||||
' numero di passaggi di caricamento
|
||||
Private m_nSteps As Integer
|
||||
' titolo testo di caricamento
|
||||
Private m_TotText As String
|
||||
' numero passaggio corrente
|
||||
Private m_CurrStep As Integer
|
||||
' testo del passaggio corrente
|
||||
Private m_StepText As String
|
||||
' indice d'inizio di questo passaggio
|
||||
Private m_nStartProgress As Integer
|
||||
' indice d'inizio del prossimo passaggio
|
||||
Private m_nNextProgress As Integer
|
||||
' variabile che indica richiesta chiusura della finestra
|
||||
Private m_bClosing As Boolean = False
|
||||
Private m_bMainWindow_IsActive As Boolean = True
|
||||
|
||||
Private m_StepProgress_Value As Double = 0
|
||||
Public Property StepProgress_Value As Double
|
||||
Get
|
||||
Return m_StepProgress_Value
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_StepProgress_Value = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_TotProgress_Value As Double = 0
|
||||
Public Property TotProgress_Value As Double
|
||||
Get
|
||||
Return Math.Floor(m_TotProgress_Value)
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_TotProgress_Value = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_StepText_Visibility As Visibility
|
||||
Public ReadOnly Property StepText_Visibility As Visibility
|
||||
Get
|
||||
Return m_StepText_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_StepProgress_Visibility As Visibility
|
||||
Public ReadOnly Property StepProgress_Visibility As Visibility
|
||||
Get
|
||||
Return m_StepProgress_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property TotText_Msg As String
|
||||
Get
|
||||
Return If(m_nSteps > 0, m_TotText & " (" & m_CurrStep & "/" & m_nSteps & ")", m_TotText)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property StepText_Msg As String
|
||||
Get
|
||||
Return m_StepText
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TotProgress_Msg As String
|
||||
Get
|
||||
Return m_TotProgress_Value.ToString("0.#") & "%"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdCancel As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
Sub New(Steps As Integer, TotText As String, callback As CallbackLoadingDlg)
|
||||
m_nSteps = Steps
|
||||
m_TotText = TotText
|
||||
m_CallbackLoading = callback
|
||||
m_bClosing = False
|
||||
If Steps = 1 Then
|
||||
m_StepText_Visibility = Visibility.Collapsed
|
||||
m_StepProgress_Visibility = Visibility.Collapsed
|
||||
Else
|
||||
m_StepText_Visibility = Visibility.Visible
|
||||
m_StepProgress_Visibility = Visibility.Visible
|
||||
End If
|
||||
' imposto contatore
|
||||
m_Waiting_Timer.Interval = TimeSpan.FromMilliseconds(200)
|
||||
AddHandler m_Waiting_Timer.Tick, AddressOf WaitingTimer_Tick
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateProgress(CurrStep As Integer, StepText As String, nStartProgress As Integer, nNextProgress As Integer)
|
||||
m_CurrStep = CurrStep
|
||||
m_StepText = StepText
|
||||
m_StepProgress_Value = nStartProgress
|
||||
m_nNextProgress = nNextProgress
|
||||
NotifyPropertyChanged(NameOf(StepText_Msg))
|
||||
NotifyPropertyChanged(NameOf(TotText_Msg))
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub StartFunction()
|
||||
m_Waiting_Timer.Start()
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub WaitingTimer_Tick()
|
||||
' leggo eventuali nuovi valori
|
||||
Dim CurrStep As Integer = 0
|
||||
Dim StepText As String = ""
|
||||
Dim nStartProgress As Integer = 0
|
||||
Dim nNextProgress As Integer = 0
|
||||
Dim bMainWindow_IsActive As Boolean = True
|
||||
Dim bClose As Boolean = False
|
||||
m_CallbackLoading(CurrStep, StepText, nStartProgress, nNextProgress, bMainWindow_IsActive, bClose)
|
||||
If bMainWindow_IsActive <> m_bMainWindow_IsActive Then
|
||||
RaiseEvent m_ActivateWindow()
|
||||
End If
|
||||
If m_bClosing Then
|
||||
Close()
|
||||
Dispatcher.CurrentDispatcher.InvokeShutdown()
|
||||
Return
|
||||
ElseIf bClose Then
|
||||
m_bClosing = True
|
||||
' mostro completamento caricamento
|
||||
m_CurrStep = m_nSteps
|
||||
m_StepProgress_Value = 100
|
||||
m_TotProgress_Value = 100
|
||||
m_Waiting_Timer.Interval = TimeSpan.FromMilliseconds(1000)
|
||||
Else
|
||||
If m_CurrStep <> CurrStep Then
|
||||
If m_StepProgress_Value < 100 Then
|
||||
m_StepProgress_Value = 100
|
||||
ElseIf m_StepProgress_Value = 100 Then
|
||||
m_StepProgress_Value = 0
|
||||
m_CurrStep = CurrStep
|
||||
m_StepText = StepText
|
||||
m_nStartProgress = nStartProgress
|
||||
m_nNextProgress = nNextProgress
|
||||
End If
|
||||
Else
|
||||
' incremento Step corrente
|
||||
If m_StepProgress_Value < 80 Then
|
||||
m_StepProgress_Value += 1
|
||||
ElseIf m_StepProgress_Value < 90 Then
|
||||
m_StepProgress_Value += 0.4
|
||||
ElseIf m_StepProgress_Value < 98 Then
|
||||
m_StepProgress_Value += 0.1
|
||||
Else
|
||||
m_StepProgress_Value += 0.01
|
||||
End If
|
||||
End If
|
||||
' calcolo totale
|
||||
Dim dStepStart As Double = If(m_CurrStep > 1, m_nStartProgress, 0)
|
||||
Dim dStepEnd As Double = m_nNextProgress
|
||||
m_TotProgress_Value = dStepStart + ((dStepEnd - dStepStart) / 100 * m_StepProgress_Value)
|
||||
End If
|
||||
' aggiorno grafica
|
||||
NotifyPropertyChanged(NameOf(StepText_Msg))
|
||||
NotifyPropertyChanged(NameOf(TotText_Msg))
|
||||
NotifyPropertyChanged(NameOf(StepProgress_Value))
|
||||
NotifyPropertyChanged(NameOf(TotProgress_Value))
|
||||
NotifyPropertyChanged(NameOf(TotProgress_Msg))
|
||||
End Sub
|
||||
|
||||
Public Sub Close()
|
||||
' fermo timer
|
||||
m_Waiting_Timer.Stop()
|
||||
' chiudo finestra
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Cancel"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Open.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Cancel_Command As ICommand
|
||||
Get
|
||||
If m_cmdCancel Is Nothing Then
|
||||
m_cmdCancel = New Command(AddressOf Cancel)
|
||||
End If
|
||||
Return m_cmdCancel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub Cancel()
|
||||
End Sub
|
||||
|
||||
#End Region ' Cancel
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,545 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyMachGroupM
|
||||
Inherits MachGroupM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
#Region "General"
|
||||
|
||||
Public Event PartAdded As EventHandler(Of PartAddedEventArgs)
|
||||
Public Event PartRemoved As EventHandler(Of PartAddedEventArgs)
|
||||
|
||||
Protected m_nType As BWType
|
||||
Public ReadOnly Property nType As BWType
|
||||
Get
|
||||
Return m_nType
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dL As Double
|
||||
Public Property dL As Double
|
||||
Get
|
||||
Return m_dL
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dW As Double
|
||||
Public Property dW As Double
|
||||
Get
|
||||
Return m_dW
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dW = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dH As Double
|
||||
Public Property dH As Double
|
||||
Get
|
||||
Return m_dH
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dH = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dtStartTime As DateTime
|
||||
Public Property dtStartTime As DateTime
|
||||
Get
|
||||
Return m_dtStartTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_dtStartTime = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dtEndTime As DateTime
|
||||
Public Property dtEndTime As DateTime
|
||||
Get
|
||||
Return m_dtEndTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_dtEndTime = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dMatForPart As Double = 0
|
||||
Public ReadOnly Property dMatForPart As Double
|
||||
Get
|
||||
Return m_dMatForPart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_nProdIndex As Integer = 0
|
||||
Public Property nProdIndex As Integer
|
||||
Get
|
||||
Return m_nProdIndex
|
||||
End Get
|
||||
Set
|
||||
m_nProdIndex = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub SetMatForPart(dMatForPart As Double)
|
||||
m_dMatForPart = dMatForPart
|
||||
End Sub
|
||||
|
||||
Protected m_dTotMat As Double = 0
|
||||
Public ReadOnly Property dTotMat As Double
|
||||
Get
|
||||
Return m_dTotMat
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetTotMat(TotMat As Double)
|
||||
m_dTotMat = TotMat
|
||||
End Sub
|
||||
|
||||
Protected m_sMATERIAL As String
|
||||
Public Property sMATERIAL As String
|
||||
Get
|
||||
Return m_sMATERIAL
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMATERIAL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' lista dei pezzi che sono nel grezzo
|
||||
Protected m_PartMList As New List(Of PartM)
|
||||
Public Property PartMList As List(Of PartM)
|
||||
Get
|
||||
Return m_PartMList
|
||||
End Get
|
||||
Set(value As List(Of PartM))
|
||||
m_PartMList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' General
|
||||
|
||||
#Region "Beam"
|
||||
|
||||
Protected m_dStartCut As Double
|
||||
Public Property dStartCut As Double
|
||||
Get
|
||||
Return m_dStartCut
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dStartCut = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Beam
|
||||
|
||||
#Region "Wall"
|
||||
|
||||
Protected m_nRawPartId As Integer = GDB_ID.NULL
|
||||
Public ReadOnly Property nRawPartId As Integer
|
||||
Get
|
||||
Return m_nRawPartId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dPosZ As Double = 0
|
||||
Public Property dPosZ As Double
|
||||
Get
|
||||
Return m_dPosZ
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dPosZ = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Wall
|
||||
|
||||
#Region "Calc"
|
||||
|
||||
Private m_nCALC_ERR As Integer
|
||||
Public Property nCALC_ERR As Integer
|
||||
Get
|
||||
Return m_nCALC_ERR
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_ERR = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nCALC_FALL As Integer
|
||||
Public Property nCALC_FALL As Integer
|
||||
Get
|
||||
Return m_nCALC_FALL
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_FALL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sCALC_MSG As String
|
||||
Public Property sCALC_MSG As String
|
||||
Get
|
||||
Return MessageFromLuaMsg(m_sCALC_MSG)
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sCALC_MSG = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_nCALC_ROT As Integer
|
||||
Public Property nCALC_ROT As Integer
|
||||
Get
|
||||
Return m_nCALC_ROT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_ROT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_nCALC_TIME As Integer
|
||||
Public Property nCALC_TIME As Integer
|
||||
Get
|
||||
Return m_nCALC_TIME
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_TIME = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_nCALC_GlobalState As CalcStates = CalcStates.NOTCALCULATED
|
||||
Public Property nCALC_GlobalState As CalcStates
|
||||
Get
|
||||
Return m_nCALC_GlobalState
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
m_nCALC_GlobalState = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bCALC_PartsGlobalState As CalcStates
|
||||
Public Property bCALC_PartsGlobalState As CalcStates
|
||||
Get
|
||||
Return m_bCALC_PartsGlobalState
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
m_bCALC_PartsGlobalState = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nCALC_GlobalERR As Integer
|
||||
Public Property nCALC_GlobalERR As Integer
|
||||
Get
|
||||
Return m_nCALC_GlobalERR
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_GlobalERR = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_nCALC_State As CalcStates = CalcStates.NOTCALCULATED
|
||||
Public Property nCALC_State As CalcStates
|
||||
Get
|
||||
Return m_nCALC_State
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
m_nCALC_State = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Calc
|
||||
|
||||
#Region "Supervisor"
|
||||
|
||||
Protected m_sSupervisorId As String
|
||||
Public Property sSupervisorId As String
|
||||
Get
|
||||
Return m_sSupervisorId
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sSupervisorId = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nPriorityIndex As Integer
|
||||
Public Property nPriorityIndex As Integer
|
||||
Get
|
||||
Return m_nPriorityIndex
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPriorityIndex = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nProductionState As ItemState = ItemState.ND
|
||||
Public ReadOnly Property nProductionState As ItemState
|
||||
Get
|
||||
Return m_nProductionState
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetProductionState(nState As ItemState)
|
||||
m_nProductionState = nState
|
||||
End Sub
|
||||
|
||||
#End Region ' Supervisor
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Protected Sub New()
|
||||
End Sub
|
||||
|
||||
Public Overloads Shared Function CreateNewMachGroup() As MyMachGroupM
|
||||
Return New MyMachGroupM
|
||||
End Function
|
||||
|
||||
Public Overloads Shared Function CreateMyMachGroup(Type As BWType, nId As Integer, sName As String, sMachine As String) As MachGroupM
|
||||
Dim NewMachGroupM As New MyMachGroupM With {
|
||||
.m_Id = nId,
|
||||
.m_Name = sName,
|
||||
.m_Machine = sMachine,
|
||||
.m_nType = Type
|
||||
}
|
||||
If NewMachGroupM.m_nType = MachineType.BEAM Then
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_BARLEN, NewMachGroupM.m_dL)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_BARHEIGHT, NewMachGroupM.m_dH)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_BARWIDTH, NewMachGroupM.m_dW)
|
||||
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
|
||||
For Each Part In NewMachGroupM.m_PartMList
|
||||
Part.UpdateOffset()
|
||||
NewMachGroupM.m_dTotMat += Part.dL + Part.dOffset
|
||||
NewMachGroupM.m_dMatForPart += Part.dL
|
||||
Next
|
||||
Else
|
||||
NewMachGroupM.m_nRawPartId = EgtGetFirstRawPart()
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELPOSZ, NewMachGroupM.m_dPosZ)
|
||||
NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW * NewMachGroupM.m_dH
|
||||
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
|
||||
For Each Part In NewMachGroupM.m_PartMList
|
||||
NewMachGroupM.m_dMatForPart += Part.dVolume
|
||||
Next
|
||||
End If
|
||||
ReadMachGroupData(NewMachGroupM)
|
||||
Return NewMachGroupM
|
||||
End Function
|
||||
|
||||
Public Overloads Shared Function CreateMyMachGroup(Type As BWType, sName As String, sMachine As String) As MachGroupM
|
||||
Dim NewMachGroupM As New MyMachGroupM With {
|
||||
.m_Id = EgtAddMachGroup(sName, sMachine)
|
||||
}
|
||||
If NewMachGroupM.m_Id = GDB_ID.NULL Then Return Nothing
|
||||
NewMachGroupM.m_Name = sName
|
||||
NewMachGroupM.m_Machine = sMachine
|
||||
NewMachGroupM.m_nType = Type
|
||||
If NewMachGroupM.m_nType = MachineType.BEAM Then
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_BARLEN, NewMachGroupM.m_dL)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_BARHEIGHT, NewMachGroupM.m_dH)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_BARWIDTH, NewMachGroupM.m_dW)
|
||||
NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL
|
||||
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
|
||||
For Each Part In NewMachGroupM.m_PartMList
|
||||
Part.UpdateOffset()
|
||||
NewMachGroupM.m_dMatForPart += Part.dL + Part.dOffset
|
||||
Next
|
||||
Else
|
||||
NewMachGroupM.m_nRawPartId = EgtGetFirstRawPart()
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELPOSZ, NewMachGroupM.m_dPosZ)
|
||||
NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW
|
||||
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
|
||||
For Each Part In NewMachGroupM.m_PartMList
|
||||
NewMachGroupM.m_dMatForPart += Part.dVolume
|
||||
Next
|
||||
End If
|
||||
ReadMachGroupData(NewMachGroupM)
|
||||
Return NewMachGroupM
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
#Region "Machgroup"
|
||||
|
||||
Public Shared Sub ReadMachGroupData(NewMachgroup As MyMachGroupM)
|
||||
' leggo materiale
|
||||
EgtGetInfo(NewMachgroup.Id, MGR_RPT_MATERIAL, NewMachgroup.sMATERIAL)
|
||||
' leggo calc error
|
||||
Dim nErr As Integer = 0
|
||||
Dim nRot As Integer = 0
|
||||
Dim nFall As Integer = 0
|
||||
Dim sMsg As String = ""
|
||||
Dim bCalc As Boolean = False
|
||||
bCalc = EgtGetInfo(NewMachgroup.Id, ITG_PROD_ERR, nErr)
|
||||
EgtGetInfo(NewMachgroup.Id, ITG_PROD_ROT, nRot)
|
||||
EgtGetInfo(NewMachgroup.Id, ITG_PROD_FALL, nFall)
|
||||
EgtGetInfo(NewMachgroup.Id, ITG_PROD_MSG, sMsg)
|
||||
If Not bCalc Then
|
||||
NewMachgroup.m_nCALC_State = CalcStates.NOTCALCULATED
|
||||
NewMachgroup.m_nCALC_ERR = 0
|
||||
NewMachgroup.m_nCALC_ROT = 0
|
||||
NewMachgroup.m_nCALC_FALL = 0
|
||||
NewMachgroup.m_sCALC_MSG = ""
|
||||
Else
|
||||
NewMachgroup.m_nCALC_ERR = nErr
|
||||
NewMachgroup.m_nCALC_ROT = nRot
|
||||
NewMachgroup.m_nCALC_FALL = nFall
|
||||
NewMachgroup.m_sCALC_MSG = sMsg
|
||||
Select Case nErr
|
||||
Case 0
|
||||
NewMachgroup.nCALC_State = CalcStates.OK
|
||||
Case 22
|
||||
NewMachgroup.nCALC_State = CalcStates.COLLISION
|
||||
Case 17, 19
|
||||
NewMachgroup.nCALC_State = CalcStates.WARNING
|
||||
Case < 0
|
||||
NewMachgroup.nCALC_State = CalcStates.INFO
|
||||
Case > 0
|
||||
NewMachgroup.nCALC_State = CalcStates.ERROR_
|
||||
End Select
|
||||
End If
|
||||
EgtGetInfo(NewMachgroup.Id, ITG_PROD_TIME, NewMachgroup.m_nCALC_TIME)
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub RefreshPartList()
|
||||
If m_nType = MachineType.BEAM Then
|
||||
' leggo StartCut da posizione primo pezzo
|
||||
Dim sInfo As String = ""
|
||||
Dim sSplitInfo() As String
|
||||
Dim bFound As Boolean = False
|
||||
EgtGetInfo(Id, MGR_RPT_PART & 1, sInfo)
|
||||
If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||
sSplitInfo = sInfo.Split(","c)
|
||||
StringToDoubleAdv(sSplitInfo(1), m_dStartCut)
|
||||
Else
|
||||
m_dStartCut = 0
|
||||
End If
|
||||
' aggiorno lista pezzi
|
||||
RemoveAllParts()
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
While nRawPartId <> GDB_ID.NULL
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
If nPartId <> GDB_ID.NULL Then
|
||||
Dim NewBeam As PartM = PartM.CreatePart(BWType.BEAM, Me, nPartId, nRawPartId)
|
||||
AddPart(NewBeam)
|
||||
NewBeam.UpdateOffset()
|
||||
End If
|
||||
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||
End While
|
||||
Else
|
||||
' aggiorno lista pezzi
|
||||
RemoveAllParts()
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
If nRawPartId <> GDB_ID.NULL Then
|
||||
Me.m_nRawPartId = nRawPartId
|
||||
End If
|
||||
Dim nWallId As Integer = EgtGetFirstPartInRawPart(m_nRawPartId)
|
||||
While nWallId <> GDB_ID.NULL
|
||||
If nWallId <> GDB_ID.NULL Then
|
||||
Dim NewWall As PartM = PartM.CreatePart(BWType.WALL, Me, nWallId, m_nRawPartId)
|
||||
AddPart(NewWall)
|
||||
End If
|
||||
nWallId = EgtGetNextPartInRawPart(nWallId)
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub RefreshGroupData()
|
||||
If m_nType = MachineType.BEAM Then
|
||||
EgtGetInfo(Id, MGR_RPT_BARLEN, dL)
|
||||
EgtGetInfo(Id, MGR_RPT_BARHEIGHT, dH)
|
||||
EgtGetInfo(Id, MGR_RPT_BARWIDTH, dW)
|
||||
EgtGetInfo(Id, MGR_RPT_MATERIAL, sMATERIAL)
|
||||
Else
|
||||
EgtGetInfo(Id, MGR_RPT_PANELLEN, dL)
|
||||
EgtGetInfo(Id, MGR_RPT_PANELWIDTH, dW)
|
||||
EgtGetInfo(Id, MGR_RPT_PANELHEIGHT, dH)
|
||||
EgtGetInfo(Id, MGR_RPT_MATERIAL, sMATERIAL)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub DeleteMachGroup()
|
||||
' elimino tutte le copie
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
While nRawPartId <> GDB_ID.NULL
|
||||
EgtRemovePartFromRawPart(nBeamId)
|
||||
EgtErase(nBeamId)
|
||||
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||
nBeamId = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
End While
|
||||
' elimino MachGroup
|
||||
EgtRemoveMachGroup(Me.Id)
|
||||
End Sub
|
||||
|
||||
#End Region ' Machgroup
|
||||
|
||||
#Region "Parts"
|
||||
|
||||
Private Shared Function LoadParts(NewMachGroupM As MyMachGroupM) As List(Of PartM)
|
||||
Dim TempList As New List(Of PartM)
|
||||
If NewMachGroupM.m_nType = MachineType.BEAM Then
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
While nRawPartId <> GDB_ID.NULL
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
If nPartId <> GDB_ID.NULL Then
|
||||
Dim NewBeam As PartM = PartM.CreatePart(BWType.BEAM, NewMachGroupM, nPartId, nRawPartId)
|
||||
TempList.Add(NewBeam)
|
||||
End If
|
||||
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||
End While
|
||||
Else
|
||||
Dim nWallId As Integer = EgtGetFirstPartInRawPart(NewMachGroupM.m_nRawPartId)
|
||||
While nWallId <> GDB_ID.NULL
|
||||
If nWallId <> GDB_ID.NULL Then
|
||||
Dim NewWall As PartM = PartM.CreatePart(BWType.WALL, NewMachGroupM, nWallId, NewMachGroupM.m_nRawPartId)
|
||||
TempList.Add(NewWall)
|
||||
End If
|
||||
nWallId = EgtGetNextPartInRawPart(nWallId)
|
||||
End While
|
||||
End If
|
||||
Return TempList
|
||||
End Function
|
||||
|
||||
Public Sub AddPart(PartM As PartM)
|
||||
If IsNothing(PartM) Then Return
|
||||
If Not m_PartMList.Contains(PartM) Then
|
||||
m_PartMList.Add(PartM)
|
||||
RaiseEvent PartAdded(Me, New PartAddedEventArgs(PartM))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub RemovePart(PartM As PartM)
|
||||
If IsNothing(PartM) Then Return
|
||||
If m_PartMList.Contains(PartM) AndAlso m_PartMList.Remove(PartM) Then
|
||||
RaiseEvent PartRemoved(Me, New PartAddedEventArgs(PartM))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub RemoveAllParts()
|
||||
If IsNothing(m_PartMList) Then Return
|
||||
For PartIndex = m_PartMList.Count - 1 To 0 Step -1
|
||||
Dim PartM As PartM = m_PartMList(PartIndex)
|
||||
If m_PartMList.Remove(PartM) Then
|
||||
RaiseEvent PartRemoved(Me, New PartAddedEventArgs(PartM))
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function GetParts() As List(Of PartM)
|
||||
Return New List(Of PartM)(m_PartMList)
|
||||
End Function
|
||||
|
||||
#End Region ' Parts
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,379 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyMachGroupPanelM
|
||||
Inherits MachGroupPanelM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Shared Function CreateMyMachGroupPanel(MachineList As List(Of Machine)) As MachGroupPanelM
|
||||
' Assegno nome base
|
||||
' Recupero lista macchine
|
||||
' Assegno macchina di default
|
||||
Dim NewMyMachGroupPanelM As New MyMachGroupPanelM With {
|
||||
.m_IsMultiMachGroup = False,
|
||||
.m_BaseName = "",
|
||||
.m_MachineList = MachineList,
|
||||
.m_DefaultMachine = ""
|
||||
}
|
||||
' aggiorno copie
|
||||
UpdateAllDuplo()
|
||||
' recupero i MachGroup
|
||||
NewMyMachGroupPanelM.m_MachGroupMList = LoadMyMachGroups(MachineList)
|
||||
Return NewMyMachGroupPanelM
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Shared Function LoadMyMachGroups(MachineList As List(Of Machine)) As List(Of MachGroupM)
|
||||
Dim TempList As New List(Of MachGroupM)
|
||||
' Carico i gruppi di lavorazione nella lista
|
||||
Dim nId = EgtGetFirstMachGroup()
|
||||
While nId <> GDB_ID.NULL
|
||||
EgtSetCurrMachGroup(nId)
|
||||
Dim sName As String = String.Empty
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetMachGroupName(nId, sName)
|
||||
EgtGetMachGroupMachineName(nId, sMachine)
|
||||
' cerco la macchina tra quelle presenti
|
||||
Dim UsedMachine As MyMachine = Nothing
|
||||
Dim bOk As Boolean = Machine.SearchMachine(sMachine, MachineList, UsedMachine)
|
||||
If Not bOk OrElse UsedMachine.nType = MachineType.NULL Then
|
||||
EgtOutLog("Machine incompatible with beam & wall machining!!")
|
||||
Else
|
||||
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
Dim nPROJTYPE As Integer = BWType.NULL
|
||||
EgtGetInfo(nBTLInfoLayerId, BTL_GEN_PROJTYPE, nPROJTYPE)
|
||||
If nPROJTYPE = BWType.BEAM Or nPROJTYPE = BWType.WALL Then
|
||||
TempList.Add(MyMachGroupM.CreateMyMachGroup(nPROJTYPE, nId, sName, sMachine))
|
||||
Else
|
||||
EgtOutLog("Machine of beam & wall type, but project type not found!!")
|
||||
End If
|
||||
End If
|
||||
nId = EgtGetNextMachGroup(nId)
|
||||
End While
|
||||
EgtResetCurrMachGroup()
|
||||
Return TempList
|
||||
End Function
|
||||
|
||||
' funzione che restituisce il gruppo di lavorazione dato l'Id geometrico
|
||||
Public Shared Function LoadMyMachGroupFromId(nId As Integer, MachineList As List(Of Machine)) As MachGroupM
|
||||
If nId <= 0 Then Return Nothing
|
||||
If Not EgtSetCurrMachGroup(nId) Then Return Nothing
|
||||
Dim sName As String = String.Empty
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetMachGroupName(nId, sName)
|
||||
EgtGetMachGroupMachineName(nId, sMachine)
|
||||
' cerco la macchina tra quelle presenti
|
||||
Dim UsedMachine As MyMachine = Nothing
|
||||
Dim bOk As Boolean = Machine.SearchMachine(sMachine, MachineList, UsedMachine)
|
||||
If Not bOk OrElse UsedMachine.nType = MachineType.NULL Then
|
||||
EgtOutLog("Machine incompatible with beam & wall machining!!")
|
||||
Else
|
||||
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
Dim nPROJTYPE As Integer = BWType.NULL
|
||||
EgtGetInfo(nBTLInfoLayerId, BTL_GEN_PROJTYPE, nPROJTYPE)
|
||||
If nPROJTYPE = BWType.BEAM Or nPROJTYPE = BWType.WALL Then
|
||||
Return MyMachGroupM.CreateMyMachGroup(nPROJTYPE, nId, sName, sMachine)
|
||||
Else
|
||||
EgtOutLog("Machine of beam & wall type, but project type not found!!")
|
||||
End If
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' funzione che restituisce solo i gruppi di lavorazione creati nel nesting
|
||||
Public Shared Function UpdateFromNestingMyMachGroups(MachineList As List(Of Machine)) As List(Of MachGroupM)
|
||||
Dim TempList As New List(Of MachGroupM)
|
||||
' Carico i gruppi di lavorazione nella lista
|
||||
Dim nId = EgtGetFirstMachGroup()
|
||||
While nId <> GDB_ID.NULL
|
||||
Dim UpdateUI As Integer = 0
|
||||
If EgtGetInfo(nId, "UPDATEUI", UpdateUI) AndAlso UpdateUI = 1 Then
|
||||
TempList.Add(LoadMyMachGroupFromId(nId, MachineList))
|
||||
' rimuovo info
|
||||
EgtRemoveInfo(nId, "UPDATEUI")
|
||||
End If
|
||||
nId = EgtGetNextMachGroup(nId)
|
||||
End While
|
||||
EgtResetCurrMachGroup()
|
||||
Return TempList
|
||||
End Function
|
||||
|
||||
Public Function NewMyMachGroup(sMachName As String, nMachineType As MachineType) As MachGroupM
|
||||
' Sistemazioni preliminari
|
||||
OnPreNewMachGroup()
|
||||
' Se non ci sono macchine disponibili esco con errore
|
||||
If m_MachineList.Count <= 0 Then Return Nothing
|
||||
' Creo il nuovo gruppo di lavorazione con i dati ottenuti a seconda del caso in cui mi trovo
|
||||
Dim MachGroupM As MachGroupM
|
||||
If nMachineType = MachineType.NULL Then
|
||||
EgtOutLog("Machine incompatible with beam & wall machining!!")
|
||||
Return Nothing
|
||||
Else
|
||||
MachGroupM = MyMachGroupM.CreateMyMachGroup(nMachineType, NewMachGroupID(), sMachName)
|
||||
End If
|
||||
If IsNothing(MachGroupM) Then Return Nothing
|
||||
AddMachGroup(MachGroupM)
|
||||
' Sistemazioni finali
|
||||
m_DefaultMachine = sMachName
|
||||
OnPostNewMachGroup()
|
||||
Return MachGroupM
|
||||
End Function
|
||||
|
||||
Public Overrides Function OnPreNewMachGroup() As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' NB: Anche se ho già aggiunto il nuovo gruppo di lavorazione, non l'ho ancora reso corrente (viene fatto dopo), quindi
|
||||
' non posso usare CurrentMachine perchè è ancora impostata quella precedente!!!
|
||||
Public Overrides Function OnPostNewMachGroup() As Boolean
|
||||
' Salvo macchina del gruppo come nuovo default
|
||||
Dim sCurrMachName As String = String.Empty
|
||||
EgtGetCurrMachineName(sCurrMachName)
|
||||
WriteMainPrivateProfileString(S_MACH, K_CURRMACH, sCurrMachName)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overrides Function OnPreRemoveCurrMachGroup() As Boolean
|
||||
'EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Function NewMachGroupID() As Integer
|
||||
Dim nTemp As Integer = 0
|
||||
If Not IsNothing(MachGroupMList) AndAlso MachGroupMList.Count > 0 Then Return MachGroupMList.Select(Of Integer)(Function(x) If(Integer.TryParse(x.Name, nTemp), nTemp, 0)).Max() + 1
|
||||
Return 1
|
||||
End Function
|
||||
|
||||
' funzione che fa l'update di tutte le copie dei pezzi modificati
|
||||
Public Shared Sub UpdateAllDuplo()
|
||||
' verifico tipo di progetto
|
||||
Dim nBtlInfoId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
Dim nBWType As Integer = 0
|
||||
EgtGetInfo(nBtlInfoId, BTL_GEN_PROJTYPE, nBWType)
|
||||
' ciclo sui pezzi
|
||||
Dim bTotIsModified As Boolean = False
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim bIsModified As Boolean = False
|
||||
If EgtDuploGetModified(nPartId, bIsModified) AndAlso bIsModified Then
|
||||
UpdateDuplo(nPartId)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
If bTotIsModified Then
|
||||
Dim CurrFilePath As String = ""
|
||||
EgtGetCurrFilePath(CurrFilePath)
|
||||
EgtSaveFile(CurrFilePath, NGE.CMPTEXT)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Sub UpdateDuplo(nPartId As Integer)
|
||||
' verifico tipo di progetto
|
||||
Dim nBtlInfoId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
Dim nBWType As Integer = 0
|
||||
EgtGetInfo(nBtlInfoId, BTL_GEN_PROJTYPE, nBWType)
|
||||
' ciclo sui pezzi
|
||||
Dim bTotIsModified As Boolean = False
|
||||
Dim bIsModified As Boolean = False
|
||||
' verifico se c'é PRID sugli outline
|
||||
Dim nPRId As Integer = 1
|
||||
Dim nOutlineLayer As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
If EgtExistsInfo(nOutlineId, MGR_FTR_PRC) Then
|
||||
Dim nCurrPrId As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRID, nCurrPrId) AndAlso nCurrPrId <> GDB_ID.NULL Then
|
||||
If nCurrPrId < nPRId Then
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
|
||||
nPRId += 1
|
||||
End If
|
||||
nPRId = Math.Max(nPRId - 1, nCurrPrId) + 1
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
Continue While
|
||||
Else
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
|
||||
nPRId += 1
|
||||
End If
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
bTotIsModified = True
|
||||
Dim DuploList As New List(Of Integer)
|
||||
EgtDuploList(nPartId, DuploList)
|
||||
Dim DuploArray() As Integer
|
||||
Dim RotArray(DuploList.Count) As Integer
|
||||
Dim FlipArray(DuploList.Count) As Integer
|
||||
DuploArray = DuploList.ToArray()
|
||||
' recupero ROT (gradi) e FLIP (0/1) per non perderli
|
||||
For Duploindex = 0 To DuploArray.Length - 1
|
||||
RotArray(Duploindex) = 0
|
||||
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex))
|
||||
FlipArray(Duploindex) = 0
|
||||
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
|
||||
If FlipArray(Duploindex) <> 0 Then FlipArray(Duploindex) = 180
|
||||
If nBWType = BWType.WALL Then
|
||||
' ciclo sugli outline
|
||||
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
Dim nGlobPRId As Integer = 1
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
|
||||
If nPRId < nGlobPRId Then
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
|
||||
nPRId = nGlobPRId
|
||||
nGlobPRId += 1
|
||||
End If
|
||||
nGlobPRId = Math.Max(nGlobPRId - 1, nPRId) + 1
|
||||
Else
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
|
||||
nPRId = nGlobPRId
|
||||
nGlobPRId += 1
|
||||
End If
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' aggiornamento dei Duplo
|
||||
EgtDuploUpdate(nPartId)
|
||||
' ripristino i valori di ROT e FLIP
|
||||
For Duploindex = 0 To DuploArray.Length - 1
|
||||
' ripristino info rot e flip
|
||||
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex))
|
||||
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Sub SetDuploModified(nPartId As Integer)
|
||||
Dim nDuploCount As Integer = 0
|
||||
EgtDuploCount(nPartId, nDuploCount)
|
||||
If nDuploCount > 0 Then
|
||||
' segno modificato e aggiorno duplo
|
||||
EgtDuploSetModified(nPartId)
|
||||
UpdateDuplo(nPartId)
|
||||
' aggiorno grafica duplo
|
||||
Dim DuploIdList As New List(Of Integer)
|
||||
EgtDuploList(nPartId, DuploIdList)
|
||||
Dim DuploList As List(Of MachGroupVM) = CoreMap.refMachGroupPanelVM.MachGroupVMList.Where(Function(x) tt(x, DuploIdList)).ToList()
|
||||
For Each CurrMachGroup As MyMachGroupVM In DuploList
|
||||
CurrMachGroup.RefreshMachGroup()
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Shared Function tt(x As MachGroupVM, DuploIdList As List(Of Integer)) As Boolean
|
||||
Dim TempMyMachGroupVM As MyMachGroupVM = DirectCast(x, MyMachGroupVM)
|
||||
Return TempMyMachGroupVM.PartVMList.Any(Function(y) DuploIdList.Contains(y.nPartId))
|
||||
End Function
|
||||
|
||||
Class DuploFeature
|
||||
' Id geometrico della feature
|
||||
Friend nFeatureId As Integer
|
||||
Friend nPRC As Integer
|
||||
Friend nPRID As Integer
|
||||
End Class
|
||||
|
||||
' funzione che cancella tutti i pezzi segnati da eliminare
|
||||
Public Shared Function DeleteDuplo() As List(Of Integer)
|
||||
Dim ToRedrawMachGroupList As New List(Of Integer)
|
||||
' reset necessario per poter accedere direttamente al grezzo dalle info pezzo e al MachGroup tramite la gerarchia Db geometrico
|
||||
EgtResetCurrMachGroup()
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim bIsToDelete As Boolean = False
|
||||
If DuploGetToDelete(nPartId, bIsToDelete) AndAlso bIsToDelete Then
|
||||
' verifico se ci sono copie
|
||||
Dim nDuploCount As Integer = 0
|
||||
EgtDuploCount(nPartId, nDuploCount)
|
||||
Dim DuploList As New List(Of Integer)
|
||||
If nDuploCount > 0 AndAlso EgtDuploList(nPartId, DuploList) Then
|
||||
' cancello tutti i pezzi copia nelle barre
|
||||
For Each nDuploId In DuploList
|
||||
' recupero grezzo cui appartiene
|
||||
Dim nRawPartId As Integer = DuploGetRawPart(nDuploId)
|
||||
' recupero gruppo di lavorazione
|
||||
Dim nMachGroupId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nRawPartId)))
|
||||
|
||||
' elimino eventuali successive info pezzi di troppo
|
||||
Dim nIndex As Integer = 0
|
||||
Dim sTemp As String = ""
|
||||
While EgtGetInfo(nMachGroupId, MGR_RPT_PART & nIndex, sTemp)
|
||||
Dim PartData() As String = sTemp.Split(","c)
|
||||
If PartData(0) <> nDuploId Then
|
||||
EgtSetInfo(nMachGroupId, MGR_RPT_PART & nIndex, sTemp)
|
||||
nIndex += 1
|
||||
End If
|
||||
End While
|
||||
ToRedrawMachGroupList.Add(nMachGroupId)
|
||||
' lo setto come corrente
|
||||
EgtSetCurrMachGroup(nMachGroupId)
|
||||
' elimino pezzo copia
|
||||
EgtRemovePartFromRawPart(nDuploId)
|
||||
EgtErase(nDuploId)
|
||||
Next
|
||||
End If
|
||||
DuploResetToDelete(nPartId)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtResetCurrMachGroup()
|
||||
Return ToRedrawMachGroupList
|
||||
End Function
|
||||
|
||||
Friend Shared Function DuploGetToDelete(nSouId As Integer, ByRef bToDelete As Boolean) As Boolean
|
||||
If IsNothing(nSouId) Then Return False
|
||||
Return EgtGetInfo(nSouId, DUPLO_TODELETE, bToDelete)
|
||||
End Function
|
||||
|
||||
Public Shared Function DuploSetToDelete(nSouId As Integer) As Boolean
|
||||
If IsNothing(nSouId) Then Return False
|
||||
Return EgtSetInfo(nSouId, DUPLO_TODELETE, True)
|
||||
End Function
|
||||
|
||||
Private Shared Function DuploResetToDelete(nSouId As Integer) As Boolean
|
||||
If IsNothing(nSouId) Then Return False
|
||||
Return EgtSetInfo(nSouId, DUPLO_TODELETE, "")
|
||||
End Function
|
||||
|
||||
' funzione che restituisce il pezzo di origine di un Duplo
|
||||
' sostituisce EgtDuploGetOriginal che funziona solo all'interno del MachGroup del Duplo
|
||||
Public Shared Function DuploGetOriginal(nDuploId As Integer) As Integer
|
||||
Dim nOrigId As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nDuploId, GDB_SI_DUPSOU, nOrigId) AndAlso nOrigId > 0 Then
|
||||
Return nOrigId
|
||||
Else
|
||||
Return GDB_ID.NULL
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function DuploGetRawPart(nDuploId As Integer) As Integer
|
||||
Dim nSwapItem As Integer = GDB_ID.NULL
|
||||
Dim sSwapItem As String = String.Empty
|
||||
EgtGetInfo(nDuploId, "!LST", sSwapItem)
|
||||
Dim LSTValues() As String = sSwapItem.Split(","c)
|
||||
If Not IsNothing(LSTValues(LSTValues.Count - 1)) AndAlso Integer.TryParse(LSTValues(LSTValues.Count - 1), nSwapItem) AndAlso nSwapItem > 0 Then
|
||||
Return EgtGetParent(nSwapItem)
|
||||
End If
|
||||
Return GDB_ID.NULL
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,646 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class PartM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
#Region "General"
|
||||
|
||||
Public Event BTLFeatureAdded As EventHandler(Of BTLFeatureAddedEventArgs)
|
||||
|
||||
Protected m_nType As BWType
|
||||
Public ReadOnly Property nType As BWType
|
||||
Get
|
||||
Return m_nType
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_ParentMachGroup As MyMachGroupM
|
||||
Public ReadOnly Property ParentMachGroup As MyMachGroupM
|
||||
Get
|
||||
Return m_ParentMachGroup
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Id geometrico del pezzo
|
||||
Protected m_nPartId As Integer
|
||||
Public ReadOnly Property nPartId As Integer
|
||||
Get
|
||||
Return m_nPartId
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetPartId(nPartId As Integer)
|
||||
m_nPartId = nPartId
|
||||
End Sub
|
||||
|
||||
' Proj del pezzo
|
||||
Protected m_nProjId As Integer = 0
|
||||
Public Property nProjId As Integer
|
||||
Get
|
||||
Return m_nProjId
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nProjId = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Info del pezzo
|
||||
Protected m_nPDN As Integer
|
||||
Public ReadOnly Property nPDN As Integer
|
||||
Get
|
||||
Return m_nPDN
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sNAM As String
|
||||
Public ReadOnly Property sNAM As String
|
||||
Get
|
||||
Return m_sNAM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dBtlL As Double
|
||||
Public ReadOnly Property dBtlL As String
|
||||
Get
|
||||
Return m_dBtlL
|
||||
End Get
|
||||
End Property
|
||||
Public Property dL As Double
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsX(frBeam.VersX(), EPS_SMALL) Then
|
||||
Return m_dBtlL
|
||||
ElseIf IsX(frBeam.VersY(), EPS_SMALL) Then
|
||||
Return m_dBtlH
|
||||
Else
|
||||
Return m_dBtlW
|
||||
End If
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dBtlL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dBtlW As Double
|
||||
Public ReadOnly Property dBtlW As String
|
||||
Get
|
||||
Return m_dBtlW
|
||||
End Get
|
||||
End Property
|
||||
Public Property dW As Double
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsY(frBeam.VersX()) Then
|
||||
Return m_dBtlL
|
||||
ElseIf IsY(frBeam.VersY()) Then
|
||||
Return m_dBtlH
|
||||
Else
|
||||
Return m_dBtlW
|
||||
End If
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dBtlW = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dBtlH As Double
|
||||
Public ReadOnly Property dBtlH As String
|
||||
Get
|
||||
Return m_dBtlH
|
||||
End Get
|
||||
End Property
|
||||
Public Property dH As Double
|
||||
Get
|
||||
Dim frBeam As New Frame3d
|
||||
EgtGetGroupGlobFrame(nPartId, frBeam)
|
||||
If IsZ(frBeam.VersX()) Then
|
||||
Return m_dBtlL
|
||||
ElseIf IsZ(frBeam.VersY()) Then
|
||||
Return m_dBtlH
|
||||
Else
|
||||
Return m_dBtlW
|
||||
End If
|
||||
Return m_dBtlH
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dBtlH = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dPOSX As Double
|
||||
Public Property dPOSX As Double
|
||||
Get
|
||||
If nType = BWType.WALL Then
|
||||
' verifico che sia attivo MachGroup di questo pezzo
|
||||
If EgtGetCurrMachGroup() = ParentMachGroup.Id Then
|
||||
' recupero box pezzo
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Part)
|
||||
' recupero layer del box
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
||||
' recupero box del layer box
|
||||
Dim b3Box As New BBox3d
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
' recupero origine grezzo
|
||||
Dim nrawPartId As Integer = EgtGetRawPartFromPart(nPartId)
|
||||
Dim b3Raw As New BBox3d
|
||||
EgtGetRawPartBBox(nrawPartId, b3Raw)
|
||||
' calcolo distanza tra origine pezzo e tavolo
|
||||
Dim vtPartRef As New Vector3d(b3Box.Min() - b3Raw.Min())
|
||||
m_dPOSX = vtPartRef.x
|
||||
Return vtPartRef.x
|
||||
' altrimenti restituisco valore salvato (per quando viene clickato un BTLPart)
|
||||
Else
|
||||
Return m_dPOSX
|
||||
End If
|
||||
Else ' nType = BWType.BEAM
|
||||
Return m_dPOSX
|
||||
End If
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dPOSX = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCNT As Integer
|
||||
Public Property nCNT As Integer
|
||||
Get
|
||||
Return m_nCNT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCNT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nINVERTED As Integer
|
||||
Public ReadOnly Property nINVERTED As Integer
|
||||
Get
|
||||
Return m_nINVERTED
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetInverted(nInverted As Integer)
|
||||
m_nINVERTED = nInverted
|
||||
End Sub
|
||||
|
||||
Protected m_nROTATED As Integer
|
||||
Public ReadOnly Property nROTATED As Integer
|
||||
Get
|
||||
Return m_nROTATED
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetRotated(nRotated As Integer)
|
||||
m_nROTATED = nRotated
|
||||
End Sub
|
||||
|
||||
Protected m_sMATERIAL As String
|
||||
Public Property sMATERIAL As String
|
||||
Get
|
||||
Return m_sMATERIAL
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMATERIAL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_sSTOREY As String
|
||||
Public Property sSTOREY As String
|
||||
Get
|
||||
Return m_sSTOREY
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sSTOREY = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_sGROUP As String
|
||||
Public Property sGROUP As String
|
||||
Get
|
||||
Return m_sGROUP
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sGROUP = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nBTLPartId As Integer
|
||||
Public ReadOnly Property nBTLPartId As Integer
|
||||
Get
|
||||
Return m_nBTLPartId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' lista delle feature del pezzo
|
||||
Protected m_FeatureMList As List(Of BTLFeatureM)
|
||||
Public Property FeatureMList As List(Of BTLFeatureM)
|
||||
Get
|
||||
Return m_FeatureMList
|
||||
End Get
|
||||
Set(value As List(Of BTLFeatureM))
|
||||
m_FeatureMList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' General
|
||||
|
||||
#Region "Beam"
|
||||
|
||||
' Id del grezzo
|
||||
Protected m_nRawPartId As Integer = GDB_ID.NULL
|
||||
Public ReadOnly Property nRawPartId As Integer
|
||||
Get
|
||||
Return m_nRawPartId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dOffset As Double
|
||||
Public Property dOffset As Double
|
||||
Get
|
||||
Return m_dOffset
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dOffset = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Beam
|
||||
|
||||
#Region "Wall"
|
||||
|
||||
Protected m_dPOSY As Double
|
||||
Public Property dPOSY As Double
|
||||
Get
|
||||
' verifico che sia attivo MachGroup di questo pezzo
|
||||
If EgtGetCurrMachGroup() = ParentMachGroup.Id Then
|
||||
' recupero box pezzo
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Part)
|
||||
' recupero layer del box
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
||||
' recupero box del layer box
|
||||
Dim b3Box As New BBox3d
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
' recupero origine grezzo
|
||||
Dim nrawPartId As Integer = EgtGetRawPartFromPart(nPartId)
|
||||
Dim b3Raw As New BBox3d
|
||||
EgtGetRawPartBBox(nrawPartId, b3Raw)
|
||||
' calcolo distanza tra origine pezzo e tavolo
|
||||
Dim vtPartRef As New Vector3d(b3Box.Min() - b3Raw.Min())
|
||||
m_dPOSY = vtPartRef.y
|
||||
Return vtPartRef.y
|
||||
' altrimenti restituisco valore salvato (per quando viene clickato un BTLPart)
|
||||
Else
|
||||
Return m_dPOSY
|
||||
End If
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dPOSY = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dROT As Double
|
||||
Public Property dROT As Double
|
||||
Get
|
||||
Return m_dROT
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dROT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nFLIP As Integer
|
||||
Public Property nFLIP As Integer
|
||||
Get
|
||||
Return m_nFLIP
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nFLIP = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dVolume As Double
|
||||
Public Property dVolume As Double
|
||||
Get
|
||||
Return m_dVolume
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dVolume = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Wall
|
||||
|
||||
#Region "Calc"
|
||||
|
||||
Protected m_nCALC_GlobalState As CalcStates = CalcStates.NOTCALCULATED
|
||||
Public Property nCALC_GlobalState As CalcStates
|
||||
Get
|
||||
Return m_nCALC_GlobalState
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
m_nCALC_GlobalState = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nCALC_GlobalERR As Integer
|
||||
Public Property nCALC_GlobalERR As Integer
|
||||
Get
|
||||
Return m_nCALC_GlobalERR
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_GlobalERR = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_State As CalcStates = CalcStates.NOTCALCULATED
|
||||
Public Property nCALC_State As CalcStates
|
||||
Get
|
||||
Return m_nCALC_State
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
m_nCALC_State = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_ERR As Integer
|
||||
Public Property nCALC_ERR As Integer
|
||||
Get
|
||||
Return m_nCALC_ERR
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_ERR = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sCALC_MSG As String = String.Empty
|
||||
Public Property sCALC_MSG As String
|
||||
Get
|
||||
Return MessageFromLuaMsg(m_sCALC_MSG)
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sCALC_MSG = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_ROT As Integer
|
||||
Public Property nCALC_ROT As Integer
|
||||
Get
|
||||
Return m_nCALC_ROT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_ROT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_FALL As Integer
|
||||
Public Property nCALC_FALL As Integer
|
||||
Get
|
||||
Return m_nCALC_FALL
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_FALL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_TIME As Integer
|
||||
Public Property nCALC_TIME As Integer
|
||||
Get
|
||||
Return m_nCALC_TIME
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_TIME = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Calc
|
||||
|
||||
#Region "Supervisor"
|
||||
|
||||
Protected m_nProductionState As ItemState = ItemState.ND
|
||||
Public ReadOnly Property nProductionState As ItemState
|
||||
Get
|
||||
Return m_nProductionState
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetProductionState(nState As CalcStates)
|
||||
m_nProductionState = nState
|
||||
End Sub
|
||||
|
||||
Protected m_dtStartTime As DateTime
|
||||
Public Property dtStartTime As DateTime
|
||||
Get
|
||||
Return m_dtStartTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_dtStartTime = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dtEndTime As DateTime
|
||||
Public Property dtEndTime As DateTime
|
||||
Get
|
||||
Return m_dtEndTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_dtEndTime = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Supervisor
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(nParentMachGroup As MyMachGroupM, nPartId As Integer)
|
||||
m_ParentMachGroup = nParentMachGroup
|
||||
SetPartId(nPartId)
|
||||
' imposto BtlPart da cui deriva questo Duplo
|
||||
m_nBTLPartId = MyMachGroupPanelM.DuploGetOriginal(nPartId)
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreatePart(Type As BWType, nParentMachGroup As MyMachGroupM, nPartId As Integer, nRawPartId As Integer) As PartM
|
||||
Dim NewPartM As New PartM(nParentMachGroup, nPartId) With {
|
||||
.m_nType = Type,
|
||||
.m_nRawPartId = nRawPartId
|
||||
}
|
||||
' leggo info pezzo
|
||||
EgtGetInfo(nPartId, BTL_PRT_PROJ, NewPartM.m_nProjId)
|
||||
EgtGetInfo(nPartId, BTL_PRT_PDN, NewPartM.m_nPDN)
|
||||
EgtGetInfo(nPartId, BTL_PRT_NAM, NewPartM.m_sNAM)
|
||||
EgtGetInfo(nPartId, BTL_PRT_L, NewPartM.m_dBtlL)
|
||||
EgtGetInfo(nPartId, BTL_PRT_W, NewPartM.m_dBtlW)
|
||||
EgtGetInfo(nPartId, BTL_PRT_H, NewPartM.m_dBtlH)
|
||||
EgtGetInfo(nPartId, BTL_PRT_CNT, NewPartM.m_nCNT)
|
||||
EgtGetInfo(nPartId, BTL_PRT_GROUP, NewPartM.m_sGROUP)
|
||||
EgtGetInfo(nPartId, BTL_PRT_STOREY, NewPartM.m_sSTOREY)
|
||||
EgtGetInfo(nPartId, BTL_PRT_MATERIAL, NewPartM.m_sMATERIAL)
|
||||
EgtGetInfo(nPartId, MGR_PRT_ROT, NewPartM.m_dROT)
|
||||
EgtGetInfo(nPartId, MGR_PRT_FLIP, NewPartM.m_nFLIP)
|
||||
Dim nTemp As Integer = 0
|
||||
If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, nTemp) Then
|
||||
nTemp = 0
|
||||
End If
|
||||
NewPartM.SetRotated(nTemp)
|
||||
If Not EgtGetInfo(nPartId, BTL_PRT_INVERTED, nTemp) Then
|
||||
nTemp = 0
|
||||
End If
|
||||
NewPartM.SetInverted(nTemp)
|
||||
If NewPartM.m_nType = BWType.BEAM Then
|
||||
' leggo PosX
|
||||
Dim sInfo As String = ""
|
||||
Dim Index = 1
|
||||
Dim sSplitInfo() As String = Nothing
|
||||
Dim bFound As Boolean = False
|
||||
While EgtGetInfo(NewPartM.m_ParentMachGroup.Id, MGR_RPT_PART & Index, sInfo)
|
||||
If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||
sSplitInfo = sInfo.Split(","c)
|
||||
If sSplitInfo(0) = nPartId Then
|
||||
bFound = True
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
Index += 1
|
||||
End While
|
||||
If bFound Then
|
||||
StringToDoubleAdv(sSplitInfo(1), NewPartM.m_dPOSX)
|
||||
End If
|
||||
Else
|
||||
' leggo PosX, PosY, Rot e Flip
|
||||
EgtGetInfo(nPartId, MGR_PRT_POSX, NewPartM.m_dPOSX)
|
||||
EgtGetInfo(nPartId, MGR_PRT_POSY, NewPartM.m_dPOSY)
|
||||
End If
|
||||
' leggo volume
|
||||
If Not EgtGetInfo(nPartId, BTL_PRT_VOLUME, NewPartM.dVolume) Then
|
||||
Dim nOrigId As Integer = EgtDuploGetOriginal(nPartId)
|
||||
EgtGetInfo(nOrigId, BTL_PRT_VOLUME, NewPartM.dVolume)
|
||||
End If
|
||||
' leggo feature
|
||||
NewPartM.m_FeatureMList = LoadBTLFeatures(NewPartM, nPartId)
|
||||
ReadMachGroupData(NewPartM)
|
||||
Return NewPartM
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
#Region "Part"
|
||||
|
||||
Public Shared Sub ReadMachGroupData(NewPartM As PartM)
|
||||
' leggo calc error
|
||||
Dim nErr As Integer = 0
|
||||
Dim nRot As Integer = 0
|
||||
Dim nFall As Integer = 0
|
||||
Dim sMsg As String = ""
|
||||
Dim bCalc As Boolean = False
|
||||
bCalc = EgtGetInfo(NewPartM.nPartId, ITG_PROD_ERR, nErr)
|
||||
EgtGetInfo(NewPartM.nPartId, ITG_PROD_ROT, nRot)
|
||||
EgtGetInfo(NewPartM.nPartId, ITG_PROD_FALL, nFall)
|
||||
EgtGetInfo(NewPartM.nPartId, ITG_PROD_MSG, sMsg)
|
||||
If Not bCalc Then
|
||||
NewPartM.m_nCALC_State = CalcStates.NOTCALCULATED
|
||||
NewPartM.m_nCALC_ERR = -1
|
||||
NewPartM.m_nCALC_ROT = 0
|
||||
NewPartM.m_nCALC_FALL = 0
|
||||
NewPartM.m_sCALC_MSG = ""
|
||||
Else
|
||||
NewPartM.m_nCALC_ERR = nErr
|
||||
NewPartM.m_nCALC_ROT = nRot
|
||||
NewPartM.m_nCALC_FALL = nFall
|
||||
NewPartM.m_sCALC_MSG = sMsg
|
||||
Select Case nErr
|
||||
Case 0
|
||||
NewPartM.nCALC_State = CalcStates.OK
|
||||
Case 22
|
||||
NewPartM.nCALC_State = CalcStates.COLLISION
|
||||
Case 17, 19
|
||||
NewPartM.nCALC_State = CalcStates.WARNING
|
||||
Case < 0
|
||||
NewPartM.nCALC_State = CalcStates.INFO
|
||||
Case > 0
|
||||
NewPartM.nCALC_State = CalcStates.ERROR_
|
||||
End Select
|
||||
End If
|
||||
EgtGetInfo(NewPartM.nPartId, ITG_PROD_TIME, NewPartM.m_nCALC_TIME)
|
||||
End Sub
|
||||
|
||||
Public Sub ReadVolume()
|
||||
' leggo volume
|
||||
If Not EgtGetInfo(nPartId, BTL_PRT_VOLUME, dVolume) Then
|
||||
Dim nOrigId As Integer = EgtDuploGetOriginal(nPartId)
|
||||
EgtGetInfo(nOrigId, BTL_PRT_VOLUME, dVolume)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Part
|
||||
|
||||
#Region "Beam"
|
||||
|
||||
Public Sub UpdateOffset()
|
||||
' calcolo offset
|
||||
Dim nBeamIndex As Integer = ParentMachGroup.PartMList.IndexOf(Me)
|
||||
If nBeamIndex > 0 Then
|
||||
m_dOffset = dPOSX - (ParentMachGroup.PartMList(nBeamIndex - 1).dPOSX + ParentMachGroup.PartMList(nBeamIndex - 1).dL)
|
||||
Else
|
||||
m_dOffset = dPOSX
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Beam
|
||||
|
||||
#Region "Features"
|
||||
|
||||
Public Shared Function LoadBTLFeatures(NewPartM As PartM, nPartId As Integer) As List(Of BTLFeatureM)
|
||||
Dim TempList As New List(Of BTLFeatureM)
|
||||
' Aggiungo outline
|
||||
Dim nOutLayerId As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutLayerId)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia una feature
|
||||
Dim nGRP As Integer
|
||||
If EgtGetInfo(nOutlineId, BTL_FTR_GRP, nGRP) AndAlso Not EgtExistsInfo(nOutlineId, BTL_FTR_MAINID) Then
|
||||
' creo la feature
|
||||
TempList.Add(BTLFeatureM.CreateBTLFeature(NewPartM, nOutlineId, False))
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
' Aggiungo feature
|
||||
Dim nProcessingId As Integer = EgtGetFirstNameInGroup(nPartId, PROCESSINGS)
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nProcessingId)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia una feature
|
||||
Dim nGRP As Integer
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_GRP, nGRP) AndAlso Not EgtExistsInfo(nFeatureId, BTL_FTR_MAINID) Then
|
||||
' creo la feature
|
||||
TempList.Add(BTLFeatureM.CreateBTLFeature(NewPartM, nFeatureId, False))
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
End While
|
||||
Return TempList
|
||||
End Function
|
||||
|
||||
Public Sub AddBTLFeature(BTLFeatureM As BTLFeatureM)
|
||||
If IsNothing(BTLFeatureM) Then Return
|
||||
If Not m_FeatureMList.Contains(BTLFeatureM) Then
|
||||
m_FeatureMList.Add(BTLFeatureM)
|
||||
RaiseEvent BTLFeatureAdded(Me, New BTLFeatureAddedEventArgs(BTLFeatureM))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function GetBTLFeatures() As List(Of BTLFeatureM)
|
||||
Return New List(Of BTLFeatureM)(m_FeatureMList)
|
||||
End Function
|
||||
|
||||
Public Sub RefreshBTLFeatures()
|
||||
m_FeatureMList = LoadBTLFeatures(Me, nPartId)
|
||||
End Sub
|
||||
|
||||
#End Region ' Features
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,187 @@
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public MustInherit Class MyMachGroupPanelVM
|
||||
Inherits NewMachGroupPanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public ReadOnly Property m_MyMachGroupPanelM As MyMachGroupPanelM
|
||||
Get
|
||||
Return m_MachGroupPanelM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sTotMachGroups As String
|
||||
Get
|
||||
Return m_MachGroupVMList.Count()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sTotVolume As String
|
||||
Get
|
||||
Dim dMMTotVolume As Double = m_MachGroupVMList.Sum(CType(Function(x As MyMachGroupVM) x.dUnitVolume, Func(Of MachGroupVM, Double)))
|
||||
Return If(EgtUiUnitsAreMM(), DoubleToString(dMMTotVolume / 1000000000, 3), DoubleToString(dMMTotVolume * (12 / ONEINCH), 3))
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sTotEstimatedTime As String
|
||||
Get
|
||||
Return TimeSpan.FromSeconds(m_MachGroupVMList.Sum(CType(Function(x As MyMachGroupVM) x.nCALC_TIME, Func(Of MachGroupVM, Double)))).ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dTotTime As String
|
||||
Get
|
||||
Return m_MachGroupVMList.Sum(CType(Function(x As MyMachGroupVM) If(x.nProduction_State >= ItemState.Produced AndAlso Not IsNothing(x.dtEndTime) AndAlso x.dtEndTime <> DateTime.MinValue, (x.dtEndTime - x.dtStartTime).TotalSeconds(), x.nCALC_TIME), Func(Of MachGroupVM, Double)))
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sTotTime As String
|
||||
Get
|
||||
Return TimeSpan.FromSeconds(dTotTime).ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dDoneTime As String
|
||||
Get
|
||||
Return m_MachGroupVMList.Sum(CType(Function(x As MyMachGroupVM) If(x.nProduction_State >= ItemState.Produced AndAlso Not IsNothing(x.dtEndTime) AndAlso x.dtEndTime <> DateTime.MinValue, (x.dtEndTime - x.dtStartTime).TotalSeconds(), 0), Func(Of MachGroupVM, Double)))
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sDoneTime As String
|
||||
Get
|
||||
Return TimeSpan.FromSeconds(dDoneTime).ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dRemainingTime As String
|
||||
Get
|
||||
Return m_MachGroupVMList.Sum(CType(Function(x As MyMachGroupVM) If(x.nProduction_State < ItemState.Produced, x.nCALC_TIME, 0), Func(Of MachGroupVM, Double)))
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sRemainingTime As String
|
||||
Get
|
||||
Return TimeSpan.FromSeconds(dRemainingTime).ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(MachGroupPanelM As MachGroupPanelM)
|
||||
MyBase.New(MachGroupPanelM)
|
||||
' Creo riferimento a questa classe in Map
|
||||
CoreMap.SetRefMachGroupPanelVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected MustOverride Overrides Sub CreateMachGroupVMList()
|
||||
|
||||
Public Overrides Function InitMachGroupList(Optional bUseDefaults As Boolean = False) As Boolean
|
||||
' Svuoto precedente lista di MachGroup
|
||||
MachGroupVMList.Clear()
|
||||
' aggiorno copie
|
||||
MyMachGroupPanelM.UpdateAllDuplo()
|
||||
' verifico se esistono già gruppi di lavorazione o se devo creare il primo
|
||||
Dim bOk As Boolean = False
|
||||
Dim nId = EgtGetFirstMachGroup()
|
||||
If nId <> GDB_ID.NULL Then
|
||||
bOk = EgtSetCurrMachGroup(nId)
|
||||
End If
|
||||
If Not bOk Then Return True
|
||||
' carico lista dei gruppi di lavorazione
|
||||
m_MachGroupPanelM.MachGroupMList = MyMachGroupPanelM.LoadMyMachGroups(CoreMap.refMachinePanelVM.MachineList.ToList())
|
||||
' elimino copie da cancellare
|
||||
MyMachGroupPanelM.DeleteDuplo()
|
||||
If bOk Then SelectedMachGroup = MachGroupVMList(0)
|
||||
EgtZoom(ZM.ALL)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub RedrawModifiedMachGroup(RedrawList As List(Of Integer))
|
||||
For Each nMachGroupId In RedrawList
|
||||
EgtSetCurrMachGroup(nMachGroupId)
|
||||
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
EgtRemovePartFromRawPart(EgtGetFirstPartInRawPart(nRawId))
|
||||
EgtRemoveRawPart(nRawId)
|
||||
nRawId = EgtGetFirstRawPart()
|
||||
End While
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Overrides Function OnPreSetCurrMachGroup() As Boolean
|
||||
EgtSetCurrentContext(CoreMap.refSceneHostVM.MainScene.GetCtx())
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overrides Function OnPostSetCurrMachGroup() As Boolean
|
||||
' resetto eventuale selezione pezzo
|
||||
Dim SelMachGroup As MyMachGroupVM = DirectCast(SelectedMachGroup, MyMachGroupVM)
|
||||
SelMachGroup.SelPart = Nothing
|
||||
' Imposto vista solo tavola
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
Core.ViewPanelVM.BWSetView(If(ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
EgtZoom(ZM.ALL)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' funzione che seleziona ultimo gruppo
|
||||
Public Sub SelLastMachGroup()
|
||||
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||
SelectedMachGroup = MachGroupVMList(MachGroupVMList.Count - 1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function GetLastMachGroup() As MachGroupVM
|
||||
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||
Return MachGroupVMList(MachGroupVMList.Count - 1)
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' funzione che aggiorna totale tempi a fine calcolo
|
||||
Public Sub CalcGlobalTime()
|
||||
NotifyPropertyChanged(NameOf(sTotTime))
|
||||
NotifyPropertyChanged(NameOf(sRemainingTime))
|
||||
End Sub
|
||||
|
||||
' funzione che aggiorna numero gruppi di lavorazione e volume totale
|
||||
Public Sub CalcGlobalUpdate()
|
||||
NotifyPropertyChanged(NameOf(sTotMachGroups))
|
||||
NotifyPropertyChanged(NameOf(sTotVolume))
|
||||
NotifyPropertyChanged(NameOf(sTotTime))
|
||||
NotifyPropertyChanged(NameOf(sRemainingTime))
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DuploRemoveProjCalc(nPartDuploId As Integer)
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_ERR, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_MSG, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_ROT, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_FALL, "")
|
||||
EgtSetInfo(nPartDuploId, ITG_PROJ_TIME, "")
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Protected Overrides Sub OnMachGroupVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||
Select Case e.PropertyName
|
||||
Case NameOf(sender.nProduction_State)
|
||||
NotifyPropertyChanged(NameOf(sTotTime))
|
||||
NotifyPropertyChanged(NameOf(sRemainingTime))
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,720 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public MustInherit Class MyMachGroupVM
|
||||
Inherits MachGroupVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
#Region "General"
|
||||
|
||||
Public ReadOnly Property MyMachGroupM As MyMachGroupM
|
||||
Get
|
||||
Return m_MachGroupM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nType As BWType
|
||||
Get
|
||||
Return MyMachGroupM.nType
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nName As Integer
|
||||
Get
|
||||
Dim nIntName As Integer = 0
|
||||
Integer.TryParse(MyMachGroupM.Name, nIntName)
|
||||
Return nIntName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property dL As Double
|
||||
Get
|
||||
Return MyMachGroupM.dL
|
||||
End Get
|
||||
Set(value As Double)
|
||||
MyMachGroupM.dL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property dW As Double
|
||||
Get
|
||||
Return MyMachGroupM.dW
|
||||
End Get
|
||||
Set(value As Double)
|
||||
MyMachGroupM.dW = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property dH As Double
|
||||
Get
|
||||
Return MyMachGroupM.dH
|
||||
End Get
|
||||
Set(value As Double)
|
||||
MyMachGroupM.dH = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property dtStartTime As DateTime
|
||||
Get
|
||||
Return MyMachGroupM.dtStartTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
MyMachGroupM.dtStartTime = value
|
||||
NotifyPropertyChanged(NameOf(Production_Background))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property dtEndTime As DateTime
|
||||
Get
|
||||
Return MyMachGroupM.dtEndTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
MyMachGroupM.dtEndTime = value
|
||||
NotifyPropertyChanged(NameOf(Production_Background))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dUsage As Double
|
||||
Get
|
||||
Return If(MyMachGroupM.dMatForPart > 0 AndAlso MyMachGroupM.dTotMat > 0, If(nType = BWType.WALL, MyMachGroupM.dMatForPart / MyMachGroupM.dTotMat * 100, MyMachGroupM.dMatForPart / MyMachGroupM.dL * 100), 0)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dWaste As Double
|
||||
Get
|
||||
Return If(MyMachGroupM.dMatForPart > 0 AndAlso MyMachGroupM.dTotMat > 0, If(nType = BWType.WALL, (MyMachGroupM.dTotMat - MyMachGroupM.dMatForPart) / 1000000000, MyMachGroupM.dL - MyMachGroupM.dTotMat), 0)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sUsage As String
|
||||
Get
|
||||
Return DoubleToString(dUsage, 3)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sWaste As String
|
||||
Get
|
||||
Return LenToString(dWaste, 3)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property sMATERIAL As String
|
||||
Get
|
||||
Return MyMachGroupM.sMATERIAL
|
||||
End Get
|
||||
Set(value As String)
|
||||
MyMachGroupM.sMATERIAL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sUnitTime As String
|
||||
Get
|
||||
Return TimeSpan.FromSeconds(nCALC_TIME).ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dUnitVolume As Double
|
||||
Get
|
||||
Return dL * dW * dH
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Section As SectionXMaterial
|
||||
Get
|
||||
Return New SectionXMaterial(dW, dH, dL, MyMachGroupM.sMATERIAL)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' lista dei pezzi che sono nel grezzo
|
||||
Protected m_PartVMList As New ObservableCollection(Of PartVM)
|
||||
Public Property PartVMList As ObservableCollection(Of PartVM)
|
||||
Get
|
||||
Return m_PartVMList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of PartVM))
|
||||
m_PartVMList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_SelPart As PartVM
|
||||
Public Overridable Property SelPart As PartVM
|
||||
Get
|
||||
Return m_SelPart
|
||||
End Get
|
||||
Set(value As PartVM)
|
||||
m_SelPart = value
|
||||
' seleziono pezzo
|
||||
EgtDeselectAll()
|
||||
If Not IsNothing(value) Then EgtSelectObj(SelPart.nPartId)
|
||||
EgtDraw()
|
||||
NotifyPropertyChanged(NameOf(SelPart))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' General
|
||||
|
||||
#Region "Beam"
|
||||
|
||||
Public Overridable Property sStartCut As String
|
||||
Get
|
||||
Return LenToString(MyMachGroupM.dStartCut, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLenAdv(value, MyMachGroupM.dStartCut, True)
|
||||
End Set
|
||||
End Property
|
||||
Public Property dStartCut As Double
|
||||
Get
|
||||
Return MyMachGroupM.dStartCut
|
||||
End Get
|
||||
Set(value As Double)
|
||||
MyMachGroupM.dStartCut = value
|
||||
NotifyPropertyChanged(NameOf(sStartCut))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Beam
|
||||
|
||||
#Region "Wall"
|
||||
|
||||
#End Region ' Wall
|
||||
|
||||
#Region "Calc"
|
||||
|
||||
Public ReadOnly Property nCALC_ERR As Integer
|
||||
Get
|
||||
Return MyMachGroupM.nCALC_ERR
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nCALC_FALL As Integer
|
||||
Get
|
||||
Return MyMachGroupM.nCALC_FALL
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sCALC_MSG As String
|
||||
Get
|
||||
Return MyMachGroupM.sCALC_MSG
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property nCALC_ROT As Integer
|
||||
Get
|
||||
Return MyMachGroupM.nCALC_ROT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
MyMachGroupM.nCALC_ROT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property nCALC_TIME As Integer
|
||||
Get
|
||||
Return MyMachGroupM.nCALC_TIME
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
MyMachGroupM.nCALC_TIME = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property nGlobalState As CalcStates
|
||||
Get
|
||||
Return MyMachGroupM.nCALC_GlobalState
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
MyMachGroupM.nCALC_GlobalState = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nPartsGlobalState As CalcStates
|
||||
Get
|
||||
Return MyMachGroupM.bCALC_PartsGlobalState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property nCALC_State As CalcStates
|
||||
Get
|
||||
Return MyMachGroupM.nCALC_State
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
MyMachGroupM.nCALC_State = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||
Get
|
||||
Select Case MyMachGroupM.nCALC_GlobalState
|
||||
Case CalcStates.ERROR_, CalcStates.COLLISION
|
||||
Return Brushes.Red
|
||||
Case CalcStates.WARNING
|
||||
Return Brushes.Orange
|
||||
Case CalcStates.INFO, CalcStates.OK
|
||||
Return Brushes.Green
|
||||
Case CalcStates.NOTCALCULATED
|
||||
Return Brushes.LightGray
|
||||
Case Else
|
||||
Return Brushes.Red
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||
Get
|
||||
Return If(MyMachGroupM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
||||
Get
|
||||
Return If(MyMachGroupM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_ERR_Letter As String
|
||||
Get
|
||||
Select Case MyMachGroupM.nCALC_GlobalState
|
||||
Case CalcStates.COLLISION
|
||||
Return "c"
|
||||
Case CalcStates.ERROR_
|
||||
Return "e"
|
||||
Case CalcStates.WARNING
|
||||
Return "w"
|
||||
Case CalcStates.INFO
|
||||
Return "i"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
||||
Get
|
||||
Select Case MyMachGroupM.m_nCALC_GlobalState
|
||||
Case CalcStates.ERROR_, CalcStates.COLLISION
|
||||
Return Brushes.Red
|
||||
Case CalcStates.WARNING
|
||||
Return Brushes.Orange
|
||||
Case CalcStates.INFO
|
||||
Return Brushes.Green
|
||||
Case Else
|
||||
Return Brushes.Red
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Calc
|
||||
|
||||
#Region "Supervisor"
|
||||
|
||||
Public Property nProduction_State As ItemState
|
||||
Get
|
||||
Return MyMachGroupM.nProductionState
|
||||
End Get
|
||||
Set(value As ItemState)
|
||||
MyMachGroupM.SetProductionState(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Production_Background As SolidColorBrush
|
||||
Get
|
||||
Select Case nProduction_State
|
||||
Case ItemState.ND
|
||||
Return Brushes.White
|
||||
Case ItemState.Assigned, ItemState.Confirmed
|
||||
If m_bToBeProduced Then ' barra in attesa
|
||||
If m_bCNReCalculated Then
|
||||
Return Brushes.Orange
|
||||
Else ' barra in check calc
|
||||
Return Brushes.Purple
|
||||
End If
|
||||
Else ' barra in coda
|
||||
Return Brushes.White
|
||||
End If
|
||||
Case ItemState.WIP
|
||||
Return Brushes.Green
|
||||
Case ItemState.Produced
|
||||
Return Brushes.Yellow
|
||||
Case Else ' ItemState.Scrapped
|
||||
Return Brushes.Aqua
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' indica se il pezzo deve essere tagliato
|
||||
Protected m_bToBeProduced As Boolean = False
|
||||
Public ReadOnly Property bToBeProduced As Boolean
|
||||
Get
|
||||
Return m_bToBeProduced
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' indica se il pezzo e' gia' stato ricalcolato e quindi pronto a partire
|
||||
Protected m_bCNReCalculated As Boolean = False
|
||||
Public ReadOnly Property bReadyForMachining As Boolean
|
||||
Get
|
||||
Return m_bToBeProduced AndAlso m_bCNReCalculated
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_bSendingToMachine As Boolean = False
|
||||
Public ReadOnly Property bSendingToMachine As Boolean
|
||||
Get
|
||||
Return m_bSendingToMachine
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetSendingToMachine(value As Boolean)
|
||||
m_bSendingToMachine = value
|
||||
End Sub
|
||||
|
||||
' indica se il pezzo e' stato mandato alla macchina
|
||||
Protected m_bSentToMachine As Boolean = False
|
||||
Public ReadOnly Property bSentToMachine As Boolean
|
||||
Get
|
||||
Return m_bSentToMachine
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetSentToMachine(value As Boolean)
|
||||
m_bSentToMachine = value
|
||||
m_bSendingToMachine = False
|
||||
End Sub
|
||||
|
||||
' indica se la macchina e' stata interrotta durante la lavorazione
|
||||
Protected m_bResetWhileCutting As Boolean = False
|
||||
Public ReadOnly Property bResetWhileCutting As Boolean
|
||||
Get
|
||||
Return m_bResetWhileCutting
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetResetWhileCutting(value As Boolean)
|
||||
m_bResetWhileCutting = value
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property Background As SolidColorBrush
|
||||
Get
|
||||
Select Case nProduction_State
|
||||
Case ItemState.ND
|
||||
Return Brushes.White
|
||||
Case ItemState.Assigned
|
||||
Return Brushes.LightGray
|
||||
Case ItemState.Confirmed
|
||||
Return Brushes.LightGray
|
||||
Case ItemState.WIP
|
||||
Return Brushes.Green
|
||||
Case ItemState.Produced
|
||||
Return Brushes.Yellow
|
||||
Case Else ' ItemState.Scrapped
|
||||
Return Brushes.Aqua
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable ReadOnly Property Produce_IsEnabled As Boolean
|
||||
Get
|
||||
Select Case nProduction_State
|
||||
Case ItemState.Assigned, ItemState.Confirmed
|
||||
Return Not m_bToBeProduced
|
||||
Case Else
|
||||
Return False
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_SupervisorId As String = ""
|
||||
Public ReadOnly Property SupervisorId As String
|
||||
Get
|
||||
Return m_SupervisorId
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetSupervisorId(SupervisorId As String)
|
||||
m_SupervisorId = SupervisorId
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property IsReadOnly As Boolean
|
||||
Get
|
||||
Return String.IsNullOrEmpty(m_SupervisorId)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Supervisor
|
||||
|
||||
' definizione comandi
|
||||
Private m_cmdDeleteMachGroup As ICommand
|
||||
Private m_cmdProduceMachGroup As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
Sub New(MyMachGroupM As MyMachGroupM)
|
||||
MyBase.New(MyMachGroupM)
|
||||
'aggiorno lista pezzi
|
||||
RefreshPartList()
|
||||
AddHandler MyMachGroupM.PartAdded, AddressOf OnPartAdded
|
||||
AddHandler MyMachGroupM.PartRemoved, AddressOf OnPartRemoved
|
||||
CreatePartVMList()
|
||||
' Aggiorno stato da stati feature
|
||||
CalcGlobalUpdate()
|
||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
#Region "Machgroup"
|
||||
|
||||
Public MustOverride Sub RefreshGroupData()
|
||||
|
||||
Public Sub UpdateUsage()
|
||||
If nType = BWType.BEAM Then
|
||||
MyMachGroupM.SetMatForPart(0)
|
||||
Dim dPartLength As Double
|
||||
Dim dPartOffsetLength As Double
|
||||
For Each Part In PartVMList
|
||||
dPartOffsetLength += Part.dL + Part.dOffset
|
||||
dPartLength += Part.dL
|
||||
Next
|
||||
MyMachGroupM.SetTotMat(dPartOffsetLength)
|
||||
MyMachGroupM.SetMatForPart(dPartLength)
|
||||
Else
|
||||
MyMachGroupM.SetTotMat(dL * dH * dW)
|
||||
MyMachGroupM.SetMatForPart(0)
|
||||
Dim dPartVolume As Double
|
||||
For Each Part In PartVMList
|
||||
dPartVolume += Part.dVolume
|
||||
Next
|
||||
MyMachGroupM.SetMatForPart(dPartVolume)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sUsage))
|
||||
NotifyPropertyChanged(NameOf(sWaste))
|
||||
End Sub
|
||||
|
||||
Public Overridable Function CnFilePath() As String
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
#End Region ' Machgroup
|
||||
|
||||
#Region "Calc"
|
||||
|
||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||
Public Sub CalcMachGroupUpdate(ERR As Integer, ROT As Integer, MSG As String)
|
||||
EgtSetInfo(Id, ITG_PROD_ERR, ERR, True)
|
||||
EgtSetInfo(Id, ITG_PROD_MSG, MSG, True)
|
||||
EgtSetInfo(Id, ITG_PROD_ROT, ROT, True)
|
||||
MyMachGroupM.nCALC_ERR = ERR
|
||||
MyMachGroupM.nCALC_ROT = ROT
|
||||
MyMachGroupM.sCALC_MSG = MSG
|
||||
Select Case ERR
|
||||
Case 0
|
||||
nCALC_State = CalcStates.OK
|
||||
Case 22
|
||||
nCALC_State = CalcStates.COLLISION
|
||||
Case 17, 19
|
||||
nCALC_State = CalcStates.WARNING
|
||||
Case < 0
|
||||
nCALC_State = CalcStates.INFO
|
||||
Case > 0
|
||||
nCALC_State = CalcStates.ERROR_
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
End Sub
|
||||
|
||||
Public Sub ResetCalcMachGroup()
|
||||
EgtRemoveInfo(Id, ITG_PROD_ERR)
|
||||
EgtRemoveInfo(Id, ITG_PROD_MSG)
|
||||
EgtRemoveInfo(Id, ITG_PROD_ROT)
|
||||
MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
||||
MyMachGroupM.nCALC_State = CalcStates.NOTCALCULATED
|
||||
MyMachGroupM.nCALC_GlobalERR = 0
|
||||
MyMachGroupM.nCALC_ERR = 0
|
||||
MyMachGroupM.nCALC_ROT = 0
|
||||
MyMachGroupM.nCALC_FALL = 0
|
||||
MyMachGroupM.sCALC_MSG = ""
|
||||
MyMachGroupM.nCALC_TIME = 0
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||
End Sub
|
||||
|
||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||
Public Overridable Sub CalcGlobalUpdate()
|
||||
MyMachGroupM.nCALC_GlobalERR = nCALC_ERR
|
||||
MyMachGroupM.nCALC_GlobalState = nCALC_State
|
||||
' stato globale dei pezzi
|
||||
MyMachGroupM.bCALC_PartsGlobalState = CalcStates.NOTCALCULATED
|
||||
For Each Part In MyMachGroupM.PartMList
|
||||
If Part.nCALC_GlobalState = CalcStates.NOTCALCULATED And nCALC_State < CalcStates.ERROR_ Then
|
||||
MyMachGroupM.nCALC_GlobalState = Part.nCALC_GlobalState
|
||||
MyMachGroupM.nCALC_GlobalERR = Part.nCALC_GlobalERR
|
||||
Exit For
|
||||
ElseIf Part.nCALC_GlobalState > MyMachGroupM.nCALC_GlobalState Then
|
||||
MyMachGroupM.nCALC_GlobalState = Part.nCALC_GlobalState
|
||||
MyMachGroupM.nCALC_GlobalERR = Part.nCALC_GlobalERR
|
||||
End If
|
||||
If Part.nCALC_GlobalState > MyMachGroupM.bCALC_PartsGlobalState Then
|
||||
MyMachGroupM.bCALC_PartsGlobalState = Part.nCALC_GlobalState
|
||||
End If
|
||||
If Part.nCALC_ROT <> 0 Then
|
||||
MyMachGroupM.m_nCALC_ROT = Part.nCALC_ROT
|
||||
End If
|
||||
If Part.nCALC_FALL <> 0 Then
|
||||
MyMachGroupM.nCALC_FALL = Part.nCALC_FALL
|
||||
End If
|
||||
Next
|
||||
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||
End Sub
|
||||
|
||||
Public Sub CalcTimeUpdate(TIME As Integer)
|
||||
EgtSetInfo(Id, ITG_PROD_TIME, TIME, True)
|
||||
nCALC_TIME = TIME
|
||||
NotifyPropertyChanged(NameOf(sUnitTime))
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub CALCEnd()
|
||||
End Sub
|
||||
|
||||
#End Region ' Calc
|
||||
|
||||
#Region "Supervisor"
|
||||
|
||||
Public Sub SentToSupervisor()
|
||||
MyMachGroupM.SetProductionState(ItemState.Assigned)
|
||||
NotifyPropertyChanged(NameOf(Background))
|
||||
End Sub
|
||||
|
||||
Public Sub ResetProduce()
|
||||
m_bCNReCalculated = False
|
||||
m_bToBeProduced = False
|
||||
m_bSendingToMachine = False
|
||||
m_bSentToMachine = False
|
||||
NotifyPropertyChanged(NameOf(Production_Background))
|
||||
End Sub
|
||||
|
||||
#End Region ' Supervisor
|
||||
|
||||
#Region "Parts"
|
||||
|
||||
Protected MustOverride Sub CreatePartVMList()
|
||||
|
||||
Public MustOverride Sub RefreshPartList()
|
||||
|
||||
Public Overridable Sub RefreshMachGroup()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' Parts
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "DeleteMachGroup"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property DeleteMachGroup_Command As ICommand
|
||||
Get
|
||||
If m_cmdDeleteMachGroup Is Nothing Then
|
||||
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroupCmd)
|
||||
End If
|
||||
Return m_cmdDeleteMachGroup
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub DeleteMachGroupCmd()
|
||||
DeleteMachGroup()
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub DeleteMachGroup(Optional bMultipleCommand As Boolean = False)
|
||||
' elimino tutte le copie
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
While nRawPartId <> GDB_ID.NULL
|
||||
EgtRemovePartFromRawPart(nBeamId)
|
||||
EgtErase(nBeamId)
|
||||
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||
nBeamId = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
End While
|
||||
' elimino MachGroup
|
||||
EgtRemoveMachGroup(Me.Id)
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteMachGroup
|
||||
|
||||
#Region "ProduceMachGroup"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property ProduceMachGroup_Command As ICommand
|
||||
Get
|
||||
If m_cmdProduceMachGroup Is Nothing Then
|
||||
m_cmdProduceMachGroup = New Command(AddressOf ProduceMachGroup)
|
||||
End If
|
||||
Return m_cmdProduceMachGroup
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Overridable Sub ProduceMachGroup()
|
||||
End Sub
|
||||
|
||||
#End Region ' ProduceMachGroup
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Protected MustOverride Sub OnPartAdded(sender As Object, e As PartAddedEventArgs)
|
||||
|
||||
Private Sub OnPartRemoved(sender As Object, e As PartAddedEventArgs)
|
||||
Dim PartVM As PartVM = PartVMList.FirstOrDefault(Function(x) x.PartM Is e.m_NewPart)
|
||||
If Not IsNothing(PartVM) Then PartVMList.Remove(PartVM)
|
||||
End Sub
|
||||
|
||||
Protected Sub OnPartVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||
If e.Action = NotifyCollectionChangedAction.Add Then
|
||||
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||
For Each PartVM As PartVM In e.NewItems
|
||||
AddHandler PartVM.PropertyChanged, AddressOf OnPartVMPropertyChanged
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
If e.Action = NotifyCollectionChangedAction.Remove Then
|
||||
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||
For Each PartVM As PartVM In e.OldItems
|
||||
RemoveHandler PartVM.PropertyChanged, AddressOf OnPartVMPropertyChanged
|
||||
MyMachGroupM.PartMList.Remove(PartVM.PartM)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
If e.Action = NotifyCollectionChangedAction.Move Then
|
||||
Dim ItemVM As PartVM = e.OldItems(0)
|
||||
MyMachGroupM.PartMList.RemoveAt(e.OldStartingIndex)
|
||||
MyMachGroupM.PartMList.Insert(e.NewStartingIndex, ItemVM.PartM)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub OnPartVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||
Select Case e.PropertyName
|
||||
Case NameOf(sender.sPOSX), NameOf(sender.sPOSY), NameOf(sender.bFLIP), NameOf(sender.sROT)
|
||||
' setto pezzo da ricalcolare
|
||||
ResetCalcMachGroup()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,660 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public MustInherit Class PartVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
#Region "General"
|
||||
|
||||
Protected m_PartM As PartM
|
||||
Public ReadOnly Property PartM As PartM
|
||||
Get
|
||||
Return m_PartM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_ParentMachGroupVM As MyMachGroupVM
|
||||
Public ReadOnly Property ParentMachGroupVM As MyMachGroupVM
|
||||
Get
|
||||
Return m_ParentMachGroupVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Id geometrico del pezzo
|
||||
Public ReadOnly Property nPartId As Integer
|
||||
Get
|
||||
Return m_PartM.nPartId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Proj del pezzo
|
||||
Public Property nProjId As Integer
|
||||
Get
|
||||
Return m_PartM.nProjId
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_PartM.nProjId = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Info del pezzo
|
||||
Public ReadOnly Property nPDN As Integer
|
||||
Get
|
||||
Return m_PartM.nPDN
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sNAM As String
|
||||
Get
|
||||
Return m_PartM.sNAM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sL As String
|
||||
Get
|
||||
Return LenToString(m_PartM.dL, 3)
|
||||
End Get
|
||||
End Property
|
||||
Public Property dL As Double
|
||||
Get
|
||||
Return m_PartM.dL
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_PartM.dL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sW As String
|
||||
Get
|
||||
Return LenToString(m_PartM.dW, 3)
|
||||
End Get
|
||||
End Property
|
||||
Public Property dW As Double
|
||||
Get
|
||||
Return m_PartM.dW
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_PartM.dW = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sH As String
|
||||
Get
|
||||
Return LenToString(m_PartM.dH, 3)
|
||||
End Get
|
||||
End Property
|
||||
Public Property dH As Double
|
||||
Get
|
||||
Return m_PartM.dH
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_PartM.dH = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overridable Property sPOSX As String
|
||||
Get
|
||||
Return LenToString(m_PartM.dPOSX, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLenAdv(value, m_PartM.dPOSX, True)
|
||||
End Set
|
||||
End Property
|
||||
Public Property dPOSX As Double
|
||||
Get
|
||||
Return m_PartM.dPOSX
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_PartM.dPOSX = value
|
||||
NotifyPropertyChanged(NameOf(sPOSX))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property nCNT As Integer
|
||||
Get
|
||||
Return m_PartM.nCNT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_PartM.nCNT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sINVERTED As String
|
||||
Get
|
||||
Return m_PartM.nINVERTED & "°"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nINVERTED As Integer
|
||||
Get
|
||||
Return m_PartM.nINVERTED
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sROTATED As String
|
||||
Get
|
||||
Return m_PartM.nROTATED & "°"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nROTATED As Integer
|
||||
Get
|
||||
Return m_PartM.nROTATED
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property sMATERIAL As String
|
||||
Get
|
||||
Return m_PartM.sMATERIAL
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_PartM.sMATERIAL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sSTOREY As String
|
||||
Get
|
||||
Return m_PartM.sSTOREY
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sGROUP As String
|
||||
Get
|
||||
Return m_PartM.sGROUP
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dVolume As Double
|
||||
Get
|
||||
Return m_PartM.dVolume
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' lista delle feature del pezzo
|
||||
Protected m_FeatureVMList As ObservableCollection(Of BTLFeatureVM)
|
||||
Public Property FeatureVMList As ObservableCollection(Of BTLFeatureVM)
|
||||
Get
|
||||
Return m_FeatureVMList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of BTLFeatureVM))
|
||||
m_FeatureVMList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_SelFeatureVM As BTLFeatureVM
|
||||
Public Property SelFeatureVM As BTLFeatureVM
|
||||
Get
|
||||
Return m_SelFeatureVM
|
||||
End Get
|
||||
Set(value As BTLFeatureVM)
|
||||
If Not IsNothing(m_SelFeatureVM) Then
|
||||
Dim OldSelFeatureVM As BTLFeatureVM = m_SelFeatureVM
|
||||
EgtResetMark(OldSelFeatureVM.nFeatureId)
|
||||
End If
|
||||
m_SelFeatureVM = value
|
||||
If Not IsNothing(m_SelFeatureVM) Then
|
||||
DirectCast(m_SelFeatureVM, BTLFeatureVM).SelGeomFeature()
|
||||
EgtSetMark(m_SelFeatureVM.nFeatureId)
|
||||
Else
|
||||
EgtDeselectAll()
|
||||
End If
|
||||
EgtDraw()
|
||||
NotifyPropertyChanged(NameOf(SelFeatureVM))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' General
|
||||
|
||||
#Region "Beam"
|
||||
|
||||
Public Overridable Property sOffset As String
|
||||
Get
|
||||
Return LenToString(m_PartM.dOffset, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLenAdv(value, m_PartM.dOffset, True)
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property dOffset As Double
|
||||
Get
|
||||
Return m_PartM.dOffset
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Beam
|
||||
|
||||
#Region "Wall"
|
||||
|
||||
Public Overridable Property sPOSY As String
|
||||
Get
|
||||
Return LenToString(m_PartM.dPOSY, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLenAdv(value, m_PartM.dPOSY, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dPOSY As Double
|
||||
Get
|
||||
Return m_PartM.dPOSY
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property sROT As String
|
||||
Get
|
||||
Return LenToString(m_PartM.dROT, 3) & "°"
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLenAdv(value, m_PartM.dROT, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dROT As Double
|
||||
Get
|
||||
Return m_PartM.dROT
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable Property nFLIP As Integer
|
||||
Get
|
||||
Return m_PartM.nFLIP
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_PartM.nFLIP = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Wall
|
||||
|
||||
#Region "Calc"
|
||||
|
||||
Public ReadOnly Property nGlobalState As CalcStates
|
||||
Get
|
||||
Return m_PartM.nCALC_GlobalState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property nCALC_GlobalERR As Integer
|
||||
Get
|
||||
Return m_PartM.nCALC_GlobalERR
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_PartM.nCALC_GlobalERR = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property nCALC_State As CalcStates
|
||||
Get
|
||||
Return m_PartM.nCALC_State
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
m_PartM.nCALC_State = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||
Get
|
||||
Select Case m_PartM.nCALC_GlobalState
|
||||
Case CalcStates.ERROR_, CalcStates.COLLISION
|
||||
Return Brushes.Red
|
||||
Case CalcStates.WARNING
|
||||
Return Brushes.Orange
|
||||
Case CalcStates.INFO, CalcStates.OK
|
||||
Return Brushes.Green
|
||||
Case CalcStates.NOTCALCULATED
|
||||
Return Brushes.LightGray
|
||||
Case Else
|
||||
Return Brushes.Red
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_PartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_PartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_ERR_Letter As String
|
||||
Get
|
||||
Select Case m_PartM.nCALC_GlobalState
|
||||
Case CalcStates.COLLISION
|
||||
Return "c"
|
||||
Case CalcStates.ERROR_
|
||||
Return "e"
|
||||
Case CalcStates.WARNING
|
||||
Return "w"
|
||||
Case CalcStates.INFO
|
||||
Return "i"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
||||
Get
|
||||
Select Case m_PartM.nCALC_GlobalState
|
||||
Case CalcStates.ERROR_, CalcStates.COLLISION
|
||||
Return Brushes.Red
|
||||
Case CalcStates.WARNING
|
||||
Return Brushes.Orange
|
||||
Case CalcStates.INFO
|
||||
Return Brushes.Green
|
||||
Case Else
|
||||
Return Brushes.Red
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nCALC_ERR As Integer
|
||||
Get
|
||||
Return m_PartM.nCALC_ERR
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sCALC_MSG As String
|
||||
Get
|
||||
Return m_PartM.sCALC_MSG
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property nCALC_ROT As Integer
|
||||
Get
|
||||
Return m_PartM.nCALC_ROT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_PartM.nCALC_ROT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property nCALC_FALL As Integer
|
||||
Get
|
||||
Return m_PartM.nCALC_FALL
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_PartM.nCALC_FALL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property nCALC_TIME As Integer
|
||||
Get
|
||||
Return m_PartM.nCALC_TIME
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_PartM.nCALC_TIME = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Calc
|
||||
|
||||
#Region "Supervisor"
|
||||
|
||||
Public Property nProduction_State As ItemState
|
||||
Get
|
||||
Return m_PartM.nProductionState
|
||||
End Get
|
||||
Set(value As ItemState)
|
||||
m_PartM.SetProductionState(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Production_Background As SolidColorBrush
|
||||
Get
|
||||
Select Case nProduction_State
|
||||
Case ItemState.ND
|
||||
Return Brushes.White
|
||||
Case ItemState.Assigned, ItemState.Confirmed
|
||||
Return Brushes.White
|
||||
Case ItemState.WIP
|
||||
Return Brushes.Green
|
||||
Case ItemState.Produced
|
||||
Return Brushes.Yellow
|
||||
Case Else ' ItemState.Scrapped
|
||||
Return Brushes.Aqua
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property dtStartTime As DateTime
|
||||
Get
|
||||
Return m_PartM.dtStartTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_PartM.dtStartTime = value
|
||||
NotifyPropertyChanged(NameOf(Production_Background))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property dtEndTime As DateTime
|
||||
Get
|
||||
Return m_PartM.dtEndTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_PartM.dtEndTime = value
|
||||
NotifyPropertyChanged(NameOf(Production_Background))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' variabile che indica se rifare il pezzo
|
||||
Private m_bRedo As Boolean = True
|
||||
Public Property bRedo As Boolean
|
||||
Get
|
||||
Return m_bRedo
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
For Each Feature In FeatureVMList
|
||||
Feature.bRedo = value
|
||||
Next
|
||||
m_bRedo = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Background As SolidColorBrush
|
||||
Get
|
||||
Select Case nProduction_State
|
||||
Case ItemState.ND
|
||||
Return Brushes.White
|
||||
Case ItemState.Assigned
|
||||
Return Brushes.LightGray
|
||||
Case ItemState.Confirmed
|
||||
Return Brushes.LightGray
|
||||
Case ItemState.WIP
|
||||
Return Brushes.Green
|
||||
Case ItemState.Produced
|
||||
Return Brushes.Yellow
|
||||
Case Else ' ItemState.Scrapped
|
||||
Return Brushes.Aqua
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ButtonIsEnabled As Boolean
|
||||
Get
|
||||
Return m_PartM.nProductionState < ItemState.Assigned
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Supervisor
|
||||
|
||||
' definizione comandi
|
||||
Private m_cmdDeletePart As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(PartM As PartM)
|
||||
m_PartM = PartM
|
||||
AddHandler m_PartM.BTLFeatureAdded, AddressOf OnBTLFeatureAdded
|
||||
CreateBTLFeatureVMList()
|
||||
End Sub
|
||||
|
||||
Sub New(PartM As PartM, ParentMachGroupVM As MyMachGroupVM)
|
||||
m_PartM = PartM
|
||||
m_ParentMachGroupVM = ParentMachGroupVM
|
||||
AddHandler m_PartM.BTLFeatureAdded, AddressOf OnBTLFeatureAdded
|
||||
CreateBTLFeatureVMList()
|
||||
' Aggiorno stato da stati feature
|
||||
CalcGlobalUpdate()
|
||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overridable Sub RefreshPart()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "Feature"
|
||||
|
||||
Protected MustOverride Sub CreateBTLFeatureVMList()
|
||||
|
||||
#End Region ' Feature
|
||||
|
||||
#Region "Calc"
|
||||
|
||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||
Public Sub CalcPartUpdate(ERR As Integer, ROT As Integer, MSG As String)
|
||||
EgtSetInfo(nPartId, ITG_PROD_ERR, ERR, True)
|
||||
EgtSetInfo(nPartId, ITG_PROD_MSG, MSG, True)
|
||||
EgtSetInfo(nPartId, ITG_PROD_ROT, ROT, True)
|
||||
m_PartM.nCALC_ERR = ERR
|
||||
m_PartM.nCALC_ROT = ROT
|
||||
m_PartM.sCALC_MSG = MSG
|
||||
Select Case ERR
|
||||
Case 0
|
||||
nCALC_State = CalcStates.OK
|
||||
Case 22
|
||||
nCALC_State = CalcStates.COLLISION
|
||||
Case 17, 19
|
||||
nCALC_State = CalcStates.WARNING
|
||||
Case < 0
|
||||
nCALC_State = CalcStates.INFO
|
||||
Case > 0
|
||||
nCALC_State = CalcStates.ERROR_
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
End Sub
|
||||
|
||||
Public Sub ResetCalcPart()
|
||||
EgtRemoveInfo(nPartId, ITG_PROD_ERR)
|
||||
EgtRemoveInfo(nPartId, ITG_PROD_MSG)
|
||||
EgtRemoveInfo(nPartId, ITG_PROD_ROT)
|
||||
EgtRemoveInfo(nPartId, ITG_PROD_FALL)
|
||||
m_PartM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
||||
m_PartM.nCALC_State = CalcStates.NOTCALCULATED
|
||||
m_PartM.nCALC_GlobalERR = 0
|
||||
m_PartM.nCALC_ERR = 0
|
||||
m_PartM.nCALC_ROT = 0
|
||||
m_PartM.nCALC_FALL = 0
|
||||
m_PartM.sCALC_MSG = ""
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||
ParentMachGroupVM.ResetCalcMachGroup()
|
||||
End Sub
|
||||
|
||||
Public Sub CalcFallUpdate(FALL As Integer)
|
||||
EgtSetInfo(nPartId, ITG_PROD_FALL, FALL, True)
|
||||
m_PartM.nCALC_FALL = FALL
|
||||
NotifyPropertyChanged(NameOf(nCALC_FALL))
|
||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||
End Sub
|
||||
|
||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||
Public Sub CalcGlobalUpdate()
|
||||
m_PartM.nCALC_GlobalState = nCALC_State
|
||||
For Each Feature In FeatureVMList
|
||||
If Not Feature.bDO Then
|
||||
If Feature.nState = CalcStates.COLLISION AndAlso Feature.nState > m_PartM.nCALC_GlobalState Then
|
||||
m_PartM.nCALC_GlobalState = Feature.nState
|
||||
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
||||
End If
|
||||
Continue For
|
||||
End If
|
||||
If Feature.nState > m_PartM.nCALC_GlobalState Then
|
||||
m_PartM.nCALC_GlobalState = Feature.nState
|
||||
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
||||
End If
|
||||
If Feature.nCALC_ROT <> 0 Then
|
||||
m_PartM.nCALC_ROT = Feature.nCALC_ROT
|
||||
End If
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||
End Sub
|
||||
|
||||
#End Region ' Calc
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "DeletePart"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property DeletePart_Command() As ICommand
|
||||
Get
|
||||
If m_cmdDeletePart Is Nothing Then
|
||||
m_cmdDeletePart = New Command(AddressOf DeletePart)
|
||||
End If
|
||||
Return m_cmdDeletePart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Overridable Sub DeletePart()
|
||||
End Sub
|
||||
|
||||
#End Region ' DeletePart
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Public Sub OnBTLFeatureAdded(sender As Object, e As BTLFeatureAddedEventArgs)
|
||||
Dim BTLFeatureVM As BTLFeatureVM = New BTLFeatureVM(e.NewBTLFeature)
|
||||
FeatureVMList.Add(BTLFeatureVM)
|
||||
End Sub
|
||||
|
||||
Protected Sub OnBTLFeatureVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||
For Each BTLFeatureVM As BTLFeatureVM In e.NewItems
|
||||
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||
For Each BTLFeatureVM As BTLFeatureVM In e.OldItems
|
||||
RemoveHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
||||
'm_PartM.FeatureMList.Remove(BTLFeatureVM.BTLFeatureM)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub OnBTLFeatureVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,41 @@
|
||||
<Grid x:Class="MachinePanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
IsEnabled="{Binding MachPanel_IsEnabled}">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Style="{StaticResource CalcPanel_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Macchina corrente"
|
||||
Style="{StaticResource CurrMach_TextBlock}"/>
|
||||
<!--Combobox per selezionare la macchina corrente-->
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
|
||||
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
|
||||
Style="{StaticResource CalcPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<StackPanel Grid.Column="1"
|
||||
Style="{StaticResource MachinePanel_StackPanel}">
|
||||
<Button Content="{Binding ToolDBMsg}"
|
||||
ToolTip="{Binding ToolDBToolTip}"
|
||||
Command="{Binding ToolDbCommand}"
|
||||
Style="{StaticResource GeneralConfiguration_Button}"/>
|
||||
<Button Content="{Binding SetUpMsg}"
|
||||
Command="{Binding SetUpCommand}"
|
||||
ToolTip="{Binding SetUpToolTip}"
|
||||
Style="{StaticResource GeneralConfiguration_Button}"
|
||||
Visibility="{Binding SetUp_Visibility}"/>
|
||||
<Button Content="{Binding ParameterMachineMsg}"
|
||||
ToolTip="{Binding ParameterMachineMsg}"
|
||||
Command="{Binding ParameterMachine_Command}"
|
||||
Style="{StaticResource ParameterMachine_Button}"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class MachinePanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,124 @@
|
||||
<EgtBEAMWALLCORE:OptimizerWindow x:Class="MachiningDbWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
TitleBarHeight="30"
|
||||
WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
|
||||
|
||||
<EgtBEAMWALLCORE:OptimizerWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/>
|
||||
</EgtBEAMWALLCORE:OptimizerWindow.InputBindings>
|
||||
|
||||
<EgtBEAMWALLCORE:OptimizerWindow.Resources>
|
||||
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
|
||||
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
||||
</EgtBEAMWALLCORE:OptimizerWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.75*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<UniformGrid Columns="3">
|
||||
<Button Content="{Binding NewMsg}"
|
||||
Command="{Binding NewCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
|
||||
Style="{StaticResource MachiningDB_Button}"/>
|
||||
<Button Content="{Binding SaveMsg}"
|
||||
Command="{Binding SaveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
|
||||
Style="{StaticResource MachiningDB_Button}"/>
|
||||
<Button Content="{Binding RemoveMsg}"
|
||||
Command="{Binding RemoveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
|
||||
Style="{StaticResource MachiningDB_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TreeView Grid.Row="1"
|
||||
Name="MachiningsTreeView"
|
||||
ItemsSource="{Binding Path=MachiningsList}"
|
||||
Style="{StaticResource MachiningDB_TreeView}">
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}"
|
||||
ItemsSource="{Binding Items}">
|
||||
<Grid Style="{StaticResource MachiningDB_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding PictureString}"
|
||||
Style="{StaticResource MachiningDB_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding Name}"
|
||||
Style="{StaticResource MachiningDB_TextBlock}"/>
|
||||
<Ellipse Grid.Column="2"
|
||||
Fill="{Binding FamilyColor}"
|
||||
Style="{StaticResource SetUp_Ellipse}"/>
|
||||
</Grid>
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
|
||||
<Grid Style="{StaticResource MachiningDB_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding NamePar}"
|
||||
Style="{StaticResource MachiningDB_TextBlock}"/>
|
||||
<Ellipse Grid.Column="2"
|
||||
Fill="{Binding ToolColor}"
|
||||
Style="{StaticResource SetUp_Ellipse}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
|
||||
<UniformGrid Grid.Row="2"
|
||||
Columns="3">
|
||||
<Button Content="{Binding ImportMsg}"
|
||||
Command="{Binding ImportCommand}"
|
||||
Style="{StaticResource MachiningDB_Button}"/>
|
||||
<Button Content="{Binding ExportMsg}"
|
||||
Command="{Binding ExportCommand}"
|
||||
Style="{StaticResource MachiningDB_Button}"/>
|
||||
<Button Content="{Binding ResetMsg}"
|
||||
Command="{Binding ReloadMachiningCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"
|
||||
Style="{StaticResource MachiningDB_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ContentControl Grid.Column="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Content="{Binding Path=ParamPageV}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtBEAMWALLCORE:OptimizerWindow>
|
||||
@@ -0,0 +1,29 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows.Input
|
||||
|
||||
Public Class MachiningDbWindowV
|
||||
|
||||
Private WithEvents m_MachiningDbWindowVM As MachiningDbWindowVM
|
||||
|
||||
Sub New(Owner As System.Windows.Window, MachiningDbWindowVM As MachiningDbWindowVM)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = MachiningDbWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_MachiningDbWindowVM = MachiningDbWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.OnCloseWindow
|
||||
Me.DataContext = Nothing
|
||||
Me.DialogResult = bDialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub MachiningDb_Closing(sender As Object, e As ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Windows
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
@@ -8,11 +9,15 @@ Imports System.Runtime.InteropServices
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("EgtBEAMWALL.Core")>
|
||||
#If DEBUG Then
|
||||
<Assembly: AssemblyTitle("Aedifica.Core Debug AnyCPU")>
|
||||
#Else
|
||||
<Assembly: AssemblyTitle("Aedifica.Core Release AnyCPU")>
|
||||
#End If
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("EgtBEAMWALL.Core")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("Aedifica.Core")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
@@ -20,6 +25,8 @@ Imports System.Runtime.InteropServices
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("632ea0b1-10e2-4f07-8b1b-d9371ef8392e")>
|
||||
|
||||
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
@@ -31,5 +38,5 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyVersion("3.1.5.1")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.1")>
|
||||
|
||||
+12
-11
@@ -11,6 +11,7 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
@@ -21,20 +22,20 @@ Namespace My.Resources
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
@@ -44,17 +45,17 @@ Namespace My.Resources
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
+25
-25
@@ -13,42 +13,42 @@ Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
||||
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public MustInherit Class MyMachGroup
|
||||
Inherits MachGroup
|
||||
|
||||
Protected m_nMachineType As MachineType
|
||||
Public ReadOnly Property nMachineType As MachineType
|
||||
Get
|
||||
Return m_nMachineType
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetMachineType(nMachineType As MachineType)
|
||||
m_nMachineType = nMachineType
|
||||
End Sub
|
||||
|
||||
Protected m_dL As Double
|
||||
Public Property dL As Double
|
||||
Get
|
||||
Return m_dL
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dW As Double
|
||||
Public Property dW As Double
|
||||
Get
|
||||
Return m_dW
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dW = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dH As Double
|
||||
Public Property dH As Double
|
||||
Get
|
||||
Return m_dH
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dH = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dMatForPart As Double = 0
|
||||
Protected m_dTotMat As Double = 0
|
||||
Public ReadOnly Property dUsage As Double
|
||||
Get
|
||||
Return If(m_dMatForPart > 0 AndAlso m_dTotMat > 0, m_dMatForPart / m_dTotMat * 100, 0)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dWaste As Double
|
||||
Get
|
||||
Return If(m_dMatForPart > 0 AndAlso m_dTotMat > 0, (m_dTotMat - m_dMatForPart) / m_dTotMat * 100, 0)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sUsage As String
|
||||
Get
|
||||
Return dUsage & "%"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sWaste As String
|
||||
Get
|
||||
Return dWaste & "%"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sMATERIAL As String
|
||||
Public Property sMATERIAL As String
|
||||
Get
|
||||
Return m_sMATERIAL
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMATERIAL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' lista dei pezzi che sono nel grezzo
|
||||
Private m_PartList As New ObservableCollection(Of Part)
|
||||
Public Property PartList As ObservableCollection(Of Part)
|
||||
Get
|
||||
Return m_PartList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of Part))
|
||||
m_PartList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_SelPart As Part
|
||||
Public Overridable Property SelPart As Part
|
||||
Get
|
||||
Return m_SelPart
|
||||
End Get
|
||||
Set(value As Part)
|
||||
m_SelPart = value
|
||||
' seleziono pezzo
|
||||
EgtDeselectAll()
|
||||
If Not IsNothing(value) Then EgtSelectObj(SelPart.nPartId)
|
||||
EgtDraw()
|
||||
NotifyPropertyChanged(NameOf(SelPart))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nState As CalcStates = -1
|
||||
Public ReadOnly Property nState As CalcStates
|
||||
Get
|
||||
Return m_nState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||
Get
|
||||
If m_nState = 0 Then
|
||||
Return Brushes.Green
|
||||
ElseIf m_nState < 0 Then
|
||||
Return Brushes.LightGray
|
||||
ElseIf m_nState > 0 Then
|
||||
Return Brushes.Red
|
||||
Else
|
||||
Return Brushes.Red
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, sName As String, sMachine As String)
|
||||
MyBase.New(nId, sName, sMachine)
|
||||
'aggiorno lista pezzi
|
||||
RefreshPartList()
|
||||
End Sub
|
||||
|
||||
Public MustOverride Sub RefreshPartList()
|
||||
|
||||
Public MustOverride Sub RefreshGroupData()
|
||||
|
||||
Public Overridable Sub DeleteMachGroup()
|
||||
' elimino tutte le copie
|
||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
While nRawPartId <> GDB_ID.NULL
|
||||
EgtRemovePartFromRawPart(nBeamId)
|
||||
EgtErase(nBeamId)
|
||||
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||
nBeamId = EgtGetFirstPartInRawPart(nRawPartId)
|
||||
End While
|
||||
' elimino MachGroup
|
||||
EgtRemoveMachGroup(Me.Id)
|
||||
End Sub
|
||||
|
||||
Public Sub CalcMachGroupUpdate()
|
||||
m_nState = CalcStates.OK
|
||||
For Each Part In PartList
|
||||
If Part.nGlobalState > 0 AndAlso m_nState = CalcStates.OK Then
|
||||
m_nState = CalcStates.ERROR_
|
||||
End If
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,244 @@
|
||||
<EgtBEAMWALLCORE:OptimizerWindow x:Class="NewOpenProjectFileDialogV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
Title="{Binding Title}"
|
||||
ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
||||
WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
MinHeight="500" MinWidth="500"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
|
||||
|
||||
<EgtBEAMWALLCORE:OptimizerWindow.Resources>
|
||||
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
|
||||
</EgtBEAMWALLCORE:OptimizerWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="{Binding Filters_Msg}"
|
||||
Visibility="{Binding Filters_Visibility}"
|
||||
Style="{StaticResource NewOpenProjectFile_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox ItemsSource="{Binding BTLDateTypeList}"
|
||||
SelectedIndex="{Binding SelBTLDateType}"
|
||||
Style="{StaticResource BTLDateTypeList_ComboBox}"/>
|
||||
<StackPanel Grid.Column="1"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<ComboBox ItemsSource="{Binding DayTypeList}"
|
||||
SelectedIndex="{Binding SelDayType}"
|
||||
Style="{StaticResource DayTypeList_ComboBox}"/>
|
||||
<StackPanel Visibility="{Binding Date_Visibility}"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<TextBlock Text="{Binding From_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
<DatePicker SelectedDate="{Binding dtStartDate}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
<TextBlock Text="{Binding To_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
<DatePicker SelectedDate="{Binding dtEndDate}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<CheckBox Grid.Column="2"
|
||||
IsChecked="{Binding bViewArchived}"
|
||||
Content="{Binding ViewArchived_Msg}"
|
||||
Style="{StaticResource PParameters_CheckBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox ItemsSource="{Binding FilterTypeList}"
|
||||
SelectedItem="{Binding SelFilterType}"
|
||||
Style="{StaticResource NewOpenProjectFile_ComboBox}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SearchText}"
|
||||
Visibility="{Binding SearchText_Visibility}"
|
||||
Style="{StaticResource NewSearchText_TextBox}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<TextBlock Text="{Binding Rows_Msg}"
|
||||
Style="{StaticResource Option_TextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
SelectedIndex="{Binding SelRowQuantity}"
|
||||
Style="{StaticResource OpenProjectFileDialog_ComboBox}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<Border Grid.Row="1"
|
||||
Style="{StaticResource NewOpenProjectFileDialog_Border}"/>
|
||||
|
||||
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
|
||||
x:Name="MainDataGrid"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
SelectionMode="Single"
|
||||
Margin="5"
|
||||
ColumnLayouts="{Binding ProdColumns}"
|
||||
RowDetailsVisibilityMode="Visible"
|
||||
CellEditEnding="MainDataGrid_CellEditEnding"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
Style="{StaticResource Optimizer_DataGrid}"
|
||||
CellStyle="{StaticResource CellDataGrid_NewOpenProject}">
|
||||
<DataGrid.Resources>
|
||||
<!-- ProdId -->
|
||||
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Name-->
|
||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
||||
<DataGridTextColumn.Header>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/>
|
||||
<ToggleButton Grid.Column="1"
|
||||
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource Small_ToggleButton}">
|
||||
<Image Source="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource Lock_Image}"/>
|
||||
</ToggleButton>
|
||||
</Grid>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Creation date -->
|
||||
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.CreateDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Machine -->
|
||||
<DataGridTextColumn x:Key="colMACHINE" Binding="{Binding sMachine}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.Machine_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Archived -->
|
||||
<DataGridTemplateColumn x:Key="colARCHIVED">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{StaticResource Archived_Image}"
|
||||
Visibility="{Binding Archived_Visibility}"
|
||||
Style="{StaticResource Archived_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.Archived_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTemplateColumn.Header>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="FontWeight" Value="DemiBold"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ProjectList_MouseDoubleClick"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.RowDetailsTemplate>
|
||||
<DataTemplate>
|
||||
<ItemsControl ItemsSource="{Binding ProjFileList}" HorizontalAlignment="Left" Margin="50,-1,0,0"
|
||||
Style="{StaticResource ProjFileList_ItemsControl}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Style="{StaticResource ProjFileList_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{Binding Path=DataContext.ProdColumns[0].ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.ColumnSpan="2"
|
||||
Style="{StaticResource Gray_Grid}"/>
|
||||
<Grid Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Style="{StaticResource NewOpenProjectFile_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource OpenWnd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sBTLFileName}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding Path=DataContext.ListName_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource OpenWnd_TextBlock}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding sListName}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding Path=DataContext.ExportDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource OpenWnd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="3"
|
||||
Text="{Binding dtExportDate}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowDetailsTemplate>
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
|
||||
<UniformGrid Grid.Row="2"
|
||||
Columns="4"
|
||||
Style="{StaticResource AddRawPartWnd_UniformGrid}">
|
||||
<Button Name="OpenBtn"
|
||||
IsDefault="True"
|
||||
Content="{Binding Open_Msg}"
|
||||
Style="{DynamicResource EgtWPFLib5_Button}"/>
|
||||
<Button Content="{Binding Archive_Msg}"
|
||||
Command="{Binding Archive_Command}"
|
||||
IsEnabled="{Binding bArchived_IsEnabled}"
|
||||
Style="{DynamicResource EgtWPFLib5_Button}"/>
|
||||
<Button Content="{Binding Delete_Msg}"
|
||||
Command="{Binding Delete_Command}"
|
||||
IsEnabled="{Binding bDelete_IsEnabled}"
|
||||
Style="{DynamicResource EgtWPFLib5_Button}"/>
|
||||
<Button Command="{Binding Cancel_Command}"
|
||||
Content="{Binding Cancel_Msg}"
|
||||
Style="{DynamicResource EgtWPFLib5_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtBEAMWALLCORE:OptimizerWindow>
|
||||
@@ -0,0 +1,93 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Input
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class NewOpenProjectFileDialogV
|
||||
|
||||
Private WithEvents m_OpenProjFileDialogVM As NewOpenProjectFileDialogVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(Owner As Window, OpenProjFileDialogVM As NewOpenProjectFileDialogVM)
|
||||
' Funzione che interpreta l'xaml
|
||||
InitializeComponent()
|
||||
Me.Owner = Owner
|
||||
Me.DataContext = OpenProjFileDialogVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_OpenProjFileDialogVM = OpenProjFileDialogVM
|
||||
AddHandler Me.Loaded, AddressOf OpenProjectFileDialog_Loaded
|
||||
AddHandler Me.Closing, AddressOf OpenProjectFileDialog_Closing
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Function EgtShowDialog(ProjectType As ProjectType) As Boolean?
|
||||
m_OpenProjFileDialogVM.Init(ProjectType)
|
||||
' mostro la finestra di dialogo
|
||||
Return Me.ShowDialog()
|
||||
End Function
|
||||
Public Function EgtShowDialog(ProjectType As ProjectType, ProjectList As List(Of ProjectFileVM)) As Boolean?
|
||||
m_OpenProjFileDialogVM.Init(ProjectType, ProjectList)
|
||||
' mostro la finestra di dialogo
|
||||
Return Me.ShowDialog()
|
||||
End Function
|
||||
|
||||
Public Function EgtShowDialog(ProjectType As ProjectType, GoToProd As Boolean) As Boolean?
|
||||
m_OpenProjFileDialogVM.Init(ProjectType, Nothing, GoToProd)
|
||||
' mostro la finestra di dialogo
|
||||
Return Me.ShowDialog()
|
||||
End Function
|
||||
|
||||
Private Sub OpenProjectFileDialog_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
' Carico e imposto posizione finestra
|
||||
WinPosFromIniToWindow(S_OPENFILEDIALOG, K_VIEWOPTIMWINPLACE, Me)
|
||||
End Sub
|
||||
|
||||
Private Sub OpenProjectFileDialog_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
' Salvo posizione finestra (se non minimizzata)
|
||||
WinPosFromWindowToIni(Me, S_OPENFILEDIALOG, K_VIEWOPTIMWINPLACE)
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub ProjectList_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||
m_OpenProjFileDialogVM.ProjDoubleClick()
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
Private Sub OpenBtn_Click(sender As Object, e As RoutedEventArgs) Handles OpenBtn.Click
|
||||
DialogResult = m_OpenProjFileDialogVM.VerifySelected()
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_OpenProjFileDialogVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
Private Sub MainDataGrid_CellEditEnding(sender As Object, e As DataGridCellEditEndingEventArgs)
|
||||
'm_OpenProjFileDialogVM.SetIsEditNameActive(False)
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly IsSelectedProperty As DependencyProperty = DependencyProperty.Register("IsSelected",
|
||||
GetType(Boolean),
|
||||
GetType(ItemsControl))
|
||||
|
||||
Public Property IsSelected As Boolean
|
||||
Get
|
||||
Return DirectCast(GetValue(IsSelectedProperty), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetValue(IsSelectedProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,729 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Data
|
||||
Imports System.Windows.Input
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Enum BTLDateTypes As Integer
|
||||
CREATEDATE = 0
|
||||
EXPORTDATE = 1
|
||||
End Enum
|
||||
|
||||
Private Enum FilterTypes As Integer
|
||||
NULL = 0
|
||||
ID = 1
|
||||
BTLFILENAME = 2
|
||||
LISTNAME = 3
|
||||
MACHINE = 4
|
||||
End Enum
|
||||
|
||||
Public Enum DayTypes As Integer
|
||||
LASTMONTH = 0
|
||||
LAST3MONTHS = 1
|
||||
LAST6MONTHS = 2
|
||||
PERIOD = 3
|
||||
ALWAYS = 4
|
||||
End Enum
|
||||
|
||||
Public Enum RowQuantities As Integer
|
||||
FIFTY = 0
|
||||
HUNDRED = 1
|
||||
HUNDREDANDFIFTY = 2
|
||||
End Enum
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
Protected m_ProdColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
|
||||
Public Property ProdColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
|
||||
Get
|
||||
Return m_ProdColumns
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout))
|
||||
m_ProdColumns = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_colProdFile_Name As EgwWPFBaseLib.ColumnLayout
|
||||
Public ReadOnly Property colProdFile_Name As EgwWPFBaseLib.ColumnLayout
|
||||
Get
|
||||
Return m_colProdFile_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_colArchived_Name As EgwWPFBaseLib.ColumnLayout
|
||||
Public ReadOnly Property colArchived_Name As EgwWPFBaseLib.ColumnLayout
|
||||
Get
|
||||
Return m_colArchived_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_ProjectType As ProjectType
|
||||
|
||||
Protected m_sFilter As String
|
||||
Public Property Filter As String
|
||||
Get
|
||||
Return m_sFilter
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sFileNameFilter As Predicate(Of String)
|
||||
Public Property FileNameFilter As Predicate(Of String)
|
||||
Get
|
||||
Return m_sFileNameFilter
|
||||
End Get
|
||||
Set(value As Predicate(Of String))
|
||||
m_sFileNameFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sExtensions As New List(Of String)
|
||||
Public ReadOnly Property Extensions As List(Of String)
|
||||
Get
|
||||
Return m_sExtensions
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public m_ProjectList_View As CollectionView = Nothing
|
||||
Protected m_ProjectList As New ObservableCollection(Of ProdItem)
|
||||
Public ReadOnly Property ProjectList As ObservableCollection(Of ProdItem)
|
||||
Get
|
||||
Return m_ProjectList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nSelProjIndex As Integer
|
||||
Public ReadOnly Property nSelProjIndex As Integer
|
||||
Get
|
||||
Return m_nSelProjIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SelProject As ProdItem
|
||||
Public Property SelProject As ProdItem
|
||||
Get
|
||||
Return m_SelProject
|
||||
End Get
|
||||
Set(value As ProdItem)
|
||||
m_SelProject = value
|
||||
' verifico se abilitare il bottone Delete
|
||||
If IsNothing(m_SelProject) Then
|
||||
SetDeleteIsEnabled(False)
|
||||
SetArchivedIsEnabled(False)
|
||||
ElseIf IsNothing(m_SelProject.ProdFileVM) Then
|
||||
SetDeleteIsEnabled(True)
|
||||
SetArchivedIsEnabled(False)
|
||||
Else
|
||||
SetDeleteIsEnabled(Not SelProject.ProdFileVM.bIsProduced)
|
||||
SetArchivedIsEnabled(True)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(Archive_Msg))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_FileName As String
|
||||
Public Property FileName As String
|
||||
Get
|
||||
Return m_FileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_FileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bFixedProjectList As Boolean
|
||||
Public ReadOnly Property bFixedProjectList As Boolean
|
||||
Get
|
||||
Return m_bFixedProjectList
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetFixedProjectList(bValue As Boolean)
|
||||
m_bFixedProjectList = bValue
|
||||
NotifyPropertyChanged(NameOf(Filters_Visibility))
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property Filters_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_bFixedProjectList, Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_BTLDateTypeList As New List(Of String)
|
||||
Public ReadOnly Property BTLDateTypeList As List(Of String)
|
||||
Get
|
||||
Return m_BTLDateTypeList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SelBTLDateType As BTLDateTypes = Nothing
|
||||
Public Property SelBTLDateType As Integer
|
||||
Get
|
||||
Return m_SelBTLDateType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_DayTypeList As New List(Of String)({EgtMsg(62532), EgtMsg(62533), EgtMsg(62534), EgtMsg(62531)})
|
||||
Public Overridable ReadOnly Property DayTypeList As List(Of String)
|
||||
Get
|
||||
Return m_DayTypeList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SelDayType As DayTypes = DayTypes.LASTMONTH
|
||||
Public Property SelDayType As Integer
|
||||
Get
|
||||
Return m_SelDayType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Dim PrevSelDayType As DayTypes = m_SelDayType
|
||||
m_SelDayType = value
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_DAYTYPE, Convert.ToInt32(m_SelDayType))
|
||||
m_Date_Visibility = If(m_SelDayType = DayTypes.PERIOD, Visibility.Visible, Visibility.Collapsed)
|
||||
If m_SelDayType = DayTypes.PERIOD Then
|
||||
Select Case PrevSelDayType
|
||||
Case DayTypes.LASTMONTH
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5)
|
||||
Case DayTypes.LAST3MONTHS
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 3)
|
||||
Case DayTypes.LAST6MONTHS
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 6)
|
||||
Case DayTypes.ALWAYS
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = New DateTime(2020, 1, 1)
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(dtStartDate))
|
||||
NotifyPropertyChanged(NameOf(dtEndDate))
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(Date_Visibility))
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dtStartDate As DateTime = DateTime.Today
|
||||
Public Property dtStartDate As DateTime
|
||||
Get
|
||||
Return m_dtStartDate
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_dtStartDate = value
|
||||
Dim lStartDate As Long = m_dtStartDate.ToFileTimeUtc()
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, lStartDate.ToString())
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dtEndDate As DateTime = DateTime.Today
|
||||
Public Property dtEndDate As DateTime
|
||||
Get
|
||||
Return m_dtEndDate
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_dtEndDate = value
|
||||
Dim lEndDate As Long = m_dtEndDate.ToFileTimeUtc()
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_ENDDATE, lEndDate.ToString())
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Date_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property Date_Visibility As Visibility
|
||||
Get
|
||||
Return m_Date_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_RowQuantityList As New List(Of String)({50, 100, 150})
|
||||
Public ReadOnly Property RowQuantityList As List(Of String)
|
||||
Get
|
||||
Return m_RowQuantityList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_SelRowQuantity As RowQuantities
|
||||
Public Property SelRowQuantity As Integer
|
||||
Get
|
||||
Return m_SelRowQuantity
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SelRowQuantity = value
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' lista campi per ricerca testuale e con datepicker
|
||||
Protected m_FilterTypeList As New ObservableCollection(Of IdNameStruct)
|
||||
Public ReadOnly Property FilterTypeList As ObservableCollection(Of IdNameStruct)
|
||||
Get
|
||||
Return m_FilterTypeList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SelFilterType As IdNameStruct = Nothing
|
||||
Public Property SelFilterType As IdNameStruct
|
||||
Get
|
||||
Return m_SelFilterType
|
||||
End Get
|
||||
Set(value As IdNameStruct)
|
||||
' resetto il contenuto della barra di ricerca testuale
|
||||
m_SearchText = ""
|
||||
NotifyPropertyChanged(NameOf(SearchText))
|
||||
' resetto le selezioni sul calendario
|
||||
If Not IsNothing(SearchDate) Then SearchDate.Clear()
|
||||
' setto il Tipo Filtro a NULL e refresho la lista dei progetti (in modo da averli visibili tutti)
|
||||
m_SelFilterType = m_FilterTypeList(0)
|
||||
m_ProjectList_View.Refresh()
|
||||
' ora setto il valore scelto come Tipo Filtro
|
||||
m_SelFilterType = value
|
||||
Select Case m_SelFilterType.Id
|
||||
Case FilterTypes.ID, FilterTypes.BTLFILENAME, FilterTypes.LISTNAME, FilterTypes.MACHINE
|
||||
SearchText_Visibility = Visibility.Visible
|
||||
SearchDate_Visibility = Visibility.Collapsed
|
||||
Case BTLDateTypes.EXPORTDATE, BTLDateTypes.CREATEDATE
|
||||
SearchText_Visibility = Visibility.Collapsed
|
||||
SearchDate_Visibility = Visibility.Visible
|
||||
Case Else
|
||||
SearchText_Visibility = Visibility.Collapsed
|
||||
SearchDate_Visibility = Visibility.Collapsed
|
||||
End Select
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_SearchText As String = ""
|
||||
Public Property SearchText As String
|
||||
Get
|
||||
Return m_SearchText
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_SearchText = value
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend m_SearchDate As SelectedDatesCollection = Nothing
|
||||
Public ReadOnly Property SearchDate As SelectedDatesCollection
|
||||
Get
|
||||
Return m_SearchDate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SearchText_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property SearchText_Visibility As Visibility
|
||||
Get
|
||||
Return m_SearchText_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_SearchText_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(SearchText_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_SearchDate_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property SearchDate_Visibility As Visibility
|
||||
Get
|
||||
Return m_SearchDate_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_SearchDate_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(SearchDate_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property bIsEditNameActive As Boolean
|
||||
Get
|
||||
Return Not m_colProdFile_Name.IsReadOnly
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_colProdFile_Name) Then
|
||||
m_colProdFile_Name.IsReadOnly = Not value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Public Sub SetIsEditNameActive(value As Boolean)
|
||||
If Not IsNothing(m_colProdFile_Name) Then
|
||||
m_colProdFile_Name.IsReadOnly = Not value
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(bIsEditNameActive))
|
||||
End Sub
|
||||
|
||||
Private m_bViewArchived As Boolean
|
||||
Public Property bViewArchived As Boolean
|
||||
Get
|
||||
Return m_bViewArchived
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bViewArchived = value
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_VIEWARCHIVED, If(bViewArchived, 1, 0))
|
||||
If Not IsNothing(m_colArchived_Name) Then
|
||||
m_colArchived_Name.IsVisible = value
|
||||
RefreshProjectList()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bArchived_IsEnabled As Boolean
|
||||
Public ReadOnly Property bArchived_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_bArchived_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetArchivedIsEnabled(bValue As Boolean)
|
||||
m_bArchived_IsEnabled = bValue
|
||||
NotifyPropertyChanged(NameOf(bArchived_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private m_bDelete_IsEnabled As Boolean
|
||||
Public ReadOnly Property bDelete_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_bDelete_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetDeleteIsEnabled(bValue As Boolean)
|
||||
m_bDelete_IsEnabled = bValue
|
||||
NotifyPropertyChanged(NameOf(bDelete_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Protected m_ChangeOpenedProjectOnCancel As Boolean = False
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Title As String
|
||||
Get
|
||||
Return EgtMsg(61986)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Filters_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61985)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property FilterType_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61836)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Search_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61837)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Id_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61815)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property BTLFileName_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61819)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ListName_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61820)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ExportDate_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61821)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CreateDate_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61822)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Machine_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61886)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Name_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61808)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Open_Msg As String
|
||||
Get
|
||||
Return EgtMsg(30006)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Archived_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61983)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Archive_Msg As String
|
||||
Get
|
||||
If Not IsNothing(m_SelProject) AndAlso m_SelProject.bIsArchived Then
|
||||
Return EgtMsg(61984)
|
||||
Else
|
||||
Return EgtMsg(61981)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Delete_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61823)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Cancel_Msg As String
|
||||
Get
|
||||
Return EgtMsg(30002)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property From_Msg As String
|
||||
Get
|
||||
Return EgtMsg(62523)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property To_Msg As String
|
||||
Get
|
||||
Return EgtMsg(62524)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ViewArchived_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61982)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Rows_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61995)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdProjectDoubleClick As ICommand
|
||||
Private m_cmdDelete As ICommand
|
||||
Private m_cmdArchive As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
Sub New()
|
||||
' assegno delegato a elementi lista
|
||||
ProdItem.m_delIsModifiedSetUp = AddressOf SetIsEditNameActive
|
||||
' carico colonne
|
||||
LoadColumns()
|
||||
m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_NAME)
|
||||
m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_ARCHIVED)
|
||||
' leggo valori per filtri
|
||||
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
|
||||
Select Case m_SelDayType
|
||||
Case DayTypes.LASTMONTH
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5)
|
||||
Case DayTypes.LAST3MONTHS
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 3)
|
||||
Case DayTypes.LAST6MONTHS
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 6)
|
||||
Case DayTypes.PERIOD
|
||||
Dim sStartDate As String = "0"
|
||||
Dim lStartDate As Long = 0
|
||||
GetMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, 0, sStartDate)
|
||||
Long.TryParse(sStartDate, lStartDate)
|
||||
m_dtStartDate = If(lStartDate > 0, DateTime.FromFileTimeUtc(lStartDate), DateTime.Today)
|
||||
Dim sEndDate As String = "0"
|
||||
Dim lEndDate As Long = 0
|
||||
GetMainPrivateProfileString(S_OPENFILEDIALOG, K_ENDDATE, 0, sEndDate)
|
||||
Long.TryParse(sEndDate, lEndDate)
|
||||
m_dtEndDate = If(lEndDate > 0, DateTime.FromFileTimeUtc(lEndDate), DateTime.Today)
|
||||
m_Date_Visibility = Visibility.Visible
|
||||
End Select
|
||||
m_bViewArchived = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_VIEWARCHIVED, 0) <> 0
|
||||
End Sub
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public MustOverride Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean?
|
||||
Public Overridable Sub RefreshProjectList(Optional GoToProd As Boolean = False)
|
||||
End Sub
|
||||
|
||||
Protected Sub LoadColumns()
|
||||
' carico le colonne della datagrid
|
||||
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_NEWOPENPROJFILEDLG_PROD, ProdColumns)
|
||||
' carico campi su cui eseguire il filtro di ricerca
|
||||
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg})
|
||||
m_SelBTLDateType = BTLDateTypes.CREATEDATE
|
||||
NotifyPropertyChanged(NameOf(BTLDateTypeList))
|
||||
NotifyPropertyChanged(NameOf(SelBTLDateType))
|
||||
m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""),
|
||||
New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
|
||||
New IdNameStruct(FilterTypes.LISTNAME, ListName_Msg),
|
||||
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
|
||||
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
|
||||
NotifyPropertyChanged(NameOf(SelFilterType))
|
||||
End Sub
|
||||
|
||||
Friend Function VerifySelected() As Boolean
|
||||
' Salvo modifiche a colonne
|
||||
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_NEWOPENPROJFILEDLG_PROD, ProdColumns)
|
||||
If IsNothing(SelProject) Then Return False
|
||||
Dim AllFilesInDir As IEnumerable(Of String) = Nothing
|
||||
If m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
|
||||
If String.IsNullOrWhiteSpace(SelProject.ProdFileVM.sProdDirPath) OrElse Not Directory.Exists(SelProject.ProdFileVM.sProdDirPath) Then Return False
|
||||
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProdFileVM.sProdDirPath)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Return AllFilesInDir.Any(Function(x) Path.GetExtension(x).ToLower() = ".nge")
|
||||
End Function
|
||||
|
||||
Protected Function ProjectFilter(Proj As Object) As Boolean
|
||||
Dim bProjectOk As Boolean = True
|
||||
'If TypeOf Proj Is ProjFileVM Then
|
||||
Dim CurrProj As ProdItem = DirectCast(Proj, ProdItem)
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
(m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not CurrProj.ProjFileList.Any(Function(x) SearchDate.Contains(DirectCast(x, ProjFileVM).dtExportDate.Date))) OrElse
|
||||
(m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
Return bProjectOk
|
||||
End Function
|
||||
|
||||
Protected Sub CloseWindow(bDialogResult As Boolean)
|
||||
RaiseEvent m_CloseWindow(bDialogResult)
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ProjectDoubleClick"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ProjectDoubleClick_Command As ICommand
|
||||
Get
|
||||
If m_cmdProjectDoubleClick Is Nothing Then
|
||||
m_cmdProjectDoubleClick = New Command(AddressOf ProjDoubleClick)
|
||||
End If
|
||||
Return m_cmdProjectDoubleClick
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Friend Sub ProjDoubleClick()
|
||||
' verifico se non e' attivo edit del nome
|
||||
If bIsEditNameActive Then Return
|
||||
' verifico validita' selezionato
|
||||
If VerifySelected() Then
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ProjectDoubleClick
|
||||
|
||||
#Region "Archive"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Archive_Command As ICommand
|
||||
Get
|
||||
If m_cmdArchive Is Nothing Then
|
||||
m_cmdArchive = New Command(AddressOf Archive)
|
||||
End If
|
||||
Return m_cmdArchive
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Overridable Sub Archive()
|
||||
End Sub
|
||||
|
||||
#End Region ' Archive
|
||||
|
||||
#Region "Delete"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Delete_Command As ICommand
|
||||
Get
|
||||
If m_cmdDelete Is Nothing Then
|
||||
m_cmdDelete = New Command(AddressOf Delete)
|
||||
End If
|
||||
Return m_cmdDelete
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Overridable Sub Delete()
|
||||
End Sub
|
||||
|
||||
#End Region ' Delete
|
||||
|
||||
#Region "Cancel"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Cancel_Command As ICommand
|
||||
Get
|
||||
If m_cmdCancel Is Nothing Then
|
||||
m_cmdCancel = New Command(AddressOf Cancel)
|
||||
End If
|
||||
Return m_cmdCancel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Overridable Sub Cancel()
|
||||
End Sub
|
||||
|
||||
#End Region ' Cancel
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
<EgtBEAMWALLCORE:OptimizerWindow x:Class="OpenProjectFileDialogV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
Title="{Binding Title}"
|
||||
ResizeMode="NoResize" TitleBarHeight="30"
|
||||
WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
MinHeight="500" MinWidth="500"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||
Style="{StaticResource OptimizerWindow.Dialog}">
|
||||
|
||||
<EgtBEAMWALLCORE:OptimizerWindow.Resources>
|
||||
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
|
||||
</EgtBEAMWALLCORE:OptimizerWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="Filters"
|
||||
Visibility="{Binding Filters_Visibility}"
|
||||
Style="{StaticResource OpenProjectFile_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox ItemsSource="{Binding BTLDateTypeList}"
|
||||
SelectedIndex="{Binding SelBTLDateType}"
|
||||
Style="{StaticResource NewOpenProjectFile_ComboBox}"/>
|
||||
<StackPanel Grid.Column="1"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<ComboBox ItemsSource="{Binding DayTypeList}"
|
||||
SelectedIndex="{Binding SelDayType}"
|
||||
Style="{StaticResource OpenProjectFile_ComboBox}"/>
|
||||
<StackPanel Visibility="{Binding Date_Visibility}"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<TextBlock Text="{Binding From_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
<DatePicker SelectedDate="{Binding dtStartDate}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
<TextBlock Text="{Binding To_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
<DatePicker SelectedDate="{Binding dtEndDate}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox ItemsSource="{Binding FilterTypeList}"
|
||||
SelectedItem="{Binding SelFilterType}"
|
||||
Style="{StaticResource NewOpenProjectFile_ComboBox}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SearchText}"
|
||||
Visibility="{Binding SearchText_Visibility}"
|
||||
Style="{StaticResource NewSearchText_TextBox}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<TextBlock Text="Rows"
|
||||
Style="{StaticResource Option_TextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
SelectedIndex="{Binding SelRowQuantity}"
|
||||
Style="{StaticResource RowQTY_ComboBox}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<Border Grid.Row="1"
|
||||
Style="{StaticResource NewOpenProjectFileDialog_Border}"/>
|
||||
|
||||
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
SelectionMode="Single"
|
||||
Margin="5"
|
||||
ColumnLayouts="{Binding ProjectColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
Style="{StaticResource Optimizer_DataGrid}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="IsEnabled" Value="{Binding bIsEnabled}"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ProjectList_MouseDoubleClick"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.Resources>
|
||||
<!-- ProjId --><!--
|
||||
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>-->
|
||||
<!-- ProdId -->
|
||||
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!-- Project Name --><!--
|
||||
<DataGridTextColumn x:Key="colPROJNAME" Binding="{Binding sDescription}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>-->
|
||||
<!-- BTL FileName -->
|
||||
<DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!-- ListName --><!--
|
||||
<DataGridTextColumn x:Key="colLISTNAME" Binding="{Binding sListName}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.ListName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>-->
|
||||
<!-- Exported date --><!--
|
||||
<DataGridTextColumn x:Key="colEXPDATE" Binding="{Binding dtExportDate}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.ExportDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>-->
|
||||
<!-- Creation date -->
|
||||
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.CreateDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Machine -->
|
||||
<DataGridTextColumn x:Key="colMACHINE" Binding="{Binding sMachine}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.Machine_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Name (per Prod) --><!--
|
||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>-->
|
||||
</DataGrid.Resources>
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
|
||||
<UniformGrid Grid.Row="2"
|
||||
Columns="3"
|
||||
Style="{StaticResource AddRawPartWnd_UniformGrid}">
|
||||
<Button Name="OpenBtn"
|
||||
IsDefault="True"
|
||||
Content="{Binding Open_Msg}"
|
||||
Style="{DynamicResource EgtWPFLib5_Button}"/>
|
||||
<Button Content="{Binding Delete_Msg}"
|
||||
Command="{Binding Delete_Command}"
|
||||
Style="{DynamicResource EgtWPFLib5_Button}"/>
|
||||
<Button IsCancel="True"
|
||||
Content="{Binding Cancel_Msg}"
|
||||
Style="{DynamicResource EgtWPFLib5_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtBEAMWALLCORE:OptimizerWindow>
|
||||
@@ -0,0 +1,77 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class OpenProjectFileDialogV
|
||||
|
||||
Private WithEvents m_OpenProjFileDialogVM As OpenProjectFileDialogVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(Owner As Window, OpenProjFileDialogVM As OpenProjectFileDialogVM)
|
||||
' Funzione che interpreta l'xaml
|
||||
InitializeComponent()
|
||||
Me.Owner = Owner
|
||||
Me.DataContext = OpenProjFileDialogVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_OpenProjFileDialogVM = OpenProjFileDialogVM
|
||||
AddHandler Me.Loaded, AddressOf OpenProjectFileDialog_Loaded
|
||||
AddHandler Me.Closing, AddressOf OpenProjectFileDialog_Closing
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Function EgtShowDialog(ProjectType As ProjectType) As Boolean?
|
||||
m_OpenProjFileDialogVM.Init(ProjectType)
|
||||
' mostro la finestra di dialogo
|
||||
Return Me.ShowDialog()
|
||||
End Function
|
||||
Public Function EgtShowDialog(ProjectType As ProjectType, ProjectList As List(Of ProjectFileVM)) As Boolean?
|
||||
m_OpenProjFileDialogVM.Init(ProjectType, ProjectList)
|
||||
' mostro la finestra di dialogo
|
||||
Return Me.ShowDialog()
|
||||
End Function
|
||||
|
||||
Public Function EgtShowDialog(ProjectType As ProjectType, GoToProd As Boolean) As Boolean?
|
||||
m_OpenProjFileDialogVM.Init(ProjectType, Nothing, GoToProd)
|
||||
' mostro la finestra di dialogo
|
||||
Return Me.ShowDialog()
|
||||
End Function
|
||||
|
||||
Private Sub OpenProjectFileDialog_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
' Carico e imposto posizione finestra
|
||||
WinPosFromIniToWindow(S_OPENFILEDIALOG, K_VIEWOPTIMWINPLACE, Me)
|
||||
End Sub
|
||||
|
||||
Private Sub OpenProjectFileDialog_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
' Salvo posizione finestra (se non minimizzata)
|
||||
WinPosFromWindowToIni(Me, S_OPENFILEDIALOG, K_VIEWOPTIMWINPLACE)
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub ProjectList_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||
m_OpenProjFileDialogVM.ProjDoubleClick()
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
Private Sub OpenBtn_Click(sender As Object, e As RoutedEventArgs) Handles OpenBtn.Click
|
||||
DialogResult = m_OpenProjFileDialogVM.VerifySelected()
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_OpenProjFileDialogVM.m_CloseWindow
|
||||
' Salvo modifiche a colonne
|
||||
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_OPENPROJFILEDLG_PROD, m_OpenProjFileDialogVM.ProjectColumns)
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,546 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Data
|
||||
Imports System.Windows.Input
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public MustInherit Class OpenProjectFileDialogVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Enum BTLDateTypes As Integer
|
||||
CREATEDATE = 0
|
||||
EXPORTDATE = 1
|
||||
End Enum
|
||||
|
||||
Private Enum FilterTypes As Integer
|
||||
NULL = 0
|
||||
ID = 1
|
||||
BTLFILENAME = 2
|
||||
LISTNAME = 3
|
||||
MACHINE = 4
|
||||
End Enum
|
||||
|
||||
Public Enum DayTypes As Integer
|
||||
LASTMONTH = 0
|
||||
LAST3MONTHS = 1
|
||||
LAST6MONTHS = 2
|
||||
PERIOD = 3
|
||||
End Enum
|
||||
|
||||
Public Enum RowQuantities As Integer
|
||||
FIFTY = 0
|
||||
HUNDRED = 1
|
||||
HUNDREDANDFIFTY = 2
|
||||
End Enum
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
Protected m_GoToProd As Boolean = False
|
||||
|
||||
Protected m_ProjectColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
|
||||
Public Property ProjectColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
|
||||
Get
|
||||
Return m_ProjectColumns
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout))
|
||||
m_ProjectColumns = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_ProjectType As ProjectType
|
||||
|
||||
Protected m_sFilter As String
|
||||
Public Property Filter As String
|
||||
Get
|
||||
Return m_sFilter
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sFileNameFilter As Predicate(Of String)
|
||||
Public Property FileNameFilter As Predicate(Of String)
|
||||
Get
|
||||
Return m_sFileNameFilter
|
||||
End Get
|
||||
Set(value As Predicate(Of String))
|
||||
m_sFileNameFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sExtensions As New List(Of String)
|
||||
Public ReadOnly Property Extensions As List(Of String)
|
||||
Get
|
||||
Return m_sExtensions
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public m_ProjectList_View As CollectionView = Nothing
|
||||
Protected m_ProjectList As New ObservableCollection(Of ProjectFileVM)
|
||||
Public ReadOnly Property ProjectList As ObservableCollection(Of ProjectFileVM)
|
||||
Get
|
||||
Return m_ProjectList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SelProject As ProjectFileVM
|
||||
Public Property SelProject As ProjectFileVM
|
||||
Get
|
||||
Return m_SelProject
|
||||
End Get
|
||||
Set(value As ProjectFileVM)
|
||||
m_SelProject = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_FileName As String
|
||||
Public Property FileName As String
|
||||
Get
|
||||
Return m_FileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_FileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bFixedProjectList As Boolean
|
||||
Public ReadOnly Property bFixedProjectList As Boolean
|
||||
Get
|
||||
Return m_bFixedProjectList
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetFixedProjectList(bValue As Boolean)
|
||||
m_bFixedProjectList = bValue
|
||||
NotifyPropertyChanged(NameOf(Filters_Visibility))
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property Filters_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_bFixedProjectList, Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_BTLDateTypeList As New List(Of String)
|
||||
Public ReadOnly Property BTLDateTypeList As List(Of String)
|
||||
Get
|
||||
Return m_BTLDateTypeList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SelBTLDateType As BTLDateTypes = Nothing
|
||||
Public Property SelBTLDateType As Integer
|
||||
Get
|
||||
Return m_SelBTLDateType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private m_DayTypeList As New List(Of String)({EgtMsg(62532), EgtMsg(62533), EgtMsg(62534), EgtMsg(62531)})
|
||||
Public ReadOnly Property DayTypeList As List(Of String)
|
||||
Get
|
||||
Return m_DayTypeList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SelDayType As DayTypes = DayTypes.LASTMONTH
|
||||
Public Property SelDayType As Integer
|
||||
Get
|
||||
Return m_SelDayType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Dim PrevSelDayType As DayTypes = m_SelDayType
|
||||
m_SelDayType = value
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_DAYTYPE, Convert.ToInt32(m_SelDayType))
|
||||
m_Date_Visibility = If(m_SelDayType = DayTypes.PERIOD, Visibility.Visible, Visibility.Collapsed)
|
||||
If m_SelDayType = DayTypes.PERIOD Then
|
||||
Select Case PrevSelDayType
|
||||
Case DayTypes.LASTMONTH
|
||||
m_dtStartDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtEndDate = m_dtStartDate - TimeSpan.FromDays(30.5)
|
||||
Case DayTypes.LAST3MONTHS
|
||||
|
||||
Case DayTypes.LAST6MONTHS
|
||||
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(dtStartDate))
|
||||
NotifyPropertyChanged(NameOf(dtEndDate))
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(Date_Visibility))
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dtStartDate As DateTime = DateTime.Today
|
||||
Public Property dtStartDate As DateTime
|
||||
Get
|
||||
Return m_dtStartDate
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_dtStartDate = value
|
||||
Dim lStartDate As Long = m_dtStartDate.ToFileTimeUtc()
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, lStartDate.ToString())
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dtEndDate As DateTime = DateTime.Today
|
||||
Public Property dtEndDate As DateTime
|
||||
Get
|
||||
Return m_dtEndDate
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_dtEndDate = value
|
||||
Dim lEndDate As Long = m_dtEndDate.ToFileTimeUtc()
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_ENDDATE, lEndDate.ToString())
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Date_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property Date_Visibility As Visibility
|
||||
Get
|
||||
Return m_Date_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_RowQuantityList As New List(Of String)({50, 100, 150})
|
||||
Public ReadOnly Property RowQuantityList As List(Of String)
|
||||
Get
|
||||
Return m_RowQuantityList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_SelRowQuantity As RowQuantities
|
||||
Public Property SelRowQuantity As Integer
|
||||
Get
|
||||
Return m_SelRowQuantity
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SelRowQuantity = value
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' lista campi per ricerca testuale e con datepicker
|
||||
Protected m_FilterTypeList As New ObservableCollection(Of IdNameStruct)
|
||||
Public ReadOnly Property FilterTypeList As ObservableCollection(Of IdNameStruct)
|
||||
Get
|
||||
Return m_FilterTypeList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SelFilterType As IdNameStruct = Nothing
|
||||
Public Property SelFilterType As IdNameStruct
|
||||
Get
|
||||
Return m_SelFilterType
|
||||
End Get
|
||||
Set(value As IdNameStruct)
|
||||
' resetto il contenuto della barra di ricerca testuale
|
||||
m_SearchText = ""
|
||||
NotifyPropertyChanged(NameOf(SearchText))
|
||||
' resetto le selezioni sul calendario
|
||||
If Not IsNothing(SearchDate) Then SearchDate.Clear()
|
||||
' setto il Tipo Filtro a NULL e refresho la lista dei progetti (in modo da averli visibili tutti)
|
||||
m_SelFilterType = m_FilterTypeList(0)
|
||||
m_ProjectList_View.Refresh()
|
||||
' ora setto il valore scelto come Tipo Filtro
|
||||
m_SelFilterType = value
|
||||
Select Case m_SelFilterType.Id
|
||||
Case FilterTypes.ID, FilterTypes.BTLFILENAME, FilterTypes.LISTNAME, FilterTypes.MACHINE
|
||||
SearchText_Visibility = Visibility.Visible
|
||||
SearchDate_Visibility = Visibility.Collapsed
|
||||
Case BTLDateTypes.EXPORTDATE, BTLDateTypes.CREATEDATE
|
||||
SearchText_Visibility = Visibility.Collapsed
|
||||
SearchDate_Visibility = Visibility.Visible
|
||||
Case Else
|
||||
SearchText_Visibility = Visibility.Collapsed
|
||||
SearchDate_Visibility = Visibility.Collapsed
|
||||
End Select
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_SearchText As String = ""
|
||||
Public Property SearchText As String
|
||||
Get
|
||||
Return m_SearchText
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_SearchText = value
|
||||
m_ProjectList_View.Refresh()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend m_SearchDate As SelectedDatesCollection = Nothing
|
||||
Public ReadOnly Property SearchDate As SelectedDatesCollection
|
||||
Get
|
||||
Return m_SearchDate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_SearchText_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property SearchText_Visibility As Visibility
|
||||
Get
|
||||
Return m_SearchText_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_SearchText_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(SearchText_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_SearchDate_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property SearchDate_Visibility As Visibility
|
||||
Get
|
||||
Return m_SearchDate_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_SearchDate_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(SearchDate_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Title As String
|
||||
Get
|
||||
Return "Open Project"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property FilterType_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61836)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Search_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61837)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Id_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61815)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property BTLFileName_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61819)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ListName_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61820)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ExportDate_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61821)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CreateDate_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61822)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Machine_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61886)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Name_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61808)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Open_Msg As String
|
||||
Get
|
||||
Return EgtMsg(30006)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Delete_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61823)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Cancel_Msg As String
|
||||
Get
|
||||
Return EgtMsg(30002)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property From_Msg As String
|
||||
Get
|
||||
Return EgtMsg(62523)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property To_Msg As String
|
||||
Get
|
||||
Return EgtMsg(62524)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdProjectDoubleClick As ICommand
|
||||
Private m_cmdDelete As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
Sub New()
|
||||
' carico colonne
|
||||
LoadColumns()
|
||||
' leggo valori per filtri
|
||||
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
|
||||
Select Case m_SelDayType
|
||||
Case DayTypes.LASTMONTH
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5)
|
||||
Case DayTypes.LAST3MONTHS
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 3)
|
||||
Case DayTypes.LAST6MONTHS
|
||||
m_dtEndDate = DateTime.Today + TimeSpan.FromDays(1)
|
||||
m_dtStartDate = m_dtEndDate - TimeSpan.FromDays(30.5 * 6)
|
||||
Case DayTypes.PERIOD
|
||||
Dim sStartDate As String = "0"
|
||||
Dim lStartDate As Long = 0
|
||||
GetMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, 0, sStartDate)
|
||||
Long.TryParse(sStartDate, lStartDate)
|
||||
m_dtStartDate = If(lStartDate > 0, DateTime.FromFileTimeUtc(lStartDate), DateTime.Today)
|
||||
Dim sEndDate As String = "0"
|
||||
Dim lEndDate As Long = 0
|
||||
GetMainPrivateProfileString(S_OPENFILEDIALOG, K_ENDDATE, 0, sEndDate)
|
||||
Long.TryParse(sEndDate, lEndDate)
|
||||
m_dtEndDate = If(lEndDate > 0, DateTime.FromFileTimeUtc(lEndDate), DateTime.Today)
|
||||
m_Date_Visibility = Visibility.Visible
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public MustOverride Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean?
|
||||
Public Overridable Sub RefreshProjectList()
|
||||
End Sub
|
||||
|
||||
Protected Sub LoadColumns()
|
||||
' carico le colonne della datagrid
|
||||
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_OPENPROJFILEDLG_PROD, ProjectColumns)
|
||||
' carico campi su cui eseguire il filtro di ricerca
|
||||
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg})
|
||||
m_SelBTLDateType = BTLDateTypes.CREATEDATE
|
||||
NotifyPropertyChanged(NameOf(BTLDateTypeList))
|
||||
NotifyPropertyChanged(NameOf(SelBTLDateType))
|
||||
m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""),
|
||||
New IdNameStruct(FilterTypes.ID, Id_Msg),
|
||||
New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
|
||||
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
|
||||
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
|
||||
NotifyPropertyChanged(NameOf(SelFilterType))
|
||||
End Sub
|
||||
|
||||
Friend Function VerifySelected() As Boolean
|
||||
' Salvo modifiche a colonne
|
||||
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_OPENPROJFILEDLG_PROD, ProjectColumns)
|
||||
If IsNothing(SelProject) Then Return False
|
||||
Dim AllFilesInDir As IEnumerable(Of String) = Nothing
|
||||
If m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
|
||||
If String.IsNullOrWhiteSpace(SelProject.sProdDirPath) OrElse Not Directory.Exists(SelProject.sProdDirPath) Then Return False
|
||||
AllFilesInDir = Directory.EnumerateFiles(SelProject.sProdDirPath)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
For Each File In AllFilesInDir
|
||||
If Path.GetExtension(File).ToLower() = ".nge" Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Protected Function ProjectFilter(Proj As Object) As Boolean
|
||||
Dim bProjectOk As Boolean = True
|
||||
Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
(m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
(m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
Return bProjectOk
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ProjectDoubleClick"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ProjectDoubleClick_Command As ICommand
|
||||
Get
|
||||
If m_cmdProjectDoubleClick Is Nothing Then
|
||||
m_cmdProjectDoubleClick = New Command(AddressOf ProjDoubleClick)
|
||||
End If
|
||||
Return m_cmdProjectDoubleClick
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Friend Sub ProjDoubleClick()
|
||||
If VerifySelected() Then
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ProjectDoubleClick
|
||||
|
||||
#Region "Delete"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Delete_Command As ICommand
|
||||
Get
|
||||
If m_cmdDelete Is Nothing Then
|
||||
m_cmdDelete = New Command(AddressOf Delete)
|
||||
End If
|
||||
Return m_cmdDelete
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Overridable Sub Delete()
|
||||
End Sub
|
||||
|
||||
#End Region ' Delete
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,10 @@
|
||||
Imports System.Windows
|
||||
|
||||
Public Class OptimizerWindow
|
||||
Inherits EgwWPFBaseLib.EgtWindow
|
||||
|
||||
Shared Sub New()
|
||||
DefaultStyleKeyProperty.OverrideMetadata(GetType(OptimizerWindow), New FrameworkPropertyMetadata(GetType(OptimizerWindow)))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,364 +0,0 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public MustInherit Class Part
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Protected m_ParentMachGroup As MyMachGroup
|
||||
Public ReadOnly Property ParentMachGroup As MyMachGroup
|
||||
Get
|
||||
Return m_ParentMachGroup
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Id geometrico del pezzo
|
||||
Protected m_nPartId As Integer
|
||||
Public ReadOnly Property nPartId As Integer
|
||||
Get
|
||||
Return m_nPartId
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetPartId(nPartId As Integer)
|
||||
m_nPartId = nPartId
|
||||
End Sub
|
||||
|
||||
' Proj del pezzo
|
||||
Protected m_nProjId As Integer = 0
|
||||
Public Property nProjId As Integer
|
||||
Get
|
||||
Return m_nProjId
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nProjId = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Info del pezzo
|
||||
Protected m_nPDN As Integer
|
||||
Public ReadOnly Property nPDN As Integer
|
||||
Get
|
||||
Return m_nPDN
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sNAM As String
|
||||
Public ReadOnly Property sNAM As String
|
||||
Get
|
||||
Return m_sNAM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dL As Double
|
||||
Public Property dL As Double
|
||||
Get
|
||||
Return m_dL
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dW As Double
|
||||
Public Property dW As Double
|
||||
Get
|
||||
Return m_dW
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dW = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dH As Double
|
||||
Public Property dH As Double
|
||||
Get
|
||||
Return m_dH
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dH = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dPOSX As Double
|
||||
Public Property sPOSX As String
|
||||
Get
|
||||
Return LenToString(m_dPOSX, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, m_dPOSX)
|
||||
End Set
|
||||
End Property
|
||||
Public Property dPOSX As Double
|
||||
Get
|
||||
Return m_dPOSX
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dPOSX = value
|
||||
NotifyPropertyChanged(NameOf(sPOSX))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCNT As Integer
|
||||
Public Property nCNT As Integer
|
||||
Get
|
||||
Return m_nCNT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCNT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nINVERTED As Integer
|
||||
Public ReadOnly Property sINVERTED As String
|
||||
Get
|
||||
Return m_nINVERTED & "°"
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetInverted(nInverted As Integer)
|
||||
m_nINVERTED = nInverted
|
||||
End Sub
|
||||
|
||||
Protected m_nROTATED As Integer
|
||||
Public ReadOnly Property sROTATED As String
|
||||
Get
|
||||
Return m_nROTATED & "°"
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetRotated(nRotated As Integer)
|
||||
m_nROTATED = nRotated
|
||||
End Sub
|
||||
|
||||
Protected m_sMATERIAL As String
|
||||
Public Property sMATERIAL As String
|
||||
Get
|
||||
Return m_sMATERIAL
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMATERIAL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nGlobalState As CalcStates = -1
|
||||
Public ReadOnly Property nGlobalState As CalcStates
|
||||
Get
|
||||
Return m_nGlobalState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_nState As CalcStates = -1
|
||||
Public Property nState As CalcStates
|
||||
Get
|
||||
Return m_nState
|
||||
End Get
|
||||
Set(value As CalcStates)
|
||||
m_nState = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||
Get
|
||||
If m_nGlobalState = 0 Then
|
||||
Return Brushes.Green
|
||||
ElseIf m_nGlobalState < 0 Then
|
||||
Return Brushes.LightGray
|
||||
ElseIf m_nGlobalState > 0 Then
|
||||
Return Brushes.Red
|
||||
Else
|
||||
Return Brushes.Red
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_ERR As Integer
|
||||
Public ReadOnly Property nCALC_ERR As Integer
|
||||
Get
|
||||
Return m_nCALC_ERR
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sCALC_MSG As String = String.Empty
|
||||
Public ReadOnly Property nCALC_MSG As String
|
||||
Get
|
||||
Return m_sCALC_MSG
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_ROT As Integer
|
||||
Public Property nCALC_ROT As Integer
|
||||
Get
|
||||
Return m_nCALC_ROT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_ROT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_FALL As Integer
|
||||
Public Property nCALC_FALL As Integer
|
||||
Get
|
||||
Return m_nCALC_FALL
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_FALL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nCALC_TIME As Integer
|
||||
Public Property nCALC_TIME As Integer
|
||||
Get
|
||||
Return m_nCALC_TIME
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nCALC_TIME = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' lista delle feature del pezzo
|
||||
Protected m_FeatureList As ObservableCollection(Of BTLFeatureM)
|
||||
Public Property FeatureList As ObservableCollection(Of BTLFeatureM)
|
||||
Get
|
||||
Return m_FeatureList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of BTLFeatureM))
|
||||
m_FeatureList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_SelFeature As BTLFeatureM
|
||||
Public Property SelFeature As BTLFeatureM
|
||||
Get
|
||||
Return m_SelFeature
|
||||
End Get
|
||||
Set(value As BTLFeatureM)
|
||||
m_SelFeature = value
|
||||
EgtDeselectAll()
|
||||
If Not IsNothing(value) Then EgtSelectObj(m_SelFeature.nFeatureId)
|
||||
EgtDraw()
|
||||
NotifyPropertyChanged(NameOf(SelFeature))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' definizione comandi
|
||||
Private m_cmdDeletePart As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(nParentMachGroup As MyMachGroup, nPartId As Integer)
|
||||
m_ParentMachGroup = nParentMachGroup
|
||||
SetPartId(nPartId)
|
||||
m_FeatureList = New ObservableCollection(Of BTLFeatureM)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||
Public Sub CalcPartUpdate(bCalc As Boolean, ERR As Integer, ROT As Integer, FALL As Integer, MSG As String)
|
||||
If Not bCalc Then
|
||||
nState = CalcStates.NOTCALCULATED
|
||||
m_nCALC_ERR = 0
|
||||
m_nCALC_ROT = 0
|
||||
m_nCALC_FALL = 0
|
||||
m_sCALC_MSG = ""
|
||||
Else
|
||||
m_nCALC_ERR = ERR
|
||||
m_nCALC_ROT = ROT
|
||||
m_nCALC_FALL = 0
|
||||
m_sCALC_MSG = MSG
|
||||
If ERR = 0 Then
|
||||
nState = CalcStates.OK
|
||||
ElseIf ERR > 1 Then
|
||||
nState = CalcStates.ERROR_
|
||||
ElseIf ERR < 1 Then
|
||||
nState = CalcStates.NOTCALCULATED
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
End Sub
|
||||
|
||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||
Public Sub CalcFeatureUpdate()
|
||||
m_nGlobalState = nState
|
||||
For Each Feature In FeatureList
|
||||
If Not Feature.bDO Then
|
||||
|
||||
ElseIf Feature.nState < 0 Then
|
||||
m_nGlobalState = CalcStates.NOTCALCULATED
|
||||
Exit For
|
||||
ElseIf Feature.nState > 0 AndAlso m_nGlobalState = CalcStates.OK Then
|
||||
m_nGlobalState = CalcStates.ERROR_
|
||||
End If
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "DeletePart"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property DeletePart_Command() As ICommand
|
||||
Get
|
||||
If m_cmdDeletePart Is Nothing Then
|
||||
m_cmdDeletePart = New Command(AddressOf DeletePart)
|
||||
End If
|
||||
Return m_cmdDeletePart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Overridable Sub DeletePart()
|
||||
EgtRemovePartFromRawPart(Me.m_nPartId)
|
||||
' elimino pezzo copia
|
||||
EgtErase(Me.m_nPartId)
|
||||
' elimino info pezzo su mach group
|
||||
Dim sInfo As String = ""
|
||||
Dim Index As Integer = 1
|
||||
Dim sSplitInfo() As String
|
||||
Dim bFound As Boolean = False
|
||||
While EgtGetInfo(m_ParentMachGroup.Id, MGR_RPT_PART & Index, sInfo)
|
||||
If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||
sSplitInfo = sInfo.Split(","c)
|
||||
If bFound Then
|
||||
EgtSetInfo(m_ParentMachGroup.Id, MGR_RPT_PART & Index - 1, sInfo)
|
||||
End If
|
||||
If sSplitInfo(0) = nPartId Then
|
||||
bFound = True
|
||||
End If
|
||||
End If
|
||||
Index += 1
|
||||
End While
|
||||
If bFound Then
|
||||
EgtSetInfo(m_ParentMachGroup.Id, MGR_RPT_PART & Index - 1, "")
|
||||
End If
|
||||
' rimuovo dalla lista pezzi
|
||||
Index = ParentMachGroup.PartList.IndexOf(Me)
|
||||
If Index = 0 Then
|
||||
If ParentMachGroup.PartList.Count > 0 Then
|
||||
ParentMachGroup.SelPart = ParentMachGroup.PartList(0)
|
||||
Else
|
||||
ParentMachGroup.SelPart = Nothing
|
||||
End If
|
||||
ElseIf Index = ParentMachGroup.PartList.Count - 1 Then
|
||||
If ParentMachGroup.PartList.Count > 1 Then
|
||||
ParentMachGroup.SelPart = ParentMachGroup.PartList(ParentMachGroup.PartList.Count - 2)
|
||||
Else
|
||||
ParentMachGroup.SelPart = Nothing
|
||||
End If
|
||||
Else
|
||||
ParentMachGroup.SelPart = ParentMachGroup.PartList(Index - 1)
|
||||
End If
|
||||
ParentMachGroup.PartList.Remove(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' DeletePart
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
@@ -1,42 +0,0 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProdFileM
|
||||
Inherits ProjectFileM
|
||||
|
||||
Protected m_nProjIdList As List(Of Integer)
|
||||
Public ReadOnly Property nProjIdList As List(Of Integer)
|
||||
Get
|
||||
Return m_nProjIdList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sName As String
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
Protected Sub New()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewProdFileM() As ProdFileM
|
||||
Return New ProdFileM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProdFileM(nProdId As Integer, nProjIdList As List(Of Integer),
|
||||
dtCreateProjDate As DateTime, sName As String) As ProdFileM
|
||||
Dim NewProjectFileM As New ProdFileM
|
||||
NewProjectFileM.m_nProdId = nProdId
|
||||
NewProjectFileM.m_nProjIdList = nProjIdList
|
||||
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
||||
NewProjectFileM.m_sName = sName
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
End Class
|
||||
@@ -1,51 +0,0 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProjFileM
|
||||
Inherits ProjectFileM
|
||||
|
||||
Protected m_dtExportDate As DateTime
|
||||
Public ReadOnly Property dtExportDate As DateTime
|
||||
Get
|
||||
Return m_dtExportDate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sListName As String
|
||||
Public ReadOnly Property sListName As String
|
||||
Get
|
||||
Return m_sListName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sBTLFileName As String = String.Empty
|
||||
Public ReadOnly Property sBTLFileName As String
|
||||
Get
|
||||
Return m_sBTLFileName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
Protected Sub New()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewProjFileM() As ProjFileM
|
||||
Return New ProjFileM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProjFileM(nProjId As Integer, nProdId As Integer, dtCreateProjDate As DateTime,
|
||||
dtExportDate As DateTime, sListName As String, sBTLFileName As String) As ProjFileM
|
||||
Dim NewProjectFileM As New ProjFileM
|
||||
NewProjectFileM.m_nProjId = nProjId
|
||||
NewProjectFileM.m_nProdId = nProdId
|
||||
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
||||
NewProjectFileM.m_dtExportDate = dtExportDate
|
||||
NewProjectFileM.m_sListName = sListName
|
||||
NewProjectFileM.m_sBTLFileName = sBTLFileName
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
End Class
|
||||
@@ -1,62 +0,0 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProjectFileM
|
||||
|
||||
'Protected m_nProjectType As ProjectType
|
||||
'Public ReadOnly Property nProjectType As ProjectType
|
||||
' Get
|
||||
' Return m_nProjectType
|
||||
' End Get
|
||||
'End Property
|
||||
'Public Sub SetProjectType(nProjectType As ProjectType)
|
||||
' m_nProjectType = nProjectType
|
||||
'End Sub
|
||||
|
||||
Protected m_nProjId As Integer = 0
|
||||
Public ReadOnly Property nProjId As Integer
|
||||
Get
|
||||
Return m_nProjId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_nProdId As Integer = 0
|
||||
Public ReadOnly Property nProdId As Integer
|
||||
Get
|
||||
Return m_nProdId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dtCreateDate As DateTime
|
||||
Public ReadOnly Property dtCreateDate As DateTime
|
||||
Get
|
||||
Return m_dtCreateDate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_bIsNew As Boolean
|
||||
Public Property bIsNew As Boolean
|
||||
Get
|
||||
Return m_bIsNew
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsNew = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
'Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
|
||||
' m_nProjectType = nProjectType
|
||||
' If m_nProjectType = ProjectType.PROJ Then
|
||||
' m_nProjId = nProjId
|
||||
' m_nProdId = nProdId
|
||||
' m_BTLFileName = sBTLFileName
|
||||
' ElseIf m_nProjectType = ProjectType.PROD Then
|
||||
' m_nProdId = nProdId
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,89 @@
|
||||
Public Class ProdFileM
|
||||
Inherits ProjectFileM
|
||||
|
||||
Protected m_nProjIdList As List(Of Integer)
|
||||
Public ReadOnly Property nProjIdList As List(Of Integer)
|
||||
Get
|
||||
Return m_nProjIdList
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetProjIdList(value As List(Of Integer))
|
||||
m_nProjIdList = value
|
||||
End Sub
|
||||
|
||||
Protected m_ProjMList As List(Of ProjFileM)
|
||||
Public ReadOnly Property ProjMList As List(Of ProjFileM)
|
||||
Get
|
||||
Return m_ProjMList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sName As String
|
||||
Public Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_bIsProduced As Boolean
|
||||
Public Property bIsProduced As Boolean
|
||||
Get
|
||||
Return m_bIsProduced
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsProduced = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
Protected Sub New()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewProdFileM() As ProdFileM
|
||||
Return New ProdFileM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProdFileM(nProdId As Integer, nProjIdList As List(Of Integer), dtCreateProjDate As DateTime, sName As String, nType As BWType,
|
||||
sMachine As String, sLockedBy As String, dtLock As DateTime, bIsActive As Boolean, bIsProduced As Boolean, bIsArchived As Boolean) As ProdFileM
|
||||
Dim NewProjectFileM As New ProdFileM With {
|
||||
.m_nProdId = nProdId,
|
||||
.m_nProjIdList = nProjIdList,
|
||||
.m_dtCreateDate = dtCreateProjDate,
|
||||
.m_sName = sName,
|
||||
.m_nType = nType,
|
||||
.m_sMachine = sMachine,
|
||||
.m_sLockedBy = sLockedBy,
|
||||
.m_dtLock = dtLock,
|
||||
.m_bIsActive = bIsActive,
|
||||
.m_bIsProduced = bIsProduced,
|
||||
.m_bIsArchived = bIsArchived
|
||||
}
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProdFileM(nProdId As Integer, nProjIdList As List(Of Integer), dtCreateProjDate As DateTime, sName As String, nType As BWType,
|
||||
sMachine As String, sLockedBy As String, dtLock As DateTime, bIsActive As Boolean, bIsProduced As Boolean, bIsArchived As Boolean, ProjMList As List(Of ProjFileM)) As ProdFileM
|
||||
Dim NewProjectFileM As New ProdFileM With {
|
||||
.m_nProdId = nProdId,
|
||||
.m_nProjIdList = nProjIdList,
|
||||
.m_dtCreateDate = dtCreateProjDate,
|
||||
.m_sName = sName,
|
||||
.m_nType = nType,
|
||||
.m_sMachine = sMachine,
|
||||
.m_sLockedBy = sLockedBy,
|
||||
.m_dtLock = dtLock,
|
||||
.m_bIsActive = bIsActive,
|
||||
.m_bIsProduced = bIsProduced,
|
||||
.m_bIsArchived = bIsArchived,
|
||||
.m_ProjMList = ProjMList
|
||||
}
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,118 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class ProdItem
|
||||
Inherits VMBase
|
||||
|
||||
Public Shared m_delUpdateNameInDb As Action(Of Integer, String)
|
||||
Public Shared m_delIsModifiedSetUp As Action(Of Boolean)
|
||||
|
||||
Protected m_ProdFileVM As ProdFileVM
|
||||
Public ReadOnly Property ProdFileVM As ProdFileVM
|
||||
Get
|
||||
Return m_ProdFileVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ProjFileList As New List(Of ProjectFileVM)
|
||||
Public ReadOnly Property ProjFileList As List(Of ProjectFileVM)
|
||||
Get
|
||||
Return m_ProjFileList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sProdId As String
|
||||
Get
|
||||
Return If(Not IsNothing(m_ProdFileVM), m_ProdFileVM.sProdId, "")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable Property sName As String
|
||||
Get
|
||||
Return If(Not IsNothing(m_ProdFileVM), m_ProdFileVM.sName, "")
|
||||
End Get
|
||||
Set(value As String)
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
m_delUpdateNameInDb(m_ProdFileVM.nProdId, value)
|
||||
m_ProdFileVM.sName = value
|
||||
m_delIsModifiedSetUp(False)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dtCreateDate As Date
|
||||
Get
|
||||
Return If(Not IsNothing(m_ProdFileVM), {m_ProdFileVM.dtCreateDate, m_ProjFileList.Min(Function(x) x.dtCreateDate)}.Min(), m_ProjFileList.Min(Function(x) x.dtCreateDate))
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property sCreateDate As String
|
||||
Get
|
||||
Return dtCreateDate.ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sMachine As String
|
||||
Get
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
Return m_ProdFileVM.sMachine
|
||||
ElseIf Not IsNothing(m_ProjFileList(0)) Then
|
||||
Return m_ProjFileList(0).sMachine
|
||||
Else Return ""
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property bIsArchived As Boolean
|
||||
Get
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
Return m_ProdFileVM.bIsArchived
|
||||
ElseIf Not IsNothing(m_ProjFileList(0)) Then
|
||||
Return m_ProjFileList(0).bIsArchived
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Archived_Visibility As Visibility
|
||||
Get
|
||||
Return If(bIsArchived, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(ProdFileVM As ProdFileVM, ProjFileVM As ProjFileVM)
|
||||
m_ProdFileVM = ProdFileVM
|
||||
m_ProjFileList.Add(ProjFileVM)
|
||||
End Sub
|
||||
|
||||
Sub New(ProjFileVM As ProjFileVM)
|
||||
m_ProjFileList = New List(Of ProjectFileVM)({ProjFileVM})
|
||||
End Sub
|
||||
|
||||
Sub New(ProdFileVM As ProjectFileVM, ProjFileVMList As List(Of ProjectFileVM))
|
||||
m_ProdFileVM = ProdFileVM
|
||||
m_ProjFileList = ProjFileVMList
|
||||
End Sub
|
||||
|
||||
|
||||
Public Shared Function CreateProdItem(nProdId As Integer, nProjIdList As List(Of Integer), dtCreateProjDate As DateTime, sName As String, nType As BWType,
|
||||
sMachine As String, sLockedBy As String, dtLock As DateTime, bIsActive As Boolean, bIsProduced As Boolean, bIsArchived As Boolean, ProjMList As List(Of ProjFileM)) As ProdItem
|
||||
|
||||
|
||||
Dim NewProdFileM = ProdFileM.CreateProdFileM(nProdId, nProjIdList, dtCreateProjDate, sName, nType, sMachine, sLockedBy, dtLock, bIsActive, bIsProduced, bIsArchived)
|
||||
Dim NewProdFileVM = New ProdFileVM(NewProdFileM)
|
||||
Dim NewProjFileVM As IEnumerable(Of ProjectFileVM)
|
||||
NewProjFileVM = ProjMList.Select(Of ProjFileVM)(Function(j) New ProjFileVM(j)).ToList
|
||||
Dim NewProdItem = New ProdItem(NewProdFileVM, NewProjFileVM.ToList)
|
||||
|
||||
Return NewProdItem
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProdItem(ProjFileM As ProjFileM) As ProdItem
|
||||
|
||||
Dim NewProdItem = New ProdItem(New ProjFileVM(ProjFileM))
|
||||
|
||||
Return NewProdItem
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,68 @@
|
||||
Public Class ProjFileM
|
||||
Inherits ProjectFileM
|
||||
|
||||
Protected m_dtExportDate As DateTime
|
||||
Public ReadOnly Property dtExportDate As DateTime
|
||||
Get
|
||||
Return m_dtExportDate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sListName As String
|
||||
Public ReadOnly Property sListName As String
|
||||
Get
|
||||
Return m_sListName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sBTLFileName As String = String.Empty
|
||||
Public Property sBTLFileName As String
|
||||
Get
|
||||
Return m_sBTLFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sBTLFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sDescription As String = String.Empty
|
||||
Public Property sDescription As String
|
||||
Get
|
||||
Return m_sDescription
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sDescription = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
Protected Sub New()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewProjFileM() As ProjFileM
|
||||
Return New ProjFileM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProjFileM(nProjId As Integer, nProdId As Integer, dtCreateProjDate As DateTime, dtExportDate As DateTime, sListName As String, sBTLFileName As String, sDescription As String, IsNew As Boolean, IsLocked As Boolean, nType As BWType, sMachine As String, bIsActive As Boolean, bIsArchived As Boolean) As ProjFileM
|
||||
Dim NewProjectFileM As New ProjFileM With {
|
||||
.m_nProjId = nProjId,
|
||||
.m_nProdId = nProdId,
|
||||
.m_dtCreateDate = dtCreateProjDate,
|
||||
.m_dtExportDate = dtExportDate,
|
||||
.m_sListName = sListName,
|
||||
.m_sBTLFileName = sBTLFileName,
|
||||
.m_sDescription = sDescription,
|
||||
.m_bIsNew = IsNew,
|
||||
.m_bIsLocked = IsLocked,
|
||||
.m_nType = nType,
|
||||
.m_sMachine = sMachine,
|
||||
.m_bIsActive = bIsActive,
|
||||
.m_bIsArchived = bIsArchived
|
||||
}
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,108 @@
|
||||
Public Class ProjectFileM
|
||||
|
||||
Protected m_nProjId As Integer = 0
|
||||
Public ReadOnly Property nProjId As Integer
|
||||
Get
|
||||
Return m_nProjId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_nProdId As Integer = 0
|
||||
Public ReadOnly Property nProdId As Integer
|
||||
Get
|
||||
Return m_nProdId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_dtCreateDate As DateTime
|
||||
Public ReadOnly Property dtCreateDate As DateTime
|
||||
Get
|
||||
Return m_dtCreateDate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_bIsNew As Boolean
|
||||
Public Property bIsNew As Boolean
|
||||
Get
|
||||
Return m_bIsNew
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsNew = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_bIsLocked As Boolean
|
||||
Public Property bIsLocked As Boolean
|
||||
Get
|
||||
Return m_bIsLocked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsLocked = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_nType As BWType
|
||||
Public Property nType As BWType
|
||||
Get
|
||||
Return m_nType
|
||||
End Get
|
||||
Set(value As BWType)
|
||||
m_nType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sMachine As String
|
||||
Public Property sMachine As String
|
||||
Get
|
||||
Return m_sMachine
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMachine = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sLockedBy As String
|
||||
Public Property sLockedBy As String
|
||||
Get
|
||||
Return m_sLockedBy
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sLockedBy = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_dtLock As DateTime
|
||||
Public Property dtLock As DateTime
|
||||
Get
|
||||
Return m_dtLock
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
m_dtLock = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_bIsActive As Boolean
|
||||
Public Property bIsActive As Boolean
|
||||
Get
|
||||
Return m_bIsActive
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsActive = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_bIsArchived As Boolean
|
||||
Public Property bIsArchived As Boolean
|
||||
Get
|
||||
Return m_bIsArchived
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsArchived = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,115 @@
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProdFileVM
|
||||
Inherits ProjectFileVM
|
||||
|
||||
Public ReadOnly Property ProdFileM As ProdFileM
|
||||
Get
|
||||
Return m_ProjectFileM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nProjIdList As List(Of Integer)
|
||||
Get
|
||||
Return ProdFileM.nProjIdList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property nProdId As Integer
|
||||
Get
|
||||
Return ProdFileM.nProdId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property sProdDirPath As String
|
||||
Get
|
||||
Dim sPath As String = String.Empty
|
||||
If IsNothing(ProdFileM.nProdId) OrElse ProdFileM.nProdId = 0 Then Return String.Empty
|
||||
Return m_sProdsDir & "\" & nProdId.ToString("0000")
|
||||
End Get
|
||||
End Property
|
||||
Public Overrides ReadOnly Property sProdPath As String
|
||||
Get
|
||||
Dim sPath As String = String.Empty
|
||||
If IsNothing(ProdFileM.nProdId) OrElse ProdFileM.nProdId = 0 Then Return String.Empty
|
||||
Return m_sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Property bIsNew As Boolean
|
||||
Get
|
||||
Return ProdFileM.bIsNew
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ProdFileM.bIsNew = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property sName As String
|
||||
Get
|
||||
Return ProdFileM.sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
ProdFileM.sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sBTLFileName As String
|
||||
Public ReadOnly Property sBTLFileName As String
|
||||
Get
|
||||
Return m_sBTLFileName
|
||||
End Get
|
||||
End Property
|
||||
Protected Sub SetBTLFileName(value As String)
|
||||
m_sBTLFileName = value
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property bIsProduced As Boolean
|
||||
Get
|
||||
Return ProdFileM.bIsProduced
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
Sub New(ProdFileM As ProdFileM)
|
||||
m_ProjectFileM = ProdFileM
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
Friend Function GetProjPath(nProjId As Integer)
|
||||
Dim sPath As String = String.Empty
|
||||
If nProjId = 0 Then Return String.Empty
|
||||
Return m_sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge"
|
||||
End Function
|
||||
|
||||
' funzione che restituisce le parti di nome file
|
||||
Friend Shared Function VerifyProjectFile(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
|
||||
If nProjectType = ProjectType.PROJ Then
|
||||
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||
If DataFromFileName.Count = 3 Then
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||
Integer.TryParse(DataFromFileName(0), nProjId)
|
||||
Else Return False
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||
Integer.TryParse(DataFromFileName(1), nProdId)
|
||||
Else
|
||||
nProdId = 0
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||
sBTLFileName = DataFromFileName(2)
|
||||
End If
|
||||
Return True
|
||||
Else Return False
|
||||
End If
|
||||
ElseIf nProjectType = ProjectType.PROD Then
|
||||
Return Integer.TryParse(ProjectFileName, nProdId)
|
||||
Else Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,127 @@
|
||||
Public Class ProjFileVM
|
||||
Inherits ProjectFileVM
|
||||
|
||||
Public ReadOnly Property ProjFileM As ProjFileM
|
||||
Get
|
||||
Return m_ProjectFileM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property nProjId As Integer
|
||||
Get
|
||||
Return ProjFileM.nProjId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property nProdId As Integer
|
||||
Get
|
||||
Return ProjFileM.nProdId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property sProjDirPath As String
|
||||
Get
|
||||
If IsNothing(ProjFileM.nProjId) OrElse ProjFileM.nProjId = 0 Then Return String.Empty
|
||||
Return m_sProjsDir & "\" & nProjId.ToString("0000")
|
||||
End Get
|
||||
End Property
|
||||
Public Overrides ReadOnly Property sProjPath As String
|
||||
Get
|
||||
Dim sPath As String = String.Empty
|
||||
If IsNothing(ProjFileM.nProjId) OrElse ProjFileM.nProjId = 0 Then Return String.Empty
|
||||
sPath = m_sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge"
|
||||
Return sPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property sProdDirPath As String
|
||||
Get
|
||||
Dim sPath As String = String.Empty
|
||||
If IsNothing(ProjFileM.nProdId) OrElse ProjFileM.nProdId = 0 Then Return String.Empty
|
||||
Return m_sProdsDir & "\" & nProdId.ToString("0000")
|
||||
End Get
|
||||
End Property
|
||||
Public Overrides ReadOnly Property sProdPath As String
|
||||
Get
|
||||
Dim sPath As String = String.Empty
|
||||
If IsNothing(ProjFileM.nProdId) OrElse ProjFileM.nProdId = 0 Then Return String.Empty
|
||||
Return m_sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Property bIsNew As Boolean
|
||||
Get
|
||||
Return ProjFileM.bIsNew
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ProjFileM.bIsNew = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sBTLFileName As String
|
||||
Get
|
||||
Return ProjFileM.sBTLFileName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sDescription As String
|
||||
Get
|
||||
Return ProjFileM.sDescription
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sListName As String
|
||||
Get
|
||||
Return ProjFileM.sListName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dtExportDate As DateTime
|
||||
Get
|
||||
Return ProjFileM.dtExportDate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
Sub New(ProjectFileM As ProjFileM)
|
||||
m_ProjectFileM = ProjectFileM
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub SetBTLFileName(BTLFileName As String)
|
||||
ProjFileM.sBTLFileName = BTLFileName
|
||||
End Sub
|
||||
|
||||
' funzione che restituisce le parti di nome file
|
||||
Friend Shared Function VerifyProjectFile(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
|
||||
If nProjectType = ProjectType.PROJ Then
|
||||
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||
If DataFromFileName.Count = 3 Then
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||
Integer.TryParse(DataFromFileName(0), nProjId)
|
||||
Else Return False
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||
Integer.TryParse(DataFromFileName(1), nProdId)
|
||||
Else
|
||||
nProdId = 0
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||
sBTLFileName = DataFromFileName(2)
|
||||
End If
|
||||
Return True
|
||||
Else Return False
|
||||
End If
|
||||
ElseIf nProjectType = ProjectType.PROD Then
|
||||
Return Integer.TryParse(ProjectFileName, nProdId)
|
||||
Else Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,182 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class ProjectFileVM
|
||||
Inherits VMBase
|
||||
|
||||
Protected Shared m_sProjsDir As String
|
||||
Protected Shared m_sProdsDir As String
|
||||
|
||||
Protected m_ProjectFileM As ProjectFileM
|
||||
|
||||
Public Overridable ReadOnly Property nProjId As Integer
|
||||
Get
|
||||
Return m_ProjectFileM.nProjId
|
||||
End Get
|
||||
End Property
|
||||
Public Overridable ReadOnly Property sProjId As String
|
||||
Get
|
||||
Return m_ProjectFileM.nProjId.ToString("0000")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable ReadOnly Property nProdId As Integer
|
||||
Get
|
||||
Return m_ProjectFileM.nProdId
|
||||
End Get
|
||||
End Property
|
||||
Public Overridable ReadOnly Property sProdId As String
|
||||
Get
|
||||
Return m_ProjectFileM.nProdId.ToString("0000")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable ReadOnly Property sProjDirPath As String
|
||||
Get
|
||||
If IsNothing(m_ProjectFileM.nProjId) OrElse m_ProjectFileM.nProjId = 0 Then Return String.Empty
|
||||
Return m_sProjsDir & "\" & nProjId.ToString("0000")
|
||||
End Get
|
||||
End Property
|
||||
Public Overridable ReadOnly Property sProjPath As String
|
||||
Get
|
||||
Dim sPath As String = String.Empty
|
||||
If IsNothing(m_ProjectFileM.nProjId) OrElse m_ProjectFileM.nProjId = 0 Then Return String.Empty
|
||||
sPath = m_sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge"
|
||||
Return sPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable ReadOnly Property sProdDirPath As String
|
||||
Get
|
||||
Dim sPath As String = String.Empty
|
||||
If IsNothing(m_ProjectFileM.nProdId) OrElse m_ProjectFileM.nProdId = 0 Then Return String.Empty
|
||||
Return m_sProdsDir & "\" & nProdId.ToString("0000")
|
||||
End Get
|
||||
End Property
|
||||
Public Overridable ReadOnly Property sProdPath As String
|
||||
Get
|
||||
Dim sPath As String = String.Empty
|
||||
If IsNothing(m_ProjectFileM.nProdId) OrElse m_ProjectFileM.nProdId = 0 Then Return String.Empty
|
||||
Return m_sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable Property bIsNew As Boolean
|
||||
Get
|
||||
Return m_ProjectFileM.bIsNew
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_ProjectFileM.bIsNew = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overridable Property bIsLocked As Boolean
|
||||
Get
|
||||
Return m_ProjectFileM.bIsLocked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_ProjectFileM.bIsLocked = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dtCreateDate As DateTime
|
||||
Get
|
||||
Return m_ProjectFileM.dtCreateDate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' variabile che indica se ricaricare il progetto
|
||||
Protected m_bReloadProject As Boolean = True
|
||||
Public ReadOnly Property bReloadProject As Boolean
|
||||
Get
|
||||
Return m_bReloadProject
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_nModificationIndex As Integer = Integer.MaxValue - 1000
|
||||
Public ReadOnly Property nModificationIndex As Integer
|
||||
Get
|
||||
Return m_nModificationIndex
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetModificationIndex(value As String)
|
||||
m_nModificationIndex = value
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property nType As BWType
|
||||
Get
|
||||
Return m_ProjectFileM.nType
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sMachine As String
|
||||
Get
|
||||
Return m_ProjectFileM.sMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property bIsActive As Boolean
|
||||
Get
|
||||
Return m_ProjectFileM.bIsActive
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property bIsArchived As Boolean
|
||||
Get
|
||||
Return m_ProjectFileM.bIsArchived
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Id_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61815)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property BTLFileName_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61819)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ListName_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61820)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ExportDate_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61821)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CreateDate_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61822)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Name_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61808)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "CONSTRUCTORS"
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
Public Sub SetReloadProject(bValue As Boolean)
|
||||
m_bReloadProject = bValue
|
||||
End Sub
|
||||
|
||||
Public Shared Sub Init(sProjsDir As String, sProdsDir As String)
|
||||
m_sProjsDir = sProjsDir
|
||||
m_sProdsDir = sProdsDir
|
||||
End Sub
|
||||
|
||||
Public Sub SetMachine(sMachine)
|
||||
m_ProjectFileM.sMachine = sMachine
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 610 B |
@@ -0,0 +1,552 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/EgtBEAMWALL.Core;component/Themes/Generic.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!--#region Colori per EgtWPFLib5-->
|
||||
|
||||
<SolidColorBrush x:Key="TextBox.Static.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
|
||||
|
||||
<!--#endregion Colori per EgtWPFLib5-->
|
||||
|
||||
<!--#region Colori Button-->
|
||||
|
||||
<SolidColorBrush x:Key="ButtonBasic.Static.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Static.Border" Color="{StaticResource BeamWall_DoveGray_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.MouseOver.Background" Color="{StaticResource BeamWall_FrenchPass_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.MouseOver.Border" Color="{StaticResource BeamWall_BostonBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Pressed.Background" Color="{StaticResource BeamWall_TropicalBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Pressed.Border" Color="{StaticResource BeamWall_Calypso_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Disabled.Background" Color="{StaticResource BeamWall_WildSand_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Disabled.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Disabled.Foreground" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Button.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="{StaticResource BeamWall_Glacier_Color}" Opacity="0.5"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="{StaticResource BeamWall_Glacier_Color}" Opacity="0.5"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="{StaticResource BeamWall_White_Color}" Opacity="0.5"/>
|
||||
|
||||
<SolidColorBrush x:Key="Button.TitleBar.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<LinearGradientBrush x:Key="Button.MainMenu.Background" EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.65"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="Button.MainMenu.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Button.General.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Button.PrManagerNew.Background" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori Button-->
|
||||
|
||||
<!--#region Colori ScrollBar-->
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Glyph" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Thumb" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Thumb" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Thumb" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Background" Color="{StaticResource BeamWall_LinkWater_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Border" Color="{StaticResource BeamWall_LinkWater_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Glyph" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Button.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori ScrollBar-->
|
||||
|
||||
<!--#region Colori ComboBox-->
|
||||
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="{StaticResource BeamWall_Seagull_Color}"/>
|
||||
<LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Selago_Color}" Offset="0.0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_HawkesBlue_Color}" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="{StaticResource BeamWall_Seagull_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
|
||||
<LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_HawkesBlue_Color}" Offset="0.0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_FrenchPass_Color}" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="{StaticResource BeamWall_Silver_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="{StaticResource BeamWall_Silver_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori ComboBox-->
|
||||
|
||||
<!--#region Colori Expander-->
|
||||
|
||||
<SolidColorBrush x:Key="Expander.Static.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Border" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="{StaticResource BeamWall_AliceBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="{StaticResource BeamWall_PattensBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}" Opacity="0.5"/>
|
||||
<SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="{StaticResource BeamWall_Mercury_Color}" Opacity="0.5"/>
|
||||
<SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}" Opacity="0.5"/>
|
||||
|
||||
<!--#endregion Colori Expander-->
|
||||
|
||||
<!--#region Colori ListBox-->
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.Static.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeature.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeatureIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeatureIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeatureNotSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeatureNotSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.MacroCustom.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.MacroDefault.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.FeatureManager.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.LeftPanel.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.Strategy.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.StrategyIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.StrategyIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.StrategyNoSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.StrategyNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.BTLIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLNoSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTL.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLNoSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.BTLPartIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLPartIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLPartNoSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLPartNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Item.MouseOver.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.MouseOver.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.MouseOver.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedActive.Background" Color="{StaticResource BeamWall_Keppel_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedActive.Border" Color="{StaticResource BeamWall_Keppel_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedActive.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#3DDADADA"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<!--#endregion Colori ListBox-->
|
||||
|
||||
<!--#region Colori TabItem-->
|
||||
|
||||
<LinearGradientBrush x:Key="TabItem.Static.Background" EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="0.85"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="TabItem.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<LinearGradientBrush x:Key="TabItem.Selected.Background" EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.85"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="TabItem.Selected.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.Disabled.Background" Color="{StaticResource BeamWall_Gallery_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.Disabled.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<!--#endregion Colori TabItem-->
|
||||
|
||||
<!--#region Colori TabControl-->
|
||||
|
||||
<SolidColorBrush x:Key="TabControl.Static.EgtManageDialog.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="TabControl.Static.EgtManageDialog.Border" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<LinearGradientBrush x:Key="TabControl.Static.Generic.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="TabControl.Optimizer.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!--#endregion Colori TabControl-->
|
||||
|
||||
<!--#region Colori ScrollViewer-->
|
||||
|
||||
<LinearGradientBrush x:Key="ScrollViewer.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Silver_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Alto_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!--#endregion Colori ScrollViewer-->
|
||||
|
||||
<!--#region Colori Grid-->
|
||||
|
||||
<LinearGradientBrush x:Key="Grid.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.65"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="Grid.Static.ExpanderDown.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Grid.Static.ExpanderUp.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Grid.Statistics.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Grid.UserAdmin.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<!--#endregion Colori Grid-->
|
||||
|
||||
<!--#region Colori GridSplitter-->
|
||||
|
||||
<SolidColorBrush x:Key="GridSplitter.Width.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="GridSplitter.Height.Background" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori GridSplitter-->
|
||||
|
||||
<!--#region Colori TreeView-->
|
||||
|
||||
<LinearGradientBrush x:Key="TreeView.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="TreeView.Static.EgtManageDialog.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori TreeView-->
|
||||
|
||||
<!--#region Colori TextBlock-->
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.Static.First.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.Static.Second.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.Static.Third.Foreground" Color="{StaticResource BeamWall_DarkGray_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.Static.Fouth.Foreground" Color="{StaticResource BeamWall_Black_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.UserAdmin.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.StrategyModify.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.CALC_ROT.Foreground" Color="{StaticResource BeamWall_Blue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.Prod.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.Prod.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.RawPartList.Foreground" Color="{StaticResource BeamWall_Orange_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.Error.Foreground" Color="{StaticResource BeamWall_Red_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.AlternationIndex_0.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.AlternationIndex_1.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.AlternationIndexIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion TextBlock-->
|
||||
|
||||
<!--#region Colori StackPanel-->
|
||||
|
||||
<SolidColorBrush x:Key="StackPanel.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="StackPanel.BTLTotParts.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="StackPanel.BTLTotTime.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="StackPanel.BTLRemainingTime.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="StackPanel.RawPart.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="StackPanel.Statistics.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori StackPanel-->
|
||||
|
||||
<!--#region Colori GroupBox-->
|
||||
|
||||
<SolidColorBrush x:Key="GroupBox.Static.Border" Color="{StaticResource BeamWall_Geyser_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="GroupBox.Static.OpenProjec.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="GroupBox.PDFPreview.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="GroupBox.MachinePanel.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<!--#endregion Colori GroupBox-->
|
||||
|
||||
<!--#region Colori Border-->
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.GroupBox.First.Border" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="Border.Static.GroupBox.Second.Border" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.Optmizer.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.EgtManageDialog.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.TitleBar.Background" Color="{StaticResource BeamWall_Casper_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.Static.TitleBar.Border" Color="{StaticResource BeamWall_Casper_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.AboutBoxV.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.Static.AboutBox.Border" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ButtonTitleBar.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.EgwWindow.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ControlTemplete.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ControlTemplete.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<LinearGradientBrush x:Key="Border.WithoutTitleBar.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="Border.EgtHexItem.Border" Color="{StaticResource BeamWall_Gold_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Parameter.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.Parameter.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.NewAddFeature.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.AlternationIndex.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ItemContainer.Background" Color="{StaticResource BeamWall_LinkWater_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ItemContainer.Border" Color="{StaticResource BeamWall_LinkWater_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ItemContainerIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ItemContainerIsSelected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Strategy.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.BTL.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ForcedStrategyBTL.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.BTLPart.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.TotalTime.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.TotalTime.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.DoneTime.Background" Color="{StaticResource BeamWall_FruitSalad_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.DoneTime.Border" Color="{StaticResource BeamWall_FruitSalad_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.RemainingTime.Background" Color="{StaticResource BeamWall_FuelYellow_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.RemainingTime.Border" Color="{StaticResource BeamWall_FuelYellow_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ProjectType.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ProjectType.Border" Color="{StaticResource BeamWall_DarkGray_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.AddFeature.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.PRC.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Custom.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.MacroCustom.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Default.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.MacroDefault.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.BTLPartManager.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.BTLPartManager.Border" Color="{StaticResource BeamWall_Teal_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.SetUp.Border" Color="{StaticResource BeamWall_Indigo_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.TopPanel.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.TopPanel.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
|
||||
<!--#endregion Colori Border-->
|
||||
|
||||
<!--#region Colori Rectangle-->
|
||||
|
||||
<SolidColorBrush x:Key="Rectangle.Static.Stroke" Color="{StaticResource BeamWall_Black_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Rectangle.EgtColorPicker.Stroke" Color="{StaticResource BeamWall_Black_Color}"/>
|
||||
|
||||
<!--#endregion Colori Rectangle-->
|
||||
|
||||
<!--#region Colori StatusBar-->
|
||||
|
||||
<SolidColorBrush x:Key="StatusBar.Static.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<!--#endregion Colori StatusBar-->
|
||||
|
||||
<!--#region Colori DatePicker-->
|
||||
|
||||
<SolidColorBrush x:Key="DatePicker.Static.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="DatePicker.Static.Border" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="DatePickerTextBox.Static.Background" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori DatePicker-->
|
||||
|
||||
<!--#region Colori Calendar-->
|
||||
|
||||
<LinearGradientBrush x:Key="Calendar.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="0.16"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="Calendar.Static.Border" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.75"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!--#endregion Colori Calendar-->
|
||||
|
||||
<!--#region Colori DataGrid-->
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Main.Background" Color="{StaticResource BeamWall_Teal_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Main.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Feature.Background" Color="{StaticResource BeamWall_Keppel_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Feature.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.PParam.Background" Color="{StaticResource BeamWall_Downy_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.PParam.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.RawPart.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.RawPart.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="DataGrid.Static.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="DataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGrid.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="RowDataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="CellDataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="RowDataGrid.Selected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="RowDataGrid.Selected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="RowDataGrid.Selected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="CellDataGrid.Selected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="CellDataGrid.Selected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="CellDataGrid.Selected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
|
||||
<!--#endregion Colori DataGrid-->
|
||||
|
||||
<!--#region Colori OptimizerWindow-->
|
||||
|
||||
<LinearGradientBrush x:Key="OptimizerWindow.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="OptimizerWindow.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="OptimizerWindow.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<!--#endregion Colori OtimizerWindow-->
|
||||
|
||||
<!--#region Colori EgtCustomWindow-->
|
||||
|
||||
<LinearGradientBrush x:Key="EgtCustomWindow.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="EgtCustomWindow.Static.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="EgtCustomWindow.Static.TitleBarBorder" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="EgtCustomWindow.Static.TitleBarForeground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori EgtCustomWindow-->
|
||||
|
||||
<!--#region Colori EgtFloatingPanel-->
|
||||
|
||||
<SolidColorBrush x:Key="EgtFloatingPanel.Static.Background" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
<SolidColorBrush x:Key="EgtFloatingPanel.Static.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
|
||||
<!--#endregion Colori EgtFloatingPanel-->
|
||||
|
||||
<!--#region Colori EgtHexItem-->
|
||||
|
||||
<SolidColorBrush x:Key="EgtHexItem.Static.Background" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="EgtHexItem.Static.Border" Color="{StaticResource BeamWall_Black_Color}"/>
|
||||
|
||||
<!--#endregion Colori EgtHexItem-->
|
||||
|
||||
<!--#region Colori Ellipse-->
|
||||
|
||||
<SolidColorBrush x:Key="Ellipse.Static.Fill" Color="{StaticResource BeamWall_Blue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Ellipse.Parameter.Fill" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Ellipse.ParameterIsChecked.Fill" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Ellipse.UpdateBTL.Fill" Color="{StaticResource BeamWall_Red_Color}"/>
|
||||
|
||||
<!--#endregion Colori Ellipse-->
|
||||
|
||||
<!--#region Colori ToggleButton-->
|
||||
|
||||
<SolidColorBrush x:Key="ToggleButton.Static.Background" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori ToggleButton-->
|
||||
|
||||
<!--#region Colori UniformGrid-->
|
||||
|
||||
<SolidColorBrush x:Key="UniformGrid.LeftPanel.Background" Color="{DynamicResource BeamWall_LinkWater_Color}"/>
|
||||
|
||||
<!--#endregion UniformGrid-->
|
||||
|
||||
<!--#region Colori ToolTip-->
|
||||
|
||||
<SolidColorBrush x:Key="ToolTip.PParameters.Background" Color="{DynamicResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ToolTip.PParameters.Foreground" Color="{DynamicResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori ToolTip-->
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,552 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/EgtBEAMWALL.Core;component/Themes/Generic.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!--#region Colori per EgtWPFLib5-->
|
||||
|
||||
<SolidColorBrush x:Key="TextBox.Static.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
|
||||
|
||||
<!--#endregion Colori per EgtWPFLib5-->
|
||||
|
||||
<!--#region Colori Button-->
|
||||
|
||||
<SolidColorBrush x:Key="ButtonBasic.Static.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Static.Border" Color="{StaticResource BeamWall_DoveGray_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.MouseOver.Background" Color="{StaticResource BeamWall_FrenchPass_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.MouseOver.Border" Color="{StaticResource BeamWall_BostonBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Pressed.Background" Color="{StaticResource BeamWall_TropicalBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Pressed.Border" Color="{StaticResource BeamWall_Calypso_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Disabled.Background" Color="{StaticResource BeamWall_WildSand_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Disabled.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
|
||||
<SolidColorBrush x:Key="ButtonBasic.Disabled.Foreground" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Button.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="{StaticResource BeamWall_Glacier_Color}" Opacity="0.5"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="{StaticResource BeamWall_Glacier_Color}" Opacity="0.5"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="{StaticResource BeamWall_White_Color}" Opacity="0.5"/>
|
||||
|
||||
<SolidColorBrush x:Key="Button.TitleBar.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<LinearGradientBrush x:Key="Button.MainMenu.Background" EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.65"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="Button.MainMenu.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Button.General.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Button.PrManagerNew.Background" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori Button-->
|
||||
|
||||
<!--#region Colori ScrollBar-->
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Glyph" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Thumb" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Thumb" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Thumb" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Background" Color="{StaticResource BeamWall_LinkWater_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Border" Color="{StaticResource BeamWall_LinkWater_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Glyph" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Button.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori ScrollBar-->
|
||||
|
||||
<!--#region Colori ComboBox-->
|
||||
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="{StaticResource BeamWall_Bombay_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="{StaticResource BeamWall_Seagull_Color}"/>
|
||||
<LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Selago_Color}" Offset="0.0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_HawkesBlue_Color}" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="{StaticResource BeamWall_Seagull_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
|
||||
<LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_HawkesBlue_Color}" Offset="0.0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_FrenchPass_Color}" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="{StaticResource BeamWall_Silver_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="{StaticResource BeamWall_Silver_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori ComboBox-->
|
||||
|
||||
<!--#region Colori Expander-->
|
||||
|
||||
<SolidColorBrush x:Key="Expander.Static.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Border" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="{StaticResource BeamWall_AliceBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="{StaticResource BeamWall_PattensBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}" Opacity="0.5"/>
|
||||
<SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="{StaticResource BeamWall_Mercury_Color}" Opacity="0.5"/>
|
||||
<SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="{StaticResource BeamWall_RegentStBlue_Color}" Opacity="0.5"/>
|
||||
|
||||
<!--#endregion Colori Expander-->
|
||||
|
||||
<!--#region Colori ListBox-->
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.Static.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeature.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeatureIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeatureIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeatureNotSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.NewAddFeatureNotSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.MacroCustom.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.MacroDefault.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.FeatureManager.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.LeftPanel.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.Strategy.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.StrategyIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.StrategyIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.StrategyNoSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.StrategyNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.BTLIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLNoSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTL.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLNoSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.ForcedStrategyBTLNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="ListBox.BTLPartIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLPartIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLPartNoSelected.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="ListBox.BTLPartNoSelected.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Item.MouseOver.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.MouseOver.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.MouseOver.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedActive.Background" Color="{StaticResource BeamWall_Keppel_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedActive.Border" Color="{StaticResource BeamWall_Keppel_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedActive.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#3DDADADA"/>
|
||||
<SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<!--#endregion Colori ListBox-->
|
||||
|
||||
<!--#region Colori TabItem-->
|
||||
|
||||
<LinearGradientBrush x:Key="TabItem.Static.Background" EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="0.85"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="TabItem.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.MouseOver.Background" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.MouseOver.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<LinearGradientBrush x:Key="TabItem.Selected.Background" EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.85"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="TabItem.Selected.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.Disabled.Background" Color="{StaticResource BeamWall_Gallery_Color}"/>
|
||||
<SolidColorBrush x:Key="TabItem.Disabled.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<!--#endregion Colori TabItem-->
|
||||
|
||||
<!--#region Colori TabControl-->
|
||||
|
||||
<SolidColorBrush x:Key="TabControl.Static.EgtManageDialog.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="TabControl.Static.EgtManageDialog.Border" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<LinearGradientBrush x:Key="TabControl.Static.Generic.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="TabControl.Optimizer.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!--#endregion Colori TabControl-->
|
||||
|
||||
<!--#region Colori ScrollViewer-->
|
||||
|
||||
<LinearGradientBrush x:Key="ScrollViewer.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Silver_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Alto_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!--#endregion Colori ScrollViewer-->
|
||||
|
||||
<!--#region Colori Grid-->
|
||||
|
||||
<LinearGradientBrush x:Key="Grid.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.65"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="Grid.Static.ExpanderDown.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Grid.Static.ExpanderUp.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Grid.Statistics.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Grid.UserAdmin.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<!--#endregion Colori Grid-->
|
||||
|
||||
<!--#region Colori GridSplitter-->
|
||||
|
||||
<SolidColorBrush x:Key="GridSplitter.Width.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="GridSplitter.Height.Background" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori GridSplitter-->
|
||||
|
||||
<!--#region Colori TreeView-->
|
||||
|
||||
<LinearGradientBrush x:Key="TreeView.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="TreeView.Static.EgtManageDialog.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori TreeView-->
|
||||
|
||||
<!--#region Colori TextBlock-->
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.Static.First.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.Static.Second.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.Static.Third.Foreground" Color="{StaticResource BeamWall_DarkGray_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.Static.Fouth.Foreground" Color="{StaticResource BeamWall_Black_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.UserAdmin.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.StrategyModify.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.CALC_ROT.Foreground" Color="{StaticResource BeamWall_Blue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.Prod.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.Prod.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.RawPartList.Foreground" Color="{StaticResource BeamWall_Orange_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.Error.Foreground" Color="{StaticResource BeamWall_Red_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="TextBlock.AlternationIndex_0.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.AlternationIndex_1.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="TextBlock.AlternationIndexIsSelected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion TextBlock-->
|
||||
|
||||
<!--#region Colori StackPanel-->
|
||||
|
||||
<SolidColorBrush x:Key="StackPanel.Static.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="StackPanel.BTLTotParts.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="StackPanel.BTLTotTime.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="StackPanel.BTLRemainingTime.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="StackPanel.RawPart.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="StackPanel.Statistics.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori StackPanel-->
|
||||
|
||||
<!--#region Colori GroupBox-->
|
||||
|
||||
<SolidColorBrush x:Key="GroupBox.Static.Border" Color="{StaticResource BeamWall_Geyser_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="GroupBox.Static.OpenProjec.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="GroupBox.PDFPreview.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="GroupBox.MachinePanel.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<!--#endregion Colori GroupBox-->
|
||||
|
||||
<!--#region Colori Border-->
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.GroupBox.First.Border" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="Border.Static.GroupBox.Second.Border" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.Optmizer.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.EgtManageDialog.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.TitleBar.Background" Color="{StaticResource BeamWall_Casper_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.Static.TitleBar.Border" Color="{StaticResource BeamWall_Casper_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Static.AboutBoxV.Border" Color="{StaticResource BeamWall_RegentStBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.Static.AboutBox.Border" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ButtonTitleBar.Background" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.EgwWindow.Border" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ControlTemplete.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ControlTemplete.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<LinearGradientBrush x:Key="Border.WithoutTitleBar.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="Border.EgtHexItem.Border" Color="{StaticResource BeamWall_Gold_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Parameter.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.Parameter.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.NewAddFeature.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.AlternationIndex.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ItemContainer.Background" Color="{StaticResource BeamWall_LinkWater_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ItemContainer.Border" Color="{StaticResource BeamWall_LinkWater_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ItemContainerIsSelected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ItemContainerIsSelected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Strategy.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.BTL.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ForcedStrategyBTL.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.BTLPart.Border" Color="Transparent"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.TotalTime.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.TotalTime.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.DoneTime.Background" Color="{StaticResource BeamWall_FruitSalad_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.DoneTime.Border" Color="{StaticResource BeamWall_FruitSalad_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.RemainingTime.Background" Color="{StaticResource BeamWall_FuelYellow_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.RemainingTime.Border" Color="{StaticResource BeamWall_FuelYellow_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.ProjectType.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.ProjectType.Border" Color="{StaticResource BeamWall_DarkGray_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.AddFeature.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.PRC.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Custom.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.MacroCustom.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.Default.Background" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.MacroDefault.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.BTLPartManager.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.BTLPartManager.Border" Color="{StaticResource BeamWall_Teal_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.SetUp.Border" Color="{StaticResource BeamWall_Indigo_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Border.TopPanel.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
<SolidColorBrush x:Key="Border.TopPanel.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
|
||||
<!--#endregion Colori Border-->
|
||||
|
||||
<!--#region Colori Rectangle-->
|
||||
|
||||
<SolidColorBrush x:Key="Rectangle.Static.Stroke" Color="{StaticResource BeamWall_Black_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Rectangle.EgtColorPicker.Stroke" Color="{StaticResource BeamWall_Black_Color}"/>
|
||||
|
||||
<!--#endregion Colori Rectangle-->
|
||||
|
||||
<!--#region Colori StatusBar-->
|
||||
|
||||
<SolidColorBrush x:Key="StatusBar.Static.Background" Color="{StaticResource BeamWall_Alto_Color}"/>
|
||||
|
||||
<!--#endregion Colori StatusBar-->
|
||||
|
||||
<!--#region Colori DatePicker-->
|
||||
|
||||
<SolidColorBrush x:Key="DatePicker.Static.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="DatePicker.Static.Border" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="DatePickerTextBox.Static.Background" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori DatePicker-->
|
||||
|
||||
<!--#region Colori Calendar-->
|
||||
|
||||
<LinearGradientBrush x:Key="Calendar.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="0.16"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="Calendar.Static.Border" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_LinkWater_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_RegentStBlue_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Glacier_Color}" Offset="0.75"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Kashmir_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<!--#endregion Colori Calendar-->
|
||||
|
||||
<!--#region Colori DataGrid-->
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Main.Background" Color="{StaticResource BeamWall_Teal_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Main.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Feature.Background" Color="{StaticResource BeamWall_Keppel_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.Feature.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.PParam.Background" Color="{StaticResource BeamWall_Downy_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.PParam.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.RawPart.Background" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGridColumnHeader.Static.RawPart.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="DataGrid.Static.Background" Color="Transparent"/>
|
||||
<SolidColorBrush x:Key="DataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="DataGrid.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="RowDataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
<SolidColorBrush x:Key="CellDataGrid.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="RowDataGrid.Selected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="RowDataGrid.Selected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="RowDataGrid.Selected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="CellDataGrid.Selected.Background" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="CellDataGrid.Selected.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="CellDataGrid.Selected.Border" Color="{StaticResource BeamWall_FountainBlue_Color}"/>
|
||||
|
||||
<!--#endregion Colori DataGrid-->
|
||||
|
||||
<!--#region Colori OptimizerWindow-->
|
||||
|
||||
<LinearGradientBrush x:Key="OptimizerWindow.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="OptimizerWindow.Static.Foreground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="OptimizerWindow.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
|
||||
<!--#endregion Colori OtimizerWindow-->
|
||||
|
||||
<!--#region Colori EgtCustomWindow-->
|
||||
|
||||
<LinearGradientBrush x:Key="EgtCustomWindow.Static.Background" EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="EgtCustomWindow.Static.Border" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
<SolidColorBrush x:Key="EgtCustomWindow.Static.TitleBarBorder" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="EgtCustomWindow.Static.TitleBarForeground" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori EgtCustomWindow-->
|
||||
|
||||
<!--#region Colori EgtFloatingPanel-->
|
||||
|
||||
<SolidColorBrush x:Key="EgtFloatingPanel.Static.Background" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
<SolidColorBrush x:Key="EgtFloatingPanel.Static.Border" Color="{StaticResource BeamWall_Gray_Color}"/>
|
||||
|
||||
<!--#endregion Colori EgtFloatingPanel-->
|
||||
|
||||
<!--#region Colori EgtHexItem-->
|
||||
|
||||
<SolidColorBrush x:Key="EgtHexItem.Static.Background" Color="{StaticResource BeamWall_CornflowerBlue_Color}"/>
|
||||
<SolidColorBrush x:Key="EgtHexItem.Static.Border" Color="{StaticResource BeamWall_Black_Color}"/>
|
||||
|
||||
<!--#endregion Colori EgtHexItem-->
|
||||
|
||||
<!--#region Colori Ellipse-->
|
||||
|
||||
<SolidColorBrush x:Key="Ellipse.Static.Fill" Color="{StaticResource BeamWall_Blue_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Ellipse.Parameter.Fill" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="Ellipse.ParameterIsChecked.Fill" Color="{StaticResource BeamWall_Kashmir_Color}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Ellipse.UpdateBTL.Fill" Color="{StaticResource BeamWall_Red_Color}"/>
|
||||
|
||||
<!--#endregion Colori Ellipse-->
|
||||
|
||||
<!--#region Colori ToggleButton-->
|
||||
|
||||
<SolidColorBrush x:Key="ToggleButton.Static.Background" Color="Transparent"/>
|
||||
|
||||
<!--#endregion Colori ToggleButton-->
|
||||
|
||||
<!--#region Colori UniformGrid-->
|
||||
|
||||
<SolidColorBrush x:Key="UniformGrid.LeftPanel.Background" Color="{DynamicResource BeamWall_LinkWater_Color}"/>
|
||||
|
||||
<!--#endregion UniformGrid-->
|
||||
|
||||
<!--#region Colori ToolTip-->
|
||||
|
||||
<SolidColorBrush x:Key="ToolTip.PParameters.Background" Color="{DynamicResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ToolTip.PParameters.Foreground" Color="{DynamicResource BeamWall_White_Color}"/>
|
||||
|
||||
<!--#endregion Colori ToolTip-->
|
||||
|
||||
</ResourceDictionary>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
Public Class ThemesDataServiceM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Property Name As String
|
||||
Public Property Path As String
|
||||
Public Property AssemblyName As String
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,101 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Resources
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ThemesDataServiceVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private ReadOnly m_Themes As New ObservableCollection(Of ThemesDataServiceM)()
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
ScanResources()
|
||||
ScanDisk(THEMES_FOLDER)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Restiusce il nome derivato dalla cartella
|
||||
''' </summary>
|
||||
''' <param name="path"></param>
|
||||
''' <param name="pathChar"></param>
|
||||
''' <param name="fileEnding"></param>
|
||||
''' <returns></returns>
|
||||
Private Function GetNameFromPath(ByVal path As String, ByVal Optional pathChar As Char = "/"c, ByVal Optional fileEnding As String = "Theme.xaml") As String
|
||||
Dim name As String = path.Substring(path.LastIndexOf(pathChar) + 1)
|
||||
name = name.Substring(0, name.Length - fileEnding.Length)
|
||||
name = Char.ToUpper(name(0)) & If(name.Length > 1, name.Substring(1), "")
|
||||
Return name
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Ricerca i file dizionario contente il tema
|
||||
''' </summary>
|
||||
''' <param name="fileEnding"></param>
|
||||
Private Sub ScanResources(ByVal Optional fileEnding As String = DICTIONARY_FILENAME)
|
||||
Dim assembly = System.Reflection.Assembly.GetExecutingAssembly()
|
||||
Dim resourceNames = assembly.GetManifestResourceNames()
|
||||
|
||||
For Each resourceName In resourceNames
|
||||
Dim [set] As New ResourceSet(assembly.GetManifestResourceStream(resourceName))
|
||||
|
||||
For Each item As DictionaryEntry In [set]
|
||||
Dim fileName As String = item.Key.ToString()
|
||||
|
||||
If fileName.ToLower().EndsWith(fileEnding.ToLower()) Then
|
||||
m_Themes.Add(New ThemesDataServiceM() With {
|
||||
.Name = GetNameFromPath(fileName),
|
||||
.Path = "pack://application:,,,/WpfTheme;component/" & fileName
|
||||
})
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Ricerca i temi presenti nel programma
|
||||
''' </summary>
|
||||
''' <param name="relativePath"></param>
|
||||
Private Sub ScanDisk(ByVal relativePath As String)
|
||||
If Directory.Exists(AppDomain.CurrentDomain.BaseDirectory & relativePath) Then
|
||||
Dim themeFiles = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory & relativePath, "*" & DICTIONARY_FILENAME, SearchOption.AllDirectories)
|
||||
|
||||
For Each fileName In themeFiles
|
||||
m_Themes.Add(New ThemesDataServiceM() With {
|
||||
.Name = GetNameFromPath(fileName, "\"c),
|
||||
.Path = fileName
|
||||
})
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Funzione che permette di selezionare e applicare il tema
|
||||
''' </summary>
|
||||
''' <param name="theme"></param>
|
||||
Public Sub SetTheme(ByVal theme As ThemesDataServiceM)
|
||||
If theme Is Nothing Then
|
||||
EgtOutLog("Error setting theme: Attempting to set theme to null.")
|
||||
Return
|
||||
End If
|
||||
|
||||
Try
|
||||
Dim uri As New Uri($"pack://application:,,,/{theme.AssemblyName};component/{theme.Path}", UriKind.Absolute)
|
||||
Application.Current.Resources.MergedDictionaries(1).Source = uri
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error setting theme: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,20 @@
|
||||
<Grid x:Class="TitleBar"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.ColumnSpan="6"
|
||||
Style="{StaticResource TitleBar_Border}"/>
|
||||
<Image MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
|
||||
Source="/Resources/EgalwareLogo.ico"/>
|
||||
<ContentControl Grid.Column="1"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding sTitle}"
|
||||
Style="{StaticResource TitleBar_TextBlock}"/>
|
||||
</Grid>
|
||||
@@ -0,0 +1,41 @@
|
||||
Imports System.Windows
|
||||
|
||||
Public Class TitleBar
|
||||
|
||||
' Proprietà che permette di attivare e disattivare lo spostamento della finestra
|
||||
Public Shared ReadOnly TitleProperty As DependencyProperty = DependencyProperty.Register("Title", GetType(String), GetType(TitleBar), New PropertyMetadata(""))
|
||||
Public Property Title() As Boolean
|
||||
Get
|
||||
Return CBool(GetValue(TitleProperty))
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetValue(TitleProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Proprietà che permette di attivare e disattivare lo spostamento della finestra
|
||||
Public Shared ReadOnly IsMinimizableProperty As DependencyProperty = DependencyProperty.Register("IsMinimizable", GetType(Boolean), GetType(TitleBar), New PropertyMetadata(True))
|
||||
Public Property IsMinimizable() As Boolean
|
||||
Get
|
||||
Return CBool(GetValue(IsMinimizableProperty))
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetValue(IsMinimizableProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Proprietà che permette di attivare e disattivare il bottone di chiusura della finestra
|
||||
Public Shared ReadOnly IsClosableProperty As DependencyProperty = DependencyProperty.Register("IsClosable", GetType(Boolean), GetType(TitleBar), New PropertyMetadata(True))
|
||||
Public Property IsClosable() As Boolean
|
||||
Get
|
||||
Return CBool(GetValue(IsClosableProperty))
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetValue(IsClosableProperty, value)
|
||||
If Not value Then
|
||||
IsMinimizable = False
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -18,6 +18,7 @@ Imports EgtWPFLib5
|
||||
Public Module BTLIniFile
|
||||
|
||||
Public m_sBTLIniFile As String
|
||||
Public m_nBTLBWType As BWType
|
||||
|
||||
Public Function GetBeamPrivateProfileProcessList(IpGRPType As GRPType, ByRef IpProcessList As ObservableCollection(Of Integer)) As Boolean
|
||||
Dim PRCList As New ObservableCollection(Of Integer)
|
||||
@@ -67,23 +68,6 @@ Public Module BTLIniFile
|
||||
Return IpGRPList.Count > 0
|
||||
End Function
|
||||
|
||||
'Public Function GetBeamPrivateProfileVerifyGRP(IpAppName As String, IpGPRtoVerify As String) As Boolean
|
||||
' ' ciclo sui tipi di gruppo
|
||||
' Dim sBTLGroup As String = String.Empty
|
||||
' If EgtUILib.GetPrivateProfileString(IpAppName, BTL_FTR_GRP, String.Empty, sBTLGroup, m_sBTLIniFile) > 0 Then
|
||||
' Dim sBTLGroups() As String = sBTLGroup.Split(","c)
|
||||
' ' verifico numero minimo di parametri
|
||||
' If sBTLGroups.Count >= 0 Then
|
||||
' ' cancello spazi
|
||||
' For Index = 0 To sBTLGroups.Count - 1
|
||||
' sBTLGroups(Index) = sBTLGroups(Index).Trim()
|
||||
' Next
|
||||
' End If
|
||||
' Return sBTLGroups.Contains(IpGPRtoVerify)
|
||||
' End If
|
||||
' Return False
|
||||
'End Function
|
||||
|
||||
Public Function CalcBeamPrivateProfileGRP(nGRP As Integer) As Integer
|
||||
If nGRP = 1 Or nGRP = 2 Then
|
||||
Return 1
|
||||
@@ -124,9 +108,16 @@ Public Module BTLIniFile
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean
|
||||
' funzione che ottiene il parametro P/Q usando m_nBTLBWType del modulo
|
||||
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IpVariant As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean
|
||||
Dim sBTLParam As String = String.Empty
|
||||
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & IpPRC, If(IsP, "P", "Q") & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
|
||||
Dim sBWQParam As String = String.Empty
|
||||
If m_nBTLBWType = BWType.BEAM Then
|
||||
sBWQParam = "B"
|
||||
ElseIf m_nBTLBWType = BWType.WALL Then
|
||||
sBWQParam = "W"
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & If(IpPRC = 900 AndAlso IpVariant > 0, IpPRC & "." & IpVariant, IpPRC), If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
|
||||
Dim sBTLParamParams() As String = sBTLParam.Split(","c)
|
||||
' verifico numero minimo di parametri
|
||||
If sBTLParamParams.Count >= 6 Then
|
||||
@@ -139,9 +130,9 @@ Public Module BTLIniFile
|
||||
Dim dMin As Double
|
||||
Dim dMax As Double
|
||||
Dim dDefault As Double
|
||||
StringToDouble(sBTLParamParams(2), dMin)
|
||||
StringToDouble(sBTLParamParams(3), dMax)
|
||||
StringToDouble(sBTLParamParams(4), dDefault)
|
||||
StringToDoubleAdv(sBTLParamParams(2), dMin)
|
||||
StringToDoubleAdv(sBTLParamParams(3), dMax)
|
||||
StringToDoubleAdv(sBTLParamParams(4), dDefault)
|
||||
Dim ParamType As BTLParamType
|
||||
If sBTLParamParams(0) = "d" Then
|
||||
ParamType = BTLParamType.DOUBLE_
|
||||
@@ -151,7 +142,7 @@ Public Module BTLIniFile
|
||||
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, ParamType, sBTLParamParams(1), dMin, dMax, dDefault, sBTLParamParams(5))
|
||||
Return Not IsNothing(IpBTLParam)
|
||||
ElseIf sBTLParamParams(0) = "s" Then
|
||||
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, BTLParamType.STRING_, sBTLParamParams(1), sBTLParamParams(5))
|
||||
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, BTLParamType.STRING_, sBTLParamParams(1), sBTLParamParams(4), sBTLParamParams(5))
|
||||
Return Not IsNothing(IpBTLParam)
|
||||
ElseIf sBTLParamParams(0) = "c" Then
|
||||
Dim nMin As Integer
|
||||
@@ -170,4 +161,57 @@ Public Module BTLIniFile
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' funzione che ottiene il parametro P/Q usando BTLBWType passato come argomento
|
||||
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM, BTLBWType As BWType) As Boolean
|
||||
Dim sBTLParam As String = String.Empty
|
||||
Dim sBWQParam As String = String.Empty
|
||||
If BTLBWType = BWType.BEAM Then
|
||||
sBWQParam = "B"
|
||||
ElseIf BTLBWType = BWType.WALL Then
|
||||
sBWQParam = "W"
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & IpPRC, If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
|
||||
Dim sBTLParamParams() As String = sBTLParam.Split(","c)
|
||||
' verifico numero minimo di parametri
|
||||
If sBTLParamParams.Count >= 6 Then
|
||||
' cancello spazi
|
||||
For Index = 0 To sBTLParamParams.Count - 1
|
||||
sBTLParamParams(Index) = sBTLParamParams(Index).Trim()
|
||||
Next
|
||||
' creo parametro
|
||||
If sBTLParamParams(0) = "d" OrElse sBTLParamParams(0) = "l" Then
|
||||
Dim dMin As Double
|
||||
Dim dMax As Double
|
||||
Dim dDefault As Double
|
||||
StringToDoubleAdv(sBTLParamParams(2), dMin)
|
||||
StringToDoubleAdv(sBTLParamParams(3), dMax)
|
||||
StringToDoubleAdv(sBTLParamParams(4), dDefault)
|
||||
Dim ParamType As BTLParamType
|
||||
If sBTLParamParams(0) = "d" Then
|
||||
ParamType = BTLParamType.DOUBLE_
|
||||
Else
|
||||
ParamType = BTLParamType.LENGTH
|
||||
End If
|
||||
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, ParamType, sBTLParamParams(1), dMin, dMax, dDefault, sBTLParamParams(5), sBWQParam)
|
||||
Return Not IsNothing(IpBTLParam)
|
||||
ElseIf sBTLParamParams(0) = "s" Then
|
||||
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, BTLParamType.STRING_, sBTLParamParams(1), sBTLParamParams(4), sBTLParamParams(5), sBWQParam)
|
||||
Return Not IsNothing(IpBTLParam)
|
||||
ElseIf sBTLParamParams(0) = "c" Then
|
||||
Dim nMin As Integer
|
||||
Dim nMax As Integer
|
||||
Dim nDefault As Integer
|
||||
Integer.TryParse(sBTLParamParams(2), nMin)
|
||||
Integer.TryParse(sBTLParamParams(3), nMax)
|
||||
Integer.TryParse(sBTLParamParams(4), nDefault)
|
||||
' recupero lista valori
|
||||
Dim ValueList As New List(Of String)
|
||||
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, BTLParamType.COMBO, sBTLParamParams(1), nMin, nMax, nDefault, sBTLParamParams(5), ValueList, sBWQParam)
|
||||
Return Not IsNothing(IpBTLParam)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
Imports System.Windows.Input
|
||||
|
||||
''' <summary>
|
||||
''' A command whose sole purpose is to
|
||||
''' relay its functionality to other
|
||||
''' objects by invoking delegates. The
|
||||
''' default return value for the CanExecute
|
||||
''' method is 'true'.
|
||||
''' </summary>
|
||||
Public Class Command
|
||||
Implements ICommand
|
||||
|
||||
#Region "Fields"
|
||||
|
||||
Private ReadOnly _execute As Action(Of Object)
|
||||
Private ReadOnly _canExecute As Predicate(Of Object)
|
||||
|
||||
#End Region ' Fields
|
||||
|
||||
#Region "Constructors"
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new command that can always execute.
|
||||
''' </summary>
|
||||
''' <param name="execute">The execution logic.</param>
|
||||
Public Sub New(ByVal execute As Action(Of Object))
|
||||
Me.New(execute, Nothing)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new command.
|
||||
''' </summary>
|
||||
''' <param name="execute">The execution logic.</param>
|
||||
''' <param name="canExecute">The execution status logic.</param>
|
||||
Public Sub New(ByVal execute As Action(Of Object), ByVal canExecute As Predicate(Of Object))
|
||||
If execute Is Nothing Then
|
||||
Throw New ArgumentNullException("execute")
|
||||
End If
|
||||
|
||||
_execute = execute
|
||||
_canExecute = canExecute
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructors
|
||||
|
||||
#Region "ICommand Members"
|
||||
|
||||
<DebuggerStepThrough> _
|
||||
Public Function CanExecute(ByVal parameter As Object) As Boolean Implements ICommand.CanExecute
|
||||
Return If(_canExecute Is Nothing, True, _canExecute(parameter))
|
||||
End Function
|
||||
|
||||
Public Custom Event CanExecuteChanged As EventHandler Implements ICommand.CanExecuteChanged
|
||||
AddHandler(ByVal value As EventHandler)
|
||||
AddHandler CommandManager.RequerySuggested, value
|
||||
End AddHandler
|
||||
RemoveHandler(ByVal value As EventHandler)
|
||||
RemoveHandler CommandManager.RequerySuggested, value
|
||||
End RemoveHandler
|
||||
RaiseEvent(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
End RaiseEvent
|
||||
End Event
|
||||
|
||||
Public Sub Execute(ByVal parameter As Object) Implements ICommand.Execute
|
||||
_execute(parameter)
|
||||
End Sub
|
||||
|
||||
#End Region ' ICommand Members
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,35 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports EgwProxy.LiMan
|
||||
|
||||
Public Module Configuration
|
||||
|
||||
' Test per comunicazione
|
||||
Public m_commLib As DataSyncro
|
||||
|
||||
''' <summary>
|
||||
''' Flag per visualizzare il pulsante Db Attrezzaggi
|
||||
''' </summary>
|
||||
Private m_bModifySetup As Boolean
|
||||
Public ReadOnly Property bModifySetup As Boolean
|
||||
Get
|
||||
Return m_bModifySetup
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetModifySetup(value As Boolean)
|
||||
m_bModifySetup = value
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Flag per salvare correttamente i dati nel file lua corretto
|
||||
''' </summary>
|
||||
Private m_bMachConfig As Boolean
|
||||
Public ReadOnly Property bMachConfig As Boolean
|
||||
Get
|
||||
Return m_bMachConfig
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetMachConfig(value As Boolean)
|
||||
m_bMachConfig = value
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user