Compare commits
704 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 649a1d6a46 | |||
| 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 |
@@ -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
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -90,6 +88,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 +129,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 +149,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
|
||||
@@ -174,7 +202,7 @@ Public Class BTLFeatureM
|
||||
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
|
||||
@@ -234,6 +262,7 @@ Public Class BTLFeatureM
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Protected Sub New()
|
||||
CreateVariantList()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewBTLFeature() As BTLFeatureM
|
||||
@@ -244,10 +273,11 @@ Public Class BTLFeatureM
|
||||
Dim NewBTLFeature As New BTLFeatureM
|
||||
NewBTLFeature.m_ParentPart = ParentPart
|
||||
NewBTLFeature.m_nFeatureId = nFeatureId
|
||||
' leggo gruppo, numero feature e lato
|
||||
' 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.m_bDO = (nDO <> 0)
|
||||
@@ -305,16 +335,29 @@ Public Class BTLFeatureM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateBTLFeature(nPRC As Integer, nGRP As Integer, nSIDE As Integer) As BTLFeatureM
|
||||
Dim NewBTLFeature As New BTLFeatureM
|
||||
NewBTLFeature.m_nPRC = nPRC
|
||||
NewBTLFeature.m_nSelGRP = nGRP
|
||||
NewBTLFeature.m_nSelSIDE = nSIDE
|
||||
NewBTLFeature.m_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
|
||||
|
||||
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
|
||||
|
||||
#Region "METHODS"
|
||||
@@ -350,15 +393,21 @@ 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
|
||||
@@ -423,7 +472,6 @@ Public Class BTLFeatureM
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_MSG)
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_FALL)
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_ROT)
|
||||
'EgtDuploSetModified(DirectCast(m_ParentPart, BTLPartM).m_nPartId)
|
||||
End If
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
@@ -467,7 +515,7 @@ Public Class BTLFeatureM
|
||||
If Param.nType = BTLParamType.DOUBLE_ Or Param.nType = BTLParamType.LENGTH Then
|
||||
Param.SetValue(Param.dDefault)
|
||||
ElseIf Param.nType = BTLParamType.STRING_ Then
|
||||
Param.SetValue("")
|
||||
Param.SetValue(Param.sDefault)
|
||||
ElseIf Param.nType = BTLParamType.COMBO Then
|
||||
Param.nSelValue = Param.dDefault
|
||||
End If
|
||||
@@ -491,9 +539,6 @@ Public Class BTLFeatureM
|
||||
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
|
||||
@@ -533,15 +578,16 @@ Public Class BTLFeatureM
|
||||
For Each QPar In QBTLParamMList
|
||||
If QPar.bCustom Then EgtSetInfo(nFeatureId, QPar.sName & "A", 1)
|
||||
Next
|
||||
EgtSetInfo(nFeatureId, BTL_FTR_PRIORITY, nPriority)
|
||||
SetFeatureId(nFeatureId)
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(ParentPart.nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(ParentPart.nPartId)
|
||||
bOk = True
|
||||
Else
|
||||
' Impossibile creare una feature con questi valori - ERRORE
|
||||
MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
|
||||
nFeatureId = EgtBeamModifyProcess(Me.nFeatureId, Me.nSelGRP, Me.nPRC, Me.nSelSIDE, "", Me.nPRID,
|
||||
New Frame3d(), vPar, sPar, vParQ, nCrvId, nCrv2Id)
|
||||
Me.frFRAME, vPar, sPar, vParQ, nCrvId, nCrv2Id)
|
||||
SetFeatureId(nFeatureId)
|
||||
bOk = False
|
||||
End If
|
||||
@@ -585,6 +631,11 @@ Public Class BTLFeatureM
|
||||
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,9 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class BTLParamM
|
||||
|
||||
@@ -129,6 +124,16 @@ Public Class BTLParamM
|
||||
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
|
||||
Protected m_nType As BTLParamType
|
||||
Public ReadOnly Property nType As BTLParamType
|
||||
@@ -136,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
|
||||
@@ -245,16 +253,18 @@ Public Class BTLParamM
|
||||
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, sDescription As String, sBWType As String)
|
||||
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
|
||||
@@ -289,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
|
||||
@@ -587,7 +590,7 @@ Public Class BTLPartM
|
||||
Public ReadOnly Property nINPROD As Integer
|
||||
Get
|
||||
Dim INPROD As Integer = 0
|
||||
EgtDuploCount(m_nPartId, INPROD)
|
||||
EgtDuploInRawCount(m_nPartId, INPROD)
|
||||
Return INPROD
|
||||
End Get
|
||||
End Property
|
||||
@@ -666,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
|
||||
@@ -760,6 +763,7 @@ Public Class BTLPartM
|
||||
Dim sValArray() As String
|
||||
Dim sValue As String = String.Empty
|
||||
Dim nValue As Integer = 0
|
||||
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
|
||||
@@ -797,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
|
||||
@@ -813,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")
|
||||
@@ -828,19 +832,19 @@ 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
|
||||
@@ -876,16 +880,15 @@ Public Class BTLPartM
|
||||
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
|
||||
|
||||
@@ -900,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
|
||||
|
||||
@@ -1001,197 +1002,6 @@ Public Class BTLPartM
|
||||
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"
|
||||
@@ -1210,7 +1020,7 @@ Public Class BTLPartM
|
||||
Return New List(Of BTLFeatureM)(m_BTLFeatureMList)
|
||||
End Function
|
||||
|
||||
Public Function Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional dAng As Double = 90) As Boolean
|
||||
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
|
||||
@@ -1242,14 +1052,14 @@ Public Class BTLPartM
|
||||
m_nROTATED = If(dNewRotation >= 0, dNewRotation, 360 + dNewRotation)
|
||||
EgtSetInfo(nPartId, BTL_PRT_ROTATED, m_nROTATED)
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(nPartId)
|
||||
End If
|
||||
' se era invertito
|
||||
If bInverted Then
|
||||
' ripristino inversione
|
||||
Inversion(SelectedMachineType)
|
||||
End If
|
||||
EgtDraw()
|
||||
If bRedraw Then EgtDraw()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
@@ -1275,7 +1085,7 @@ Public Class BTLPartM
|
||||
m_nINVERTED = If(m_nINVERTED = 0, 180, 0)
|
||||
EgtSetInfo(nPartId, BTL_PRT_INVERTED, m_nINVERTED)
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(nPartId)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class BTLStructureM
|
||||
@@ -175,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
|
||||
@@ -193,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
|
||||
@@ -252,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
|
||||
@@ -436,11 +435,6 @@ Public Class BTLStructureM
|
||||
If NewBTLStructure.m_nPROJTYPE <> BWType.NULL Then BTLIniFile.m_nBTLBWType = NewBTLStructure.m_nPROJTYPE
|
||||
' recupero i part
|
||||
NewBTLStructure.m_BTLPartMList = LoadParts(ProjId)
|
||||
'Dim nPartId As Integer = EgtGetFirstPart()
|
||||
'While nPartId <> GDB_ID.NULL
|
||||
' NewBTLStructure.m_BTLPartMList.Add(BTLPartM.CreateBTLPart(nPartId))
|
||||
' nPartId = EgtGetNextPart(nPartId)
|
||||
'End While
|
||||
Return NewBTLStructure
|
||||
End Function
|
||||
|
||||
@@ -483,7 +477,6 @@ Public Class BTLStructureM
|
||||
If IsNothing(BTLPartM) Then Return
|
||||
If Not m_BTLPartMList.Contains(BTLPartM) Then Return
|
||||
m_BTLPartMList.Remove(BTLPartM)
|
||||
'RaiseEvent BTLPartAdded(Me, New BTLPartAddedEventArgs(BTLPartM))
|
||||
End Sub
|
||||
|
||||
Public Function GetBTLParts() As List(Of BTLPartM)
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Media
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -64,6 +60,15 @@ Public Class BTLFeatureVM
|
||||
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
|
||||
@@ -206,19 +211,6 @@ Public Class BTLFeatureVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
'Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
|
||||
' m_BTLFeatureM = BTLFeatureM
|
||||
' AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
|
||||
' AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded
|
||||
' m_BTLPartM = BTLPartM
|
||||
' CreatePBTLParamVMList()
|
||||
' CreateQBTLParamVMList()
|
||||
' NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
' NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||
' NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||
' NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||
'End Sub
|
||||
|
||||
Sub New()
|
||||
End Sub
|
||||
|
||||
@@ -264,6 +256,9 @@ Public Class BTLFeatureVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub RefreshFeature()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
<EgtWPFLib5:EgtCustomWindow 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:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
Width="500" Height="450"
|
||||
IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||
|
||||
<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 TabControl_OnlyHeaders}"/>
|
||||
|
||||
<EgtBEAMWALL: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,0,0,5"
|
||||
BindingColumns="{Binding BeamMachiningsColumns}">
|
||||
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="Height" Value="25"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.Resources>
|
||||
<Style x:Key="DataGridCheckBoxColumn_Style"
|
||||
TargetType="{x:Type DataGridCell}">
|
||||
<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 EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</DataGridCheckBoxColumn.Header>
|
||||
</DataGridCheckBoxColumn>
|
||||
|
||||
<!--Colonna Name-->
|
||||
<DataGridTemplateColumn x:Key="colNAME">
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</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 EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</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>
|
||||
|
||||
</EgtBEAMWALL:EgtDataGrid>
|
||||
|
||||
<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_InputButton}"/>
|
||||
<Button Content="\/"
|
||||
Command="{Binding MoveRowDown_Command}"
|
||||
Grid.Column="1"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding AddRowMsg}"
|
||||
Command="{Binding AddRow_Command}"
|
||||
Grid.Column="2"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding DeleteRowMsg}"
|
||||
Command="{Binding DeleteRow_Command}"
|
||||
Grid.Column="3"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding SaveMsg}"
|
||||
Command="{Binding Save_Command}"
|
||||
Grid.Column="4"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,20 @@
|
||||
Imports System.Windows
|
||||
|
||||
Public Class BeamMachiningsWindowV
|
||||
|
||||
Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM
|
||||
|
||||
Sub New(Owner As Window, BeamMachiningsWindowVM As MyBeamMachiningsWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' 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,166 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdBeamMachiningsWindowV"
|
||||
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:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
Width="500" Height="450"
|
||||
IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<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 OnlyProdTabControl_OnlyHeaders}"/>
|
||||
|
||||
<Border Grid.Row="1" Margin="0,1,0,2" Style="{StaticResource OnlyProdPage_Border}">
|
||||
|
||||
<EgtBEAMWALL: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"
|
||||
ColumnHeaderBackground="{StaticResource BeamWall_Teal}"
|
||||
ColumnHeaderForeground="{StaticResource BeamWall_White}"
|
||||
ColumnHeaderHorizontalContentAlignment="Center"
|
||||
ColumnHeaderFontWeight="Bold"
|
||||
ColumnHeaderFontSize="15"
|
||||
ColumnHeaderPadding="0,2,0,2"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource DataGrid_OnlyProd}">
|
||||
|
||||
<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 EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</DataGridCheckBoxColumn.Header>
|
||||
</DataGridCheckBoxColumn>
|
||||
|
||||
<!--Colonna Name-->
|
||||
<DataGridTemplateColumn x:Key="colNAME">
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</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 EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</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>
|
||||
|
||||
</EgtBEAMWALL: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 OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="\/"
|
||||
Command="{Binding MoveRowDown_Command}"
|
||||
Grid.Column="1"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding AddRowMsg}"
|
||||
Command="{Binding AddRow_Command}"
|
||||
Grid.Column="2"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding DeleteRowMsg}"
|
||||
Command="{Binding DeleteRow_Command}"
|
||||
Grid.Column="3"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding SaveMsg}"
|
||||
Command="{Binding Save_Command}"
|
||||
Grid.Column="4"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class OnlyProdBeamMachiningsWindowV
|
||||
|
||||
Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM
|
||||
|
||||
Sub New(Owner As System.Windows.Window, BeamMachiningsWindowVM As MyBeamMachiningsWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' 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
|
||||
@@ -3,8 +3,6 @@ Imports System.Threading
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Module CalcIntegration
|
||||
|
||||
@@ -14,6 +12,8 @@ Public Module CalcIntegration
|
||||
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
|
||||
@@ -23,6 +23,10 @@ Public Module CalcIntegration
|
||||
POINT_CLOUD = 5
|
||||
RAWPART = 6
|
||||
EDIT = 7
|
||||
CHECKNOSIM = 8
|
||||
TOPOLOGY = 9
|
||||
OPENTOOLDB = 11 ' Non utilizzato
|
||||
OPENMACHINIGDB = 12 ' Non utilizzato
|
||||
End Enum
|
||||
|
||||
Private Structure MyProc
|
||||
@@ -38,8 +42,9 @@ Public Module CalcIntegration
|
||||
|
||||
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)
|
||||
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()
|
||||
@@ -62,7 +67,7 @@ Public Module CalcIntegration
|
||||
End If
|
||||
ElseIf Bar.nProgramPage = ProjectType.PROD Then
|
||||
If Bar.nGlobState = CalcStates.NOTCALCULATED Then
|
||||
Bar.sBarPath = CreateNewProjectFromMachGroup(Bar.nBarId, sProjDirPath)
|
||||
Bar.sBarPath = CreateNewProjectFromMachGroup(Bar.nBarId, sProjDirPath, Bar.nGlobState)
|
||||
Else
|
||||
Dim sMachGroupName As String = ""
|
||||
EgtGetMachGroupName(Bar.nBarId, sMachGroupName)
|
||||
@@ -75,7 +80,7 @@ Public Module CalcIntegration
|
||||
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.sBarPath = CreateNewProjectFromMachGroup(Bar.nBarId, sProjDirPath, Bar.nGlobState)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -148,8 +153,8 @@ Public Module CalcIntegration
|
||||
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
|
||||
"""" & vBar(nCurrBar).nProjType & """ " &
|
||||
"""" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType
|
||||
End If
|
||||
vProc(j).Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
@@ -159,11 +164,10 @@ Public Module CalcIntegration
|
||||
nActProc += 1
|
||||
End If
|
||||
Else
|
||||
If vBar(nCurrBar).nCmdType = CmdTypes.CHECK OrElse vBar(nCurrBar).nCmdType = CmdTypes.CHECKGEN Then
|
||||
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))
|
||||
'RaiseEvent Calc_ProcessEnd(Nothing, New CalcProcessEndEventArgs(vBar(nCurrBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
End If
|
||||
bDone = True
|
||||
nCurrBar += 1
|
||||
@@ -175,11 +179,10 @@ Public Module CalcIntegration
|
||||
' 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 Then
|
||||
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))
|
||||
'RaiseEvent Calc_ProcessEnd(Nothing, New CalcProcessEndEventArgs(vBar(vProc(j).nBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
End If
|
||||
bDone = True
|
||||
vProc(j).nBar = -1
|
||||
@@ -198,11 +201,10 @@ Public Module CalcIntegration
|
||||
' 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 Then
|
||||
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))
|
||||
'RaiseEvent Calc_ProcessEnd(Nothing, New CalcProcessEndEventArgs(vBar(vProc(j).nBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
End If
|
||||
bDone = True
|
||||
vProc(j).nBar = -1
|
||||
@@ -230,8 +232,8 @@ Public Module CalcIntegration
|
||||
Dim Proc As New Process()
|
||||
Proc.StartInfo.FileName = ExePath
|
||||
Proc.StartInfo.Arguments = """" & vBar(0).sBarPath & """ " &
|
||||
"""" & vBar(0).nProjType & """ " &
|
||||
"""" & vBar(0).nMachineName & """ " & CmdTypes.CHECKGEN
|
||||
"""" & vBar(0).nProjType & """ " &
|
||||
"""" & vBar(0).nMachineName & """ " & CmdTypes.CHECKGEN
|
||||
Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
If Proc.Start() Then
|
||||
@@ -352,27 +354,38 @@ Public Module CalcIntegration
|
||||
Return If(bOk, sPartFilePath, String.Empty)
|
||||
End Function
|
||||
|
||||
Private Function CreateNewProjectFromMachGroup(nMachGroupId As Integer, sProjDirPath As String) As String
|
||||
|
||||
' 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
|
||||
Private 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
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
If nMachGroupId <> nOldMachGroup Then
|
||||
If nOldMachGroup <> GDB_ID.NULL Then
|
||||
EgtSetCurrMachGroup(nOldMachGroup)
|
||||
Else
|
||||
EgtResetCurrMachGroup()
|
||||
' 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
|
||||
|
||||
@@ -402,11 +415,6 @@ Public Module CalcIntegration
|
||||
Dim nTaskId As Integer = nOutlineId
|
||||
If EgtGetInfo(nOutlineId, BTL_FTR_MAINID, nMainOffsId) Then
|
||||
nTaskId = nOutlineId + nMainOffsId
|
||||
'' assegno TASKID alla feature per calcoli
|
||||
'EgtSetInfo(nOutlineId, "TASKID", nOutlineId + nMainOffsId, True)
|
||||
'Else
|
||||
' ' assegno TASKID alla feature per calcoli
|
||||
' EgtSetInfo(nOutlineId, "TASKID", nOutlineId, True)
|
||||
End If
|
||||
' assegno TASKID alla feature per calcoli
|
||||
EgtSetInfo(nOutlineId, "TASKID", nTaskId)
|
||||
@@ -441,11 +449,6 @@ Public Module CalcIntegration
|
||||
Dim nTaskId As Integer = nFeatureId
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_MAINID, nMainOffsId) Then
|
||||
nTaskId = nFeatureId + nMainOffsId
|
||||
' ' assegno TASKID alla feature per calcoli
|
||||
' EgtSetInfo(nFeatureId, "TASKID", nFeatureId + nMainOffsId, True)
|
||||
'Else
|
||||
' ' assegno TASKID alla feature per calcoli
|
||||
' EgtSetInfo(nFeatureId, "TASKID", nFeatureId, True)
|
||||
End If
|
||||
' assegno TASKID alla feature per calcoli
|
||||
EgtSetInfo(nFeatureId, "TASKID", nTaskId)
|
||||
@@ -471,7 +474,6 @@ Public Module CalcIntegration
|
||||
End Module
|
||||
|
||||
Public Class Bar
|
||||
'Public piInfo As PatternInfo
|
||||
Public nBarState As Integer
|
||||
Public nBarId As Integer
|
||||
Public sBarPath As String
|
||||
@@ -579,4 +581,13 @@ Public Class ProcessResult
|
||||
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,80 @@
|
||||
<DockPanel x:Class="ConfigurationPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="6*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
|
||||
SelectedIndex="{Binding SelConfigSubPage}">
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding General_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<Button Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding General_Visibility}"
|
||||
Style="{StaticResource OptionPanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<EgtBEAMWALL:General_ConfigurationPageV/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding ParameterQ_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<Button Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding ParameterQ_Visibility}"
|
||||
Style="{StaticResource OptionPanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<EgtBEAMWALL:QParameter_ConfigurationPageV/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem >
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Machine_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<Button Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding Machine_Visibility}"
|
||||
Style="{StaticResource OptionPanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
|
||||
<TabItem.Content>
|
||||
<EgtBEAMWALL:Machine_ConfigurationPageV/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<!--<Button Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource OptionPanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class ConfigurationPageV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,121 @@
|
||||
<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>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Margin="5,5,5,0">
|
||||
<GroupBox Header="{Binding CurrentLanguage_Msg}"
|
||||
Margin="0,0,0,5">
|
||||
<UniformGrid Rows="2" Margin="3,3,3,3">
|
||||
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
||||
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
|
||||
Margin="0,0,0,5"
|
||||
Style="{x:Null}"/>
|
||||
<TextBlock Text="{Binding LanguageAdvert_Msg}" TextWrapping="Wrap"
|
||||
TextAlignment="Center"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding MMUnits_Msg}" VerticalAlignment="Center"/>
|
||||
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelMeasureUnit}" Height="25"
|
||||
Margin="0,5,0,0"
|
||||
Style="{x:Null}"/>
|
||||
</UniformGrid>
|
||||
<GroupBox Header="{Binding Nesting_Msg}"
|
||||
Margin="0,0,0,5">
|
||||
<StackPanel>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding SectionTime_Msg}"
|
||||
Grid.Row="0" Grid.Column="0"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"
|
||||
Grid.Row="0" Grid.Column="1"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding PartTime_Msg}"
|
||||
Grid.Row="1" Grid.Column="0"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding PartTime, UpdateSourceTrigger=Explicit}"
|
||||
Grid.Row="1" Grid.Column="1"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding PrintLabel_Msg}" VerticalAlignment="Center"/>
|
||||
<CheckBox IsChecked="{Binding bPrintLabel_IsChecked}"
|
||||
Margin="0,5,0,0"/>
|
||||
</UniformGrid>
|
||||
<GroupBox Header="Backup And Restore">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0"
|
||||
Margin="0,2,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox x:Name="ExternalBackup_CheckBox"
|
||||
IsChecked="{Binding bExternalBackupActive}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="External file path:"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="0,2,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Text="{Binding ExternalBackupFolderPath}"
|
||||
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Grid.Column="1"
|
||||
Content="..."
|
||||
Width="18"
|
||||
Command="{Binding ChooseExternalBackupFolderPath_Command}"
|
||||
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Reminder Frequency"/>
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding ReminderList}"
|
||||
SelectedItem="{Binding SelReminder}"
|
||||
Style="{x:Null}"/>
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="3"
|
||||
Orientation="Horizontal">
|
||||
<Button Content="Backup"
|
||||
Command="{Binding Backup_Command}"
|
||||
Style="{StaticResource ToolBar_TextButton}"/>
|
||||
<Button Content="Restore"
|
||||
Command="{Binding Restore_Command}"
|
||||
Style="{StaticResource ToolBar_TextButton}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class General_ConfigurationPageV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,79 @@
|
||||
<Grid x:Class="Machine_ConfigurationPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtBEAMWALL="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 Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
|
||||
<GroupBox Style="{StaticResource GroupBoxStyle_NoHeader}" Padding="5,10,5,5">
|
||||
<EgtBEAMWALL:MachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Visibility="{Binding MachineParameter_Visibility}">
|
||||
<ItemsControl ItemsSource="{Binding ConfigMachTableList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel x:Name="GroupStackPanel" Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<GroupBox Header="{Binding sName}" Width="Auto" VerticalAlignment="Top" Height="Auto">
|
||||
<ItemsControl Name="MachParamsItemsControl" ItemsSource="{Binding MachParamList}" Margin="0,5,0,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,0,5,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
ToolTip="{Binding sName}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="190"
|
||||
Style="{StaticResource MachParamTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||
Grid.Column="1"
|
||||
Width="60"/>
|
||||
<TextBlock Text="{Binding sDescription}"
|
||||
ToolTip="{Binding sDescription}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="185"
|
||||
Style="{StaticResource MachParamTextBlock}"
|
||||
Grid.Column="2"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</GroupBox>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
|
||||
<Button Command="{Binding SaveCommand}"
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding Machine_Visibility}"
|
||||
Style="{StaticResource MachinePanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class Machine_ConfigurationPageV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,124 @@
|
||||
<Grid x:Class="OnlyProdGeneral_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>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Margin="5,5,5,0">
|
||||
<GroupBox Header="{Binding CurrentLanguage_Msg}"
|
||||
Margin="0,0,0,5"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<UniformGrid Rows="2" Margin="3,3,3,3">
|
||||
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
||||
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
|
||||
Margin="0,0,0,5" Style="{StaticResource OnlyProd_ComboBox}" />
|
||||
<TextBlock Text="{Binding LanguageAdvert_Msg}" TextWrapping="Wrap"
|
||||
TextAlignment="Center"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding MMUnits_Msg}" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelMeasureUnit}" Height="25"
|
||||
Margin="0,5,0,0" Style="{StaticResource OnlyProd_ComboBox}" />
|
||||
</UniformGrid>
|
||||
<GroupBox Header="{Binding Nesting_Msg}"
|
||||
Margin="0,0,0,5"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<StackPanel>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding SectionTime_Msg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<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"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding PrintLabel_Msg}" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<CheckBox IsChecked="{Binding bPrintLabel_IsChecked}"
|
||||
Margin="0,5,0,0"/>
|
||||
</UniformGrid>
|
||||
<GroupBox Header="Backup And Restore"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="0,2,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox x:Name="ExternalBackup_CheckBox"
|
||||
IsChecked="{Binding bExternalBackupActive}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="External file path:"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="0,2,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Text="{Binding ExternalBackupFolderPath}"
|
||||
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Grid.Column="1"
|
||||
Content="..."
|
||||
Foreground="{StaticResource BeamWall_White}"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding ChooseExternalBackupFolderPath_Command}"
|
||||
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Reminder Frequency"/>
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding ReminderList}"
|
||||
SelectedItem="{Binding SelReminder}"
|
||||
Margin="0,0,0,5" Style="{StaticResource OnlyProd_ComboBox}" />
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="3"
|
||||
Orientation="Horizontal">
|
||||
<Button Content="Backup"
|
||||
Command="{Binding Backup_Command}"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"
|
||||
Margin="0,0,5,0"/>
|
||||
<Button Content="Restore"
|
||||
Command="{Binding Restore_Command}"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class OnlyProdGeneral_ConfigurationPageV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,78 @@
|
||||
<Grid x:Class="OnlyProdMachine_ConfigurationPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtBEAMWALL="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 GroupBoxStyle_NoHeader}" Padding="5,10,5,5">
|
||||
<EgtBEAMWALL:OnlyProdMachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Visibility="{Binding MachineParameter_Visibility}">
|
||||
<ItemsControl ItemsSource="{Binding ConfigMachTableList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel x:Name="GroupStackPanel" Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<GroupBox Header="{Binding sName}" Width="Auto" VerticalAlignment="Top" Height="Auto" Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<ItemsControl Name="MachParamsItemsControl" ItemsSource="{Binding MachParamList}" Margin="0,5,0,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,0,5,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
ToolTip="{Binding sName}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="150"
|
||||
Style="{StaticResource MachParamTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||
Width="60"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding sDescription}"
|
||||
ToolTip="{Binding sDescription}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="148"
|
||||
Style="{StaticResource MachParamTextBlock}"/>
|
||||
</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="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class OnlyProdMachine_ConfigurationPageV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,82 @@
|
||||
<Grid x:Class="OnlyProdQParameter_ConfigurationPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Style="{StaticResource OnlyProdPage_Border}"/>
|
||||
|
||||
<EgtBEAMWALL:OnlyProd_QParamListV DataContext="{Binding}"
|
||||
ItemsSource="{Binding QBTLParamVMList}"
|
||||
SelectedItem="{Binding SelQParam}"
|
||||
Margin="5">
|
||||
<DataGrid.GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.Panel>
|
||||
<ItemsPanelTemplate>
|
||||
<DataGridRowsPresenter/>
|
||||
</ItemsPanelTemplate>
|
||||
</GroupStyle.Panel>
|
||||
<GroupStyle.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=Name}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</GroupStyle.HeaderTemplate>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True">
|
||||
<Expander.Background>
|
||||
<SolidColorBrush Color="#FFBABABA"/>
|
||||
</Expander.Background>
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Path=Name}"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<ItemsPresenter />
|
||||
</Expander>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True">
|
||||
<Expander.Background>
|
||||
<SolidColorBrush Color="LightGray"/>
|
||||
</Expander.Background>
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Path=Name}"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<ItemsPresenter />
|
||||
</Expander>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
</DataGrid.GroupStyle>
|
||||
</EgtBEAMWALL:OnlyProd_QParamListV>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class OnlyProdQParameter_ConfigurationPageV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,80 @@
|
||||
<Grid x:Class="QParameter_ConfigurationPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<EgtBEAMWALL:QParamListV DataContext="{Binding}"
|
||||
ItemsSource="{Binding QBTLParamVMList}"
|
||||
SelectedItem="{Binding SelQParam}"
|
||||
Grid.Column="0"
|
||||
Margin="5">
|
||||
<DataGrid.GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.Panel>
|
||||
<ItemsPanelTemplate>
|
||||
<DataGridRowsPresenter/>
|
||||
</ItemsPanelTemplate>
|
||||
</GroupStyle.Panel>
|
||||
<GroupStyle.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=Name}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</GroupStyle.HeaderTemplate>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True" Style="{x:Null}">
|
||||
<Expander.Background>
|
||||
<SolidColorBrush Color="#FFBABABA"></SolidColorBrush>
|
||||
</Expander.Background>
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Path=Name}" />
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<ItemsPresenter />
|
||||
</Expander>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True" Style="{x:Null}">
|
||||
<Expander.Background>
|
||||
<SolidColorBrush Color="LightGray"></SolidColorBrush>
|
||||
</Expander.Background>
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Path=Name}" />
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<ItemsPresenter />
|
||||
</Expander>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
</DataGrid.GroupStyle>
|
||||
</EgtBEAMWALL:QParamListV>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class QParameter_ConfigurationPageV
|
||||
|
||||
End Class
|
||||
@@ -104,9 +104,6 @@
|
||||
|
||||
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
|
||||
@@ -126,6 +123,8 @@
|
||||
|
||||
' layer per assemblato
|
||||
Public Const ASSEBASE As String = "AsseBase"
|
||||
' info parametri assemblato
|
||||
Public Const BTL_ASSEBASE_N As String = "N"
|
||||
|
||||
' info parametri BTL
|
||||
Public Const BTL_PRT_PROJ As String = "PROJ"
|
||||
@@ -142,6 +141,8 @@
|
||||
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
|
||||
Public Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
|
||||
Public Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
|
||||
@@ -167,14 +168,15 @@
|
||||
Public Const BTL_PRT_ELEMENTNUM = "ELEMENTNUMBER"
|
||||
Public Const BTL_PRT_LAYER = "LAYER"
|
||||
Public Const BTL_PRT_MODULENUM = "MODULENUMBER"
|
||||
'Friend Const BTL_PRT_USERATTRIBUTE = "USERATTRIBUTE"
|
||||
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
|
||||
Public Const BTL_GEN_BTLPATH = "BTL"
|
||||
Public Const BTL_GEN_PROJNUM = "PROJECTNUMBER"
|
||||
Public Const BTL_GEN_PROJNAME = "PROJECTNAME"
|
||||
Public Const BTL_GEN_PROJPART = "PROJECTPART"
|
||||
@@ -197,11 +199,14 @@
|
||||
Public Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE"
|
||||
|
||||
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"
|
||||
@@ -249,6 +254,7 @@
|
||||
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
|
||||
@@ -284,6 +290,7 @@
|
||||
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"
|
||||
@@ -295,5 +302,10 @@
|
||||
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"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -1,16 +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
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
Public Module ConstDataGridColumnsIni
|
||||
|
||||
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.ini"
|
||||
Public Const OPTIMIZERDATAGRIDCOLUMNS_FILE_NAME As String = "OPTIMIZERDataGridColumns.ini"
|
||||
|
||||
Public Const S_FEATURELIST As String = "DG_FeatureList"
|
||||
Public Const S_OPENPROJFILEDLG_PROJ As String = "DG_OpenProjectFileDialog_PROJ"
|
||||
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"
|
||||
@@ -18,6 +20,7 @@
|
||||
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_BEAMMACHININGS As String = "DG_BeamMachinings"
|
||||
@@ -27,6 +30,8 @@
|
||||
Public Const S_SECTXMATLIST_WALL As String = "DG_SectXMatList_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"
|
||||
|
||||
|
||||
@@ -9,5 +9,6 @@
|
||||
Public Const TOPPANEL_OPTIMIZER As String = "TopPanel_Optimizer"
|
||||
Public Const LEFTPANEL_SUPERVISOR As String = "LeftPanel_Supervisor"
|
||||
Public Const PROJECT_SUPERVISOR As String = "Project_Supervisor"
|
||||
Public Const PROJECT_ONLYPROD As String = "Project_OnlyProd"
|
||||
|
||||
End Class
|
||||
|
||||
@@ -21,8 +21,10 @@ Public Module ConstGen
|
||||
' File con dati di licenza
|
||||
Public Const LIC_FILE_NAME As String = "EgtBEAMWALL.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
|
||||
@@ -32,6 +34,7 @@ Public Module ConstGen
|
||||
CONFIG = 3
|
||||
INPUTS = 4
|
||||
OUTPUTS = 5
|
||||
ONLYPRODPAGE = 6
|
||||
End Enum
|
||||
|
||||
' Abilitazioni licenza
|
||||
@@ -41,6 +44,14 @@ Public Module ConstGen
|
||||
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
|
||||
@@ -58,13 +69,19 @@ Public Module ConstGen
|
||||
' Sottodirettorio per Csv automatico
|
||||
Public Const PRODS_DIR As String = "Prods"
|
||||
' Sottodirettorio per Macro
|
||||
Public Const MACRO_DIR As String = "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
|
||||
@@ -77,5 +94,15 @@ Public Module ConstGen
|
||||
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"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -15,100 +15,61 @@ Public Module ConstIni
|
||||
|
||||
Public Const INI_FILE_NAME As String = "EgtBEAMWALL.ini"
|
||||
|
||||
'Public Const S_GENERAL As String = "General"
|
||||
'Public Const K_DEBUG As String = "Debug"
|
||||
'Public Const K_LICENCE As String = "Licence"
|
||||
'Public Const K_USERLEVEL As String = "UserLevel"
|
||||
'Public Const K_MAXINST As String = "MaxInstances"
|
||||
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_COMMANDLOG As String = "CommandLog"
|
||||
'Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
'Public Const K_MESSAGES As String = "Messages"
|
||||
'Public Const K_WINPLACE As String = "WinPlace"
|
||||
'Public Const K_LASTPROJ As String = "LastProj"
|
||||
'Public Const K_AUTOLOADLASTPROJ As String = "AutoLoadLastProj"
|
||||
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_SUPPORT As String = "Support"
|
||||
Public Const K_WAREHOUSE As String = "Warehouse"
|
||||
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 S_LANGUAGES As String = "Languages"
|
||||
'Public Const K_LANGUAGE As String = "Language"
|
||||
|
||||
'Public Const S_LUA As String = "Lua"
|
||||
'Public Const K_LIBSDIR As String = "LibsDir"
|
||||
'Public Const K_BASELIB As String = "BaseLib"
|
||||
|
||||
'Public Const S_GEOMDB As String = "GeomDB"
|
||||
'Public Const K_DEFAULTFONT As String = "DefaultFont"
|
||||
'Public Const K_NFEFONTDIR As String = "NfeFontDir"
|
||||
'Public Const K_DEFAULTCOLOR As String = "DefaultColor"
|
||||
'Public Const K_SAVETYPE As String = "SaveType"
|
||||
|
||||
'Public Const S_OPENGL As String = "OpenGL"
|
||||
'Public Const K_DOUBLEBUFFER As String = "DoubleBuffer"
|
||||
'Public Const K_COLORBITS As String = "ColorBits"
|
||||
'Public Const K_DEPTHBITS As String = "DepthBits"
|
||||
'Public Const K_DRIVER As String = "Driver"
|
||||
|
||||
'Public Const S_SCENE As String = "Scene"
|
||||
'Public Const K_BACKTOP As String = "BackTop"
|
||||
'Public Const K_BACKBOTTOM As String = "BackBottom"
|
||||
'Public Const K_SHOWGFRAME As String = "ShowGFrame"
|
||||
'Public Const K_MARK As String = "Mark"
|
||||
'Public Const K_SELSURF As String = "SelSurf"
|
||||
'Public Const K_SHOWMODE As String = "ShowMode"
|
||||
Public Const K_SHOWBUILDING As String = "ShowBuilding"
|
||||
'Public Const K_CURVEDIR As String = "CurveDir"
|
||||
'Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
|
||||
'Public Const K_SHOWZMAP As String = "ShowZmap"
|
||||
'Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
|
||||
'Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||
'Public Const K_DISTLINE As String = "DistLine"
|
||||
'Public Const K_MMUNITS As String = "MmUnits"
|
||||
|
||||
'Public Const S_GRID As String = "Grid"
|
||||
'Public Const K_SHOWGRID As String = "ShowGrid"
|
||||
'Public Const K_SHOWFRAME As String = "ShowFrame"
|
||||
'Public Const K_SNAPSTEP As String = "SnapStep"
|
||||
'Public Const K_SNAPSTEPINCH As String = "SnapStepInch"
|
||||
'Public Const K_MINLINESSTEP As String = "MinLineSStep"
|
||||
'Public Const K_MAJLINESSTEP As String = "MajLineSStep"
|
||||
'Public Const K_EXTSSTEP As String = "ExtSStep"
|
||||
'Public Const K_MINLNCOLOR As String = "MinLnColor"
|
||||
'Public Const K_MAJLNCOLOR As String = "MajLnColor"
|
||||
|
||||
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 S_MACH As String = "Mach"
|
||||
'Public Const K_MACHINESDIR As String = "MachinesDir"
|
||||
'Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
|
||||
'Public Const K_CURRMACH As String = "CurrMach"
|
||||
Public Const K_SUPERVISORMACH As String = "SupervisorMach"
|
||||
Public Const K_PASSWORD As String = "Password"
|
||||
|
||||
'Public Const S_SIMUL As String = "Simul"
|
||||
'Public Const K_SLIDERX As String = "SliderX"
|
||||
'Public Const K_SLIDERVAL As String = "SliderVal"
|
||||
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 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_NEST As String = "Nest"
|
||||
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"
|
||||
@@ -136,4 +97,28 @@ Public Module ConstIni
|
||||
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 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_ONLYPROD As String = "OnlyProd"
|
||||
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"
|
||||
End Module
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
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"
|
||||
|
||||
@@ -21,5 +27,6 @@
|
||||
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
|
||||
|
||||
@@ -47,18 +47,56 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtUILib, Version=2.3.7.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\EgtProg\Dll32\EgtUILib.dll</HintPath>
|
||||
<Reference Include="EgtUILib">
|
||||
<HintPath>..\ExtLibs\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5, Version=2.3.4.3, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\EgtProg\Dll32\EgtWPFLib5.dll</HintPath>
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<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="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.1\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" />
|
||||
@@ -78,8 +116,33 @@
|
||||
<Import Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml.vb">
|
||||
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BeamMachiningsWindow\MyBeamMachiningsWindowVM.vb" />
|
||||
<Compile Include="BeamMachiningsWindow\OnlyProdBeamMachiningsWindowV.xaml.vb">
|
||||
<DependentUpon>OnlyProdBeamMachiningsWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BTLViewModel\BTLFeatureVM.vb" />
|
||||
<Compile Include="CALCPanel\CalcEditEndEventArgs.vb" />
|
||||
<Compile Include="ConfigurationPage\OnlyProdMachine_ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>OnlyProdMachine_ConfigurationPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ConfigurationPage\OnlyProdGeneral_ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>OnlyProdGeneral_ConfigurationPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ConfigurationPage\General_ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>General_ConfigurationPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ConfigurationPage\Machine_ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>Machine_ConfigurationPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ConfigurationPage\OnlyProdQParameter_ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>OnlyProdQParameter_ConfigurationPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ConfigurationPage\QParameter_ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>QParameter_ConfigurationPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Constants\ConstColumns.vb" />
|
||||
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
|
||||
<Compile Include="Constants\ConstDims.vb" />
|
||||
@@ -88,6 +151,12 @@
|
||||
<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="EgtColorPicker\OnlyProdEgtColorPickerV.xaml.vb">
|
||||
<DependentUpon>OnlyProdEgtColorPickerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtDataGrid\EgtDataGrid.xaml.vb">
|
||||
<DependentUpon>EgtDataGrid.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -98,6 +167,24 @@
|
||||
<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="EgtManageFileDialog\OnlyProdEgtManageFileDialogV.xaml.vb">
|
||||
<DependentUpon>OnlyProdEgtManageFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
|
||||
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtMessageBox\OnlyProdEgtMessageBoxV.xaml.vb">
|
||||
<DependentUpon>OnlyProdEgtMessageBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ItemParamList\OnlyProd_QParamListV.xaml.vb">
|
||||
<DependentUpon>OnlyProd_QParamListV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ItemParamList\QParamListV.xaml.vb">
|
||||
<DependentUpon>QParamListV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Lib\MachGroupAddedEventArgs.vb" />
|
||||
<Compile Include="Lib\MachGroupVM.vb" />
|
||||
<Compile Include="Lib\NewMachGroupPanelVM.vb" />
|
||||
@@ -108,12 +195,42 @@
|
||||
<Compile Include="BTLModel\BTLPartM.vb" />
|
||||
<Compile Include="BTLModel\BTLStructureM.vb" />
|
||||
<Compile Include="Constants\ConstBeam.vb" />
|
||||
<Compile Include="LoadingWnd\LoadingWndHelper.vb" />
|
||||
<Compile Include="LoadingWnd\LoadingWndV.xaml.vb">
|
||||
<DependentUpon>LoadingWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LoadingWnd\LoadingWndVM.vb" />
|
||||
<Compile Include="LoadingWnd\OnlyProdLoadingWndV.xaml.vb">
|
||||
<DependentUpon>OnlyProdLoadingWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachinePanel\OnlyProdMachinePanelV.xaml.vb">
|
||||
<DependentUpon>OnlyProdMachinePanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
||||
<DependentUpon>MachinePanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachiningDbWindow\OnlyProdMachiningDbWindowV.xaml.vb">
|
||||
<DependentUpon>OnlyProdMachiningDbWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogV.xaml.vb">
|
||||
<DependentUpon>NewOpenProjectFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogVM.vb" />
|
||||
<Compile Include="NewOpenProjectFileDialog\OnlyProdNewOpenProjectFileDialogV.xaml.vb">
|
||||
<DependentUpon>OnlyProdNewOpenProjectFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OpenProjectFileDialog\OnlyProdOpenProjectFileDialogV.xaml.vb">
|
||||
<DependentUpon>OnlyProdOpenProjectFileDialogV.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">
|
||||
@@ -135,6 +252,7 @@
|
||||
<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\OpenProjectFileDialogV.xaml.vb">
|
||||
<DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon>
|
||||
@@ -165,6 +283,7 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
@@ -174,12 +293,109 @@
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="BeamMachiningsWindow\OnlyProdBeamMachiningsWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ConfigurationPage\OnlyProdMachine_ConfigurationPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ConfigurationPage\OnlyProdGeneral_ConfigurationPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ConfigurationPage\General_ConfigurationPageV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="ConfigurationPage\Machine_ConfigurationPageV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="ConfigurationPage\OnlyProdQParameter_ConfigurationPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ConfigurationPage\QParameter_ConfigurationPageV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtColorPicker\EgtColorPickerV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtColorPicker\OnlyProdEgtColorPickerV.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="EgtManageFileDialog\OnlyProdEgtManageFileDialogV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtMessageBox\OnlyProdEgtMessageBoxV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ItemParamList\OnlyProd_QParamListV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ItemParamList\QParamListV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="LoadingWnd\LoadingWndV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="LoadingWnd\OnlyProdLoadingWndV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MachinePanel\OnlyProdMachinePanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MachinePanel\MachinePanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="MachiningDbWindow\OnlyProdMachiningDbWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="NewOpenProjectFileDialog\OnlyProdNewOpenProjectFileDialogV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OpenProjectFileDialog\OnlyProdOpenProjectFileDialogV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -189,6 +405,13 @@
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<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\EgtBEAMWALL.Core.dll</PostBuildEvent>
|
||||
|
||||
@@ -0,0 +1,268 @@
|
||||
<EgtWPFLib5:EgtCustomWindow 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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Width="750" Height="450"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl>
|
||||
<TabItem Header="{Binding BasicColor_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColors}"
|
||||
SelectedItem="{Binding SelColor}"
|
||||
HorizontalAlignment="Center"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</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="White"/>
|
||||
</Style>
|
||||
</TabItem.Resources>
|
||||
<EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
|
||||
SelectedItem="{Binding sHexSelColor}"
|
||||
Orientation="Vertical"
|
||||
Margin="2.5"
|
||||
RowCount="13"
|
||||
ColumnCount="13"
|
||||
Height="300"
|
||||
Width="350"
|
||||
Style="{StaticResource EgtHexList}">
|
||||
<EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<DataTemplate/>
|
||||
</EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||
<Style TargetType="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 HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColorsTheme}"
|
||||
SelectedItem="{Binding SelColorTheme}"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</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"
|
||||
Margin="5,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding CustomColor_Msg}"
|
||||
Margin="5,18,5,10"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding CustomColors}"
|
||||
SelectedItem="{Binding SelCustomColor}"
|
||||
HorizontalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</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"
|
||||
Margin="0,20,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="0,10,5,0"
|
||||
HorizontalAlignment="Left">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Width="100"
|
||||
Height="70"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding CurrColor}"/>
|
||||
<Button x:Name="SaveColor"
|
||||
Grid.Row="1"
|
||||
Margin="0,10,0,0"
|
||||
Content="{Binding AddCColor_Msg}"
|
||||
Command="{Binding SaveColor_Command}"
|
||||
Style="{StaticResource LeftPanel_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}"
|
||||
Margin="0,10,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding Green_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding Blu_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="3"
|
||||
Text="{Binding Hexadecimal_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
Text="{Binding Hexadecimal}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="2"
|
||||
Rows="1"
|
||||
Margin="10,10,10,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,69 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Forms
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtColorPickerV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
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)
|
||||
MyBase.New(Owner)
|
||||
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 MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
|
||||
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 DialogResult
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,268 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdEgtColorPickerV"
|
||||
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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Width="750" Height="450"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl>
|
||||
<TabItem Header="{Binding BasicColor_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColors}"
|
||||
SelectedItem="{Binding SelColor}"
|
||||
HorizontalAlignment="Center"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</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="White"/>
|
||||
</Style>
|
||||
</TabItem.Resources>
|
||||
<EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
|
||||
SelectedItem="{Binding sHexSelColor}"
|
||||
Orientation="Vertical"
|
||||
Margin="2.5"
|
||||
RowCount="13"
|
||||
ColumnCount="13"
|
||||
Height="300"
|
||||
Width="350"
|
||||
Style="{StaticResource EgtHexList}">
|
||||
<EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<DataTemplate/>
|
||||
</EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||
<Style TargetType="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 HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColorsTheme}"
|
||||
SelectedItem="{Binding SelColorTheme}"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</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"
|
||||
Margin="5,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding CustomColor_Msg}"
|
||||
Margin="5,18,5,10"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding CustomColors}"
|
||||
SelectedItem="{Binding SelCustomColor}"
|
||||
HorizontalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</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"
|
||||
Margin="0,20,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="0,10,5,0"
|
||||
HorizontalAlignment="Left">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Width="100"
|
||||
Height="70"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding CurrColor}"/>
|
||||
<Button x:Name="SaveColor"
|
||||
Grid.Row="1"
|
||||
Margin="0,10,0,0"
|
||||
Content="{Binding AddCColor_Msg}"
|
||||
Command="{Binding SaveColor_Command}"
|
||||
Style="{StaticResource LeftPanel_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}"
|
||||
Margin="0,10,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding Green_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding Blu_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="3"
|
||||
Text="{Binding Hexadecimal_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
Text="{Binding Hexadecimal}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="2"
|
||||
Rows="1"
|
||||
Margin="10,10,10,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,69 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class OnlyProdEgtColorPickerV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
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)
|
||||
MyBase.New(Owner)
|
||||
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 MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
|
||||
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 DialogResult
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -28,7 +28,7 @@ Public Module DataGridColumnsIniFile
|
||||
Dim bIsReadOnly As Boolean = sColumnParams(4).Equals("1")
|
||||
Dim Width As Double
|
||||
Dim WidthType As DataGridLengthUnitType
|
||||
StringToDouble(sColumnParams(5), Width)
|
||||
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")
|
||||
@@ -65,7 +65,7 @@ Public Module DataGridColumnsIniFile
|
||||
Dim bIsReadOnly As Boolean = sColumnParams(4).Equals("1")
|
||||
Dim Width As Double
|
||||
Dim WidthType As DataGridLengthUnitType
|
||||
StringToDouble(sColumnParams(5), Width)
|
||||
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")
|
||||
|
||||
@@ -2,14 +2,19 @@
|
||||
x:Name="CurrDataGrid"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<EventSetter Event="SizeChanged" Handler="Cell_SizedChanged" />
|
||||
<EventSetter Event="MouseRightButtonDown" Handler="Cell_MouseRightButtonDown" />
|
||||
<EventSetter Event="FrameworkElement.Loaded" Handler="DataGridColumnHeader_Loaded"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<EventSetter Event="SizeChanged" Handler="Cell_SizedChanged" />
|
||||
<EventSetter Event="MouseRightButtonDown" Handler="Cell_MouseRightButtonDown" />
|
||||
<!-- Propieta' Header DataGrid -->
|
||||
<Setter Property="Background" Value="{Binding ColumnHeaderBackground, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="Foreground" Value="{Binding ColumnHeaderForeground, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="FontWeight" Value="{Binding ColumnHeaderFontWeight, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="FontSize" Value="{Binding ColumnHeaderFontSize, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding ColumnHeaderHorizontalContentAlignment, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="Padding" Value="{Binding ColumnHeaderPadding, ElementName=CurrDataGrid}" />
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
|
||||
@@ -3,31 +3,25 @@ Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Data
|
||||
Imports System.Windows.Controls.Primitives
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Data
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtDataGrid
|
||||
|
||||
Public Event ResetSort()
|
||||
|
||||
' vecchio indice da salvare per il Reorder delle colonne
|
||||
Public OldIndex As Integer = 0
|
||||
|
||||
' variabili e costanti per il Resize delle colonne adiacenti
|
||||
Private Const LEFT As String = "PART_LeftHeaderGripper"
|
||||
Private Const RIGHT As String = "PART_RightHeaderGripper"
|
||||
Private startPoint As Point
|
||||
Private startWidth As Double
|
||||
Private adjacentStartWidth As Double
|
||||
'Private startUnitType As DataGridLengthUnitType
|
||||
'Private adjacentUnitType As DataGridLengthUnitType
|
||||
Private targetColumn As DataGridColumn
|
||||
Private adjacentColumn As DataGridColumn
|
||||
|
||||
' 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()
|
||||
@@ -138,6 +132,44 @@ Public Class EgtDataGrid
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DataGrid_SizedChanged(sender As Object, e As SizeChangedEventArgs) Handles CurrDataGrid.SizeChanged
|
||||
' confronto la larghezza effettiva della EgtDataGrid con la somma delle larghezze delle colonne
|
||||
UpdateColumnsWidth()
|
||||
If BindingColumns.Count > 0 Then
|
||||
If CurrDataGrid.ActualWidth - LASTCOLUMN_MINWIDTH > columnsWidth Then
|
||||
' nascondo la ScrollBar orizzontale e setto lo UnitType dell'ultima colonna visibile a Star
|
||||
ScrollViewer.SetHorizontalScrollBarVisibility(CurrDataGrid, 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(CurrDataGrid, 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 Cell_MouseRightButtonDown(sender As Object, e As RoutedEventArgs)
|
||||
Dim nDispIndex As Integer = sender.DisplayIndex
|
||||
' creo il ContextMenu con gli item checkabili
|
||||
@@ -240,86 +272,6 @@ Public Class EgtDataGrid
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub DataGridColumnHeader_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
Dim header = DirectCast(sender, DataGridColumnHeader)
|
||||
|
||||
Dim thumbLeft As Thumb = header.Template.FindName(LEFT, header)
|
||||
thumbLeft.AddHandler(Thumb.DragStartedEvent, CType(AddressOf Thumb_DragStarted, DragStartedEventHandler), True)
|
||||
thumbLeft.AddHandler(Thumb.DragCompletedEvent, CType(AddressOf Thumb_DragCompleted, DragCompletedEventHandler), True)
|
||||
|
||||
Dim thumbRight As Thumb = header.Template.FindName(RIGHT, header)
|
||||
thumbRight.AddHandler(Thumb.DragStartedEvent, CType(AddressOf Thumb_DragStarted, DragStartedEventHandler), True)
|
||||
thumbRight.AddHandler(Thumb.DragCompletedEvent, CType(AddressOf Thumb_DragCompleted, DragCompletedEventHandler), True)
|
||||
End Sub
|
||||
|
||||
Private Sub Thumb_DragStarted(sender As Object, e As DragStartedEventArgs)
|
||||
Dim thumb = CType(sender, Thumb)
|
||||
Dim dg As DataGrid = GetParent(Of DataGrid)(thumb)
|
||||
startPoint = Mouse.GetPosition(dg)
|
||||
|
||||
Dim header As DataGridColumnHeader = GetParent(Of DataGridColumnHeader)(thumb)
|
||||
|
||||
If thumb.Name = RIGHT Then
|
||||
targetColumn = header.Column
|
||||
Dim Index As Integer = header.Column.DisplayIndex + 1
|
||||
If (Index < BindingColumns.Count) Then
|
||||
adjacentColumn = dg.Columns.FirstOrDefault(Function(x) x.DisplayIndex = Index)
|
||||
End If
|
||||
Else
|
||||
Dim Index As Integer = header.Column.DisplayIndex - 1
|
||||
If (Index >= 0) Then
|
||||
adjacentColumn = dg.Columns.FirstOrDefault(Function(x) x.DisplayIndex = Index + 1)
|
||||
End If
|
||||
targetColumn = dg.Columns.FirstOrDefault(Function(x) x.DisplayIndex = Index)
|
||||
End If
|
||||
startWidth = targetColumn.ActualWidth
|
||||
'startUnitType = targetColumn.Width.UnitType
|
||||
If Not IsNothing(adjacentColumn) Then
|
||||
adjacentStartWidth = adjacentColumn.ActualWidth
|
||||
'adjacentUnitType = adjacentColumn.Width.UnitType
|
||||
End If
|
||||
AddHandler thumb.PreviewMouseMove, AddressOf Thumb_PreviewMouseMove
|
||||
End Sub
|
||||
|
||||
Private Sub Thumb_PreviewMouseMove(sender As Object, e As MouseEventArgs)
|
||||
Dim thumb = CType(sender, Thumb)
|
||||
If (Not thumb.IsDragging Or IsNothing(targetColumn)) Then Return
|
||||
|
||||
e.Handled = True
|
||||
|
||||
Dim dg As DataGrid = GetParent(Of DataGrid)(thumb)
|
||||
Dim currentPoint As Point = Mouse.GetPosition(dg)
|
||||
Dim diffX As Double = (currentPoint - startPoint).X
|
||||
Dim newWidth As Double = Math.Max(targetColumn.MinWidth, Math.Min(startWidth + diffX, targetColumn.MaxWidth))
|
||||
Dim length = New DataGridLength(newWidth)
|
||||
|
||||
targetColumn.SetValue(DataGridColumn.WidthProperty, length)
|
||||
|
||||
If Not IsNothing(adjacentColumn) Then
|
||||
newWidth = Math.Max(adjacentColumn.MinWidth, Math.Min(adjacentStartWidth - diffX, adjacentColumn.MaxWidth))
|
||||
length = New DataGridLength(newWidth)
|
||||
adjacentColumn.SetValue(DataGridColumn.WidthProperty, length)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Thumb_DragCompleted(sender As Object, e As DragCompletedEventArgs)
|
||||
RemoveHandler CType(sender, Thumb).PreviewMouseMove, AddressOf Thumb_PreviewMouseMove
|
||||
targetColumn = Nothing
|
||||
adjacentColumn = Nothing
|
||||
End Sub
|
||||
|
||||
Private Function GetParent(Of T As DependencyObject)(d As DependencyObject) As T
|
||||
Dim tObj As T = Nothing
|
||||
|
||||
While IsNothing(tObj)
|
||||
tObj = TryCast(d, T)
|
||||
d = VisualTreeHelper.GetParent(d)
|
||||
End While
|
||||
|
||||
Return tObj
|
||||
End Function
|
||||
|
||||
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
|
||||
@@ -359,12 +311,8 @@ Public Class EgtDataGrid
|
||||
End Sub
|
||||
|
||||
Private Sub miResetSort_Click(sender As Object, e As RoutedEventArgs)
|
||||
CurrDataGrid.Items.SortDescriptions.Clear()
|
||||
For Each column In BindingColumns 'Grid.Columns
|
||||
column.SortDirection = 0
|
||||
' resettiamo graficamente anche l'header della colonna
|
||||
CurrDataGrid.Columns(column.DisplayIndex).SortDirection = Nothing
|
||||
Next
|
||||
' resetto le SortDirection di tutte le colonne della datagrid
|
||||
ResetSortDirections()
|
||||
End Sub
|
||||
|
||||
Private Sub CurrDataGrid_Loaded(sender As Object, e As RoutedEventArgs) Handles CurrDataGrid.Loaded
|
||||
@@ -377,25 +325,180 @@ Public Class EgtDataGrid
|
||||
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 CurrDataGrid.Sorting
|
||||
Select Case e.Column.SortDirection
|
||||
' 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 settiamo a Descending
|
||||
BindingColumns(e.Column.DisplayIndex).SortDirection = 2 ' la setto a Descending
|
||||
Case ListSortDirection.Descending
|
||||
BindingColumns(e.Column.DisplayIndex).SortDirection = 1 ' la settiamo a Ascending
|
||||
BindingColumns(e.Column.DisplayIndex).SortDirection = 1 ' la setto a Ascending
|
||||
Case Else
|
||||
BindingColumns(e.Column.DisplayIndex).SortDirection = 1 ' la settiamo a Ascending
|
||||
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
|
||||
CurrDataGrid.Items.SortDescriptions.Clear()
|
||||
For Each column In BindingColumns
|
||||
column.SortDirection = 0
|
||||
' resetto graficamente anche l'header della colonna
|
||||
CurrDataGrid.Columns(column.DisplayIndex).SortDirection = Nothing
|
||||
Next
|
||||
RaiseEvent ResetSort()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "COLUMN HEADER PROPERTY DATAGRID"
|
||||
|
||||
#Region "BACKGROUND HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderBackgroundProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderBackground",
|
||||
GetType(Brush),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(SystemColors.ControlBrush))
|
||||
|
||||
Public Property ColumnHeaderBackground As Brush
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderBackgroundProperty), Brush)
|
||||
End Get
|
||||
Set(value As Brush)
|
||||
SetValue(ColumnHeaderBackgroundProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' BackGround Heder
|
||||
|
||||
#Region "FOREGROUND HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderForegroundProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderForeground",
|
||||
GetType(Brush),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(SystemColors.ControlTextBrush))
|
||||
|
||||
Public Property ColumnHeaderForeground As Brush
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderForegroundProperty), Brush)
|
||||
End Get
|
||||
Set(value As Brush)
|
||||
SetValue(ColumnHeaderForegroundProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Foreground Header
|
||||
|
||||
#Region "FONTWEIGHT HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderFontWeightProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderFontWeight",
|
||||
GetType(FontWeight),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(FontWeights.Normal))
|
||||
|
||||
Public Property ColumnHeaderFontWeight As FontWeight
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderFontWeightProperty), FontWeight)
|
||||
End Get
|
||||
Set(value As FontWeight)
|
||||
SetValue(ColumnHeaderFontWeightProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FontWeight Header
|
||||
|
||||
#Region "FONTSIZE HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderFontSizeProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderFontSize",
|
||||
GetType(Double),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(Convert.ToDouble(12)))
|
||||
|
||||
Public Property ColumnHeaderFontSize As Double
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderFontSizeProperty), Double)
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetValue(ColumnHeaderFontSizeProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FontSize Header
|
||||
|
||||
#Region "HORIZONTAKCONTENTALIGNMENT HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderHorizontalContentAlignmentProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderHorizontalContentAlignment",
|
||||
GetType(HorizontalAlignment),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(HorizontalAlignment.Stretch))
|
||||
|
||||
Public Property ColumnHeaderHorizontalContentAlignment As HorizontalAlignment
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderHorizontalContentAlignmentProperty), HorizontalAlignment)
|
||||
End Get
|
||||
Set(value As HorizontalAlignment)
|
||||
SetValue(ColumnHeaderHorizontalContentAlignmentProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' HorizontalContentAlignment Header
|
||||
|
||||
#Region "PADDING HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderPaddingProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderPadding",
|
||||
GetType(Thickness),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(New Thickness(0)))
|
||||
|
||||
Public Property ColumnHeaderPadding As Thickness
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderPaddingProperty), Thickness)
|
||||
End Get
|
||||
Set(value As Thickness)
|
||||
SetValue(ColumnHeaderPaddingProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Padding Header
|
||||
|
||||
|
||||
#End Region ' Column Header Property DataGrid
|
||||
|
||||
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
|
||||
@@ -419,7 +522,11 @@ Public Class EgtDataGridColumn
|
||||
Private Property m_Width As DataGridLength
|
||||
Public Property Width As DataGridLength
|
||||
Get
|
||||
Return m_dgColumn.Width
|
||||
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
|
||||
@@ -430,10 +537,20 @@ Public Class EgtDataGridColumn
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_DisplayIndex As Integer
|
||||
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
|
||||
Return m_dgColumn.DisplayIndex
|
||||
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
|
||||
@@ -444,10 +561,15 @@ Public Class EgtDataGridColumn
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_OrigIsReadOnly As Boolean = True
|
||||
Private Property m_IsReadOnly As Boolean = True
|
||||
Public Property IsReadOnly As Boolean
|
||||
Get
|
||||
Return m_dgColumn.IsReadOnly
|
||||
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
|
||||
@@ -457,12 +579,19 @@ Public Class EgtDataGridColumn
|
||||
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
|
||||
Return m_dgColumn.CanUserReorder
|
||||
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
|
||||
@@ -478,7 +607,11 @@ Public Class EgtDataGridColumn
|
||||
Private m_CanUserResize As Boolean
|
||||
Public Property CanUserResize As Boolean
|
||||
Get
|
||||
Return m_dgColumn.CanUserResize
|
||||
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
|
||||
@@ -493,7 +626,11 @@ Public Class EgtDataGridColumn
|
||||
Private m_CanUserSort As Boolean
|
||||
Public Property CanUserSort As Boolean
|
||||
Get
|
||||
Return m_dgColumn.CanUserSort
|
||||
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
|
||||
@@ -526,6 +663,17 @@ Public Class EgtDataGridColumn
|
||||
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
|
||||
@@ -570,11 +718,13 @@ Public Class EgtDataGridColumn
|
||||
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)
|
||||
@@ -595,9 +745,10 @@ Public Class EgtDataGridColumn
|
||||
|
||||
' 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(IsReadOnly, 1, 0) & "," & DoubleToString(Width.Value, 6) & "," & Width.UnitType & "," & If(Visible, 1, 0) & "," & If(CanUserEditVisible, 1, 0) & "," & CInt(SortDirection)
|
||||
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
|
||||
|
||||
@@ -0,0 +1,400 @@
|
||||
<EgtWPFLib5:EgtCustomWindow 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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Height="500" Width="800"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding GoBack_Command}"
|
||||
Style="{StaticResource RightPanel_Button}">
|
||||
<Image Source="\Resources\EgtDialog\Restore.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<TextBlock Grid.Column="1"
|
||||
Margin="5"
|
||||
Text="{Binding sSelPath}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding ViewModeList}"
|
||||
SelectedItem="{Binding SelViewMode}"
|
||||
Margin="2.5,5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TreeView x:Name="FileTree"
|
||||
ItemsSource="{Binding RootList}"
|
||||
Margin="10"
|
||||
FontSize="15"
|
||||
BorderBrush="White">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}"
|
||||
ItemsSource="{Binding TreeItemList_View}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
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"
|
||||
Background="Transparent"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0"
|
||||
SelectedIndex="{Binding nSelTab}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem Header="LISTBOX">
|
||||
<ListBox x:Name="FileList"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
BorderBrush="White"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected, Mode=TwoWay}">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate x:Key="ListTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
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 Margin="5,5,5,0"
|
||||
Height="50"
|
||||
Width="250">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ContentTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="50">
|
||||
<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"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="2"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sLastModifyDate}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
<Border Grid.Row="1"
|
||||
BorderThickness="1"
|
||||
BorderBrush="LightGray"/>
|
||||
</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 EgtWPFLib5:EgtCustomWindow}}}" Value="0">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="1">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" 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}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="0">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="1">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="2">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListBox.Style>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="DATAGRID">
|
||||
<DataGrid AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
HeadersVisibility="Column"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected}">
|
||||
<!-- ColumnHeaderStyle="{StaticResource DataGridColumnHeader}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"-->
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="5*">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding sLastModifyDate}"
|
||||
Width="2*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding ghTypeItem}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding sDimension}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Right"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding FileName_Msg}"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Margin="2.5,2.5,2.5,5"
|
||||
TextAlignment="Left"
|
||||
HorizontalAlignment="Stretch"
|
||||
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding FilterList}"
|
||||
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
|
||||
DisplayMemberPath="sNameExstension"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="10,2.5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="3"
|
||||
Rows="1"
|
||||
Margin="2.5,0,2.5,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="15,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,142 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Windows.Input
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtManageFileDialogV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
''' <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 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 System.Windows.Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
|
||||
MyBase.New(Owner)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtManageFileDialogVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtManageFileDialogVM = EgtManageFileDialogVM
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As DialogResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overloads Function ShowDialog() As DialogResult
|
||||
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,416 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdEgtManageFileDialogV"
|
||||
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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Height="500" Width="800"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding GoBack_Command}"
|
||||
Style="{StaticResource RightPanel_Button}">
|
||||
<Image Source="\Resources\EgtDialog\Restore.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<TextBlock Grid.Column="1"
|
||||
Margin="5"
|
||||
Text="{Binding sSelPath}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding ViewModeList}"
|
||||
SelectedItem="{Binding SelViewMode}"
|
||||
Margin="2.5,5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TreeView x:Name="FileTree"
|
||||
ItemsSource="{Binding RootList}"
|
||||
Margin="10"
|
||||
FontSize="15"
|
||||
BorderBrush="White">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}"
|
||||
ItemsSource="{Binding TreeItemList_View}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
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"
|
||||
Background="Transparent"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0"
|
||||
SelectedIndex="{Binding nSelTab}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem Header="LISTBOX">
|
||||
<ListBox x:Name="FileList"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
BorderBrush="White"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected, Mode=TwoWay}">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate x:Key="ListTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
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 Margin="5,5,5,0"
|
||||
Height="50"
|
||||
Width="250">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ContentTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="50">
|
||||
<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"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="2"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sLastModifyDate}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
<Border Grid.Row="1"
|
||||
BorderThickness="1"
|
||||
BorderBrush="LightGray"/>
|
||||
</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 EgtWPFLib5:EgtCustomWindow}}}" Value="0">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="1">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" 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}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="0">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="1">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="2">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</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}"
|
||||
Style="{StaticResource DataGrid_OnlyProd}">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_Teal}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_DarkGray}"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="5*">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding sLastModifyDate}"
|
||||
Width="2*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding ghTypeItem}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding sDimension}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Right"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding FileName_Msg}"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Margin="2.5,2.5,2.5,5"
|
||||
TextAlignment="Left"
|
||||
HorizontalAlignment="Stretch"
|
||||
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding FilterList}"
|
||||
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
|
||||
DisplayMemberPath="sNameExstension"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="10,2.5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="3"
|
||||
Rows="1"
|
||||
Margin="2.5,0,2.5,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="15,0,2.5,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,142 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Windows.Input
|
||||
|
||||
Public Class OnlyProdEgtManageFileDialogV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
''' <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 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 System.Windows.Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
|
||||
MyBase.New(Owner)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtManageFileDialogVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtManageFileDialogVM = EgtManageFileDialogVM
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As DialogResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overloads Function ShowDialog() As DialogResult
|
||||
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,49 @@
|
||||
<EgtWPFLib5:EgtCustomWindow 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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
|
||||
<Grid Margin="2.5,2.5,2.5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="20,20,20,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="0,0,0,0"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sMessage}"
|
||||
Margin="5,0,5,0"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
<ItemsControl Grid.Row="1"
|
||||
ItemsSource="{Binding ButtonList}"
|
||||
HorizontalAlignment="Center">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsDefault="{Binding bIsDefault}"
|
||||
Content="{Binding sMessage}"
|
||||
Command="{Binding Command_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,110 @@
|
||||
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)
|
||||
MyBase.New(Owner)
|
||||
' 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.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,49 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdEgtMessageBoxV"
|
||||
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"
|
||||
Title="{Binding sTitle}"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<Grid Margin="2.5,2.5,2.5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="20,20,20,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="0,0,0,0"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sMessage}"
|
||||
Margin="5,0,5,0"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
<ItemsControl Grid.Row="1"
|
||||
ItemsSource="{Binding ButtonList}"
|
||||
HorizontalAlignment="Center">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsDefault="{Binding bIsDefault}"
|
||||
Content="{Binding sMessage}"
|
||||
Command="{Binding Command_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,110 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class OnlyProdEgtMessageBoxV
|
||||
|
||||
#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)
|
||||
MyBase.New(Owner)
|
||||
' 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 OnlyProdEgtMessageBoxV(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 OnlyProdEgtMessageBoxV(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 OnlyProdEgtMessageBoxV(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 OnlyProdEgtMessageBoxV(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 OnlyProdEgtMessageBoxV(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.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,91 @@
|
||||
<DataGrid x:Class="OnlyProd_QParamListV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserSortColumns="False"
|
||||
CanUserResizeColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
CanUserReorderColumns="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||||
Margin="0,0,0,5"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
Style="{StaticResource DataGrid_OnlyProd}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_Downy}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<!--BWType-->
|
||||
<DataGridTextColumn Binding="{Binding sBWType}"
|
||||
Width="40"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Nome-->
|
||||
<DataGridTextColumn Binding="{Binding sName}"
|
||||
Width="65"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn Binding="{Binding sDescription}"
|
||||
Width="1*"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Default-->
|
||||
<DataGridTextColumn Binding="{Binding sDefault}"
|
||||
Width="65">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Default_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Minimo-->
|
||||
<DataGridTextColumn Binding="{Binding sMin}"
|
||||
Width="70"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Min_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Massimo-->
|
||||
<DataGridTextColumn Binding="{Binding sMax}"
|
||||
Width="70"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Max_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class OnlyProd_QParamListV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,83 @@
|
||||
<DataGrid x:Class="QParamListV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserSortColumns="False"
|
||||
CanUserResizeColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
CanUserReorderColumns="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||||
Margin="0,0,0,5">
|
||||
<DataGrid.Columns>
|
||||
|
||||
<!--BWType-->
|
||||
<DataGridTextColumn Binding="{Binding sBWType}"
|
||||
Width="40"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Nome-->
|
||||
<DataGridTextColumn Binding="{Binding sName}"
|
||||
Width="50"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn Binding="{Binding sDescription}"
|
||||
Width="1*"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Default-->
|
||||
<DataGridTextColumn Binding="{Binding sDefault}"
|
||||
Width="65"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Default_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Minimo-->
|
||||
<DataGridTextColumn Binding="{Binding sMin}"
|
||||
Width="65"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Min_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Massimo-->
|
||||
<DataGridTextColumn Binding="{Binding sMax}"
|
||||
Width="65"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Max_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class QParamListV
|
||||
|
||||
End Class
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MachGroupM
|
||||
|
||||
@@ -47,17 +43,19 @@ Public Class MachGroupM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateMachGroup(nId As Integer, sName As String, sMachine As String) As MachGroupM
|
||||
Dim NewMachGroupM As New MachGroupM
|
||||
NewMachGroupM.m_Id = nId
|
||||
NewMachGroupM.m_Name = sName
|
||||
NewMachGroupM.m_Machine = sMachine
|
||||
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
|
||||
Dim NewMachGroupM As New MachGroupM
|
||||
' Creo il nuovo gruppo di lavorazione con i dati ottenuti a seconda del caso in cui mi trovo
|
||||
NewMachGroupM.m_Id = EgtAddMachGroup(sName, sMachine)
|
||||
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
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -85,16 +83,17 @@ Public Class MachGroupPanelM
|
||||
Public Shared Function CreateMachGroupPanel(IsMultiMachGroup As Boolean,
|
||||
MachineList As List(Of Machine), DefaultMachine As String,
|
||||
Optional sBaseName As String = "MachGroup_1") As MachGroupPanelM
|
||||
Dim NewMachGroupPanelM As New MachGroupPanelM
|
||||
NewMachGroupPanelM.m_IsMultiMachGroup = IsMultiMachGroup
|
||||
' Assegno nome base
|
||||
NewMachGroupPanelM.m_BaseName = sBaseName
|
||||
' Recupero lista macchine
|
||||
NewMachGroupPanelM.m_MachineList = MachineList
|
||||
' Assegno macchina di default
|
||||
NewMachGroupPanelM.m_DefaultMachine = DefaultMachine
|
||||
' recupero i MachGroup
|
||||
NewMachGroupPanelM.m_MachGroupMList = LoadMachGroups()
|
||||
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
|
||||
@@ -140,34 +139,6 @@ Public Class MachGroupPanelM
|
||||
Return New List(Of MachGroupM)(m_MachGroupMList)
|
||||
End Function
|
||||
|
||||
'Public Function InitMachGroupPanel(IsMultiMachGroup As Boolean,
|
||||
' MachineList As List(Of Machine), DefaultMachine As String,
|
||||
' Optional sBaseName As String = "MachGroup_1") As Boolean
|
||||
' m_IsMultiMachGroup = IsMultiMachGroup
|
||||
' ' se è a gruppo singolo, nascondo il panel
|
||||
' If Not m_IsMultiMachGroup Then SetMachGroupPanelVisibility(False)
|
||||
' ' Assegno nome base
|
||||
' m_BaseName = sBaseName
|
||||
' ' Recupero lista macchine
|
||||
' m_MachineList = MachineList
|
||||
' ' Assegno macchina di default
|
||||
' m_DefaultMachine = DefaultMachine
|
||||
' Return MachineList.Count > 0
|
||||
'End Function
|
||||
|
||||
'Public Overridable Sub LoadMachGroupList()
|
||||
' ' Carico i gruppi di lavorazione nella lista
|
||||
' Dim nId = EgtGetFirstMachGroup()
|
||||
' While nId <> GDB_ID.NULL
|
||||
' Dim sName As String = String.Empty
|
||||
' Dim sMachine As String = String.Empty
|
||||
' EgtGetMachGroupName(nId, sName)
|
||||
' EgtGetMachGroupMachineName(nId, sMachine)
|
||||
' MachGroupMList.Add(New MachGroup(nId, sName, sMachine))
|
||||
' nId = EgtGetNextMachGroup(nId)
|
||||
' End While
|
||||
'End Sub
|
||||
|
||||
Public Overridable Function NewMachGroup() As MachGroupM
|
||||
' Sistemazioni preliminari
|
||||
OnPreNewMachGroup()
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachGroupVM
|
||||
Inherits VMBase
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -94,8 +92,6 @@ Public Class NewMachGroupPanelVM
|
||||
AddHandler m_MachGroupPanelM.MachGroupAdded, AddressOf OnMachGroupAdded
|
||||
If Not MachGroupPanelM.IsMultiMachGroup Then SetMachGroupPanelVisibility(False)
|
||||
CreateMachGroupVMList()
|
||||
' Creo riferimento a questa classe in LibMap
|
||||
'''LibMap.SetRefMachGroupPanelVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
@@ -215,9 +211,11 @@ Public Class NewMachGroupPanelVM
|
||||
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
|
||||
Select Case MessageBox.Show("Eliminare?", "", MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
MessageBox.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()
|
||||
@@ -230,7 +228,8 @@ Public Class NewMachGroupPanelVM
|
||||
End Select
|
||||
Else
|
||||
'chiedo conferma prima di cancellare il gruppo di lavorazione
|
||||
Select Case MessageBox.Show("Eliminare?", "", MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
MessageBox.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()
|
||||
@@ -282,7 +281,6 @@ Public Class NewMachGroupPanelVM
|
||||
|
||||
Protected Overridable Sub OnMachGroupVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||
Select Case e.PropertyName
|
||||
'Case nameof(sender.sMATERIAL)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
Imports System.Threading
|
||||
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 Object
|
||||
If bOnlyProd Then
|
||||
LoadingWnd = New OnlyProdLoadingWndV(Nothing, m_LoadingWndVM)
|
||||
Else
|
||||
LoadingWnd = New LoadingWndV(Nothing, m_LoadingWndVM)
|
||||
End If
|
||||
' 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,56 @@
|
||||
<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="{DynamicResource {x:Type EgtWPFLib5: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}"
|
||||
TextAlignment="Center"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding StepText_Msg}"
|
||||
TextAlignment="Center"
|
||||
Visibility="{Binding StepText_Visibility}"/>
|
||||
<Grid Grid.Row="3"
|
||||
Visibility="{Binding StepProgress_Visibility}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Height="20"/>
|
||||
<ProgressBar Grid.Row="1"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="{Binding StepProgress_Value}"
|
||||
Height="20"
|
||||
Margin="40,0,40,0"/>
|
||||
</Grid>
|
||||
<ProgressBar Grid.Row="5"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="{Binding TotProgress_Value}"
|
||||
Height="20"
|
||||
Margin="40,0,40,0"/>
|
||||
<TextBlock Grid.Row="7"
|
||||
Text="{Binding TotProgress_Msg}"
|
||||
TextAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,36 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
|
||||
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,55 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdLoadingWndV"
|
||||
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}"
|
||||
TextAlignment="Center"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding StepText_Msg}"
|
||||
TextAlignment="Center"
|
||||
Visibility="{Binding StepText_Visibility}"/>
|
||||
<Grid Grid.Row="3"
|
||||
Visibility="{Binding StepProgress_Visibility}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Height="20"/>
|
||||
<ProgressBar Grid.Row="1"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="{Binding StepProgress_Value}"
|
||||
Height="20"
|
||||
Margin="40,0,40,0"/>
|
||||
</Grid>
|
||||
<ProgressBar Grid.Row="5"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="{Binding TotProgress_Value}"
|
||||
Height="20"
|
||||
Margin="40,0,40,0"/>
|
||||
<TextBlock Grid.Row="7"
|
||||
Text="{Binding TotProgress_Msg}"
|
||||
TextAlignment="Center"/>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,36 @@
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows
|
||||
|
||||
Public Class OnlyProdLoadingWndV
|
||||
|
||||
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
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyMachGroupM
|
||||
@@ -149,6 +145,16 @@ Public Class MyMachGroupM
|
||||
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"
|
||||
@@ -176,7 +182,7 @@ Public Class MyMachGroupM
|
||||
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
|
||||
@@ -291,26 +297,28 @@ Public Class 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
|
||||
NewMachGroupM.m_Id = nId
|
||||
NewMachGroupM.m_Name = sName
|
||||
NewMachGroupM.m_Machine = sMachine
|
||||
NewMachGroupM.m_nType = Type
|
||||
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_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW * NewMachGroupM.m_dH
|
||||
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
|
||||
For Each Part In NewMachGroupM.m_PartMList
|
||||
Part.UpdateOffset()
|
||||
NewMachGroupM.m_dMatForPart += Part.dVolume
|
||||
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
|
||||
@@ -322,8 +330,9 @@ Public Class MyMachGroupM
|
||||
End Function
|
||||
|
||||
Public Overloads Shared Function CreateMyMachGroup(Type As BWType, sName As String, sMachine As String) As MachGroupM
|
||||
Dim NewMachGroupM As New MyMachGroupM
|
||||
NewMachGroupM.m_Id = EgtAddMachGroup(sName, sMachine)
|
||||
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
|
||||
@@ -336,13 +345,14 @@ Public Class MyMachGroupM
|
||||
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
|
||||
For Each Part In NewMachGroupM.m_PartMList
|
||||
Part.UpdateOffset()
|
||||
NewMachGroupM.m_dMatForPart += Part.dVolume
|
||||
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
|
||||
@@ -408,7 +418,7 @@ Public Class MyMachGroupM
|
||||
EgtGetInfo(Id, MGR_RPT_PART & 1, sInfo)
|
||||
If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||
sSplitInfo = sInfo.Split(","c)
|
||||
StringToDouble(sSplitInfo(1), m_dStartCut)
|
||||
StringToDoubleAdv(sSplitInfo(1), m_dStartCut)
|
||||
Else
|
||||
m_dStartCut = 0
|
||||
End If
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyMachGroupPanelM
|
||||
@@ -13,16 +11,17 @@ Public Class MyMachGroupPanelM
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Shared Function CreateMyMachGroupPanel(MachineList As List(Of Machine)) As MachGroupPanelM
|
||||
Dim NewMyMachGroupPanelM As New MyMachGroupPanelM
|
||||
NewMyMachGroupPanelM.m_IsMultiMachGroup = False
|
||||
' Assegno nome base
|
||||
NewMyMachGroupPanelM.m_BaseName = ""
|
||||
' Recupero lista macchine
|
||||
NewMyMachGroupPanelM.m_MachineList = MachineList
|
||||
' Assegno macchina di default
|
||||
NewMyMachGroupPanelM.m_DefaultMachine = ""
|
||||
Dim NewMyMachGroupPanelM As New MyMachGroupPanelM With {
|
||||
.m_IsMultiMachGroup = False,
|
||||
.m_BaseName = "",
|
||||
.m_MachineList = MachineList,
|
||||
.m_DefaultMachine = ""
|
||||
}
|
||||
' aggiorno copie
|
||||
UpdateDuplo()
|
||||
UpdateAllDuplo()
|
||||
' recupero i MachGroup
|
||||
NewMyMachGroupPanelM.m_MachGroupMList = LoadMyMachGroups(MachineList)
|
||||
Return NewMyMachGroupPanelM
|
||||
@@ -130,7 +129,6 @@ Public Class MyMachGroupPanelM
|
||||
End Function
|
||||
|
||||
Public Overrides Function OnPreNewMachGroup() As Boolean
|
||||
'EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -141,17 +139,6 @@ Public Class MyMachGroupPanelM
|
||||
Dim sCurrMachName As String = String.Empty
|
||||
EgtGetCurrMachineName(sCurrMachName)
|
||||
WriteMainPrivateProfileString(S_MACH, K_CURRMACH, sCurrMachName)
|
||||
'' leggo nome attrezzaggio di default
|
||||
'Dim sDefaultSetUpName As String = String.Empty
|
||||
'Dim sMachineIniPath As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachName & "\" & sCurrMachName & ".ini"
|
||||
'EgtUILib.GetPrivateProfileString(S_SETUP, K_DEFAULT, "", sDefaultSetUpName, sMachineIniPath)
|
||||
'' se è attiva l'opzione, rendo corrente l'attrezzaggio di default
|
||||
'If Not String.IsNullOrEmpty(sDefaultSetUpName) Then
|
||||
' If Not EgtImportSetup(sDefaultSetUpName) Then
|
||||
' EgtOutLog("Error loading default setup " & sDefaultSetUpName)
|
||||
' MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 9) & " " & sDefaultSetUpName, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
' End If
|
||||
'End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -167,7 +154,7 @@ Public Class MyMachGroupPanelM
|
||||
End Function
|
||||
|
||||
' funzione che fa l'update di tutte le copie dei pezzi modificati
|
||||
Public Shared Sub UpdateDuplo()
|
||||
Public Shared Sub UpdateAllDuplo()
|
||||
' verifico tipo di progetto
|
||||
Dim nBtlInfoId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
Dim nBWType As Integer = 0
|
||||
@@ -178,148 +165,7 @@ Public Class MyMachGroupPanelM
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim bIsModified As Boolean = False
|
||||
If EgtDuploGetModified(nPartId, bIsModified) AndAlso bIsModified Then
|
||||
' 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
|
||||
If EgtExistsInfo(nOutlineId, MGR_FTR_PRID) Then
|
||||
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
|
||||
Dim QArray(DuploList.Count) As Dictionary(Of String, Dictionary(Of String, String))
|
||||
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
|
||||
' salvo parametri Q
|
||||
QArray(Duploindex) = New Dictionary(Of String, Dictionary(Of String, String))
|
||||
' 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 Not EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
|
||||
nPRId = nGlobPRId
|
||||
nGlobPRId += 1
|
||||
End If
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
|
||||
For QIndex = 1 To 10
|
||||
Dim QKey As String = "Q" & QIndex.ToString("D2")
|
||||
Dim QValue As Integer = 0
|
||||
If EgtGetInfo(nOutlineId, QKey, QValue) Then
|
||||
QArray(Duploindex)(sKey).Add(QKey, QValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
' ciclo sulle feature
|
||||
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
|
||||
If nFeatureLayer <> GDB_ID.NULL Then
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
|
||||
For QIndex = 1 To 10
|
||||
Dim QKey As String = "Q" & QIndex.ToString("D2")
|
||||
Dim QValue As Integer = 0
|
||||
If EgtGetInfo(nFeatureId, QKey, QValue) Then
|
||||
QArray(Duploindex)(sKey).Add(QKey, QValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
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))
|
||||
If nBWType = BWType.WALL Then
|
||||
' ciclo sugli outline
|
||||
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
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
|
||||
EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
' ripristino parametri Q
|
||||
If QArray(Duploindex).ContainsKey(sKey) Then
|
||||
For Each QPar In QArray(Duploindex)(sKey)
|
||||
EgtSetInfo(nOutlineId, QPar.Key, QPar.Value)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
' ciclo sulle feature
|
||||
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
|
||||
If nFeatureLayer <> GDB_ID.NULL Then
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
' ripristino parametri Q
|
||||
If QArray(Duploindex).ContainsKey(sKey) Then
|
||||
For Each QPar In QArray(Duploindex)(sKey)
|
||||
EgtSetInfo(nFeatureId, QPar.Key, QPar.Value)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
UpdateDuplo(nPartId)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
@@ -330,6 +176,197 @@ Public Class MyMachGroupPanelM
|
||||
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
|
||||
Dim QArray(DuploList.Count) As Dictionary(Of String, Dictionary(Of String, String))
|
||||
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
|
||||
' salvo parametri Q
|
||||
QArray(Duploindex) = New Dictionary(Of String, Dictionary(Of String, String))
|
||||
' 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
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
|
||||
For QIndex = 1 To 10
|
||||
Dim QKey As String = "Q" & QIndex.ToString("D2")
|
||||
Dim QValue As Integer = 0
|
||||
If EgtGetInfo(nOutlineId, QKey, QValue) Then
|
||||
QArray(Duploindex)(sKey).Add(QKey, QValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
' ciclo sulle feature
|
||||
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
|
||||
If nFeatureLayer <> GDB_ID.NULL Then
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
|
||||
For QIndex = 1 To 10
|
||||
Dim QKey As String = "Q" & QIndex.ToString("D2")
|
||||
Dim QValue As Integer = 0
|
||||
If EgtGetInfo(nFeatureId, QKey, QValue) Then
|
||||
QArray(Duploindex)(sKey).Add(QKey, QValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
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))
|
||||
If nBWType = BWType.WALL Then
|
||||
' ciclo sugli outline
|
||||
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
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
|
||||
EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
' ripristino parametri Q
|
||||
If QArray(Duploindex).ContainsKey(sKey) Then
|
||||
For Each QPar In QArray(Duploindex)(sKey)
|
||||
EgtSetInfo(nOutlineId, QPar.Key, QPar.Value)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
' ciclo sulle feature
|
||||
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
|
||||
If nFeatureLayer <> GDB_ID.NULL Then
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
' ripristino parametri Q
|
||||
If QArray(Duploindex).ContainsKey(sKey) Then
|
||||
For Each QPar In QArray(Duploindex)(sKey)
|
||||
EgtSetInfo(nFeatureId, QPar.Key, QPar.Value)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Sub SetDuploModified(nPartId As Integer)
|
||||
If Configuration.bOnlyProd Then
|
||||
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
|
||||
Else
|
||||
EgtDuploSetModified(nPartId)
|
||||
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
|
||||
@@ -338,7 +375,8 @@ Public Class MyMachGroupPanelM
|
||||
End Class
|
||||
|
||||
' funzione che cancella tutti i pezzi segnati da eliminare
|
||||
Public Shared Sub DeleteDuplo()
|
||||
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()
|
||||
@@ -356,16 +394,23 @@ Public Class MyMachGroupPanelM
|
||||
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)
|
||||
'' recupero gruppo di lavorazione e trave dell'interfaccia
|
||||
'Dim BeamMachGroup As BeamMachGroupM = MachGroupMList.FirstOrDefault(Function(x) x.Id = nMachGroupId)
|
||||
'Dim Beam As BeamM = BeamMachGroup.PartMList.FirstOrDefault(Function(x) x.nPartId = nDuploId)
|
||||
'EgtSetCurrMachGroup(BeamMachGroup.Id)
|
||||
'''Beam.DeletePart()
|
||||
Next
|
||||
End If
|
||||
DuploResetToDelete(nPartId)
|
||||
@@ -373,7 +418,8 @@ Public Class MyMachGroupPanelM
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtResetCurrMachGroup()
|
||||
End Sub
|
||||
Return ToRedrawMachGroupList
|
||||
End Function
|
||||
|
||||
Friend Shared Function DuploGetToDelete(nSouId As Integer, ByRef bToDelete As Boolean) As Boolean
|
||||
If IsNothing(nSouId) Then Return False
|
||||
@@ -402,12 +448,14 @@ Public Class MyMachGroupPanelM
|
||||
End Function
|
||||
|
||||
Public Shared Function DuploGetRawPart(nDuploId As Integer) As Integer
|
||||
Dim nRawId As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nDuploId, GDB_SI_LIST, nRawId) AndAlso nRawId > 0 Then
|
||||
Return nRawId
|
||||
Else
|
||||
Return GDB_ID.NULL
|
||||
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
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class PartM
|
||||
@@ -139,21 +135,28 @@ Public Class PartM
|
||||
Public Property dPOSX As Double
|
||||
Get
|
||||
If nType = BWType.WALL 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())
|
||||
Return vtPartRef.x
|
||||
' 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
|
||||
@@ -203,6 +206,16 @@ Public Class PartM
|
||||
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
|
||||
@@ -260,22 +273,28 @@ Public Class PartM
|
||||
Protected m_dPOSY As Double
|
||||
Public Property dPOSY As Double
|
||||
Get
|
||||
' 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())
|
||||
Return vtPartRef.y
|
||||
'Return m_dPOSY
|
||||
' 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
|
||||
@@ -359,7 +378,7 @@ Public Class PartM
|
||||
Protected m_sCALC_MSG As String = String.Empty
|
||||
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
|
||||
@@ -444,9 +463,10 @@ Public Class PartM
|
||||
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)
|
||||
NewPartM.m_nType = Type
|
||||
NewPartM.m_nRawPartId = nRawPartId
|
||||
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)
|
||||
@@ -456,7 +476,10 @@ Public Class PartM
|
||||
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
|
||||
@@ -483,14 +506,12 @@ Public Class PartM
|
||||
Index += 1
|
||||
End While
|
||||
If bFound Then
|
||||
StringToDouble(sSplitInfo(1), NewPartM.m_dPOSX)
|
||||
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)
|
||||
EgtGetInfo(nPartId, MGR_PRT_ROT, NewPartM.m_dROT)
|
||||
EgtGetInfo(nPartId, MGR_PRT_FLIP, NewPartM.m_nFLIP)
|
||||
End If
|
||||
' leggo volume
|
||||
If Not EgtGetInfo(nPartId, BTL_PRT_VOLUME, NewPartM.dVolume) Then
|
||||
@@ -614,6 +635,10 @@ Public Class PartM
|
||||
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
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -47,6 +44,18 @@ Public MustInherit Class MyMachGroupPanelVM
|
||||
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)))
|
||||
@@ -79,7 +88,7 @@ Public MustInherit Class MyMachGroupPanelVM
|
||||
' Svuoto precedente lista di MachGroup
|
||||
MachGroupVMList.Clear()
|
||||
' aggiorno copie
|
||||
MyMachGroupPanelM.UpdateDuplo()
|
||||
MyMachGroupPanelM.UpdateAllDuplo()
|
||||
' verifico se esistono già gruppi di lavorazione o se devo creare il primo
|
||||
Dim bOk As Boolean = False
|
||||
Dim nId = EgtGetFirstMachGroup()
|
||||
@@ -96,11 +105,18 @@ Public MustInherit Class MyMachGroupPanelVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
'Public Overrides Sub AddMachGroup()
|
||||
' Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(CurrentMachine.sMachineName, Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' ' e lo seleziono
|
||||
' SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
||||
'End Sub
|
||||
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())
|
||||
@@ -118,18 +134,6 @@ Public MustInherit Class MyMachGroupPanelVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' funzione che seleziona primo gruppo
|
||||
'Friend Sub SelFirstMachGroup()
|
||||
' If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||
' SelectedMachGroup = MachGroupVMList(0)
|
||||
' Else
|
||||
' SelectedMachGroup = Nothing
|
||||
' EgtResetCurrMachGroup()
|
||||
' ' nascondo tutti i pezzi
|
||||
' Map.refProjectVM.BTLStructureVM.HideAll()
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
' funzione che seleziona ultimo gruppo
|
||||
Public Sub SelLastMachGroup()
|
||||
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -85,13 +83,13 @@ Public MustInherit Class MyMachGroupVM
|
||||
|
||||
Public ReadOnly Property dUsage As Double
|
||||
Get
|
||||
Return If(MyMachGroupM.dMatForPart > 0 AndAlso MyMachGroupM.dTotMat > 0, MyMachGroupM.dMatForPart / MyMachGroupM.dTotMat * 100, 0)
|
||||
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, (MyMachGroupM.dTotMat - MyMachGroupM.dMatForPart) / MyMachGroupM.dTotMat * 100, 0)
|
||||
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
|
||||
|
||||
@@ -103,7 +101,7 @@ Public MustInherit Class MyMachGroupVM
|
||||
|
||||
Public ReadOnly Property sWaste As String
|
||||
Get
|
||||
Return DoubleToString(dWaste, 3)
|
||||
Return LenToString(dWaste, 3)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -169,7 +167,7 @@ Public MustInherit Class MyMachGroupVM
|
||||
Return LenToString(MyMachGroupM.dStartCut, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, MyMachGroupM.dStartCut)
|
||||
StringToLenAdv(value, MyMachGroupM.dStartCut, True)
|
||||
End Set
|
||||
End Property
|
||||
Public Property dStartCut As Double
|
||||
@@ -438,8 +436,6 @@ Public MustInherit Class MyMachGroupVM
|
||||
m_SupervisorId = SupervisorId
|
||||
End Sub
|
||||
|
||||
Private m_cc As StateChangeEventArgs
|
||||
|
||||
Public ReadOnly Property IsReadOnly As Boolean
|
||||
Get
|
||||
Return String.IsNullOrEmpty(m_SupervisorId)
|
||||
@@ -476,18 +472,26 @@ Public MustInherit Class MyMachGroupVM
|
||||
|
||||
Public MustOverride Sub RefreshGroupData()
|
||||
|
||||
Public Overridable Function Copy() As MyMachGroupVM
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Public Sub UpdateUsage()
|
||||
MyMachGroupM.SetTotMat(dL * dH * dW)
|
||||
MyMachGroupM.SetMatForPart(0)
|
||||
Dim dPartVolume As Double
|
||||
For Each Part In PartVMList
|
||||
dPartVolume += Part.dVolume
|
||||
Next
|
||||
MyMachGroupM.SetMatForPart(dPartVolume)
|
||||
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
|
||||
@@ -608,6 +612,10 @@ Public MustInherit Class MyMachGroupVM
|
||||
|
||||
Public MustOverride Sub RefreshPartList()
|
||||
|
||||
Public Overridable Sub RefreshMachGroup()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' Parts
|
||||
|
||||
#End Region ' METHODS
|
||||
@@ -620,13 +628,17 @@ Public MustInherit Class MyMachGroupVM
|
||||
Public ReadOnly Property DeleteMachGroup_Command As ICommand
|
||||
Get
|
||||
If m_cmdDeleteMachGroup Is Nothing Then
|
||||
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroup)
|
||||
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroupCmd)
|
||||
End If
|
||||
Return m_cmdDeleteMachGroup
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable Sub DeleteMachGroup()
|
||||
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)
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -107,7 +105,7 @@ Public MustInherit Class PartVM
|
||||
Return LenToString(m_PartM.dPOSX, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, m_PartM.dPOSX)
|
||||
StringToLenAdv(value, m_PartM.dPOSX, True)
|
||||
End Set
|
||||
End Property
|
||||
Public Property dPOSX As Double
|
||||
@@ -162,6 +160,18 @@ Public MustInherit Class PartVM
|
||||
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
|
||||
@@ -205,7 +215,7 @@ Public MustInherit Class PartVM
|
||||
Return LenToString(m_PartM.dOffset, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, m_PartM.dOffset)
|
||||
StringToLenAdv(value, m_PartM.dOffset, True)
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property dOffset As Double
|
||||
@@ -223,7 +233,7 @@ Public MustInherit Class PartVM
|
||||
Return LenToString(m_PartM.dPOSY, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, m_PartM.dPOSY)
|
||||
StringToLenAdv(value, m_PartM.dPOSY, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -238,7 +248,7 @@ Public MustInherit Class PartVM
|
||||
Return LenToString(m_PartM.dROT, 3) & "°"
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, m_PartM.dROT)
|
||||
StringToLenAdv(value, m_PartM.dROT, True)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -497,6 +507,10 @@ Public MustInherit Class PartVM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overridable Sub RefreshPart()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "Feature"
|
||||
|
||||
Protected MustOverride Sub CreateBTLFeatureVMList()
|
||||
@@ -550,15 +564,22 @@ Public MustInherit Class PartVM
|
||||
|
||||
Public Sub CalcFallUpdate(FALL As Integer)
|
||||
EgtSetInfo(nPartId, ITG_PROD_FALL, FALL, True)
|
||||
m_PartM.nCALC_FALL = 0
|
||||
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 Continue For
|
||||
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
|
||||
@@ -621,9 +642,6 @@ Public MustInherit Class PartVM
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub OnBTLFeatureVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||
'Select Case e.PropertyName
|
||||
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
||||
'End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<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 Margin="0,0,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Macchina corrente" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
||||
<!--Combobox per selezionare la macchina corrente-->
|
||||
<ComboBox ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
|
||||
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
|
||||
Height="22" Width="150"
|
||||
Grid.Row="0" Grid.Column="1"/>
|
||||
</Grid>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Content="{Binding ToolDBMsg}"/>
|
||||
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Margin="5,0,0,0" Content="{Binding MachiningDbMsg}"/>
|
||||
<Button Command="{Binding SetUpCommand}" ToolTip="{Binding SetUpToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Margin="5,0,0,0" Content="{Binding SetUpMsg}"
|
||||
Visibility="{Binding SetUp_Visibility}"/>
|
||||
<Button ToolTip="{Binding BeamTable_ToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}" Margin="5,0,0,0"
|
||||
Command="{Binding BeamTable_Command}"
|
||||
Visibility="{Binding BeamTable_Visibility}">
|
||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding WallTable_ToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}" Margin="5,0,0,0"
|
||||
Command="{Binding WallTable_Command}"
|
||||
Visibility="{Binding WallTable_Visibility}">
|
||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Content="{Binding ParameterMachineMsg}"
|
||||
ToolTip="{Binding ParameterMachineMsg}"
|
||||
Command="{Binding ParameterMachine_Command}"
|
||||
Height="30" Width="120" Margin="5,0,0,0" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class MachinePanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,357 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachinePanelVM
|
||||
Inherits EgtWPFLib5.MachinePanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Radice del direttorio delle macchine
|
||||
Private m_sMachinesRoot As String
|
||||
|
||||
' Macchina correntemente selezionata e quindi attiva
|
||||
Private m_SelectedMachine As Machine = Nothing
|
||||
Public Overrides Property SelectedMachine As Machine
|
||||
Get
|
||||
Return m_SelectedMachine
|
||||
End Get
|
||||
Set(value As Machine)
|
||||
If value IsNot m_SelectedMachine Then
|
||||
' imposto macchina in DbGeometrico
|
||||
If Not IsNothing(value) AndAlso EgtSetCurrMachine(value.Name) Then
|
||||
m_SelectedMachine = value
|
||||
End If
|
||||
' Salvo impostazione macchina corrente
|
||||
SaveCurrentMachine()
|
||||
NotifyPropertyChanged(NameOf(SelectedMachine))
|
||||
' inizializzo la macchina selezionata come macchina corrente
|
||||
Dim nMachType As MachineType = DirectCast(m_SelectedMachine, MyMachine).nType
|
||||
SectionXMaterial.SetType(nMachType)
|
||||
If Not IsNothing(value) Then
|
||||
InitCurrentMachine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, value.Name, nMachType)
|
||||
Else
|
||||
InitCurrentMachine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, m_SelectedMachine.Name, nMachType)
|
||||
End If
|
||||
' mostro bottone tabella beam o wall a seconda del tipo
|
||||
m_BeamTable_Visibility = If(nMachType = MachineType.BEAM OrElse nMachType = MachineType.BOTH, Visibility.Visible, Visibility.Collapsed)
|
||||
m_WallTable_Visibility = If(nMachType = MachineType.WALL OrElse nMachType = MachineType.BOTH, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(BeamTable_Visibility))
|
||||
NotifyPropertyChanged(NameOf(WallTable_Visibility))
|
||||
' carico i Parametri Q da mostrare (Beam, Wall o entrambi) in base al tipo di macchina selezionata
|
||||
If Not IsNothing(Map.refConfigurationPageVM) Then
|
||||
' carico i parametri Q dei Process letti dall'ini
|
||||
Map.refConfigurationPageVM.GetQParamsList()
|
||||
' carico la lista di tutti i parametri Q ciclando su ogni Process di PRCList
|
||||
If Not IsNothing(Map.refConfigurationPageVM.QBTLParamVMList) Then
|
||||
Map.refConfigurationPageVM.QBTLParamVMList.Clear()
|
||||
End If
|
||||
For Each PRCItem In Map.refConfigurationPageVM.PRCList
|
||||
For Each QBTLParam In PRCItem.QBTLParamVMList
|
||||
Map.refConfigurationPageVM.QBTLParamVMList.Add(QBTLParam)
|
||||
Next
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(Map.refConfigurationPageVM.QBTLParamVMList))
|
||||
End If
|
||||
' aggiorno nome macchina in statusbar
|
||||
Map.refMyStatusBarVM.RefreshMachName()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MachPanel_IsEnabled As Boolean = True
|
||||
Public Property MachPanel_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_MachPanel_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_MachPanel_IsEnabled = value
|
||||
NotifyPropertyChanged("MachPanel_IsEnabled")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BeamTable_Visibility As Visibility
|
||||
Public ReadOnly Property BeamTable_Visibility As Visibility
|
||||
Get
|
||||
Return m_BeamTable_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_WallTable_Visibility As Visibility
|
||||
Public ReadOnly Property WallTable_Visibility As Visibility
|
||||
Get
|
||||
Return m_WallTable_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SetUp_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainWindowVM.MainWindowM.bModifySetup, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property ToolDBMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHINEPAGEUC + 6)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property MachiningDbMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SetUpMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_ALARMSPAGEUC + 33)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "ToolTip"
|
||||
|
||||
Public ReadOnly Property ToolDBToolTip As String
|
||||
Get
|
||||
Return EgtMsg(5003)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property MachiningDbToolTip As String
|
||||
Get
|
||||
Return EgtMsg(5004)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SetUpToolTip As String
|
||||
Get
|
||||
Return EgtMsg(31501)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdBeamTable As ICommand
|
||||
Private m_cmdWallTable As ICommand
|
||||
|
||||
#End Region 'FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefMachinePanelVM(Me)
|
||||
' recupero cartella radice delle macchine
|
||||
m_sMachinesRoot = Map.refMainWindowVM.MainWindowM.sMachinesRoot
|
||||
' Carica macchine da cartella delle macchine
|
||||
MyMachine.MachineListInit(m_sMachinesRoot, MachineList)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub LoadCurrentMachine()
|
||||
If MachineList.Count = 0 Then Return
|
||||
Dim CurrMachine As Machine = Nothing
|
||||
Dim CurrMachineName As String = String.Empty
|
||||
GetMainPrivateProfileString(S_MACH, K_CURRMACH, String.Empty, CurrMachineName)
|
||||
Dim bFound As Boolean = False
|
||||
If Not String.IsNullOrEmpty(CurrMachineName) Then
|
||||
For Each Mach In MachineList
|
||||
If Mach.Name = CurrMachineName Then
|
||||
bFound = True
|
||||
CurrMachine = Mach
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not bFound And MachineList.Count > 0 Then
|
||||
CurrMachine = MachineList(0)
|
||||
End If
|
||||
If Not IsNothing(CurrMachine) Then
|
||||
If EgtSetCurrMachine(CurrMachine.Name) Then
|
||||
SelectedMachine = CurrMachine
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub SaveCurrentMachine()
|
||||
If IsNothing(m_SelectedMachine) Then Return
|
||||
WriteMainPrivateProfileString(S_MACH, K_CURRMACH, SelectedMachine.Name)
|
||||
End Sub
|
||||
|
||||
Friend Sub UpdateCurrentMachine()
|
||||
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
Dim sMachName As String = String.Empty
|
||||
If EgtGetCurrMachineName(sMachName) Then
|
||||
For Each Mach In MachineList
|
||||
If Mach.Name = sMachName Then
|
||||
SelectedMachine = Mach
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Function BeamMachDb() As Boolean
|
||||
' Assegno le path
|
||||
Dim sBaseDir As String = m_sMachinesRoot & "\" & m_SelectedMachine.Name & "\" & "Beam"
|
||||
' verifico se ci sono i file ini
|
||||
Dim sMachTypePath As String = sBaseDir & "\MachiningTypes.ini"
|
||||
Dim sTabTemplPath As String = sBaseDir & "\BeamTableTemplate.ini"
|
||||
If File.Exists(sMachTypePath) AndAlso File.Exists(sTabTemplPath) Then
|
||||
' apro finestra di gestione lavorazioni travi
|
||||
Dim sTitle = EgtMsg(9000) 'Tabelle delle lavorazioni delle travi
|
||||
Dim BeamMchsWinVM As New MyBeamMachiningsWindowVM(sTitle, sBaseDir, sMachTypePath, sTabTemplPath)
|
||||
Dim BeamMchsWinV As New BeamMachiningsWindowV(Application.Current.MainWindow, BeamMchsWinVM)
|
||||
BeamMchsWinV.ShowDialog()
|
||||
Else
|
||||
' Impossibile aprire l'Editor delle lavorazioni delle travi.<br/>Mancano i file di configurazione. - Errore
|
||||
MessageBox.Show(EgtMsg(9009), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function WallMachDb() As Boolean
|
||||
' Assegno le path
|
||||
Dim sBaseDir As String = m_sMachinesRoot & "\" & m_SelectedMachine.Name & "\" & "Wall"
|
||||
' verifico se ci sono i file ini
|
||||
Dim sMachTypePath As String = sBaseDir & "\MachiningTypes.ini"
|
||||
Dim sTabTemplPath As String = sBaseDir & "\WallTableTemplate.ini"
|
||||
If File.Exists(sMachTypePath) AndAlso File.Exists(sTabTemplPath) Then
|
||||
' apro finestra di gestione lavorazioni pareti
|
||||
Dim sTitle = EgtMsg(9010) 'Tabelle delle lavorazioni delle pareti
|
||||
Dim WallMchsWinVM As New MyBeamMachiningsWindowVM(sTitle, sBaseDir, sMachTypePath, sTabTemplPath, False)
|
||||
Dim WallMchsWinV As New BeamMachiningsWindowV(Application.Current.MainWindow, WallMchsWinVM)
|
||||
WallMchsWinV.ShowDialog()
|
||||
Else
|
||||
' Impossibile aprire l'Editor delle lavorazioni delle pareti.<br/>Mancano i file di configurazione. - Errore
|
||||
MessageBox.Show(EgtMsg(9011), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overrides Sub ToolDb(ByVal param As Object)
|
||||
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
|
||||
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
|
||||
If Not EgtTdbReload() Then
|
||||
EgtOutLog("Impossible reloading tool Db")
|
||||
MessageBox.Show(EgtMsg(MSG_TOOLDBERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim ToolDbWindowVM As New MyToolDbWindowVM(CurrentMachine.sMachDir, CurrentMachine.sMachIniFile, Map.refSceneHostVM.MainScene.GetCtx(), "Beam")
|
||||
Dim ToolDbWindowV As New ToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM)
|
||||
If ToolDbWindowVM.MatType <> 0 Then
|
||||
ToolDbWindowV.Height = 640
|
||||
ToolDbWindowV.Width = 1024
|
||||
ToolDbWindowV.ShowDialog()
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MachDb(ByVal param As Object)
|
||||
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
|
||||
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
|
||||
If Not EgtMdbReload() Then
|
||||
EgtOutLog("Impossible reloading machining Db")
|
||||
MessageBox.Show(EgtMsg(MSG_MACHININGDBERRORS + 8), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(CurrentMachine.sMachIniFile, Map.refSceneHostVM.MainScene.GetCtx(), "Stone")
|
||||
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
|
||||
|
||||
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
|
||||
MachDbWindowV.Height = 768
|
||||
MachDbWindowV.Width = 1024
|
||||
MachDbWindowV.ShowDialog()
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub SetUp(ByVal param As Object)
|
||||
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
|
||||
If Not File.Exists(CurrentMachine.sMachDir & "\Scripts\" & SETUP_LUA) Then
|
||||
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
|
||||
MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 7), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
' carico Lua che contiene le funzioni per ottenere le posizioni valide dell'utensile selezionato,
|
||||
' e testa e uscita dell'utensile attrezzato
|
||||
EgtLuaExecFile(CurrentMachine.sMachDir & "\Scripts\" & SETUP_LUA)
|
||||
' verifico che le teste riportate in configurazione esistano
|
||||
Dim Index As Integer = 1
|
||||
Dim nErr As Integer = 0
|
||||
While nErr = 0
|
||||
Dim sHead As String = String.Empty
|
||||
nErr = 999
|
||||
EgtLuaSetGlobIntVar("STU.INDEX", Index)
|
||||
EgtLuaCallFunction("STU.GetTcPosHeadGroupFromPos")
|
||||
' Leggo variabili
|
||||
EgtLuaGetGlobStringVar("STU.HEAD", sHead)
|
||||
EgtLuaGetGlobIntVar("STU.ERR", nErr)
|
||||
If nErr = 0 Then
|
||||
If EgtGetHeadExitCount(sHead) = 0 Then
|
||||
MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 8), EgtMsg(MSG_SETUPERRORS + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
Index += 1
|
||||
End While
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("STU")
|
||||
|
||||
Dim SetUpWindow As New SetUpWindowV(Application.Current.MainWindow, New SetUpWindowVM(CurrentMachine.sMachDir, CurrentMachine.sMachineName))
|
||||
SetUpWindow.Height = 614
|
||||
SetUpWindow.Width = 1024
|
||||
SetUpWindow.ShowDialog()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "BeamTable"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property BeamTable_Command As ICommand
|
||||
Get
|
||||
If m_cmdBeamTable Is Nothing Then
|
||||
m_cmdBeamTable = New Command(AddressOf BeamMachDb)
|
||||
End If
|
||||
Return m_cmdBeamTable
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' BeamTable
|
||||
|
||||
#Region "WallTable"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property WallTable_Command As ICommand
|
||||
Get
|
||||
If m_cmdWallTable Is Nothing Then
|
||||
m_cmdWallTable = New Command(AddressOf WallMachDb)
|
||||
End If
|
||||
Return m_cmdWallTable
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' WallTable
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,58 @@
|
||||
<Grid x:Class="OnlyProdMachinePanelV"
|
||||
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 Margin="0,0,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Macchina corrente"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,5,0"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<!--Combobox per selezionare la macchina corrente-->
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
|
||||
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Content="{Binding ToolDBMsg}"
|
||||
ToolTip="{Binding ToolDBToolTip}"
|
||||
Command="{Binding ToolDbCommand}"
|
||||
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
|
||||
<!--<Button Content="{Binding MachiningDbMsg}"
|
||||
Command="{Binding MachDbCommand}"
|
||||
ToolTip="{Binding MachiningDbToolTip}"
|
||||
Style="{StaticResource GeneralConfigurationToolBar_TextButton}" Width="100"/>-->
|
||||
<Button Content="{Binding SetUpMsg}"
|
||||
Command="{Binding SetUpCommand}"
|
||||
ToolTip="{Binding SetUpToolTip}"
|
||||
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"
|
||||
Visibility="{Binding SetUp_Visibility}"/>
|
||||
<!--<Button ToolTip="{Binding BeamTable_ToolTip}"
|
||||
Command="{Binding BeamTable_Command}"
|
||||
Visibility="{Binding BeamTable_Visibility}"
|
||||
Style="{StaticResource ToolBarWarehouse_Button}">
|
||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding WallTable_ToolTip}"
|
||||
Command="{Binding WallTable_Command}"
|
||||
Visibility="{Binding WallTable_Visibility}"
|
||||
Style="{StaticResource ToolBarWarehouse_Button}">
|
||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<Button Content="{Binding ParameterMachineMsg}"
|
||||
ToolTip="{Binding ParameterMachineMsg}"
|
||||
Command="{Binding ParameterMachine_Command}"
|
||||
Style="{StaticResource MachineToolBar_ParameterMachineButton}" Width="140"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class OnlyProdMachinePanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,128 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdMachiningDbWindowV"
|
||||
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"
|
||||
Title="{Binding Title}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseMachiningsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
|
||||
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.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 Grid.Row="0" Columns="3">
|
||||
<Button Content="{Binding NewMsg}" Command="{Binding NewCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding SaveMsg}" Command="{Binding SaveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding RemoveMsg}" Command="{Binding RemoveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TreeView Name="MachiningsTreeView" Grid.Row="1"
|
||||
ItemsSource="{Binding Path=MachiningsList}">
|
||||
<TreeView.Style>
|
||||
<Style TargetType="{x:Type TreeView}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush 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>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</TreeView.Style>
|
||||
|
||||
<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 Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding NamePar}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
|
||||
</TreeView>
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Content="{Binding ImportMsg}" Command="{Binding ImportCommand}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding ExportMsg}" Command="{Binding ExportCommand}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding ResetMsg}" Command="{Binding ReloadMachiningCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,30 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows.Input
|
||||
|
||||
Public Class OnlyProdMachiningDbWindowV
|
||||
|
||||
Private WithEvents m_MachiningDbWindowVM As MachiningDbWindowVM
|
||||
|
||||
Sub New(Owner As System.Windows.Window, MachiningDbWindowVM As MachiningDbWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' 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.m_CloseWindow
|
||||
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
|
||||
@@ -16,7 +16,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtBEAMWALL.Core")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2022 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.2.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.2.1")>
|
||||
<Assembly: AssemblyVersion("2.7.1.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.1.1")>
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
<EgtWPFLib5:EgtCustomWindow 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:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
IsClosable="False"
|
||||
MinHeight="500" MinWidth="500"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="{Binding Filters_Msg}"
|
||||
Margin="5"
|
||||
Visibility="{Binding Filters_Visibility}">
|
||||
<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}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<ComboBox ItemsSource="{Binding DayTypeList}"
|
||||
SelectedIndex="{Binding SelDayType}"
|
||||
Width="105"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource PartParam_ComboBox}"/>
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding Date_Visibility}">
|
||||
<TextBlock Text="{Binding From_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
<DatePicker SelectedDate="{Binding dtStartDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
<TextBlock Text="{Binding To_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
<DatePicker SelectedDate="{Binding dtEndDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<CheckBox Grid.Column="2"
|
||||
IsChecked="{Binding bViewArchived}"
|
||||
Content="{Binding ViewArchived_Msg}"
|
||||
VerticalAlignment="Center"/>
|
||||
</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}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SearchText}"
|
||||
Margin="5"
|
||||
Visibility="{Binding SearchText_Visibility}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Rows_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
SelectedIndex="{Binding SelRowQuantity}"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid x:Name="MainDataGrid"
|
||||
Grid.Row="1"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="5"
|
||||
RowDetailsVisibilityMode="Visible"
|
||||
CellEditEnding="MainDataGrid_CellEditEnding"
|
||||
ColumnHeaderBackground="{x:Null}"
|
||||
BindingColumns="{Binding ProdColumns}">
|
||||
<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 EgtBEAMWALL: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 EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
<ToggleButton Grid.Column="1"
|
||||
Margin="5,0,0,0"
|
||||
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource OldToolBar_SmallToggleButton}">
|
||||
<Image Source="\Resources\CalcPanel\Edit.png"
|
||||
Style="{StaticResource LockImage}"/>
|
||||
</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 EgtBEAMWALL: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 EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Archived -->
|
||||
<DataGridTemplateColumn x:Key="colARCHIVED">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="\Resources\OpenProjectFileDialog\Archived.png"
|
||||
Visibility="{Binding Archived_Visibility}"
|
||||
Height="15"
|
||||
Width="15"
|
||||
Stretch="UniformToFill"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.Archived_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTemplateColumn.Header>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<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}"
|
||||
BorderThickness="0"
|
||||
Margin="0,-1,0,0"
|
||||
Padding="0">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid TextBlock.FontSize="12"
|
||||
TextBlock.FontWeight="Normal">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{Binding Path=DataContext.ProdColumns[0].ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Background="Gray"
|
||||
Margin="40,0,40,0"/>
|
||||
<Grid Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Margin="2">
|
||||
<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 EgtBEAMWALL: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 EgtBEAMWALL:NewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource OpenWnd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding sListName}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding Path=DataContext.ExportDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource OpenWnd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="3"
|
||||
Text="{Binding dtExportDate}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowDetailsTemplate>
|
||||
</EgtBEAMWALL:EgtDataGrid>
|
||||
|
||||
<UniformGrid Columns="4" Grid.Row="2" Margin="0,0,0,5">
|
||||
<Button IsDefault="True" Name="OpenBtn"
|
||||
Content="{Binding Open_Msg}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Archive_Msg}"
|
||||
Command="{Binding Archive_Command}"
|
||||
IsEnabled="{Binding bArchived_IsEnabled}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Delete_Msg}"
|
||||
Command="{Binding Delete_Command}"
|
||||
IsEnabled="{Binding bDelete_IsEnabled}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Command="{Binding Cancel_Command}"
|
||||
Content="{Binding Cancel_Msg}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,86 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Input
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtBEAMWALL
|
||||
Imports System.Windows.Media
|
||||
|
||||
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
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,754 @@
|
||||
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 EgtDataGridColumn)
|
||||
Public Property ProdColumns As ObservableCollection(Of EgtDataGridColumn)
|
||||
Get
|
||||
Return m_ProdColumns
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
||||
m_ProdColumns = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_colProdFile_Name As EgtDataGridColumn
|
||||
Public ReadOnly Property colProdFile_Name As EgtDataGridColumn
|
||||
Get
|
||||
Return m_colProdFile_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_colArchived_Name As EgtDataGridColumn
|
||||
Public ReadOnly Property colArchived_Name As EgtDataGridColumn
|
||||
Get
|
||||
Return m_colArchived_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_ProjColumns As New ObservableCollection(Of EgtDataGridColumn)
|
||||
Public Property ProjColumns As ObservableCollection(Of EgtDataGridColumn)
|
||||
Get
|
||||
Return m_ProjColumns
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
||||
m_ProjColumns = 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 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.Visible = 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.Name = COL_NAME)
|
||||
m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = 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
|
||||
GetPrivateProfileColumns(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 If
|
||||
' setto la visibilità delle colonne delle EgtDataGrid
|
||||
For Each col In ProjColumns
|
||||
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
Next
|
||||
For Each col In ProdColumns
|
||||
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Friend Function VerifySelected() As Boolean
|
||||
If IsNothing(SelProject) Then Return False
|
||||
Dim AllFilesInDir As IEnumerable(Of String) = Nothing
|
||||
If m_ProjectType = Core.ConstBeam.ProjectType.PROJ Then
|
||||
If Not IsNothing(SelProject.ProdFileVM) Then
|
||||
If String.IsNullOrWhiteSpace(SelProject.ProdFileVM.sProdDirPath) OrElse Not Directory.Exists(SelProject.ProdFileVM.sProdDirPath) Then Return False
|
||||
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProdFileVM.sProdDirPath)
|
||||
ElseIf SelProject.ProjFileList.Count > 0 Then
|
||||
If String.IsNullOrWhiteSpace(SelProject.ProjFileList(0).sProjDirPath) OrElse Not Directory.Exists(SelProject.ProjFileList(0).sProjDirPath) Then Return False
|
||||
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProjFileList(0).sProjDirPath)
|
||||
Else Return False
|
||||
End If
|
||||
ElseIf 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,252 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdNewOpenProjectFileDialogV"
|
||||
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:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
IsClosable="False"
|
||||
MinHeight="500" MinWidth="500"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="{Binding Filters_Msg}"
|
||||
Visibility="{Binding Filters_Visibility}"
|
||||
Margin="5">
|
||||
<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"
|
||||
Orientation="Horizontal">
|
||||
<ComboBox ItemsSource="{Binding DayTypeList}"
|
||||
SelectedIndex="{Binding SelDayType}"
|
||||
Style="{StaticResource DayTypeList_ComboBox}"/>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Visibility="{Binding Date_Visibility}">
|
||||
<TextBlock Text="{Binding From_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<DatePicker SelectedDate="{Binding dtStartDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"/>
|
||||
<TextBlock Text="{Binding To_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<DatePicker SelectedDate="{Binding dtEndDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<CheckBox Grid.Column="2"
|
||||
IsChecked="{Binding bViewArchived}"
|
||||
Content="{Binding ViewArchived_Msg}"
|
||||
VerticalAlignment="Center"/>
|
||||
</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}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SearchText}"
|
||||
Visibility="{Binding SearchText_Visibility}"
|
||||
Style="{StaticResource NewSearchText_TextBox}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Rows_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
SelectedIndex="{Binding SelRowQuantity}"
|
||||
Style="{StaticResource OnyProd_FeatureComboBox}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<Border Grid.Row="1" Style="{StaticResource OnlyProdPage_Border}" Margin="1"/>
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
||||
x:Name="MainDataGrid"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
SelectionMode="Single"
|
||||
Margin="5"
|
||||
BindingColumns="{Binding ProdColumns}"
|
||||
RowDetailsVisibilityMode="Visible"
|
||||
CellEditEnding="MainDataGrid_CellEditEnding"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderBackground="{StaticResource BeamWall_Teal}"
|
||||
ColumnHeaderForeground="{StaticResource BeamWall_White}"
|
||||
ColumnHeaderHorizontalContentAlignment="Center"
|
||||
ColumnHeaderFontWeight="Bold"
|
||||
ColumnHeaderFontSize="15"
|
||||
ColumnHeaderPadding="0,2,0,2"
|
||||
Style="{StaticResource DataGrid_OnlyProd}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<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 EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"/>
|
||||
<ToggleButton Grid.Column="1"
|
||||
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource ToolBar_SmallToggleButton}">
|
||||
<Image Source="\Resources\CalcPanel\Edit.png"
|
||||
Style="{StaticResource LockImage}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Archived -->
|
||||
<DataGridTemplateColumn x:Key="colARCHIVED">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="\Resources\OpenProjectFileDialog\Archived.png"
|
||||
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 EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"/>
|
||||
</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}"
|
||||
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 EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource Gray_Grid}"/>
|
||||
<Grid Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Margin="2">
|
||||
<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 EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"
|
||||
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 EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource OpenWnd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding sListName}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding Path=DataContext.ExportDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource OpenWnd_TextBlock}"/>
|
||||
<TextBlock Grid.Column="3"
|
||||
Text="{Binding dtExportDate}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowDetailsTemplate>
|
||||
</EgtBEAMWALL:EgtDataGrid>
|
||||
|
||||
<UniformGrid Columns="4" Grid.Row="2"
|
||||
Margin="0,0,0,5">
|
||||
<Button IsDefault="True" Name="OpenBtn"
|
||||
Content="{Binding Open_Msg}"
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Archive_Msg}"
|
||||
Command="{Binding Archive_Command}"
|
||||
IsEnabled="{Binding bArchived_IsEnabled}"
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Delete_Msg}"
|
||||
Command="{Binding Delete_Command}"
|
||||
IsEnabled="{Binding bDelete_IsEnabled}"
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Command="{Binding Cancel_Command}"
|
||||
Content="{Binding Cancel_Msg}"
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,93 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Input
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class OnlyProdNewOpenProjectFileDialogV
|
||||
|
||||
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,203 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdOpenProjectFileDialogV"
|
||||
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:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
MinHeight="500" MinWidth="500"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="Filters"
|
||||
Margin="5"
|
||||
Visibility="{Binding Filters_Visibility}"
|
||||
BorderBrush="{StaticResource BeamWall_RegentStBlue}">
|
||||
<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}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<ComboBox ItemsSource="{Binding DayTypeList}"
|
||||
SelectedIndex="{Binding SelDayType}"
|
||||
Width="105"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding Date_Visibility}">
|
||||
<TextBlock Text="{Binding From_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<DatePicker SelectedDate="{Binding dtStartDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"/>
|
||||
<TextBlock Text="{Binding To_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<DatePicker SelectedDate="{Binding dtEndDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"/>
|
||||
</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}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SearchText}"
|
||||
Margin="5"
|
||||
Visibility="{Binding SearchText_Visibility}"
|
||||
Style="{StaticResource NewSearchText_TextBox}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="Rows"
|
||||
Style="{StaticResource OptionTextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
SelectedIndex="{Binding SelRowQuantity}"
|
||||
Width="55"
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<Border Grid.Row="1" Style="{StaticResource OnlyProdPage_Border}" Margin="1"/>
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
SelectionMode="Single"
|
||||
Margin="5"
|
||||
BindingColumns="{Binding ProjectColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderBackground="{StaticResource BeamWall_Teal}"
|
||||
ColumnHeaderForeground="{StaticResource BeamWall_White}"
|
||||
ColumnHeaderHorizontalContentAlignment="Center"
|
||||
ColumnHeaderFontWeight="Bold"
|
||||
ColumnHeaderFontSize="15"
|
||||
ColumnHeaderPadding="0,2,0,2"
|
||||
Style="{StaticResource DataGrid_OnlyProd}"
|
||||
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 EgtBEAMWALL:OnlyProdOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdOpenProjectFileDialogV}}}"/>
|
||||
</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 EgtBEAMWALL:OnlyProdOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Resources>
|
||||
</EgtBEAMWALL:EgtDataGrid>
|
||||
|
||||
<UniformGrid Columns="3" Grid.Row="2" Margin="0,0,0,5">
|
||||
<Button IsDefault="True" Name="OpenBtn"
|
||||
Content="{Binding Open_Msg}"
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Delete_Msg}"
|
||||
Command="{Binding Delete_Command}"
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button IsCancel="True"
|
||||
Content="{Binding Cancel_Msg}"
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,75 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class OnlyProdOpenProjectFileDialogV
|
||||
|
||||
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
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -5,9 +5,9 @@
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
Height="500" Width="500" Topmost="True"
|
||||
MinHeight="500" MinWidth="500"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
@@ -21,53 +21,82 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel>
|
||||
<Grid Grid.Row="0" Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*" />
|
||||
<RowDefinition Height="1*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding FilterType_Msg}"
|
||||
Grid.Row="0" Grid.Column="0"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding SearchColumnList}"
|
||||
SelectedItem="{Binding SelSearchColumn}"
|
||||
Width="Auto"
|
||||
Margin="5"
|
||||
Grid.Row="0" Grid.Column="1"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<TextBlock Text="{Binding Search_Msg}"
|
||||
Margin="0,5,0,0"
|
||||
Grid.Row="1" Grid.Column="0"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding SearchText}"
|
||||
Margin="5"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Visibility="{Binding SearchText_Visibility}"/>
|
||||
<Calendar SelectedDatesChanged="Calendar_SelectedDatesChanged"
|
||||
SelectionMode="MultipleRange"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Visibility="{Binding SearchDate_Visibility}"/>
|
||||
<GroupBox Header="Filters"
|
||||
Margin="5"
|
||||
Visibility="{Binding Filters_Visibility}">
|
||||
<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}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<ComboBox ItemsSource="{Binding DayTypeList}"
|
||||
SelectedIndex="{Binding SelDayType}"
|
||||
Width="105"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource PartParam_ComboBox}"/>
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding Date_Visibility}">
|
||||
<TextBlock Text="{Binding From_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
<DatePicker SelectedDate="{Binding dtStartDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
<TextBlock Text="{Binding To_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
<DatePicker SelectedDate="{Binding dtEndDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox ItemsSource="{Binding FilterTypeList}"
|
||||
SelectedItem="{Binding SelFilterType}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SearchText}"
|
||||
Margin="5"
|
||||
Visibility="{Binding SearchText_Visibility}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="Rows"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
SelectedIndex="{Binding SelRowQuantity}"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="5"
|
||||
BindingColumns="{Binding ProjectColumns}">
|
||||
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ColumnHeaderBackground="{x:Null}"
|
||||
Margin="5"
|
||||
BindingColumns="{Binding ProjectColumns}">
|
||||
<DataGrid.Resources>
|
||||
<!-- ProjId -->
|
||||
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}">
|
||||
@@ -85,6 +114,14 @@
|
||||
</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 EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!-- BTL FileName -->
|
||||
<DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
@@ -127,70 +164,15 @@
|
||||
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Delete -->
|
||||
<!--
|
||||
<DataGridTemplateColumn x:Key="colDELETE"
|
||||
Width="Auto"
|
||||
IsReadOnly="True">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="X"
|
||||
Command="{Binding Delete_Command}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>-->
|
||||
</DataGrid.Resources>
|
||||
<!--<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding OpenFileName}"
|
||||
Padding="4,1,4,1">
|
||||
<TextBlock.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick"
|
||||
Command="{Binding DataContext.ProjectDoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
||||
CommandParameter="{Binding nProjId}" />
|
||||
</TextBlock.InputBindings>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>-->
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="IsEnabled" Value="{Binding bIsEnabled}"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ProjectList_MouseDoubleClick"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
</EgtBEAMWALL:EgtDataGrid>
|
||||
|
||||
<!--<ListBox Grid.Row="0"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
Margin="5">
|
||||
-->
|
||||
<!--<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ProjFileName}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>-->
|
||||
<!--
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
|
||||
<Setter Property="Padding" Value="0"></Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding OpenFileName}"
|
||||
Padding="4,1,4,1">
|
||||
<TextBlock.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick"
|
||||
Command="{Binding DataContext.ProjectDoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
||||
CommandParameter="{Binding nProjId}" />
|
||||
</TextBlock.InputBindings>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>-->
|
||||
|
||||
|
||||
<UniformGrid Columns="3" Grid.Row="2" Margin="0,0,0,5">
|
||||
<Button IsDefault="True" Name="OpenBtn"
|
||||
Content="{Binding Open_Msg}" Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
|
||||
@@ -5,6 +5,8 @@ Imports System.Windows.Controls
|
||||
Imports System.Windows.Input
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtBEAMWALL
|
||||
|
||||
Public Class OpenProjectFileDialogV
|
||||
|
||||
@@ -19,6 +21,8 @@ Public Class OpenProjectFileDialogV
|
||||
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
|
||||
@@ -42,6 +46,20 @@ Public Class OpenProjectFileDialogV
|
||||
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"
|
||||
@@ -60,10 +78,4 @@ Public Class OpenProjectFileDialogV
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
Private Sub Calendar_SelectedDatesChanged(sender As Object, e As SelectionChangedEventArgs)
|
||||
Dim cal As System.Windows.Controls.Calendar = sender
|
||||
m_OpenProjFileDialogVM.m_SearchDate = cal.SelectedDates
|
||||
m_OpenProjFileDialogVM.m_ProjectList_View.Refresh()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -4,8 +4,6 @@ Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Data
|
||||
Imports System.Windows.Input
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -14,8 +12,36 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
|
||||
#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 EgtDataGridColumn)
|
||||
Public Property ProjectColumns As ObservableCollection(Of EgtDataGridColumn)
|
||||
Get
|
||||
@@ -83,18 +109,148 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' lista campi per ricerca testuale e con datepicker
|
||||
Protected m_SearchColumnList As New ObservableCollection(Of IdNameStruct)
|
||||
Public ReadOnly Property SearchColumnList As ObservableCollection(Of IdNameStruct)
|
||||
Private m_bFixedProjectList As Boolean
|
||||
Public ReadOnly Property bFixedProjectList As Boolean
|
||||
Get
|
||||
Return m_SearchColumnList
|
||||
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_SelSearchColumn As IdNameStruct = Nothing
|
||||
Public Property SelSearchColumn As IdNameStruct
|
||||
Protected m_BTLDateTypeList As New List(Of String)
|
||||
Public ReadOnly Property BTLDateTypeList As List(Of String)
|
||||
Get
|
||||
Return m_SelSearchColumn
|
||||
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
|
||||
@@ -103,15 +259,15 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
' 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_SelSearchColumn = m_SearchColumnList(0)
|
||||
m_SelFilterType = m_FilterTypeList(0)
|
||||
m_ProjectList_View.Refresh()
|
||||
' ora setto il valore scelto come Tipo Filtro
|
||||
m_SelSearchColumn = value
|
||||
Select Case m_SelSearchColumn.Id
|
||||
Case OpenProjFileColumn.ID, OpenProjFileColumn.BTLFILENAME, OpenProjFileColumn.LISTNAME
|
||||
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 OpenProjFileColumn.EXPORTDATE, OpenProjFileColumn.CREATEDATE
|
||||
Case BTLDateTypes.EXPORTDATE, BTLDateTypes.CREATEDATE
|
||||
SearchText_Visibility = Visibility.Collapsed
|
||||
SearchDate_Visibility = Visibility.Visible
|
||||
Case Else
|
||||
@@ -161,17 +317,13 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Enum OpenProjFileColumn As Integer
|
||||
NULL = 0
|
||||
ID = 1
|
||||
BTLFILENAME = 2
|
||||
LISTNAME = 3
|
||||
EXPORTDATE = 4
|
||||
CREATEDATE = 5
|
||||
End Enum
|
||||
|
||||
#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)
|
||||
@@ -235,6 +387,18 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
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
|
||||
@@ -243,29 +407,70 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
Sub New()
|
||||
' 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(ProjectType As ProjectType)
|
||||
If ProjectType = ProjectType.PROJ Then
|
||||
' carico le colonne della datagrid
|
||||
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROJ, ProjectColumns)
|
||||
' carico campi su cui eseguire il filtro di ricerca
|
||||
m_SearchColumnList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(OpenProjFileColumn.NULL, ""),
|
||||
New IdNameStruct(OpenProjFileColumn.ID, Id_Msg),
|
||||
New IdNameStruct(OpenProjFileColumn.BTLFILENAME, BTLFileName_Msg),
|
||||
New IdNameStruct(OpenProjFileColumn.LISTNAME, ListName_Msg),
|
||||
New IdNameStruct(OpenProjFileColumn.EXPORTDATE, ExportDate_Msg),
|
||||
New IdNameStruct(OpenProjFileColumn.CREATEDATE, CreateDate_Msg)})
|
||||
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg, ExportDate_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.LISTNAME, ListName_Msg),
|
||||
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
|
||||
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
|
||||
NotifyPropertyChanged(NameOf(SelFilterType))
|
||||
ElseIf ProjectType = ProjectType.PROD Then
|
||||
' carico le colonne della datagrid
|
||||
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROD, ProjectColumns)
|
||||
' carico campi su cui eseguire il filtro di ricerca
|
||||
m_SearchColumnList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(OpenProjFileColumn.NULL, ""),
|
||||
New IdNameStruct(OpenProjFileColumn.ID, Id_Msg),
|
||||
New IdNameStruct(OpenProjFileColumn.BTLFILENAME, BTLFileName_Msg),
|
||||
New IdNameStruct(OpenProjFileColumn.CREATEDATE, CreateDate_Msg)})
|
||||
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 If
|
||||
' setto la visibilità delle colonne delle EgtDataGrid
|
||||
For Each col In ProjectColumns
|
||||
@@ -275,12 +480,16 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
|
||||
Friend Function VerifySelected() As Boolean
|
||||
If IsNothing(SelProject) Then Return False
|
||||
Dim AllFilesInDir As IEnumerable(Of String)
|
||||
Dim AllFilesInDir As IEnumerable(Of String) = Nothing
|
||||
If m_ProjectType = Core.ConstBeam.ProjectType.PROJ Then
|
||||
If String.IsNullOrWhiteSpace(SelProject.sProjDirPath) OrElse Not Directory.Exists(SelProject.sProjDirPath) Then Return False
|
||||
' verifico se esiste ProdId
|
||||
AllFilesInDir = IO.Directory.EnumerateFiles(SelProject.sProjDirPath)
|
||||
AllFilesInDir = Directory.EnumerateFiles(SelProject.sProjDirPath)
|
||||
ElseIf m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
|
||||
AllFilesInDir = IO.Directory.EnumerateFiles(SelProject.sProdDirPath)
|
||||
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
|
||||
@@ -294,20 +503,22 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
Dim bProjectOk As Boolean = True
|
||||
If m_ProjectType = ProjectType.PROJ Then
|
||||
Dim CurrProj As ProjFileVM = DirectCast(Proj, ProjFileVM)
|
||||
If m_SelSearchColumn.Id <> OpenProjFileColumn.NULL AndAlso (
|
||||
(m_SelSearchColumn.Id = OpenProjFileColumn.EXPORTDATE AndAlso Not SearchDate.Contains(CurrProj.dtExportDate.Date)) OrElse
|
||||
(m_SelSearchColumn.Id = OpenProjFileColumn.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
If m_SelSearchColumn.Id <> OpenProjFileColumn.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
(m_SelSearchColumn.Id = OpenProjFileColumn.ID AndAlso CurrProj.sProjId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
(m_SelSearchColumn.Id = OpenProjFileColumn.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
(m_SelSearchColumn.Id = OpenProjFileColumn.LISTNAME AndAlso CurrProj.sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
(m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not SearchDate.Contains(CurrProj.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.ID AndAlso CurrProj.sProjId.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.LISTNAME AndAlso CurrProj.sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
ElseIf m_ProjectType = ProjectType.PROD Then
|
||||
Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
|
||||
If m_SelSearchColumn.Id <> OpenProjFileColumn.NULL AndAlso (
|
||||
(m_SelSearchColumn.Id = OpenProjFileColumn.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
If m_SelSearchColumn.Id <> OpenProjFileColumn.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
(m_SelSearchColumn.Id = OpenProjFileColumn.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
(m_SelSearchColumn.Id = OpenProjFileColumn.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
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
|
||||
End If
|
||||
Return bProjectOk
|
||||
End Function
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProdFileM
|
||||
Public Class ProdFileM
|
||||
Inherits ProjectFileM
|
||||
|
||||
Protected m_nProjIdList As List(Of Integer)
|
||||
@@ -10,12 +7,35 @@ Public Class ProdFileM
|
||||
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 ReadOnly Property 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"
|
||||
@@ -27,14 +47,40 @@ Public Class 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) As ProdFileM
|
||||
Dim NewProjectFileM As New ProdFileM
|
||||
NewProjectFileM.m_nProdId = nProdId
|
||||
NewProjectFileM.m_nProjIdList = nProjIdList
|
||||
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
||||
NewProjectFileM.m_sName = sName
|
||||
NewProjectFileM.m_nType = nType
|
||||
NewProjectFileM.m_sMachine = sMachine
|
||||
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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -1,7 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProjFileM
|
||||
Public Class ProjFileM
|
||||
Inherits ProjectFileM
|
||||
|
||||
Protected m_dtExportDate As DateTime
|
||||
@@ -28,6 +25,16 @@ Public Class ProjFileM
|
||||
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()
|
||||
@@ -37,19 +44,22 @@ Public Class 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, IsNew As Boolean, IsLocked As Boolean, nType As BWType, sMachine 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
|
||||
NewProjectFileM.m_bIsNew = IsNew
|
||||
NewProjectFileM.m_bIsLocked = IsLocked
|
||||
NewProjectFileM.m_nType = nType
|
||||
NewProjectFileM.m_sMachine = sMachine
|
||||
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
|
||||
|
||||
|
||||
@@ -1,17 +1,4 @@
|
||||
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
|
||||
Public Class ProjectFileM
|
||||
|
||||
Protected m_nProjId As Integer = 0
|
||||
Public ReadOnly Property nProjId As Integer
|
||||
@@ -74,6 +61,46 @@ Public Class ProjectFileM
|
||||
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
|
||||
|
||||
@@ -47,10 +47,13 @@ Public Class ProdFileVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sName As String
|
||||
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
|
||||
@@ -63,6 +66,12 @@ Public Class ProdFileVM
|
||||
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)
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProjFileVM
|
||||
Public Class ProjFileVM
|
||||
Inherits ProjectFileVM
|
||||
|
||||
Public ReadOnly Property ProjFileM As ProjFileM
|
||||
@@ -68,6 +64,12 @@ Public Class ProjFileVM
|
||||
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
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class ProjectFileVM
|
||||
@@ -117,6 +115,18 @@ Public Class ProjectFileVM
|
||||
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
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 610 B |
@@ -68,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
|
||||
@@ -126,7 +109,7 @@ Public Module BTLIniFile
|
||||
End Function
|
||||
|
||||
' funzione che ottiene il parametro P/Q usando m_nBTLBWType del modulo
|
||||
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean
|
||||
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
|
||||
Dim sBWQParam As String = String.Empty
|
||||
If m_nBTLBWType = BWType.BEAM Then
|
||||
@@ -134,7 +117,7 @@ Public Module BTLIniFile
|
||||
ElseIf m_nBTLBWType = 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
|
||||
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
|
||||
@@ -147,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_
|
||||
@@ -159,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
|
||||
@@ -200,9 +183,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_
|
||||
@@ -212,7 +195,7 @@ Public Module BTLIniFile
|
||||
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(5), sBWQParam)
|
||||
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
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports EgwProxy.LiMan
|
||||
|
||||
Public Module Configuration
|
||||
|
||||
' Test per comunicazione
|
||||
Public m_commLib As DataSyncro
|
||||
|
||||
''' <summary>
|
||||
''' Flag per impostare la visualizzazione con la singola pagina
|
||||
''' </summary>
|
||||
Private m_bOnlyProd As Boolean
|
||||
Public ReadOnly Property bOnlyProd As Boolean
|
||||
Get
|
||||
Return m_bOnlyProd
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetOnlyProd(value As Boolean)
|
||||
m_bOnlyProd = value
|
||||
End Sub
|
||||
|
||||
''' <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
|
||||
|
||||
''' <summary>
|
||||
''' Flag per impostare la visualizzazione con la singola pagina
|
||||
''' </summary>
|
||||
Private m_sServerAddressRelease As String
|
||||
Public ReadOnly Property sServerAddressRelease As String
|
||||
Get
|
||||
Return m_sServerAddressRelease
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetServerAddressRelease(value As String)
|
||||
m_sServerAddressRelease = value
|
||||
End Sub
|
||||
|
||||
' Versione attuale del programma
|
||||
Public ReadOnly Property ActualVersion As String
|
||||
Get
|
||||
Return My.Application.Info.Version.ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Funzione che recupera la directory del file INI
|
||||
''' </summary>
|
||||
Public Sub GetIniFileDirectory()
|
||||
' Impostazione path radice per i dati
|
||||
Dim m_sDataRoot As String = System.AppDomain.CurrentDomain.BaseDirectory
|
||||
If EgtUILib.GetPrivateProfileString(ConstGen.S_DATA, ConstGen.K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & ConstGen.DAT_FILE_NAME) = 0 Then
|
||||
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||
End If
|
||||
' Impostazione direttorio di configurazione
|
||||
Dim m_sConfigDir As String = m_sDataRoot & "\" & ConstGen.CONF_DIR
|
||||
' Impostazione path Ini file
|
||||
IniFile.m_sIniFile = m_sConfigDir & "\" & Core.ConstIni.INI_FILE_NAME
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Funzione per recuperare bOnlyProd
|
||||
''' </summary>
|
||||
''' <param name="Section">Sezione dove si trova la variabile che devo cercare</param>
|
||||
''' <param name="Key">Variabile che sto cercando</param>
|
||||
''' <param name="Path">Cartella dove e' presente il file ini</param>
|
||||
''' <param name="Default_Value">Valore di defaul opzionabile</param>
|
||||
''' <returns></returns>
|
||||
Public Function Read_Value(Section As String, Key As String, Path As String, Optional Default_Value As String = "") As String
|
||||
Dim Reader_Lines As String() = System.IO.File.ReadAllLines(Path)
|
||||
Dim Current_Section As String = ""
|
||||
|
||||
For Each Reader_Line As String In Reader_Lines
|
||||
|
||||
If Reader_Line.StartsWith("[") AndAlso Reader_Line.EndsWith("]") Then
|
||||
Current_Section = Reader_Line
|
||||
ElseIf Current_Section.Equals($"[{Section}]") Then
|
||||
Dim lineParts As String() = Reader_Line.Split({"="c}, 2)
|
||||
|
||||
If lineParts.Length >= 1 AndAlso lineParts(0) = Key Then
|
||||
Return If(lineParts.Length >= 2, lineParts(1), Default_Value)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Default_Value
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Metodo che controlla la comunicazione server
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function GetComunication() As Boolean
|
||||
' eseguo test per comunicazione server (ping, alive)
|
||||
m_commLib = New DataSyncro(EgtBEAMWALL.Core.Configuration.sServerAddressRelease)
|
||||
If m_commLib.CheckRemote() Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
End Module
|
||||
@@ -2,326 +2,53 @@
|
||||
|
||||
Public Module CoreMap
|
||||
|
||||
'Private m_refMainWindowVM As MainWindowVM
|
||||
'Private m_refMyStatusBarVM As MyStatusBarVM
|
||||
'Private m_refProjManagerVM As ProjManagerVM
|
||||
'Private m_refProdManagerVM As ProdManagerVM
|
||||
'Private m_refProjectVM As ProjectVM
|
||||
'Private m_refMainMenuVM As MainMenuVM
|
||||
Private m_refMachinePanelVM As MachinePanelVM
|
||||
Private m_refMyMachGroupPanelVM As MyMachGroupPanelVM
|
||||
'Private m_refLeftPanelVM As LeftPanelVM
|
||||
'Private m_refBottomPanelVM As BottomPanelVM
|
||||
'Private m_refShowBeamPanelVM As ShowBeamPanelVM
|
||||
'Private m_refConfigurationPageVM As ConfigurationPageVM
|
||||
'Private m_refRawPartListVM As RawPartListVM
|
||||
'Private m_refPartInRawPartListVM As PartInRawPartListVM
|
||||
'Private m_refWarehouseWndVM As WarehouseWndVM
|
||||
'Private m_refFeatureListVM As FeatureListVM
|
||||
'Private m_refFreeContourManagerVM As FreeContourManagerVM
|
||||
'Private m_refFreeContourInputVM As FreeContourInputVM
|
||||
'Private m_refPartManagerVM As PartManagerVM
|
||||
'Private m_refInstrumentPanelVM As InstrumentPanelVM
|
||||
'Private m_refTopPanelVM As TopPanelVM
|
||||
'Private m_refOptimizePanelVM As OptimizePanelVM
|
||||
'Private m_refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
||||
|
||||
#Region "Get"
|
||||
|
||||
'Public ReadOnly Property refMainWindowVM As MainWindowVM
|
||||
' Get
|
||||
' Return m_refMainWindowVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refMyStatusBarVM As MyStatusBarVM
|
||||
' Get
|
||||
' Return LibMap.refStatusBarVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refProjManagerVM As ProjManagerVM
|
||||
' Get
|
||||
' Return m_refProjManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
'Public ReadOnly Property refProdManagerVM As ProdManagerVM
|
||||
' Get
|
||||
' Return m_refProdManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refProjectVM As ProjectVM
|
||||
' Get
|
||||
' Return m_refProjectVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property refSceneHostVM As SceneHostVM
|
||||
Get
|
||||
Return LibMap.refSceneHostVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public ReadOnly Property refShowPanelVM As ShowPanelVM
|
||||
' Get
|
||||
' Return LibMap.refShowPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refMainMenuVM As MainMenuVM
|
||||
' Get
|
||||
' Return m_refMainMenuVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property refMachinePanelVM As MachinePanelVM
|
||||
Get
|
||||
Return m_refMachinePanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public ReadOnly Property refLeftPanelVM As LeftPanelVM
|
||||
' Get
|
||||
' Return m_refLeftPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property refMachGroupPanelVM As MyMachGroupPanelVM
|
||||
Get
|
||||
Return m_refMyMachGroupPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public ReadOnly Property refBottomPanelVM As BottomPanelVM
|
||||
' Get
|
||||
' Return m_refBottomPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refShowBeamPanelVM As ShowBeamPanelVM
|
||||
' Get
|
||||
' Return m_refShowBeamPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refConfigurationPageVM As ConfigurationPageVM
|
||||
' Get
|
||||
' Return m_refConfigurationPageVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refRawPartListVM As RawPartListVM
|
||||
' Get
|
||||
' Return m_refRawPartListVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refPartInRawPartListVM As PartInRawPartListVM
|
||||
' Get
|
||||
' Return m_refPartInRawPartListVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refWarehouseWndVM As WarehouseWndVM
|
||||
' Get
|
||||
' Return m_refWarehouseWndVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refFeatureListVM As FeatureListVM
|
||||
' Get
|
||||
' Return m_refFeatureListVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refFreeContourManagerVM As FreeContourManagerVM
|
||||
' Get
|
||||
' Return m_refFreeContourManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refFreeContourInputVM As FreeContourInputVM
|
||||
' Get
|
||||
' Return m_refFreeContourInputVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refPartManagerVM As PartManagerVM
|
||||
' Get
|
||||
' Return m_refPartManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refInstrumentPanelVM As MyInstrumentPanelVM
|
||||
' Get
|
||||
' Return m_refInstrumentPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refTopPanelVM As TopPanelVM
|
||||
' Get
|
||||
' Return m_refTopPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refOptimizePanelVM As OptimizePanelVM
|
||||
' Get
|
||||
' Return m_refOptimizePanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
||||
' Get
|
||||
' Return m_refOpenProjectFileDialogVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
#Region "Set"
|
||||
|
||||
'Friend Function SetRefMyStatusBarVM(MyStatusBarVM As MyStatusBarVM) As Boolean
|
||||
' LibMap.SetRefStatusBarVM(MyStatusBarVM)
|
||||
' Return Not IsNothing(LibMap.refStatusBarVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefProjManagerVM(ProjManagerVM As ProjManagerVM) As Boolean
|
||||
' m_refProjManagerVM = ProjManagerVM
|
||||
' Return Not IsNothing(m_refProjManagerVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefProdManagerVM(ProdManagerVM As ProdManagerVM) As Boolean
|
||||
' m_refProdManagerVM = ProdManagerVM
|
||||
' Return Not IsNothing(m_refProdManagerVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
|
||||
' m_refProjectVM = ProjectVM
|
||||
' Return Not IsNothing(m_refProjectVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefMainMenuVM(MainMenuVM As MainMenuVM) As Boolean
|
||||
' m_refMainMenuVM = MainMenuVM
|
||||
' Return Not IsNothing(m_refMainMenuVM)
|
||||
'End Function
|
||||
|
||||
Public Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
|
||||
LibMap.SetRefSceneHostVM(SceneHostVM)
|
||||
Return Not IsNothing(LibMap.refSceneHostVM)
|
||||
End Function
|
||||
|
||||
'Friend Function SetRefShowPanelVM(ShowPanelVM As ShowPanelVM) As Boolean
|
||||
' LibMap.SetRefShowPanelVM(ShowPanelVM)
|
||||
' Return Not IsNothing(LibMap.refShowPanelVM)
|
||||
'End Function
|
||||
|
||||
Public Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
|
||||
m_refMachinePanelVM = MachinePanelVM
|
||||
Return Not IsNothing(m_refMachinePanelVM)
|
||||
End Function
|
||||
|
||||
'Friend Function SetRefLeftPanelVM(LeftPanelVM As LeftPanelVM) As Boolean
|
||||
' m_refLeftPanelVM = LeftPanelVM
|
||||
' Return Not IsNothing(m_refLeftPanelVM)
|
||||
'End Function
|
||||
|
||||
Public Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
|
||||
m_refMyMachGroupPanelVM = MachGroupPanelVM
|
||||
Return Not IsNothing(m_refMyMachGroupPanelVM)
|
||||
End Function
|
||||
|
||||
'Friend Function SetRefBottomPanelVM(BottomPanelVM As BottomPanelVM) As Boolean
|
||||
' m_refBottomPanelVM = BottomPanelVM
|
||||
' Return Not IsNothing(m_refBottomPanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefShowBeamPanelVM(ShowBeamPanelVM As ShowBeamPanelVM) As Boolean
|
||||
' m_refShowBeamPanelVM = ShowBeamPanelVM
|
||||
' Return Not IsNothing(m_refShowBeamPanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefConfigurationPageVM(ConfigurationPageVM As ConfigurationPageVM) As Boolean
|
||||
' m_refConfigurationPageVM = ConfigurationPageVM
|
||||
' Return Not IsNothing(m_refConfigurationPageVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefRawPartListVM(RawPartListVM As RawPartListVM) As Boolean
|
||||
' m_refRawPartListVM = RawPartListVM
|
||||
' Return Not IsNothing(m_refRawPartListVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefPartInRawPartListVM(PartInRawPartListVM As PartInRawPartListVM) As Boolean
|
||||
' m_refPartInRawPartListVM = PartInRawPartListVM
|
||||
' Return Not IsNothing(m_refPartInRawPartListVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefWarehouseWndVM(WarehouseWndVM As WarehouseWndVM) As Boolean
|
||||
' m_refWarehouseWndVM = WarehouseWndVM
|
||||
' Return Not IsNothing(m_refWarehouseWndVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefFeatureListVM(FeatureListVM As FeatureListVM) As Boolean
|
||||
' m_refFeatureListVM = FeatureListVM
|
||||
' Return Not IsNothing(m_refFeatureListVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefFreeContourManagerVM(FreeContourManagerVM As FreeContourManagerVM) As Boolean
|
||||
' m_refFreeContourManagerVM = FreeContourManagerVM
|
||||
' Return Not IsNothing(m_refFreeContourManagerVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefFreeContourInputVM(FreeContourInputVM As FreeContourInputVM) As Boolean
|
||||
' m_refFreeContourInputVM = FreeContourInputVM
|
||||
' Return Not IsNothing(m_refFreeContourInputVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefPartManagerVM(PartManagerVM As PartManagerVM) As Boolean
|
||||
' m_refPartManagerVM = PartManagerVM
|
||||
' Return Not IsNothing(m_refPartManagerVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefInstrumentPanelVM(InstrumentPanelVM As InstrumentPanelVM) As Boolean
|
||||
' m_refInstrumentPanelVM = InstrumentPanelVM
|
||||
' Return Not IsNothing(m_refInstrumentPanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefTopPanelVM(TopPanelVM As TopPanelVM) As Boolean
|
||||
' m_refTopPanelVM = TopPanelVM
|
||||
' Return Not IsNothing(m_refTopPanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefOptimizePanelVM(OptimizePanelVM As OptimizePanelVM) As Boolean
|
||||
' m_refOptimizePanelVM = OptimizePanelVM
|
||||
' Return Not IsNothing(m_refOptimizePanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefOpenProjectFileDialogVM(OpenProjectFileDialogVM As OpenProjectFileDialogVM) As Boolean
|
||||
' m_refOpenProjectFileDialogVM = OpenProjectFileDialogVM
|
||||
' Return Not IsNothing(m_refOpenProjectFileDialogVM)
|
||||
'End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
#Region "Init"
|
||||
|
||||
'Friend Function BeginInit(MainWindowVM As MainWindowVM) As Boolean
|
||||
' m_refMainWindowVM = MainWindowVM
|
||||
' Return Not IsNothing(m_refMainWindowVM)
|
||||
'End Function
|
||||
Friend Function EndInit() As Boolean
|
||||
'Return Not IsNothing(m_refMainWindowVM) AndAlso Not IsNothing(m_refMainMenuVM) AndAlso
|
||||
' Not IsNothing(LibMap.refStatusBarVM) AndAlso Not IsNothing(m_refProjManagerVM) AndAlso
|
||||
' Not IsNothing(m_refProdManagerVM) AndAlso Not IsNothing(m_refConfigurationPageVM) AndAlso
|
||||
' Not IsNothing(LibMap.refSceneHostVM) AndAlso Not IsNothing(LibMap.refShowPanelVM) AndAlso
|
||||
' Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM) AndAlso
|
||||
' Not IsNothing(m_refRawPartListVM) AndAlso Not IsNothing(m_refWarehouseWndVM) AndAlso
|
||||
' Not IsNothing(m_refFeatureListVM) AndAlso Not IsNothing(m_refPartInRawPartListVM) AndAlso
|
||||
' Not IsNothing(m_refFreeContourManagerVM) AndAlso Not IsNothing(m_refFreeContourInputVM) AndAlso
|
||||
' Not IsNothing(m_refInstrumentPanelVM) AndAlso Not IsNothing(m_refTopPanelVM) AndAlso
|
||||
' Not IsNothing(m_refPartManagerVM) AndAlso Not IsNothing(m_refOptimizePanelVM) AndAlso
|
||||
' Not IsNothing(m_refShowBeamPanelVM) AndAlso Not IsNothing(m_refOpenProjectFileDialogVM) AndAlso
|
||||
' LibMap.EndInit()
|
||||
Return Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM)
|
||||
End Function
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports System.Collections.ObjectModel
|
||||
@@ -27,7 +26,7 @@ Public Module DimensionsIniFile
|
||||
Dim GridLenType As GridUnitType
|
||||
Integer.TryParse(sValueParams(0), nDimIndex)
|
||||
Integer.TryParse(sValueParams(1), nDimType)
|
||||
StringToDouble(sValueParams(2), GridLenValue)
|
||||
StringToDoubleAdv(sValueParams(2), GridLenValue)
|
||||
Integer.TryParse(sValueParams(3), GridLenType)
|
||||
GridDimsList.Add(New GridDimension(GridName, nDimIndex, nDimType, New GridLength(GridLenValue, GridLenType)))
|
||||
End If
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user