| ofs | hex dump | ascii |
|---|
| 0000 | 00 00 0f 81 00 01 8c 8c 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe | ....................2019.3.6f1.. |
| 0020 | ff ff ff 01 02 00 00 00 0b 04 00 00 00 ff ff 66 9a 86 21 eb 14 35 98 39 dd 34 1d 51 0e c1 f3 42 | ...............f..!..5.9.4.Q...B |
| 0040 | 00 00 00 ed 00 00 00 02 00 00 00 00 00 00 00 37 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 | ...............7................ |
| 0060 | 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 | ................................ |
| 0080 | 00 00 00 00 00 00 00 01 00 01 00 0d 00 00 00 45 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 | ...............E................ |
| 00a0 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 | ...............#................ |
| 00c0 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 | ...............,................ |
| 00e0 | 00 00 00 00 00 00 00 01 00 01 00 35 00 00 00 61 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 | ...........5...a................ |
| 0100 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 | ...............#................ |
| 0120 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 | ...............,................ |
| 0140 | 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 | ...............r................ |
| 0160 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 | ...............#................ |
| 0180 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 | ...............,................ |
| 01a0 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 | ...........H.................... |
| 01c0 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 | ...........1...1............@... |
| 01e0 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 | ................................ |
| 0200 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 | ...........Q...j................ |
| 0220 | 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 4a 00 00 00 ff ff ff ff 0f 00 00 00 00 c0 00 00 00 | ...............J................ |
| 0240 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 10 00 00 00 00 80 00 00 00 | ...........1...1................ |
| 0260 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 11 00 00 00 00 00 00 00 00 | ................................ |
| 0280 | 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 12 00 00 00 00 80 00 00 00 | ...............j................ |
| 02a0 | 00 00 00 00 00 00 00 01 00 04 00 5c 00 00 00 9b 00 00 80 ff ff ff ff 13 00 00 00 00 80 00 00 00 | ...........\.................... |
| 02c0 | 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 72 00 00 00 ff ff ff ff 14 00 00 00 00 80 00 00 00 | ...........H...r................ |
| 02e0 | 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 15 00 00 00 01 40 00 00 00 | ...........1...1............@... |
| 0300 | 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 16 00 00 00 01 00 00 00 00 | ................................ |
| 0320 | 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 17 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 0340 | 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 77 00 00 00 ff ff ff ff 18 00 00 00 00 80 00 00 00 | ...........H...w................ |
| 0360 | 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 19 00 00 00 01 40 00 00 00 | ...........1...1............@... |
| 0380 | 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1a 00 00 00 01 00 00 00 00 | ................................ |
| 03a0 | 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1b 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 03c0 | 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 80 00 00 00 ff ff ff ff 1c 00 00 00 00 80 00 00 00 | ...........H.................... |
| 03e0 | 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 1d 00 00 00 01 40 00 00 00 | ...........1...1............@... |
| 0400 | 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1e 00 00 00 01 00 00 00 00 | ................................ |
| 0420 | 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1f 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 0440 | 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 20 00 00 00 00 00 00 00 00 | ...........y.................... |
| 0460 | 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 21 00 00 00 01 00 80 00 00 | ...............#.......!........ |
| 0480 | 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 22 00 00 00 01 00 80 00 00 | ...............,......."........ |
| 04a0 | 00 00 00 00 00 00 00 01 00 01 00 11 03 00 80 85 00 00 00 ff ff ff ff 23 00 00 00 01 40 08 00 00 | .......................#....@... |
| 04c0 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 24 00 00 00 01 00 08 00 00 | ...........1...1.......$........ |
| 04e0 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 25 00 00 00 01 00 08 00 00 | .......................%........ |
| 0500 | 00 00 00 00 00 00 00 01 00 03 00 2e 03 00 80 6a 00 00 80 08 00 00 00 26 00 00 00 01 00 08 00 00 | ...............j.......&........ |
| 0520 | 00 00 00 00 00 00 00 01 00 01 00 d5 03 00 80 93 00 00 00 ff ff ff ff 27 00 00 00 00 80 00 00 00 | .......................'........ |
| 0540 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 28 00 00 00 00 c0 00 00 00 | ...........1...1.......(........ |
| 0560 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 29 00 00 00 00 00 00 00 00 | .......................)........ |
| 0580 | 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 2a 00 00 00 00 80 00 00 00 | ...............j.......*........ |
| 05a0 | 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b 00 00 80 ff ff ff ff 2b 00 00 00 00 80 00 00 00 | ...........H...........+........ |
| 05c0 | 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 00 00 80 ff ff ff ff 2c 00 00 00 01 40 00 00 00 | ...........1...1.......,....@... |
| 05e0 | 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b 03 00 80 04 00 00 00 2d 00 00 00 01 00 00 00 00 | .......................-........ |
| 0600 | 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a 00 00 80 01 00 00 00 2e 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 0620 | 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 2f 00 00 00 00 00 00 00 00 | ...........y.........../........ |
| 0640 | 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 30 00 00 00 01 00 80 00 00 | ...............#.......0........ |
| 0660 | 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 31 00 00 00 01 00 80 00 00 | ...............,.......1........ |
| 0680 | 00 00 00 00 00 00 00 01 00 01 00 20 03 00 80 a7 00 00 00 02 00 00 00 32 00 00 00 00 40 00 00 00 | .......................2....@... |
| 06a0 | 00 00 00 00 00 00 00 01 00 01 00 be 02 00 80 b6 00 00 00 0c 00 00 00 33 00 00 00 00 40 00 00 00 | .......................3....@... |
| 06c0 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 34 00 00 00 01 00 80 00 00 | ...............#.......4........ |
| 06e0 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 35 00 00 00 01 00 80 00 00 | ...............,.......5........ |
| 0700 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 bb 00 00 00 ff ff ff ff 36 00 00 00 01 80 00 00 00 | ...........H...........6........ |
| 0720 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 37 00 00 00 01 40 00 00 00 | ...........1...1.......7....@... |
| 0740 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 38 00 00 00 01 00 00 00 00 | .......................8........ |
| 0760 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 39 00 00 00 01 00 00 00 00 | ...........Q...j.......9........ |
| 0780 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 c6 00 00 00 ff ff ff ff 3a 00 00 00 01 80 00 00 00 | ...........H...........:........ |
| 07a0 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3b 00 00 00 01 40 00 00 00 | ...........1...1.......;....@... |
| 07c0 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 3c 00 00 00 01 00 00 00 00 | .......................<........ |
| 07e0 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 3d 00 00 00 01 00 00 00 00 | ...........Q...j.......=........ |
| 0800 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 d8 00 00 00 ff ff ff ff 3e 00 00 00 01 80 00 00 00 | ...........H...........>........ |
| 0820 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3f 00 00 00 01 40 00 00 00 | ...........1...1.......?....@... |
| 0840 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 40 00 00 00 01 00 00 00 00 | .......................@........ |
| 0860 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 41 00 00 00 01 00 00 00 00 | ...........Q...j.......A........ |
| 0880 | 00 00 00 00 00 00 00 4d 6f 6e 6f 49 6d 70 6f 72 74 65 72 00 50 50 74 72 3c 45 64 69 74 6f 72 45 | .......MonoImporter.PPtr<EditorE |
| 08a0 | 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 50 74 72 | xtension>.m_FileID.m_PathID.PPtr |
| 08c0 | 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 45 78 74 65 72 6e 61 6c 4f 62 6a 65 63 | <PrefabInstance>.m_ExternalObjec |
| 08e0 | 74 73 00 53 6f 75 72 63 65 41 73 73 65 74 49 64 65 6e 74 69 66 69 65 72 00 74 79 70 65 00 61 73 | ts.SourceAssetIdentifier.type.as |
| 0900 | 73 65 6d 62 6c 79 00 6e 61 6d 65 00 6d 5f 55 73 65 64 46 69 6c 65 49 44 73 00 6d 5f 44 65 66 61 | sembly.name.m_UsedFileIDs.m_Defa |
| 0920 | 75 6c 74 52 65 66 65 72 65 6e 63 65 73 00 65 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 69 63 6f | ultReferences.executionOrder.ico |
| 0940 | 6e 00 6d 5f 55 73 65 72 44 61 74 61 00 6d 5f 41 73 73 65 74 42 75 6e 64 6c 65 4e 61 6d 65 00 6d | n.m_UserData.m_AssetBundleName.m |
| 0960 | 5f 41 73 73 65 74 42 75 6e 64 6c 65 56 61 72 69 61 6e 74 00 00 00 00 00 73 00 00 00 00 ff ff a3 | _AssetBundleVariant.....s....... |
| 0980 | 47 f1 d7 dc 8f 5a 35 36 a0 3a 21 40 69 c1 4a 2a 00 00 00 81 00 00 00 05 00 00 00 15 01 00 80 37 | G....Z56.:!@i.J*...............7 |
| 09a0 | 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 | ................................ |
| 09c0 | 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 45 | ...............................E |
| 09e0 | 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0a00 | 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0a20 | 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 28 00 00 00 61 | ...........................(...a |
| 0a40 | 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0a60 | 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0a80 | 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 | ...............................r |
| 0aa0 | 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0ac0 | 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0ae0 | 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab | ...........................H.... |
| 0b00 | 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ...........................1...1 |
| 0b20 | 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | ............@................... |
| 0b40 | 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | ...........................Q...j |
| 0b60 | 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ea | ...........................H.... |
| 0b80 | 01 00 80 ff ff ff ff 0f 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ...........................1...1 |
| 0ba0 | 00 00 80 ff ff ff ff 10 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | ............@................... |
| 0bc0 | 03 00 80 04 00 00 00 11 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | ...........................Q...j |
| 0be0 | 00 00 80 01 00 00 00 12 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 3d | ...............................= |
| 0c00 | 00 00 00 ff ff ff ff 13 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ...........................1...1 |
| 0c20 | 00 00 80 ff ff ff ff 14 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | ................................ |
| 0c40 | 03 00 80 04 00 00 00 15 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a | ...............................j |
| 0c60 | 00 00 80 ff ff ff ff 16 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b | ...........................H.... |
| 0c80 | 00 00 80 ff ff ff ff 17 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 | ...........................1...1 |
| 0ca0 | 00 00 80 ff ff ff ff 18 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b | ............@................... |
| 0cc0 | 03 00 80 04 00 00 00 19 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a | ...........................Q...j |
| 0ce0 | 00 00 80 01 00 00 00 1a 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a | ...........................y.... |
| 0d00 | 03 00 80 0c 00 00 00 1b 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 16 | ................................ |
| 0d20 | 00 00 00 04 00 00 00 1c 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 1f | ................................ |
| 0d40 | 00 00 00 08 00 00 00 1d 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 79 02 00 80 51 | ...........................y...Q |
| 0d60 | 00 00 00 0c 00 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0d80 | 00 00 00 04 00 00 00 1f 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0da0 | 00 00 00 08 00 00 00 20 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 de 00 00 80 58 | ...............................X |
| 0dc0 | 00 00 00 04 00 00 00 21 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 69 | .......!...................H...i |
| 0de0 | 00 00 00 ff ff ff ff 22 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ......."...................1...1 |
| 0e00 | 00 00 80 ff ff ff ff 23 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | .......#....@................... |
| 0e20 | 03 00 80 04 00 00 00 24 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | .......$...................Q...j |
| 0e40 | 00 00 80 01 00 00 00 25 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 75 | .......%...................H...u |
| 0e60 | 00 00 00 ff ff ff ff 26 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | .......&...................1...1 |
| 0e80 | 00 00 80 ff ff ff ff 27 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | .......'....@................... |
| 0ea0 | 03 00 80 04 00 00 00 28 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | .......(...................Q...j |
| 0ec0 | 00 00 80 01 00 00 00 29 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 50 50 74 72 3c 45 64 69 74 | .......)...............PPtr<Edit |
| 0ee0 | 6f 72 45 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 | orExtension>.m_FileID.m_PathID.P |
| 0f00 | 50 74 72 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 44 65 66 61 75 6c 74 52 65 66 | Ptr<PrefabInstance>.m_DefaultRef |
| 0f20 | 65 72 65 6e 63 65 73 00 6d 5f 49 63 6f 6e 00 6d 5f 45 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 | erences.m_Icon.m_ExecutionOrder. |
| 0f40 | 6d 5f 43 6c 61 73 73 4e 61 6d 65 00 6d 5f 4e 61 6d 65 73 70 61 63 65 00 00 00 00 00 02 00 00 00 | m_ClassName.m_Namespace......... |
| 0f60 | 03 00 00 00 00 00 00 00 00 00 00 00 5c 00 00 00 00 00 00 00 e0 79 af 00 00 00 00 00 60 00 00 00 | ............\........y......`... |
| 0f80 | 2c 7c 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ,|.............................. |
| 0fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 0fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 0fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1000 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 e0 79 af 00 00 00 00 00 00 00 00 00 | .....................y.......... |
| 1040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1080 | 00 00 00 00 00 00 00 00 12 00 00 00 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 00 00 | ............InputControlLayout.. |
| 10a0 | 95 7b 01 00 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e | .{..using.System;..using.System. |
| 10c0 | 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 | Collections.Generic;..using.Syst |
| 10e0 | 65 6d 2e 4c 69 6e 71 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 52 65 66 6c 65 63 74 69 6f | em.Linq;..using.System.Reflectio |
| 1100 | 6e 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2e 43 6f 6d 70 69 6c 65 | n;..using.System.Runtime.Compile |
| 1120 | 72 53 65 72 76 69 63 65 73 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 | rServices;..using.System.Runtime |
| 1140 | 2e 49 6e 74 65 72 6f 70 53 65 72 76 69 63 65 73 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e | .InteropServices;..using.System. |
| 1160 | 52 75 6e 74 69 6d 65 2e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 3b 0d 0a 75 73 69 6e 67 20 55 6e | Runtime.Serialization;..using.Un |
| 1180 | 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 4c 6f 77 4c 65 76 65 6c 3b 0d | ityEngine.InputSystem.LowLevel;. |
| 11a0 | 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 | .using.UnityEngine.InputSystem.U |
| 11c0 | 74 69 6c 69 74 69 65 73 3b 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 77 65 20 72 65 61 6c 6c 79 | tilities;....////TODO:.we.really |
| 11e0 | 20 6e 65 65 64 20 70 72 6f 70 65 72 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 74 6f 20 62 65 20 | .need.proper.verification.to.be. |
| 1200 | 69 6e 20 70 6c 61 63 65 20 74 6f 20 65 6e 73 75 72 65 20 74 68 61 74 20 74 68 65 20 72 65 73 75 | in.place.to.ensure.that.the.resu |
| 1220 | 6c 74 69 6e 67 20 6c 61 79 6f 75 74 20 69 73 6e 27 74 20 63 6f 6d 69 6e 67 20 6f 75 74 20 77 69 | lting.layout.isn't.coming.out.wi |
| 1240 | 74 68 20 61 20 62 61 64 20 6d 65 6d 6f 72 79 20 6c 61 79 6f 75 74 0d 0a 0d 0a 2f 2f 2f 2f 54 4f | th.a.bad.memory.layout....////TO |
| 1260 | 44 4f 3a 20 61 64 64 20 63 6f 64 65 2d 67 65 6e 65 72 61 74 69 6f 6e 20 74 68 61 74 20 74 61 6b | DO:.add.code-generation.that.tak |
| 1280 | 65 73 20 61 20 6c 61 79 6f 75 74 20 61 6e 64 20 73 70 69 74 73 20 6f 75 74 20 43 23 20 63 6f 64 | es.a.layout.and.spits.out.C#.cod |
| 12a0 | 65 20 74 68 61 74 20 74 72 61 6e 73 6c 61 74 65 73 20 69 74 20 74 6f 20 61 20 63 6f 6d 6d 6f 6e | e.that.translates.it.to.a.common |
| 12c0 | 20 76 61 6c 75 65 20 66 6f 72 6d 61 74 0d 0a 2f 2f 2f 2f 20 20 20 20 20 20 28 74 68 69 73 20 63 | .value.format..////......(this.c |
| 12e0 | 61 6e 20 62 65 20 75 73 65 64 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 74 6f 20 74 72 61 6e | an.be.used,.for.example,.to.tran |
| 1300 | 73 6c 61 74 65 20 61 6c 6c 20 74 68 65 20 76 61 72 69 6f 75 73 20 67 61 6d 65 70 61 64 20 66 6f | slate.all.the.various.gamepad.fo |
| 1320 | 72 6d 61 74 73 20 69 6e 74 6f 20 6f 6e 65 20 73 69 6e 67 6c 65 20 63 6f 6d 6d 6f 6e 20 67 61 6d | rmats.into.one.single.common.gam |
| 1340 | 65 70 61 64 20 66 6f 72 6d 61 74 29 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 6c 6c 6f 77 20 | epad.format)....////TODO:.allow. |
| 1360 | 6c 61 79 6f 75 74 73 20 74 6f 20 73 65 74 20 64 65 66 61 75 6c 74 20 64 65 76 69 63 65 20 6e 61 | layouts.to.set.default.device.na |
| 1380 | 6d 65 73 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 6c 6c 6f 77 20 63 72 65 61 74 69 6e 67 20 | mes....////TODO:.allow.creating. |
| 13a0 | 67 65 6e 65 72 69 63 20 63 6f 6e 74 72 6f 6c 73 20 61 73 20 70 61 72 65 6e 74 73 20 6a 75 73 74 | generic.controls.as.parents.just |
| 13c0 | 20 74 6f 20 67 72 6f 75 70 20 63 68 69 6c 64 20 63 6f 6e 74 72 6f 6c 73 0d 0a 0d 0a 2f 2f 2f 2f | .to.group.child.controls....//// |
| 13e0 | 54 4f 44 4f 3a 20 61 6c 6c 6f 77 20 74 68 69 6e 67 73 20 6c 69 6b 65 20 22 2d 73 6f 6d 65 74 68 | TODO:.allow.things.like."-someth |
| 1400 | 69 6e 67 22 20 61 6e 64 20 22 2b 73 6f 6d 65 74 68 69 6e 67 22 20 66 6f 72 20 75 73 61 67 65 73 | ing".and."+something".for.usages |
| 1420 | 2c 20 70 72 6f 63 65 73 73 6f 72 73 2c 20 65 74 63 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 | ,.processors,.etc....////TODO:.a |
| 1440 | 6c 6c 6f 77 20 73 65 74 74 69 6e 67 20 77 68 65 74 68 65 72 20 74 68 65 20 64 65 76 69 63 65 20 | llow.setting.whether.the.device. |
| 1460 | 73 68 6f 75 6c 64 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 62 65 63 6f 6d 65 20 63 75 72 72 | should.automatically.become.curr |
| 1480 | 65 6e 74 20 61 6e 64 20 77 68 65 74 68 65 72 20 69 74 20 77 61 6e 74 73 20 6e 6f 69 73 65 20 66 | ent.and.whether.it.wants.noise.f |
| 14a0 | 69 6c 74 65 72 69 6e 67 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 65 6e 73 75 72 65 20 74 68 61 | iltering....////TODO:.ensure.tha |
| 14c0 | 74 20 69 66 20 61 20 6c 61 79 6f 75 74 20 73 65 74 73 20 61 20 64 65 76 69 63 65 20 64 65 73 63 | t.if.a.layout.sets.a.device.desc |
| 14e0 | 72 69 70 74 69 6f 6e 2c 20 69 74 20 69 73 20 69 6e 64 65 65 64 20 61 20 64 65 76 69 63 65 20 6c | ription,.it.is.indeed.a.device.l |
| 1500 | 61 79 6f 75 74 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 6d 61 6b 65 20 6f 66 66 73 65 74 20 6f | ayout....////TODO:.make.offset.o |
| 1520 | 6e 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 69 62 75 74 65 20 72 65 6c 61 74 69 76 65 | n.InputControlAttribute.relative |
| 1540 | 20 74 6f 20 66 69 65 6c 64 20 69 6e 73 74 65 61 64 20 6f 66 20 72 65 6c 61 74 69 76 65 20 74 6f | .to.field.instead.of.relative.to |
| 1560 | 20 65 6e 74 69 72 65 20 73 74 61 74 65 20 73 74 72 75 63 74 0d 0a 0d 0a 2f 2f 2f 2f 52 45 56 49 | .entire.state.struct....////REVI |
| 1580 | 45 57 3a 20 63 6f 6d 6d 6f 6e 20 75 73 61 67 65 73 20 61 72 65 20 6f 6e 20 61 6c 6c 20 6c 61 79 | EW:.common.usages.are.on.all.lay |
| 15a0 | 6f 75 74 73 20 62 75 74 20 6f 6e 6c 79 20 6d 61 6b 65 20 73 65 6e 73 65 20 66 6f 72 20 64 65 76 | outs.but.only.make.sense.for.dev |
| 15c0 | 69 63 65 73 0d 0a 0d 0a 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 75 73 65 53 74 61 74 65 46 72 6f 6d | ices....////REVIEW:.useStateFrom |
| 15e0 | 20 73 65 65 6d 73 20 6c 69 6b 65 20 61 20 68 61 6c 66 2d 6d 65 61 73 75 72 65 3b 20 69 74 20 73 | .seems.like.a.half-measure;.it.s |
| 1600 | 6f 6c 76 65 73 20 74 68 65 20 70 72 6f 62 6c 65 6d 20 6f 66 20 73 65 74 74 69 6e 67 20 75 70 20 | olves.the.problem.of.setting.up. |
| 1620 | 73 74 61 74 65 20 62 6c 6f 63 6b 73 20 62 75 74 20 74 68 65 79 20 6f 66 74 65 6e 20 61 6c 73 6f | state.blocks.but.they.often.also |
| 1640 | 0d 0a 2f 2f 2f 2f 20 20 20 20 20 20 20 20 72 65 71 75 69 72 65 20 61 20 73 70 65 63 69 66 69 63 | ..////........require.a.specific |
| 1660 | 20 73 65 74 20 6f 66 20 70 72 6f 63 65 73 73 6f 72 73 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 | .set.of.processors....namespace. |
| 1680 | 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 4c 61 79 6f 75 74 73 0d | UnityEngine.InputSystem.Layouts. |
| 16a0 | 0a 7b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 44 | .{......///.<summary>......///.D |
| 16c0 | 65 6c 65 67 61 74 65 20 75 73 65 64 20 62 79 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 | elegate.used.by.<see.cref="Input |
| 16e0 | 53 79 73 74 65 6d 2e 6f 6e 46 69 6e 64 4c 61 79 6f 75 74 46 6f 72 44 65 76 69 63 65 22 2f 3e 2e | System.onFindLayoutForDevice"/>. |
| 1700 | 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 | ......///.</summary>......///.<p |
| 1720 | 61 72 61 6d 20 6e 61 6d 65 3d 22 64 65 73 63 72 69 70 74 69 6f 6e 22 3e 54 68 65 20 64 65 76 69 | aram.name="description">The.devi |
| 1740 | 63 65 20 64 65 73 63 72 69 70 74 69 6f 6e 20 73 75 70 70 6c 69 65 64 20 62 79 20 74 68 65 20 72 | ce.description.supplied.by.the.r |
| 1760 | 75 6e 74 69 6d 65 20 6f 72 20 74 68 72 6f 75 67 68 20 3c 73 65 65 0d 0a 20 20 20 20 2f 2f 2f 20 | untime.or.through.<see......///. |
| 1780 | 63 72 65 66 3d 22 49 6e 70 75 74 53 79 73 74 65 6d 2e 41 64 64 44 65 76 69 63 65 28 49 6e 70 75 | cref="InputSystem.AddDevice(Inpu |
| 17a0 | 74 44 65 76 69 63 65 44 65 73 63 72 69 70 74 69 6f 6e 29 22 2f 3e 2e 20 54 68 69 73 20 69 73 20 | tDeviceDescription)"/>..This.is. |
| 17c0 | 70 61 73 73 65 64 20 62 79 20 72 65 66 65 72 65 6e 63 65 20 69 6e 73 74 65 61 64 20 6f 66 0d 0a | passed.by.reference.instead.of.. |
| 17e0 | 20 20 20 20 2f 2f 2f 20 62 79 20 76 61 6c 75 65 20 74 6f 20 61 6c 6c 6f 77 20 74 68 65 20 63 61 | ....///.by.value.to.allow.the.ca |
| 1800 | 6c 6c 62 61 63 6b 20 74 6f 20 66 69 6c 6c 20 6f 75 74 20 66 69 65 6c 64 73 20 73 75 63 68 20 61 | llback.to.fill.out.fields.such.a |
| 1820 | 73 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 44 65 76 69 63 65 44 65 73 63 72 69 70 74 | s.<see.cref="InputDeviceDescript |
| 1840 | 69 6f 6e 2e 63 61 70 61 62 69 6c 69 74 69 65 73 22 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 6f 6e 20 | ion.capabilities"/>......///.on. |
| 1860 | 74 68 65 20 66 6c 79 20 62 61 73 65 64 20 6f 6e 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 71 75 65 | the.fly.based.on.information.que |
| 1880 | 72 69 65 64 20 66 72 6f 6d 20 65 78 74 65 72 6e 61 6c 20 41 50 49 73 20 6f 72 20 66 72 6f 6d 20 | ried.from.external.APIs.or.from. |
| 18a0 | 74 68 65 20 72 75 6e 74 69 6d 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 | the.runtime.</param>......///.<p |
| 18c0 | 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 61 74 63 68 65 64 4c 61 79 6f 75 74 22 3e 4e 61 6d 65 20 6f | aram.name="matchedLayout">Name.o |
| 18e0 | 66 20 74 68 65 20 6c 61 79 6f 75 74 20 74 68 61 74 20 68 61 73 20 62 65 65 6e 20 73 65 6c 65 63 | f.the.layout.that.has.been.selec |
| 1900 | 74 65 64 20 66 6f 72 20 74 68 65 20 64 65 76 69 63 65 20 6f 72 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 | ted.for.the.device.or.<c>null</c |
| 1920 | 3e 20 69 66 0d 0a 20 20 20 20 2f 2f 2f 20 6e 6f 20 6d 61 74 63 68 69 6e 67 20 6c 61 79 6f 75 74 | >.if......///.no.matching.layout |
| 1940 | 20 63 6f 75 6c 64 20 62 65 20 66 6f 75 6e 64 2e 20 4d 61 74 63 68 69 6e 67 20 69 73 20 64 65 74 | .could.be.found..Matching.is.det |
| 1960 | 65 72 6d 69 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 | ermined.from.the.<see.cref="Inpu |
| 1980 | 74 44 65 76 69 63 65 4d 61 74 63 68 65 72 22 2f 3e 73 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 | tDeviceMatcher"/>s.for......///. |
| 19a0 | 6c 61 79 6f 75 74 73 20 72 65 67 69 73 74 65 72 65 64 20 69 6e 20 74 68 65 20 73 79 73 74 65 6d | layouts.registered.in.the.system |
| 19c0 | 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 | .</param>......///.<param.name=" |
| 19e0 | 65 78 65 63 75 74 65 44 65 76 69 63 65 43 6f 6d 6d 61 6e 64 22 3e 41 20 64 65 6c 65 67 61 74 65 | executeDeviceCommand">A.delegate |
| 1a00 | 20 77 68 69 63 68 20 63 61 6e 20 62 65 20 69 6e 76 6f 6b 65 64 20 74 6f 20 65 78 65 63 75 74 65 | .which.can.be.invoked.to.execute |
| 1a20 | 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 44 65 76 69 63 65 43 6f 6d 6d 61 6e 64 22 2f | .<see.cref="InputDeviceCommand"/ |
| 1a40 | 3e 73 0d 0a 20 20 20 20 2f 2f 2f 20 6f 6e 20 74 68 65 20 64 65 76 69 63 65 2e 3c 2f 70 61 72 61 | >s......///.on.the.device.</para |
| 1a60 | 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 20 20 52 65 74 75 72 6e 20 3c 63 | m>......///.<returns>..Return.<c |
| 1a80 | 3e 6e 75 6c 6c 3c 2f 63 3e 20 6f 72 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 74 6f 20 | >null</c>.or.an.empty.string.to. |
| 1aa0 | 69 6e 64 69 63 61 74 65 20 74 68 61 74 20 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 2f 2f | indicate.that.</returns>......// |
| 1ac0 | 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d | /.<remarks>......///.</remarks>. |
| 1ae0 | 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 53 79 73 | .....///.<seealso.cref="InputSys |
| 1b00 | 74 65 6d 2e 6f 6e 46 69 6e 64 4c 61 79 6f 75 74 46 6f 72 44 65 76 69 63 65 22 2f 3e 0d 0a 20 20 | tem.onFindLayoutForDevice"/>.... |
| 1b20 | 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 53 79 73 74 65 6d | ..///.<seealso.cref="InputSystem |
| 1b40 | 2e 52 65 67 69 73 74 65 72 4c 61 79 6f 75 74 42 75 69 6c 64 65 72 22 2f 3e 0d 0a 20 20 20 20 2f | .RegisterLayoutBuilder"/>....../ |
| 1b60 | 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 | //.<seealso.cref="InputControlLa |
| 1b80 | 79 6f 75 74 22 2f 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 64 65 6c 65 67 61 74 65 20 73 74 72 | yout"/>......public.delegate.str |
| 1ba0 | 69 6e 67 20 49 6e 70 75 74 44 65 76 69 63 65 46 69 6e 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 | ing.InputDeviceFindControlLayout |
| 1bc0 | 44 65 6c 65 67 61 74 65 28 72 65 66 20 49 6e 70 75 74 44 65 76 69 63 65 44 65 73 63 72 69 70 74 | Delegate(ref.InputDeviceDescript |
| 1be0 | 69 6f 6e 20 64 65 73 63 72 69 70 74 69 6f 6e 2c 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 | ion.description,..........string |
| 1c00 | 20 6d 61 74 63 68 65 64 4c 61 79 6f 75 74 2c 20 49 6e 70 75 74 44 65 76 69 63 65 45 78 65 63 75 | .matchedLayout,.InputDeviceExecu |
| 1c20 | 74 65 43 6f 6d 6d 61 6e 64 44 65 6c 65 67 61 74 65 20 65 78 65 63 75 74 65 44 65 76 69 63 65 43 | teCommandDelegate.executeDeviceC |
| 1c40 | 6f 6d 6d 61 6e 64 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 | ommand);........///.<summary>... |
| 1c60 | 20 20 20 2f 2f 2f 20 41 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 20 73 70 65 63 69 66 69 65 | ...///.A.control.layout.specifie |
| 1c80 | 73 20 74 68 65 20 63 6f 6d 70 6f 73 69 74 69 6f 6e 20 6f 66 20 61 6e 20 3c 73 65 65 20 63 72 65 | s.the.composition.of.an.<see.cre |
| 1ca0 | 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 22 2f 3e 20 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 3c | f="InputControl"/>.or......///.< |
| 1cc0 | 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 44 65 76 69 63 65 22 2f 3e 2e 0d 0a 20 20 20 20 2f | see.cref="InputDevice"/>......./ |
| 1ce0 | 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e | //.</summary>......///.<remarks> |
| 1d00 | 0d 0a 20 20 20 20 2f 2f 2f 20 43 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 73 20 63 61 6e 20 62 65 | ......///.Control.layouts.can.be |
| 1d20 | 20 63 72 65 61 74 65 64 20 69 6e 20 74 68 72 65 65 20 70 6f 73 73 69 62 6c 65 20 77 61 79 73 3a | .created.in.three.possible.ways: |
| 1d40 | 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 3c 6c 69 73 74 20 74 79 70 65 3d 22 6e | ......///......///.<list.type="n |
| 1d60 | 75 6d 62 65 72 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 69 74 65 6d 3e 3c 64 65 73 63 72 69 70 74 | umber">......///.<item><descript |
| 1d80 | 69 6f 6e 3e 4c 6f 61 64 65 64 20 66 72 6f 6d 20 4a 53 4f 4e 2e 3c 2f 64 65 73 63 72 69 70 74 69 | ion>Loaded.from.JSON.</descripti |
| 1da0 | 6f 6e 3e 3c 2f 69 74 65 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 69 74 65 6d 3e 3c 64 65 73 63 72 | on></item>......///.<item><descr |
| 1dc0 | 69 70 74 69 6f 6e 3e 43 6f 6e 73 74 72 75 63 74 65 64 20 74 68 72 6f 75 67 68 20 72 65 66 6c 65 | iption>Constructed.through.refle |
| 1de0 | 63 74 69 6f 6e 20 66 72 6f 6d 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 | ction.from.<see.cref="InputContr |
| 1e00 | 6f 6c 22 3e 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 73 3c 2f 73 65 65 3e 20 63 6c 61 73 73 65 73 2e | ol">InputControls</see>.classes. |
| 1e20 | 3c 2f 64 65 73 63 72 69 70 74 69 6f 6e 3e 3c 2f 69 74 65 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c | </description></item>......///.< |
| 1e40 | 69 74 65 6d 3e 3c 64 65 73 63 72 69 70 74 69 6f 6e 3e 54 68 72 6f 75 67 68 20 6c 61 79 6f 75 74 | item><description>Through.layout |
| 1e60 | 20 66 61 63 74 6f 72 69 65 73 20 75 73 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 | .factories.using.<see.cref="Inpu |
| 1e80 | 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 42 75 69 6c 64 65 72 22 2f 3e 2e 3c 2f 64 65 73 63 | tControlLayout.Builder"/>.</desc |
| 1ea0 | 72 69 70 74 69 6f 6e 3e 3c 2f 69 74 65 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 6c 69 73 74 3e | ription></item>......///.</list> |
| 1ec0 | 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 4f 6e 63 65 20 63 6f 6e 73 74 72 75 63 | ......///......///.Once.construc |
| 1ee0 | 74 65 64 2c 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 73 20 61 72 65 20 69 6d 6d 75 74 61 62 | ted,.control.layouts.are.immutab |
| 1f00 | 6c 65 20 28 62 75 74 20 79 6f 75 20 63 61 6e 20 61 6c 77 61 79 73 0d 0a 20 20 20 20 2f 2f 2f 20 | le.(but.you.can.always......///. |
| 1f20 | 72 65 70 6c 61 63 65 20 61 20 72 65 67 69 73 74 65 72 65 64 20 6c 61 79 6f 75 74 20 69 6e 20 74 | replace.a.registered.layout.in.t |
| 1f40 | 68 65 20 73 79 73 74 65 6d 20 61 6e 64 20 69 74 20 77 69 6c 6c 20 61 66 66 65 63 74 0d 0a 20 20 | he.system.and.it.will.affect.... |
| 1f60 | 20 20 2f 2f 2f 20 65 76 65 72 79 74 68 69 6e 67 20 63 6f 6e 73 74 72 75 63 74 65 64 20 66 72 6f | ..///.everything.constructed.fro |
| 1f80 | 6d 20 74 68 65 20 6c 61 79 6f 75 74 29 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f | m.the.layout).......///....../// |
| 1fa0 | 20 43 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 73 20 63 61 6e 20 62 65 20 66 6f 72 20 61 72 62 69 | .Control.layouts.can.be.for.arbi |
| 1fc0 | 74 72 61 72 79 20 63 6f 6e 74 72 6f 6c 20 72 69 67 73 20 6f 72 20 66 6f 72 20 65 6e 74 69 72 65 | trary.control.rigs.or.for.entire |
| 1fe0 | 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 76 69 63 65 73 2e 20 44 65 76 69 63 65 20 6c 61 79 6f 75 74 | ......///.devices..Device.layout |
| 2000 | 73 20 63 61 6e 20 62 65 20 6d 61 74 63 68 65 64 20 74 6f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 | s.can.be.matched.to.<see.cref="I |
| 2020 | 6e 70 75 74 44 65 76 69 63 65 44 65 73 63 72 69 70 74 69 6f 6e 22 3e 0d 0a 20 20 20 20 2f 2f 2f | nputDeviceDescription">....../// |
| 2040 | 20 64 65 76 69 63 65 20 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f 73 65 65 3e 20 75 73 69 6e 67 20 | .device.description</see>.using. |
| 2060 | 61 73 73 6f 63 69 61 74 65 64 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 44 65 76 69 63 | associated.<see.cref="InputDevic |
| 2080 | 65 4d 61 74 63 68 65 72 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 76 69 63 65 20 6d 61 74 63 68 | eMatcher">......///.device.match |
| 20a0 | 65 72 73 3c 2f 73 65 65 3e 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 70 | ers</see>.......///......///.Inp |
| 20c0 | 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 6f 62 6a 65 63 74 73 20 61 72 65 20 63 6f 6e 73 | utControlLayout.objects.are.cons |
| 20e0 | 69 64 65 72 65 64 20 74 65 6d 70 6f 72 61 72 69 65 73 2e 20 45 78 63 65 70 74 20 69 6e 20 74 68 | idered.temporaries..Except.in.th |
| 2100 | 65 0d 0a 20 20 20 20 2f 2f 2f 20 65 64 69 74 6f 72 2c 20 74 68 65 79 20 61 72 65 20 6e 6f 74 20 | e......///.editor,.they.are.not. |
| 2120 | 6b 65 70 74 20 61 72 6f 75 6e 64 20 62 65 79 6f 6e 64 20 64 65 76 69 63 65 20 63 72 65 61 74 69 | kept.around.beyond.device.creati |
| 2140 | 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 53 65 65 20 74 68 65 20 3c 61 | on.......///......///.See.the.<a |
| 2160 | 20 68 72 65 66 3d 22 2e 2e 2f 6d 61 6e 75 61 6c 2f 4c 61 79 6f 75 74 73 2e 68 74 6d 6c 22 3e 6d | .href="../manual/Layouts.html">m |
| 2180 | 61 6e 75 61 6c 3c 2f 61 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 20 6f 6e 20 63 6f | anual</a>.for.more.details.on.co |
| 21a0 | 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b | ntrol.layouts.......///.</remark |
| 21c0 | 73 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 49 6e 70 75 74 43 6f 6e 74 72 6f | s>......public.class.InputContro |
| 21e0 | 6c 4c 61 79 6f 75 74 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 | lLayout......{..........private. |
| 2200 | 73 74 61 74 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 73 5f 44 65 66 61 75 6c 74 56 | static.InternedString.s_DefaultV |
| 2220 | 61 72 69 61 6e 74 20 3d 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 22 44 65 66 | ariant.=.new.InternedString("Def |
| 2240 | 61 75 6c 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 49 | ault");..........public.static.I |
| 2260 | 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 44 65 66 61 75 6c 74 56 61 72 69 61 6e 74 20 3d 3e 20 | nternedString.DefaultVariant.=>. |
| 2280 | 73 5f 44 65 66 61 75 6c 74 56 61 72 69 61 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 | s_DefaultVariant;............pub |
| 22a0 | 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 56 61 72 69 61 6e 74 53 65 70 61 72 61 74 6f | lic.const.string.VariantSeparato |
| 22c0 | 72 20 3d 20 22 3b 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 | r.=.";";............///.<summary |
| 22e0 | 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 70 65 63 69 66 69 63 61 74 69 6f 6e 20 66 6f 72 | >..........///.Specification.for |
| 2300 | 20 74 68 65 20 63 6f 6d 70 6f 73 69 74 69 6f 6e 20 6f 66 20 61 20 64 69 72 65 63 74 20 6f 72 20 | .the.composition.of.a.direct.or. |
| 2320 | 69 6e 64 69 72 65 63 74 20 63 68 69 6c 64 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 | indirect.child.control.......... |
| 2340 | 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | .///.</summary>..........public. |
| 2360 | 73 74 72 75 63 74 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 | struct.ControlItem..........{... |
| 2380 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 | ...........///.<summary>........ |
| 23a0 | 20 20 20 20 20 20 2f 2f 2f 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e 74 72 6f 6c 2e 20 43 | ......///.Name.of.the.control..C |
| 23c0 | 61 6e 6e 6f 74 20 62 65 20 65 6d 70 74 79 20 6f 72 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 0d 0a | annot.be.empty.or.<c>null</c>... |
| 23e0 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 | ............///.</summary>...... |
| 2400 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 4e 61 6d 65 20 6f 66 20 74 68 65 20 63 | ........///.<value>Name.of.the.c |
| 2420 | 6f 6e 74 72 6f 6c 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f | ontrol.</value>............../// |
| 2440 | 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 | .<remarks>..............///.This |
| 2460 | 20 6d 61 79 20 61 6c 73 6f 20 62 65 20 61 20 70 61 74 68 20 6f 66 20 74 68 65 20 66 6f 72 6d 20 | .may.also.be.a.path.of.the.form. |
| 2480 | 3c 63 3e 22 70 61 72 65 6e 74 4e 61 6d 65 2f 63 68 69 6c 64 4e 61 6d 65 2e 2e 2e 22 3c 2f 63 3e | <c>"parentName/childName..."</c> |
| 24a0 | 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 63 61 6e 20 62 65 20 75 | ...............///.This.can.be.u |
| 24c0 | 73 65 64 20 74 6f 20 72 65 61 63 68 20 69 6e 73 69 64 65 20 61 6e 6f 74 68 65 72 20 6c 61 79 6f | sed.to.reach.inside.another.layo |
| 24e0 | 75 74 20 61 6e 64 20 6d 6f 64 69 66 79 20 70 72 6f 70 65 72 74 69 65 73 20 6f 66 0d 0a 20 20 20 | ut.and.modify.properties.of..... |
| 2500 | 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 20 63 6f 6e 74 72 6f 6c 20 69 6e 73 69 64 65 20 6f 66 | .........///.a.control.inside.of |
| 2520 | 20 69 74 2e 20 41 6e 20 65 78 61 6d 70 6c 65 20 66 6f 72 20 74 68 69 73 20 69 73 20 61 64 64 69 | .it..An.example.for.this.is.addi |
| 2540 | 6e 67 20 61 20 22 6c 65 66 74 53 74 69 63 6b 22 20 63 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 | ng.a."leftStick".control........ |
| 2560 | 20 20 20 20 20 20 2f 2f 2f 20 75 73 69 6e 67 20 74 68 65 20 53 74 69 63 6b 20 6c 61 79 6f 75 74 | ......///.using.the.Stick.layout |
| 2580 | 20 61 6e 64 20 74 68 65 6e 20 61 64 64 69 6e 67 20 74 77 6f 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 | .and.then.adding.two.control.lay |
| 25a0 | 6f 75 74 73 20 74 68 61 74 20 72 65 66 65 72 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | outs.that.refer.to.............. |
| 25c0 | 2f 2f 2f 20 22 6c 65 66 74 53 74 69 63 6b 2f 78 22 20 61 6e 64 20 22 6c 65 66 74 53 74 69 63 6b | ///."leftStick/x".and."leftStick |
| 25e0 | 2f 79 22 20 72 65 73 70 65 63 74 69 76 65 6c 79 20 74 6f 20 6d 6f 64 69 66 79 20 74 68 65 20 73 | /y".respectively.to.modify.the.s |
| 2600 | 74 61 74 65 20 66 6f 72 6d 61 74 20 75 73 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | tate.format.used..............// |
| 2620 | 2f 20 62 79 20 74 68 65 20 73 74 69 63 6b 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f | /.by.the.stick.............../// |
| 2640 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 66 69 65 6c 64 20 69 73 20 | ..............///.This.field.is. |
| 2660 | 72 65 71 75 69 72 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d | required...............///.</rem |
| 2680 | 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 | arks>..............///.<seealso. |
| 26a0 | 63 72 65 66 3d 22 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e 74 72 6f 6c | cref="isModifyingExistingControl |
| 26c0 | 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 | "/>..............///.<seealso.cr |
| 26e0 | 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 69 62 75 74 65 2e 6e 61 6d 65 22 2f | ef="InputControlAttribute.name"/ |
| 2700 | 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 74 65 72 6e 65 64 53 74 | >..............public.InternedSt |
| 2720 | 72 69 6e 67 20 6e 61 6d 65 20 7b 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d | ring.name.{.get;.internal.set;.} |
| 2740 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 | ................///.<summary>... |
| 2760 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 6c 61 79 6f 75 | ...........///.Name.of.the.layou |
| 2780 | 74 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 | t.to.use.for.the.control........ |
| 27a0 | 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 | .......///.</summary>........... |
| 27c0 | 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 4e 61 6d 65 20 6f 66 20 6c 61 79 6f 75 74 20 74 6f 20 | ...///.<value>Name.of.layout.to. |
| 27e0 | 75 73 65 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 | use.</value>..............///.<r |
| 2800 | 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 75 73 74 20 62 65 | emarks>..............///.Must.be |
| 2820 | 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 61 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 2c 20 6e | .the.name.of.a.control.layout,.n |
| 2840 | 6f 74 20 64 65 76 69 63 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | ot.device.layout.............../ |
| 2860 | 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 6e 20 65 78 61 6d 70 6c 65 20 77 | //..............///.An.example.w |
| 2880 | 6f 75 6c 64 20 62 65 20 22 53 74 69 63 6b 22 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | ould.be."Stick"...............// |
| 28a0 | 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 | /.</remarks>..............///.<s |
| 28c0 | 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 53 79 73 74 65 6d 2e 52 65 67 69 73 74 65 | eealso.cref="InputSystem.Registe |
| 28e0 | 72 4c 61 79 6f 75 74 28 54 79 70 65 2c 73 74 72 69 6e 67 2c 4e 75 6c 6c 61 62 6c 65 7b 49 6e 70 | rLayout(Type,string,Nullable{Inp |
| 2900 | 75 74 44 65 76 69 63 65 4d 61 74 63 68 65 72 7d 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | utDeviceMatcher}"/>............. |
| 2920 | 20 70 75 62 6c 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6c 61 79 6f 75 74 20 7b 20 | .public.InternedString.layout.{. |
| 2940 | 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | get;.internal.set;.}............ |
| 2960 | 20 20 20 20 70 75 62 6c 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 76 61 72 69 61 6e | ....public.InternedString.varian |
| 2980 | 74 73 20 7b 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 | ts.{.get;.internal.set;.}....... |
| 29a0 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 75 73 65 53 74 61 74 65 46 72 6f | .......public.string.useStateFro |
| 29c0 | 6d 20 7b 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 | m.{.get;.internal.set;.}........ |
| 29e0 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 | ........///.<summary>........... |
| 2a00 | 20 20 20 2f 2f 2f 20 4f 70 74 69 6f 6e 61 6c 20 64 69 73 70 6c 61 79 20 6e 61 6d 65 20 6f 66 20 | ...///.Optional.display.name.of. |
| 2a20 | 74 68 65 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f | the.control...............///.</ |
| 2a40 | 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c | summary>..............///.<seeal |
| 2a60 | 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 64 69 73 70 6c 61 79 4e 61 6d | so.cref="InputControl.displayNam |
| 2a80 | 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 | e"/>..............public.string. |
| 2aa0 | 64 69 73 70 6c 61 79 4e 61 6d 65 20 7b 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b | displayName.{.get;.internal.set; |
| 2ac0 | 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d | .}................///.<summary>. |
| 2ae0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 4f 70 74 69 6f 6e 61 6c 20 61 62 62 72 65 76 | .............///.Optional.abbrev |
| 2b00 | 69 61 74 65 64 20 64 69 73 70 6c 61 79 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e 74 72 6f | iated.display.name.of.the.contro |
| 2b20 | 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a | l...............///.</summary>.. |
| 2b40 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 | ............///.<seealso.cref="I |
| 2b60 | 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 73 68 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 22 2f 3e 0d | nputControl.shortDisplayName"/>. |
| 2b80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 73 68 6f 72 74 | .............public.string.short |
| 2ba0 | 44 69 73 70 6c 61 79 4e 61 6d 65 20 7b 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b | DisplayName.{.get;.internal.set; |
| 2bc0 | 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c | .}................public.ReadOnl |
| 2be0 | 79 41 72 72 61 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 20 75 73 61 67 65 73 20 7b 20 | yArray<InternedString>.usages.{. |
| 2c00 | 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 | get;.internal.set;.}............ |
| 2c20 | 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 49 6e 74 65 72 6e 65 64 53 | ..public.ReadOnlyArray<InternedS |
| 2c40 | 74 72 69 6e 67 3e 20 61 6c 69 61 73 65 73 20 7b 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 | tring>.aliases.{.get;.internal.s |
| 2c60 | 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e | et;.}..............public.ReadOn |
| 2c80 | 6c 79 41 72 72 61 79 3c 4e 61 6d 65 64 56 61 6c 75 65 3e 20 70 61 72 61 6d 65 74 65 72 73 20 7b | lyArray<NamedValue>.parameters.{ |
| 2ca0 | 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 | .get;.internal.set;.}........... |
| 2cc0 | 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 4e 61 6d 65 41 6e 64 50 | ...public.ReadOnlyArray<NameAndP |
| 2ce0 | 61 72 61 6d 65 74 65 72 73 3e 20 70 72 6f 63 65 73 73 6f 72 73 20 7b 20 67 65 74 3b 20 69 6e 74 | arameters>.processors.{.get;.int |
| 2d00 | 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 | ernal.set;.}..............public |
| 2d20 | 20 75 69 6e 74 20 6f 66 66 73 65 74 20 7b 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 | .uint.offset.{.get;.internal.set |
| 2d40 | 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 75 69 6e 74 20 62 69 74 | ;.}..............public.uint.bit |
| 2d60 | 20 7b 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 | .{.get;.internal.set;.}......... |
| 2d80 | 20 20 20 20 20 70 75 62 6c 69 63 20 75 69 6e 74 20 73 69 7a 65 49 6e 42 69 74 73 20 7b 20 67 65 | .....public.uint.sizeInBits.{.ge |
| 2da0 | 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | t;.internal.set;.}.............. |
| 2dc0 | 70 75 62 6c 69 63 20 46 6f 75 72 43 43 20 66 6f 72 6d 61 74 20 7b 20 67 65 74 3b 20 69 6e 74 65 | public.FourCC.format.{.get;.inte |
| 2de0 | 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 | rnal.set;.}..............private |
| 2e00 | 20 46 6c 61 67 73 20 66 6c 61 67 73 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 | .Flags.flags.{.get;.set;.}...... |
| 2e20 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 61 72 72 61 79 53 69 7a 65 20 7b 20 67 | ........public.int.arraySize.{.g |
| 2e40 | 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | et;.internal.set;.}............. |
| 2e60 | 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | ...///.<summary>..............// |
| 2e80 | 2f 20 4f 70 74 69 6f 6e 61 6c 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 20 66 6f 72 20 74 68 65 | /.Optional.default.value.for.the |
| 2ea0 | 20 73 74 61 74 65 20 6d 65 6d 6f 72 79 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68 | .state.memory.associated.with.th |
| 2ec0 | 65 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 | e.control...............///.</su |
| 2ee0 | 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 50 72 69 6d 69 | mmary>..............public.Primi |
| 2f00 | 74 69 76 65 56 61 6c 75 65 20 64 65 66 61 75 6c 74 53 74 61 74 65 20 7b 20 67 65 74 3b 20 69 6e | tiveValue.defaultState.{.get;.in |
| 2f20 | 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 | ternal.set;.}................pub |
| 2f40 | 6c 69 63 20 50 72 69 6d 69 74 69 76 65 56 61 6c 75 65 20 6d 69 6e 56 61 6c 75 65 20 7b 20 67 65 | lic.PrimitiveValue.minValue.{.ge |
| 2f60 | 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | t;.internal.set;.}.............. |
| 2f80 | 70 75 62 6c 69 63 20 50 72 69 6d 69 74 69 76 65 56 61 6c 75 65 20 6d 61 78 56 61 6c 75 65 20 7b | public.PrimitiveValue.maxValue.{ |
| 2fa0 | 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | .get;.internal.set;.}........... |
| 2fc0 | 20 20 20 20 20 2f 2f 20 49 66 20 74 72 75 65 2c 20 74 68 65 20 6c 61 79 6f 75 74 20 77 69 6c 6c | .....//.If.true,.the.layout.will |
| 2fe0 | 20 6e 6f 74 20 61 64 64 20 61 20 63 6f 6e 74 72 6f 6c 20 62 75 74 20 72 61 74 68 65 72 20 61 20 | .not.add.a.control.but.rather.a. |
| 3000 | 6d 6f 64 69 66 79 20 61 20 63 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | modify.a.control..............// |
| 3020 | 20 69 6e 73 69 64 65 20 74 68 65 20 68 69 65 72 61 72 63 68 79 20 61 64 64 65 64 20 62 79 20 27 | .inside.the.hierarchy.added.by.' |
| 3040 | 6c 61 79 6f 75 74 27 2e 20 54 68 69 73 20 61 6c 6c 6f 77 73 2c 20 66 6f 72 20 65 78 61 6d 70 6c | layout'..This.allows,.for.exampl |
| 3060 | 65 2c 20 74 6f 20 6d 6f 64 69 66 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6a 75 73 | e,.to.modify..............//.jus |
| 3080 | 74 20 74 68 65 20 58 20 61 78 69 73 20 63 6f 6e 74 72 6f 6c 20 6f 66 20 74 68 65 20 6c 65 66 74 | t.the.X.axis.control.of.the.left |
| 30a0 | 20 73 74 69 63 6b 20 64 69 72 65 63 74 6c 79 20 66 72 6f 6d 20 77 69 74 68 69 6e 20 61 20 67 61 | .stick.directly.from.within.a.ga |
| 30c0 | 6d 65 70 61 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6c 61 79 6f 75 74 20 69 6e 73 | mepad..............//.layout.ins |
| 30e0 | 74 65 61 64 20 6f 66 20 68 61 76 69 6e 67 20 74 6f 20 68 61 76 65 20 61 20 63 75 73 74 6f 6d 20 | tead.of.having.to.have.a.custom. |
| 3100 | 73 74 69 63 6b 20 6c 61 79 6f 75 74 20 66 6f 72 20 74 68 65 20 6c 65 66 74 20 73 74 69 63 6b 0d | stick.layout.for.the.left.stick. |
| 3120 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 61 6e 20 69 6e 20 74 75 72 6e 20 77 6f 75 | .............//.than.in.turn.wou |
| 3140 | 6c 64 20 68 61 76 65 20 74 6f 20 6d 61 6b 65 20 75 73 65 20 6f 66 20 61 20 63 75 73 74 6f 6d 20 | ld.have.to.make.use.of.a.custom. |
| 3160 | 61 78 69 73 20 6c 61 79 6f 75 74 20 66 6f 72 20 74 68 65 20 58 20 61 78 69 73 2e 0d 0a 20 20 20 | axis.layout.for.the.X.axis...... |
| 3180 | 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 73 74 65 61 64 2c 20 79 6f 75 20 63 61 6e 20 6a 75 73 | .........//.Instead,.you.can.jus |
| 31a0 | 74 20 68 61 76 65 20 61 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 20 77 69 74 68 20 74 68 65 | t.have.a.control.layout.with.the |
| 31c0 | 20 6e 61 6d 65 20 22 6c 65 66 74 53 74 69 63 6b 2f 78 22 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | .name."leftStick/x"............. |
| 31e0 | 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e | ..public.bool.isModifyingExistin |
| 3200 | 67 43 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | gControl..............{......... |
| 3220 | 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 28 66 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 69 | .........get.=>.(flags.&.Flags.i |
| 3240 | 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e 74 72 6f 6c 29 20 3d 3d 20 46 6c | sModifyingExistingControl).==.Fl |
| 3260 | 61 67 73 2e 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e 74 72 6f 6c 3b 0d | ags.isModifyingExistingControl;. |
| 3280 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 0d 0a 20 | .................internal.set... |
| 32a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............{................ |
| 32c0 | 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ......if.(value)................ |
| 32e0 | 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 69 73 4d 6f 64 69 66 | ..........flags.|=.Flags.isModif |
| 3300 | 79 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e 74 72 6f 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | yingExistingControl;............ |
| 3320 | 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........else.................. |
| 3340 | 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 26 3d 20 7e 46 6c 61 67 73 2e 69 73 4d 6f 64 69 66 79 | ........flags.&=.~Flags.isModify |
| 3360 | 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e 74 72 6f 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ingExistingControl;............. |
| 3380 | 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | .....}..............}........... |
| 33a0 | 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .....///.<summary>.............. |
| 33c0 | 2f 2f 2f 20 47 65 74 20 6f 72 20 73 65 74 20 77 68 65 74 68 65 72 20 74 6f 20 6d 61 72 6b 20 74 | ///.Get.or.set.whether.to.mark.t |
| 33e0 | 68 65 20 63 6f 6e 74 72 6f 6c 20 61 73 20 6e 6f 69 73 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | he.control.as.noisy............. |
| 3400 | 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | ..///.</summary>..............// |
| 3420 | 2f 20 3c 76 61 6c 75 65 3e 57 68 65 74 68 65 72 20 74 6f 20 6d 61 72 6b 20 74 68 65 20 63 6f 6e | /.<value>Whether.to.mark.the.con |
| 3440 | 74 72 6f 6c 20 61 73 20 6e 6f 69 73 79 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 | trol.as.noisy.</value>.......... |
| 3460 | 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | ....///.<remarks>............../ |
| 3480 | 2f 2f 20 4e 6f 69 73 79 20 63 6f 6e 74 72 6f 6c 73 20 6d 61 79 20 67 65 6e 65 72 61 74 65 20 76 | //.Noisy.controls.may.generate.v |
| 34a0 | 61 72 79 69 6e 67 20 69 6e 70 75 74 20 65 76 65 6e 20 77 69 74 68 6f 75 74 20 22 70 72 6f 70 65 | arying.input.even.without."prope |
| 34c0 | 72 22 20 75 73 65 72 20 69 6e 74 65 72 61 63 74 69 6f 6e 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 | r".user.interaction..For.example |
| 34e0 | 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 20 73 65 6e 73 6f 72 20 6d 61 79 20 | ,..............///.a.sensor.may. |
| 3500 | 67 65 6e 65 72 61 74 65 20 73 6c 69 67 68 74 6c 79 20 64 69 66 66 65 72 65 6e 74 20 69 6e 70 75 | generate.slightly.different.inpu |
| 3520 | 74 20 76 61 6c 75 65 73 20 6f 76 65 72 20 74 69 6d 65 20 65 76 65 6e 20 69 66 20 69 6e 20 66 61 | t.values.over.time.even.if.in.fa |
| 3540 | 63 74 20 74 68 65 20 76 65 72 79 20 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | ct.the.very.thing............../ |
| 3560 | 2f 2f 20 28 73 75 63 68 20 61 73 20 74 68 65 20 64 65 76 69 63 65 20 6f 72 69 65 6e 74 61 74 69 | //.(such.as.the.device.orientati |
| 3580 | 6f 6e 29 20 74 68 61 74 20 69 73 20 62 65 69 6e 67 20 6d 65 61 73 75 72 65 64 20 69 73 20 6e 6f | on).that.is.being.measured.is.no |
| 35a0 | 74 20 63 68 61 6e 67 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 | t.changing...............///.</r |
| 35c0 | 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 | emarks>..............///.<seeals |
| 35e0 | 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 6e 6f 69 73 79 22 2f 3e 0d 0a 20 | o.cref="InputControl.noisy"/>... |
| 3600 | 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 4e 6f 69 73 79 0d 0a | ...........public.bool.isNoisy.. |
| 3620 | 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 | ............{..................g |
| 3640 | 65 74 20 3d 3e 20 28 66 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 49 73 4e 6f 69 73 79 29 20 3d 3d | et.=>.(flags.&.Flags.IsNoisy).== |
| 3660 | 20 46 6c 61 67 73 2e 49 73 4e 6f 69 73 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .Flags.IsNoisy;................. |
| 3680 | 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | .internal.set..................{ |
| 36a0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 29 | ......................if.(value) |
| 36c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 | ..........................flags. |
| 36e0 | 7c 3d 20 46 6c 61 67 73 2e 49 73 4e 6f 69 73 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | |=.Flags.IsNoisy;............... |
| 3700 | 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .......else..................... |
| 3720 | 20 20 20 20 20 66 6c 61 67 73 20 26 3d 20 7e 46 6c 61 67 73 2e 49 73 4e 6f 69 73 79 3b 0d 0a 20 | .....flags.&=.~Flags.IsNoisy;... |
| 3740 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | ...............}..............}. |
| 3760 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 | ...............///.<summary>.... |
| 3780 | 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 65 74 20 6f 72 20 73 65 74 20 77 68 65 74 68 65 72 | ..........///.Get.or.set.whether |
| 37a0 | 20 74 6f 20 6d 61 72 6b 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 61 73 20 22 73 79 6e 74 68 65 74 | .to.mark.the.control.as."synthet |
| 37c0 | 69 63 22 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e | ic"...............///.</summary> |
| 37e0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 57 68 65 74 68 65 72 | ..............///.<value>Whether |
| 3800 | 20 74 6f 20 6d 61 72 6b 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 61 73 20 73 79 6e 74 68 65 74 69 | .to.mark.the.control.as.syntheti |
| 3820 | 63 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d | c.</value>..............///.<rem |
| 3840 | 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 79 6e 74 68 65 74 69 63 | arks>..............///.Synthetic |
| 3860 | 20 63 6f 6e 74 72 6f 6c 73 20 61 72 65 20 61 72 74 69 66 69 63 69 61 6c 20 63 6f 6e 74 72 6f 6c | .controls.are.artificial.control |
| 3880 | 73 20 74 68 61 74 20 70 72 6f 76 69 64 65 20 69 6e 70 75 74 20 62 75 74 20 64 6f 20 6e 6f 74 20 | s.that.provide.input.but.do.not. |
| 38a0 | 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 61 63 74 75 61 6c 20 63 6f 6e 74 72 6f 6c 73 0d 0a 20 | correspond.to.actual.controls... |
| 38c0 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 6e 20 74 68 65 20 68 61 72 64 77 61 72 65 2e 20 | ...........///.on.the.hardware.. |
| 38e0 | 41 6e 20 65 78 61 6d 70 6c 65 20 69 73 20 3c 73 65 65 20 63 72 65 66 3d 22 4b 65 79 62 6f 61 72 | An.example.is.<see.cref="Keyboar |
| 3900 | 64 2e 61 6e 79 4b 65 79 22 2f 3e 20 77 68 69 63 68 20 69 73 20 61 6e 20 61 72 74 69 66 69 63 69 | d.anyKey"/>.which.is.an.artifici |
| 3920 | 61 6c 20 62 75 74 74 6f 6e 20 74 68 61 74 20 74 72 69 67 67 65 72 73 0d 0a 20 20 20 20 20 20 20 | al.button.that.triggers......... |
| 3940 | 20 20 20 20 20 2f 2f 2f 20 69 66 20 61 6e 79 20 6b 65 79 20 6f 6e 20 74 68 65 20 6b 65 79 62 6f | .....///.if.any.key.on.the.keybo |
| 3960 | 61 72 64 20 69 73 20 70 72 65 73 73 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f | ard.is.pressed.............../// |
| 3980 | 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 | .</remarks>..............///.<se |
| 39a0 | 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 73 79 6e 74 68 65 74 | ealso.cref="InputControl.synthet |
| 39c0 | 69 63 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 | ic"/>..............public.bool.i |
| 39e0 | 73 53 79 6e 74 68 65 74 69 63 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | sSynthetic..............{....... |
| 3a00 | 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 28 66 6c 61 67 73 20 26 20 46 6c 61 67 73 | ...........get.=>.(flags.&.Flags |
| 3a20 | 2e 49 73 53 79 6e 74 68 65 74 69 63 29 20 3d 3d 20 46 6c 61 67 73 2e 49 73 53 79 6e 74 68 65 74 | .IsSynthetic).==.Flags.IsSynthet |
| 3a40 | 69 63 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 | ic;..................internal.se |
| 3a60 | 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | t..................{............ |
| 3a80 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | ..........if.(value)............ |
| 3aa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 49 73 53 | ..............flags.|=.Flags.IsS |
| 3ac0 | 79 6e 74 68 65 74 69 63 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 | ynthetic;......................e |
| 3ae0 | 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 | lse..........................fla |
| 3b00 | 67 73 20 26 3d 20 7e 46 6c 61 67 73 2e 49 73 53 79 6e 74 68 65 74 69 63 3b 0d 0a 20 20 20 20 20 | gs.&=.~Flags.IsSynthetic;....... |
| 3b20 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | ...........}..............}..... |
| 3b40 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 | ...........///.<summary>........ |
| 3b60 | 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 74 68 65 72 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 69 73 | ......///.Whether.the.control.is |
| 3b80 | 20 69 6e 74 72 6f 64 75 63 65 64 20 62 79 20 74 68 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 | .introduced.by.the.layout....... |
| 3ba0 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 | ........///.</summary>.......... |
| 3bc0 | 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 49 66 20 74 72 75 65 2c 20 74 68 65 20 63 6f 6e 74 | ....///.<value>If.true,.the.cont |
| 3be0 | 72 6f 6c 20 69 73 20 66 69 72 73 74 20 69 6e 74 72 6f 64 75 63 65 64 20 62 79 20 74 68 69 73 20 | rol.is.first.introduced.by.this. |
| 3c00 | 6c 61 79 6f 75 74 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f | layout.</value>............../// |
| 3c20 | 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 | .<remarks>..............///.The. |
| 3c40 | 76 61 6c 75 65 20 6f 66 20 74 68 69 73 20 70 72 6f 70 65 72 74 79 20 69 73 20 61 75 74 6f 6d 61 | value.of.this.property.is.automa |
| 3c60 | 74 69 63 61 6c 6c 79 20 64 65 74 65 72 6d 69 6e 65 64 20 62 79 20 74 68 65 20 69 6e 70 75 74 20 | tically.determined.by.the.input. |
| 3c80 | 73 79 73 74 65 6d 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 | system...............///.</remar |
| 3ca0 | 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 46 | ks>..............public.bool.isF |
| 3cc0 | 69 72 73 74 44 65 66 69 6e 65 64 49 6e 54 68 69 73 4c 61 79 6f 75 74 0d 0a 20 20 20 20 20 20 20 | irstDefinedInThisLayout......... |
| 3ce0 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 28 | .....{..................get.=>.( |
| 3d00 | 66 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 49 73 46 69 72 73 74 44 65 66 69 6e 65 64 49 6e 54 68 | flags.&.Flags.IsFirstDefinedInTh |
| 3d20 | 69 73 4c 61 79 6f 75 74 29 20 21 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | isLayout).!=.0;................. |
| 3d40 | 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | .internal.set..................{ |
| 3d60 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 29 | ......................if.(value) |
| 3d80 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 | ..........................flags. |
| 3da0 | 7c 3d 20 46 6c 61 67 73 2e 49 73 46 69 72 73 74 44 65 66 69 6e 65 64 49 6e 54 68 69 73 4c 61 79 | |=.Flags.IsFirstDefinedInThisLay |
| 3dc0 | 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a | out;......................else.. |
| 3de0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 26 3d | ........................flags.&= |
| 3e00 | 20 7e 46 6c 61 67 73 2e 49 73 46 69 72 73 74 44 65 66 69 6e 65 64 49 6e 54 68 69 73 4c 61 79 6f | .~Flags.IsFirstDefinedInThisLayo |
| 3e20 | 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 | ut;..................}.......... |
| 3e40 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c | ....}................public.bool |
| 3e60 | 20 69 73 41 72 72 61 79 20 3d 3e 20 28 61 72 72 61 79 53 69 7a 65 20 21 3d 20 30 29 3b 0d 0a 0d | .isArray.=>.(arraySize.!=.0);... |
| 3e80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 | .............///.<summary>...... |
| 3ea0 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 6f 72 20 61 6e 79 20 70 72 6f 70 65 72 74 79 20 6e 6f 74 | ........///.For.any.property.not |
| 3ec0 | 20 73 65 74 20 6f 6e 20 74 68 69 73 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 2c 20 74 61 6b | .set.on.this.control.layout,.tak |
| 3ee0 | 65 20 74 68 65 20 73 65 74 74 69 6e 67 20 66 72 6f 6d 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d | e.the.setting.from.<paramref.nam |
| 3f00 | 65 3d 22 6f 74 68 65 72 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f | e="other"/>...............///.</ |
| 3f20 | 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d | summary>..............///.<param |
| 3f40 | 20 6e 61 6d 65 3d 22 6f 74 68 65 72 22 3e 43 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 20 70 72 6f | .name="other">Control.layout.pro |
| 3f60 | 76 69 64 69 6e 67 20 73 65 74 74 69 6e 67 73 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 | viding.settings.</param>........ |
| 3f80 | 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ......///.<remarks>............. |
| 3fa0 | 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 6e 61 6d 65 22 2f 3e 20 77 69 6c 6c 20 6e 6f 74 | .///.<see.cref="name"/>.will.not |
| 3fc0 | 20 62 65 20 74 6f 75 63 68 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f | .be.touched...............///.</ |
| 3fe0 | 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c | remarks>..............///.<seeal |
| 4000 | 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 4d 65 72 67 | so.cref="InputControlLayout.Merg |
| 4020 | 65 4c 61 79 6f 75 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 | eLayout"/>..............public.C |
| 4040 | 6f 6e 74 72 6f 6c 49 74 65 6d 20 4d 65 72 67 65 28 43 6f 6e 74 72 6f 6c 49 74 65 6d 20 6f 74 68 | ontrolItem.Merge(ControlItem.oth |
| 4060 | 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | er)..............{.............. |
| 4080 | 20 20 20 20 76 61 72 20 72 65 73 75 6c 74 20 3d 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 49 74 65 6d | ....var.result.=.new.ControlItem |
| 40a0 | 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 6e 61 | ();....................result.na |
| 40c0 | 6d 65 20 3d 20 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 | me.=.name;..................Debu |
| 40e0 | 67 2e 41 73 73 65 72 74 28 21 6e 61 6d 65 2e 49 73 45 6d 70 74 79 28 29 2c 20 22 4e 61 6d 65 20 | g.Assert(!name.IsEmpty(),."Name. |
| 4100 | 6d 75 73 74 20 6e 6f 74 20 62 65 20 65 6d 70 74 79 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | must.not.be.empty");............ |
| 4120 | 20 20 20 20 20 20 72 65 73 75 6c 74 2e 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e 67 | ......result.isModifyingExisting |
| 4140 | 43 6f 6e 74 72 6f 6c 20 3d 20 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e | Control.=.isModifyingExistingCon |
| 4160 | 74 72 6f 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e | trol;....................result. |
| 4180 | 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 | displayName.=.string.IsNullOrEmp |
| 41a0 | 74 79 28 64 69 73 70 6c 61 79 4e 61 6d 65 29 20 3f 20 6f 74 68 65 72 2e 64 69 73 70 6c 61 79 4e | ty(displayName).?.other.displayN |
| 41c0 | 61 6d 65 20 3a 20 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ame.:.displayName;.............. |
| 41e0 | 20 20 20 20 72 65 73 75 6c 74 2e 73 68 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 73 74 | ....result.shortDisplayName.=.st |
| 4200 | 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 73 68 6f 72 74 44 69 73 70 6c 61 79 4e | ring.IsNullOrEmpty(shortDisplayN |
| 4220 | 61 6d 65 29 20 3f 20 6f 74 68 65 72 2e 73 68 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 20 3a 20 | ame).?.other.shortDisplayName.:. |
| 4240 | 73 68 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | shortDisplayName;............... |
| 4260 | 20 20 20 72 65 73 75 6c 74 2e 6c 61 79 6f 75 74 20 3d 20 6c 61 79 6f 75 74 2e 49 73 45 6d 70 74 | ...result.layout.=.layout.IsEmpt |
| 4280 | 79 28 29 20 3f 20 6f 74 68 65 72 2e 6c 61 79 6f 75 74 20 3a 20 6c 61 79 6f 75 74 3b 0d 0a 20 20 | y().?.other.layout.:.layout;.... |
| 42a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 76 61 72 69 61 6e 74 73 20 3d 20 | ..............result.variants.=. |
| 42c0 | 76 61 72 69 61 6e 74 73 2e 49 73 45 6d 70 74 79 28 29 20 3f 20 6f 74 68 65 72 2e 76 61 72 69 61 | variants.IsEmpty().?.other.varia |
| 42e0 | 6e 74 73 20 3a 20 76 61 72 69 61 6e 74 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | nts.:.variants;................. |
| 4300 | 20 72 65 73 75 6c 74 2e 75 73 65 53 74 61 74 65 46 72 6f 6d 20 3d 20 75 73 65 53 74 61 74 65 46 | .result.useStateFrom.=.useStateF |
| 4320 | 72 6f 6d 20 3f 3f 20 6f 74 68 65 72 2e 75 73 65 53 74 61 74 65 46 72 6f 6d 3b 0d 0a 20 20 20 20 | rom.??.other.useStateFrom;...... |
| 4340 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 61 72 72 61 79 53 69 7a 65 20 3d 20 21 | ............result.arraySize.=.! |
| 4360 | 69 73 41 72 72 61 79 20 3f 20 6f 74 68 65 72 2e 61 72 72 61 79 53 69 7a 65 20 3a 20 61 72 72 61 | isArray.?.other.arraySize.:.arra |
| 4380 | 79 53 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 46 49 58 4d | ySize;..................////FIXM |
| 43a0 | 45 3a 20 61 6c 6c 6f 77 20 6f 76 65 72 72 69 64 65 73 20 74 6f 20 75 6e 73 65 74 20 74 68 69 73 | E:.allow.overrides.to.unset.this |
| 43c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 69 73 4e 6f 69 73 79 | ..................result.isNoisy |
| 43e0 | 20 3d 20 69 73 4e 6f 69 73 79 20 7c 7c 20 6f 74 68 65 72 2e 69 73 4e 6f 69 73 79 3b 0d 0a 20 20 | .=.isNoisy.||.other.isNoisy;.... |
| 4400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 69 73 53 79 6e 74 68 65 74 69 63 | ..............result.isSynthetic |
| 4420 | 20 3d 20 69 73 53 79 6e 74 68 65 74 69 63 20 7c 7c 20 6f 74 68 65 72 2e 69 73 53 79 6e 74 68 65 | .=.isSynthetic.||.other.isSynthe |
| 4440 | 74 69 63 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 69 73 46 | tic;..................result.isF |
| 4460 | 69 72 73 74 44 65 66 69 6e 65 64 49 6e 54 68 69 73 4c 61 79 6f 75 74 20 3d 20 66 61 6c 73 65 3b | irstDefinedInThisLayout.=.false; |
| 4480 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 66 66 73 65 74 20 21 | ....................if.(offset.! |
| 44a0 | 3d 20 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 29 | =.InputStateBlock.InvalidOffset) |
| 44c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 6f 66 66 | ......................result.off |
| 44e0 | 73 65 74 20 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 | set.=.offset;..................e |
| 4500 | 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e | lse......................result. |
| 4520 | 6f 66 66 73 65 74 20 3d 20 6f 74 68 65 72 2e 6f 66 66 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 | offset.=.other.offset;.......... |
| 4540 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 74 20 21 3d 20 49 6e 70 75 74 53 74 61 74 65 42 | ..........if.(bit.!=.InputStateB |
| 4560 | 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | lock.InvalidOffset)............. |
| 4580 | 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 62 69 74 20 3d 20 62 69 74 3b 0d 0a 20 20 20 20 | .........result.bit.=.bit;...... |
| 45a0 | 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ............else................ |
| 45c0 | 20 20 20 20 20 20 72 65 73 75 6c 74 2e 62 69 74 20 3d 20 6f 74 68 65 72 2e 62 69 74 3b 0d 0a 0d | ......result.bit.=.other.bit;... |
| 45e0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 66 6f 72 6d 61 74 20 21 3d 20 30 | .................if.(format.!=.0 |
| 4600 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 66 6f | )......................result.fo |
| 4620 | 72 6d 61 74 20 3d 20 66 6f 72 6d 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rmat.=.format;.................. |
| 4640 | 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 | else......................result |
| 4660 | 2e 66 6f 72 6d 61 74 20 3d 20 6f 74 68 65 72 2e 66 6f 72 6d 61 74 3b 0d 0a 0d 0a 20 20 20 20 20 | .format.=.other.format;......... |
| 4680 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 69 7a 65 49 6e 42 69 74 73 20 21 3d 20 30 29 0d | ...........if.(sizeInBits.!=.0). |
| 46a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 73 69 7a 65 | .....................result.size |
| 46c0 | 49 6e 42 69 74 73 20 3d 20 73 69 7a 65 49 6e 42 69 74 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | InBits.=.sizeInBits;............ |
| 46e0 | 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ......else...................... |
| 4700 | 72 65 73 75 6c 74 2e 73 69 7a 65 49 6e 42 69 74 73 20 3d 20 6f 74 68 65 72 2e 73 69 7a 65 49 6e | result.sizeInBits.=.other.sizeIn |
| 4720 | 42 69 74 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 6c 69 | Bits;....................if.(ali |
| 4740 | 61 73 65 73 2e 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ases.Count.>.0)................. |
| 4760 | 20 20 20 20 20 72 65 73 75 6c 74 2e 61 6c 69 61 73 65 73 20 3d 20 61 6c 69 61 73 65 73 3b 0d 0a | .....result.aliases.=.aliases;.. |
| 4780 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 | ................else............ |
| 47a0 | 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 61 6c 69 61 73 65 73 20 3d 20 6f 74 68 65 72 | ..........result.aliases.=.other |
| 47c0 | 2e 61 6c 69 61 73 65 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | .aliases;....................if. |
| 47e0 | 28 75 73 61 67 65 73 2e 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | (usages.Count.>.0).............. |
| 4800 | 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 75 73 61 67 65 73 20 3d 20 75 73 61 67 65 73 3b 0d | ........result.usages.=.usages;. |
| 4820 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 | .................else........... |
| 4840 | 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 75 73 61 67 65 73 20 3d 20 6f 74 68 65 72 | ...........result.usages.=.other |
| 4860 | 2e 75 73 61 67 65 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f | .usages;....................//// |
| 4880 | 46 49 58 4d 45 3a 20 74 68 69 73 20 73 68 6f 75 6c 64 20 70 72 6f 70 65 72 6c 79 20 6d 65 72 67 | FIXME:.this.should.properly.merg |
| 48a0 | 65 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 73 2c 20 6e 6f 74 20 6a 75 73 74 20 70 69 63 6b 20 | e.the.parameters,.not.just.pick. |
| 48c0 | 6f 6e 65 20 6f 72 20 74 68 65 20 6f 74 68 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | one.or.the.other................ |
| 48e0 | 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 65 61 73 69 65 73 74 20 74 68 69 6e 67 20 6d 61 79 20 62 | ..////.......easiest.thing.may.b |
| 4900 | 65 20 74 6f 20 6a 75 73 74 20 63 6f 6e 63 61 74 65 6e 61 74 65 20 74 68 65 20 74 77 6f 20 73 74 | e.to.just.concatenate.the.two.st |
| 4920 | 72 69 6e 67 73 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 61 72 | rings....................if.(par |
| 4940 | 61 6d 65 74 65 72 73 2e 43 6f 75 6e 74 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ameters.Count.==.0)............. |
| 4960 | 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 70 61 72 61 6d 65 74 65 72 73 20 3d 20 6f 74 68 | .........result.parameters.=.oth |
| 4980 | 65 72 2e 70 61 72 61 6d 65 74 65 72 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | er.parameters;.................. |
| 49a0 | 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 | else......................result |
| 49c0 | 2e 70 61 72 61 6d 65 74 65 72 73 20 3d 20 70 61 72 61 6d 65 74 65 72 73 3b 0d 0a 0d 0a 20 20 20 | .parameters.=.parameters;....... |
| 49e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 72 6f 63 65 73 73 6f 72 73 2e 43 6f 75 6e | .............if.(processors.Coun |
| 4a00 | 74 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 | t.==.0)......................res |
| 4a20 | 75 6c 74 2e 70 72 6f 63 65 73 73 6f 72 73 20 3d 20 6f 74 68 65 72 2e 70 72 6f 63 65 73 73 6f 72 | ult.processors.=.other.processor |
| 4a40 | 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 | s;..................else........ |
| 4a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 70 72 6f 63 65 73 73 6f 72 73 20 | ..............result.processors. |
| 4a80 | 3d 20 70 72 6f 63 65 73 73 6f 72 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | =.processors;................... |
| 4aa0 | 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 64 69 73 70 6c | .if.(!string.IsNullOrEmpty(displ |
| 4ac0 | 61 79 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | ayName))......................re |
| 4ae0 | 73 75 6c 74 2e 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d | sult.displayName.=.displayName;. |
| 4b00 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 | .................else........... |
| 4b20 | 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 | ...........result.displayName.=. |
| 4b40 | 6f 74 68 65 72 2e 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | other.displayName;.............. |
| 4b60 | 20 20 20 20 20 20 69 66 20 28 21 64 65 66 61 75 6c 74 53 74 61 74 65 2e 69 73 45 6d 70 74 79 29 | ......if.(!defaultState.isEmpty) |
| 4b80 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 64 65 66 | ......................result.def |
| 4ba0 | 61 75 6c 74 53 74 61 74 65 20 3d 20 64 65 66 61 75 6c 74 53 74 61 74 65 3b 0d 0a 20 20 20 20 20 | aultState.=.defaultState;....... |
| 4bc0 | 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...........else................. |
| 4be0 | 20 20 20 20 20 72 65 73 75 6c 74 2e 64 65 66 61 75 6c 74 53 74 61 74 65 20 3d 20 6f 74 68 65 72 | .....result.defaultState.=.other |
| 4c00 | 2e 64 65 66 61 75 6c 74 53 74 61 74 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .defaultState;.................. |
| 4c20 | 20 20 69 66 20 28 21 6d 69 6e 56 61 6c 75 65 2e 69 73 45 6d 70 74 79 29 0d 0a 20 20 20 20 20 20 | ..if.(!minValue.isEmpty)........ |
| 4c40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 6d 69 6e 56 61 6c 75 65 20 3d 20 | ..............result.minValue.=. |
| 4c60 | 6d 69 6e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d | minValue;..................else. |
| 4c80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 6d 69 6e 56 | .....................result.minV |
| 4ca0 | 61 6c 75 65 20 3d 20 6f 74 68 65 72 2e 6d 69 6e 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 | alue.=.other.minValue;.......... |
| 4cc0 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 61 78 56 61 6c 75 65 2e 69 73 45 6d 70 74 79 29 | ..........if.(!maxValue.isEmpty) |
| 4ce0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 6d 61 78 | ......................result.max |
| 4d00 | 56 61 6c 75 65 20 3d 20 6d 61 78 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | Value.=.maxValue;............... |
| 4d20 | 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 | ...else......................res |
| 4d40 | 75 6c 74 2e 6d 61 78 56 61 6c 75 65 20 3d 20 6f 74 68 65 72 2e 6d 61 78 56 61 6c 75 65 3b 0d 0a | ult.maxValue.=.other.maxValue;.. |
| 4d60 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 73 75 6c 74 3b | ..................return.result; |
| 4d80 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5b | ..............}................[ |
| 4da0 | 46 6c 61 67 73 5d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 65 6e 75 6d | Flags]..............private.enum |
| 4dc0 | 20 46 6c 61 67 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | .Flags..............{........... |
| 4de0 | 20 20 20 20 20 20 20 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e 74 72 6f | .......isModifyingExistingContro |
| 4e00 | 6c 20 3d 20 31 20 3c 3c 20 30 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 73 4e | l.=.1.<<.0,..................IsN |
| 4e20 | 6f 69 73 79 20 3d 20 31 20 3c 3c 20 31 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | oisy.=.1.<<.1,.................. |
| 4e40 | 49 73 53 79 6e 74 68 65 74 69 63 20 3d 20 31 20 3c 3c 20 32 2c 0d 0a 20 20 20 20 20 20 20 20 20 | IsSynthetic.=.1.<<.2,........... |
| 4e60 | 20 20 20 20 20 20 20 49 73 46 69 72 73 74 44 65 66 69 6e 65 64 49 6e 54 68 69 73 4c 61 79 6f 75 | .......IsFirstDefinedInThisLayou |
| 4e80 | 74 20 3d 20 31 20 3c 3c 20 33 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 | t.=.1.<<.3,..............}...... |
| 4ea0 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 55 6e 69 71 75 65 20 6e 61 6d 65 20 | ....}............//.Unique.name. |
| 4ec0 | 6f 66 20 74 68 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a | of.the.layout...........//.NOTE: |
| 4ee0 | 20 43 61 73 65 2d 69 6e 73 65 6e 73 69 74 69 76 65 2e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c | .Case-insensitive...........publ |
| 4f00 | 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6e 61 6d 65 20 3d 3e 20 6d 5f 4e 61 6d 65 | ic.InternedString.name.=>.m_Name |
| 4f20 | 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 64 69 73 70 6c | ;............public.string.displ |
| 4f40 | 61 79 4e 61 6d 65 20 3d 3e 20 6d 5f 44 69 73 70 6c 61 79 4e 61 6d 65 20 3f 3f 20 6d 5f 4e 61 6d | ayName.=>.m_DisplayName.??.m_Nam |
| 4f60 | 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 79 70 65 20 74 79 70 65 20 3d | e;............public.Type.type.= |
| 4f80 | 3e 20 6d 5f 54 79 70 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 74 65 | >.m_Type;............public.Inte |
| 4fa0 | 72 6e 65 64 53 74 72 69 6e 67 20 76 61 72 69 61 6e 74 73 20 3d 3e 20 6d 5f 56 61 72 69 61 6e 74 | rnedString.variants.=>.m_Variant |
| 4fc0 | 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 46 6f 75 72 43 43 20 73 74 61 74 | s;............public.FourCC.stat |
| 4fe0 | 65 46 6f 72 6d 61 74 20 3d 3e 20 6d 5f 53 74 61 74 65 46 6f 72 6d 61 74 3b 0d 0a 0d 0a 20 20 20 | eFormat.=>.m_StateFormat;....... |
| 5000 | 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 73 74 61 74 65 53 69 7a 65 49 6e 42 79 74 65 73 | .....public.int.stateSizeInBytes |
| 5020 | 20 3d 3e 20 6d 5f 53 74 61 74 65 53 69 7a 65 49 6e 42 79 74 65 73 3b 0d 0a 0d 0a 20 20 20 20 20 | .=>.m_StateSizeInBytes;......... |
| 5040 | 20 20 20 70 75 62 6c 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 49 6e 74 65 72 6e 65 64 53 74 | ...public.IEnumerable<InternedSt |
| 5060 | 72 69 6e 67 3e 20 62 61 73 65 4c 61 79 6f 75 74 73 20 3d 3e 20 6d 5f 42 61 73 65 4c 61 79 6f 75 | ring>.baseLayouts.=>.m_BaseLayou |
| 5080 | 74 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 45 6e 75 6d 65 72 61 62 6c | ts;............public.IEnumerabl |
| 50a0 | 65 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 20 61 70 70 6c 69 65 64 4f 76 65 72 72 69 64 | e<InternedString>.appliedOverrid |
| 50c0 | 65 73 20 3d 3e 20 6d 5f 41 70 70 6c 69 65 64 4f 76 65 72 72 69 64 65 73 3b 0d 0a 0d 0a 20 20 20 | es.=>.m_AppliedOverrides;....... |
| 50e0 | 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 49 6e 74 65 72 6e | .....public.ReadOnlyArray<Intern |
| 5100 | 65 64 53 74 72 69 6e 67 3e 20 63 6f 6d 6d 6f 6e 55 73 61 67 65 73 20 3d 3e 20 6e 65 77 20 52 65 | edString>.commonUsages.=>.new.Re |
| 5120 | 61 64 4f 6e 6c 79 41 72 72 61 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 6d 5f 43 6f | adOnlyArray<InternedString>(m_Co |
| 5140 | 6d 6d 6f 6e 55 73 61 67 65 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d | mmonUsages);............///.<sum |
| 5160 | 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 6f 66 20 63 68 69 6c 64 | mary>..........///.List.of.child |
| 5180 | 20 63 6f 6e 74 72 6f 6c 73 20 64 65 66 69 6e 65 64 20 66 6f 72 20 74 68 65 20 6c 61 79 6f 75 74 | .controls.defined.for.the.layout |
| 51a0 | 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 | ...........///.</summary>....... |
| 51c0 | 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 43 68 69 6c 64 20 63 6f 6e 74 72 6f 6c 73 20 64 65 66 | ...///.<value>Child.controls.def |
| 51e0 | 69 6e 65 64 20 66 6f 72 20 74 68 65 20 6c 61 79 6f 75 74 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 | ined.for.the.layout.</value>.... |
| 5200 | 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | ......///.<remarks>........../// |
| 5220 | 20 4e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 6c 69 73 74 20 54 4f 44 4f 0d 0a 20 20 20 20 20 | .Note.that.this.list.TODO....... |
| 5240 | 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 | ...///.</remarks>..........publi |
| 5260 | 63 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 43 6f 6e 74 72 6f 6c 49 74 65 6d 3e 20 63 6f 6e | c.ReadOnlyArray<ControlItem>.con |
| 5280 | 74 72 6f 6c 73 20 3d 3e 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 43 6f 6e 74 72 | trols.=>.new.ReadOnlyArray<Contr |
| 52a0 | 6f 6c 49 74 65 6d 3e 28 6d 5f 43 6f 6e 74 72 6f 6c 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | olItem>(m_Controls);............ |
| 52c0 | 70 75 62 6c 69 63 20 62 6f 6f 6c 20 75 70 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 20 3d | public.bool.updateBeforeRender.= |
| 52e0 | 3e 20 6d 5f 55 70 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 20 3f 3f 20 66 61 6c 73 65 3b | >.m_UpdateBeforeRender.??.false; |
| 5300 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 44 65 76 69 63 65 | ............public.bool.isDevice |
| 5320 | 4c 61 79 6f 75 74 20 3d 3e 20 74 79 70 65 6f 66 28 49 6e 70 75 74 44 65 76 69 63 65 29 2e 49 73 | Layout.=>.typeof(InputDevice).Is |
| 5340 | 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 6d 5f 54 79 70 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 | AssignableFrom(m_Type);......... |
| 5360 | 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 3d | ...public.bool.isControlLayout.= |
| 5380 | 3e 20 21 69 73 44 65 76 69 63 65 4c 61 79 6f 75 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f | >.!isDeviceLayout;............// |
| 53a0 | 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 74 68 65 72 | /.<summary>..........///.Whether |
| 53c0 | 20 74 68 65 20 6c 61 79 6f 75 74 20 69 73 20 61 70 70 6c 69 65 73 20 6f 76 65 72 72 69 64 65 73 | .the.layout.is.applies.overrides |
| 53e0 | 20 74 6f 20 6f 74 68 65 72 20 6c 61 79 6f 75 74 73 20 69 6e 73 74 65 61 64 20 6f 66 0d 0a 20 20 | .to.other.layouts.instead.of.... |
| 5400 | 20 20 20 20 20 20 2f 2f 2f 20 64 65 66 69 6e 69 6e 67 20 61 20 6c 61 79 6f 75 74 20 62 79 20 69 | ......///.defining.a.layout.by.i |
| 5420 | 74 73 65 6c 66 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a | tself...........///.</summary>.. |
| 5440 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 54 72 75 65 20 69 66 20 74 68 65 20 6c | ........///.<value>True.if.the.l |
| 5460 | 61 79 6f 75 74 20 61 63 74 73 20 61 73 20 61 6e 20 6f 76 65 72 72 69 64 65 2e 3c 2f 76 61 6c 75 | ayout.acts.as.an.override.</valu |
| 5480 | 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 | e>..........///.<seealso.cref="I |
| 54a0 | 6e 70 75 74 53 79 73 74 65 6d 2e 52 65 67 69 73 74 65 72 4c 61 79 6f 75 74 4f 76 65 72 72 69 64 | nputSystem.RegisterLayoutOverrid |
| 54c0 | 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 4f 76 65 72 | e"/>..........public.bool.isOver |
| 54e0 | 72 69 64 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 | ride..........{..............get |
| 5500 | 20 3d 3e 20 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 49 73 4f 76 65 72 72 69 64 65 29 | .=>.(m_Flags.&.Flags.IsOverride) |
| 5520 | 20 21 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 | .!=.0;..............internal.set |
| 5540 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............{................. |
| 5560 | 20 69 66 20 28 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .if.(value)..................... |
| 5580 | 20 6d 5f 46 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 49 73 4f 76 65 72 72 69 64 65 3b 0d 0a 20 | .m_Flags.|=.Flags.IsOverride;... |
| 55a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ...............else............. |
| 55c0 | 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 26 3d 20 7e 46 6c 61 67 73 2e 49 73 4f 76 65 | .........m_Flags.&=.~Flags.IsOve |
| 55e0 | 72 72 69 64 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d | rride;..............}..........} |
| 5600 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 47 65 6e 65 72 69 | ............public.bool.isGeneri |
| 5620 | 63 54 79 70 65 4f 66 44 65 76 69 63 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | cTypeOfDevice..........{........ |
| 5640 | 20 20 20 20 20 20 67 65 74 20 3d 3e 20 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 49 73 | ......get.=>.(m_Flags.&.Flags.Is |
| 5660 | 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 29 20 21 3d 20 30 3b 0d 0a 20 20 20 20 | GenericTypeOfDevice).!=.0;...... |
| 5680 | 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 | ........internal.set............ |
| 56a0 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 29 0d | ..{..................if.(value). |
| 56c0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 7c 3d 20 | .....................m_Flags.|=. |
| 56e0 | 46 6c 61 67 73 2e 49 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 3b 0d 0a 20 20 | Flags.IsGenericTypeOfDevice;.... |
| 5700 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ..............else.............. |
| 5720 | 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 26 3d 20 7e 46 6c 61 67 73 2e 49 73 47 65 6e 65 | ........m_Flags.&=.~Flags.IsGene |
| 5740 | 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | ricTypeOfDevice;..............}. |
| 5760 | 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f | .........}............public.boo |
| 5780 | 6c 20 68 69 64 65 49 6e 55 49 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | l.hideInUI..........{........... |
| 57a0 | 20 20 20 67 65 74 20 3d 3e 20 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 48 69 64 65 49 | ...get.=>.(m_Flags.&.Flags.HideI |
| 57c0 | 6e 55 49 29 20 21 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c | nUI).!=.0;..............internal |
| 57e0 | 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .set..............{............. |
| 5800 | 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .....if.(value)................. |
| 5820 | 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 48 69 64 65 49 6e 55 49 3b 0d | .....m_Flags.|=.Flags.HideInUI;. |
| 5840 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 | .................else........... |
| 5860 | 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 26 3d 20 7e 46 6c 61 67 73 2e 48 69 64 | ...........m_Flags.&=.~Flags.Hid |
| 5880 | 65 49 6e 55 49 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d | eInUI;..............}..........} |
| 58a0 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 20 74 | ............public.ControlItem.t |
| 58c0 | 68 69 73 5b 73 74 72 69 6e 67 20 70 61 74 68 5d 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | his[string.path]..........{..... |
| 58e0 | 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | .........get..............{..... |
| 5900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 | .............if.(string.IsNullOr |
| 5920 | 45 6d 70 74 79 28 70 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Empty(path)).................... |
| 5940 | 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f | ..throw.new.ArgumentNullExceptio |
| 5960 | 6e 28 6e 61 6d 65 6f 66 28 70 61 74 68 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | n(nameof(path));................ |
| 5980 | 20 20 20 20 2f 2f 20 44 6f 65 73 20 6e 6f 74 20 75 73 65 20 46 69 6e 64 43 6f 6e 74 72 6f 6c 20 | ....//.Does.not.use.FindControl. |
| 59a0 | 73 6f 20 74 68 61 74 20 77 65 20 64 6f 6e 27 74 20 66 6f 72 63 65 2d 69 6e 74 65 72 6e 20 74 68 | so.that.we.don't.force-intern.th |
| 59c0 | 65 20 67 69 76 65 6e 20 70 61 74 68 20 73 74 72 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | e.given.path.string............. |
| 59e0 | 20 20 20 20 20 20 69 66 20 28 6d 5f 43 6f 6e 74 72 6f 6c 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 | ......if.(m_Controls.!=.null)... |
| 5a00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............{................ |
| 5a20 | 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 5f 43 6f 6e 74 | ......for.(var.i.=.0;.i.<.m_Cont |
| 5a40 | 72 6f 6c 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | rols.Length;.++i)............... |
| 5a60 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .......{........................ |
| 5a80 | 20 20 69 66 20 28 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 5d 2e 6e 61 6d 65 20 3d 3d 20 70 61 74 68 | ..if.(m_Controls[i].name.==.path |
| 5aa0 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 | )..............................r |
| 5ac0 | 65 74 75 72 6e 20 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | eturn.m_Controls[i];............ |
| 5ae0 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a | ..........}..................}.. |
| 5b00 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 4b 65 79 4e | ..................throw.new.KeyN |
| 5b20 | 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 28 24 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 63 | otFoundException($"Cannot.find.c |
| 5b40 | 6f 6e 74 72 6f 6c 20 27 7b 70 61 74 68 7d 27 20 69 6e 20 6c 61 79 6f 75 74 20 27 7b 6e 61 6d 65 | ontrol.'{path}'.in.layout.'{name |
| 5b60 | 7d 27 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d | }'");..............}..........}. |
| 5b80 | 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 3f 20 46 | ...........public.ControlItem?.F |
| 5ba0 | 69 6e 64 43 6f 6e 74 72 6f 6c 28 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 70 61 74 68 29 0d | indControl(InternedString.path). |
| 5bc0 | 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 | .........{..............if.(stri |
| 5be0 | 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 70 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 | ng.IsNullOrEmpty(path))......... |
| 5c00 | 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 | .........throw.new.ArgumentNullE |
| 5c20 | 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 70 61 74 68 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 | xception(nameof(path));......... |
| 5c40 | 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 6f 6e 74 72 6f 6c 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a | .......if.(m_Controls.==.null).. |
| 5c60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a | ................return.null;.... |
| 5c80 | 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 | ............for.(var.i.=.0;.i.<. |
| 5ca0 | 6d 5f 43 6f 6e 74 72 6f 6c 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 | m_Controls.Length;.++i)......... |
| 5cc0 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 6f | .....{..................if.(m_Co |
| 5ce0 | 6e 74 72 6f 6c 73 5b 69 5d 2e 6e 61 6d 65 20 3d 3d 20 70 61 74 68 29 0d 0a 20 20 20 20 20 20 20 | ntrols[i].name.==.path)......... |
| 5d00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 | .............return.m_Controls[i |
| 5d20 | 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ];..............}............... |
| 5d40 | 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 | .return.null;..........}........ |
| 5d60 | 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 3f 20 46 69 6e 64 43 6f 6e 74 | ....public.ControlItem?.FindCont |
| 5d80 | 72 6f 6c 49 6e 63 6c 75 64 69 6e 67 41 72 72 61 79 45 6c 65 6d 65 6e 74 73 28 73 74 72 69 6e 67 | rolIncludingArrayElements(string |
| 5da0 | 20 70 61 74 68 2c 20 6f 75 74 20 69 6e 74 20 61 72 72 61 79 49 6e 64 65 78 29 0d 0a 20 20 20 20 | .path,.out.int.arrayIndex)...... |
| 5dc0 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 | ....{..............if.(string.Is |
| 5de0 | 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 70 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | NullOrEmpty(path)).............. |
| 5e00 | 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 | ....throw.new.ArgumentNullExcept |
| 5e20 | 69 6f 6e 28 6e 61 6d 65 6f 66 28 70 61 74 68 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | ion(nameof(path));.............. |
| 5e40 | 20 20 61 72 72 61 79 49 6e 64 65 78 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ..arrayIndex.=.-1;.............. |
| 5e60 | 69 66 20 28 6d 5f 43 6f 6e 74 72 6f 6c 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 | if.(m_Controls.==.null)......... |
| 5e80 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 | .........return.null;........... |
| 5ea0 | 20 20 20 20 20 76 61 72 20 61 72 72 61 79 49 6e 64 65 78 41 63 63 75 6d 75 6c 61 74 65 64 20 3d | .....var.arrayIndexAccumulated.= |
| 5ec0 | 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 73 74 44 69 67 69 74 49 6e | .0;..............var.lastDigitIn |
| 5ee0 | 64 65 78 20 3d 20 70 61 74 68 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | dex.=.path.Length;.............. |
| 5f00 | 77 68 69 6c 65 20 28 6c 61 73 74 44 69 67 69 74 49 6e 64 65 78 20 3e 20 30 20 26 26 20 63 68 61 | while.(lastDigitIndex.>.0.&&.cha |
| 5f20 | 72 2e 49 73 44 69 67 69 74 28 70 61 74 68 5b 6c 61 73 74 44 69 67 69 74 49 6e 64 65 78 20 2d 20 | r.IsDigit(path[lastDigitIndex.-. |
| 5f40 | 31 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | 1]))..............{............. |
| 5f60 | 20 20 20 20 20 2d 2d 6c 61 73 74 44 69 67 69 74 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 | .....--lastDigitIndex;.......... |
| 5f80 | 20 20 20 20 20 20 20 20 61 72 72 61 79 49 6e 64 65 78 41 63 63 75 6d 75 6c 61 74 65 64 20 2a 3d | ........arrayIndexAccumulated.*= |
| 5fa0 | 20 31 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 72 72 61 79 49 6e 64 65 78 | .10;..................arrayIndex |
| 5fc0 | 41 63 63 75 6d 75 6c 61 74 65 64 20 2b 3d 20 70 61 74 68 5b 6c 61 73 74 44 69 67 69 74 49 6e 64 | Accumulated.+=.path[lastDigitInd |
| 5fe0 | 65 78 5d 20 2d 20 27 30 27 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 | ex].-.'0';..............}....... |
| 6000 | 20 20 20 20 20 20 20 20 20 76 61 72 20 61 72 72 61 79 4e 61 6d 65 4c 65 6e 67 74 68 20 3d 20 30 | .........var.arrayNameLength.=.0 |
| 6020 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 73 74 44 69 67 69 74 49 6e 64 65 | ;..............if.(lastDigitInde |
| 6040 | 78 20 3c 20 70 61 74 68 2e 4c 65 6e 67 74 68 20 26 26 20 6c 61 73 74 44 69 67 69 74 49 6e 64 65 | x.<.path.Length.&&.lastDigitInde |
| 6060 | 78 20 3e 20 30 29 20 2f 2f 20 50 72 6f 74 65 63 74 20 61 67 61 69 6e 73 74 20 6e 61 6d 65 20 62 | x.>.0).//.Protect.against.name.b |
| 6080 | 65 69 6e 67 20 61 6c 6c 20 64 69 67 69 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eing.all.digits................. |
| 60a0 | 20 20 61 72 72 61 79 4e 61 6d 65 4c 65 6e 67 74 68 20 3d 20 6c 61 73 74 44 69 67 69 74 49 6e 64 | ..arrayNameLength.=.lastDigitInd |
| 60c0 | 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 | ex;................for.(var.i.=. |
| 60e0 | 30 3b 20 69 20 3c 20 6d 5f 43 6f 6e 74 72 6f 6c 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 29 0d 0a | 0;.i.<.m_Controls.Length;.++i).. |
| 6100 | 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 | ............{..................r |
| 6120 | 65 66 20 76 61 72 20 63 6f 6e 74 72 6f 6c 20 3d 20 72 65 66 20 6d 5f 43 6f 6e 74 72 6f 6c 73 5b | ef.var.control.=.ref.m_Controls[ |
| 6140 | 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e | i];..................if.(string. |
| 6160 | 43 6f 6d 70 61 72 65 28 63 6f 6e 74 72 6f 6c 2e 6e 61 6d 65 2c 20 70 61 74 68 2c 20 53 74 72 69 | Compare(control.name,.path,.Stri |
| 6180 | 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e | ngComparison.InvariantCultureIgn |
| 61a0 | 6f 72 65 43 61 73 65 29 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | oreCase).==.0).................. |
| 61c0 | 20 20 20 20 72 65 74 75 72 6e 20 63 6f 6e 74 72 6f 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | ....return.control;............. |
| 61e0 | 20 20 20 20 20 20 20 2f 2f 2f 2f 46 49 58 4d 45 3a 20 77 68 61 74 20 74 68 69 73 20 63 61 6e 27 | .......////FIXME:.what.this.can' |
| 6200 | 74 20 68 61 6e 64 6c 65 20 69 73 20 22 6f 75 74 65 72 41 72 72 61 79 34 2f 69 6e 6e 65 72 41 72 | t.handle.is."outerArray4/innerAr |
| 6220 | 72 61 79 35 22 3b 20 6e 6f 74 20 73 75 72 65 20 77 65 20 63 61 72 65 2c 20 74 68 6f 75 67 68 0d | ray5";.not.sure.we.care,.though. |
| 6240 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 54 68 69 73 20 77 | .................//.NOTE:.This.w |
| 6260 | 69 6c 6c 20 2a 6e 6f 74 2a 20 6d 61 74 63 68 20 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 20 22 | ill.*not*.match.something.like." |
| 6280 | 74 6f 75 63 68 34 2f 74 61 70 22 2e 20 57 68 69 63 68 20 69 73 20 77 68 61 74 20 77 65 20 77 61 | touch4/tap"..Which.is.what.we.wa |
| 62a0 | 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 49 6e | nt...................//.......In |
| 62c0 | 20 63 61 73 65 20 74 68 65 72 65 20 69 73 20 61 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 0d 0a 20 20 | .case.there.is.a.ControlItem.... |
| 62e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 2e 69 73 41 72 72 61 | ..............if.(control.isArra |
| 6300 | 79 20 26 26 20 61 72 72 61 79 4e 61 6d 65 4c 65 6e 67 74 68 20 3e 20 30 20 26 26 20 61 72 72 61 | y.&&.arrayNameLength.>.0.&&.arra |
| 6320 | 79 4e 61 6d 65 4c 65 6e 67 74 68 20 3d 3d 20 63 6f 6e 74 72 6f 6c 2e 6e 61 6d 65 2e 6c 65 6e 67 | yNameLength.==.control.name.leng |
| 6340 | 74 68 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e | th.&&......................strin |
| 6360 | 67 2e 43 6f 6d 70 61 72 65 28 63 6f 6e 74 72 6f 6c 2e 6e 61 6d 65 2e 54 6f 53 74 72 69 6e 67 28 | g.Compare(control.name.ToString( |
| 6380 | 29 2c 20 30 2c 20 70 61 74 68 2c 20 30 2c 20 61 72 72 61 79 4e 61 6d 65 4c 65 6e 67 74 68 2c 0d | ),.0,.path,.0,.arrayNameLength,. |
| 63a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 43 | .........................StringC |
| 63c0 | 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 | omparison.InvariantCultureIgnore |
| 63e0 | 43 61 73 65 29 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | Case).==.0)..................{.. |
| 6400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 72 72 61 79 49 6e 64 65 78 20 3d | ....................arrayIndex.= |
| 6420 | 20 61 72 72 61 79 49 6e 64 65 78 41 63 63 75 6d 75 6c 61 74 65 64 3b 0d 0a 20 20 20 20 20 20 20 | .arrayIndexAccumulated;......... |
| 6440 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 63 6f 6e 74 72 6f 6c 3b 0d 0a 20 20 | .............return.control;.... |
| 6460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a | ..............}..............}.. |
| 6480 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 | ..............return.null;...... |
| 64a0 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a | ....}............///.<summary>.. |
| 64c0 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 20 74 68 65 20 74 79 70 65 20 6f 66 20 76 | ........///.Return.the.type.of.v |
| 64e0 | 61 6c 75 65 73 20 70 72 6f 64 75 63 65 64 20 62 79 20 63 6f 6e 74 72 6f 6c 73 20 63 72 65 61 74 | alues.produced.by.controls.creat |
| 6500 | 65 64 20 66 72 6f 6d 20 74 68 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | ed.from.the.layout.........../// |
| 6520 | 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e | .</summary>..........///.<return |
| 6540 | 73 3e 54 68 65 20 76 61 6c 75 65 20 74 79 70 65 20 6f 66 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 | s>The.value.type.of.the.control. |
| 6560 | 6f 72 20 6e 75 6c 6c 20 69 66 20 69 74 20 63 61 6e 6e 6f 74 20 62 65 20 64 65 74 65 72 6d 69 6e | or.null.if.it.cannot.be.determin |
| 6580 | 65 64 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 | ed.</returns>..........///.<rema |
| 65a0 | 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 6f 6e | rks>..........///.This.method.on |
| 65c0 | 6c 79 20 72 65 74 75 72 6e 73 20 74 68 65 20 73 74 61 74 69 63 61 6c 6c 79 20 69 6e 66 65 72 72 | ly.returns.the.statically.inferr |
| 65e0 | 65 64 20 76 61 6c 75 65 20 74 79 70 65 2e 20 54 68 69 73 20 74 79 70 65 20 63 6f 72 72 65 73 70 | ed.value.type..This.type.corresp |
| 6600 | 6f 6e 64 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 74 68 65 20 74 79 70 65 20 61 72 | onds..........///.to.the.type.ar |
| 6620 | 67 75 6d 65 6e 74 20 74 6f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f | gument.to.<see.cref="InputContro |
| 6640 | 6c 7b 54 56 61 6c 75 65 7d 22 2f 3e 20 69 6e 20 74 68 65 20 69 6e 68 65 72 69 74 61 6e 63 65 20 | l{TValue}"/>.in.the.inheritance. |
| 6660 | 68 69 65 72 61 72 63 68 79 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 66 20 3c 73 65 65 20 63 | hierarchy..........///.of.<see.c |
| 6680 | 72 65 66 3d 22 74 79 70 65 22 2f 3e 2e 20 41 73 20 74 68 65 20 74 79 70 65 20 75 73 65 64 20 62 | ref="type"/>..As.the.type.used.b |
| 66a0 | 79 20 74 68 65 20 6c 61 79 6f 75 74 20 6d 61 79 20 6e 6f 74 20 69 6e 68 65 72 69 74 20 66 72 6f | y.the.layout.may.not.inherit.fro |
| 66c0 | 6d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 | m..........///.<see.cref="InputC |
| 66e0 | 6f 6e 74 72 6f 6c 7b 54 56 61 6c 75 65 7d 22 2f 3e 2c 20 74 68 69 73 20 6d 61 79 20 6d 65 61 6e | ontrol{TValue}"/>,.this.may.mean |
| 6700 | 20 74 68 61 74 20 74 68 65 20 76 61 6c 75 65 20 74 79 70 65 20 63 61 6e 6e 6f 74 20 62 65 20 69 | .that.the.value.type.cannot.be.i |
| 6720 | 6e 66 65 72 72 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 6e 64 20 74 68 65 20 6d 65 74 | nferred..........///.and.the.met |
| 6740 | 68 6f 64 20 77 69 6c 6c 20 72 65 74 75 72 6e 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 20 20 20 20 2f | hod.will.return.null.........../ |
| 6760 | 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 | //.</remarks>..........///.<seea |
| 6780 | 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 76 61 6c 75 65 54 79 70 65 | lso.cref="InputControl.valueType |
| 67a0 | 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 79 70 65 20 47 65 74 56 61 6c 75 | "/>..........public.Type.GetValu |
| 67c0 | 65 54 79 70 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | eType()..........{.............. |
| 67e0 | 72 65 74 75 72 6e 20 54 79 70 65 48 65 6c 70 65 72 73 2e 47 65 74 47 65 6e 65 72 69 63 54 79 70 | return.TypeHelpers.GetGenericTyp |
| 6800 | 65 41 72 67 75 6d 65 6e 74 46 72 6f 6d 48 69 65 72 61 72 63 68 79 28 74 79 70 65 2c 20 74 79 70 | eArgumentFromHierarchy(type,.typ |
| 6820 | 65 6f 66 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 3c 3e 29 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 | eof(InputControl<>),.0);........ |
| 6840 | 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 | ..}............///.<summary>.... |
| 6860 | 20 20 20 20 20 20 2f 2f 2f 20 42 75 69 6c 64 20 61 20 6c 61 79 6f 75 74 20 70 72 6f 67 72 61 6d | ......///.Build.a.layout.program |
| 6880 | 6d 61 74 69 63 61 6c 6c 79 2e 20 50 72 69 6d 61 72 69 6c 79 20 66 6f 72 20 75 73 65 20 62 79 20 | matically..Primarily.for.use.by. |
| 68a0 | 6c 61 79 6f 75 74 20 62 75 69 6c 64 65 72 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 72 65 67 | layout.builders..........///.reg |
| 68c0 | 69 73 74 65 72 65 64 20 77 69 74 68 20 74 68 65 20 73 79 73 74 65 6d 2e 0d 0a 20 20 20 20 20 20 | istered.with.the.system......... |
| 68e0 | 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 | ..///.</summary>..........///.<s |
| 6900 | 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 53 79 73 74 65 6d 2e 52 65 67 69 73 74 65 | eealso.cref="InputSystem.Registe |
| 6920 | 72 4c 61 79 6f 75 74 42 75 69 6c 64 65 72 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 | rLayoutBuilder"/>..........publi |
| 6940 | 63 20 63 6c 61 73 73 20 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | c.class.Builder..........{...... |
| 6960 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 | ........///.<summary>........... |
| 6980 | 20 20 20 2f 2f 2f 20 4e 61 6d 65 20 74 6f 20 61 73 73 69 67 6e 20 74 6f 20 74 68 65 20 6c 61 79 | ...///.Name.to.assign.to.the.lay |
| 69a0 | 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e | out...............///.</summary> |
| 69c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 4e 61 6d 65 20 74 6f | ..............///.<value>Name.to |
| 69e0 | 20 61 73 73 69 67 6e 20 74 6f 20 74 68 65 20 6c 61 79 6f 75 74 2e 3c 2f 76 61 6c 75 65 3e 0d 0a | .assign.to.the.layout.</value>.. |
| 6a00 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 | ............///.<seealso.cref="I |
| 6a20 | 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 6e 61 6d 65 22 2f 3e 0d 0a 20 20 20 20 20 | nputControlLayout.name"/>....... |
| 6a40 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 6e 61 6d 65 20 7b 20 67 65 74 3b | .......public.string.name.{.get; |
| 6a60 | 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d | .set;.}................///.<summ |
| 6a80 | 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 69 73 70 6c 61 79 20 6e 61 | ary>..............///.Display.na |
| 6aa0 | 6d 65 20 74 6f 20 61 73 73 69 67 6e 20 74 6f 20 74 68 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 | me.to.assign.to.the.layout...... |
| 6ac0 | 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 | .........///.</summary>......... |
| 6ae0 | 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 44 69 73 70 6c 61 79 20 6e 61 6d 65 20 74 6f 20 | .....///.<value>Display.name.to. |
| 6b00 | 61 73 73 69 67 6e 20 74 6f 20 74 68 65 20 6c 61 79 6f 75 74 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 | assign.to.the.layout</value>.... |
| 6b20 | 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 | ..........///.<seealso.cref="Inp |
| 6b40 | 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 64 69 73 70 6c 61 79 4e 61 6d 65 22 2f 3e 0d 0a | utControlLayout.displayName"/>.. |
| 6b60 | 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 64 69 73 70 6c 61 | ............public.string.displa |
| 6b80 | 79 4e 61 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | yName.{.get;.set;.}............. |
| 6ba0 | 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | ...///.<summary>..............// |
| 6bc0 | 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 22 2f 3e 20 74 79 70 | /.<see.cref="InputControl"/>.typ |
| 6be0 | 65 20 74 6f 20 69 6e 73 74 61 6e 74 69 61 74 65 20 66 6f 72 20 74 68 65 20 6c 61 79 6f 75 74 2e | e.to.instantiate.for.the.layout. |
| 6c00 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 | ..............///.</summary>.... |
| 6c20 | 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 43 6f 6e 74 72 6f 6c 20 74 79 70 | ..........///.<value>Control.typ |
| 6c40 | 65 20 74 6f 20 69 6e 73 74 61 6e 74 69 61 74 65 20 66 6f 72 20 74 68 65 20 6c 61 79 6f 75 74 2e | e.to.instantiate.for.the.layout. |
| 6c60 | 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c | </value>..............///.<seeal |
| 6c80 | 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 74 79 70 65 | so.cref="InputControlLayout.type |
| 6ca0 | 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 79 70 65 20 74 79 70 | "/>..............public.Type.typ |
| 6cc0 | 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | e.{.get;.set;.}................/ |
| 6ce0 | 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 | //.<summary>..............///.Me |
| 6d00 | 6d 6f 72 79 20 66 6f 72 6d 61 74 20 46 6f 75 72 43 43 20 63 6f 64 65 20 74 6f 20 61 70 70 6c 79 | mory.format.FourCC.code.to.apply |
| 6d20 | 20 74 6f 20 73 74 61 74 65 20 6d 65 6d 6f 72 79 20 75 73 65 64 20 62 79 20 74 68 65 0d 0a 20 20 | .to.state.memory.used.by.the.... |
| 6d40 | 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 | ..........///.layout............ |
| 6d60 | 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | ...///.</summary>............../ |
| 6d80 | 2f 2f 20 3c 76 61 6c 75 65 3e 46 6f 75 72 43 43 20 6d 65 6d 6f 72 79 20 66 6f 72 6d 61 74 20 74 | //.<value>FourCC.memory.format.t |
| 6da0 | 61 67 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 | ag.</value>..............///.<se |
| 6dc0 | 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 73 | ealso.cref="InputControlLayout.s |
| 6de0 | 74 61 74 65 46 6f 72 6d 61 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c | tateFormat"/>..............///.< |
| 6e00 | 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 66 6f | seealso.cref="InputStateBlock.fo |
| 6e20 | 72 6d 61 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 46 6f 75 72 | rmat"/>..............public.Four |
| 6e40 | 43 43 20 73 74 61 74 65 46 6f 72 6d 61 74 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a | CC.stateFormat.{.get;.set;.}.... |
| 6e60 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 | ............///.<summary>....... |
| 6e80 | 20 20 20 20 20 20 20 2f 2f 2f 20 54 6f 74 61 6c 20 73 69 7a 65 20 6f 66 20 6d 65 6d 6f 72 79 20 | .......///.Total.size.of.memory. |
| 6ea0 | 75 73 65 64 20 62 79 20 74 68 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | used.by.the.layout.............. |
| 6ec0 | 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f | .///.</summary>............../// |
| 6ee0 | 20 3c 76 61 6c 75 65 3e 53 69 7a 65 20 6f 66 20 6d 65 6d 6f 72 79 20 75 73 65 64 20 62 79 20 74 | .<value>Size.of.memory.used.by.t |
| 6f00 | 68 65 20 6c 61 79 6f 75 74 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | he.layout.</value>.............. |
| 6f20 | 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c | ///.<seealso.cref="InputControlL |
| 6f40 | 61 79 6f 75 74 2e 73 74 61 74 65 53 69 7a 65 49 6e 42 79 74 65 73 22 2f 3e 0d 0a 20 20 20 20 20 | ayout.stateSizeInBytes"/>....... |
| 6f60 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 73 74 61 74 65 53 69 7a 65 49 6e 42 79 74 | .......public.int.stateSizeInByt |
| 6f80 | 65 73 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | es.{.get;.set;.}................ |
| 6fa0 | 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 | ///.<summary>..............///.W |
| 6fc0 | 68 69 63 68 20 6c 61 79 6f 75 74 20 74 6f 20 62 61 73 65 20 74 68 69 73 20 6c 61 79 6f 75 74 20 | hich.layout.to.base.this.layout. |
| 6fe0 | 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d | on...............///.</summary>. |
| 7000 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 4e 61 6d 65 20 6f 66 20 | .............///.<value>Name.of. |
| 7020 | 62 61 73 65 20 6c 61 79 6f 75 74 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 | base.layout.</value>............ |
| 7040 | 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f | ..///.<seealso.cref="InputContro |
| 7060 | 6c 4c 61 79 6f 75 74 2e 62 61 73 65 4c 61 79 6f 75 74 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 | lLayout.baseLayouts"/>.......... |
| 7080 | 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 65 78 74 65 6e 64 73 4c 61 79 6f 75 74 20 | ....public.string.extendsLayout. |
| 70a0 | 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f | {.get;.set;.}................/// |
| 70c0 | 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 6f 72 20 | .<summary>..............///.For. |
| 70e0 | 64 65 76 69 63 65 20 6c 61 79 6f 75 74 73 2c 20 77 68 65 74 68 65 72 20 74 68 65 20 64 65 76 69 | device.layouts,.whether.the.devi |
| 7100 | 63 65 20 77 61 6e 74 73 20 61 6e 20 65 78 74 72 61 20 75 70 64 61 74 65 0d 0a 20 20 20 20 20 20 | ce.wants.an.extra.update........ |
| 7120 | 20 20 20 20 20 20 2f 2f 2f 20 62 65 66 6f 72 65 20 72 65 6e 64 65 72 69 6e 67 2e 0d 0a 20 20 20 | ......///.before.rendering...... |
| 7140 | 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 | .........///.</summary>......... |
| 7160 | 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 54 72 75 65 20 69 66 20 62 65 66 6f 72 65 2d 72 | .....///.<value>True.if.before-r |
| 7180 | 65 6e 64 65 72 20 75 70 64 61 74 65 73 20 73 68 6f 75 6c 64 20 62 65 20 65 6e 61 62 6c 65 64 20 | ender.updates.should.be.enabled. |
| 71a0 | 66 6f 72 20 74 68 65 20 64 65 76 69 63 65 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 | for.the.device.</value>......... |
| 71c0 | 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 44 65 76 | .....///.<seealso.cref="InputDev |
| 71e0 | 69 63 65 2e 75 70 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 22 2f 3e 0d 0a 20 20 20 20 20 | ice.updateBeforeRender"/>....... |
| 7200 | 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 | .......///.<seealso.cref="InputC |
| 7220 | 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 75 70 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 22 | ontrolLayout.updateBeforeRender" |
| 7240 | 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 3f 20 75 70 64 | />..............public.bool?.upd |
| 7260 | 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d | ateBeforeRender.{.get;.set;.}... |
| 7280 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 | .............///.<summary>...... |
| 72a0 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 6f 66 20 63 6f 6e 74 72 6f 6c 20 69 74 65 6d | ........///.List.of.control.item |
| 72c0 | 73 20 73 65 74 20 75 70 20 62 79 20 74 68 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 | s.set.up.by.the.layout.......... |
| 72e0 | 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .....///.</summary>............. |
| 7300 | 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 43 6f 6e 74 72 6f 6c 73 20 73 65 74 20 75 70 20 62 79 20 74 | .///.<value>Controls.set.up.by.t |
| 7320 | 68 65 20 6c 61 79 6f 75 74 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | he.layout.</value>.............. |
| 7340 | 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 41 64 64 43 6f 6e 74 72 6f 6c 22 2f 3e | ///.<seealso.cref="AddControl"/> |
| 7360 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 41 72 72 | ..............public.ReadOnlyArr |
| 7380 | 61 79 3c 43 6f 6e 74 72 6f 6c 49 74 65 6d 3e 20 63 6f 6e 74 72 6f 6c 73 20 3d 3e 20 6e 65 77 20 | ay<ControlItem>.controls.=>.new. |
| 73a0 | 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 43 6f 6e 74 72 6f 6c 49 74 65 6d 3e 28 6d 5f 43 6f 6e | ReadOnlyArray<ControlItem>(m_Con |
| 73c0 | 74 72 6f 6c 73 2c 20 30 2c 20 6d 5f 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 29 3b 0d 0a 0d 0a 20 20 | trols,.0,.m_ControlCount);...... |
| 73e0 | 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 6d 5f 43 6f 6e 74 72 6f 6c 43 | ..........private.int.m_ControlC |
| 7400 | 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 43 6f 6e 74 72 | ount;..............private.Contr |
| 7420 | 6f 6c 49 74 65 6d 5b 5d 20 6d 5f 43 6f 6e 74 72 6f 6c 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | olItem[].m_Controls;............ |
| 7440 | 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | ....///.<summary>............../ |
| 7460 | 2f 2f 20 53 79 6e 74 61 78 20 66 6f 72 20 63 6f 6e 66 69 67 75 72 69 6e 67 20 61 6e 20 69 6e 64 | //.Syntax.for.configuring.an.ind |
| 7480 | 69 76 69 64 75 61 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 43 6f 6e 74 72 6f 6c 49 74 65 6d 22 2f | ividual.<see.cref="ControlItem"/ |
| 74a0 | 3e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a | >...............///.</summary>.. |
| 74c0 | 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 75 63 74 20 43 6f 6e 74 72 6f | ............public.struct.Contro |
| 74e0 | 6c 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | lBuilder..............{......... |
| 7500 | 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 42 75 69 6c 64 65 72 20 62 75 69 6c 64 65 | .........internal.Builder.builde |
| 7520 | 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 69 6e 74 | r;..................internal.int |
| 7540 | 20 69 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | .index;....................publi |
| 7560 | 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 57 69 74 68 44 69 73 70 6c 61 79 4e 61 6d 65 | c.ControlBuilder.WithDisplayName |
| 7580 | 28 73 74 72 69 6e 67 20 64 69 73 70 6c 61 79 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | (string.displayName)............ |
| 75a0 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 | ......{......................bui |
| 75c0 | 6c 64 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 64 69 73 70 6c 61 79 4e 61 | lder.m_Controls[index].displayNa |
| 75e0 | 6d 65 20 3d 20 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | me.=.displayName;............... |
| 7600 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .......return.this;............. |
| 7620 | 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 | .....}....................public |
| 7640 | 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 57 69 74 68 4c 61 79 6f 75 74 28 73 74 72 69 6e | .ControlBuilder.WithLayout(strin |
| 7660 | 67 20 6c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 | g.layout)..................{.... |
| 7680 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e | ..................if.(string.IsN |
| 76a0 | 75 6c 6c 4f 72 45 6d 70 74 79 28 6c 61 79 6f 75 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ullOrEmpty(layout))............. |
| 76c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 | .............throw.new.ArgumentE |
| 76e0 | 78 63 65 70 74 69 6f 6e 28 22 4c 61 79 6f 75 74 20 6e 61 6d 65 20 63 61 6e 6e 6f 74 20 62 65 20 | xception("Layout.name.cannot.be. |
| 7700 | 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 22 2c 20 6e 61 6d 65 6f 66 28 6c 61 79 6f 75 74 29 29 3b | null.or.empty",.nameof(layout)); |
| 7720 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e | ........................builder. |
| 7740 | 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 6c 61 79 6f 75 74 20 3d 20 6e 65 77 20 49 | m_Controls[index].layout.=.new.I |
| 7760 | 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 6c 61 79 6f 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 | nternedString(layout);.......... |
| 7780 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 | ............return.this;........ |
| 77a0 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 | ..........}....................p |
| 77c0 | 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 57 69 74 68 46 6f 72 6d 61 74 28 | ublic.ControlBuilder.WithFormat( |
| 77e0 | 46 6f 75 72 43 43 20 66 6f 72 6d 61 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | FourCC.format).................. |
| 7800 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 6d | {......................builder.m |
| 7820 | 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 66 6f 72 6d 61 74 20 3d 20 66 6f 72 6d 61 74 | _Controls[index].format.=.format |
| 7840 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 | ;......................return.th |
| 7860 | 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 | is;..................}.......... |
| 7880 | 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 | ..........public.ControlBuilder. |
| 78a0 | 57 69 74 68 46 6f 72 6d 61 74 28 73 74 72 69 6e 67 20 66 6f 72 6d 61 74 29 0d 0a 20 20 20 20 20 | WithFormat(string.format)....... |
| 78c0 | 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...........{.................... |
| 78e0 | 20 20 72 65 74 75 72 6e 20 57 69 74 68 46 6f 72 6d 61 74 28 6e 65 77 20 46 6f 75 72 43 43 28 66 | ..return.WithFormat(new.FourCC(f |
| 7900 | 6f 72 6d 61 74 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | ormat));..................}..... |
| 7920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 | ...............public.ControlBui |
| 7940 | 6c 64 65 72 20 57 69 74 68 42 79 74 65 4f 66 66 73 65 74 28 75 69 6e 74 20 6f 66 66 73 65 74 29 | lder.WithByteOffset(uint.offset) |
| 7960 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..................{............. |
| 7980 | 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 | .........builder.m_Controls[inde |
| 79a0 | 78 5d 2e 6f 66 66 73 65 74 20 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | x].offset.=.offset;............. |
| 79c0 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 | .........return.this;........... |
| 79e0 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c | .......}....................publ |
| 7a00 | 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 57 69 74 68 42 69 74 4f 66 66 73 65 74 28 | ic.ControlBuilder.WithBitOffset( |
| 7a20 | 75 69 6e 74 20 62 69 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 | uint.bit)..................{.... |
| 7a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 | ..................builder.m_Cont |
| 7a60 | 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 62 69 74 20 3d 20 62 69 74 3b 0d 0a 20 20 20 20 20 20 20 20 | rols[index].bit.=.bit;.......... |
| 7a80 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 | ............return.this;........ |
| 7aa0 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 | ..........}....................p |
| 7ac0 | 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 49 73 53 79 6e 74 68 65 74 69 63 | ublic.ControlBuilder.IsSynthetic |
| 7ae0 | 28 62 6f 6f 6c 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | (bool.value)..................{. |
| 7b00 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 6d 5f 43 | .....................builder.m_C |
| 7b20 | 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 69 73 53 79 6e 74 68 65 74 69 63 20 3d 20 76 61 6c | ontrols[index].isSynthetic.=.val |
| 7b40 | 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | ue;......................return. |
| 7b60 | 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 | this;..................}........ |
| 7b80 | 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 | ............public.ControlBuilde |
| 7ba0 | 72 20 49 73 4e 6f 69 73 79 28 62 6f 6f 6c 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 | r.IsNoisy(bool.value)........... |
| 7bc0 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 | .......{......................bu |
| 7be0 | 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 69 73 4e 6f 69 73 79 20 | ilder.m_Controls[index].isNoisy. |
| 7c00 | 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | =.value;......................re |
| 7c20 | 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d | turn.this;..................}... |
| 7c40 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 | .................public.ControlB |
| 7c60 | 75 69 6c 64 65 72 20 57 69 74 68 53 69 7a 65 49 6e 42 69 74 73 28 75 69 6e 74 20 73 69 7a 65 49 | uilder.WithSizeInBits(uint.sizeI |
| 7c80 | 6e 42 69 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | nBits)..................{....... |
| 7ca0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c | ...............builder.m_Control |
| 7cc0 | 73 5b 69 6e 64 65 78 5d 2e 73 69 7a 65 49 6e 42 69 74 73 20 3d 20 73 69 7a 65 49 6e 42 69 74 73 | s[index].sizeInBits.=.sizeInBits |
| 7ce0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 | ;......................return.th |
| 7d00 | 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 | is;..................}.......... |
| 7d20 | 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 | ..........public.ControlBuilder. |
| 7d40 | 57 69 74 68 55 73 61 67 65 73 28 70 61 72 61 6d 73 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 | WithUsages(params.InternedString |
| 7d60 | 5b 5d 20 75 73 61 67 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | [].usages)..................{... |
| 7d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 75 73 61 67 65 73 20 3d 3d | ...................if.(usages.== |
| 7da0 | 20 6e 75 6c 6c 20 7c 7c 20 75 73 61 67 65 73 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 29 0d 0a 20 20 | .null.||.usages.Length.==.0).... |
| 7dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 | ......................return.thi |
| 7de0 | 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 | s;........................for.(v |
| 7e00 | 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 75 73 61 67 65 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 | ar.i.=.0;.i.<.usages.Length;.++i |
| 7e20 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 75 | )..........................if.(u |
| 7e40 | 73 61 67 65 73 5b 69 5d 2e 49 73 45 6d 70 74 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | sages[i].IsEmpty())............. |
| 7e60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d | .................throw.new.Argum |
| 7e80 | 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | entException(................... |
| 7ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 45 6d 70 74 79 20 75 73 61 67 65 20 65 6e 74 | ...............$"Empty.usage.ent |
| 7ec0 | 72 79 20 61 74 20 69 6e 64 65 78 20 7b 69 7d 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 20 27 7b 62 75 | ry.at.index.{i}.for.control.'{bu |
| 7ee0 | 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 6e 61 6d 65 7d 27 20 69 | ilder.m_Controls[index].name}'.i |
| 7f00 | 6e 20 6c 61 79 6f 75 74 20 27 7b 62 75 69 6c 64 65 72 2e 6e 61 6d 65 7d 27 22 2c 0d 0a 20 20 20 | n.layout.'{builder.name}'",..... |
| 7f20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d | .............................nam |
| 7f40 | 65 6f 66 28 75 73 61 67 65 73 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eof(usages));................... |
| 7f60 | 20 20 20 20 20 62 75 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 75 | .....builder.m_Controls[index].u |
| 7f80 | 73 61 67 65 73 20 3d 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 49 6e 74 65 72 6e | sages.=.new.ReadOnlyArray<Intern |
| 7fa0 | 65 64 53 74 72 69 6e 67 3e 28 75 73 61 67 65 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | edString>(usages);.............. |
| 7fc0 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ........return.this;............ |
| 7fe0 | 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | ......}....................publi |
| 8000 | 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 57 69 74 68 55 73 61 67 65 73 28 49 45 6e 75 | c.ControlBuilder.WithUsages(IEnu |
| 8020 | 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 75 73 61 67 65 73 29 0d 0a 20 20 20 20 20 20 20 | merable<string>.usages)......... |
| 8040 | 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .........{...................... |
| 8060 | 76 61 72 20 75 73 61 67 65 73 41 72 72 61 79 20 3d 20 75 73 61 67 65 73 2e 53 65 6c 65 63 74 28 | var.usagesArray.=.usages.Select( |
| 8080 | 78 20 3d 3e 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 78 29 29 2e 54 6f 41 72 | x.=>.new.InternedString(x)).ToAr |
| 80a0 | 72 61 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 | ray();......................retu |
| 80c0 | 72 6e 20 57 69 74 68 55 73 61 67 65 73 28 75 73 61 67 65 73 41 72 72 61 79 29 3b 0d 0a 20 20 20 | rn.WithUsages(usagesArray);..... |
| 80e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............}.................. |
| 8100 | 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 57 69 74 68 55 73 61 67 | ..public.ControlBuilder.WithUsag |
| 8120 | 65 73 28 70 61 72 61 6d 73 20 73 74 72 69 6e 67 5b 5d 20 75 73 61 67 65 73 29 0d 0a 20 20 20 20 | es(params.string[].usages)...... |
| 8140 | 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ............{................... |
| 8160 | 20 20 20 72 65 74 75 72 6e 20 57 69 74 68 55 73 61 67 65 73 28 28 49 45 6e 75 6d 65 72 61 62 6c | ...return.WithUsages((IEnumerabl |
| 8180 | 65 3c 73 74 72 69 6e 67 3e 29 75 73 61 67 65 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | e<string>)usages);.............. |
| 81a0 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | ....}....................public. |
| 81c0 | 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 57 69 74 68 50 61 72 61 6d 65 74 65 72 73 28 73 74 | ControlBuilder.WithParameters(st |
| 81e0 | 72 69 6e 67 20 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ring.parameters)................ |
| 8200 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 | ..{......................if.(str |
| 8220 | 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 70 61 72 61 6d 65 74 65 72 73 29 29 0d 0a | ing.IsNullOrEmpty(parameters)).. |
| 8240 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 | ........................return.t |
| 8260 | 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 61 | his;......................var.pa |
| 8280 | 72 73 65 64 20 3d 20 4e 61 6d 65 64 56 61 6c 75 65 2e 50 61 72 73 65 4d 75 6c 74 69 70 6c 65 28 | rsed.=.NamedValue.ParseMultiple( |
| 82a0 | 70 61 72 61 6d 65 74 65 72 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | parameters);.................... |
| 82c0 | 20 20 62 75 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 70 61 72 61 | ..builder.m_Controls[index].para |
| 82e0 | 6d 65 74 65 72 73 20 3d 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 4e 61 6d 65 64 | meters.=.new.ReadOnlyArray<Named |
| 8300 | 56 61 6c 75 65 3e 28 70 61 72 73 65 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Value>(parsed);................. |
| 8320 | 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .....return.this;............... |
| 8340 | 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 | ...}....................public.C |
| 8360 | 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 57 69 74 68 50 72 6f 63 65 73 73 6f 72 73 28 73 74 72 | ontrolBuilder.WithProcessors(str |
| 8380 | 69 6e 67 20 70 72 6f 63 65 73 73 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ing.processors)................. |
| 83a0 | 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 | .{......................if.(stri |
| 83c0 | 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 70 72 6f 63 65 73 73 6f 72 73 29 29 0d 0a 20 | ng.IsNullOrEmpty(processors))... |
| 83e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 | .......................return.th |
| 8400 | 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 61 72 | is;......................var.par |
| 8420 | 73 65 64 20 3d 20 4e 61 6d 65 41 6e 64 50 61 72 61 6d 65 74 65 72 73 2e 50 61 72 73 65 4d 75 6c | sed.=.NameAndParameters.ParseMul |
| 8440 | 74 69 70 6c 65 28 70 72 6f 63 65 73 73 6f 72 73 29 2e 54 6f 41 72 72 61 79 28 29 3b 0d 0a 20 20 | tiple(processors).ToArray();.... |
| 8460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 | ..................builder.m_Cont |
| 8480 | 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 70 72 6f 63 65 73 73 6f 72 73 20 3d 20 6e 65 77 20 52 65 61 | rols[index].processors.=.new.Rea |
| 84a0 | 64 4f 6e 6c 79 41 72 72 61 79 3c 4e 61 6d 65 41 6e 64 50 61 72 61 6d 65 74 65 72 73 3e 28 70 61 | dOnlyArray<NameAndParameters>(pa |
| 84c0 | 72 73 65 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 | rsed);......................retu |
| 84e0 | 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | rn.this;..................}..... |
| 8500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 | ...............public.ControlBui |
| 8520 | 6c 64 65 72 20 57 69 74 68 44 65 66 61 75 6c 74 53 74 61 74 65 28 50 72 69 6d 69 74 69 76 65 56 | lder.WithDefaultState(PrimitiveV |
| 8540 | 61 6c 75 65 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | alue.value)..................{.. |
| 8560 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 6d 5f 43 6f | ....................builder.m_Co |
| 8580 | 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 64 65 66 61 75 6c 74 53 74 61 74 65 20 3d 20 76 61 6c | ntrols[index].defaultState.=.val |
| 85a0 | 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | ue;......................return. |
| 85c0 | 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 | this;..................}........ |
| 85e0 | 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 | ............public.ControlBuilde |
| 8600 | 72 20 55 73 69 6e 67 53 74 61 74 65 46 72 6f 6d 28 73 74 72 69 6e 67 20 70 61 74 68 29 0d 0a 20 | r.UsingStateFrom(string.path)... |
| 8620 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............{................ |
| 8640 | 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 70 | ......if.(string.IsNullOrEmpty(p |
| 8660 | 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 | ath))..........................r |
| 8680 | 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eturn.this;..................... |
| 86a0 | 20 62 75 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 75 73 65 53 74 | .builder.m_Controls[index].useSt |
| 86c0 | 61 74 65 46 72 6f 6d 20 3d 20 70 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ateFrom.=.path;................. |
| 86e0 | 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .....return.this;............... |
| 8700 | 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 | ...}....................public.C |
| 8720 | 6f 6e 74 72 6f 6c 42 75 69 6c 64 65 72 20 41 73 41 72 72 61 79 4f 66 43 6f 6e 74 72 6f 6c 73 57 | ontrolBuilder.AsArrayOfControlsW |
| 8740 | 69 74 68 53 69 7a 65 28 69 6e 74 20 61 72 72 61 79 53 69 7a 65 29 0d 0a 20 20 20 20 20 20 20 20 | ithSize(int.arraySize).......... |
| 8760 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 | ........{......................b |
| 8780 | 75 69 6c 64 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 5b 69 6e 64 65 78 5d 2e 61 72 72 61 79 53 69 | uilder.m_Controls[index].arraySi |
| 87a0 | 7a 65 20 3d 20 61 72 72 61 79 53 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ze.=.arraySize;................. |
| 87c0 | 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .....return.this;............... |
| 87e0 | 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | ...}..............}............. |
| 8800 | 20 20 20 2f 2f 20 54 68 69 73 20 69 6e 76 61 6c 69 64 61 74 65 73 20 74 68 65 20 43 6f 6e 74 72 | ...//.This.invalidates.the.Contr |
| 8820 | 6f 6c 42 75 69 6c 64 65 72 73 20 66 72 6f 6d 20 70 72 65 76 69 6f 75 73 20 63 61 6c 6c 73 21 20 | olBuilders.from.previous.calls!. |
| 8840 | 28 6f 75 72 20 61 72 72 61 79 20 6d 61 79 20 6d 6f 76 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | (our.array.may.move)............ |
| 8860 | 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f | ..///.<summary>............../// |
| 8880 | 20 41 64 64 20 61 20 6e 65 77 20 63 6f 6e 74 72 6f 6c 20 74 6f 20 74 68 65 20 6c 61 79 6f 75 74 | .Add.a.new.control.to.the.layout |
| 88a0 | 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 | ...............///.</summary>... |
| 88c0 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6e 61 6d 65 | ...........///.<param.name="name |
| 88e0 | 22 3e 4e 61 6d 65 20 6f 72 20 70 61 74 68 20 6f 66 20 74 68 65 20 63 6f 6e 74 72 6f 6c 2e 20 49 | ">Name.or.path.of.the.control..I |
| 8900 | 66 20 69 74 20 69 73 20 61 20 70 61 74 68 20 28 65 2e 67 2e 20 3c 63 3e 22 6c 65 66 74 53 74 69 | f.it.is.a.path.(e.g..<c>"leftSti |
| 8920 | 63 6b 2f 78 22 3c 2f 63 3e 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 6e | ck/x"</c>,..............///.then |
| 8940 | 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 65 69 74 68 65 72 20 6d 6f 64 69 66 69 65 73 20 74 68 65 | .the.control.either.modifies.the |
| 8960 | 20 73 65 74 75 70 20 6f 66 20 61 20 63 68 69 6c 64 20 63 6f 6e 74 72 6f 6c 20 6f 66 20 61 6e 6f | .setup.of.a.child.control.of.ano |
| 8980 | 74 68 65 72 20 63 6f 6e 74 72 6f 6c 20 69 6e 20 74 68 65 20 6c 61 79 6f 75 74 0d 0a 20 20 20 20 | ther.control.in.the.layout...... |
| 89a0 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 72 20 61 64 64 73 20 61 20 6e 65 77 20 63 68 69 6c 64 20 | ........///.or.adds.a.new.child. |
| 89c0 | 63 6f 6e 74 72 6f 6c 20 74 6f 20 61 6e 6f 74 68 65 72 20 63 6f 6e 74 72 6f 6c 20 69 6e 20 74 68 | control.to.another.control.in.th |
| 89e0 | 65 20 6c 61 79 6f 75 74 2e 20 4d 6f 64 69 66 79 69 6e 67 20 63 68 69 6c 64 20 63 6f 6e 74 72 6f | e.layout..Modifying.child.contro |
| 8a00 | 6c 20 69 73 20 75 73 65 66 75 6c 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 6f | l.is.useful,..............///.fo |
| 8a20 | 72 20 65 78 61 6d 70 6c 65 2c 20 74 6f 20 61 6c 74 65 72 20 74 68 65 20 73 74 61 74 65 20 66 6f | r.example,.to.alter.the.state.fo |
| 8a40 | 72 6d 61 74 20 6f 66 20 63 6f 6e 74 72 6f 6c 73 20 63 6f 6d 69 6e 67 20 66 72 6f 6d 20 74 68 65 | rmat.of.controls.coming.from.the |
| 8a60 | 20 62 61 73 65 20 6c 61 79 6f 75 74 2e 20 4c 69 6b 65 77 69 73 65 2c 0d 0a 20 20 20 20 20 20 20 | .base.layout..Likewise,......... |
| 8a80 | 20 20 20 20 20 2f 2f 2f 20 61 64 64 69 6e 67 20 63 68 69 6c 64 20 63 6f 6e 74 72 6f 6c 73 20 74 | .....///.adding.child.controls.t |
| 8aa0 | 6f 20 61 6e 6f 74 68 65 72 20 63 6f 6e 74 72 6f 6c 20 69 73 20 75 73 65 66 75 6c 20 74 6f 20 6d | o.another.control.is.useful.to.m |
| 8ac0 | 6f 64 69 66 79 20 74 68 65 20 73 65 74 75 70 20 6f 66 20 6f 66 20 74 68 65 20 63 6f 6e 74 72 6f | odify.the.setup.of.of.the.contro |
| 8ae0 | 6c 20 6c 61 79 6f 75 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 62 65 69 6e 67 20 | l.layout..............///.being. |
| 8b00 | 75 73 65 64 20 77 69 74 68 6f 75 74 20 68 61 76 69 6e 67 20 74 6f 20 63 72 65 61 74 65 20 61 6e | used.without.having.to.create.an |
| 8b20 | 64 20 72 65 67 69 73 74 65 72 20 61 20 63 75 73 74 6f 6d 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f | d.register.a.custom.control.layo |
| 8b40 | 75 74 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 | ut.</param>..............///.<re |
| 8b60 | 74 75 72 6e 73 3e 41 20 63 6f 6e 74 72 6f 6c 20 62 75 69 6c 64 65 72 20 74 68 61 74 20 70 65 72 | turns>A.control.builder.that.per |
| 8b80 | 6d 69 74 73 20 73 65 74 74 69 6e 67 20 76 61 72 69 6f 75 73 20 70 61 72 61 6d 65 74 65 72 73 20 | mits.setting.various.parameters. |
| 8ba0 | 6f 6e 20 74 68 65 20 63 6f 6e 74 72 6f 6c 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 | on.the.control.</returns>....... |
| 8bc0 | 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 | .......///.<exception.cref="Argu |
| 8be0 | 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 6e | mentException"><paramref.name="n |
| 8c00 | 61 6d 65 22 2f 3e 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 2e 3c 2f 65 78 63 65 70 74 | ame"/>.is.null.or.empty.</except |
| 8c20 | 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c | ion>..............public.Control |
| 8c40 | 42 75 69 6c 64 65 72 20 41 64 64 43 6f 6e 74 72 6f 6c 28 73 74 72 69 6e 67 20 6e 61 6d 65 29 0d | Builder.AddControl(string.name). |
| 8c60 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| 8c80 | 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 29 29 0d | if.(string.IsNullOrEmpty(name)). |
| 8ca0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 | .....................throw.new.A |
| 8cc0 | 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 | rgumentException(name);......... |
| 8ce0 | 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 20 3d 20 41 72 72 61 79 48 65 6c 70 | ...........var.index.=.ArrayHelp |
| 8d00 | 65 72 73 2e 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 6d 5f 43 6f 6e | ers.AppendWithCapacity(ref.m_Con |
| 8d20 | 74 72 6f 6c 73 2c 20 72 65 66 20 6d 5f 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 2c 0d 0a 20 20 20 20 | trols,.ref.m_ControlCount,...... |
| 8d40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 0d | ................new.ControlItem. |
| 8d60 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | .....................{.......... |
| 8d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 20 3d 20 6e 65 77 20 49 6e 74 65 72 | ................name.=.new.Inter |
| 8da0 | 6e 65 64 53 74 72 69 6e 67 28 6e 61 6d 65 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | nedString(name),................ |
| 8dc0 | 20 20 20 20 20 20 20 20 20 20 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e | ..........isModifyingExistingCon |
| 8de0 | 74 72 6f 6c 20 3d 20 6e 61 6d 65 2e 49 6e 64 65 78 4f 66 28 27 2f 27 29 20 21 3d 20 2d 31 2c 0d | trol.=.name.IndexOf('/').!=.-1,. |
| 8e00 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 66 66 73 65 74 20 | .........................offset. |
| 8e20 | 3d 20 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 2c | =.InputStateBlock.InvalidOffset, |
| 8e40 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 74 20 3d 20 | ..........................bit.=. |
| 8e60 | 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 0d 0a 20 | InputStateBlock.InvalidOffset... |
| 8e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 | ...................});.......... |
| 8ea0 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 42 75 69 6c | ..........return.new.ControlBuil |
| 8ec0 | 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | der..................{.......... |
| 8ee0 | 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 20 3d 20 74 68 69 73 2c 0d 0a 20 20 20 | ............builder.=.this,..... |
| 8f00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 64 65 78 20 3d 20 69 6e 64 65 78 0d 0a | .................index.=.index.. |
| 8f20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ................};.............. |
| 8f40 | 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 42 75 69 6c 64 65 72 20 | }................public.Builder. |
| 8f60 | 57 69 74 68 4e 61 6d 65 28 73 74 72 69 6e 67 20 6e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 | WithName(string.name)........... |
| 8f80 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 6e 61 6d 65 20 | ...{..................this.name. |
| 8fa0 | 3d 20 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | =.name;..................return. |
| 8fc0 | 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | this;..............}............ |
| 8fe0 | 20 20 20 20 70 75 62 6c 69 63 20 42 75 69 6c 64 65 72 20 57 69 74 68 44 69 73 70 6c 61 79 4e 61 | ....public.Builder.WithDisplayNa |
| 9000 | 6d 65 28 73 74 72 69 6e 67 20 64 69 73 70 6c 61 79 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 | me(string.displayName).......... |
| 9020 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 64 69 73 70 | ....{..................this.disp |
| 9040 | 6c 61 79 4e 61 6d 65 20 3d 20 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 | layName.=.displayName;.......... |
| 9060 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ........return.this;............ |
| 9080 | 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 42 75 69 6c 64 65 | ..}................public.Builde |
| 90a0 | 72 20 57 69 74 68 54 79 70 65 3c 54 3e 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | r.WithType<T>()................. |
| 90c0 | 20 77 68 65 72 65 20 54 20 3a 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 20 | .where.T.:.InputControl......... |
| 90e0 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 20 74 | .....{..................type.=.t |
| 9100 | 79 70 65 6f 66 28 54 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | ypeof(T);..................retur |
| 9120 | 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 | n.this;..............}.......... |
| 9140 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 42 75 69 6c 64 65 72 20 57 69 74 68 46 6f 72 6d 61 74 28 | ......public.Builder.WithFormat( |
| 9160 | 46 6f 75 72 43 43 20 66 6f 72 6d 61 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | FourCC.format)..............{... |
| 9180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 61 74 65 46 6f 72 6d 61 74 20 3d 20 66 6f 72 | ...............stateFormat.=.for |
| 91a0 | 6d 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 | mat;..................return.thi |
| 91c0 | 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | s;..............}............... |
| 91e0 | 20 70 75 62 6c 69 63 20 42 75 69 6c 64 65 72 20 57 69 74 68 46 6f 72 6d 61 74 28 73 74 72 69 6e | .public.Builder.WithFormat(strin |
| 9200 | 67 20 66 6f 72 6d 61 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | g.format)..............{........ |
| 9220 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 57 69 74 68 46 6f 72 6d 61 74 28 6e 65 77 20 | ..........return.WithFormat(new. |
| 9240 | 46 6f 75 72 43 43 28 66 6f 72 6d 61 74 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | FourCC(format));..............}. |
| 9260 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 42 75 69 6c 64 65 72 20 57 69 | ...............public.Builder.Wi |
| 9280 | 74 68 53 69 7a 65 49 6e 42 79 74 65 73 28 69 6e 74 20 73 69 7a 65 49 6e 42 79 74 65 73 29 0d 0a | thSizeInBytes(int.sizeInBytes).. |
| 92a0 | 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 | ............{..................s |
| 92c0 | 74 61 74 65 53 69 7a 65 49 6e 42 79 74 65 73 20 3d 20 73 69 7a 65 49 6e 42 79 74 65 73 3b 0d 0a | tateSizeInBytes.=.sizeInBytes;.. |
| 92e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 | ................return.this;.... |
| 9300 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | ..........}................publi |
| 9320 | 63 20 42 75 69 6c 64 65 72 20 45 78 74 65 6e 64 28 73 74 72 69 6e 67 20 62 61 73 65 4c 61 79 6f | c.Builder.Extend(string.baseLayo |
| 9340 | 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | utName)..............{.......... |
| 9360 | 20 20 20 20 20 20 20 20 65 78 74 65 6e 64 73 4c 61 79 6f 75 74 20 3d 20 62 61 73 65 4c 61 79 6f | ........extendsLayout.=.baseLayo |
| 9380 | 75 74 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | utName;..................return. |
| 93a0 | 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | this;..............}............ |
| 93c0 | 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 42 75 | ....public.InputControlLayout.Bu |
| 93e0 | 69 6c 64 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ild()..............{............ |
| 9400 | 20 20 20 20 20 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 5b 5d 20 63 6f 6e 74 72 6f 6c 73 20 3d 20 6e | ......ControlItem[].controls.=.n |
| 9420 | 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 6f 6e 74 | ull;..................if.(m_Cont |
| 9440 | 72 6f 6c 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | rolCount.>.0)..................{ |
| 9460 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 20 3d | ......................controls.= |
| 9480 | 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 5b 6d 5f 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 5d | .new.ControlItem[m_ControlCount] |
| 94a0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 2e 43 6f 70 | ;......................Array.Cop |
| 94c0 | 79 28 6d 5f 43 6f 6e 74 72 6f 6c 73 2c 20 63 6f 6e 74 72 6f 6c 73 2c 20 6d 5f 43 6f 6e 74 72 6f | y(m_Controls,.controls,.m_Contro |
| 94e0 | 6c 43 6f 75 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | lCount);..................}..... |
| 9500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 6c 6c 6f 77 20 6c 61 79 6f 75 74 20 74 | ...............//.Allow.layout.t |
| 9520 | 6f 20 62 65 20 75 6e 6e 61 6d 65 64 2e 20 54 68 65 20 73 79 73 74 65 6d 20 77 69 6c 6c 20 61 75 | o.be.unnamed..The.system.will.au |
| 9540 | 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 65 74 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | tomatically.set.the............. |
| 9560 | 20 20 20 20 20 2f 2f 20 6e 61 6d 65 20 74 68 61 74 20 74 68 65 20 6c 61 79 6f 75 74 20 68 61 73 | .....//.name.that.the.layout.has |
| 9580 | 20 62 65 65 6e 20 72 65 67 69 73 74 65 72 65 64 20 75 6e 64 65 72 2e 0d 0a 20 20 20 20 20 20 20 | .been.registered.under.......... |
| 95a0 | 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 0d 0a 20 20 20 20 20 20 20 20 20 | .........var.layout.=........... |
| 95c0 | 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 | ...........new.InputControlLayou |
| 95e0 | 74 28 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 6e 61 6d 65 29 2c 0d 0a 20 20 20 | t(new.InternedString(name),..... |
| 9600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 3d 20 6e 75 6c | .....................type.==.nul |
| 9620 | 6c 20 26 26 20 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 65 78 74 65 6e 64 | l.&&.string.IsNullOrEmpty(extend |
| 9640 | 73 4c 61 79 6f 75 74 29 20 3f 20 74 79 70 65 6f 66 28 49 6e 70 75 74 44 65 76 69 63 65 29 20 3a | sLayout).?.typeof(InputDevice).: |
| 9660 | 20 74 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | .type)..................{....... |
| 9680 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 44 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 64 | ...............m_DisplayName.=.d |
| 96a0 | 69 73 70 6c 61 79 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | isplayName,..................... |
| 96c0 | 20 6d 5f 53 74 61 74 65 46 6f 72 6d 61 74 20 3d 20 73 74 61 74 65 46 6f 72 6d 61 74 2c 0d 0a 20 | .m_StateFormat.=.stateFormat,... |
| 96e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 74 61 74 65 53 69 7a 65 49 6e | ...................m_StateSizeIn |
| 9700 | 42 79 74 65 73 20 3d 20 73 74 61 74 65 53 69 7a 65 49 6e 42 79 74 65 73 2c 0d 0a 20 20 20 20 20 | Bytes.=.stateSizeInBytes,....... |
| 9720 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 42 61 73 65 4c 61 79 6f 75 74 73 20 3d 20 6e | ...............m_BaseLayouts.=.n |
| 9740 | 65 77 20 49 6e 6c 69 6e 65 64 41 72 72 61 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 | ew.InlinedArray<InternedString>( |
| 9760 | 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 65 78 74 65 6e 64 73 4c 61 79 6f 75 74 | new.InternedString(extendsLayout |
| 9780 | 29 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 6f 6e 74 72 | )),......................m_Contr |
| 97a0 | 6f 6c 73 20 3d 20 63 6f 6e 74 72 6f 6c 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ols.=.controls,................. |
| 97c0 | 20 20 20 20 20 6d 5f 55 70 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 20 3d 20 75 70 64 61 | .....m_UpdateBeforeRender.=.upda |
| 97e0 | 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | teBeforeRender.................. |
| 9800 | 7d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 | };....................return.lay |
| 9820 | 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a | out;..............}..........}.. |
| 9840 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 55 73 65 73 20 72 65 66 6c 65 63 74 69 6f 6e 20 74 6f 20 | ..........//.Uses.reflection.to. |
| 9860 | 63 6f 6e 73 74 72 75 63 74 20 61 20 6c 61 79 6f 75 74 20 66 72 6f 6d 20 74 68 65 20 67 69 76 65 | construct.a.layout.from.the.give |
| 9880 | 6e 20 74 79 70 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 43 61 6e 20 62 65 20 75 73 65 64 20 | n.type...........//.Can.be.used. |
| 98a0 | 77 69 74 68 20 62 6f 74 68 20 63 6f 6e 74 72 6f 6c 20 63 6c 61 73 73 65 73 20 61 6e 64 20 73 74 | with.both.control.classes.and.st |
| 98c0 | 61 74 65 20 73 74 72 75 63 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 | ate.structs...........public.sta |
| 98e0 | 74 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 46 72 6f 6d 54 79 70 65 28 | tic.InputControlLayout.FromType( |
| 9900 | 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 54 79 70 65 20 74 79 70 65 29 0d 0a 20 20 20 20 20 20 20 | string.name,.Type.type)......... |
| 9920 | 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 | .{..............var.controlLayou |
| 9940 | 74 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 43 6f 6e 74 72 6f 6c 49 74 65 6d 3e 28 29 3b 0d 0a 20 | ts.=.new.List<ControlItem>();... |
| 9960 | 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 20 3d | ...........var.layoutAttribute.= |
| 9980 | 20 74 79 70 65 2e 47 65 74 43 75 73 74 6f 6d 41 74 74 72 69 62 75 74 65 3c 49 6e 70 75 74 43 6f | .type.GetCustomAttribute<InputCo |
| 99a0 | 6e 74 72 6f 6c 4c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 3e 28 74 72 75 65 29 3b 0d 0a 0d 0a | ntrolLayoutAttribute>(true);.... |
| 99c0 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 72 65 27 73 20 61 6e 20 49 6e 70 | ............//.If.there's.an.Inp |
| 99e0 | 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 20 6f 6e 20 74 68 65 20 | utControlLayoutAttribute.on.the. |
| 9a00 | 74 79 70 65 20 74 68 61 74 20 68 61 73 20 27 73 74 61 74 65 54 79 70 65 27 20 73 65 74 2c 0d 0a | type.that.has.'stateType'.set,.. |
| 9a20 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 64 64 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 | ............//.add.control.layou |
| 9a40 | 74 73 20 66 72 6f 6d 20 69 74 73 20 73 74 61 74 65 20 28 69 66 20 70 72 65 73 65 6e 74 29 20 69 | ts.from.its.state.(if.present).i |
| 9a60 | 6e 73 74 65 61 64 20 6f 66 20 66 72 6f 6d 20 74 68 65 20 74 79 70 65 2e 0d 0a 20 20 20 20 20 20 | nstead.of.from.the.type......... |
| 9a80 | 20 20 20 20 20 20 76 61 72 20 73 74 61 74 65 46 6f 72 6d 61 74 20 3d 20 6e 65 77 20 46 6f 75 72 | ......var.stateFormat.=.new.Four |
| 9aa0 | 43 43 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 41 74 74 | CC();..............if.(layoutAtt |
| 9ac0 | 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 6c 61 79 6f 75 74 41 74 74 72 69 62 75 74 | ribute.!=.null.&&.layoutAttribut |
| 9ae0 | 65 2e 73 74 61 74 65 54 79 70 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | e.stateType.!=.null)............ |
| 9b00 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 43 6f 6e 74 72 6f 6c 49 | ..{..................AddControlI |
| 9b20 | 74 65 6d 73 28 6c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 2e 73 74 61 74 65 54 79 70 65 2c 20 | tems(layoutAttribute.stateType,. |
| 9b40 | 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2c 20 6e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 | controlLayouts,.name);.......... |
| 9b60 | 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 65 74 20 73 74 61 74 65 20 74 79 70 65 20 63 6f 64 65 | ..........//.Get.state.type.code |
| 9b80 | 20 66 72 6f 6d 20 73 74 61 74 65 20 73 74 72 75 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .from.state.struct.............. |
| 9ba0 | 20 20 20 20 20 69 66 20 28 74 79 70 65 6f 66 28 49 49 6e 70 75 74 53 74 61 74 65 54 79 70 65 49 | .....if.(typeof(IInputStateTypeI |
| 9bc0 | 6e 66 6f 29 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 6c 61 79 6f 75 74 41 74 74 72 | nfo).IsAssignableFrom(layoutAttr |
| 9be0 | 69 62 75 74 65 2e 73 74 61 74 65 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ibute.stateType))............... |
| 9c00 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 61 74 65 46 | ...{......................stateF |
| 9c20 | 6f 72 6d 61 74 20 3d 20 28 28 49 49 6e 70 75 74 53 74 61 74 65 54 79 70 65 49 6e 66 6f 29 41 63 | ormat.=.((IInputStateTypeInfo)Ac |
| 9c40 | 74 69 76 61 74 6f 72 2e 43 72 65 61 74 65 49 6e 73 74 61 6e 63 65 28 6c 61 79 6f 75 74 41 74 74 | tivator.CreateInstance(layoutAtt |
| 9c60 | 72 69 62 75 74 65 2e 73 74 61 74 65 54 79 70 65 29 29 2e 66 6f 72 6d 61 74 3b 0d 0a 20 20 20 20 | ribute.stateType)).format;...... |
| 9c80 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 | ............}..............}.... |
| 9ca0 | 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | ..........else..............{... |
| 9cc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 63 6f 6e 74 72 6f 6c 20 6c 61 | ...............//.Add.control.la |
| 9ce0 | 79 6f 75 74 73 20 66 72 6f 6d 20 74 79 70 65 20 63 6f 6e 74 65 6e 74 73 2e 0d 0a 20 20 20 20 20 | youts.from.type.contents........ |
| 9d00 | 20 20 20 20 20 20 20 20 20 20 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 28 74 79 70 65 2c | ...........AddControlItems(type, |
| 9d20 | 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2c 20 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 | .controlLayouts,.name);......... |
| 9d40 | 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 | .....}................if.(layout |
| 9d60 | 41 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 21 73 74 72 69 6e 67 2e 49 73 4e | Attribute.!=.null.&&.!string.IsN |
| 9d80 | 75 6c 6c 4f 72 45 6d 70 74 79 28 6c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 2e 73 74 61 74 65 | ullOrEmpty(layoutAttribute.state |
| 9da0 | 46 6f 72 6d 61 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 61 74 65 46 | Format))..................stateF |
| 9dc0 | 6f 72 6d 61 74 20 3d 20 6e 65 77 20 46 6f 75 72 43 43 28 6c 61 79 6f 75 74 41 74 74 72 69 62 75 | ormat.=.new.FourCC(layoutAttribu |
| 9de0 | 74 65 2e 73 74 61 74 65 46 6f 72 6d 61 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | te.stateFormat);................ |
| 9e00 | 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 76 61 72 69 61 6e 74 73 20 28 69 66 20 61 6e 79 29 2e 0d | //.Determine.variants.(if.any).. |
| 9e20 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 76 61 72 69 61 6e 74 73 20 3d 20 6e 65 77 20 | .............var.variants.=.new. |
| 9e40 | 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 | InternedString();..............i |
| 9e60 | 66 20 28 6c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 | f.(layoutAttribute.!=.null)..... |
| 9e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 69 61 6e 74 73 20 3d 20 6e 65 77 20 49 6e 74 65 | .............variants.=.new.Inte |
| 9ea0 | 72 6e 65 64 53 74 72 69 6e 67 28 6c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 2e 76 61 72 69 61 | rnedString(layoutAttribute.varia |
| 9ec0 | 6e 74 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 6d | nts);................////TODO:.m |
| 9ee0 | 61 6b 65 20 73 75 72 65 20 61 6c 6c 20 75 73 61 67 65 73 20 61 72 65 20 75 6e 69 71 75 65 20 28 | ake.sure.all.usages.are.unique.( |
| 9f00 | 70 72 6f 62 61 62 6c 79 20 77 61 6e 74 20 74 6f 20 68 61 76 65 20 61 20 63 68 65 63 6b 20 6d 65 | probably.want.to.have.a.check.me |
| 9f20 | 74 68 6f 64 20 74 68 61 74 20 77 65 20 63 61 6e 20 72 75 6e 20 6f 6e 20 6a 73 6f 6e 20 6c 61 79 | thod.that.we.can.run.on.json.lay |
| 9f40 | 6f 75 74 73 20 61 73 20 77 65 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 | outs.as.well)..............////T |
| 9f60 | 4f 44 4f 3a 20 6d 61 6b 65 20 73 75 72 65 20 61 6c 6c 20 70 61 74 68 73 20 61 72 65 20 75 6e 69 | ODO:.make.sure.all.paths.are.uni |
| 9f80 | 71 75 65 20 28 6f 6e 6c 79 20 72 65 6c 65 76 61 6e 74 20 66 6f 72 20 4a 53 4f 4e 20 6c 61 79 6f | que.(only.relevant.for.JSON.layo |
| 9fa0 | 75 74 73 3f 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 72 65 61 74 65 20 6c | uts?)................//.Create.l |
| 9fc0 | 61 79 6f 75 74 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c | ayout.object...............var.l |
| 9fe0 | 61 79 6f 75 74 20 3d 20 6e 65 77 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 28 6e | ayout.=.new.InputControlLayout(n |
| a000 | 61 6d 65 2c 20 74 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | ame,.type)..............{....... |
| a020 | 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 6f 6e 74 72 6f 6c 73 20 3d 20 63 6f 6e 74 72 6f 6c 4c | ...........m_Controls.=.controlL |
| a040 | 61 79 6f 75 74 73 2e 54 6f 41 72 72 61 79 28 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ayouts.ToArray(),............... |
| a060 | 20 20 20 6d 5f 53 74 61 74 65 46 6f 72 6d 61 74 20 3d 20 73 74 61 74 65 46 6f 72 6d 61 74 2c 0d | ...m_StateFormat.=.stateFormat,. |
| a080 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 56 61 72 69 61 6e 74 73 20 3d 20 76 61 | .................m_Variants.=.va |
| a0a0 | 72 69 61 6e 74 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 55 70 64 61 74 | riants,..................m_Updat |
| a0c0 | 65 42 65 66 6f 72 65 52 65 6e 64 65 72 20 3d 20 6c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 3f | eBeforeRender.=.layoutAttribute? |
| a0e0 | 2e 75 70 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 49 6e 74 65 72 6e 61 6c 2c 0d 0a 20 20 | .updateBeforeRenderInternal,.... |
| a100 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 | ..............isGenericTypeOfDev |
| a120 | 69 63 65 20 3d 20 6c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 3f 2e 69 73 47 65 6e 65 72 69 63 | ice.=.layoutAttribute?.isGeneric |
| a140 | 54 79 70 65 4f 66 44 65 76 69 63 65 20 3f 3f 20 66 61 6c 73 65 2c 0d 0a 20 20 20 20 20 20 20 20 | TypeOfDevice.??.false,.......... |
| a160 | 20 20 20 20 20 20 20 20 68 69 64 65 49 6e 55 49 20 3d 20 6c 61 79 6f 75 74 41 74 74 72 69 62 75 | ........hideInUI.=.layoutAttribu |
| a180 | 74 65 3f 2e 68 69 64 65 49 6e 55 49 20 3f 3f 20 66 61 6c 73 65 2c 0d 0a 20 20 20 20 20 20 20 20 | te?.hideInUI.??.false,.......... |
| a1a0 | 20 20 20 20 20 20 20 20 6d 5f 44 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 6c 61 79 6f 75 74 41 74 | ........m_Description.=.layoutAt |
| a1c0 | 74 72 69 62 75 74 65 3f 2e 64 65 73 63 72 69 70 74 69 6f 6e 2c 0d 0a 20 20 20 20 20 20 20 20 20 | tribute?.description,........... |
| a1e0 | 20 20 20 20 20 20 20 6d 5f 44 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 6c 61 79 6f 75 74 41 74 74 | .......m_DisplayName.=.layoutAtt |
| a200 | 72 69 62 75 74 65 3f 2e 64 69 73 70 6c 61 79 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 | ribute?.displayName,............ |
| a220 | 20 20 7d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 41 74 | ..};................if.(layoutAt |
| a240 | 74 72 69 62 75 74 65 3f 2e 63 6f 6d 6d 6f 6e 55 73 61 67 65 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a | tribute?.commonUsages.!=.null).. |
| a260 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 6d 5f 43 6f 6d 6d 6f 6e 55 | ................layout.m_CommonU |
| a280 | 73 61 67 65 73 20 3d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 | sages.=......................Arr |
| a2a0 | 61 79 48 65 6c 70 65 72 73 2e 53 65 6c 65 63 74 28 6c 61 79 6f 75 74 41 74 74 72 69 62 75 74 65 | ayHelpers.Select(layoutAttribute |
| a2c0 | 2e 63 6f 6d 6d 6f 6e 55 73 61 67 65 73 2c 20 78 20 3d 3e 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 | .commonUsages,.x.=>.new.Interned |
| a2e0 | 53 74 72 69 6e 67 28 78 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | String(x));................retur |
| a300 | 6e 20 6c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | n.layout;..........}............ |
| a320 | 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 54 6f 4a 73 6f 6e 28 29 0d 0a 20 20 20 20 20 20 20 20 | public.string.ToJson().......... |
| a340 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 20 4c 61 79 6f | {..............var.layout.=.Layo |
| a360 | 75 74 4a 73 6f 6e 2e 46 72 6f 6d 4c 61 79 6f 75 74 28 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 | utJson.FromLayout(this);........ |
| a380 | 20 20 20 20 20 20 72 65 74 75 72 6e 20 4a 73 6f 6e 55 74 69 6c 69 74 79 2e 54 6f 4a 73 6f 6e 28 | ......return.JsonUtility.ToJson( |
| a3a0 | 6c 61 79 6f 75 74 2c 20 74 72 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 | layout,.true);..........}....... |
| a3c0 | 20 20 20 20 20 2f 2f 20 43 6f 6e 73 74 72 75 63 74 73 20 61 20 6c 61 79 6f 75 74 20 66 72 6f 6d | .....//.Constructs.a.layout.from |
| a3e0 | 20 74 68 65 20 67 69 76 65 6e 20 4a 53 4f 4e 20 73 6f 75 72 63 65 2e 0d 0a 20 20 20 20 20 20 20 | .the.given.JSON.source.......... |
| a400 | 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 | .public.static.InputControlLayou |
| a420 | 74 20 46 72 6f 6d 4a 73 6f 6e 28 73 74 72 69 6e 67 20 6a 73 6f 6e 29 0d 0a 20 20 20 20 20 20 20 | t.FromJson(string.json)......... |
| a440 | 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 4a 73 6f 6e 20 3d | .{..............var.layoutJson.= |
| a460 | 20 4a 73 6f 6e 55 74 69 6c 69 74 79 2e 46 72 6f 6d 4a 73 6f 6e 3c 4c 61 79 6f 75 74 4a 73 6f 6e | .JsonUtility.FromJson<LayoutJson |
| a480 | 3e 28 6a 73 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 | >(json);..............return.lay |
| a4a0 | 6f 75 74 4a 73 6f 6e 2e 54 6f 4c 61 79 6f 75 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a | outJson.ToLayout();..........}.. |
| a4c0 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 73 68 6f 75 6c 64 6e 27 74 20 | ..........////REVIEW:.shouldn't. |
| a4e0 | 73 74 61 74 65 20 62 65 20 73 70 6c 69 74 20 62 65 74 77 65 65 6e 20 69 6e 70 75 74 20 61 6e 64 | state.be.split.between.input.and |
| a500 | 20 6f 75 74 70 75 74 3f 20 68 6f 77 20 64 6f 65 73 20 6f 75 74 70 75 74 20 66 69 74 20 69 6e 74 | .output?.how.does.output.fit.int |
| a520 | 6f 20 74 68 65 20 6c 61 79 6f 75 74 20 70 69 63 74 75 72 65 20 69 6e 20 67 65 6e 65 72 61 6c 3f | o.the.layout.picture.in.general? |
| a540 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 73 68 6f 75 6c 64 20 74 68 65 | ..........////........should.the |
| a560 | 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 20 61 6c 6f 6e 65 20 64 65 74 65 72 6d 69 6e 65 20 | .control.layout.alone.determine. |
| a580 | 74 68 65 20 64 69 72 65 63 74 69 6f 6e 20 74 68 69 6e 67 73 20 61 72 65 20 67 6f 69 6e 67 20 69 | the.direction.things.are.going.i |
| a5a0 | 6e 3f 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 74 65 72 6e 65 64 53 74 | n?............private.InternedSt |
| a5c0 | 72 69 6e 67 20 6d 5f 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 54 79 | ring.m_Name;..........private.Ty |
| a5e0 | 70 65 20 6d 5f 54 79 70 65 3b 20 2f 2f 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e 20 63 68 61 69 | pe.m_Type;.//.For.extension.chai |
| a600 | 6e 73 2c 20 77 65 20 63 61 6e 20 6f 6e 6c 79 20 64 69 73 63 6f 76 65 72 20 74 79 70 65 73 20 61 | ns,.we.can.only.discover.types.a |
| a620 | 66 74 65 72 20 6c 6f 61 64 69 6e 67 20 6d 75 6c 74 69 70 6c 65 20 6c 61 79 6f 75 74 73 2c 20 73 | fter.loading.multiple.layouts,.s |
| a640 | 6f 20 77 65 20 6d 61 6b 65 20 74 68 69 73 20 61 63 63 65 73 73 69 62 6c 65 20 74 6f 20 49 6e 70 | o.we.make.this.accessible.to.Inp |
| a660 | 75 74 44 65 76 69 63 65 42 75 69 6c 64 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 | utDeviceBuilder...........privat |
| a680 | 65 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6d 5f 56 61 72 69 61 6e 74 73 3b 0d 0a 20 20 | e.InternedString.m_Variants;.... |
| a6a0 | 20 20 20 20 20 20 70 72 69 76 61 74 65 20 46 6f 75 72 43 43 20 6d 5f 53 74 61 74 65 46 6f 72 6d | ......private.FourCC.m_StateForm |
| a6c0 | 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 69 6e 74 20 6d 5f 53 74 61 74 | at;..........internal.int.m_Stat |
| a6e0 | 65 53 69 7a 65 49 6e 42 79 74 65 73 3b 20 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 | eSizeInBytes;.//.Note.that.this. |
| a700 | 69 73 20 74 68 65 20 63 6f 6d 62 69 6e 65 64 20 73 74 61 74 65 20 73 69 7a 65 20 66 6f 72 20 69 | is.the.combined.state.size.for.i |
| a720 | 6e 70 75 74 20 61 6e 64 20 6f 75 74 70 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e | nput.and.output...........intern |
| a740 | 61 6c 20 62 6f 6f 6c 3f 20 6d 5f 55 70 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 3b 0d 0a | al.bool?.m_UpdateBeforeRender;.. |
| a760 | 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 49 6e 6c 69 6e 65 64 41 72 72 61 79 3c 49 6e | ........internal.InlinedArray<In |
| a780 | 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 20 6d 5f 42 61 73 65 4c 61 79 6f 75 74 73 3b 0d 0a 20 20 | ternedString>.m_BaseLayouts;.... |
| a7a0 | 20 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 6c 69 6e 65 64 41 72 72 61 79 3c 49 6e 74 65 72 | ......private.InlinedArray<Inter |
| a7c0 | 6e 65 64 53 74 72 69 6e 67 3e 20 6d 5f 41 70 70 6c 69 65 64 4f 76 65 72 72 69 64 65 73 3b 0d 0a | nedString>.m_AppliedOverrides;.. |
| a7e0 | 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 5b 5d | ........private.InternedString[] |
| a800 | 20 6d 5f 43 6f 6d 6d 6f 6e 55 73 61 67 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e | .m_CommonUsages;..........intern |
| a820 | 61 6c 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 5b 5d 20 6d 5f 43 6f 6e 74 72 6f 6c 73 3b 0d 0a 20 20 | al.ControlItem[].m_Controls;.... |
| a840 | 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 72 69 6e 67 20 6d 5f 44 69 73 70 6c 61 79 4e | ......internal.string.m_DisplayN |
| a860 | 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 6d 5f 44 | ame;..........private.string.m_D |
| a880 | 65 73 63 72 69 70 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 46 6c 61 | escription;..........private.Fla |
| a8a0 | 67 73 20 6d 5f 46 6c 61 67 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 46 6c 61 67 73 5d 0d 0a | gs.m_Flags;............[Flags].. |
| a8c0 | 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 65 6e 75 6d 20 46 6c 61 67 73 0d 0a 20 20 20 20 | ........private.enum.Flags...... |
| a8e0 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 73 47 65 6e 65 72 69 63 54 79 70 65 | ....{..............IsGenericType |
| a900 | 4f 66 44 65 76 69 63 65 20 3d 20 31 20 3c 3c 20 30 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | OfDevice.=.1.<<.0,.............. |
| a920 | 48 69 64 65 49 6e 55 49 20 3d 20 31 20 3c 3c 20 31 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | HideInUI.=.1.<<.1,.............. |
| a940 | 49 73 4f 76 65 72 72 69 64 65 20 3d 20 31 20 3c 3c 20 32 2c 0d 0a 20 20 20 20 20 20 20 20 7d 0d | IsOverride.=.1.<<.2,..........}. |
| a960 | 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c | ...........private.InputControlL |
| a980 | 61 79 6f 75 74 28 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 54 79 70 65 20 74 79 70 65 29 0d 0a 20 | ayout(string.name,.Type.type)... |
| a9a0 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4e 61 6d 65 20 3d 20 6e | .......{..............m_Name.=.n |
| a9c0 | 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 | ew.InternedString(name);........ |
| a9e0 | 20 20 20 20 20 20 6d 5f 54 79 70 65 20 3d 20 74 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d | ......m_Type.=.type;..........}. |
| aa00 | 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 41 | ...........private.static.void.A |
| aa20 | 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 28 54 79 70 65 20 74 79 70 65 2c 20 4c 69 73 74 3c 43 | ddControlItems(Type.type,.List<C |
| aa40 | 6f 6e 74 72 6f 6c 49 74 65 6d 3e 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2c 20 73 74 72 69 | ontrolItem>.controlLayouts,.stri |
| aa60 | 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | ng.layoutName)..........{....... |
| aa80 | 20 20 20 20 20 20 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 46 72 6f 6d 46 69 65 6c 64 73 | .......AddControlItemsFromFields |
| aaa0 | 28 74 79 70 65 2c 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2c 20 6c 61 79 6f 75 74 4e 61 6d | (type,.controlLayouts,.layoutNam |
| aac0 | 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 | e);..............AddControlItems |
| aae0 | 46 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 28 74 79 70 65 2c 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f | FromProperties(type,.controlLayo |
| ab00 | 75 74 73 2c 20 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a | uts,.layoutName);..........}.... |
| ab20 | 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 20 66 6f | ........//.Add.ControlLayouts.fo |
| ab40 | 72 20 65 76 65 72 79 20 70 75 62 6c 69 63 20 70 72 6f 70 65 72 74 79 20 69 6e 20 74 68 65 20 67 | r.every.public.property.in.the.g |
| ab60 | 69 76 65 6e 20 74 79 70 65 20 74 68 61 74 20 68 61 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 49 | iven.type.that.has..........//.I |
| ab80 | 6e 70 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 69 62 75 74 65 20 61 70 70 6c 69 65 64 20 74 6f 20 | nputControlAttribute.applied.to. |
| aba0 | 69 74 20 6f 72 20 68 61 73 20 61 6e 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2d 64 65 72 69 76 65 | it.or.has.an.InputControl-derive |
| abc0 | 64 20 76 61 6c 75 65 20 74 79 70 65 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 | d.value.type...........private.s |
| abe0 | 74 61 74 69 63 20 76 6f 69 64 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 46 72 6f 6d 46 69 | tatic.void.AddControlItemsFromFi |
| ac00 | 65 6c 64 73 28 54 79 70 65 20 74 79 70 65 2c 20 4c 69 73 74 3c 43 6f 6e 74 72 6f 6c 49 74 65 6d | elds(Type.type,.List<ControlItem |
| ac20 | 3e 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2c 20 73 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e | >.controlLayouts,.string.layoutN |
| ac40 | 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 | ame)..........{..............var |
| ac60 | 20 66 69 65 6c 64 73 20 3d 20 74 79 70 65 2e 47 65 74 46 69 65 6c 64 73 28 42 69 6e 64 69 6e 67 | .fields.=.type.GetFields(Binding |
| ac80 | 46 6c 61 67 73 2e 50 75 62 6c 69 63 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 49 6e 73 74 | Flags.Public.|.BindingFlags.Inst |
| aca0 | 61 6e 63 65 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 44 65 63 6c 61 72 65 64 4f 6e 6c 79 | ance.|.BindingFlags.DeclaredOnly |
| acc0 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 46 | );..............AddControlItemsF |
| ace0 | 72 6f 6d 4d 65 6d 62 65 72 73 28 66 69 65 6c 64 73 2c 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 | romMembers(fields,.controlLayout |
| ad00 | 73 2c 20 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 | s,.layoutName);..........}...... |
| ad20 | 20 20 20 20 20 20 2f 2f 20 41 64 64 20 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 20 66 6f 72 20 | ......//.Add.ControlLayouts.for. |
| ad40 | 65 76 65 72 79 20 70 75 62 6c 69 63 20 70 72 6f 70 65 72 74 79 20 69 6e 20 74 68 65 20 67 69 76 | every.public.property.in.the.giv |
| ad60 | 65 6e 20 74 79 70 65 20 74 68 61 74 20 68 61 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 70 | en.type.that.has..........//.Inp |
| ad80 | 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 69 62 75 74 65 20 61 70 70 6c 69 65 64 20 74 6f 20 69 74 | utControlAttribute.applied.to.it |
| ada0 | 20 6f 72 20 68 61 73 20 61 6e 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2d 64 65 72 69 76 65 64 20 | .or.has.an.InputControl-derived. |
| adc0 | 76 61 6c 75 65 20 74 79 70 65 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 | value.type...........private.sta |
| ade0 | 74 69 63 20 76 6f 69 64 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 46 72 6f 6d 50 72 6f 70 | tic.void.AddControlItemsFromProp |
| ae00 | 65 72 74 69 65 73 28 54 79 70 65 20 74 79 70 65 2c 20 4c 69 73 74 3c 43 6f 6e 74 72 6f 6c 49 74 | erties(Type.type,.List<ControlIt |
| ae20 | 65 6d 3e 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2c 20 73 74 72 69 6e 67 20 6c 61 79 6f 75 | em>.controlLayouts,.string.layou |
| ae40 | 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 | tName)..........{..............v |
| ae60 | 61 72 20 70 72 6f 70 65 72 74 69 65 73 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 69 | ar.properties.=.type.GetProperti |
| ae80 | 65 73 28 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 50 75 62 6c 69 63 20 7c 20 42 69 6e 64 69 6e 67 | es(BindingFlags.Public.|.Binding |
| aea0 | 46 6c 61 67 73 2e 49 6e 73 74 61 6e 63 65 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 44 65 | Flags.Instance.|.BindingFlags.De |
| aec0 | 63 6c 61 72 65 64 4f 6e 6c 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 43 6f 6e | claredOnly);..............AddCon |
| aee0 | 74 72 6f 6c 49 74 65 6d 73 46 72 6f 6d 4d 65 6d 62 65 72 73 28 70 72 6f 70 65 72 74 69 65 73 2c | trolItemsFromMembers(properties, |
| af00 | 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2c 20 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 | .controlLayouts,.layoutName);... |
| af20 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 43 6f 6e 74 72 | .......}............//.Add.Contr |
| af40 | 6f 6c 4c 61 79 6f 75 74 73 20 66 6f 72 20 65 76 65 72 79 20 6d 65 6d 62 65 72 20 69 6e 20 74 68 | olLayouts.for.every.member.in.th |
| af60 | 65 20 6c 69 73 74 20 74 68 61 74 20 68 61 73 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 | e.list.that.has.InputControlAttr |
| af80 | 69 62 75 74 65 20 61 70 70 6c 69 65 64 20 74 6f 20 69 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 | ibute.applied.to.it..........//. |
| afa0 | 6f 72 20 68 61 73 20 61 6e 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2d 64 65 72 69 76 65 64 20 76 | or.has.an.InputControl-derived.v |
| afc0 | 61 6c 75 65 20 74 79 70 65 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 | alue.type...........private.stat |
| afe0 | 69 63 20 76 6f 69 64 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 46 72 6f 6d 4d 65 6d 62 65 | ic.void.AddControlItemsFromMembe |
| b000 | 72 73 28 4d 65 6d 62 65 72 49 6e 66 6f 5b 5d 20 6d 65 6d 62 65 72 73 2c 20 4c 69 73 74 3c 43 6f | rs(MemberInfo[].members,.List<Co |
| b020 | 6e 74 72 6f 6c 49 74 65 6d 3e 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 2c 20 73 74 72 69 6e 67 20 | ntrolItem>.controlItems,.string. |
| b040 | 6c 61 79 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | layoutName)..........{.......... |
| b060 | 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 6d 65 6d 62 65 72 20 69 6e 20 6d 65 6d 62 65 | ....foreach.(var.member.in.membe |
| b080 | 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | rs)..............{.............. |
| b0a0 | 20 20 20 20 2f 2f 20 53 6b 69 70 20 61 6e 79 74 68 69 6e 67 20 64 65 63 6c 61 72 65 64 20 69 6e | ....//.Skip.anything.declared.in |
| b0c0 | 73 69 64 65 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 69 74 73 65 6c 66 2e 0d 0a 20 20 20 20 20 | side.InputControl.itself........ |
| b0e0 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6c 74 65 72 73 20 6f 75 74 20 6d 5f 44 65 76 69 | ...........//.Filters.out.m_Devi |
| b100 | 63 65 20 65 74 63 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d | ce.etc...................if.(mem |
| b120 | 62 65 72 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 49 6e 70 75 | ber.DeclaringType.==.typeof(Inpu |
| b140 | 74 43 6f 6e 74 72 6f 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tControl))...................... |
| b160 | 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 | continue;....................var |
| b180 | 20 76 61 6c 75 65 54 79 70 65 20 3d 20 54 79 70 65 48 65 6c 70 65 72 73 2e 47 65 74 56 61 6c 75 | .valueType.=.TypeHelpers.GetValu |
| b1a0 | 65 54 79 70 65 28 6d 65 6d 62 65 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eType(member);.................. |
| b1c0 | 20 20 2f 2f 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 74 79 70 65 20 6f 66 20 74 68 65 20 6d 65 | ..//.If.the.value.type.of.the.me |
| b1e0 | 6d 62 65 72 20 69 73 20 61 20 73 74 72 75 63 74 20 74 79 70 65 20 61 6e 64 20 69 6d 70 6c 65 6d | mber.is.a.struct.type.and.implem |
| b200 | 65 6e 74 73 20 74 68 65 20 49 49 6e 70 75 74 53 74 61 74 65 54 79 70 65 49 6e 66 6f 0d 0a 20 20 | ents.the.IInputStateTypeInfo.... |
| b220 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 6e 74 65 72 66 61 63 65 2c 20 64 69 76 65 | ..............//.interface,.dive |
| b240 | 20 69 6e 73 69 64 65 20 61 6e 64 20 6c 6f 6f 6b 2e 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c | .inside.and.look..This.is.useful |
| b260 | 20 66 6f 72 20 63 6f 6d 70 6f 73 69 6e 67 20 73 74 61 74 65 73 20 6f 66 20 6f 6e 65 20 61 6e 6f | .for.composing.states.of.one.ano |
| b280 | 74 68 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 | ther...................if.(value |
| b2a0 | 54 79 70 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 76 61 6c 75 65 54 79 70 65 2e 49 73 56 61 6c 75 | Type.!=.null.&&.valueType.IsValu |
| b2c0 | 65 54 79 70 65 20 26 26 20 74 79 70 65 6f 66 28 49 49 6e 70 75 74 53 74 61 74 65 54 79 70 65 49 | eType.&&.typeof(IInputStateTypeI |
| b2e0 | 6e 66 6f 29 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 76 61 6c 75 65 54 79 70 65 29 | nfo).IsAssignableFrom(valueType) |
| b300 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | )..................{............ |
| b320 | 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 43 6f 75 6e 74 42 65 66 6f 72 65 | ..........var.controlCountBefore |
| b340 | 20 3d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 2e 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 | .=.controlItems.Count;.......... |
| b360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 28 76 61 | ..............AddControlItems(va |
| b380 | 6c 75 65 54 79 70 65 2c 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 2c 20 6c 61 79 6f 75 74 4e 61 6d | lueType,.controlItems,.layoutNam |
| b3a0 | 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 | e);........................//.If |
| b3c0 | 20 74 68 65 20 63 75 72 72 65 6e 74 20 6d 65 6d 62 65 72 20 69 73 20 61 20 66 69 65 6c 64 20 74 | .the.current.member.is.a.field.t |
| b3e0 | 68 61 74 20 69 73 20 65 6d 62 65 64 64 69 6e 67 20 74 68 65 20 73 74 61 74 65 20 73 74 72 75 63 | hat.is.embedding.the.state.struc |
| b400 | 74 75 72 65 2c 20 61 64 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f | ture,.add....................../ |
| b420 | 2f 20 74 68 65 20 66 69 65 6c 64 20 6f 66 66 73 65 74 20 74 6f 20 61 6c 6c 20 63 6f 6e 74 72 6f | /.the.field.offset.to.all.contro |
| b440 | 6c 20 6c 61 79 6f 75 74 73 20 74 68 61 74 20 77 65 72 65 20 61 64 64 65 64 20 66 72 6f 6d 20 74 | l.layouts.that.were.added.from.t |
| b460 | 68 65 20 73 74 72 75 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | he.struct....................... |
| b480 | 76 61 72 20 6d 65 6d 62 65 72 41 73 46 69 65 6c 64 20 3d 20 6d 65 6d 62 65 72 20 61 73 20 46 69 | var.memberAsField.=.member.as.Fi |
| b4a0 | 65 6c 64 49 6e 66 6f 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | eldInfo;......................if |
| b4c0 | 20 28 6d 65 6d 62 65 72 41 73 46 69 65 6c 64 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 | .(memberAsField.!=.null)........ |
| b4e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............{................. |
| b500 | 20 20 20 20 20 20 20 20 20 76 61 72 20 66 69 65 6c 64 4f 66 66 73 65 74 20 3d 20 4d 61 72 73 68 | .........var.fieldOffset.=.Marsh |
| b520 | 61 6c 2e 4f 66 66 73 65 74 4f 66 28 6d 65 6d 62 65 72 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 | al.OffsetOf(member.DeclaringType |
| b540 | 2c 20 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 2e 54 6f 49 6e 74 33 32 28 29 3b 0d 0a 20 20 20 20 20 | ,.member.Name).ToInt32();....... |
| b560 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 43 6f | ...................var.controlCo |
| b580 | 75 6e 74 41 66 74 65 72 20 3d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 2e 43 6f 75 6e 74 3b 0d 0a | untAfter.=.controlItems.Count;.. |
| b5a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 | ........................for.(var |
| b5c0 | 20 69 20 3d 20 63 6f 6e 74 72 6f 6c 43 6f 75 6e 74 42 65 66 6f 72 65 3b 20 69 20 3c 20 63 6f 6e | .i.=.controlCountBefore;.i.<.con |
| b5e0 | 74 72 6f 6c 43 6f 75 6e 74 41 66 74 65 72 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | trolCountAfter;.++i)............ |
| b600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............{................. |
| b620 | 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 3d | .............var.controlLayout.= |
| b640 | 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .controlItems[i];............... |
| b660 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 5b | ...............if.(controlItems[ |
| b680 | 69 5d 2e 6f 66 66 73 65 74 20 21 3d 20 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 | i].offset.!=.InputStateBlock.Inv |
| b6a0 | 61 6c 69 64 4f 66 66 73 65 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | alidOffset)..................... |
| b6c0 | 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .........{...................... |
| b6e0 | 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 6f 66 66 73 65 74 | ............controlLayout.offset |
| b700 | 20 2b 3d 20 28 75 69 6e 74 29 66 69 65 6c 64 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 | .+=.(uint)fieldOffset;.......... |
| b720 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 49 | ........................controlI |
| b740 | 74 65 6d 73 5b 69 5d 20 3d 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 | tems[i].=.controlLayout;........ |
| b760 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 | ......................}......... |
| b780 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .................}.............. |
| b7a0 | 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ........}....................... |
| b7c0 | 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 6c 6c 6f 77 20 61 74 74 72 69 62 75 74 65 73 20 6f 6e 20 74 | .////TODO:.allow.attributes.on.t |
| b7e0 | 68 65 20 6d 65 6d 62 65 72 20 74 6f 20 6d 6f 64 69 66 79 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f | he.member.to.modify.control.layo |
| b800 | 75 74 73 20 69 6e 73 69 64 65 20 74 68 65 20 73 74 72 75 63 74 0d 0a 20 20 20 20 20 20 20 20 20 | uts.inside.the.struct........... |
| b820 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4c | .......}....................//.L |
| b840 | 6f 6f 6b 20 66 6f 72 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 69 62 75 74 65 73 2e 20 | ook.for.InputControlAttributes.. |
| b860 | 49 66 20 74 68 65 79 20 61 72 65 6e 27 74 20 74 68 65 72 65 2c 20 74 68 65 20 6d 65 6d 62 65 72 | If.they.aren't.there,.the.member |
| b880 | 20 68 61 73 20 74 6f 20 62 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6f | .has.to.be..................//.o |
| b8a0 | 66 20 61 6e 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2d 64 65 72 69 76 65 64 20 76 61 6c 75 65 20 | f.an.InputControl-derived.value. |
| b8c0 | 74 79 70 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 74 74 72 69 | type...................var.attri |
| b8e0 | 62 75 74 65 73 20 3d 20 6d 65 6d 62 65 72 2e 47 65 74 43 75 73 74 6f 6d 41 74 74 72 69 62 75 74 | butes.=.member.GetCustomAttribut |
| b900 | 65 73 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 69 62 75 74 65 3e 28 66 61 6c 73 65 29 | es<InputControlAttribute>(false) |
| b920 | 2e 54 6f 41 72 72 61 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | .ToArray();..................if. |
| b940 | 28 61 74 74 72 69 62 75 74 65 73 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 | (attributes.Length.==.0)........ |
| b960 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........{..................... |
| b980 | 20 69 66 20 28 76 61 6c 75 65 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 21 74 79 70 65 6f | .if.(valueType.==.null.||.!typeo |
| b9a0 | 66 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 29 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d | f(InputControl).IsAssignableFrom |
| b9c0 | 28 76 61 6c 75 65 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | (valueType)).................... |
| b9e0 | 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ......continue;................. |
| ba00 | 20 20 20 20 20 20 20 2f 2f 20 4f 6e 20 70 72 6f 70 65 72 74 69 65 73 2c 20 77 65 20 72 65 71 75 | .......//.On.properties,.we.requ |
| ba20 | 69 72 65 20 65 78 70 6c 69 63 69 74 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 5d 20 61 74 74 72 | ire.explicit.[InputControl].attr |
| ba40 | 69 62 75 74 65 73 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f | ibutes.to....................../ |
| ba60 | 2f 20 70 69 63 6b 20 74 68 65 6d 20 75 70 2e 20 44 6f 69 6e 67 20 69 74 20 6f 74 68 65 72 77 69 | /.pick.them.up..Doing.it.otherwi |
| ba80 | 73 65 20 68 61 73 20 70 72 6f 76 65 6e 20 74 6f 20 6c 65 61 64 20 74 6f 6f 20 65 61 73 69 6c 79 | se.has.proven.to.lead.too.easily |
| baa0 | 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 69 74 75 | .to......................//.situ |
| bac0 | 61 74 69 6f 6e 73 20 77 68 65 72 65 20 79 6f 75 20 69 6e 61 64 76 65 72 74 65 6e 74 6c 79 20 61 | ations.where.you.inadvertently.a |
| bae0 | 64 64 20 6e 65 77 20 63 6f 6e 74 72 6f 6c 73 20 74 6f 20 61 20 6c 61 79 6f 75 74 0d 0a 20 20 20 | dd.new.controls.to.a.layout..... |
| bb00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6a 75 73 74 20 62 65 63 61 75 73 65 | .................//.just.because |
| bb20 | 20 79 6f 75 20 61 64 64 65 64 20 61 6e 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2d 74 79 70 65 20 | .you.added.an.InputControl-type. |
| bb40 | 70 72 6f 70 65 72 74 79 20 74 6f 20 61 20 63 6c 61 73 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | property.to.a.class............. |
| bb60 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 69 73 20 50 72 6f 70 65 72 74 79 | ..........if.(member.is.Property |
| bb80 | 49 6e 66 6f 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 | Info)..........................c |
| bba0 | 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | ontinue;..................}..... |
| bbc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 46 72 | ...............AddControlItemsFr |
| bbe0 | 6f 6d 4d 65 6d 62 65 72 28 6d 65 6d 62 65 72 2c 20 61 74 74 72 69 62 75 74 65 73 2c 20 63 6f 6e | omMember(member,.attributes,.con |
| bc00 | 74 72 6f 6c 49 74 65 6d 73 2c 20 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 | trolItems,.layoutName);......... |
| bc20 | 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 | .....}..........}............pri |
| bc40 | 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 41 64 64 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 | vate.static.void.AddControlItems |
| bc60 | 46 72 6f 6d 4d 65 6d 62 65 72 28 4d 65 6d 62 65 72 49 6e 66 6f 20 6d 65 6d 62 65 72 2c 0d 0a 20 | FromMember(MemberInfo.member,... |
| bc80 | 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 69 62 75 74 65 | ...........InputControlAttribute |
| bca0 | 5b 5d 20 61 74 74 72 69 62 75 74 65 73 2c 20 4c 69 73 74 3c 43 6f 6e 74 72 6f 6c 49 74 65 6d 3e | [].attributes,.List<ControlItem> |
| bcc0 | 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 2c 20 73 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 | .controlItems,.string.layoutName |
| bce0 | 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 70 | )..........{..............//.Inp |
| bd00 | 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 69 62 75 74 65 20 63 61 6e 20 62 65 20 61 70 70 6c 69 65 | utControlAttribute.can.be.applie |
| bd20 | 64 20 6d 75 6c 74 69 70 6c 65 20 74 69 6d 65 73 20 74 6f 20 74 68 65 20 73 61 6d 65 20 6d 65 6d | d.multiple.times.to.the.same.mem |
| bd40 | 62 65 72 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 67 65 6e 65 72 61 74 69 6e 67 20 | ber,..............//.generating. |
| bd60 | 61 20 73 65 70 61 72 61 74 65 20 63 6f 6e 74 72 6f 6c 20 66 6f 72 20 65 61 63 68 20 6f 63 63 75 | a.separate.control.for.each.occu |
| bd80 | 72 72 65 6e 63 65 2e 20 48 6f 77 65 76 65 72 2c 20 69 74 20 63 61 6e 20 61 6c 73 6f 0d 0a 20 20 | rrence..However,.it.can.also.... |
| bda0 | 20 20 20 20 20 20 20 20 20 20 2f 2f 20 67 65 6e 65 72 61 74 69 6e 67 20 61 20 73 65 70 61 72 61 | ..........//.generating.a.separa |
| bdc0 | 74 65 20 63 6f 6e 74 72 6f 6c 20 66 6f 72 20 65 61 63 68 20 6f 63 63 75 72 72 65 6e 63 65 2e 20 | te.control.for.each.occurrence.. |
| bde0 | 48 6f 77 65 76 65 72 2c 20 69 74 20 63 61 6e 20 61 6c 73 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 | However,.it.can.also............ |
| be00 | 20 20 2f 2f 20 6e 6f 74 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 61 6c 6c 20 69 6e 20 77 68 | ..//.not.be.applied.at.all.in.wh |
| be20 | 69 63 68 20 63 61 73 65 20 77 65 20 73 74 69 6c 6c 20 61 64 64 20 61 20 63 6f 6e 74 72 6f 6c 20 | ich.case.we.still.add.a.control. |
| be40 | 6c 61 79 6f 75 74 20 28 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6c 6f 67 69 | layout.(the..............//.logi |
| be60 | 63 20 74 68 61 74 20 63 61 6c 6c 65 64 20 75 73 20 61 6c 72 65 61 64 79 20 6d 61 64 65 20 73 75 | c.that.called.us.already.made.su |
| be80 | 72 65 20 74 68 65 20 6d 65 6d 62 65 72 20 69 73 20 65 6c 69 67 69 62 6c 65 20 66 6f 72 20 74 68 | re.the.member.is.eligible.for.th |
| bea0 | 69 73 20 6b 69 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6f 66 20 6f 70 65 72 61 | is.kind..............//.of.opera |
| bec0 | 74 69 6f 6e 29 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 | tion).................if.(attrib |
| bee0 | 75 74 65 73 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b | utes.Length.==.0)..............{ |
| bf00 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 4c 61 79 | ..................var.controlLay |
| bf20 | 6f 75 74 20 3d 20 43 72 65 61 74 65 43 6f 6e 74 72 6f 6c 49 74 65 6d 46 72 6f 6d 4d 65 6d 62 65 | out.=.CreateControlItemFromMembe |
| bf40 | 72 28 6d 65 6d 62 65 72 2c 20 6e 75 6c 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | r(member,.null);................ |
| bf60 | 20 20 54 68 72 6f 77 49 66 43 6f 6e 74 72 6f 6c 49 74 65 6d 49 73 44 75 70 6c 69 63 61 74 65 28 | ..ThrowIfControlItemIsDuplicate( |
| bf80 | 72 65 66 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2c 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 2c | ref.controlLayout,.controlItems, |
| bfa0 | 20 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 | .layoutName);..................c |
| bfc0 | 6f 6e 74 72 6f 6c 49 74 65 6d 73 2e 41 64 64 28 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 3b 0d | ontrolItems.Add(controlLayout);. |
| bfe0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 | .............}..............else |
| c000 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............{................. |
| c020 | 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 61 74 74 72 69 62 75 74 65 20 69 6e 20 61 74 74 72 69 | .foreach.(var.attribute.in.attri |
| c040 | 62 75 74 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | butes)..................{....... |
| c060 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 | ...............var.controlLayout |
| c080 | 20 3d 20 43 72 65 61 74 65 43 6f 6e 74 72 6f 6c 49 74 65 6d 46 72 6f 6d 4d 65 6d 62 65 72 28 6d | .=.CreateControlItemFromMember(m |
| c0a0 | 65 6d 62 65 72 2c 20 61 74 74 72 69 62 75 74 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ember,.attribute);.............. |
| c0c0 | 20 20 20 20 20 20 20 20 54 68 72 6f 77 49 66 43 6f 6e 74 72 6f 6c 49 74 65 6d 49 73 44 75 70 6c | ........ThrowIfControlItemIsDupl |
| c0e0 | 69 63 61 74 65 28 72 65 66 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2c 20 63 6f 6e 74 72 6f 6c | icate(ref.controlLayout,.control |
| c100 | 49 74 65 6d 73 2c 20 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | Items,.layoutName);............. |
| c120 | 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 2e 41 64 64 28 63 6f 6e 74 72 6f | .........controlItems.Add(contro |
| c140 | 6c 4c 61 79 6f 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 | lLayout);..................}.... |
| c160 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 | ..........}..........}.......... |
| c180 | 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 20 43 72 65 | ..private.static.ControlItem.Cre |
| c1a0 | 61 74 65 43 6f 6e 74 72 6f 6c 49 74 65 6d 46 72 6f 6d 4d 65 6d 62 65 72 28 4d 65 6d 62 65 72 49 | ateControlItemFromMember(MemberI |
| c1c0 | 6e 66 6f 20 6d 65 6d 62 65 72 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 41 74 74 72 69 62 75 74 | nfo.member,.InputControlAttribut |
| c1e0 | 65 20 61 74 74 72 69 62 75 74 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | e.attribute)..........{......... |
| c200 | 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 6d 61 6b 65 20 73 75 72 65 20 74 68 61 74 20 | .....////REVIEW:.make.sure.that. |
| c220 | 74 68 65 20 76 61 6c 75 65 20 74 79 70 65 20 6f 66 20 74 68 65 20 66 69 65 6c 64 20 61 6e 64 20 | the.value.type.of.the.field.and. |
| c240 | 74 68 65 20 76 61 6c 75 65 20 74 79 70 65 20 6f 66 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 6d 61 | the.value.type.of.the.control.ma |
| c260 | 74 63 68 3f 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 | tch?................//.Determine |
| c280 | 20 6e 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 61 6d 65 20 3d 20 61 | .name...............var.name.=.a |
| c2a0 | 74 74 72 69 62 75 74 65 3f 2e 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | ttribute?.name;..............if. |
| c2c0 | 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 29 29 0d 0a 20 20 | (string.IsNullOrEmpty(name)).... |
| c2e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 20 3d 20 6d 65 6d 62 65 72 2e 4e 61 6d 65 | ..............name.=.member.Name |
| c300 | 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 4d 6f 64 69 66 79 69 6e 67 | ;................var.isModifying |
| c320 | 43 68 69 6c 64 43 6f 6e 74 72 6f 6c 42 79 50 61 74 68 20 3d 20 6e 61 6d 65 2e 49 6e 64 65 78 4f | ChildControlByPath.=.name.IndexO |
| c340 | 66 28 27 2f 27 29 20 21 3d 20 2d 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 | f('/').!=.-1;................//. |
| c360 | 44 65 74 65 72 6d 69 6e 65 20 64 69 73 70 6c 61 79 20 6e 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 | Determine.display.name.......... |
| c380 | 20 20 20 20 20 76 61 72 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 61 74 74 72 69 62 75 74 65 | .....var.displayName.=.attribute |
| c3a0 | 3f 2e 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 | ?.displayName;..............var. |
| c3c0 | 73 68 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 61 74 74 72 69 62 75 74 65 3f 2e 73 68 | shortDisplayName.=.attribute?.sh |
| c3e0 | 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | ortDisplayName;................/ |
| c400 | 2f 20 44 65 74 65 72 6d 69 6e 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | /.Determine.layout.............. |
| c420 | 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 20 61 74 74 72 69 62 75 74 65 3f 2e 6c 61 79 6f 75 74 3b | .var.layout.=.attribute?.layout; |
| c440 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f | ..............if.(string.IsNullO |
| c460 | 72 45 6d 70 74 79 28 6c 61 79 6f 75 74 29 20 26 26 20 21 69 73 4d 6f 64 69 66 79 69 6e 67 43 68 | rEmpty(layout).&&.!isModifyingCh |
| c480 | 69 6c 64 43 6f 6e 74 72 6f 6c 42 79 50 61 74 68 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ildControlByPath.&&............. |
| c4a0 | 20 20 20 20 20 28 21 28 6d 65 6d 62 65 72 20 69 73 20 46 69 65 6c 64 49 6e 66 6f 29 20 7c 7c 20 | .....(!(member.is.FieldInfo).||. |
| c4c0 | 6d 65 6d 62 65 72 2e 47 65 74 43 75 73 74 6f 6d 41 74 74 72 69 62 75 74 65 3c 46 69 78 65 64 42 | member.GetCustomAttribute<FixedB |
| c4e0 | 75 66 66 65 72 41 74 74 72 69 62 75 74 65 3e 28 66 61 6c 73 65 29 20 3d 3d 20 6e 75 6c 6c 29 29 | ufferAttribute>(false).==.null)) |
| c500 | 20 2f 2f 20 49 67 6e 6f 72 65 20 66 69 78 65 64 20 62 75 66 66 65 72 20 66 69 65 6c 64 73 2e 0d | .//.Ignore.fixed.buffer.fields.. |
| c520 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| c540 | 76 61 72 20 76 61 6c 75 65 54 79 70 65 20 3d 20 54 79 70 65 48 65 6c 70 65 72 73 2e 47 65 74 56 | var.valueType.=.TypeHelpers.GetV |
| c560 | 61 6c 75 65 54 79 70 65 28 6d 65 6d 62 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | alueType(member);............... |
| c580 | 20 20 20 6c 61 79 6f 75 74 20 3d 20 49 6e 66 65 72 4c 61 79 6f 75 74 46 72 6f 6d 56 61 6c 75 65 | ...layout.=.InferLayoutFromValue |
| c5a0 | 54 79 70 65 28 76 61 6c 75 65 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | Type(valueType);..............}. |
| c5c0 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 76 61 72 69 | ...............//.Determine.vari |
| c5e0 | 61 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 76 61 72 69 61 6e | ants...............string.varian |
| c600 | 74 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 | ts.=.null;..............if.(attr |
| c620 | 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f | ibute.!=.null.&&.!string.IsNullO |
| c640 | 72 45 6d 70 74 79 28 61 74 74 72 69 62 75 74 65 2e 76 61 72 69 61 6e 74 73 29 29 0d 0a 20 20 20 | rEmpty(attribute.variants))..... |
| c660 | 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 69 61 6e 74 73 20 3d 20 61 74 74 72 69 62 75 74 | .............variants.=.attribut |
| c680 | 65 2e 76 61 72 69 61 6e 74 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 | e.variants;................//.De |
| c6a0 | 74 65 72 6d 69 6e 65 20 6f 66 66 73 65 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 | termine.offset...............var |
| c6c0 | 20 6f 66 66 73 65 74 20 3d 20 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 | .offset.=.InputStateBlock.Invali |
| c6e0 | 64 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 | dOffset;..............if.(attrib |
| c700 | 75 74 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 61 74 74 72 69 62 75 74 65 2e 6f 66 66 73 65 74 20 | ute.!=.null.&&.attribute.offset. |
| c720 | 21 3d 20 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 | !=.InputStateBlock.InvalidOffset |
| c740 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 66 66 73 65 74 20 3d 20 61 74 74 72 | )..................offset.=.attr |
| c760 | 69 62 75 74 65 2e 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 | ibute.offset;..............else. |
| c780 | 69 66 20 28 6d 65 6d 62 65 72 20 69 73 20 46 69 65 6c 64 49 6e 66 6f 20 26 26 20 21 69 73 4d 6f | if.(member.is.FieldInfo.&&.!isMo |
| c7a0 | 64 69 66 79 69 6e 67 43 68 69 6c 64 43 6f 6e 74 72 6f 6c 42 79 50 61 74 68 29 0d 0a 20 20 20 20 | difyingChildControlByPath)...... |
| c7c0 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 66 66 73 65 74 20 3d 20 28 75 69 6e 74 29 4d 61 72 73 68 | ............offset.=.(uint)Marsh |
| c7e0 | 61 6c 2e 4f 66 66 73 65 74 4f 66 28 6d 65 6d 62 65 72 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 | al.OffsetOf(member.DeclaringType |
| c800 | 2c 20 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 2e 54 6f 49 6e 74 33 32 28 29 3b 0d 0a 0d 0a 20 20 20 | ,.member.Name).ToInt32();....... |
| c820 | 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 62 69 74 20 6f 66 66 73 65 74 | .........//.Determine.bit.offset |
| c840 | 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 74 20 3d 20 49 6e 70 75 74 53 74 | ...............var.bit.=.InputSt |
| c860 | 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 | ateBlock.InvalidOffset;......... |
| c880 | 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 | .....if.(attribute.!=.null)..... |
| c8a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 74 20 3d 20 61 74 74 72 69 62 75 74 65 2e 62 69 74 | .............bit.=.attribute.bit |
| c8c0 | 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 69 66 20 73 69 | ;................////TODO:.if.si |
| c8e0 | 7a 65 20 69 73 20 6e 6f 74 20 73 65 74 2c 20 64 65 74 65 72 6d 69 6e 65 20 66 72 6f 6d 20 74 79 | ze.is.not.set,.determine.from.ty |
| c900 | 70 65 20 6f 66 20 66 69 65 6c 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 | pe.of.field..............//.Dete |
| c920 | 72 6d 69 6e 65 20 73 69 7a 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 69 7a | rmine.size...............var.siz |
| c940 | 65 49 6e 42 69 74 73 20 3d 20 30 75 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 | eInBits.=.0u;..............if.(a |
| c960 | 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ttribute.!=.null)............... |
| c980 | 20 20 20 73 69 7a 65 49 6e 42 69 74 73 20 3d 20 61 74 74 72 69 62 75 74 65 2e 73 69 7a 65 49 6e | ...sizeInBits.=.attribute.sizeIn |
| c9a0 | 42 69 74 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e | Bits;................//.Determin |
| c9c0 | 65 20 66 6f 72 6d 61 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 6f 72 6d 61 | e.format...............var.forma |
| c9e0 | 74 20 3d 20 6e 65 77 20 46 6f 75 72 43 43 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 | t.=.new.FourCC();..............i |
| ca00 | 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 21 73 74 72 69 6e 67 2e | f.(attribute.!=.null.&&.!string. |
| ca20 | 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 61 74 74 72 69 62 75 74 65 2e 66 6f 72 6d 61 74 29 29 | IsNullOrEmpty(attribute.format)) |
| ca40 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 6d 61 74 20 3d 20 6e 65 77 20 46 | ..................format.=.new.F |
| ca60 | 6f 75 72 43 43 28 61 74 74 72 69 62 75 74 65 2e 66 6f 72 6d 61 74 29 3b 0d 0a 20 20 20 20 20 20 | ourCC(attribute.format);........ |
| ca80 | 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 21 69 73 4d 6f 64 69 66 79 69 6e 67 43 68 69 6c 64 | ......else.if.(!isModifyingChild |
| caa0 | 43 6f 6e 74 72 6f 6c 42 79 50 61 74 68 20 26 26 20 62 69 74 20 3d 3d 20 49 6e 70 75 74 53 74 61 | ControlByPath.&&.bit.==.InputSta |
| cac0 | 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 29 0d 0a 20 20 20 20 20 20 20 20 | teBlock.InvalidOffset).......... |
| cae0 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 | ....{..................////REVIE |
| cb00 | 57 3a 20 74 68 69 73 20 6c 6f 67 69 63 20 6d 61 6b 65 73 20 69 74 20 68 61 72 64 20 74 6f 20 69 | W:.this.logic.makes.it.hard.to.i |
| cb20 | 6e 68 65 72 69 74 20 73 65 74 74 69 6e 67 73 20 66 72 6f 6d 20 74 68 65 20 62 61 73 65 20 6c 61 | nherit.settings.from.the.base.la |
| cb40 | 79 6f 75 74 3b 20 69 66 20 77 65 20 64 6f 20 74 68 69 73 20 73 74 75 66 66 2c 0d 0a 20 20 20 20 | yout;.if.we.do.this.stuff,...... |
| cb60 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 77 65 20 73 68 6f 75 6c | ............////........we.shoul |
| cb80 | 64 20 70 72 6f 62 61 62 6c 79 20 64 6f 20 69 74 20 69 6e 20 49 6e 70 75 74 44 65 76 69 63 65 42 | d.probably.do.it.in.InputDeviceB |
| cba0 | 75 69 6c 64 65 72 20 61 6e 64 20 6e 6f 74 20 64 69 72 65 63 74 6c 79 20 6f 6e 20 74 68 65 20 6c | uilder.and.not.directly.on.the.l |
| cbc0 | 61 79 6f 75 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 76 61 6c 75 65 | ayout..................var.value |
| cbe0 | 54 79 70 65 20 3d 20 54 79 70 65 48 65 6c 70 65 72 73 2e 47 65 74 56 61 6c 75 65 54 79 70 65 28 | Type.=.TypeHelpers.GetValueType( |
| cc00 | 6d 65 6d 62 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 6d 61 74 | member);..................format |
| cc20 | 20 3d 20 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 47 65 74 50 72 69 6d 69 74 69 76 65 46 | .=.InputStateBlock.GetPrimitiveF |
| cc40 | 6f 72 6d 61 74 46 72 6f 6d 54 79 70 65 28 76 61 6c 75 65 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 | ormatFromType(valueType);....... |
| cc60 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 | .......}................//.Deter |
| cc80 | 6d 69 6e 65 20 61 6c 69 61 73 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 74 65 72 | mine.aliases...............Inter |
| cca0 | 6e 65 64 53 74 72 69 6e 67 5b 5d 20 61 6c 69 61 73 65 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 | nedString[].aliases.=.null;..... |
| ccc0 | 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 0d | .........if.(attribute.!=.null). |
| cce0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| cd00 | 76 61 72 20 6a 6f 69 6e 65 64 20 3d 20 41 72 72 61 79 48 65 6c 70 65 72 73 2e 4a 6f 69 6e 28 61 | var.joined.=.ArrayHelpers.Join(a |
| cd20 | 74 74 72 69 62 75 74 65 2e 61 6c 69 61 73 2c 20 61 74 74 72 69 62 75 74 65 2e 61 6c 69 61 73 65 | ttribute.alias,.attribute.aliase |
| cd40 | 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6a 6f 69 6e 65 64 20 | s);..................if.(joined. |
| cd60 | 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6c | !=.null)......................al |
| cd80 | 69 61 73 65 73 20 3d 20 6a 6f 69 6e 65 64 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 6e 65 77 20 49 | iases.=.joined.Select(x.=>.new.I |
| cda0 | 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 78 29 29 2e 54 6f 41 72 72 61 79 28 29 3b 0d 0a 20 20 | nternedString(x)).ToArray();.... |
| cdc0 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 | ..........}................//.De |
| cde0 | 74 65 72 6d 69 6e 65 20 75 73 61 67 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 74 | termine.usages...............Int |
| ce00 | 65 72 6e 65 64 53 74 72 69 6e 67 5b 5d 20 75 73 61 67 65 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 | ernedString[].usages.=.null;.... |
| ce20 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 | ..........if.(attribute.!=.null) |
| ce40 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............{................. |
| ce60 | 20 76 61 72 20 6a 6f 69 6e 65 64 20 3d 20 41 72 72 61 79 48 65 6c 70 65 72 73 2e 4a 6f 69 6e 28 | .var.joined.=.ArrayHelpers.Join( |
| ce80 | 61 74 74 72 69 62 75 74 65 2e 75 73 61 67 65 2c 20 61 74 74 72 69 62 75 74 65 2e 75 73 61 67 65 | attribute.usage,.attribute.usage |
| cea0 | 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6a 6f 69 6e 65 64 20 | s);..................if.(joined. |
| cec0 | 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 | !=.null)......................us |
| cee0 | 61 67 65 73 20 3d 20 6a 6f 69 6e 65 64 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 6e 65 77 20 49 6e | ages.=.joined.Select(x.=>.new.In |
| cf00 | 74 65 72 6e 65 64 53 74 72 69 6e 67 28 78 29 29 2e 54 6f 41 72 72 61 79 28 29 3b 0d 0a 20 20 20 | ternedString(x)).ToArray();..... |
| cf20 | 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 | .........}................//.Det |
| cf40 | 65 72 6d 69 6e 65 20 70 61 72 61 6d 65 74 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ermine.parameters............... |
| cf60 | 4e 61 6d 65 64 56 61 6c 75 65 5b 5d 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 6e 75 6c 6c 3b 0d | NamedValue[].parameters.=.null;. |
| cf80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 | .............if.(attribute.!=.nu |
| cfa0 | 6c 6c 20 26 26 20 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 61 74 74 72 | ll.&&.!string.IsNullOrEmpty(attr |
| cfc0 | 69 62 75 74 65 2e 70 61 72 61 6d 65 74 65 72 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ibute.parameters)).............. |
| cfe0 | 20 20 20 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 4e 61 6d 65 64 56 61 6c 75 65 2e 50 61 72 73 | ....parameters.=.NamedValue.Pars |
| d000 | 65 4d 75 6c 74 69 70 6c 65 28 61 74 74 72 69 62 75 74 65 2e 70 61 72 61 6d 65 74 65 72 73 29 3b | eMultiple(attribute.parameters); |
| d020 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 70 72 6f | ................//.Determine.pro |
| d040 | 63 65 73 73 6f 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e 61 6d 65 41 6e 64 50 61 72 | cessors...............NameAndPar |
| d060 | 61 6d 65 74 65 72 73 5b 5d 20 70 72 6f 63 65 73 73 6f 72 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 | ameters[].processors.=.null;.... |
| d080 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 20 | ..........if.(attribute.!=.null. |
| d0a0 | 26 26 20 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 61 74 74 72 69 62 75 | &&.!string.IsNullOrEmpty(attribu |
| d0c0 | 74 65 2e 70 72 6f 63 65 73 73 6f 72 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | te.processors))................. |
| d0e0 | 20 70 72 6f 63 65 73 73 6f 72 73 20 3d 20 4e 61 6d 65 41 6e 64 50 61 72 61 6d 65 74 65 72 73 2e | .processors.=.NameAndParameters. |
| d100 | 50 61 72 73 65 4d 75 6c 74 69 70 6c 65 28 61 74 74 72 69 62 75 74 65 2e 70 72 6f 63 65 73 73 6f | ParseMultiple(attribute.processo |
| d120 | 72 73 29 2e 54 6f 41 72 72 61 79 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | rs).ToArray();................// |
| d140 | 20 44 65 74 65 72 6d 69 6e 65 20 77 68 65 74 68 65 72 20 74 6f 20 75 73 65 20 73 74 61 74 65 20 | .Determine.whether.to.use.state. |
| d160 | 66 72 6f 6d 20 61 6e 6f 74 68 65 72 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 | from.another.control............ |
| d180 | 20 20 20 73 74 72 69 6e 67 20 75 73 65 53 74 61 74 65 46 72 6f 6d 20 3d 20 6e 75 6c 6c 3b 0d 0a | ...string.useStateFrom.=.null;.. |
| d1a0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c | ............if.(attribute.!=.nul |
| d1c0 | 6c 20 26 26 20 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 61 74 74 72 69 | l.&&.!string.IsNullOrEmpty(attri |
| d1e0 | 62 75 74 65 2e 75 73 65 53 74 61 74 65 46 72 6f 6d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | bute.useStateFrom))............. |
| d200 | 20 20 20 20 20 75 73 65 53 74 61 74 65 46 72 6f 6d 20 3d 20 61 74 74 72 69 62 75 74 65 2e 75 73 | .....useStateFrom.=.attribute.us |
| d220 | 65 53 74 61 74 65 46 72 6f 6d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 | eStateFrom;................//.De |
| d240 | 74 65 72 6d 69 6e 65 20 69 66 20 69 74 27 73 20 61 20 6e 6f 69 73 79 20 63 6f 6e 74 72 6f 6c 2e | termine.if.it's.a.noisy.control. |
| d260 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 4e 6f 69 73 79 20 3d 20 66 61 6c 73 | ..............var.isNoisy.=.fals |
| d280 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d | e;..............if.(attribute.!= |
| d2a0 | 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4e 6f 69 73 79 20 | .null)..................isNoisy. |
| d2c0 | 3d 20 61 74 74 72 69 62 75 74 65 2e 6e 6f 69 73 79 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | =.attribute.noisy;.............. |
| d2e0 | 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 69 66 20 69 74 27 73 20 61 20 73 79 6e 74 68 65 74 | ..//.Determine.if.it's.a.synthet |
| d300 | 69 63 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 53 | ic.control...............var.isS |
| d320 | 79 6e 74 68 65 74 69 63 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 | ynthetic.=.false;..............i |
| d340 | 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 | f.(attribute.!=.null)........... |
| d360 | 20 20 20 20 20 20 20 69 73 53 79 6e 74 68 65 74 69 63 20 3d 20 61 74 74 72 69 62 75 74 65 2e 73 | .......isSynthetic.=.attribute.s |
| d380 | 79 6e 74 68 65 74 69 63 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 | ynthetic;................//.Dete |
| d3a0 | 72 6d 69 6e 65 20 61 72 72 61 79 20 73 69 7a 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 | rmine.array.size...............v |
| d3c0 | 61 72 20 61 72 72 61 79 53 69 7a 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 | ar.arraySize.=.0;..............i |
| d3e0 | 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 | f.(attribute.!=.null)........... |
| d400 | 20 20 20 20 20 20 20 61 72 72 61 79 53 69 7a 65 20 3d 20 61 74 74 72 69 62 75 74 65 2e 61 72 72 | .......arraySize.=.attribute.arr |
| d420 | 61 79 53 69 7a 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d | aySize;................//.Determ |
| d440 | 69 6e 65 20 64 65 66 61 75 6c 74 20 73 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ine.default.state............... |
| d460 | 76 61 72 20 64 65 66 61 75 6c 74 53 74 61 74 65 20 3d 20 6e 65 77 20 50 72 69 6d 69 74 69 76 65 | var.defaultState.=.new.Primitive |
| d480 | 56 61 6c 75 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 | Value();..............if.(attrib |
| d4a0 | 75 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 | ute.!=.null)..................de |
| d4c0 | 66 61 75 6c 74 53 74 61 74 65 20 3d 20 50 72 69 6d 69 74 69 76 65 56 61 6c 75 65 2e 46 72 6f 6d | faultState.=.PrimitiveValue.From |
| d4e0 | 4f 62 6a 65 63 74 28 61 74 74 72 69 62 75 74 65 2e 64 65 66 61 75 6c 74 53 74 61 74 65 29 3b 0d | Object(attribute.defaultState);. |
| d500 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 6d 69 6e 20 | ...............//.Determine.min. |
| d520 | 61 6e 64 20 6d 61 78 20 76 61 6c 75 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 | and.max.value...............var. |
| d540 | 6d 69 6e 56 61 6c 75 65 20 3d 20 6e 65 77 20 50 72 69 6d 69 74 69 76 65 56 61 6c 75 65 28 29 3b | minValue.=.new.PrimitiveValue(); |
| d560 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 78 56 61 6c 75 65 20 3d 20 6e 65 77 | ..............var.maxValue.=.new |
| d580 | 20 50 72 69 6d 69 74 69 76 65 56 61 6c 75 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .PrimitiveValue();.............. |
| d5a0 | 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 | if.(attribute.!=.null).......... |
| d5c0 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 6e 56 61 6c 75 65 20 | ....{..................minValue. |
| d5e0 | 3d 20 50 72 69 6d 69 74 69 76 65 56 61 6c 75 65 2e 46 72 6f 6d 4f 62 6a 65 63 74 28 61 74 74 72 | =.PrimitiveValue.FromObject(attr |
| d600 | 69 62 75 74 65 2e 6d 69 6e 56 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ibute.minValue);................ |
| d620 | 20 20 6d 61 78 56 61 6c 75 65 20 3d 20 50 72 69 6d 69 74 69 76 65 56 61 6c 75 65 2e 46 72 6f 6d | ..maxValue.=.PrimitiveValue.From |
| d640 | 4f 62 6a 65 63 74 28 61 74 74 72 69 62 75 74 65 2e 6d 61 78 56 61 6c 75 65 29 3b 0d 0a 20 20 20 | Object(attribute.maxValue);..... |
| d660 | 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e | .........}................return |
| d680 | 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | .new.ControlItem..............{. |
| d6a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 20 3d 20 6e 65 77 20 49 6e 74 65 | .................name.=.new.Inte |
| d6c0 | 72 6e 65 64 53 74 72 69 6e 67 28 6e 61 6d 65 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | rnedString(name),............... |
| d6e0 | 20 20 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 64 69 73 70 6c 61 79 4e 61 6d 65 2c 0d 0a 20 | ...displayName.=.displayName,... |
| d700 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 68 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 20 | ...............shortDisplayName. |
| d720 | 3d 20 73 68 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | =.shortDisplayName,............. |
| d740 | 20 20 20 20 20 6c 61 79 6f 75 74 20 3d 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 | .....layout.=.new.InternedString |
| d760 | 28 6c 61 79 6f 75 74 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 69 61 | (layout),..................varia |
| d780 | 6e 74 73 20 3d 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 76 61 72 69 61 6e 74 | nts.=.new.InternedString(variant |
| d7a0 | 73 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 65 53 74 61 74 65 46 72 6f | s),..................useStateFro |
| d7c0 | 6d 20 3d 20 75 73 65 53 74 61 74 65 46 72 6f 6d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | m.=.useStateFrom,............... |
| d7e0 | 20 20 20 66 6f 72 6d 61 74 20 3d 20 66 6f 72 6d 61 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ...format.=.format,............. |
| d800 | 20 20 20 20 20 6f 66 66 73 65 74 20 3d 20 6f 66 66 73 65 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 | .....offset.=.offset,........... |
| d820 | 20 20 20 20 20 20 20 62 69 74 20 3d 20 62 69 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .......bit.=.bit,............... |
| d840 | 20 20 20 73 69 7a 65 49 6e 42 69 74 73 20 3d 20 73 69 7a 65 49 6e 42 69 74 73 2c 0d 0a 20 20 20 | ...sizeInBits.=.sizeInBits,..... |
| d860 | 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 6e 65 77 20 52 65 | .............parameters.=.new.Re |
| d880 | 61 64 4f 6e 6c 79 41 72 72 61 79 3c 4e 61 6d 65 64 56 61 6c 75 65 3e 28 70 61 72 61 6d 65 74 65 | adOnlyArray<NamedValue>(paramete |
| d8a0 | 72 73 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 63 65 73 73 6f 72 73 | rs),..................processors |
| d8c0 | 20 3d 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 4e 61 6d 65 41 6e 64 50 61 72 61 | .=.new.ReadOnlyArray<NameAndPara |
| d8e0 | 6d 65 74 65 72 73 3e 28 70 72 6f 63 65 73 73 6f 72 73 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 | meters>(processors),............ |
| d900 | 20 20 20 20 20 20 75 73 61 67 65 73 20 3d 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 | ......usages.=.new.ReadOnlyArray |
| d920 | 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 75 73 61 67 65 73 29 2c 0d 0a 20 20 20 20 20 | <InternedString>(usages),....... |
| d940 | 20 20 20 20 20 20 20 20 20 20 20 61 6c 69 61 73 65 73 20 3d 20 6e 65 77 20 52 65 61 64 4f 6e 6c | ...........aliases.=.new.ReadOnl |
| d960 | 79 41 72 72 61 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 61 6c 69 61 73 65 73 29 2c | yArray<InternedString>(aliases), |
| d980 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 69 | ..................isModifyingExi |
| d9a0 | 73 74 69 6e 67 43 6f 6e 74 72 6f 6c 20 3d 20 69 73 4d 6f 64 69 66 79 69 6e 67 43 68 69 6c 64 43 | stingControl.=.isModifyingChildC |
| d9c0 | 6f 6e 74 72 6f 6c 42 79 50 61 74 68 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 | ontrolByPath,..................i |
| d9e0 | 73 46 69 72 73 74 44 65 66 69 6e 65 64 49 6e 54 68 69 73 4c 61 79 6f 75 74 20 3d 20 74 72 75 65 | sFirstDefinedInThisLayout.=.true |
| da00 | 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4e 6f 69 73 79 20 3d 20 69 73 4e | ,..................isNoisy.=.isN |
| da20 | 6f 69 73 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 53 79 6e 74 68 65 74 | oisy,..................isSynthet |
| da40 | 69 63 20 3d 20 69 73 53 79 6e 74 68 65 74 69 63 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ic.=.isSynthetic,............... |
| da60 | 20 20 20 61 72 72 61 79 53 69 7a 65 20 3d 20 61 72 72 61 79 53 69 7a 65 2c 0d 0a 20 20 20 20 20 | ...arraySize.=.arraySize,....... |
| da80 | 20 20 20 20 20 20 20 20 20 20 20 64 65 66 61 75 6c 74 53 74 61 74 65 20 3d 20 64 65 66 61 75 6c | ...........defaultState.=.defaul |
| daa0 | 74 53 74 61 74 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 6e 56 61 6c 75 | tState,..................minValu |
| dac0 | 65 20 3d 20 6d 69 6e 56 61 6c 75 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d | e.=.minValue,..................m |
| dae0 | 61 78 56 61 6c 75 65 20 3d 20 6d 61 78 56 61 6c 75 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | axValue.=.maxValue,............. |
| db00 | 20 7d 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 | .};..........}............////RE |
| db20 | 56 49 45 57 3a 20 74 68 69 73 20 74 65 6e 64 73 20 74 6f 20 63 61 75 73 65 20 73 75 72 70 72 69 | VIEW:.this.tends.to.cause.surpri |
| db40 | 73 65 73 3b 20 69 73 20 69 74 20 77 6f 72 74 68 20 69 74 73 20 63 6f 73 74 3f 0d 0a 20 20 20 20 | ses;.is.it.worth.its.cost?...... |
| db60 | 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 49 6e 66 65 72 4c | ....private.static.string.InferL |
| db80 | 61 79 6f 75 74 46 72 6f 6d 56 61 6c 75 65 54 79 70 65 28 54 79 70 65 20 74 79 70 65 29 0d 0a 20 | ayoutFromValueType(Type.type)... |
| dba0 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 | .......{..............var.layout |
| dbc0 | 20 3d 20 73 5f 4c 61 79 6f 75 74 73 2e 54 72 79 46 69 6e 64 4c 61 79 6f 75 74 46 6f 72 54 79 70 | .=.s_Layouts.TryFindLayoutForTyp |
| dbe0 | 65 28 74 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 | e(type);..............if.(layout |
| dc00 | 2e 49 73 45 6d 70 74 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | .IsEmpty())..............{...... |
| dc20 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 79 70 65 4e 61 6d 65 20 3d 20 6e 65 77 20 49 | ............var.typeName.=.new.I |
| dc40 | 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 74 79 70 65 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 | nternedString(type.Name);....... |
| dc60 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 5f 4c 61 79 6f 75 74 73 2e 48 61 73 4c 61 79 6f | ...........if.(s_Layouts.HasLayo |
| dc80 | 75 74 28 74 79 70 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ut(typeName))................... |
| dca0 | 20 20 20 6c 61 79 6f 75 74 20 3d 20 74 79 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 | ...layout.=.typeName;........... |
| dcc0 | 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 79 70 65 2e 4e 61 6d 65 2e 45 6e 64 73 57 69 | .......else.if.(type.Name.EndsWi |
| dce0 | 74 68 28 22 43 6f 6e 74 72 6f 6c 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | th("Control")).................. |
| dd00 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 | {......................typeName. |
| dd20 | 3d 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 74 79 70 65 2e 4e 61 6d 65 2e 53 | =.new.InternedString(type.Name.S |
| dd40 | 75 62 73 74 72 69 6e 67 28 30 2c 20 74 79 70 65 2e 4e 61 6d 65 2e 4c 65 6e 67 74 68 20 2d 20 22 | ubstring(0,.type.Name.Length.-." |
| dd60 | 43 6f 6e 74 72 6f 6c 22 2e 4c 65 6e 67 74 68 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | Control".Length));.............. |
| dd80 | 20 20 20 20 20 20 20 20 69 66 20 28 73 5f 4c 61 79 6f 75 74 73 2e 48 61 73 4c 61 79 6f 75 74 28 | ........if.(s_Layouts.HasLayout( |
| dda0 | 74 79 70 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | typeName))...................... |
| ddc0 | 20 20 20 20 6c 61 79 6f 75 74 20 3d 20 74 79 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 | ....layout.=.typeName;.......... |
| dde0 | 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 | ........}..............}........ |
| de00 | 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d | ......return.layout;..........}. |
| de20 | 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 | ...........///.<summary>........ |
| de40 | 20 20 2f 2f 2f 20 4d 65 72 67 65 20 74 68 65 20 73 65 74 74 69 6e 67 73 20 66 72 6f 6d 20 3c 70 | ..///.Merge.the.settings.from.<p |
| de60 | 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 6f 74 68 65 72 22 2f 3e 20 69 6e 74 6f 20 74 68 65 20 | aramref.name="other"/>.into.the. |
| de80 | 6c 61 79 6f 75 74 20 73 75 63 68 20 74 68 61 74 20 74 68 65 79 20 62 65 63 6f 6d 65 0d 0a 20 20 | layout.such.that.they.become.... |
| dea0 | 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 62 61 73 65 20 73 65 74 74 69 6e 67 73 2e 0d 0a 20 20 | ......///.the.base.settings..... |
| dec0 | 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f | ......///.</summary>..........// |
| dee0 | 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6f 74 68 65 72 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a | /.<param.name="other"></param>.. |
| df00 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f | ........///.<remarks>........../ |
| df20 | 2f 2f 20 54 68 69 73 20 69 73 20 74 68 65 20 63 65 6e 74 72 61 6c 20 6d 65 74 68 6f 64 20 66 6f | //.This.is.the.central.method.fo |
| df40 | 72 20 61 6c 6c 6f 77 69 6e 67 20 6c 61 79 6f 75 74 73 20 74 6f 20 27 69 6e 68 65 72 69 74 27 20 | r.allowing.layouts.to.'inherit'. |
| df60 | 73 65 74 74 69 6e 67 73 20 66 72 6f 6d 20 74 68 65 69 72 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | settings.from.their........../// |
| df80 | 20 62 61 73 65 20 6c 61 79 6f 75 74 2e 20 49 74 20 77 69 6c 6c 20 6d 65 72 67 65 20 74 68 65 20 | .base.layout..It.will.merge.the. |
| dfa0 | 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 6f | information.in.<paramref.name="o |
| dfc0 | 74 68 65 72 22 2f 3e 20 69 6e 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 0d 0a 20 20 20 20 20 20 | ther"/>.into.the.current........ |
| dfe0 | 20 20 2f 2f 2f 20 6c 61 79 6f 75 74 20 73 75 63 68 20 74 68 61 74 20 74 68 65 20 65 78 69 73 74 | ..///.layout.such.that.the.exist |
| e000 | 69 6e 67 20 73 65 74 74 69 6e 67 73 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 6c 61 79 6f | ing.settings.in.the.current.layo |
| e020 | 75 74 20 61 63 74 73 20 61 73 20 69 66 20 61 70 70 6c 69 65 64 20 6f 6e 20 74 6f 70 0d 0a 20 20 | ut.acts.as.if.applied.on.top.... |
| e040 | 20 20 20 20 20 20 2f 2f 2f 20 6f 66 20 74 68 65 20 73 65 74 74 69 6e 67 73 20 69 6e 20 74 68 65 | ......///.of.the.settings.in.the |
| e060 | 20 62 61 73 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d | .base.layout...........///.</rem |
| e080 | 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4d 65 72 67 65 | arks>..........public.void.Merge |
| e0a0 | 4c 61 79 6f 75 74 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 6f 74 68 65 72 29 | Layout(InputControlLayout.other) |
| e0c0 | 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 74 68 | ..........{..............if.(oth |
| e0e0 | 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 | er.==.null)..................thr |
| e100 | 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d | ow.new.ArgumentNullException(nam |
| e120 | 65 6f 66 28 6f 74 68 65 72 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 55 70 | eof(other));................m_Up |
| e140 | 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 20 3d 20 6d 5f 55 70 64 61 74 65 42 65 66 6f 72 | dateBeforeRender.=.m_UpdateBefor |
| e160 | 65 52 65 6e 64 65 72 20 3f 3f 20 6f 74 68 65 72 2e 6d 5f 55 70 64 61 74 65 42 65 66 6f 72 65 52 | eRender.??.other.m_UpdateBeforeR |
| e180 | 65 6e 64 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 56 61 72 69 | ender;................if.(m_Vari |
| e1a0 | 61 6e 74 73 2e 49 73 45 6d 70 74 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ants.IsEmpty())................. |
| e1c0 | 20 6d 5f 56 61 72 69 61 6e 74 73 20 3d 20 6f 74 68 65 72 2e 6d 5f 56 61 72 69 61 6e 74 73 3b 0d | .m_Variants.=.other.m_Variants;. |
| e1e0 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 74 79 70 65 | ...............//.Determine.type |
| e200 | 2e 20 42 61 73 69 63 61 6c 6c 79 2c 20 69 66 20 74 68 65 20 6f 74 68 65 72 20 6c 61 79 6f 75 74 | ..Basically,.if.the.other.layout |
| e220 | 27 73 20 74 79 70 65 20 69 73 20 6d 6f 72 65 20 73 70 65 63 69 66 69 63 0d 0a 20 20 20 20 20 20 | 's.type.is.more.specific........ |
| e240 | 20 20 20 20 20 20 2f 2f 20 74 68 61 6e 20 6f 75 72 20 6f 77 6e 2c 20 77 65 20 73 77 69 74 63 68 | ......//.than.our.own,.we.switch |
| e260 | 20 74 6f 20 74 68 61 74 20 6f 6e 65 2e 20 4f 74 68 65 72 77 69 73 65 20 77 65 20 73 74 61 79 20 | .to.that.one..Otherwise.we.stay. |
| e280 | 6f 6e 20 6f 75 72 20 6f 77 6e 20 74 79 70 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | on.our.own.type...............if |
| e2a0 | 20 28 6d 5f 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .(m_Type.==.null)............... |
| e2c0 | 20 20 20 6d 5f 54 79 70 65 20 3d 20 6f 74 68 65 72 2e 6d 5f 54 79 70 65 3b 0d 0a 20 20 20 20 20 | ...m_Type.=.other.m_Type;....... |
| e2e0 | 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 5f 54 79 70 65 2e 49 73 41 73 73 69 67 6e 61 | .......else.if.(m_Type.IsAssigna |
| e300 | 62 6c 65 46 72 6f 6d 28 6f 74 68 65 72 2e 6d 5f 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 | bleFrom(other.m_Type)).......... |
| e320 | 20 20 20 20 20 20 20 20 6d 5f 54 79 70 65 20 3d 20 6f 74 68 65 72 2e 6d 5f 54 79 70 65 3b 0d 0a | ........m_Type.=.other.m_Type;.. |
| e340 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 6c 61 79 6f 75 74 20 68 | ..............//.If.the.layout.h |
| e360 | 61 73 20 76 61 72 69 61 6e 74 73 20 73 65 74 20 6f 6e 20 69 74 2c 20 77 65 20 77 61 6e 74 20 74 | as.variants.set.on.it,.we.want.t |
| e380 | 6f 20 6d 65 72 67 65 20 61 77 61 79 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 63 6f 6d 69 6e 67 0d | o.merge.away.information.coming. |
| e3a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 66 72 6f 6d 20 27 6f 74 68 65 72 27 20 74 68 61 | .............//.from.'other'.tha |
| e3c0 | 6e 20 69 73 6e 27 74 20 72 65 6c 65 76 61 6e 74 20 74 6f 20 74 68 6f 73 65 20 76 61 72 69 61 6e | n.isn't.relevant.to.those.varian |
| e3e0 | 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 49 73 54 61 72 | ts...............var.layoutIsTar |
| e400 | 67 65 74 69 6e 67 53 70 65 63 69 66 69 63 56 61 72 69 61 6e 74 73 20 3d 20 21 6d 5f 56 61 72 69 | getingSpecificVariants.=.!m_Vari |
| e420 | 61 6e 74 73 2e 49 73 45 6d 70 74 79 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 | ants.IsEmpty();................i |
| e440 | 66 20 28 6d 5f 53 74 61 74 65 46 6f 72 6d 61 74 20 3d 3d 20 6e 65 77 20 46 6f 75 72 43 43 28 29 | f.(m_StateFormat.==.new.FourCC() |
| e460 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 74 61 74 65 46 6f 72 6d 61 74 | )..................m_StateFormat |
| e480 | 20 3d 20 6f 74 68 65 72 2e 6d 5f 53 74 61 74 65 46 6f 72 6d 61 74 3b 0d 0a 0d 0a 20 20 20 20 20 | .=.other.m_StateFormat;......... |
| e4a0 | 20 20 20 20 20 20 20 2f 2f 20 43 6f 6d 62 69 6e 65 20 63 6f 6d 6d 6f 6e 20 75 73 61 67 65 73 2e | .......//.Combine.common.usages. |
| e4c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 6f 6d 6d 6f 6e 55 73 61 67 65 73 20 3d 20 41 | ..............m_CommonUsages.=.A |
| e4e0 | 72 72 61 79 48 65 6c 70 65 72 73 2e 4d 65 72 67 65 28 6f 74 68 65 72 2e 6d 5f 43 6f 6d 6d 6f 6e | rrayHelpers.Merge(other.m_Common |
| e500 | 55 73 61 67 65 73 2c 20 6d 5f 43 6f 6d 6d 6f 6e 55 73 61 67 65 73 29 3b 0d 0a 0d 0a 20 20 20 20 | Usages,.m_CommonUsages);........ |
| e520 | 20 20 20 20 20 20 20 20 2f 2f 20 52 65 74 61 69 6e 20 6c 69 73 74 20 6f 66 20 6f 76 65 72 72 69 | ........//.Retain.list.of.overri |
| e540 | 64 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 70 70 6c 69 65 64 4f 76 65 72 72 | des...............m_AppliedOverr |
| e560 | 69 64 65 73 2e 4d 65 72 67 65 28 6f 74 68 65 72 2e 6d 5f 41 70 70 6c 69 65 64 4f 76 65 72 72 69 | ides.Merge(other.m_AppliedOverri |
| e580 | 64 65 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 68 65 72 69 74 20 | des);................//.Inherit. |
| e5a0 | 64 69 73 70 6c 61 79 20 6e 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 | display.name...............if.(s |
| e5c0 | 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6d 5f 44 69 73 70 6c 61 79 4e 61 6d | tring.IsNullOrEmpty(m_DisplayNam |
| e5e0 | 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 44 69 73 70 6c 61 79 4e 61 | e))..................m_DisplayNa |
| e600 | 6d 65 20 3d 20 6f 74 68 65 72 2e 6d 5f 44 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 0d 0a 20 20 20 | me.=.other.m_DisplayName;....... |
| e620 | 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 65 72 67 65 20 63 6f 6e 74 72 6f 6c 73 2e 0d 0a 20 20 20 | .........//.Merge.controls...... |
| e640 | 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 6f 6e 74 72 6f 6c 73 20 3d 3d 20 6e 75 6c 6c 29 | .........if.(m_Controls.==.null) |
| e660 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............{................. |
| e680 | 20 6d 5f 43 6f 6e 74 72 6f 6c 73 20 3d 20 6f 74 68 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 3b 0d | .m_Controls.=.other.m_Controls;. |
| e6a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 | .............}..............else |
| e6c0 | 20 69 66 20 28 6f 74 68 65 72 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a | .if.(other.m_Controls.!=.null).. |
| e6e0 | 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 | ............{..................v |
| e700 | 61 72 20 62 61 73 65 43 6f 6e 74 72 6f 6c 73 20 3d 20 6f 74 68 65 72 2e 6d 5f 43 6f 6e 74 72 6f | ar.baseControls.=.other.m_Contro |
| e720 | 6c 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 76 65 6e 20 69 | ls;....................//.Even.i |
| e740 | 66 20 74 68 65 20 63 6f 75 6e 74 73 20 6d 61 74 63 68 20 77 65 20 64 6f 6e 27 74 20 6b 6e 6f 77 | f.the.counts.match.we.don't.know |
| e760 | 20 68 6f 77 20 6d 61 6e 79 20 63 6f 6e 74 72 6f 6c 73 20 61 72 65 20 69 6e 20 74 68 65 0d 0a 20 | .how.many.controls.are.in.the... |
| e780 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 65 74 20 75 6e 74 69 6c 20 77 65 20 61 | ...............//.set.until.we.a |
| e7a0 | 63 74 75 61 6c 6c 79 20 67 6f 6e 65 20 74 68 72 6f 75 67 68 20 62 6f 74 68 20 63 6f 6e 74 72 6f | ctually.gone.through.both.contro |
| e7c0 | 6c 20 6c 69 73 74 73 20 61 6e 64 20 6c 6f 6f 6b 65 64 20 61 74 0d 0a 20 20 20 20 20 20 20 20 20 | l.lists.and.looked.at........... |
| e7e0 | 20 20 20 20 20 20 20 2f 2f 20 74 68 65 20 6e 61 6d 65 73 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | .......//.the.names............. |
| e800 | 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c | ........var.controls.=.new.List< |
| e820 | 43 6f 6e 74 72 6f 6c 49 74 65 6d 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ControlItem>();................. |
| e840 | 20 76 61 72 20 62 61 73 65 43 6f 6e 74 72 6f 6c 56 61 72 69 61 6e 74 73 20 3d 20 6e 65 77 20 4c | .var.baseControlVariants.=.new.L |
| e860 | 69 73 74 3c 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ist<string>();.................. |
| e880 | 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 73 68 6f 75 6c 64 20 73 65 74 74 69 6e 67 20 76 61 72 | ..////REVIEW:.should.setting.var |
| e8a0 | 69 61 6e 74 73 20 64 69 72 65 63 74 6c 79 20 6f 6e 20 61 20 6c 61 79 6f 75 74 20 66 6f 72 63 65 | iants.directly.on.a.layout.force |
| e8c0 | 20 74 68 61 74 20 76 61 72 69 61 6e 74 20 74 6f 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 0d 0a | .that.variant.to.automatically.. |
| e8e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 62 65 20 73 | ................////........be.s |
| e900 | 65 74 20 6f 6e 20 65 76 65 72 79 20 63 6f 6e 74 72 6f 6c 20 69 74 65 6d 20 64 69 72 65 63 74 6c | et.on.every.control.item.directl |
| e920 | 79 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 61 74 20 6c 61 79 6f 75 74 3f 0d 0a 0d 0a 20 20 20 | y.defined.in.that.layout?....... |
| e940 | 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 62 6c | .............var.baseControlTabl |
| e960 | 65 20 3d 20 43 72 65 61 74 65 4c 6f 6f 6b 75 70 54 61 62 6c 65 46 6f 72 43 6f 6e 74 72 6f 6c 73 | e.=.CreateLookupTableForControls |
| e980 | 28 62 61 73 65 43 6f 6e 74 72 6f 6c 73 2c 20 62 61 73 65 43 6f 6e 74 72 6f 6c 56 61 72 69 61 6e | (baseControls,.baseControlVarian |
| e9a0 | 74 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 68 69 73 43 6f | ts);..................var.thisCo |
| e9c0 | 6e 74 72 6f 6c 54 61 62 6c 65 20 3d 20 43 72 65 61 74 65 4c 6f 6f 6b 75 70 54 61 62 6c 65 46 6f | ntrolTable.=.CreateLookupTableFo |
| e9e0 | 72 43 6f 6e 74 72 6f 6c 73 28 6d 5f 43 6f 6e 74 72 6f 6c 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 | rControls(m_Controls);.......... |
| ea00 | 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 72 73 74 20 67 6f 20 74 68 72 6f 75 67 68 20 65 76 | ..........//.First.go.through.ev |
| ea20 | 65 72 79 20 63 6f 6e 74 72 6f 6c 20 77 65 20 68 61 76 65 20 69 6e 20 74 68 69 73 20 6c 61 79 6f | ery.control.we.have.in.this.layo |
| ea40 | 75 74 2e 20 41 64 64 20 65 76 65 72 79 20 63 6f 6e 74 72 6f 6c 20 66 72 6f 6d 0d 0a 20 20 20 20 | ut..Add.every.control.from...... |
| ea60 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 60 74 68 69 73 43 6f 6e 74 72 6f 6c 54 61 62 6c 65 | ............//.`thisControlTable |
| ea80 | 60 20 77 68 69 6c 65 20 72 65 6d 6f 76 69 6e 67 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 63 | `.while.removing.corresponding.c |
| eaa0 | 6f 6e 74 72 6f 6c 20 69 74 65 6d 73 20 66 72 6f 6d 20 60 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 | ontrol.items.from.`baseControlTa |
| eac0 | 62 6c 65 60 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 | ble`...................foreach.( |
| eae0 | 76 61 72 20 70 61 69 72 20 69 6e 20 74 68 69 73 43 6f 6e 74 72 6f 6c 54 61 62 6c 65 29 0d 0a 20 | var.pair.in.thisControlTable)... |
| eb00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............{................ |
| eb20 | 20 20 20 20 20 20 69 66 20 28 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 62 6c 65 2e 54 72 79 47 65 | ......if.(baseControlTable.TryGe |
| eb40 | 74 56 61 6c 75 65 28 70 61 69 72 2e 4b 65 79 2c 20 6f 75 74 20 76 61 72 20 62 61 73 65 43 6f 6e | tValue(pair.Key,.out.var.baseCon |
| eb60 | 74 72 6f 6c 49 74 65 6d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | trolItem))...................... |
| eb80 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d | {..........................var.m |
| eba0 | 65 72 67 65 64 4c 61 79 6f 75 74 20 3d 20 70 61 69 72 2e 56 61 6c 75 65 2e 4d 65 72 67 65 28 62 | ergedLayout.=.pair.Value.Merge(b |
| ebc0 | 61 73 65 43 6f 6e 74 72 6f 6c 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | aseControlItem);................ |
| ebe0 | 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 2e 41 64 64 28 6d 65 72 67 65 64 4c 61 79 | ..........controls.Add(mergedLay |
| ec00 | 6f 75 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | out);........................... |
| ec20 | 20 2f 2f 20 52 65 6d 6f 76 65 20 74 68 65 20 65 6e 74 72 79 20 73 6f 20 77 65 20 64 6f 6e 27 74 | .//.Remove.the.entry.so.we.don't |
| ec40 | 20 68 69 74 20 69 74 20 61 67 61 69 6e 20 69 6e 20 74 68 65 20 70 61 73 73 20 74 68 72 6f 75 67 | .hit.it.again.in.the.pass.throug |
| ec60 | 68 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 61 | h..........................//.ba |
| ec80 | 73 65 43 6f 6e 74 72 6f 6c 54 61 62 6c 65 20 62 65 6c 6f 77 2e 0d 0a 20 20 20 20 20 20 20 20 20 | seControlTable.below............ |
| eca0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 62 6c 65 2e | ...............baseControlTable. |
| ecc0 | 52 65 6d 6f 76 65 28 70 61 69 72 2e 4b 65 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | Remove(pair.Key);............... |
| ece0 | 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | .......}......................// |
| ed00 | 2f 2f 52 45 56 49 45 57 3a 20 69 73 20 74 68 69 73 20 72 65 61 6c 6c 79 20 74 68 65 20 6d 6f 73 | //REVIEW:.is.this.really.the.mos |
| ed20 | 74 20 75 73 65 66 75 6c 20 62 65 68 61 76 69 6f 72 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | t.useful.behavior?.............. |
| ed40 | 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 6d 61 79 20 62 65 20 6c 6f 6f 6b 69 6e 67 20 61 74 20 | ........//.We.may.be.looking.at. |
| ed60 | 61 20 63 6f 6e 74 72 6f 6c 20 74 68 61 74 20 69 73 20 75 73 69 6e 67 20 76 61 72 69 61 6e 74 73 | a.control.that.is.using.variants |
| ed80 | 20 6f 6e 20 74 68 65 20 62 61 73 65 20 6c 61 79 6f 75 74 20 62 75 74 0d 0a 20 20 20 20 20 20 20 | .on.the.base.layout.but......... |
| eda0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 73 6e 27 74 20 74 61 72 67 65 74 69 6e 67 20 | .............//.isn't.targeting. |
| edc0 | 73 70 65 63 69 66 69 63 20 76 61 72 69 61 6e 74 73 20 6f 6e 20 74 68 65 20 64 65 72 69 76 65 64 | specific.variants.on.the.derived |
| ede0 | 20 6c 61 79 6f 75 74 2e 20 49 6e 20 74 68 61 74 20 63 61 73 65 2c 20 77 65 0d 0a 20 20 20 20 20 | .layout..In.that.case,.we....... |
| ee00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 61 6e 74 20 74 6f 20 74 61 6b 65 20 65 | ...............//.want.to.take.e |
| ee20 | 61 63 68 20 6f 66 20 74 68 65 20 76 61 72 69 61 6e 74 73 20 66 72 6f 6d 20 74 68 65 20 62 61 73 | ach.of.the.variants.from.the.bas |
| ee40 | 65 20 6c 61 79 6f 75 74 20 61 6e 64 20 6d 65 72 67 65 20 74 68 65 6d 20 77 69 74 68 0d 0a 20 20 | e.layout.and.merge.them.with.... |
| ee60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 65 20 63 6f 6e 74 72 6f 6c | ..................//.the.control |
| ee80 | 20 6c 61 79 6f 75 74 20 69 6e 20 74 68 65 20 64 65 72 69 76 65 64 20 6c 61 79 6f 75 74 2e 0d 0a | .layout.in.the.derived.layout... |
| eea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 70 61 69 | ....................else.if.(pai |
| eec0 | 72 2e 56 61 6c 75 65 2e 76 61 72 69 61 6e 74 73 2e 49 73 45 6d 70 74 79 28 29 20 7c 7c 20 70 61 | r.Value.variants.IsEmpty().||.pa |
| eee0 | 69 72 2e 56 61 6c 75 65 2e 76 61 72 69 61 6e 74 73 20 3d 3d 20 44 65 66 61 75 6c 74 56 61 72 69 | ir.Value.variants.==.DefaultVari |
| ef00 | 61 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | ant)......................{..... |
| ef20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 54 61 72 67 65 | .....................var.isTarge |
| ef40 | 74 69 6e 67 56 61 72 69 61 6e 74 73 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 | tingVariants.=.false;........... |
| ef60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 49 73 54 61 72 67 65 | ...............if.(layoutIsTarge |
| ef80 | 74 69 6e 67 53 70 65 63 69 66 69 63 56 61 72 69 61 6e 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 | tingSpecificVariants)........... |
| efa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............{................ |
| efc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 27 72 65 20 6f 6e 6c 79 20 6c 6f 6f 6b | ..............//.We're.only.look |
| efe0 | 69 6e 67 20 66 6f 72 20 73 70 65 63 69 66 69 63 20 76 61 72 69 61 6e 74 73 20 73 6f 20 74 72 79 | ing.for.specific.variants.so.try |
| f000 | 20 6f 6e 6c 79 20 74 68 61 74 20 74 68 6f 73 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .only.that.those................ |
| f020 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 | ...............for.(var.i.=.0;.i |
| f040 | 20 3c 20 62 61 73 65 43 6f 6e 74 72 6f 6c 56 61 72 69 61 6e 74 73 2e 43 6f 75 6e 74 3b 20 2b 2b | .<.baseControlVariants.Count;.++ |
| f060 | 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | i).............................. |
| f080 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | {............................... |
| f0a0 | 20 20 20 69 66 20 28 56 61 72 69 61 6e 74 73 4d 61 74 63 68 28 6d 5f 56 61 72 69 61 6e 74 73 2e | ...if.(VariantsMatch(m_Variants. |
| f0c0 | 54 6f 4c 6f 77 65 72 28 29 2c 20 62 61 73 65 43 6f 6e 74 72 6f 6c 56 61 72 69 61 6e 74 73 5b 69 | ToLower(),.baseControlVariants[i |
| f0e0 | 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ]))............................. |
| f100 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .....{.......................... |
| f120 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6b 65 79 20 3d 20 24 22 7b 70 61 69 72 2e 4b 65 | ............var.key.=.$"{pair.Ke |
| f140 | 79 7d 40 7b 62 61 73 65 43 6f 6e 74 72 6f 6c 56 61 72 69 61 6e 74 73 5b 69 5d 7d 22 3b 0d 0a 20 | y}@{baseControlVariants[i]}";... |
| f160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
| f180 | 20 20 20 69 66 20 28 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 62 6c 65 2e 54 72 79 47 65 74 56 61 | ...if.(baseControlTable.TryGetVa |
| f1a0 | 6c 75 65 28 6b 65 79 2c 20 6f 75 74 20 62 61 73 65 43 6f 6e 74 72 6f 6c 49 74 65 6d 29 29 0d 0a | lue(key,.out.baseControlItem)).. |
| f1c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
| f1e0 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ....{........................... |
| f200 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 65 72 67 65 64 4c 61 79 6f 75 74 20 | ...............var.mergedLayout. |
| f220 | 3d 20 70 61 69 72 2e 56 61 6c 75 65 2e 4d 65 72 67 65 28 62 61 73 65 43 6f 6e 74 72 6f 6c 49 74 | =.pair.Value.Merge(baseControlIt |
| f240 | 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | em);............................ |
| f260 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 2e 41 64 64 28 6d 65 72 67 65 | ..............controls.Add(merge |
| f280 | 64 4c 61 79 6f 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | dLayout);....................... |
| f2a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 | ...................baseControlTa |
| f2c0 | 62 6c 65 2e 52 65 6d 6f 76 65 28 6b 65 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ble.Remove(key);................ |
| f2e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 54 61 72 67 | ..........................isTarg |
| f300 | 65 74 69 6e 67 56 61 72 69 61 6e 74 73 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 | etingVariants.=.true;........... |
| f320 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 | ...........................}.... |
| f340 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | ..............................}. |
| f360 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a | .............................}.. |
| f380 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 | ........................}....... |
| f3a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 | ...................else......... |
| f3c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .................{.............. |
| f3e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 72 79 20 65 61 63 68 20 76 61 72 69 | ................//.Try.each.vari |
| f400 | 61 6e 74 73 20 70 72 65 73 65 6e 74 20 69 6e 20 74 68 65 20 62 61 73 65 20 6c 61 79 6f 75 74 2e | ants.present.in.the.base.layout. |
| f420 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f | ..............................fo |
| f440 | 72 65 61 63 68 20 28 76 61 72 20 76 61 72 69 61 6e 74 20 69 6e 20 62 61 73 65 43 6f 6e 74 72 6f | reach.(var.variant.in.baseContro |
| f460 | 6c 56 61 72 69 61 6e 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | lVariants)...................... |
| f480 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ........{....................... |
| f4a0 | 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6b 65 79 20 3d 20 24 22 7b 70 61 69 72 2e 4b 65 79 | ...........var.key.=.$"{pair.Key |
| f4c0 | 7d 40 7b 76 61 72 69 61 6e 74 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | }@{variant}";................... |
| f4e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 | ...............if.(baseControlTa |
| f500 | 62 6c 65 2e 54 72 79 47 65 74 56 61 6c 75 65 28 6b 65 79 2c 20 6f 75 74 20 62 61 73 65 43 6f 6e | ble.TryGetValue(key,.out.baseCon |
| f520 | 74 72 6f 6c 49 74 65 6d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | trolItem))...................... |
| f540 | 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ............{................... |
| f560 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 65 72 67 65 64 4c 61 79 | ...................var.mergedLay |
| f580 | 6f 75 74 20 3d 20 70 61 69 72 2e 56 61 6c 75 65 2e 4d 65 72 67 65 28 62 61 73 65 43 6f 6e 74 72 | out.=.pair.Value.Merge(baseContr |
| f5a0 | 6f 6c 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | olItem);........................ |
| f5c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 2e 41 64 64 28 6d 65 72 67 65 | ..............controls.Add(merge |
| f5e0 | 64 4c 61 79 6f 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | dLayout);....................... |
| f600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 62 6c 65 2e | ...............baseControlTable. |
| f620 | 52 65 6d 6f 76 65 28 6b 65 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Remove(key);.................... |
| f640 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 54 61 72 67 65 74 69 6e 67 56 61 72 | ..................isTargetingVar |
| f660 | 69 61 6e 74 73 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | iants.=.true;................... |
| f680 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............}................ |
| f6a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............}................. |
| f6c0 | 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .........}...................... |
| f6e0 | 20 20 20 20 20 20 2f 2f 20 4f 6b 61 79 2c 20 74 68 69 73 20 63 6f 6e 74 72 6f 6c 20 69 74 65 6d | ......//.Okay,.this.control.item |
| f700 | 20 69 73 6e 27 74 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 61 6e 79 74 68 69 6e 67 | .isn't.corresponding.to.anything |
| f720 | 20 69 6e 20 74 68 65 20 62 61 73 65 20 6c 61 79 6f 75 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .in.the.base.layout............. |
| f740 | 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 6f 20 6a 75 73 74 20 61 64 64 20 69 74 20 61 | .............//.so.just.add.it.a |
| f760 | 73 20 69 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 | s.is...........................i |
| f780 | 66 20 28 21 69 73 54 61 72 67 65 74 69 6e 67 56 61 72 69 61 6e 74 73 29 0d 0a 20 20 20 20 20 20 | f.(!isTargetingVariants)........ |
| f7a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 2e 41 | ......................controls.A |
| f7c0 | 64 64 28 70 61 69 72 2e 56 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | dd(pair.Value);................. |
| f7e0 | 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 | .....}......................//.W |
| f800 | 65 20 6d 61 79 20 62 65 20 6c 6f 6f 6b 69 6e 67 20 61 74 20 61 20 63 6f 6e 74 72 6f 6c 20 74 68 | e.may.be.looking.at.a.control.th |
| f820 | 61 74 20 69 73 20 74 61 72 67 65 74 69 6e 67 20 61 20 73 70 65 63 69 66 69 63 20 76 61 72 69 61 | at.is.targeting.a.specific.varia |
| f840 | 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 6e 20 74 68 | nt......................//.in.th |
| f860 | 69 73 20 6c 61 79 6f 75 74 20 62 75 74 20 6e 6f 74 20 74 61 72 67 65 74 69 6e 67 20 61 20 76 61 | is.layout.but.not.targeting.a.va |
| f880 | 72 69 61 6e 74 20 69 6e 20 74 68 65 20 62 61 73 65 20 6c 61 79 6f 75 74 2e 20 57 65 20 73 74 69 | riant.in.the.base.layout..We.sti |
| f8a0 | 6c 6c 20 77 61 6e 74 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ll.want.to...................... |
| f8c0 | 2f 2f 20 6d 65 72 67 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 72 6f 6d 20 74 68 61 74 20 6e | //.merge.information.from.that.n |
| f8e0 | 6f 6e 2d 74 61 72 67 65 74 65 64 20 62 61 73 65 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 | on-targeted.base.control........ |
| f900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 62 61 73 65 43 6f 6e 74 | ...............else.if.(baseCont |
| f920 | 72 6f 6c 54 61 62 6c 65 2e 54 72 79 47 65 74 56 61 6c 75 65 28 70 61 69 72 2e 56 61 6c 75 65 2e | rolTable.TryGetValue(pair.Value. |
| f940 | 6e 61 6d 65 2e 54 6f 4c 6f 77 65 72 28 29 2c 20 6f 75 74 20 62 61 73 65 43 6f 6e 74 72 6f 6c 49 | name.ToLower(),.out.baseControlI |
| f960 | 74 65 6d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 | tem))......................{.... |
| f980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 65 72 67 65 64 | ......................var.merged |
| f9a0 | 4c 61 79 6f 75 74 20 3d 20 70 61 69 72 2e 56 61 6c 75 65 2e 4d 65 72 67 65 28 62 61 73 65 43 6f | Layout.=.pair.Value.Merge(baseCo |
| f9c0 | 6e 74 72 6f 6c 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ntrolItem);..................... |
| f9e0 | 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 2e 41 64 64 28 6d 65 72 67 65 64 4c 61 79 6f 75 74 29 3b | .....controls.Add(mergedLayout); |
| fa00 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 43 6f | ..........................baseCo |
| fa20 | 6e 74 72 6f 6c 54 61 62 6c 65 2e 52 65 6d 6f 76 65 28 70 61 69 72 2e 56 61 6c 75 65 2e 6e 61 6d | ntrolTable.Remove(pair.Value.nam |
| fa40 | 65 2e 54 6f 4c 6f 77 65 72 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | e.ToLower());................... |
| fa60 | 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 65 | ...}......................//.See |
| fa80 | 6d 73 20 6c 69 6b 65 20 77 65 20 63 61 6e 27 74 20 6d 61 74 63 68 20 69 74 20 74 6f 20 61 20 63 | ms.like.we.can't.match.it.to.a.c |
| faa0 | 6f 6e 74 72 6f 6c 20 69 6e 20 74 68 65 20 62 61 73 65 20 6c 61 79 6f 75 74 2e 20 57 65 20 61 6c | ontrol.in.the.base.layout..We.al |
| fac0 | 72 65 61 64 79 20 6b 6e 6f 77 20 69 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ready.know.it................... |
| fae0 | 20 20 20 2f 2f 20 6d 75 73 74 20 68 61 76 65 20 61 20 76 61 72 69 61 6e 74 73 20 73 65 74 74 69 | ...//.must.have.a.variants.setti |
| fb00 | 6e 67 20 28 62 65 63 61 75 73 65 20 77 65 20 63 68 65 63 6b 65 64 20 61 62 6f 76 65 29 20 73 6f | ng.(because.we.checked.above).so |
| fb20 | 20 69 66 20 74 68 65 20 76 61 72 69 61 6e 74 73 20 73 65 74 74 69 6e 67 0d 0a 20 20 20 20 20 20 | .if.the.variants.setting........ |
| fb40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 64 6f 65 73 6e 27 74 20 70 72 65 76 65 6e 74 | ..............//.doesn't.prevent |
| fb60 | 20 75 73 2c 20 6a 75 73 74 20 69 6e 63 6c 75 64 65 20 74 68 65 20 63 6f 6e 74 72 6f 6c 2e 20 49 | .us,.just.include.the.control..I |
| fb80 | 74 27 73 20 6d 6f 73 74 20 6c 69 6b 65 6c 79 20 61 20 70 61 74 68 2d 6d 6f 64 69 66 79 69 6e 67 | t's.most.likely.a.path-modifying |
| fba0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 63 6f 6e 74 72 6f 6c | ......................//.control |
| fbc0 | 20 28 65 2e 67 2e 20 22 72 69 67 68 74 53 74 69 63 6b 2f 78 22 29 2e 0d 0a 20 20 20 20 20 20 20 | .(e.g.."rightStick/x").......... |
| fbe0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 56 61 72 69 61 6e 74 73 4d 61 | .............else.if.(VariantsMa |
| fc00 | 74 63 68 28 6d 5f 56 61 72 69 61 6e 74 73 2c 20 70 61 69 72 2e 56 61 6c 75 65 2e 76 61 72 69 61 | tch(m_Variants,.pair.Value.varia |
| fc20 | 6e 74 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 | nts))......................{.... |
| fc40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 2e 41 | ......................controls.A |
| fc60 | 64 64 28 70 61 69 72 2e 56 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | dd(pair.Value);................. |
| fc80 | 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 | .....}..................}....... |
| fca0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 6e 64 20 74 68 65 6e 20 67 6f 20 74 68 72 6f | .............//.And.then.go.thro |
| fcc0 | 75 67 68 20 61 6c 6c 20 74 68 65 20 63 6f 6e 74 72 6f 6c 73 20 69 6e 20 74 68 65 20 62 61 73 65 | ugh.all.the.controls.in.the.base |
| fce0 | 20 61 6e 64 20 74 61 6b 65 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f | .and.take.the................../ |
| fd00 | 2f 20 6f 6e 65 73 20 77 65 27 72 65 20 6d 69 73 73 69 6e 67 2e 20 57 65 27 76 65 20 61 6c 72 65 | /.ones.we're.missing..We've.alre |
| fd20 | 61 64 79 20 72 65 6d 6f 76 65 64 20 61 6c 6c 20 74 68 65 20 6f 6e 65 73 20 74 68 61 74 20 69 6e | ady.removed.all.the.ones.that.in |
| fd40 | 74 65 72 73 65 63 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 6e 64 20 | tersect..................//.and. |
| fd60 | 68 61 64 20 74 6f 20 62 65 20 6d 65 72 67 65 64 20 73 6f 20 74 68 65 20 72 65 73 74 20 77 65 20 | had.to.be.merged.so.the.rest.we. |
| fd80 | 63 61 6e 20 6a 75 73 74 20 73 6c 75 72 70 20 69 6e 74 6f 20 74 68 65 20 6c 69 73 74 20 61 73 20 | can.just.slurp.into.the.list.as. |
| fda0 | 69 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6c 61 79 6f 75 74 | is...................if.(!layout |
| fdc0 | 49 73 54 61 72 67 65 74 69 6e 67 53 70 65 63 69 66 69 63 56 61 72 69 61 6e 74 73 29 0d 0a 20 20 | IsTargetingSpecificVariants).... |
| fde0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............{................. |
| fe00 | 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 53 74 61 72 74 20 3d 20 63 6f 6e 74 72 6f 6c 73 2e 43 | .....var.indexStart.=.controls.C |
| fe20 | 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 | ount;......................contr |
| fe40 | 6f 6c 73 2e 41 64 64 52 61 6e 67 65 28 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 62 6c 65 2e 56 61 | ols.AddRange(baseControlTable.Va |
| fe60 | 6c 75 65 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | lues);........................// |
| fe80 | 20 4d 61 72 6b 20 74 68 65 20 63 6f 6e 74 72 6f 6c 73 20 61 73 20 62 65 69 6e 67 20 69 6e 68 65 | .Mark.the.controls.as.being.inhe |
| fea0 | 72 69 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 | rited.......................for. |
| fec0 | 28 76 61 72 20 69 20 3d 20 69 6e 64 65 78 53 74 61 72 74 3b 20 69 20 3c 20 63 6f 6e 74 72 6f 6c | (var.i.=.indexStart;.i.<.control |
| fee0 | 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | s.Count;.++i)................... |
| ff00 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 | ...{..........................va |
| ff20 | 72 20 63 6f 6e 74 72 6f 6c 20 3d 20 63 6f 6e 74 72 6f 6c 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 | r.control.=.controls[i];........ |
| ff40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 2e 69 73 46 69 72 73 | ..................control.isFirs |
| ff60 | 74 44 65 66 69 6e 65 64 49 6e 54 68 69 73 4c 61 79 6f 75 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 | tDefinedInThisLayout.=.false;... |
| ff80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 5b | .......................controls[ |
| ffa0 | 69 5d 20 3d 20 63 6f 6e 74 72 6f 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | i].=.control;................... |
| ffc0 | 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 | ...}..................}......... |
| ffe0 | 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | .........else..................{ |
| 10000 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6c 74 65 72 20 | ......................//.Filter. |
| 10020 | 6f 75 74 20 63 6f 6e 74 72 6f 6c 73 20 63 6f 6d 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 62 61 73 | out.controls.coming.from.the.bas |
| 10040 | 65 20 6c 61 79 6f 75 74 20 77 68 69 63 68 20 61 72 65 20 74 61 72 67 65 74 69 6e 67 20 76 61 72 | e.layout.which.are.targeting.var |
| 10060 | 69 61 6e 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 | iants......................//.th |
| 10080 | 61 74 20 77 65 27 72 65 20 6e 6f 74 20 69 6e 74 65 72 65 73 74 65 64 20 69 6e 2e 0d 0a 20 20 20 | at.we're.not.interested.in...... |
| 100a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 53 74 61 72 74 20 | .................var.indexStart. |
| 100c0 | 3d 20 63 6f 6e 74 72 6f 6c 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | =.controls.Count;............... |
| 100e0 | 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 2e 41 64 64 52 61 6e 67 65 28 0d 0a 20 20 20 20 20 | .......controls.AddRange(....... |
| 10100 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 43 6f 6e 74 72 6f 6c 54 61 | ...................baseControlTa |
| 10120 | 62 6c 65 2e 56 61 6c 75 65 73 2e 57 68 65 72 65 28 78 20 3d 3e 20 56 61 72 69 61 6e 74 73 4d 61 | ble.Values.Where(x.=>.VariantsMa |
| 10140 | 74 63 68 28 6d 5f 56 61 72 69 61 6e 74 73 2c 20 78 2e 76 61 72 69 61 6e 74 73 29 29 29 3b 0d 0a | tch(m_Variants,.x.variants)));.. |
| 10160 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 72 6b 20 74 68 | ......................//.Mark.th |
| 10180 | 65 20 63 6f 6e 74 72 6f 6c 73 20 61 73 20 62 65 69 6e 67 20 69 6e 68 65 72 69 74 65 64 2e 0d 0a | e.controls.as.being.inherited... |
| 101a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d | ....................for.(var.i.= |
| 101c0 | 20 69 6e 64 65 78 53 74 61 72 74 3b 20 69 20 3c 20 63 6f 6e 74 72 6f 6c 73 2e 43 6f 75 6e 74 3b | .indexStart;.i.<.controls.Count; |
| 101e0 | 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 | .++i)......................{.... |
| 10200 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f | ......................var.contro |
| 10220 | 6c 20 3d 20 63 6f 6e 74 72 6f 6c 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | l.=.controls[i];................ |
| 10240 | 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 2e 69 73 46 69 72 73 74 44 65 66 69 6e 65 64 | ..........control.isFirstDefined |
| 10260 | 49 6e 54 68 69 73 4c 61 79 6f 75 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 | InThisLayout.=.false;........... |
| 10280 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 5b 69 5d 20 3d 20 63 6f 6e | ...............controls[i].=.con |
| 102a0 | 74 72 6f 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 | trol;......................}.... |
| 102c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............}................. |
| 102e0 | 20 20 20 6d 5f 43 6f 6e 74 72 6f 6c 73 20 3d 20 63 6f 6e 74 72 6f 6c 73 2e 54 6f 41 72 72 61 79 | ...m_Controls.=.controls.ToArray |
| 10300 | 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d | ();..............}..........}... |
| 10320 | 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 44 69 63 74 69 6f 6e 61 | .........private.static.Dictiona |
| 10340 | 72 79 3c 73 74 72 69 6e 67 2c 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 3e 20 43 72 65 61 74 65 4c 6f | ry<string,.ControlItem>.CreateLo |
| 10360 | 6f 6b 75 70 54 61 62 6c 65 46 6f 72 43 6f 6e 74 72 6f 6c 73 28 0d 0a 20 20 20 20 20 20 20 20 20 | okupTableForControls(........... |
| 10380 | 20 20 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 5b 5d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 2c 20 4c | ...ControlItem[].controlItems,.L |
| 103a0 | 69 73 74 3c 73 74 72 69 6e 67 3e 20 76 61 72 69 61 6e 74 73 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 | ist<string>.variants.=.null).... |
| 103c0 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 61 62 6c 65 20 3d | ......{..............var.table.= |
| 103e0 | 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 43 6f 6e 74 72 6f 6c 49 | .new.Dictionary<string,.ControlI |
| 10400 | 74 65 6d 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 | tem>();..............for.(var.i. |
| 10420 | 3d 20 30 3b 20 69 20 3c 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b | =.0;.i.<.controlItems.Length;.++ |
| 10440 | 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | i)..............{............... |
| 10460 | 20 20 20 76 61 72 20 6b 65 79 20 3d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 5b 69 5d 2e 6e 61 6d | ...var.key.=.controlItems[i].nam |
| 10480 | 65 2e 54 6f 4c 6f 77 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | e.ToLower();..................// |
| 104a0 | 20 4e 65 65 64 20 74 6f 20 74 61 6b 65 20 76 61 72 69 61 6e 74 73 20 69 6e 74 6f 20 61 63 63 6f | .Need.to.take.variants.into.acco |
| 104c0 | 75 6e 74 20 61 73 20 77 65 6c 6c 2e 20 4f 74 68 65 72 77 69 73 65 20 74 77 6f 20 76 61 72 69 61 | unt.as.well..Otherwise.two.varia |
| 104e0 | 6e 74 73 20 66 6f 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 22 6c 65 66 | nts.for..................//."lef |
| 10500 | 74 53 74 69 63 6b 22 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 77 69 6c 6c 20 6f 76 65 72 77 | tStick",.for.example,.will.overw |
| 10520 | 72 69 74 65 20 65 61 63 68 20 6f 74 68 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rite.each.other................. |
| 10540 | 20 20 76 61 72 20 69 74 65 6d 56 61 72 69 61 6e 74 73 20 3d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d | ..var.itemVariants.=.controlItem |
| 10560 | 73 5b 69 5d 2e 76 61 72 69 61 6e 74 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | s[i].variants;.................. |
| 10580 | 69 66 20 28 21 69 74 65 6d 56 61 72 69 61 6e 74 73 2e 49 73 45 6d 70 74 79 28 29 20 26 26 20 69 | if.(!itemVariants.IsEmpty().&&.i |
| 105a0 | 74 65 6d 56 61 72 69 61 6e 74 73 20 21 3d 20 44 65 66 61 75 6c 74 56 61 72 69 61 6e 74 29 0d 0a | temVariants.!=.DefaultVariant).. |
| 105c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................{............... |
| 105e0 | 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 72 65 27 73 20 6d 75 6c 74 69 70 6c 65 20 76 61 | .......//.If.there's.multiple.va |
| 10600 | 72 69 61 6e 74 73 20 6f 6e 20 74 68 65 20 63 6f 6e 74 72 6f 6c 2c 20 77 65 20 61 64 64 20 69 74 | riants.on.the.control,.we.add.it |
| 10620 | 20 74 6f 20 74 68 65 20 74 61 62 6c 65 20 6d 75 6c 74 69 70 6c 65 20 74 69 6d 65 73 2e 0d 0a 20 | .to.the.table.multiple.times.... |
| 10640 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 56 61 72 69 61 | ...................if.(itemVaria |
| 10660 | 6e 74 73 2e 54 6f 53 74 72 69 6e 67 28 29 2e 49 6e 64 65 78 4f 66 28 56 61 72 69 61 6e 74 53 65 | nts.ToString().IndexOf(VariantSe |
| 10680 | 70 61 72 61 74 6f 72 5b 30 5d 29 20 21 3d 20 2d 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | parator[0]).!=.-1).............. |
| 106a0 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ........{....................... |
| 106c0 | 20 20 20 76 61 72 20 69 74 65 6d 56 61 72 69 61 6e 74 41 72 72 61 79 20 3d 20 69 74 65 6d 56 61 | ...var.itemVariantArray.=.itemVa |
| 106e0 | 72 69 61 6e 74 73 2e 54 6f 4c 6f 77 65 72 28 29 2e 53 70 6c 69 74 28 56 61 72 69 61 6e 74 53 65 | riants.ToLower().Split(VariantSe |
| 10700 | 70 61 72 61 74 6f 72 5b 30 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | parator[0]);.................... |
| 10720 | 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 6e 61 6d 65 20 69 6e 20 69 74 65 6d 56 | ......foreach.(var.name.in.itemV |
| 10740 | 61 72 69 61 6e 74 41 72 72 61 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ariantArray).................... |
| 10760 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ......{......................... |
| 10780 | 20 20 20 20 20 76 61 72 69 61 6e 74 73 3f 2e 41 64 64 28 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 | .....variants?.Add(name);....... |
| 107a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6b 65 79 20 3d 20 24 22 7b | .......................key.=.$"{ |
| 107c0 | 6b 65 79 7d 40 7b 6e 61 6d 65 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | key}@{name}";................... |
| 107e0 | 20 20 20 20 20 20 20 20 20 20 20 74 61 62 6c 65 5b 6b 65 79 5d 20 3d 20 63 6f 6e 74 72 6f 6c 49 | ...........table[key].=.controlI |
| 10800 | 74 65 6d 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tems[i];........................ |
| 10820 | 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 | ..}............................c |
| 10840 | 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | ontinue;......................}. |
| 10860 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6b 65 79 20 3d 20 24 22 7b | .......................key.=.$"{ |
| 10880 | 6b 65 79 7d 40 7b 69 74 65 6d 56 61 72 69 61 6e 74 73 2e 54 6f 4c 6f 77 65 72 28 29 7d 22 3b 0d | key}@{itemVariants.ToLower()}";. |
| 108a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 69 61 6e 74 73 3f 2e 41 | .....................variants?.A |
| 108c0 | 64 64 28 69 74 65 6d 56 61 72 69 61 6e 74 73 2e 54 6f 4c 6f 77 65 72 28 29 29 3b 0d 0a 20 20 20 | dd(itemVariants.ToLower());..... |
| 108e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............}.................. |
| 10900 | 74 61 62 6c 65 5b 6b 65 79 5d 20 3d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 73 5b 69 5d 3b 0d 0a 20 | table[key].=.controlItems[i];... |
| 10920 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e | ...........}..............return |
| 10940 | 20 74 61 62 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 6e | .table;..........}............in |
| 10960 | 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 56 61 72 69 61 6e 74 73 4d 61 74 63 68 | ternal.static.bool.VariantsMatch |
| 10980 | 28 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 65 78 70 65 63 74 65 64 2c 20 49 6e 74 65 72 6e | (InternedString.expected,.Intern |
| 109a0 | 65 64 53 74 72 69 6e 67 20 61 63 74 75 61 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | edString.actual)..........{..... |
| 109c0 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 56 61 72 69 61 6e 74 73 4d 61 74 63 68 28 65 78 | .........return.VariantsMatch(ex |
| 109e0 | 70 65 63 74 65 64 2e 54 6f 4c 6f 77 65 72 28 29 2c 20 61 63 74 75 61 6c 2e 54 6f 4c 6f 77 65 72 | pected.ToLower(),.actual.ToLower |
| 10a00 | 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 | ());..........}............inter |
| 10a20 | 6e 61 6c 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 56 61 72 69 61 6e 74 73 4d 61 74 63 68 28 73 74 | nal.static.bool.VariantsMatch(st |
| 10a40 | 72 69 6e 67 20 65 78 70 65 63 74 65 64 2c 20 73 74 72 69 6e 67 20 61 63 74 75 61 6c 29 0d 0a 20 | ring.expected,.string.actual)... |
| 10a60 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 | .......{..............////REVIEW |
| 10a80 | 3a 20 64 6f 65 73 20 74 68 69 73 20 6d 61 6b 65 20 73 65 6e 73 65 3f 0d 0a 20 20 20 20 20 20 20 | :.does.this.make.sense?......... |
| 10aa0 | 20 20 20 20 20 2f 2f 20 44 65 66 61 75 6c 74 20 76 61 72 69 61 6e 74 20 77 6f 72 6b 73 20 77 69 | .....//.Default.variant.works.wi |
| 10ac0 | 74 68 20 61 6e 79 20 6f 74 68 65 72 20 65 78 70 65 63 74 65 64 20 76 61 72 69 61 6e 74 2e 0d 0a | th.any.other.expected.variant... |
| 10ae0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 75 61 6c 20 21 3d 20 6e 75 6c 6c 20 26 | ............if.(actual.!=.null.& |
| 10b00 | 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 48 65 6c 70 65 72 73 | &..................StringHelpers |
| 10b20 | 2e 43 68 61 72 61 63 74 65 72 53 65 70 61 72 61 74 65 64 4c 69 73 74 73 48 61 76 65 41 74 4c 65 | .CharacterSeparatedListsHaveAtLe |
| 10b40 | 61 73 74 4f 6e 65 43 6f 6d 6d 6f 6e 45 6c 65 6d 65 6e 74 28 44 65 66 61 75 6c 74 56 61 72 69 61 | astOneCommonElement(DefaultVaria |
| 10b60 | 6e 74 2c 20 61 63 74 75 61 6c 2c 20 56 61 72 69 61 6e 74 53 65 70 61 72 61 74 6f 72 5b 30 5d 29 | nt,.actual,.VariantSeparator[0]) |
| 10b80 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d | )..................return.true;. |
| 10ba0 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 64 6f 6e 27 74 20 65 78 | ...............//.If.we.don't.ex |
| 10bc0 | 70 65 63 74 20 61 20 73 70 65 63 69 66 69 63 20 76 61 72 69 61 6e 74 2c 20 77 65 20 61 63 63 65 | pect.a.specific.variant,.we.acce |
| 10be0 | 70 74 20 61 6e 79 20 76 61 72 69 61 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | pt.any.variant...............if. |
| 10c00 | 28 65 78 70 65 63 74 65 64 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | (expected.==.null).............. |
| 10c20 | 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ....return.true;................ |
| 10c40 | 2f 2f 20 49 66 20 77 65 20 74 68 65 72 65 27 73 20 6e 6f 20 76 61 72 69 61 6e 74 20 73 65 74 20 | //.If.we.there's.no.variant.set. |
| 10c60 | 6f 6e 20 77 68 61 74 20 77 65 20 61 63 74 75 61 6c 20 67 6f 74 2c 20 74 68 65 6e 20 69 74 20 6d | on.what.we.actual.got,.then.it.m |
| 10c80 | 61 74 63 68 65 73 20 65 76 65 6e 20 69 66 20 77 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | atches.even.if.we............../ |
| 10ca0 | 2f 20 65 78 70 65 63 74 20 73 70 65 63 69 66 69 63 20 76 61 72 69 61 6e 74 73 2e 0d 0a 20 20 20 | /.expect.specific.variants...... |
| 10cc0 | 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 75 61 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 | .........if.(actual.==.null).... |
| 10ce0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 | ..............return.true;...... |
| 10d00 | 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 74 63 68 20 69 66 20 74 68 65 20 74 77 6f 20 76 61 | ..........//.Match.if.the.two.va |
| 10d20 | 72 69 61 6e 74 20 73 65 74 73 20 69 6e 74 65 72 73 65 63 74 20 6f 6e 20 61 74 20 6c 65 61 73 74 | riant.sets.intersect.on.at.least |
| 10d40 | 20 6f 6e 65 20 65 6c 65 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | .one.element...............retur |
| 10d60 | 6e 20 53 74 72 69 6e 67 48 65 6c 70 65 72 73 2e 43 68 61 72 61 63 74 65 72 53 65 70 61 72 61 74 | n.StringHelpers.CharacterSeparat |
| 10d80 | 65 64 4c 69 73 74 73 48 61 76 65 41 74 4c 65 61 73 74 4f 6e 65 43 6f 6d 6d 6f 6e 45 6c 65 6d 65 | edListsHaveAtLeastOneCommonEleme |
| 10da0 | 6e 74 28 65 78 70 65 63 74 65 64 2c 20 61 63 74 75 61 6c 2c 20 56 61 72 69 61 6e 74 53 65 70 61 | nt(expected,.actual,.VariantSepa |
| 10dc0 | 72 61 74 6f 72 5b 30 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | rator[0]);..........}........... |
| 10de0 | 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 54 68 72 6f 77 49 66 43 6f 6e 74 | .private.static.void.ThrowIfCont |
| 10e00 | 72 6f 6c 49 74 65 6d 49 73 44 75 70 6c 69 63 61 74 65 28 72 65 66 20 43 6f 6e 74 72 6f 6c 49 74 | rolItemIsDuplicate(ref.ControlIt |
| 10e20 | 65 6d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 45 6e | em.controlItem,..............IEn |
| 10e40 | 75 6d 65 72 61 62 6c 65 3c 43 6f 6e 74 72 6f 6c 49 74 65 6d 3e 20 63 6f 6e 74 72 6f 6c 4c 61 79 | umerable<ControlItem>.controlLay |
| 10e60 | 6f 75 74 73 2c 20 73 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 | outs,.string.layoutName)........ |
| 10e80 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 61 6d 65 20 3d 20 63 6f 6e 74 | ..{..............var.name.=.cont |
| 10ea0 | 72 6f 6c 49 74 65 6d 2e 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 | rolItem.name;..............forea |
| 10ec0 | 63 68 20 28 76 61 72 20 65 78 69 73 74 69 6e 67 20 69 6e 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 | ch.(var.existing.in.controlLayou |
| 10ee0 | 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e | ts)..................if.(string. |
| 10f00 | 43 6f 6d 70 61 72 65 28 6e 61 6d 65 2c 20 65 78 69 73 74 69 6e 67 2e 6e 61 6d 65 2c 20 53 74 72 | Compare(name,.existing.name,.Str |
| 10f20 | 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 4f 72 64 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 29 | ingComparison.OrdinalIgnoreCase) |
| 10f40 | 20 3d 3d 20 30 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 78 | .==.0.&&......................ex |
| 10f60 | 69 73 74 69 6e 67 2e 76 61 72 69 61 6e 74 73 20 3d 3d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 2e 76 | isting.variants.==.controlItem.v |
| 10f80 | 61 72 69 61 6e 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 | ariants)......................th |
| 10fa0 | 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f | row.new.InvalidOperationExceptio |
| 10fc0 | 6e 28 24 22 44 75 70 6c 69 63 61 74 65 20 63 6f 6e 74 72 6f 6c 20 27 7b 6e 61 6d 65 7d 27 20 69 | n($"Duplicate.control.'{name}'.i |
| 10fe0 | 6e 20 6c 61 79 6f 75 74 20 27 7b 6c 61 79 6f 75 74 4e 61 6d 65 7d 27 22 29 3b 0d 0a 20 20 20 20 | n.layout.'{layoutName}'");...... |
| 11000 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 | ....}............internal.static |
| 11020 | 20 76 6f 69 64 20 50 61 72 73 65 48 65 61 64 65 72 46 69 65 6c 64 73 46 72 6f 6d 4a 73 6f 6e 28 | .void.ParseHeaderFieldsFromJson( |
| 11040 | 73 74 72 69 6e 67 20 6a 73 6f 6e 2c 20 6f 75 74 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 | string.json,.out.InternedString. |
| 11060 | 6e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6f 75 74 20 49 6e 6c 69 6e 65 64 41 72 | name,..............out.InlinedAr |
| 11080 | 72 61 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 20 62 61 73 65 4c 61 79 6f 75 74 73 2c | ray<InternedString>.baseLayouts, |
| 110a0 | 20 6f 75 74 20 49 6e 70 75 74 44 65 76 69 63 65 4d 61 74 63 68 65 72 20 64 65 76 69 63 65 4d 61 | .out.InputDeviceMatcher.deviceMa |
| 110c0 | 74 63 68 65 72 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 | tcher)..........{..............v |
| 110e0 | 61 72 20 68 65 61 64 65 72 20 3d 20 4a 73 6f 6e 55 74 69 6c 69 74 79 2e 46 72 6f 6d 4a 73 6f 6e | ar.header.=.JsonUtility.FromJson |
| 11100 | 3c 4c 61 79 6f 75 74 4a 73 6f 6e 4e 61 6d 65 41 6e 64 44 65 73 63 72 69 70 74 6f 72 4f 6e 6c 79 | <LayoutJsonNameAndDescriptorOnly |
| 11120 | 3e 28 6a 73 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 20 3d 20 6e 65 77 | >(json);..............name.=.new |
| 11140 | 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 68 65 61 64 65 72 2e 6e 61 6d 65 29 3b 0d 0a 0d | .InternedString(header.name);... |
| 11160 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 4c 61 79 6f 75 74 73 20 3d 20 6e 65 77 20 49 | .............baseLayouts.=.new.I |
| 11180 | 6e 6c 69 6e 65 64 41 72 72 61 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 29 3b 0d 0a | nlinedArray<InternedString>();.. |
| 111a0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 | ............if.(!string.IsNullOr |
| 111c0 | 45 6d 70 74 79 28 68 65 61 64 65 72 2e 65 78 74 65 6e 64 29 29 0d 0a 20 20 20 20 20 20 20 20 20 | Empty(header.extend))........... |
| 111e0 | 20 20 20 20 20 20 20 62 61 73 65 4c 61 79 6f 75 74 73 2e 41 70 70 65 6e 64 28 6e 65 77 20 49 6e | .......baseLayouts.Append(new.In |
| 11200 | 74 65 72 6e 65 64 53 74 72 69 6e 67 28 68 65 61 64 65 72 2e 65 78 74 65 6e 64 29 29 3b 0d 0a 20 | ternedString(header.extend));... |
| 11220 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 68 65 61 64 65 72 2e 65 78 74 65 6e 64 4d 75 6c 74 | ...........if.(header.extendMult |
| 11240 | 69 70 6c 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 | iple.!=.null)..................f |
| 11260 | 6f 72 65 61 63 68 20 28 76 61 72 20 69 74 65 6d 20 69 6e 20 68 65 61 64 65 72 2e 65 78 74 65 6e | oreach.(var.item.in.header.exten |
| 11280 | 64 4d 75 6c 74 69 70 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | dMultiple)...................... |
| 112a0 | 62 61 73 65 4c 61 79 6f 75 74 73 2e 41 70 70 65 6e 64 28 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 | baseLayouts.Append(new.InternedS |
| 112c0 | 74 72 69 6e 67 28 69 74 65 6d 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 | tring(item));................dev |
| 112e0 | 69 63 65 4d 61 74 63 68 65 72 20 3d 20 68 65 61 64 65 72 2e 64 65 76 69 63 65 2e 54 6f 4d 61 74 | iceMatcher.=.header.device.ToMat |
| 11300 | 63 68 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 53 | cher();..........}............[S |
| 11320 | 65 72 69 61 6c 69 7a 61 62 6c 65 5d 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 | erializable]..........internal.s |
| 11340 | 74 72 75 63 74 20 4c 61 79 6f 75 74 4a 73 6f 6e 4e 61 6d 65 41 6e 64 44 65 73 63 72 69 70 74 6f | truct.LayoutJsonNameAndDescripto |
| 11360 | 72 4f 6e 6c 79 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 | rOnly..........{..............pu |
| 11380 | 62 6c 69 63 20 73 74 72 69 6e 67 20 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 | blic.string.name;..............p |
| 113a0 | 75 62 6c 69 63 20 73 74 72 69 6e 67 20 65 78 74 65 6e 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ublic.string.extend;............ |
| 113c0 | 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 5b 5d 20 65 78 74 65 6e 64 4d 75 6c 74 69 70 6c 65 | ..public.string[].extendMultiple |
| 113e0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 44 65 76 69 63 | ;..............public.InputDevic |
| 11400 | 65 4d 61 74 63 68 65 72 2e 4d 61 74 63 68 65 72 4a 73 6f 6e 20 64 65 76 69 63 65 3b 0d 0a 20 20 | eMatcher.MatcherJson.device;.... |
| 11420 | 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 61 62 6c 65 | ......}............[Serializable |
| 11440 | 5d 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 75 63 74 20 4c 61 79 6f 75 74 | ]..........private.struct.Layout |
| 11460 | 4a 73 6f 6e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 | Json..........{..............//. |
| 11480 | 44 69 73 61 62 6c 65 20 77 61 72 6e 69 6e 67 73 20 74 68 61 74 20 74 68 65 73 65 20 66 69 65 6c | Disable.warnings.that.these.fiel |
| 114a0 | 64 73 20 61 72 65 20 6e 65 76 65 72 20 61 73 73 69 67 6e 65 64 20 74 6f 2e 20 54 68 65 79 20 61 | ds.are.never.assigned.to..They.a |
| 114c0 | 72 65 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 79 20 4a 73 6f 6e 55 74 | re.set..............//.by.JsonUt |
| 114e0 | 69 6c 69 74 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 70 72 61 67 6d 61 20 77 61 72 6e | ility...............#pragma.warn |
| 11500 | 69 6e 67 20 64 69 73 61 62 6c 65 20 30 36 34 39 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | ing.disable.0649..............// |
| 11520 | 20 52 65 53 68 61 72 70 65 72 20 64 69 73 61 62 6c 65 20 4d 65 6d 62 65 72 43 61 6e 42 65 50 72 | .ReSharper.disable.MemberCanBePr |
| 11540 | 69 76 61 74 65 2e 4c 6f 63 61 6c 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | ivate.Local................publi |
| 11560 | 63 20 73 74 72 69 6e 67 20 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c | c.string.name;..............publ |
| 11580 | 69 63 20 73 74 72 69 6e 67 20 65 78 74 65 6e 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 | ic.string.extend;..............p |
| 115a0 | 75 62 6c 69 63 20 73 74 72 69 6e 67 5b 5d 20 65 78 74 65 6e 64 4d 75 6c 74 69 70 6c 65 3b 0d 0a | ublic.string[].extendMultiple;.. |
| 115c0 | 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 66 6f 72 6d 61 74 | ............public.string.format |
| 115e0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 62 65 66 | ;..............public.string.bef |
| 11600 | 6f 72 65 52 65 6e 64 65 72 3b 20 2f 2f 20 43 61 6e 27 74 20 62 65 20 73 69 6d 70 6c 65 20 62 6f | oreRender;.//.Can't.be.simple.bo |
| 11620 | 6f 6c 20 61 73 20 6f 74 68 65 72 77 69 73 65 20 77 65 20 63 61 6e 27 74 20 74 65 6c 6c 20 77 68 | ol.as.otherwise.we.can't.tell.wh |
| 11640 | 65 74 68 65 72 20 69 74 20 77 61 73 20 73 65 74 20 6f 72 20 6e 6f 74 2e 0d 0a 20 20 20 20 20 20 | ether.it.was.set.or.not......... |
| 11660 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 5b 5d 20 63 6f 6d 6d 6f 6e 55 73 61 67 | ......public.string[].commonUsag |
| 11680 | 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 64 | es;..............public.string.d |
| 116a0 | 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | isplayName;..............public. |
| 116c0 | 73 74 72 69 6e 67 20 64 65 73 63 72 69 70 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | string.description;............. |
| 116e0 | 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 74 79 70 65 3b 20 2f 2f 20 54 68 69 73 20 69 73 20 | .public.string.type;.//.This.is. |
| 11700 | 6d 6f 73 74 6c 79 20 66 6f 72 20 77 68 65 6e 20 77 65 20 74 75 72 6e 20 61 72 62 69 74 72 61 72 | mostly.for.when.we.turn.arbitrar |
| 11720 | 79 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 20 69 6e 74 6f 20 4a 53 4f 4e 3b | y.InputControlLayouts.into.JSON; |
| 11740 | 20 6c 65 73 73 20 66 6f 72 20 6c 61 79 6f 75 74 73 20 2a 63 6f 6d 69 6e 67 2a 20 66 72 6f 6d 20 | .less.for.layouts.*coming*.from. |
| 11760 | 4a 53 4f 4e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 | JSON...............public.string |
| 11780 | 20 76 61 72 69 61 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f | .variant;..............public.bo |
| 117a0 | 6f 6c 20 69 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 3b 0d 0a 20 20 20 20 20 | ol.isGenericTypeOfDevice;....... |
| 117c0 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 68 69 64 65 49 6e 55 49 3b 0d 0a 20 20 | .......public.bool.hideInUI;.... |
| 117e0 | 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 4a 73 6f 6e | ..........public.ControlItemJson |
| 11800 | 5b 5d 20 63 6f 6e 74 72 6f 6c 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 | [].controls;................//.R |
| 11820 | 65 53 68 61 72 70 65 72 20 72 65 73 74 6f 72 65 20 4d 65 6d 62 65 72 43 61 6e 42 65 50 72 69 76 | eSharper.restore.MemberCanBePriv |
| 11840 | 61 74 65 2e 4c 6f 63 61 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 70 72 61 67 6d 61 20 77 | ate.Local..............#pragma.w |
| 11860 | 61 72 6e 69 6e 67 20 72 65 73 74 6f 72 65 20 30 36 34 39 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | arning.restore.0649............. |
| 11880 | 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 54 6f 4c | ...public.InputControlLayout.ToL |
| 118a0 | 61 79 6f 75 74 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | ayout()..............{.......... |
| 118c0 | 20 20 20 20 20 20 20 20 2f 2f 20 42 79 20 64 65 66 61 75 6c 74 2c 20 74 68 65 20 74 79 70 65 20 | ........//.By.default,.the.type. |
| 118e0 | 6f 66 20 74 68 65 20 6c 61 79 6f 75 74 20 69 73 20 64 65 74 65 72 6d 69 6e 65 64 20 66 72 6f 6d | of.the.layout.is.determined.from |
| 11900 | 20 74 68 65 20 66 69 72 73 74 20 6c 61 79 6f 75 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .the.first.layout............... |
| 11920 | 20 20 20 2f 2f 20 69 6e 20 69 74 73 20 27 65 78 74 65 6e 64 27 20 70 72 6f 70 65 72 74 79 20 63 | ...//.in.its.'extend'.property.c |
| 11940 | 68 61 69 6e 20 74 68 61 74 20 68 61 73 20 61 20 74 79 70 65 20 73 65 74 2e 20 48 6f 77 65 76 65 | hain.that.has.a.type.set..Howeve |
| 11960 | 72 2c 20 69 66 20 74 68 65 20 6c 61 79 6f 75 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | r,.if.the.layout................ |
| 11980 | 20 20 2f 2f 20 65 78 74 65 6e 64 73 20 6e 6f 74 68 69 6e 67 2c 20 77 65 20 63 61 6e 27 74 20 6b | ..//.extends.nothing,.we.can't.k |
| 119a0 | 6e 6f 77 20 77 68 61 74 20 74 79 70 65 20 74 6f 20 75 73 65 20 66 6f 72 20 69 74 20 73 6f 20 77 | now.what.type.to.use.for.it.so.w |
| 119c0 | 65 20 64 65 66 61 75 6c 74 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | e.default.to..................// |
| 119e0 | 20 49 6e 70 75 74 44 65 76 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 | .InputDevice...................T |
| 11a00 | 79 70 65 20 74 79 70 65 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ype.type.=.null;................ |
| 11a20 | 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 74 68 69 73 | ..if.(!string.IsNullOrEmpty(this |
| 11a40 | 2e 74 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | .type))..................{...... |
| 11a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 20 54 79 70 65 2e 47 65 74 54 | ................type.=.Type.GetT |
| 11a80 | 79 70 65 28 74 68 69 73 2e 74 79 70 65 2c 20 66 61 6c 73 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 | ype(this.type,.false);.......... |
| 11aa0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 | ............if.(type.==.null)... |
| 11ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ...................{............ |
| 11ae0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 28 0d 0a 20 20 20 20 20 20 | ..............Debug.Log(........ |
| 11b00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 43 61 6e 6e 6f 74 20 66 | ......................$"Cannot.f |
| 11b20 | 69 6e 64 20 74 79 70 65 20 27 7b 74 68 69 73 2e 74 79 70 65 7d 27 20 75 73 65 64 20 62 79 20 6c | ind.type.'{this.type}'.used.by.l |
| 11b40 | 61 79 6f 75 74 20 27 7b 6e 61 6d 65 7d 27 3b 20 66 61 6c 6c 69 6e 67 20 62 61 63 6b 20 74 6f 20 | ayout.'{name}';.falling.back.to. |
| 11b60 | 75 73 69 6e 67 20 49 6e 70 75 74 44 65 76 69 63 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | using.InputDevice");............ |
| 11b80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 20 74 79 70 65 6f 66 28 49 6e 70 75 | ..............type.=.typeof(Inpu |
| 11ba0 | 74 44 65 76 69 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d | tDevice);......................} |
| 11bc0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 21 | ......................else.if.(! |
| 11be0 | 74 79 70 65 6f 66 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 29 2e 49 73 41 73 73 69 67 6e 61 62 6c | typeof(InputControl).IsAssignabl |
| 11c00 | 65 46 72 6f 6d 28 74 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eFrom(type)).................... |
| 11c20 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 | ..{..........................thr |
| 11c40 | 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e | ow.new.InvalidOperationException |
| 11c60 | 28 24 22 27 7b 74 68 69 73 2e 74 79 70 65 7d 27 20 75 73 65 64 20 62 79 20 6c 61 79 6f 75 74 20 | ($"'{this.type}'.used.by.layout. |
| 11c80 | 27 7b 6e 61 6d 65 7d 27 20 69 73 20 6e 6f 74 20 61 6e 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 22 | '{name}'.is.not.an.InputControl" |
| 11ca0 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 | );......................}....... |
| 11cc0 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c | ...........}..................el |
| 11ce0 | 73 65 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 65 78 74 65 | se.if.(string.IsNullOrEmpty(exte |
| 11d00 | 6e 64 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d | nd))......................type.= |
| 11d20 | 20 74 79 70 65 6f 66 28 49 6e 70 75 74 44 65 76 69 63 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 | .typeof(InputDevice);........... |
| 11d40 | 20 20 20 20 20 20 20 20 20 2f 2f 20 43 72 65 61 74 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 | .........//.Create.layout....... |
| 11d60 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 20 6e 65 77 20 49 6e 70 | ............var.layout.=.new.Inp |
| 11d80 | 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 28 6e 61 6d 65 2c 20 74 79 70 65 29 0d 0a 20 20 20 | utControlLayout(name,.type)..... |
| 11da0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| 11dc0 | 20 20 20 20 6d 5f 44 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 64 69 73 70 6c 61 79 4e 61 6d 65 2c | ....m_DisplayName.=.displayName, |
| 11de0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 44 65 73 63 72 69 70 74 | ......................m_Descript |
| 11e00 | 69 6f 6e 20 3d 20 64 65 73 63 72 69 70 74 69 6f 6e 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ion.=.description,.............. |
| 11e20 | 20 20 20 20 20 20 20 20 69 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 20 3d 20 | ........isGenericTypeOfDevice.=. |
| 11e40 | 69 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 2c 0d 0a 20 20 20 20 20 20 20 20 | isGenericTypeOfDevice,.......... |
| 11e60 | 20 20 20 20 20 20 20 20 20 20 20 20 68 69 64 65 49 6e 55 49 20 3d 20 68 69 64 65 49 6e 55 49 2c | ............hideInUI.=.hideInUI, |
| 11e80 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 56 61 72 69 61 6e 74 73 | ......................m_Variants |
| 11ea0 | 20 3d 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 76 61 72 69 61 6e 74 29 0d 0a | .=.new.InternedString(variant).. |
| 11ec0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ................};.............. |
| 11ee0 | 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 66 6f | ....if.(!string.IsNullOrEmpty(fo |
| 11f00 | 72 6d 61 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f | rmat))......................layo |
| 11f20 | 75 74 2e 6d 5f 53 74 61 74 65 46 6f 72 6d 61 74 20 3d 20 6e 65 77 20 46 6f 75 72 43 43 28 66 6f | ut.m_StateFormat.=.new.FourCC(fo |
| 11f40 | 72 6d 61 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 42 61 73 | rmat);....................//.Bas |
| 11f60 | 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 | e.layout...................if.(! |
| 11f80 | 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 65 78 74 65 6e 64 29 29 0d 0a 20 | string.IsNullOrEmpty(extend))... |
| 11fa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 6d 5f 42 61 73 65 | ...................layout.m_Base |
| 11fc0 | 4c 61 79 6f 75 74 73 2e 41 70 70 65 6e 64 28 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e | Layouts.Append(new.InternedStrin |
| 11fe0 | 67 28 65 78 74 65 6e 64 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | g(extend));..................if. |
| 12000 | 28 65 78 74 65 6e 64 4d 75 6c 74 69 70 6c 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 | (extendMultiple.!=.null)........ |
| 12020 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 65 6c 65 6d 65 | ..............foreach.(var.eleme |
| 12040 | 6e 74 20 69 6e 20 65 78 74 65 6e 64 4d 75 6c 74 69 70 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 | nt.in.extendMultiple)........... |
| 12060 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 6d 5f 42 61 73 65 4c 61 79 6f | ...............layout.m_BaseLayo |
| 12080 | 75 74 73 2e 41 70 70 65 6e 64 28 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 65 6c | uts.Append(new.InternedString(el |
| 120a0 | 65 6d 65 6e 74 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 42 | ement));....................//.B |
| 120c0 | 65 66 6f 72 65 20 72 65 6e 64 65 72 20 62 65 68 61 76 69 6f 72 2e 0d 0a 20 20 20 20 20 20 20 20 | efore.render.behavior........... |
| 120e0 | 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 | ........if.(!string.IsNullOrEmpt |
| 12100 | 79 28 62 65 66 6f 72 65 52 65 6e 64 65 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | y(beforeRender))................ |
| 12120 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 65 66 | ..{......................var.bef |
| 12140 | 6f 72 65 52 65 6e 64 65 72 4c 6f 77 65 72 43 61 73 65 20 3d 20 62 65 66 6f 72 65 52 65 6e 64 65 | oreRenderLowerCase.=.beforeRende |
| 12160 | 72 2e 54 6f 4c 6f 77 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | r.ToLower();.................... |
| 12180 | 20 20 69 66 20 28 62 65 66 6f 72 65 52 65 6e 64 65 72 4c 6f 77 65 72 43 61 73 65 20 3d 3d 20 22 | ..if.(beforeRenderLowerCase.==." |
| 121a0 | 69 67 6e 6f 72 65 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ignore")........................ |
| 121c0 | 20 20 6c 61 79 6f 75 74 2e 6d 5f 55 70 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 20 3d 20 | ..layout.m_UpdateBeforeRender.=. |
| 121e0 | 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 | false;......................else |
| 12200 | 20 69 66 20 28 62 65 66 6f 72 65 52 65 6e 64 65 72 4c 6f 77 65 72 43 61 73 65 20 3d 3d 20 22 75 | .if.(beforeRenderLowerCase.==."u |
| 12220 | 70 64 61 74 65 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | pdate")......................... |
| 12240 | 20 6c 61 79 6f 75 74 2e 6d 5f 55 70 64 61 74 65 42 65 66 6f 72 65 52 65 6e 64 65 72 20 3d 20 74 | .layout.m_UpdateBeforeRender.=.t |
| 12260 | 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a | rue;......................else.. |
| 12280 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 | ........................throw.ne |
| 122a0 | 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 24 22 49 6e | w.InvalidOperationException($"In |
| 122c0 | 76 61 6c 69 64 20 62 65 66 6f 72 65 52 65 6e 64 65 72 20 73 65 74 74 69 6e 67 20 27 7b 62 65 66 | valid.beforeRender.setting.'{bef |
| 122e0 | 6f 72 65 52 65 6e 64 65 72 7d 27 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | oreRender}'");.................. |
| 12300 | 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 63 6f 6d 6d | }....................//.Add.comm |
| 12320 | 6f 6e 20 75 73 61 67 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | on.usages...................if.( |
| 12340 | 63 6f 6d 6d 6f 6e 55 73 61 67 65 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 | commonUsages.!=.null)........... |
| 12360 | 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 6d 5f 43 6f 6d 6d 6f 6e 55 73 61 67 65 73 | ...........layout.m_CommonUsages |
| 12380 | 20 3d 20 41 72 72 61 79 48 65 6c 70 65 72 73 2e 53 65 6c 65 63 74 28 63 6f 6d 6d 6f 6e 55 73 61 | .=.ArrayHelpers.Select(commonUsa |
| 123a0 | 67 65 73 2c 20 78 20 3d 3e 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 78 29 29 | ges,.x.=>.new.InternedString(x)) |
| 123c0 | 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 63 6f 6e 74 | ;....................//.Add.cont |
| 123e0 | 72 6f 6c 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 | rols...................if.(contr |
| 12400 | 6f 6c 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | ols.!=.null)..................{. |
| 12420 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c | .....................var.control |
| 12440 | 4c 61 79 6f 75 74 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 43 6f 6e 74 72 6f 6c 49 74 65 6d 3e 28 | Layouts.=.new.List<ControlItem>( |
| 12460 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 | );......................foreach. |
| 12480 | 28 76 61 72 20 63 6f 6e 74 72 6f 6c 20 69 6e 20 63 6f 6e 74 72 6f 6c 73 29 0d 0a 20 20 20 20 20 | (var.control.in.controls)....... |
| 124a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............{................ |
| 124c0 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 | ..........if.(string.IsNullOrEmp |
| 124e0 | 74 79 28 63 6f 6e 74 72 6f 6c 2e 6e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ty(control.name))............... |
| 12500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 | ...............throw.new.Invalid |
| 12520 | 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 24 22 43 6f 6e 74 72 6f 6c 20 77 69 74 | OperationException($"Control.wit |
| 12540 | 68 20 6e 6f 20 6e 61 6d 65 20 69 6e 20 6c 61 79 6f 75 74 20 27 7b 6e 61 6d 65 7d 22 29 3b 0d 0a | h.no.name.in.layout.'{name}");.. |
| 12560 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 | ........................var.cont |
| 12580 | 72 6f 6c 4c 61 79 6f 75 74 20 3d 20 63 6f 6e 74 72 6f 6c 2e 54 6f 4c 61 79 6f 75 74 28 29 3b 0d | rolLayout.=.control.ToLayout();. |
| 125a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 49 66 | .........................ThrowIf |
| 125c0 | 43 6f 6e 74 72 6f 6c 49 74 65 6d 49 73 44 75 70 6c 69 63 61 74 65 28 72 65 66 20 63 6f 6e 74 72 | ControlItemIsDuplicate(ref.contr |
| 125e0 | 6f 6c 4c 61 79 6f 75 74 2c 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2c 20 6c 61 79 6f 75 74 | olLayout,.controlLayouts,.layout |
| 12600 | 2e 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .name);......................... |
| 12620 | 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2e 41 64 64 28 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 | .controlLayouts.Add(controlLayou |
| 12640 | 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 | t);......................}...... |
| 12660 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 6d 5f 43 6f 6e 74 72 6f 6c | ................layout.m_Control |
| 12680 | 73 20 3d 20 63 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2e 54 6f 41 72 72 61 79 28 29 3b 0d 0a 20 | s.=.controlLayouts.ToArray();... |
| 126a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ...............}................ |
| 126c0 | 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ....return.layout;.............. |
| 126e0 | 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 4c | }................public.static.L |
| 12700 | 61 79 6f 75 74 4a 73 6f 6e 20 46 72 6f 6d 4c 61 79 6f 75 74 28 49 6e 70 75 74 43 6f 6e 74 72 6f | ayoutJson.FromLayout(InputContro |
| 12720 | 6c 4c 61 79 6f 75 74 20 6c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | lLayout.layout)..............{.. |
| 12740 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 4c 61 79 6f 75 | ................return.new.Layou |
| 12760 | 74 4a 73 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | tJson..................{........ |
| 12780 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 20 3d 20 6c 61 79 6f 75 74 2e 6d 5f 4e 61 | ..............name.=.layout.m_Na |
| 127a0 | 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 20 | me,......................type.=. |
| 127c0 | 6c 61 79 6f 75 74 2e 74 79 70 65 2e 41 73 73 65 6d 62 6c 79 51 75 61 6c 69 66 69 65 64 4e 61 6d | layout.type.AssemblyQualifiedNam |
| 127e0 | 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 69 61 6e 74 20 | e,......................variant. |
| 12800 | 3d 20 6c 61 79 6f 75 74 2e 6d 5f 56 61 72 69 61 6e 74 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 | =.layout.m_Variants,............ |
| 12820 | 20 20 20 20 20 20 20 20 20 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 6c 61 79 6f 75 74 2e 6d | ..........displayName.=.layout.m |
| 12840 | 5f 44 69 73 70 6c 61 79 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | _DisplayName,................... |
| 12860 | 20 20 20 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 6c 61 79 6f 75 74 2e 6d 5f 44 65 73 63 72 69 | ...description.=.layout.m_Descri |
| 12880 | 70 74 69 6f 6e 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 47 65 | ption,......................isGe |
| 128a0 | 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 20 3d 20 6c 61 79 6f 75 74 2e 69 73 47 65 6e | nericTypeOfDevice.=.layout.isGen |
| 128c0 | 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ericTypeOfDevice,............... |
| 128e0 | 20 20 20 20 20 20 20 68 69 64 65 49 6e 55 49 20 3d 20 6c 61 79 6f 75 74 2e 68 69 64 65 49 6e 55 | .......hideInUI.=.layout.hideInU |
| 12900 | 49 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 78 74 65 6e 64 20 3d | I,......................extend.= |
| 12920 | 20 6c 61 79 6f 75 74 2e 6d 5f 42 61 73 65 4c 61 79 6f 75 74 73 2e 6c 65 6e 67 74 68 20 3d 3d 20 | .layout.m_BaseLayouts.length.==. |
| 12940 | 31 20 3f 20 6c 61 79 6f 75 74 2e 6d 5f 42 61 73 65 4c 61 79 6f 75 74 73 5b 30 5d 2e 54 6f 53 74 | 1.?.layout.m_BaseLayouts[0].ToSt |
| 12960 | 72 69 6e 67 28 29 20 3a 20 6e 75 6c 6c 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ring().:.null,.................. |
| 12980 | 20 20 20 20 65 78 74 65 6e 64 4d 75 6c 74 69 70 6c 65 20 3d 20 6c 61 79 6f 75 74 2e 6d 5f 42 61 | ....extendMultiple.=.layout.m_Ba |
| 129a0 | 73 65 4c 61 79 6f 75 74 73 2e 6c 65 6e 67 74 68 20 3e 20 31 20 3f 20 6c 61 79 6f 75 74 2e 6d 5f | seLayouts.length.>.1.?.layout.m_ |
| 129c0 | 42 61 73 65 4c 61 79 6f 75 74 73 2e 54 6f 41 72 72 61 79 28 78 20 3d 3e 20 78 2e 54 6f 53 74 72 | BaseLayouts.ToArray(x.=>.x.ToStr |
| 129e0 | 69 6e 67 28 29 29 20 3a 20 6e 75 6c 6c 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ing()).:.null,.................. |
| 12a00 | 20 20 20 20 66 6f 72 6d 61 74 20 3d 20 6c 61 79 6f 75 74 2e 73 74 61 74 65 46 6f 72 6d 61 74 2e | ....format.=.layout.stateFormat. |
| 12a20 | 54 6f 53 74 72 69 6e 67 28 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ToString(),..................... |
| 12a40 | 20 63 6f 6e 74 72 6f 6c 73 20 3d 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 4a 73 6f 6e 2e 46 72 6f 6d | .controls.=.ControlItemJson.From |
| 12a60 | 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 28 6c 61 79 6f 75 74 2e 6d 5f 43 6f 6e 74 72 6f 6c 73 29 2c | ControlItems(layout.m_Controls), |
| 12a80 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ..................};............ |
| 12aa0 | 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 | ..}..........}............//.Thi |
| 12ac0 | 73 20 69 73 20 61 20 63 6c 61 73 73 20 69 6e 73 74 65 61 64 20 6f 66 20 61 20 73 74 72 75 63 74 | s.is.a.class.instead.of.a.struct |
| 12ae0 | 20 73 6f 20 74 68 61 74 20 77 65 20 63 61 6e 20 61 73 73 69 67 6e 20 27 6f 66 66 73 65 74 27 20 | .so.that.we.can.assign.'offset'. |
| 12b00 | 61 20 63 75 73 74 6f 6d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 64 65 66 61 75 6c 74 20 76 61 6c | a.custom..........//.default.val |
| 12b20 | 75 65 2e 20 4f 74 68 65 72 77 69 73 65 20 77 65 20 63 61 6e 27 74 20 74 65 6c 6c 20 77 68 65 74 | ue..Otherwise.we.can't.tell.whet |
| 12b40 | 68 65 72 20 74 68 65 20 75 73 65 72 20 68 61 73 20 61 63 74 75 61 6c 6c 79 20 73 65 74 20 69 74 | her.the.user.has.actually.set.it |
| 12b60 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 6f 72 20 6e 6f 74 20 28 30 20 69 73 20 61 20 76 61 6c 69 | ..........//.or.not.(0.is.a.vali |
| 12b80 | 64 20 6f 66 66 73 65 74 29 2e 20 53 75 63 6b 73 2c 20 74 68 6f 75 67 68 2c 20 61 73 20 77 65 20 | d.offset)..Sucks,.though,.as.we. |
| 12ba0 | 6e 6f 77 20 67 65 74 20 6c 6f 74 73 20 6f 66 20 61 6c 6c 6f 63 61 74 69 6f 6e 73 0d 0a 20 20 20 | now.get.lots.of.allocations..... |
| 12bc0 | 20 20 20 20 20 2f 2f 20 66 72 6f 6d 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 61 72 72 61 79 2e 0d | .....//.from.the.control.array.. |
| 12be0 | 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 61 62 6c 65 5d 0d 0a 20 20 20 20 20 20 20 | .........[Serializable]......... |
| 12c00 | 20 70 72 69 76 61 74 65 20 63 6c 61 73 73 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 4a 73 6f 6e 0d 0a | .private.class.ControlItemJson.. |
| 12c20 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 69 73 61 62 6c | ........{..............//.Disabl |
| 12c40 | 65 20 77 61 72 6e 69 6e 67 73 20 74 68 61 74 20 74 68 65 73 65 20 66 69 65 6c 64 73 20 61 72 65 | e.warnings.that.these.fields.are |
| 12c60 | 20 6e 65 76 65 72 20 61 73 73 69 67 6e 65 64 20 74 6f 2e 20 54 68 65 79 20 61 72 65 20 73 65 74 | .never.assigned.to..They.are.set |
| 12c80 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 79 20 4a 73 6f 6e 55 74 69 6c 69 74 79 2e | ..............//.by.JsonUtility. |
| 12ca0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 70 72 61 67 6d 61 20 77 61 72 6e 69 6e 67 20 64 69 | ..............#pragma.warning.di |
| 12cc0 | 73 61 62 6c 65 20 30 36 34 39 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 53 68 61 | sable.0649..............//.ReSha |
| 12ce0 | 72 70 65 72 20 64 69 73 61 62 6c 65 20 4d 65 6d 62 65 72 43 61 6e 42 65 50 72 69 76 61 74 65 2e | rper.disable.MemberCanBePrivate. |
| 12d00 | 4c 6f 63 61 6c 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 | Local................public.stri |
| 12d20 | 6e 67 20 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 | ng.name;..............public.str |
| 12d40 | 69 6e 67 20 6c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | ing.layout;..............public. |
| 12d60 | 73 74 72 69 6e 67 20 76 61 72 69 61 6e 74 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 | string.variants;..............pu |
| 12d80 | 62 6c 69 63 20 73 74 72 69 6e 67 20 75 73 61 67 65 3b 20 2f 2f 20 43 6f 6e 76 65 6e 69 65 6e 63 | blic.string.usage;.//.Convenienc |
| 12da0 | 65 20 74 6f 20 6e 6f 74 20 68 61 76 65 20 74 6f 20 63 72 65 61 74 65 20 61 72 72 61 79 20 66 6f | e.to.not.have.to.create.array.fo |
| 12dc0 | 72 20 73 69 6e 67 6c 65 20 75 73 61 67 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 | r.single.usage...............pub |
| 12de0 | 6c 69 63 20 73 74 72 69 6e 67 20 61 6c 69 61 73 3b 20 2f 2f 20 53 61 6d 65 2e 0d 0a 20 20 20 20 | lic.string.alias;.//.Same....... |
| 12e00 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 75 73 65 53 74 61 74 65 46 72 | ........public.string.useStateFr |
| 12e20 | 6f 6d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 75 69 6e 74 20 6f 66 66 | om;..............public.uint.off |
| 12e40 | 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 75 69 6e 74 20 62 69 | set;..............public.uint.bi |
| 12e60 | 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 75 69 6e 74 20 73 69 7a 65 | t;..............public.uint.size |
| 12e80 | 49 6e 42 69 74 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 | InBits;..............public.stri |
| 12ea0 | 6e 67 20 66 6f 72 6d 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 | ng.format;..............public.i |
| 12ec0 | 6e 74 20 61 72 72 61 79 53 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | nt.arraySize;..............publi |
| 12ee0 | 63 20 73 74 72 69 6e 67 5b 5d 20 75 73 61 67 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | c.string[].usages;.............. |
| 12f00 | 70 75 62 6c 69 63 20 73 74 72 69 6e 67 5b 5d 20 61 6c 69 61 73 65 73 3b 0d 0a 20 20 20 20 20 20 | public.string[].aliases;........ |
| 12f20 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 70 61 72 61 6d 65 74 65 72 73 3b 0d | ......public.string.parameters;. |
| 12f40 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 70 72 6f 63 65 | .............public.string.proce |
| 12f60 | 73 73 6f 72 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e | ssors;..............public.strin |
| 12f80 | 67 20 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c | g.displayName;..............publ |
| 12fa0 | 69 63 20 73 74 72 69 6e 67 20 73 68 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 | ic.string.shortDisplayName;..... |
| 12fc0 | 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 6e 6f 69 73 79 3b 0d 0a 20 20 20 | .........public.bool.noisy;..... |
| 12fe0 | 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 73 79 6e 74 68 65 74 69 63 3b 0d | .........public.bool.synthetic;. |
| 13000 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 73 68 6f 75 6c 64 20 62 65 | ...............//.This.should.be |
| 13020 | 20 61 6e 20 6f 62 6a 65 63 74 20 74 79 70 65 20 66 69 65 6c 64 20 61 6e 64 20 61 6c 6c 6f 77 20 | .an.object.type.field.and.allow. |
| 13040 | 61 6e 79 20 4a 53 4f 4e 20 70 72 69 6d 69 74 69 76 65 20 76 61 6c 75 65 20 74 79 70 65 20 61 73 | any.JSON.primitive.value.type.as |
| 13060 | 20 77 65 6c 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 73 20 61 72 72 61 79 73 20 | .well..............//.as.arrays. |
| 13080 | 6f 66 20 74 68 6f 73 65 2e 20 55 6e 66 6f 72 74 75 6e 61 74 65 6c 79 2c 20 74 68 65 20 55 6e 69 | of.those..Unfortunately,.the.Uni |
| 130a0 | 74 79 20 4a 53 4f 4e 20 73 65 72 69 61 6c 69 7a 65 72 2c 20 67 69 76 65 6e 20 69 74 20 75 73 65 | ty.JSON.serializer,.given.it.use |
| 130c0 | 73 20 55 6e 69 74 79 20 73 65 72 69 61 6c 69 7a 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 | s.Unity.serialization........... |
| 130e0 | 20 20 20 2f 2f 20 61 6e 64 20 74 68 75 73 20 64 6f 65 73 6e 27 74 20 73 75 70 70 6f 72 74 20 70 | ...//.and.thus.doesn't.support.p |
| 13100 | 6f 6c 79 6d 6f 72 70 68 69 73 6d 2c 20 63 61 6e 20 64 6f 20 6e 6f 20 73 75 63 68 20 74 68 69 6e | olymorphism,.can.do.no.such.thin |
| 13120 | 67 2e 20 48 6f 70 65 66 75 6c 6c 79 20 77 65 20 64 6f 20 67 65 74 20 73 75 70 70 6f 72 74 0d 0a | g..Hopefully.we.do.get.support.. |
| 13140 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 66 6f 72 20 74 68 69 73 20 6c 61 74 65 72 20 62 75 | ............//.for.this.later.bu |
| 13160 | 74 20 66 6f 72 20 6e 6f 77 2c 20 77 65 20 75 73 65 20 61 20 73 74 72 69 6e 67 2d 62 61 73 65 64 | t.for.now,.we.use.a.string-based |
| 13180 | 20 76 61 6c 75 65 20 66 61 6c 6c 62 61 63 6b 20 69 6e 73 74 65 61 64 2e 0d 0a 20 20 20 20 20 20 | .value.fallback.instead......... |
| 131a0 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 64 65 66 61 75 6c 74 53 74 61 74 65 | ......public.string.defaultState |
| 131c0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 6d 69 6e | ;..............public.string.min |
| 131e0 | 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e | Value;..............public.strin |
| 13200 | 67 20 6d 61 78 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 | g.maxValue;................//.Re |
| 13220 | 53 68 61 72 70 65 72 20 72 65 73 74 6f 72 65 20 4d 65 6d 62 65 72 43 61 6e 42 65 50 72 69 76 61 | Sharper.restore.MemberCanBePriva |
| 13240 | 74 65 2e 4c 6f 63 61 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 70 72 61 67 6d 61 20 77 61 | te.Local..............#pragma.wa |
| 13260 | 72 6e 69 6e 67 20 72 65 73 74 6f 72 65 20 30 36 34 39 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | rning.restore.0649.............. |
| 13280 | 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 4a 73 6f 6e 28 29 0d 0a 20 20 20 20 | ..public.ControlItemJson()...... |
| 132a0 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 66 66 73 65 | ........{..................offse |
| 132c0 | 74 20 3d 20 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 | t.=.InputStateBlock.InvalidOffse |
| 132e0 | 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 74 20 3d 20 49 6e 70 75 74 53 | t;..................bit.=.InputS |
| 13300 | 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 | tateBlock.InvalidOffset;........ |
| 13320 | 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f | ......}................public.Co |
| 13340 | 6e 74 72 6f 6c 49 74 65 6d 20 54 6f 4c 61 79 6f 75 74 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | ntrolItem.ToLayout()............ |
| 13360 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 | ..{..................var.layout. |
| 13380 | 3d 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | =.new.ControlItem............... |
| 133a0 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 20 3d | ...{......................name.= |
| 133c0 | 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 6e 61 6d 65 29 2c 0d 0a 20 20 20 20 | .new.InternedString(name),...... |
| 133e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 20 3d 20 6e 65 77 20 49 6e 74 | ................layout.=.new.Int |
| 13400 | 65 72 6e 65 64 53 74 72 69 6e 67 28 74 68 69 73 2e 6c 61 79 6f 75 74 29 2c 0d 0a 20 20 20 20 20 | ernedString(this.layout),....... |
| 13420 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 69 61 6e 74 73 20 3d 20 6e 65 77 20 49 6e | ...............variants.=.new.In |
| 13440 | 74 65 72 6e 65 64 53 74 72 69 6e 67 28 76 61 72 69 61 6e 74 73 29 2c 0d 0a 20 20 20 20 20 20 20 | ternedString(variants),......... |
| 13460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 64 69 73 70 6c | .............displayName.=.displ |
| 13480 | 61 79 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 68 6f | ayName,......................sho |
| 134a0 | 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 73 68 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 | rtDisplayName.=.shortDisplayName |
| 134c0 | 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 66 66 73 65 74 20 3d 20 | ,......................offset.=. |
| 134e0 | 6f 66 66 73 65 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 65 | offset,......................use |
| 13500 | 53 74 61 74 65 46 72 6f 6d 20 3d 20 75 73 65 53 74 61 74 65 46 72 6f 6d 2c 0d 0a 20 20 20 20 20 | StateFrom.=.useStateFrom,....... |
| 13520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 74 20 3d 20 62 69 74 2c 0d 0a 20 20 20 20 20 | ...............bit.=.bit,....... |
| 13540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 69 7a 65 49 6e 42 69 74 73 20 3d 20 73 69 7a 65 | ...............sizeInBits.=.size |
| 13560 | 49 6e 42 69 74 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4d | InBits,......................isM |
| 13580 | 6f 64 69 66 79 69 6e 67 45 78 69 73 74 69 6e 67 43 6f 6e 74 72 6f 6c 20 3d 20 6e 61 6d 65 2e 49 | odifyingExistingControl.=.name.I |
| 135a0 | 6e 64 65 78 4f 66 28 27 2f 27 29 20 21 3d 20 2d 31 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ndexOf('/').!=.-1,.............. |
| 135c0 | 20 20 20 20 20 20 20 20 69 73 4e 6f 69 73 79 20 3d 20 6e 6f 69 73 79 2c 0d 0a 20 20 20 20 20 20 | ........isNoisy.=.noisy,........ |
| 135e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 53 79 6e 74 68 65 74 69 63 20 3d 20 73 79 6e 74 | ..............isSynthetic.=.synt |
| 13600 | 68 65 74 69 63 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 46 69 | hetic,......................isFi |
| 13620 | 72 73 74 44 65 66 69 6e 65 64 49 6e 54 68 69 73 4c 61 79 6f 75 74 20 3d 20 74 72 75 65 2c 0d 0a | rstDefinedInThisLayout.=.true,.. |
| 13640 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 72 72 61 79 53 69 7a 65 20 3d 20 | ....................arraySize.=. |
| 13660 | 61 72 72 61 79 53 69 7a 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a | arraySize,..................};.. |
| 13680 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 | ..................if.(!string.Is |
| 136a0 | 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 66 6f 72 6d 61 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | NullOrEmpty(format))............ |
| 136c0 | 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 66 6f 72 6d 61 74 20 3d 20 6e 65 77 20 46 6f | ..........layout.format.=.new.Fo |
| 136e0 | 75 72 43 43 28 66 6f 72 6d 61 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | urCC(format);................... |
| 13700 | 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 75 73 61 67 65 | .if.(!string.IsNullOrEmpty(usage |
| 13720 | 29 20 7c 7c 20 75 73 61 67 65 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | ).||.usages.!=.null)............ |
| 13740 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 | ......{......................var |
| 13760 | 20 75 73 61 67 65 73 4c 69 73 74 20 3d 20 6e 65 77 20 4c 69 73 74 3c 73 74 72 69 6e 67 3e 28 29 | .usagesList.=.new.List<string>() |
| 13780 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 | ;......................if.(!stri |
| 137a0 | 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 75 73 61 67 65 29 29 0d 0a 20 20 20 20 20 20 | ng.IsNullOrEmpty(usage))........ |
| 137c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 61 67 65 73 4c 69 73 74 2e 41 64 64 | ..................usagesList.Add |
| 137e0 | 28 75 73 61 67 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | (usage);......................if |
| 13800 | 20 28 75 73 61 67 65 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .(usages.!=.null)............... |
| 13820 | 20 20 20 20 20 20 20 20 20 20 20 75 73 61 67 65 73 4c 69 73 74 2e 41 64 64 52 61 6e 67 65 28 75 | ...........usagesList.AddRange(u |
| 13840 | 73 61 67 65 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 | sages);......................lay |
| 13860 | 6f 75 74 2e 75 73 61 67 65 73 20 3d 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 49 | out.usages.=.new.ReadOnlyArray<I |
| 13880 | 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 75 73 61 67 65 73 4c 69 73 74 2e 53 65 6c 65 63 74 | nternedString>(usagesList.Select |
| 138a0 | 28 78 20 3d 3e 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 78 29 29 2e 54 6f 41 | (x.=>.new.InternedString(x)).ToA |
| 138c0 | 72 72 61 79 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | rray());..................}..... |
| 138e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c | ...............if.(!string.IsNul |
| 13900 | 6c 4f 72 45 6d 70 74 79 28 61 6c 69 61 73 29 20 7c 7c 20 61 6c 69 61 73 65 73 20 21 3d 20 6e 75 | lOrEmpty(alias).||.aliases.!=.nu |
| 13920 | 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | ll)..................{.......... |
| 13940 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 6c 69 61 73 65 73 4c 69 73 74 20 3d 20 6e 65 | ............var.aliasesList.=.ne |
| 13960 | 77 20 4c 69 73 74 3c 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | w.List<string>();............... |
| 13980 | 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 | .......if.(!string.IsNullOrEmpty |
| 139a0 | 28 61 6c 69 61 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | (alias))........................ |
| 139c0 | 20 20 61 6c 69 61 73 65 73 4c 69 73 74 2e 41 64 64 28 61 6c 69 61 73 29 3b 0d 0a 20 20 20 20 20 | ..aliasesList.Add(alias);....... |
| 139e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 6c 69 61 73 65 73 20 21 3d 20 6e 75 | ...............if.(aliases.!=.nu |
| 13a00 | 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6c 69 | ll)..........................ali |
| 13a20 | 61 73 65 73 4c 69 73 74 2e 41 64 64 52 61 6e 67 65 28 61 6c 69 61 73 65 73 29 3b 0d 0a 20 20 20 | asesList.AddRange(aliases);..... |
| 13a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 61 6c 69 61 73 65 73 20 | .................layout.aliases. |
| 13a60 | 3d 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 | =.new.ReadOnlyArray<InternedStri |
| 13a80 | 6e 67 3e 28 61 6c 69 61 73 65 73 4c 69 73 74 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 6e 65 77 20 | ng>(aliasesList.Select(x.=>.new. |
| 13aa0 | 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 78 29 29 2e 54 6f 41 72 72 61 79 28 29 29 3b 0d 0a | InternedString(x)).ToArray());.. |
| 13ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ................}............... |
| 13ae0 | 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 70 | .....if.(!string.IsNullOrEmpty(p |
| 13b00 | 61 72 61 6d 65 74 65 72 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | arameters))..................... |
| 13b20 | 20 6c 61 79 6f 75 74 2e 70 61 72 61 6d 65 74 65 72 73 20 3d 20 6e 65 77 20 52 65 61 64 4f 6e 6c | .layout.parameters.=.new.ReadOnl |
| 13b40 | 79 41 72 72 61 79 3c 4e 61 6d 65 64 56 61 6c 75 65 3e 28 4e 61 6d 65 64 56 61 6c 75 65 2e 50 61 | yArray<NamedValue>(NamedValue.Pa |
| 13b60 | 72 73 65 4d 75 6c 74 69 70 6c 65 28 70 61 72 61 6d 65 74 65 72 73 29 29 3b 0d 0a 0d 0a 20 20 20 | rseMultiple(parameters));....... |
| 13b80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f | .............if.(!string.IsNullO |
| 13ba0 | 72 45 6d 70 74 79 28 70 72 6f 63 65 73 73 6f 72 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | rEmpty(processors))............. |
| 13bc0 | 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 70 72 6f 63 65 73 73 6f 72 73 20 3d 20 6e 65 77 | .........layout.processors.=.new |
| 13be0 | 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 4e 61 6d 65 41 6e 64 50 61 72 61 6d 65 74 65 72 73 | .ReadOnlyArray<NameAndParameters |
| 13c00 | 3e 28 4e 61 6d 65 41 6e 64 50 61 72 61 6d 65 74 65 72 73 2e 50 61 72 73 65 4d 75 6c 74 69 70 6c | >(NameAndParameters.ParseMultipl |
| 13c20 | 65 28 70 72 6f 63 65 73 73 6f 72 73 29 2e 54 6f 41 72 72 61 79 28 29 29 3b 0d 0a 0d 0a 20 20 20 | e(processors).ToArray());....... |
| 13c40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 65 66 61 75 6c 74 53 74 61 74 65 20 21 3d | .............if.(defaultState.!= |
| 13c60 | 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f | .null)......................layo |
| 13c80 | 75 74 2e 64 65 66 61 75 6c 74 53 74 61 74 65 20 3d 20 50 72 69 6d 69 74 69 76 65 56 61 6c 75 65 | ut.defaultState.=.PrimitiveValue |
| 13ca0 | 2e 46 72 6f 6d 4f 62 6a 65 63 74 28 64 65 66 61 75 6c 74 53 74 61 74 65 29 3b 0d 0a 20 20 20 20 | .FromObject(defaultState);...... |
| 13cc0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 69 6e 56 61 6c 75 65 20 21 3d 20 6e 75 6c 6c | ............if.(minValue.!=.null |
| 13ce0 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 6d 69 | )......................layout.mi |
| 13d00 | 6e 56 61 6c 75 65 20 3d 20 50 72 69 6d 69 74 69 76 65 56 61 6c 75 65 2e 46 72 6f 6d 4f 62 6a 65 | nValue.=.PrimitiveValue.FromObje |
| 13d20 | 63 74 28 6d 69 6e 56 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 | ct(minValue);..................i |
| 13d40 | 66 20 28 6d 61 78 56 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | f.(maxValue.!=.null)............ |
| 13d60 | 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 6d 61 78 56 61 6c 75 65 20 3d 20 50 72 69 6d | ..........layout.maxValue.=.Prim |
| 13d80 | 69 74 69 76 65 56 61 6c 75 65 2e 46 72 6f 6d 4f 62 6a 65 63 74 28 6d 61 78 56 61 6c 75 65 29 3b | itiveValue.FromObject(maxValue); |
| 13da0 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 6f 75 | ....................return.layou |
| 13dc0 | 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | t;..............}............... |
| 13de0 | 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 4a 73 6f 6e 5b 5d | .public.static.ControlItemJson[] |
| 13e00 | 20 46 72 6f 6d 43 6f 6e 74 72 6f 6c 49 74 65 6d 73 28 43 6f 6e 74 72 6f 6c 49 74 65 6d 5b 5d 20 | .FromControlItems(ControlItem[]. |
| 13e20 | 69 74 65 6d 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | items)..............{........... |
| 13e40 | 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 | .......if.(items.==.null)....... |
| 13e60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 | ...............return.null;..... |
| 13e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 75 6e 74 20 3d 20 69 74 65 6d 73 | ...............var.count.=.items |
| 13ea0 | 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 65 | .Length;..................var.re |
| 13ec0 | 73 75 6c 74 20 3d 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 49 74 65 6d 4a 73 6f 6e 5b 63 6f 75 6e 74 | sult.=.new.ControlItemJson[count |
| 13ee0 | 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 | ];....................for.(var.i |
| 13f00 | 20 3d 20 30 3b 20 69 20 3c 20 63 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 | .=.0;.i.<.count;.++i)........... |
| 13f20 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 | .......{......................va |
| 13f40 | 72 20 69 74 65 6d 20 3d 20 69 74 65 6d 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | r.item.=.items[i];.............. |
| 13f60 | 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 5b 69 5d 20 3d 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 49 | ........result[i].=.new.ControlI |
| 13f80 | 74 65 6d 4a 73 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | temJson......................{.. |
| 13fa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 20 3d 20 69 | ........................name.=.i |
| 13fc0 | 74 65 6d 2e 6e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tem.name,....................... |
| 13fe0 | 20 20 20 6c 61 79 6f 75 74 20 3d 20 69 74 65 6d 2e 6c 61 79 6f 75 74 2c 0d 0a 20 20 20 20 20 20 | ...layout.=.item.layout,........ |
| 14000 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 69 61 6e 74 73 20 3d 20 69 74 65 | ..................variants.=.ite |
| 14020 | 6d 2e 76 61 72 69 61 6e 74 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | m.variants,..................... |
| 14040 | 20 20 20 20 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 69 74 65 6d 2e 64 69 73 70 6c 61 79 4e | .....displayName.=.item.displayN |
| 14060 | 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 68 | ame,..........................sh |
| 14080 | 6f 72 74 44 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 69 74 65 6d 2e 73 68 6f 72 74 44 69 73 70 6c | ortDisplayName.=.item.shortDispl |
| 140a0 | 61 79 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ayName,......................... |
| 140c0 | 20 62 69 74 20 3d 20 69 74 65 6d 2e 62 69 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .bit.=.item.bit,................ |
| 140e0 | 20 20 20 20 20 20 20 20 20 20 6f 66 66 73 65 74 20 3d 20 69 74 65 6d 2e 6f 66 66 73 65 74 2c 0d | ..........offset.=.item.offset,. |
| 14100 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 69 7a 65 49 6e 42 | .........................sizeInB |
| 14120 | 69 74 73 20 3d 20 69 74 65 6d 2e 73 69 7a 65 49 6e 42 69 74 73 2c 0d 0a 20 20 20 20 20 20 20 20 | its.=.item.sizeInBits,.......... |
| 14140 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 6d 61 74 20 3d 20 69 74 65 6d 2e 66 6f | ................format.=.item.fo |
| 14160 | 72 6d 61 74 2e 54 6f 53 74 72 69 6e 67 28 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rmat.ToString(),................ |
| 14180 | 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 73 74 72 69 6e 67 2e 4a 6f | ..........parameters.=.string.Jo |
| 141a0 | 69 6e 28 22 2c 22 2c 20 69 74 65 6d 2e 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 78 | in(",",.item.parameters.Select(x |
| 141c0 | 20 3d 3e 20 78 2e 54 6f 53 74 72 69 6e 67 28 29 29 2e 54 6f 41 72 72 61 79 28 29 29 2c 0d 0a 20 | .=>.x.ToString()).ToArray()),... |
| 141e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 63 65 73 73 6f 72 | .......................processor |
| 14200 | 73 20 3d 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 22 2c 20 69 74 65 6d 2e 70 72 6f 63 65 73 | s.=.string.Join(",",.item.proces |
| 14220 | 73 6f 72 73 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 78 2e 54 6f 53 74 72 69 6e 67 28 29 29 2e 54 | sors.Select(x.=>.x.ToString()).T |
| 14240 | 6f 41 72 72 61 79 28 29 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | oArray()),...................... |
| 14260 | 20 20 20 20 75 73 61 67 65 73 20 3d 20 69 74 65 6d 2e 75 73 61 67 65 73 2e 53 65 6c 65 63 74 28 | ....usages.=.item.usages.Select( |
| 14280 | 78 20 3d 3e 20 78 2e 54 6f 53 74 72 69 6e 67 28 29 29 2e 54 6f 41 72 72 61 79 28 29 2c 0d 0a 20 | x.=>.x.ToString()).ToArray(),... |
| 142a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6c 69 61 73 65 73 20 3d | .......................aliases.= |
| 142c0 | 20 69 74 65 6d 2e 61 6c 69 61 73 65 73 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 78 2e 54 6f 53 74 | .item.aliases.Select(x.=>.x.ToSt |
| 142e0 | 72 69 6e 67 28 29 29 2e 54 6f 41 72 72 61 79 28 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ring()).ToArray(),.............. |
| 14300 | 20 20 20 20 20 20 20 20 20 20 20 20 6e 6f 69 73 79 20 3d 20 69 74 65 6d 2e 69 73 4e 6f 69 73 79 | ............noisy.=.item.isNoisy |
| 14320 | 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 79 6e 74 68 | ,..........................synth |
| 14340 | 65 74 69 63 20 3d 20 69 74 65 6d 2e 69 73 53 79 6e 74 68 65 74 69 63 2c 0d 0a 20 20 20 20 20 20 | etic.=.item.isSynthetic,........ |
| 14360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 72 72 61 79 53 69 7a 65 20 3d 20 69 74 | ..................arraySize.=.it |
| 14380 | 65 6d 2e 61 72 72 61 79 53 69 7a 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | em.arraySize,................... |
| 143a0 | 20 20 20 20 20 20 20 64 65 66 61 75 6c 74 53 74 61 74 65 20 3d 20 69 74 65 6d 2e 64 65 66 61 75 | .......defaultState.=.item.defau |
| 143c0 | 6c 74 53 74 61 74 65 2e 54 6f 53 74 72 69 6e 67 28 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ltState.ToString(),............. |
| 143e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 6e 56 61 6c 75 65 20 3d 20 69 74 65 6d 2e 6d 69 6e | .............minValue.=.item.min |
| 14400 | 56 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | Value.ToString(),............... |
| 14420 | 20 20 20 20 20 20 20 20 20 20 20 6d 61 78 56 61 6c 75 65 20 3d 20 69 74 65 6d 2e 6d 61 78 56 61 | ...........maxValue.=.item.maxVa |
| 14440 | 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | lue.ToString(),................. |
| 14460 | 20 20 20 20 20 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 | .....};..................}...... |
| 14480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 73 75 6c 74 3b 0d 0a 20 20 | ..............return.result;.... |
| 144a0 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 | ..........}..........}.......... |
| 144c0 | 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 72 75 63 74 20 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a | ....internal.struct.Collection.. |
| 144e0 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6f | ........{..............public.co |
| 14500 | 6e 73 74 20 66 6c 6f 61 74 20 6b 42 61 73 65 53 63 6f 72 65 46 6f 72 4e 6f 6e 47 65 6e 65 72 61 | nst.float.kBaseScoreForNonGenera |
| 14520 | 74 65 64 4c 61 79 6f 75 74 73 20 3d 20 31 2e 30 66 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | tedLayouts.=.1.0f;.............. |
| 14540 | 20 20 70 75 62 6c 69 63 20 73 74 72 75 63 74 20 4c 61 79 6f 75 74 4d 61 74 63 68 65 72 0d 0a 20 | ..public.struct.LayoutMatcher... |
| 14560 | 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 | ...........{..................pu |
| 14580 | 62 6c 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 3b 0d | blic.InternedString.layoutName;. |
| 145a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 44 65 76 | .................public.InputDev |
| 145c0 | 69 63 65 4d 61 74 63 68 65 72 20 64 65 76 69 63 65 4d 61 74 63 68 65 72 3b 0d 0a 20 20 20 20 20 | iceMatcher.deviceMatcher;....... |
| 145e0 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 44 | .......}................public.D |
| 14600 | 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 54 79 70 65 3e 20 | ictionary<InternedString,.Type>. |
| 14620 | 6c 61 79 6f 75 74 54 79 70 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 | layoutTypes;..............public |
| 14640 | 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 73 74 72 69 | .Dictionary<InternedString,.stri |
| 14660 | 6e 67 3e 20 6c 61 79 6f 75 74 53 74 72 69 6e 67 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ng>.layoutStrings;.............. |
| 14680 | 70 75 62 6c 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 | public.Dictionary<InternedString |
| 146a0 | 2c 20 46 75 6e 63 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 3e 3e 20 6c 61 79 6f | ,.Func<InputControlLayout>>.layo |
| 146c0 | 75 74 42 75 69 6c 64 65 72 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | utBuilders;..............public. |
| 146e0 | 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 49 6e 74 65 72 | Dictionary<InternedString,.Inter |
| 14700 | 6e 65 64 53 74 72 69 6e 67 3e 20 62 61 73 65 4c 61 79 6f 75 74 54 61 62 6c 65 3b 0d 0a 20 20 20 | nedString>.baseLayoutTable;..... |
| 14720 | 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 | .........public.Dictionary<Inter |
| 14740 | 6e 65 64 53 74 72 69 6e 67 2c 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 5b 5d 3e 20 6c 61 79 | nedString,.InternedString[]>.lay |
| 14760 | 6f 75 74 4f 76 65 72 72 69 64 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | outOverrides;..............publi |
| 14780 | 63 20 48 61 73 68 53 65 74 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 20 6c 61 79 6f 75 74 | c.HashSet<InternedString>.layout |
| 147a0 | 4f 76 65 72 72 69 64 65 4e 61 6d 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f | OverrideNames;..............//// |
| 147c0 | 54 4f 44 4f 3a 20 66 69 6e 64 20 61 20 73 6d 61 72 74 65 72 20 61 70 70 72 6f 61 63 68 20 74 68 | TODO:.find.a.smarter.approach.th |
| 147e0 | 61 74 20 64 6f 65 73 6e 27 74 20 72 65 71 75 69 72 65 20 6c 69 6e 65 61 72 6c 79 20 73 63 61 6e | at.doesn't.require.linearly.scan |
| 14800 | 6e 69 6e 67 20 74 68 72 6f 75 67 68 20 61 6c 6c 20 6d 61 74 63 68 65 72 73 0d 0a 20 20 20 20 20 | ning.through.all.matchers....... |
| 14820 | 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 28 61 6c 73 6f 20 69 64 65 61 6c 6c 79 20 73 68 6f 75 6c | .......////..(also.ideally.shoul |
| 14840 | 64 6e 27 74 20 62 65 20 61 20 4c 69 73 74 20 62 75 74 20 77 69 74 68 20 43 6f 6c 6c 65 63 74 69 | dn't.be.a.List.but.with.Collecti |
| 14860 | 6f 6e 20 62 65 69 6e 67 20 61 20 73 74 72 75 63 74 20 61 6e 64 20 67 69 76 65 6e 20 68 6f 77 20 | on.being.a.struct.and.given.how. |
| 14880 | 69 74 27 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 73 74 6f 72 65 64 20 62 | it's..............////..stored.b |
| 148a0 | 79 20 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 6d 5f 4c 61 79 6f 75 74 73 20 61 6e 64 20 69 6e 20 | y.InputManager.m_Layouts.and.in. |
| 148c0 | 73 5f 4c 61 79 6f 75 74 73 3b 20 77 65 20 63 61 6e 27 74 20 6d 61 6b 65 20 69 74 20 61 20 70 6c | s_Layouts;.we.can't.make.it.a.pl |
| 148e0 | 61 69 6e 20 61 72 72 61 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 4c | ain.array)..............public.L |
| 14900 | 69 73 74 3c 4c 61 79 6f 75 74 4d 61 74 63 68 65 72 3e 20 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 | ist<LayoutMatcher>.layoutMatcher |
| 14920 | 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 41 6c | s;................public.void.Al |
| 14940 | 6c 6f 63 61 74 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | locate()..............{......... |
| 14960 | 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 54 79 70 65 73 20 3d 20 6e 65 77 20 44 69 63 74 69 | .........layoutTypes.=.new.Dicti |
| 14980 | 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 54 79 70 65 3e 28 29 3b 0d 0a | onary<InternedString,.Type>();.. |
| 149a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 53 74 72 69 6e 67 73 20 3d 20 | ................layoutStrings.=. |
| 149c0 | 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 73 | new.Dictionary<InternedString,.s |
| 149e0 | 74 72 69 6e 67 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 | tring>();..................layou |
| 14a00 | 74 42 75 69 6c 64 65 72 73 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 | tBuilders.=.new.Dictionary<Inter |
| 14a20 | 6e 65 64 53 74 72 69 6e 67 2c 20 46 75 6e 63 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f | nedString,.Func<InputControlLayo |
| 14a40 | 75 74 3e 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 4c 61 79 | ut>>();..................baseLay |
| 14a60 | 6f 75 74 54 61 62 6c 65 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e | outTable.=.new.Dictionary<Intern |
| 14a80 | 65 64 53 74 72 69 6e 67 2c 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 29 3b 0d 0a 20 20 | edString,.InternedString>();.... |
| 14aa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 4f 76 65 72 72 69 64 65 73 20 3d 20 | ..............layoutOverrides.=. |
| 14ac0 | 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 49 | new.Dictionary<InternedString,.I |
| 14ae0 | 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 5b 5d 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | nternedString[]>();............. |
| 14b00 | 20 20 20 20 20 6c 61 79 6f 75 74 4f 76 65 72 72 69 64 65 4e 61 6d 65 73 20 3d 20 6e 65 77 20 48 | .....layoutOverrideNames.=.new.H |
| 14b20 | 61 73 68 53 65 74 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 29 3b 0d 0a 20 20 20 20 20 | ashSet<InternedString>();....... |
| 14b40 | 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 73 20 3d 20 6e 65 77 20 | ...........layoutMatchers.=.new. |
| 14b60 | 4c 69 73 74 3c 4c 61 79 6f 75 74 4d 61 74 63 68 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 | List<LayoutMatcher>();.......... |
| 14b80 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 74 65 | ....}................public.Inte |
| 14ba0 | 72 6e 65 64 53 74 72 69 6e 67 20 54 72 79 46 69 6e 64 4c 61 79 6f 75 74 46 6f 72 54 79 70 65 28 | rnedString.TryFindLayoutForType( |
| 14bc0 | 54 79 70 65 20 6c 61 79 6f 75 74 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | Type.layoutType)..............{. |
| 14be0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 65 6e | .................foreach.(var.en |
| 14c00 | 74 72 79 20 69 6e 20 6c 61 79 6f 75 74 54 79 70 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | try.in.layoutTypes)............. |
| 14c20 | 20 20 20 20 20 20 20 20 20 69 66 20 28 65 6e 74 72 79 2e 56 61 6c 75 65 20 3d 3d 20 6c 61 79 6f | .........if.(entry.Value.==.layo |
| 14c40 | 75 74 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | utType)......................... |
| 14c60 | 20 72 65 74 75 72 6e 20 65 6e 74 72 79 2e 4b 65 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .return.entry.Key;.............. |
| 14c80 | 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 29 3b | ....return.new.InternedString(); |
| 14ca0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 | ..............}................p |
| 14cc0 | 75 62 6c 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 54 72 79 46 69 6e 64 4d 61 74 63 | ublic.InternedString.TryFindMatc |
| 14ce0 | 68 69 6e 67 4c 61 79 6f 75 74 28 49 6e 70 75 74 44 65 76 69 63 65 44 65 73 63 72 69 70 74 69 6f | hingLayout(InputDeviceDescriptio |
| 14d00 | 6e 20 64 65 76 69 63 65 44 65 73 63 72 69 70 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | n.deviceDescription)............ |
| 14d20 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 69 67 68 65 73 74 | ..{..................var.highest |
| 14d40 | 53 63 6f 72 65 20 3d 20 30 66 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 | Score.=.0f;..................var |
| 14d60 | 20 68 69 67 68 65 73 74 53 63 6f 72 69 6e 67 4c 61 79 6f 75 74 20 3d 20 6e 65 77 20 49 6e 74 65 | .highestScoringLayout.=.new.Inte |
| 14d80 | 72 6e 65 64 53 74 72 69 6e 67 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rnedString();................... |
| 14da0 | 20 76 61 72 20 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 43 6f 75 6e 74 20 3d 20 6c 61 79 6f 75 74 | .var.layoutMatcherCount.=.layout |
| 14dc0 | 4d 61 74 63 68 65 72 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Matchers.Count;................. |
| 14de0 | 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 6c 61 79 6f 75 74 4d 61 74 63 68 | .for.(var.i.=.0;.i.<.layoutMatch |
| 14e00 | 65 72 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | erCount;.++i)..................{ |
| 14e20 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 74 63 68 65 | ......................var.matche |
| 14e40 | 72 20 3d 20 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 73 5b 69 5d 2e 64 65 76 69 63 65 4d 61 74 63 | r.=.layoutMatchers[i].deviceMatc |
| 14e60 | 68 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 63 | her;......................var.sc |
| 14e80 | 6f 72 65 20 3d 20 6d 61 74 63 68 65 72 2e 4d 61 74 63 68 50 65 72 63 65 6e 74 61 67 65 28 64 65 | ore.=.matcher.MatchPercentage(de |
| 14ea0 | 76 69 63 65 44 65 73 63 72 69 70 74 69 6f 6e 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | viceDescription);............... |
| 14ec0 | 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 77 61 6e 74 20 61 75 74 6f 2d 67 65 6e 65 72 61 74 | .........//.We.want.auto-generat |
| 14ee0 | 65 64 20 6c 61 79 6f 75 74 73 20 74 6f 20 74 61 6b 65 20 61 20 62 61 63 6b 73 65 61 74 20 63 6f | ed.layouts.to.take.a.backseat.co |
| 14f00 | 6d 70 61 72 65 64 20 74 6f 20 6d 61 6e 75 61 6c 6c 79 20 63 72 65 61 74 65 64 0d 0a 20 20 20 20 | mpared.to.manually.created...... |
| 14f20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6c 61 79 6f 75 74 73 2e 20 57 65 20 64 | ................//.layouts..We.d |
| 14f40 | 6f 20 74 68 69 73 20 62 79 20 62 6f 6f 73 74 69 6e 67 20 74 68 65 20 73 63 6f 72 65 20 6f 66 20 | o.this.by.boosting.the.score.of. |
| 14f60 | 65 76 65 72 79 20 6c 61 79 6f 75 74 20 74 68 61 74 20 69 73 6e 27 74 20 63 6f 6d 69 6e 67 20 66 | every.layout.that.isn't.coming.f |
| 14f80 | 72 6f 6d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 20 6c 61 | rom......................//.a.la |
| 14fa0 | 79 6f 75 74 20 62 75 69 6c 64 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | yout.builder.................... |
| 14fc0 | 20 20 20 69 66 20 28 73 63 6f 72 65 20 3e 20 30 20 26 26 20 21 6c 61 79 6f 75 74 42 75 69 6c 64 | ...if.(score.>.0.&&.!layoutBuild |
| 14fe0 | 65 72 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 73 5b 69 | ers.ContainsKey(layoutMatchers[i |
| 15000 | 5d 2e 6c 61 79 6f 75 74 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ].layoutName)).................. |
| 15020 | 20 20 20 20 20 20 20 20 73 63 6f 72 65 20 2b 3d 20 6b 42 61 73 65 53 63 6f 72 65 46 6f 72 4e 6f | ........score.+=.kBaseScoreForNo |
| 15040 | 6e 47 65 6e 65 72 61 74 65 64 4c 61 79 6f 75 74 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | nGeneratedLayouts;.............. |
| 15060 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 63 6f 72 65 20 3e 20 68 69 67 68 65 73 74 53 63 6f | ..........if.(score.>.highestSco |
| 15080 | 72 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | re)......................{...... |
| 150a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 69 67 68 65 73 74 53 63 6f 72 65 | ....................highestScore |
| 150c0 | 20 3d 20 73 63 6f 72 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .=.score;....................... |
| 150e0 | 20 20 20 68 69 67 68 65 73 74 53 63 6f 72 69 6e 67 4c 61 79 6f 75 74 20 3d 20 6c 61 79 6f 75 74 | ...highestScoringLayout.=.layout |
| 15100 | 4d 61 74 63 68 65 72 73 5b 69 5d 2e 6c 61 79 6f 75 74 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 | Matchers[i].layoutName;......... |
| 15120 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............}.................. |
| 15140 | 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 68 69 67 68 | }....................return.high |
| 15160 | 65 73 74 53 63 6f 72 69 6e 67 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d | estScoringLayout;..............} |
| 15180 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 48 61 73 4c | ................public.bool.HasL |
| 151a0 | 61 79 6f 75 74 28 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6e 61 6d 65 29 0d 0a 20 20 20 20 | ayout(InternedString.name)...... |
| 151c0 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | ........{..................retur |
| 151e0 | 6e 20 6c 61 79 6f 75 74 54 79 70 65 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 6e 61 6d 65 29 20 | n.layoutTypes.ContainsKey(name). |
| 15200 | 7c 7c 20 6c 61 79 6f 75 74 53 74 72 69 6e 67 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 6e 61 6d | ||.layoutStrings.ContainsKey(nam |
| 15220 | 65 29 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 | e).||......................layou |
| 15240 | 74 42 75 69 6c 64 65 72 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 6e 61 6d 65 29 3b 0d 0a 20 20 | tBuilders.ContainsKey(name);.... |
| 15260 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 | ..........}................priva |
| 15280 | 74 65 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 54 72 79 4c 6f 61 64 4c 61 79 | te.InputControlLayout.TryLoadLay |
| 152a0 | 6f 75 74 49 6e 74 65 72 6e 61 6c 28 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6e 61 6d 65 29 | outInternal(InternedString.name) |
| 152c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............{................. |
| 152e0 | 20 2f 2f 20 53 65 65 20 69 66 20 77 65 20 68 61 76 65 20 61 20 73 74 72 69 6e 67 20 6c 61 79 6f | .//.See.if.we.have.a.string.layo |
| 15300 | 75 74 20 66 6f 72 20 69 74 2e 20 54 68 65 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ut.for.it..These................ |
| 15320 | 20 20 2f 2f 20 61 6c 77 61 79 73 20 74 61 6b 65 20 70 72 65 63 65 64 65 6e 63 65 20 6f 76 65 72 | ..//.always.take.precedence.over |
| 15340 | 20 6f 6e 65 73 20 66 72 6f 6d 20 74 79 70 65 20 73 6f 20 74 68 61 74 20 77 65 20 63 61 6e 0d 0a | .ones.from.type.so.that.we.can.. |
| 15360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6f 76 65 72 72 69 64 65 20 77 68 61 74 | ................//.override.what |
| 15380 | 27 73 20 69 6e 20 74 68 65 20 63 6f 64 65 20 75 73 69 6e 67 20 64 61 74 61 2e 0d 0a 20 20 20 20 | 's.in.the.code.using.data....... |
| 153a0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 53 74 72 69 6e 67 73 2e 54 72 | ............if.(layoutStrings.Tr |
| 153c0 | 79 47 65 74 56 61 6c 75 65 28 6e 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 6a 73 6f 6e 29 29 0d 0a | yGetValue(name,.out.var.json)).. |
| 153e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 46 72 6f 6d 4a | ....................return.FromJ |
| 15400 | 73 6f 6e 28 6a 73 6f 6e 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | son(json);....................// |
| 15420 | 20 4e 6f 2c 20 62 75 74 20 6d 61 79 62 65 20 77 65 20 68 61 76 65 20 61 20 74 79 70 65 20 6c 61 | .No,.but.maybe.we.have.a.type.la |
| 15440 | 79 6f 75 74 20 66 6f 72 20 69 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | yout.for.it...................if |
| 15460 | 20 28 6c 61 79 6f 75 74 54 79 70 65 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 6e 61 6d 65 2c 20 | .(layoutTypes.TryGetValue(name,. |
| 15480 | 6f 75 74 20 76 61 72 20 74 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | out.var.type)).................. |
| 154a0 | 20 20 20 20 72 65 74 75 72 6e 20 46 72 6f 6d 54 79 70 65 28 6e 61 6d 65 2c 20 74 79 70 65 29 3b | ....return.FromType(name,.type); |
| 154c0 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 61 6c 6c 79 2c 20 | ....................//.Finally,. |
| 154e0 | 63 68 65 63 6b 20 62 75 69 6c 64 65 72 73 2e 20 41 6c 77 61 79 73 20 74 68 65 20 6c 61 73 74 20 | check.builders..Always.the.last. |
| 15500 | 6f 6e 65 73 20 74 6f 20 67 65 74 20 61 20 73 68 6f 74 20 61 74 0d 0a 20 20 20 20 20 20 20 20 20 | ones.to.get.a.shot.at........... |
| 15520 | 20 20 20 20 20 20 20 2f 2f 20 70 72 6f 76 69 64 69 6e 67 20 6c 61 79 6f 75 74 73 2e 0d 0a 20 20 | .......//.providing.layouts..... |
| 15540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 42 75 69 6c 64 65 72 73 | ..............if.(layoutBuilders |
| 15560 | 2e 54 72 79 47 65 74 56 61 6c 75 65 28 6e 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 62 75 69 6c 64 | .TryGetValue(name,.out.var.build |
| 15580 | 65 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | er))..................{......... |
| 155a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 20 62 75 69 6c 64 65 | .............var.layout.=.builde |
| 155c0 | 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 | r();......................if.(la |
| 155e0 | 79 6f 75 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | yout.==.null)................... |
| 15600 | 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f | .......throw.new.InvalidOperatio |
| 15620 | 6e 45 78 63 65 70 74 69 6f 6e 28 24 22 4c 61 79 6f 75 74 20 62 75 69 6c 64 65 72 20 27 7b 6e 61 | nException($"Layout.builder.'{na |
| 15640 | 6d 65 7d 27 20 72 65 74 75 72 6e 65 64 20 6e 75 6c 6c 20 77 68 65 6e 20 69 6e 76 6f 6b 65 64 22 | me}'.returned.null.when.invoked" |
| 15660 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c | );......................return.l |
| 15680 | 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 | ayout;..................}....... |
| 156a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 | .............return.null;....... |
| 156c0 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 | .......}................public.I |
| 156e0 | 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 54 72 79 4c 6f 61 64 4c 61 79 6f 75 74 28 | nputControlLayout.TryLoadLayout( |
| 15700 | 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6e 61 6d 65 2c 20 44 69 63 74 69 6f 6e 61 72 79 3c | InternedString.name,.Dictionary< |
| 15720 | 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f | InternedString,.InputControlLayo |
| 15740 | 75 74 3e 20 74 61 62 6c 65 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b | ut>.table.=.null)..............{ |
| 15760 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 65 20 69 66 20 77 65 20 68 | ..................//.See.if.we.h |
| 15780 | 61 76 65 20 69 74 20 63 61 63 68 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ave.it.cached................... |
| 157a0 | 69 66 20 28 74 61 62 6c 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 74 61 62 6c 65 2e 54 72 79 47 65 | if.(table.!=.null.&&.table.TryGe |
| 157c0 | 74 56 61 6c 75 65 28 6e 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 6c 61 79 6f 75 74 29 29 0d 0a 20 | tValue(name,.out.var.layout))... |
| 157e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 6f 75 74 | ...................return.layout |
| 15800 | 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 20 3d 20 54 72 | ;....................layout.=.Tr |
| 15820 | 79 4c 6f 61 64 4c 61 79 6f 75 74 49 6e 74 65 72 6e 61 6c 28 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 | yLoadLayoutInternal(name);...... |
| 15840 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 20 21 3d 20 6e 75 6c 6c 29 0d | ............if.(layout.!=.null). |
| 15860 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .................{.............. |
| 15880 | 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 6d 5f 4e 61 6d 65 20 3d 20 6e 61 6d 65 3b 0d 0a 0d | ........layout.m_Name.=.name;... |
| 158a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 4f | .....................if.(layoutO |
| 158c0 | 76 65 72 72 69 64 65 4e 61 6d 65 73 2e 43 6f 6e 74 61 69 6e 73 28 6e 61 6d 65 29 29 0d 0a 20 20 | verrideNames.Contains(name)).... |
| 158e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 69 73 4f | ......................layout.isO |
| 15900 | 76 65 72 72 69 64 65 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | verride.=.true;................. |
| 15920 | 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 6c 61 79 6f 75 74 20 65 78 74 65 6e 64 73 20 | .......//.If.the.layout.extends. |
| 15940 | 61 6e 6f 74 68 65 72 20 6c 61 79 6f 75 74 2c 20 77 65 20 6e 65 65 64 20 74 6f 20 6d 65 72 67 65 | another.layout,.we.need.to.merge |
| 15960 | 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 61 73 | .the......................//.bas |
| 15980 | 65 20 6c 61 79 6f 75 74 20 69 6e 74 6f 20 74 68 65 20 66 69 6e 61 6c 20 6c 61 79 6f 75 74 2e 0d | e.layout.into.the.final.layout.. |
| 159a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 57 65 | .....................//.NOTE:.We |
| 159c0 | 20 67 6f 20 74 68 72 6f 75 67 68 20 74 68 65 20 62 61 73 65 4c 61 79 6f 75 74 54 61 62 6c 65 20 | .go.through.the.baseLayoutTable. |
| 159e0 | 68 65 72 65 20 69 6e 73 74 65 61 64 20 6f 66 20 6c 6f 6f 6b 69 6e 67 20 61 74 0d 0a 20 20 20 20 | here.instead.of.looking.at...... |
| 15a00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 74 68 65 20 62 61 73 | ................//.......the.bas |
| 15a20 | 65 4c 61 79 6f 75 74 73 20 70 72 6f 70 65 72 74 79 20 73 6f 20 61 73 20 74 6f 20 6d 61 6b 65 20 | eLayouts.property.so.as.to.make. |
| 15a40 | 74 68 69 73 20 77 6f 72 6b 20 66 6f 72 20 61 6c 6c 20 74 79 70 65 73 0d 0a 20 20 20 20 20 20 20 | this.work.for.all.types......... |
| 15a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 6f 66 20 6c 61 79 6f 75 74 73 | .............//.......of.layouts |
| 15a80 | 20 28 46 72 6f 6d 54 79 70 65 28 29 20 64 6f 65 73 20 6e 6f 74 20 73 65 74 20 74 68 65 20 70 72 | .(FromType().does.not.set.the.pr |
| 15aa0 | 6f 70 65 72 74 79 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 | operty,.for.example)............ |
| 15ac0 | 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 20 3d 20 | ...........var.baseLayoutName.=. |
| 15ae0 | 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | new.InternedString();........... |
| 15b00 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6c 61 79 6f 75 74 2e 69 73 4f 76 65 72 72 69 64 | ...........if.(!layout.isOverrid |
| 15b20 | 65 20 26 26 20 62 61 73 65 4c 61 79 6f 75 74 54 61 62 6c 65 2e 54 72 79 47 65 74 56 61 6c 75 65 | e.&&.baseLayoutTable.TryGetValue |
| 15b40 | 28 6e 61 6d 65 2c 20 6f 75 74 20 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 29 29 0d 0a 20 20 20 | (name,.out.baseLayoutName))..... |
| 15b60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .................{.............. |
| 15b80 | 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 21 62 61 73 65 4c 61 | ............Debug.Assert(!baseLa |
| 15ba0 | 79 6f 75 74 4e 61 6d 65 2e 49 73 45 6d 70 74 79 28 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | youtName.IsEmpty());............ |
| 15bc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 63 61 74 63 68 20 | ................////TODO:.catch. |
| 15be0 | 63 79 63 6c 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | cycles.......................... |
| 15c00 | 76 61 72 20 62 61 73 65 4c 61 79 6f 75 74 20 3d 20 54 72 79 4c 6f 61 64 4c 61 79 6f 75 74 28 62 | var.baseLayout.=.TryLoadLayout(b |
| 15c20 | 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 2c 20 74 61 62 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 | aseLayoutName,.table);.......... |
| 15c40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 61 73 65 4c 61 79 6f 75 74 20 3d | ................if.(baseLayout.= |
| 15c60 | 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | =.null)......................... |
| 15c80 | 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 4c 61 79 6f 75 74 4e 6f 74 46 6f 75 6e 64 45 78 63 | .....throw.new.LayoutNotFoundExc |
| 15ca0 | 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eption(......................... |
| 15cc0 | 20 20 20 20 20 20 20 20 20 24 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 62 61 73 65 20 6c 61 79 6f | .........$"Cannot.find.base.layo |
| 15ce0 | 75 74 20 27 7b 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 7d 27 20 6f 66 20 6c 61 79 6f 75 74 20 | ut.'{baseLayoutName}'.of.layout. |
| 15d00 | 27 7b 6e 61 6d 65 7d 27 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | '{name}'");..................... |
| 15d20 | 20 20 20 20 20 6c 61 79 6f 75 74 2e 4d 65 72 67 65 4c 61 79 6f 75 74 28 62 61 73 65 4c 61 79 6f | .....layout.MergeLayout(baseLayo |
| 15d40 | 75 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ut);............................ |
| 15d60 | 69 66 20 28 6c 61 79 6f 75 74 2e 6d 5f 42 61 73 65 4c 61 79 6f 75 74 73 2e 6c 65 6e 67 74 68 20 | if.(layout.m_BaseLayouts.length. |
| 15d80 | 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ==.0)........................... |
| 15da0 | 20 20 20 6c 61 79 6f 75 74 2e 6d 5f 42 61 73 65 4c 61 79 6f 75 74 73 2e 41 70 70 65 6e 64 28 62 | ...layout.m_BaseLayouts.Append(b |
| 15dc0 | 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | aseLayoutName);................. |
| 15de0 | 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | .....}........................// |
| 15e00 | 20 49 66 20 74 68 65 72 65 27 73 20 6f 76 65 72 72 69 64 65 73 20 66 6f 72 20 74 68 65 20 6c 61 | .If.there's.overrides.for.the.la |
| 15e20 | 79 6f 75 74 2c 20 61 70 70 6c 79 20 74 68 65 6d 20 6e 6f 77 2e 0d 0a 20 20 20 20 20 20 20 20 20 | yout,.apply.them.now............ |
| 15e40 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 4f 76 65 72 72 69 64 65 73 2e 54 | ...........if.(layoutOverrides.T |
| 15e60 | 72 79 47 65 74 56 61 6c 75 65 28 6e 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 6f 76 65 72 72 69 64 | ryGetValue(name,.out.var.overrid |
| 15e80 | 65 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | es))......................{..... |
| 15ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 | .....................for.(var.i. |
| 15ec0 | 3d 20 30 3b 20 69 20 3c 20 6f 76 65 72 72 69 64 65 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 29 0d | =.0;.i.<.overrides.Length;.++i). |
| 15ee0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | .........................{...... |
| 15f00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 76 65 72 | ........................var.over |
| 15f20 | 72 69 64 65 4e 61 6d 65 20 3d 20 6f 76 65 72 72 69 64 65 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 | rideName.=.overrides[i];........ |
| 15f40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 57 | ......................//.NOTE:.W |
| 15f60 | 65 20 64 6f 20 2a 4e 4f 54 2a 20 70 61 73 73 20 60 74 61 62 6c 65 60 20 69 6e 74 6f 20 54 72 79 | e.do.*NOT*.pass.`table`.into.Try |
| 15f80 | 4c 6f 61 64 4c 61 79 6f 75 74 20 68 65 72 65 20 73 6f 20 74 68 61 74 0d 0a 20 20 20 20 20 20 20 | LoadLayout.here.so.that......... |
| 15fa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 74 68 | .....................//.......th |
| 15fc0 | 65 20 6f 76 65 72 72 69 64 65 20 77 65 20 6c 6f 61 64 20 77 69 6c 6c 20 6e 6f 74 20 67 65 74 20 | e.override.we.load.will.not.get. |
| 15fe0 | 63 61 63 68 65 64 2e 20 54 68 65 20 72 65 61 73 6f 6e 20 69 73 20 74 68 61 74 0d 0a 20 20 20 20 | cached..The.reason.is.that...... |
| 16000 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 | ........................//...... |
| 16020 | 20 77 65 20 75 73 65 20 4d 65 72 67 65 4c 61 79 6f 75 74 20 77 68 69 63 68 20 69 73 20 64 65 73 | .we.use.MergeLayout.which.is.des |
| 16040 | 74 72 75 63 74 69 76 65 20 61 6e 64 20 74 68 75 73 20 73 68 6f 75 6c 64 20 6e 6f 74 0d 0a 20 20 | tructive.and.thus.should.not.... |
| 16060 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 | ..........................//.... |
| 16080 | 20 20 20 65 6e 64 20 75 70 20 69 6e 20 74 68 65 20 74 61 62 6c 65 2e 0d 0a 20 20 20 20 20 20 20 | ...end.up.in.the.table.......... |
| 160a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 76 65 72 72 69 64 | .....................var.overrid |
| 160c0 | 65 4c 61 79 6f 75 74 20 3d 20 54 72 79 4c 6f 61 64 4c 61 79 6f 75 74 28 6f 76 65 72 72 69 64 65 | eLayout.=.TryLoadLayout(override |
| 160e0 | 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Name);.......................... |
| 16100 | 20 20 20 20 6f 76 65 72 72 69 64 65 4c 61 79 6f 75 74 2e 4d 65 72 67 65 4c 61 79 6f 75 74 28 6c | ....overrideLayout.MergeLayout(l |
| 16120 | 61 79 6f 75 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ayout);......................... |
| 16140 | 20 20 20 20 20 20 20 2f 2f 20 57 65 27 72 65 20 73 77 69 74 63 68 69 6e 67 20 74 68 65 20 6c 61 | .......//.We're.switching.the.la |
| 16160 | 79 6f 75 74 20 77 65 20 69 6e 69 74 69 61 6c 6c 79 20 74 6f 20 74 68 65 20 6c 61 79 6f 75 74 20 | yout.we.initially.to.the.layout. |
| 16180 | 77 69 74 68 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | with............................ |
| 161a0 | 20 20 2f 2f 20 74 68 65 20 6f 76 65 72 72 69 64 65 73 20 61 70 70 6c 69 65 64 2e 20 4d 61 6b 65 | ..//.the.overrides.applied..Make |
| 161c0 | 20 73 75 72 65 20 77 65 20 67 65 74 20 72 69 64 20 6f 66 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 | .sure.we.get.rid.of.information. |
| 161e0 | 68 65 72 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | here............................ |
| 16200 | 20 20 2f 2f 20 66 72 6f 6d 20 74 68 65 20 6f 76 65 72 72 69 64 65 20 74 68 61 74 20 77 65 20 64 | ..//.from.the.override.that.we.d |
| 16220 | 6f 6e 27 74 20 77 61 6e 74 20 74 6f 20 63 6f 6d 65 20 74 68 72 6f 75 67 68 20 6f 6e 63 65 20 74 | on't.want.to.come.through.once.t |
| 16240 | 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | he.............................. |
| 16260 | 2f 2f 20 6f 76 65 72 72 69 64 65 20 69 73 20 61 70 70 6c 69 65 64 2e 0d 0a 20 20 20 20 20 20 20 | //.override.is.applied.......... |
| 16280 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 76 65 72 72 69 64 65 4c 61 79 | .....................overrideLay |
| 162a0 | 6f 75 74 2e 6d 5f 42 61 73 65 4c 61 79 6f 75 74 73 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 | out.m_BaseLayouts.Clear();...... |
| 162c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 76 65 72 72 69 64 65 | ........................override |
| 162e0 | 4c 61 79 6f 75 74 2e 69 73 4f 76 65 72 72 69 64 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 | Layout.isOverride.=.false;...... |
| 16300 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 76 65 72 72 69 64 65 | ........................override |
| 16320 | 4c 61 79 6f 75 74 2e 69 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 20 3d 20 6c | Layout.isGenericTypeOfDevice.=.l |
| 16340 | 61 79 6f 75 74 2e 69 73 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 3b 0d 0a 20 20 | ayout.isGenericTypeOfDevice;.... |
| 16360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 76 65 72 72 69 | ..........................overri |
| 16380 | 64 65 4c 61 79 6f 75 74 2e 6d 5f 4e 61 6d 65 20 3d 20 6c 61 79 6f 75 74 2e 6e 61 6d 65 3b 0d 0a | deLayout.m_Name.=.layout.name;.. |
| 163a0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 | ..............................la |
| 163c0 | 79 6f 75 74 20 3d 20 6f 76 65 72 72 69 64 65 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 | yout.=.overrideLayout;.......... |
| 163e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 2e 6d 5f 41 70 70 | ....................layout.m_App |
| 16400 | 6c 69 65 64 4f 76 65 72 72 69 64 65 73 2e 41 70 70 65 6e 64 28 6f 76 65 72 72 69 64 65 4e 61 6d | liedOverrides.Append(overrideNam |
| 16420 | 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a | e);..........................}.. |
| 16440 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | ....................}........... |
| 16460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 61 62 6c 65 20 21 3d 20 6e 75 6c 6c 29 0d | .............if.(table.!=.null). |
| 16480 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 61 62 6c 65 5b 6e | .........................table[n |
| 164a0 | 61 6d 65 5d 20 3d 20 6c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ame].=.layout;.................. |
| 164c0 | 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 6f | }....................return.layo |
| 164e0 | 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | ut;..............}.............. |
| 16500 | 20 20 70 75 62 6c 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 47 65 74 42 61 73 65 4c | ..public.InternedString.GetBaseL |
| 16520 | 61 79 6f 75 74 4e 61 6d 65 28 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e | ayoutName(InternedString.layoutN |
| 16540 | 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ame)..............{............. |
| 16560 | 20 20 20 20 20 69 66 20 28 62 61 73 65 4c 61 79 6f 75 74 54 61 62 6c 65 2e 54 72 79 47 65 74 56 | .....if.(baseLayoutTable.TryGetV |
| 16580 | 61 6c 75 65 28 6c 61 79 6f 75 74 4e 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 62 61 73 65 4c 61 79 | alue(layoutName,.out.var.baseLay |
| 165a0 | 6f 75 74 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 | outName))......................r |
| 165c0 | 65 74 75 72 6e 20 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 | eturn.baseLayoutName;........... |
| 165e0 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 | .......return.default;.......... |
| 16600 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 74 75 72 6e 20 6e | ....}................//.Return.n |
| 16620 | 61 6d 65 20 6f 66 20 6c 61 79 6f 75 74 20 61 74 20 72 6f 6f 74 20 6f 66 20 22 65 78 74 65 6e 64 | ame.of.layout.at.root.of."extend |
| 16640 | 22 20 63 68 61 69 6e 20 6f 66 20 67 69 76 65 6e 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 | ".chain.of.given.layout......... |
| 16660 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 47 65 74 52 | ......public.InternedString.GetR |
| 16680 | 6f 6f 74 4c 61 79 6f 75 74 4e 61 6d 65 28 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6c 61 79 | ootLayoutName(InternedString.lay |
| 166a0 | 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | outName)..............{......... |
| 166c0 | 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 62 61 73 65 4c 61 79 6f 75 74 54 61 62 6c 65 2e | .........while.(baseLayoutTable. |
| 166e0 | 54 72 79 47 65 74 56 61 6c 75 65 28 6c 61 79 6f 75 74 4e 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 | TryGetValue(layoutName,.out.var. |
| 16700 | 62 61 73 65 4c 61 79 6f 75 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | baseLayout)).................... |
| 16720 | 20 20 6c 61 79 6f 75 74 4e 61 6d 65 20 3d 20 62 61 73 65 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 | ..layoutName.=.baseLayout;...... |
| 16740 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 6f 75 74 4e 61 6d 65 3b 0d 0a | ............return.layoutName;.. |
| 16760 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 | ............}................pub |
| 16780 | 6c 69 63 20 62 6f 6f 6c 20 43 6f 6d 70 75 74 65 44 69 73 74 61 6e 63 65 49 6e 49 6e 68 65 72 69 | lic.bool.ComputeDistanceInInheri |
| 167a0 | 74 61 6e 63 65 48 69 65 72 61 72 63 68 79 28 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 66 69 | tanceHierarchy(InternedString.fi |
| 167c0 | 72 73 74 4c 61 79 6f 75 74 2c 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 73 65 63 6f 6e 64 | rstLayout,.InternedString.second |
| 167e0 | 4c 61 79 6f 75 74 2c 20 6f 75 74 20 69 6e 74 20 64 69 73 74 61 6e 63 65 29 0d 0a 20 20 20 20 20 | Layout,.out.int.distance)....... |
| 16800 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 69 73 74 61 6e | .......{..................distan |
| 16820 | 63 65 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 | ce.=.0;....................//.Fi |
| 16840 | 72 73 74 20 74 72 79 2c 20 61 73 73 75 6d 65 20 73 65 63 6f 6e 64 4c 61 79 6f 75 74 20 69 73 20 | rst.try,.assume.secondLayout.is. |
| 16860 | 62 61 73 65 64 20 6f 6e 20 66 69 72 73 74 4c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 | based.on.firstLayout............ |
| 16880 | 20 20 20 20 20 20 20 76 61 72 20 73 65 63 6f 6e 64 44 69 73 74 61 6e 63 65 54 6f 46 69 72 73 74 | .......var.secondDistanceToFirst |
| 168a0 | 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 75 72 72 65 | .=.0;..................var.curre |
| 168c0 | 6e 74 20 3d 20 73 65 63 6f 6e 64 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | nt.=.secondLayout;.............. |
| 168e0 | 20 20 20 20 77 68 69 6c 65 20 28 21 63 75 72 72 65 6e 74 2e 49 73 45 6d 70 74 79 28 29 20 26 26 | ....while.(!current.IsEmpty().&& |
| 16900 | 20 63 75 72 72 65 6e 74 20 21 3d 20 66 69 72 73 74 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 | .current.!=.firstLayout)........ |
| 16920 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........{..................... |
| 16940 | 20 63 75 72 72 65 6e 74 20 3d 20 47 65 74 42 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 28 63 75 72 | .current.=.GetBaseLayoutName(cur |
| 16960 | 72 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 73 65 | rent);......................++se |
| 16980 | 63 6f 6e 64 44 69 73 74 61 6e 63 65 54 6f 46 69 72 73 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | condDistanceToFirst;............ |
| 169a0 | 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 75 72 | ......}..................if.(cur |
| 169c0 | 72 65 6e 74 20 3d 3d 20 66 69 72 73 74 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | rent.==.firstLayout)............ |
| 169e0 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 69 73 | ......{......................dis |
| 16a00 | 74 61 6e 63 65 20 3d 20 73 65 63 6f 6e 64 44 69 73 74 61 6e 63 65 54 6f 46 69 72 73 74 3b 0d 0a | tance.=.secondDistanceToFirst;.. |
| 16a20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b | ....................return.true; |
| 16a40 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | ..................}............. |
| 16a60 | 20 20 20 20 20 20 20 2f 2f 20 53 65 63 6f 6e 64 20 74 72 79 2c 20 61 73 73 75 6d 65 20 66 69 72 | .......//.Second.try,.assume.fir |
| 16a80 | 73 74 4c 61 79 6f 75 74 20 69 73 20 62 61 73 65 64 20 6f 6e 20 73 65 63 6f 6e 64 4c 61 79 6f 75 | stLayout.is.based.on.secondLayou |
| 16aa0 | 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 69 72 73 74 44 69 73 | t...................var.firstDis |
| 16ac0 | 74 61 6e 63 65 54 6f 53 65 63 6f 6e 64 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | tanceToSecond.=.0;.............. |
| 16ae0 | 20 20 20 20 63 75 72 72 65 6e 74 20 3d 20 66 69 72 73 74 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 | ....current.=.firstLayout;...... |
| 16b00 | 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 21 63 75 72 72 65 6e 74 2e 49 73 45 6d | ............while.(!current.IsEm |
| 16b20 | 70 74 79 28 29 20 26 26 20 63 75 72 72 65 6e 74 20 21 3d 20 73 65 63 6f 6e 64 4c 61 79 6f 75 74 | pty().&&.current.!=.secondLayout |
| 16b40 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | )..................{............ |
| 16b60 | 20 20 20 20 20 20 20 20 20 20 63 75 72 72 65 6e 74 20 3d 20 47 65 74 42 61 73 65 4c 61 79 6f 75 | ..........current.=.GetBaseLayou |
| 16b80 | 74 4e 61 6d 65 28 63 75 72 72 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tName(current);................. |
| 16ba0 | 20 20 20 20 20 2b 2b 66 69 72 73 74 44 69 73 74 61 6e 63 65 54 6f 53 65 63 6f 6e 64 3b 0d 0a 20 | .....++firstDistanceToSecond;... |
| 16bc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............}................ |
| 16be0 | 20 20 69 66 20 28 63 75 72 72 65 6e 74 20 3d 3d 20 73 65 63 6f 6e 64 4c 61 79 6f 75 74 29 0d 0a | ..if.(current.==.secondLayout).. |
| 16c00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................{............... |
| 16c20 | 20 20 20 20 20 20 20 64 69 73 74 61 6e 63 65 20 3d 20 66 69 72 73 74 44 69 73 74 61 6e 63 65 54 | .......distance.=.firstDistanceT |
| 16c40 | 6f 53 65 63 6f 6e 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | oSecond;......................re |
| 16c60 | 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d | turn.true;..................}... |
| 16c80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a | .................return.false;.. |
| 16ca0 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 | ............}................pub |
| 16cc0 | 6c 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 46 69 6e 64 4c 61 79 6f 75 74 54 68 61 | lic.InternedString.FindLayoutTha |
| 16ce0 | 74 49 6e 74 72 6f 64 75 63 65 73 43 6f 6e 74 72 6f 6c 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 | tIntroducesControl(InputControl. |
| 16d00 | 63 6f 6e 74 72 6f 6c 2c 20 43 61 63 68 65 20 63 61 63 68 65 29 0d 0a 20 20 20 20 20 20 20 20 20 | control,.Cache.cache)........... |
| 16d20 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 64 20 74 68 | ...{..................//.Find.th |
| 16d40 | 65 20 74 6f 70 6d 6f 73 74 20 63 68 69 6c 64 20 63 6f 6e 74 72 6f 6c 20 6f 6e 20 74 68 65 20 64 | e.topmost.child.control.on.the.d |
| 16d60 | 65 76 69 63 65 2e 20 41 20 64 65 76 69 63 65 20 6c 61 79 6f 75 74 20 63 61 6e 20 6f 6e 6c 79 0d | evice..A.device.layout.can.only. |
| 16d80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 64 64 20 63 68 69 6c 64 72 65 6e | .................//.add.children |
| 16da0 | 20 74 68 61 74 20 73 69 74 20 64 69 72 65 63 74 6c 79 20 75 6e 64 65 72 6e 65 61 74 68 20 69 74 | .that.sit.directly.underneath.it |
| 16dc0 | 20 28 65 2e 67 2e 20 22 6c 65 66 74 53 74 69 63 6b 22 29 2e 20 43 68 69 6c 64 72 65 6e 20 6f 66 | .(e.g.."leftStick")..Children.of |
| 16de0 | 20 63 68 69 6c 64 72 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 72 | .children..................//.ar |
| 16e00 | 65 20 69 6e 64 69 72 65 63 74 6c 79 20 61 64 64 65 64 20 62 79 20 6f 74 68 65 72 20 6c 61 79 6f | e.indirectly.added.by.other.layo |
| 16e20 | 75 74 73 20 28 65 2e 67 2e 20 22 6c 65 66 74 53 74 69 63 6b 2f 78 22 20 77 68 69 63 68 20 69 73 | uts.(e.g.."leftStick/x".which.is |
| 16e40 | 20 61 64 64 65 64 20 62 79 20 22 53 74 69 63 6b 22 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .added.by."Stick").............. |
| 16e60 | 20 20 20 20 20 2f 2f 20 54 6f 20 64 65 74 65 72 6d 69 6e 65 20 77 68 69 63 68 20 64 65 76 69 63 | .....//.To.determine.which.devic |
| 16e80 | 65 20 63 6f 6e 74 72 69 62 75 74 65 73 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 61 73 20 61 20 77 | e.contributes.the.control.as.a.w |
| 16ea0 | 68 6f 6c 65 2c 20 77 65 20 68 61 76 65 20 74 6f 20 62 65 20 6c 6f 6f 6b 69 6e 67 0d 0a 20 20 20 | hole,.we.have.to.be.looking..... |
| 16ec0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 74 20 74 68 65 20 74 6f 70 6d 6f 73 74 20 63 | .............//.at.the.topmost.c |
| 16ee0 | 68 69 6c 64 20 6f 66 20 74 68 65 20 64 65 76 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | hild.of.the.device.............. |
| 16f00 | 20 20 20 20 20 76 61 72 20 74 6f 70 6d 6f 73 74 43 68 69 6c 64 20 3d 20 63 6f 6e 74 72 6f 6c 3b | .....var.topmostChild.=.control; |
| 16f20 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 74 6f 70 6d 6f 73 74 | ..................while.(topmost |
| 16f40 | 43 68 69 6c 64 2e 70 61 72 65 6e 74 20 21 3d 20 63 6f 6e 74 72 6f 6c 2e 64 65 76 69 63 65 29 0d | Child.parent.!=.control.device). |
| 16f60 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 70 6d 6f 73 74 43 68 69 6c | .....................topmostChil |
| 16f80 | 64 20 3d 20 74 6f 70 6d 6f 73 74 43 68 69 6c 64 2e 70 61 72 65 6e 74 3b 0d 0a 0d 0a 20 20 20 20 | d.=.topmostChild.parent;........ |
| 16fa0 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 64 20 74 68 65 20 6c 61 79 6f 75 74 20 69 | ............//.Find.the.layout.i |
| 16fc0 | 6e 20 74 68 65 20 64 65 76 69 63 65 27 73 20 62 61 73 65 20 6c 61 79 6f 75 74 20 63 68 61 69 6e | n.the.device's.base.layout.chain |
| 16fe0 | 20 74 68 61 74 20 66 69 72 73 74 20 6d 65 6e 74 69 6f 6e 73 20 74 68 65 20 67 69 76 65 6e 20 63 | .that.first.mentions.the.given.c |
| 17000 | 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 | ontrol...................//.If.w |
| 17020 | 65 20 64 6f 6e 27 74 20 66 69 6e 64 20 69 74 2c 20 77 65 20 6b 6e 6f 77 20 69 74 27 73 20 66 69 | e.don't.find.it,.we.know.it's.fi |
| 17040 | 72 73 74 20 64 65 66 69 6e 65 64 20 64 69 72 65 63 74 6c 79 20 69 6e 20 74 68 65 20 6c 61 79 6f | rst.defined.directly.in.the.layo |
| 17060 | 75 74 20 6f 66 20 74 68 65 20 67 69 76 65 6e 20 64 65 76 69 63 65 2c 0d 0a 20 20 20 20 20 20 20 | ut.of.the.given.device,......... |
| 17080 | 20 20 20 20 20 20 20 20 20 2f 2f 20 69 2e 65 2e 20 69 74 27 73 20 6e 6f 74 20 61 6e 20 69 6e 68 | .........//.i.e..it's.not.an.inh |
| 170a0 | 65 72 69 74 65 64 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | erited.control.................. |
| 170c0 | 20 76 61 72 20 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 20 3d 20 63 6f 6e 74 72 6f 6c 2e | .var.deviceLayoutName.=.control. |
| 170e0 | 64 65 76 69 63 65 2e 6d 5f 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | device.m_Layout;................ |
| 17100 | 20 20 76 61 72 20 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 20 3d 20 64 65 76 69 63 65 4c 61 79 | ..var.baseLayoutName.=.deviceLay |
| 17120 | 6f 75 74 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 | outName;..................while. |
| 17140 | 28 62 61 73 65 4c 61 79 6f 75 74 54 61 62 6c 65 2e 54 72 79 47 65 74 56 61 6c 75 65 28 62 61 73 | (baseLayoutTable.TryGetValue(bas |
| 17160 | 65 4c 61 79 6f 75 74 4e 61 6d 65 2c 20 6f 75 74 20 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 29 | eLayoutName,.out.baseLayoutName) |
| 17180 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | )..................{............ |
| 171a0 | 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 20 63 61 63 68 65 2e 46 69 6e | ..........var.layout.=.cache.Fin |
| 171c0 | 64 4f 72 4c 6f 61 64 4c 61 79 6f 75 74 28 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a | dOrLoadLayout(baseLayoutName);.. |
| 171e0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f | ......................var.contro |
| 17200 | 6c 49 74 65 6d 20 3d 20 6c 61 79 6f 75 74 2e 46 69 6e 64 43 6f 6e 74 72 6f 6c 28 74 6f 70 6d 6f | lItem.=.layout.FindControl(topmo |
| 17220 | 73 74 43 68 69 6c 64 2e 6d 5f 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | stChild.m_Name);................ |
| 17240 | 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 49 74 65 6d 20 21 3d 20 6e 75 6c 6c 29 0d 0a | ......if.(controlItem.!=.null).. |
| 17260 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 4c 61 | ........................deviceLa |
| 17280 | 79 6f 75 74 4e 61 6d 65 20 3d 20 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 3b 0d 0a 20 20 20 20 | youtName.=.baseLayoutName;...... |
| 172a0 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ............}................... |
| 172c0 | 20 72 65 74 75 72 6e 20 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 | .return.deviceLayoutName;....... |
| 172e0 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 65 74 20 74 | .......}................//.Get.t |
| 17300 | 68 65 20 74 79 70 65 20 77 68 69 63 68 20 77 69 6c 6c 20 62 65 20 69 6e 73 74 61 6e 74 69 61 74 | he.type.which.will.be.instantiat |
| 17320 | 65 64 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 | ed.for.the.given.layout......... |
| 17340 | 20 20 20 20 20 20 2f 2f 20 52 65 74 75 72 6e 73 20 6e 75 6c 6c 20 69 66 20 6e 6f 20 6c 61 79 6f | ......//.Returns.null.if.no.layo |
| 17360 | 75 74 20 77 69 74 68 20 74 68 65 20 67 69 76 65 6e 20 6e 61 6d 65 20 65 78 69 73 74 73 2e 0d 0a | ut.with.the.given.name.exists... |
| 17380 | 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 79 70 65 20 47 65 74 43 6f 6e 74 72 | ............public.Type.GetContr |
| 173a0 | 6f 6c 54 79 70 65 46 6f 72 4c 61 79 6f 75 74 28 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6c | olTypeForLayout(InternedString.l |
| 173c0 | 61 79 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | ayoutName)..............{....... |
| 173e0 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 72 79 20 6c 61 79 6f 75 74 20 73 74 72 69 6e 67 73 | ...........//.Try.layout.strings |
| 17400 | 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6c 61 79 6f 75 74 | ...................while.(layout |
| 17420 | 53 74 72 69 6e 67 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 6c 61 79 6f 75 74 4e 61 6d 65 29 29 | Strings.ContainsKey(layoutName)) |
| 17440 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..................{............. |
| 17460 | 20 20 20 20 20 20 20 20 20 69 66 20 28 62 61 73 65 4c 61 79 6f 75 74 54 61 62 6c 65 2e 54 72 79 | .........if.(baseLayoutTable.Try |
| 17480 | 47 65 74 56 61 6c 75 65 28 6c 61 79 6f 75 74 4e 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 62 61 73 | GetValue(layoutName,.out.var.bas |
| 174a0 | 65 4c 61 79 6f 75 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | eLayout))......................{ |
| 174c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 6f 72 | ..........................//.Wor |
| 174e0 | 6b 20 6f 75 72 20 77 61 79 20 75 70 20 74 68 65 20 69 6e 68 65 72 69 74 61 6e 63 65 20 63 68 61 | k.our.way.up.the.inheritance.cha |
| 17500 | 69 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 | in...........................lay |
| 17520 | 6f 75 74 4e 61 6d 65 20 3d 20 62 61 73 65 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 | outName.=.baseLayout;........... |
| 17540 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...........}.................... |
| 17560 | 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | ..else......................{... |
| 17580 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 61 79 6f 75 74 | .......................//.Layout |
| 175a0 | 20 64 6f 65 73 6e 27 74 20 65 78 74 65 6e 64 20 61 6e 79 74 68 69 6e 67 20 61 6e 64 20 41 54 4d | .doesn't.extend.anything.and.ATM |
| 175c0 | 20 77 65 20 64 6f 6e 27 74 20 73 75 70 70 6f 72 74 20 73 65 74 74 69 6e 67 0d 0a 20 20 20 20 20 | .we.don't.support.setting....... |
| 175e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 79 70 65 73 20 65 78 70 6c | ...................//.types.expl |
| 17600 | 69 63 69 74 6c 79 20 66 72 6f 6d 20 4a 53 4f 4e 20 6c 61 79 6f 75 74 73 2e 20 53 6f 20 68 61 73 | icitly.from.JSON.layouts..So.has |
| 17620 | 20 74 6f 20 62 65 20 49 6e 70 75 74 44 65 76 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .to.be.InputDevice.............. |
| 17640 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 6f 66 28 49 6e 70 75 74 | .............return.typeof(Input |
| 17660 | 44 65 76 69 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | Device);......................}. |
| 17680 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | .................}.............. |
| 176a0 | 20 20 20 20 20 20 2f 2f 20 54 72 79 20 6c 61 79 6f 75 74 20 74 79 70 65 73 2e 0d 0a 20 20 20 20 | ......//.Try.layout.types....... |
| 176c0 | 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 54 79 70 65 73 2e 54 72 79 47 65 74 56 61 | ............layoutTypes.TryGetVa |
| 176e0 | 6c 75 65 28 6c 61 79 6f 75 74 4e 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 72 65 73 75 6c 74 29 3b | lue(layoutName,.out.var.result); |
| 17700 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 73 75 6c 74 3b | ..................return.result; |
| 17720 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | ..............}................/ |
| 17740 | 2f 20 52 65 74 75 72 6e 20 74 72 75 65 20 69 66 20 74 68 65 20 67 69 76 65 6e 20 63 6f 6e 74 72 | /.Return.true.if.the.given.contr |
| 17760 | 6f 6c 20 6c 61 79 6f 75 74 20 68 61 73 20 61 20 76 61 6c 75 65 20 74 79 70 65 20 77 68 6f 73 65 | ol.layout.has.a.value.type.whose |
| 17780 | 20 76 61 6c 75 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 63 61 6e 20 62 65 20 61 | .values..............//.can.be.a |
| 177a0 | 73 73 69 67 6e 65 64 20 74 6f 20 76 61 72 69 61 62 6c 65 73 20 6f 66 20 74 79 70 65 20 76 61 6c | ssigned.to.variables.of.type.val |
| 177c0 | 75 65 54 79 70 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c | ueType...............public.bool |
| 177e0 | 20 56 61 6c 75 65 54 79 70 65 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 49 6e 74 65 72 | .ValueTypeIsAssignableFrom(Inter |
| 17800 | 6e 65 64 53 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 2c 20 54 79 70 65 20 76 61 6c 75 65 | nedString.layoutName,.Type.value |
| 17820 | 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | Type)..............{............ |
| 17840 | 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 54 79 70 65 20 3d 20 47 65 74 43 6f 6e 74 72 | ......var.controlType.=.GetContr |
| 17860 | 6f 6c 54 79 70 65 46 6f 72 4c 61 79 6f 75 74 28 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 | olTypeForLayout(layoutName);.... |
| 17880 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 54 79 70 65 20 3d 3d | ..............if.(controlType.== |
| 178a0 | 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 | .null)......................retu |
| 178c0 | 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 | rn.false;....................var |
| 178e0 | 20 76 61 6c 75 65 54 79 70 4f 66 43 6f 6e 74 72 6f 6c 20 3d 0d 0a 20 20 20 20 20 20 20 20 20 20 | .valueTypOfControl.=............ |
| 17900 | 20 20 20 20 20 20 20 20 20 20 54 79 70 65 48 65 6c 70 65 72 73 2e 47 65 74 47 65 6e 65 72 69 63 | ..........TypeHelpers.GetGeneric |
| 17920 | 54 79 70 65 41 72 67 75 6d 65 6e 74 46 72 6f 6d 48 69 65 72 61 72 63 68 79 28 63 6f 6e 74 72 6f | TypeArgumentFromHierarchy(contro |
| 17940 | 6c 54 79 70 65 2c 20 74 79 70 65 6f 66 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 3c 3e 29 2c 20 30 | lType,.typeof(InputControl<>),.0 |
| 17960 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 54 79 70 | );..................if.(valueTyp |
| 17980 | 4f 66 43 6f 6e 74 72 6f 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | OfControl.==.null).............. |
| 179a0 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 | ........return.false;........... |
| 179c0 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 76 61 6c 75 65 54 79 70 65 2e 49 73 41 73 73 69 | .........return.valueType.IsAssi |
| 179e0 | 67 6e 61 62 6c 65 46 72 6f 6d 28 76 61 6c 75 65 54 79 70 4f 66 43 6f 6e 74 72 6f 6c 29 3b 0d 0a | gnableFrom(valueTypOfControl);.. |
| 17a00 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 | ............}................pub |
| 17a20 | 6c 69 63 20 62 6f 6f 6c 20 49 73 47 65 6e 65 72 61 74 65 64 4c 61 79 6f 75 74 28 49 6e 74 65 72 | lic.bool.IsGeneratedLayout(Inter |
| 17a40 | 6e 65 64 53 74 72 69 6e 67 20 6c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b | nedString.layout)..............{ |
| 17a60 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 6f 75 74 42 | ..................return.layoutB |
| 17a80 | 75 69 6c 64 65 72 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 6c 61 79 6f 75 74 29 3b 0d 0a 20 20 | uilders.ContainsKey(layout);.... |
| 17aa0 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | ..........}................publi |
| 17ac0 | 63 20 62 6f 6f 6c 20 49 73 42 61 73 65 64 4f 6e 28 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 | c.bool.IsBasedOn(InternedString. |
| 17ae0 | 70 61 72 65 6e 74 4c 61 79 6f 75 74 2c 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 63 68 69 | parentLayout,.InternedString.chi |
| 17b00 | 6c 64 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | ldLayout)..............{........ |
| 17b20 | 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 20 63 68 69 6c 64 4c 61 79 6f | ..........var.layout.=.childLayo |
| 17b40 | 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 62 61 73 65 | ut;..................while.(base |
| 17b60 | 4c 61 79 6f 75 74 54 61 62 6c 65 2e 54 72 79 47 65 74 56 61 6c 75 65 28 6c 61 79 6f 75 74 2c 20 | LayoutTable.TryGetValue(layout,. |
| 17b80 | 6f 75 74 20 6c 61 79 6f 75 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | out.layout))..................{. |
| 17ba0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 20 | .....................if.(layout. |
| 17bc0 | 3d 3d 20 70 61 72 65 6e 74 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ==.parentLayout)................ |
| 17be0 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 | ..........return.true;.......... |
| 17c00 | 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | ........}..................retur |
| 17c20 | 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 | n.false;..............}......... |
| 17c40 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 41 64 64 4d 61 74 63 68 65 72 28 49 6e | .......public.void.AddMatcher(In |
| 17c60 | 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6c 61 79 6f 75 74 2c 20 49 6e 70 75 74 44 65 76 69 63 65 | ternedString.layout,.InputDevice |
| 17c80 | 4d 61 74 63 68 65 72 20 6d 61 74 63 68 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | Matcher.matcher)..............{. |
| 17ca0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 67 6e 6f 72 65 20 69 66 20 61 6c | .................//.Ignore.if.al |
| 17cc0 | 72 65 61 64 79 20 61 64 64 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 | ready.added...................va |
| 17ce0 | 72 20 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 43 6f 75 6e 74 20 3d 20 6c 61 79 6f 75 74 4d 61 74 | r.layoutMatcherCount.=.layoutMat |
| 17d00 | 63 68 65 72 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f | chers.Count;..................fo |
| 17d20 | 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 43 | r.(var.i.=.0;.i.<.layoutMatcherC |
| 17d40 | 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ount;.++i)...................... |
| 17d60 | 69 66 20 28 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 73 5b 69 5d 2e 64 65 76 69 63 65 4d 61 74 63 | if.(layoutMatchers[i].deviceMatc |
| 17d80 | 68 65 72 20 3d 3d 20 6d 61 74 63 68 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | her.==.matcher)................. |
| 17da0 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .........return;................ |
| 17dc0 | 20 20 20 20 2f 2f 20 41 70 70 65 6e 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ....//.Append................... |
| 17de0 | 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 73 2e 41 64 64 28 6e 65 77 20 4c 61 79 6f 75 74 4d 61 74 | layoutMatchers.Add(new.LayoutMat |
| 17e00 | 63 68 65 72 20 7b 6c 61 79 6f 75 74 4e 61 6d 65 20 3d 20 6c 61 79 6f 75 74 2c 20 64 65 76 69 63 | cher.{layoutName.=.layout,.devic |
| 17e20 | 65 4d 61 74 63 68 65 72 20 3d 20 6d 61 74 63 68 65 72 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | eMatcher.=.matcher});........... |
| 17e40 | 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 68 | ...}..........}............//.Th |
| 17e60 | 69 73 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 69 73 20 6f 77 6e 65 64 20 61 6e 64 20 6d 61 6e 61 67 | is.collection.is.owned.and.manag |
| 17e80 | 65 64 20 62 79 20 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 | ed.by.InputManager...........int |
| 17ea0 | 65 72 6e 61 6c 20 73 74 61 74 69 63 20 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 5f 4c 61 79 6f 75 74 | ernal.static.Collection.s_Layout |
| 17ec0 | 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 4c 61 79 6f 75 | s;............public.class.Layou |
| 17ee0 | 74 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 20 3a 20 45 78 63 65 70 74 69 6f 6e 0d 0a | tNotFoundException.:.Exception.. |
| 17f00 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 | ........{..............public.st |
| 17f20 | 72 69 6e 67 20 6c 61 79 6f 75 74 20 7b 20 67 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | ring.layout.{.get;.}............ |
| 17f40 | 20 20 20 20 70 75 62 6c 69 63 20 4c 61 79 6f 75 74 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 | ....public.LayoutNotFoundExcepti |
| 17f60 | 6f 6e 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | on()..............{............. |
| 17f80 | 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 4c 61 79 6f 75 74 4e | .}................public.LayoutN |
| 17fa0 | 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 28 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 73 74 | otFoundException(string.name,.st |
| 17fc0 | 72 69 6e 67 20 6d 65 73 73 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a | ring.message)..................: |
| 17fe0 | 20 62 61 73 65 28 6d 65 73 73 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | .base(message)..............{... |
| 18000 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 20 3d 20 6e 61 6d 65 3b 0d 0a 20 | ...............layout.=.name;... |
| 18020 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c | ...........}................publ |
| 18040 | 69 63 20 4c 61 79 6f 75 74 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 28 73 74 72 69 6e | ic.LayoutNotFoundException(strin |
| 18060 | 67 20 6e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 62 61 73 65 28 | g.name)..................:.base( |
| 18080 | 24 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 20 27 7b 6e | $"Cannot.find.control.layout.'{n |
| 180a0 | 61 6d 65 7d 27 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | ame}'")..............{.......... |
| 180c0 | 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 20 3d 20 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 | ........layout.=.name;.......... |
| 180e0 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 4c 61 79 6f | ....}................public.Layo |
| 18100 | 75 74 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 28 73 74 72 69 6e 67 20 6d 65 73 73 61 | utNotFoundException(string.messa |
| 18120 | 67 65 2c 20 45 78 63 65 70 74 69 6f 6e 20 69 6e 6e 65 72 45 78 63 65 70 74 69 6f 6e 29 20 3a 0d | ge,.Exception.innerException).:. |
| 18140 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 28 6d 65 73 73 61 67 65 2c 20 69 | .................base(message,.i |
| 18160 | 6e 6e 65 72 45 78 63 65 70 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | nnerException)..............{... |
| 18180 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 74 | ...........}................prot |
| 181a0 | 65 63 74 65 64 20 4c 61 79 6f 75 74 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 28 53 65 | ected.LayoutNotFoundException(Se |
| 181c0 | 72 69 61 6c 69 7a 61 74 69 6f 6e 49 6e 66 6f 20 69 6e 66 6f 2c 0d 0a 20 20 20 20 20 20 20 20 20 | rializationInfo.info,........... |
| 181e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
| 18200 | 20 20 20 20 20 53 74 72 65 61 6d 69 6e 67 43 6f 6e 74 65 78 74 20 63 6f 6e 74 65 78 74 29 20 3a | .....StreamingContext.context).: |
| 18220 | 20 62 61 73 65 28 69 6e 66 6f 2c 20 63 6f 6e 74 65 78 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | .base(info,.context)............ |
| 18240 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d | ..{..............}..........}... |
| 18260 | 0a 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6e 73 74 72 75 63 74 73 20 49 6e 70 75 74 43 6f 6e 74 | .........//.Constructs.InputCont |
| 18280 | 72 6f 6c 4c 61 79 6f 75 74 20 69 6e 73 74 61 6e 63 65 73 20 61 6e 64 20 63 61 63 68 65 73 20 74 | rolLayout.instances.and.caches.t |
| 182a0 | 68 65 6d 2e 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 72 75 63 74 20 43 61 | hem...........internal.struct.Ca |
| 182c0 | 63 68 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c | che..........{..............publ |
| 182e0 | 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 49 6e | ic.Dictionary<InternedString,.In |
| 18300 | 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 3e 20 74 61 62 6c 65 3b 0d 0a 0d 0a 20 20 20 20 | putControlLayout>.table;........ |
| 18320 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 43 6c 65 61 72 28 29 0d 0a 20 20 20 | ........public.void.Clear()..... |
| 18340 | 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 61 62 6c | .........{..................tabl |
| 18360 | 65 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 | e.=.null;..............}........ |
| 18380 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 | ........public.InputControlLayou |
| 183a0 | 74 20 46 69 6e 64 4f 72 4c 6f 61 64 4c 61 79 6f 75 74 28 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 | t.FindOrLoadLayout(string.name,. |
| 183c0 | 62 6f 6f 6c 20 74 68 72 6f 77 49 66 4e 6f 74 46 6f 75 6e 64 20 3d 20 74 72 75 65 29 0d 0a 20 20 | bool.throwIfNotFound.=.true).... |
| 183e0 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 | ..........{..................var |
| 18400 | 20 69 6e 74 65 72 6e 65 64 4e 61 6d 65 20 3d 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 | .internedName.=.new.InternedStri |
| 18420 | 6e 67 28 6e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | ng(name);....................if. |
| 18440 | 28 74 61 62 6c 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | (table.==.null)................. |
| 18460 | 20 20 20 20 20 74 61 62 6c 65 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 | .....table.=.new.Dictionary<Inte |
| 18480 | 72 6e 65 64 53 74 72 69 6e 67 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 3e 28 | rnedString,.InputControlLayout>( |
| 184a0 | 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 | );....................var.layout |
| 184c0 | 20 3d 20 73 5f 4c 61 79 6f 75 74 73 2e 54 72 79 4c 6f 61 64 4c 61 79 6f 75 74 28 69 6e 74 65 72 | .=.s_Layouts.TryLoadLayout(inter |
| 184e0 | 6e 65 64 4e 61 6d 65 2c 20 74 61 62 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | nedName,.table);................ |
| 18500 | 20 20 69 66 20 28 6c 61 79 6f 75 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 | ..if.(layout.!=.null)........... |
| 18520 | 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 6f 75 74 3b 0d 0a 0d 0a 20 20 20 | ...........return.layout;....... |
| 18540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 74 68 69 6e 67 2e 0d 0a 20 20 20 20 20 20 | .............//.Nothing......... |
| 18560 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 68 72 6f 77 49 66 4e 6f 74 46 6f 75 6e 64 29 0d 0a | ..........if.(throwIfNotFound).. |
| 18580 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 4c 61 | ....................throw.new.La |
| 185a0 | 79 6f 75 74 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 29 3b 0d 0a 20 20 | youtNotFoundException(name);.... |
| 185c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 | ..............return.null;...... |
| 185e0 | 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | ........}..........}............ |
| 18600 | 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 43 61 63 68 65 20 73 5f 43 61 63 68 65 49 6e 73 | internal.static.Cache.s_CacheIns |
| 18620 | 74 61 6e 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 | tance;..........internal.static. |
| 18640 | 69 6e 74 20 73 5f 43 61 63 68 65 49 6e 73 74 61 6e 63 65 52 65 66 3b 0d 0a 0d 0a 20 20 20 20 20 | int.s_CacheInstanceRef;......... |
| 18660 | 20 20 20 2f 2f 20 43 6f 6e 73 74 72 75 63 74 69 6e 67 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c | ...//.Constructing.InputControlL |
| 18680 | 61 79 6f 75 74 73 20 69 73 20 76 65 72 79 20 63 6f 73 74 6c 79 20 61 73 20 69 74 20 74 65 6e 64 | ayouts.is.very.costly.as.it.tend |
| 186a0 | 73 20 74 6f 20 69 6e 76 6f 6c 76 65 20 6c 6f 74 73 20 6f 66 20 72 65 66 6c 65 63 74 69 6f 6e 20 | s.to.involve.lots.of.reflection. |
| 186c0 | 61 6e 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 70 69 65 63 69 6e 67 20 64 61 74 61 20 74 6f 67 | and..........//.piecing.data.tog |
| 186e0 | 65 74 68 65 72 2e 20 54 68 75 73 2c 20 77 68 65 72 65 76 65 72 20 70 6f 73 73 69 62 6c 65 2c 20 | ether..Thus,.wherever.possible,. |
| 18700 | 77 65 20 77 61 6e 74 20 74 6f 20 6b 65 65 70 20 6c 61 79 6f 75 74 73 20 61 72 6f 75 6e 64 20 66 | we.want.to.keep.layouts.around.f |
| 18720 | 6f 72 20 61 73 20 6c 6f 6e 67 20 61 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 77 65 20 6e 65 65 | or.as.long.as..........//.we.nee |
| 18740 | 64 20 74 68 65 6d 20 79 65 74 20 61 74 20 74 68 65 20 73 61 6d 65 20 74 69 6d 65 20 6e 6f 74 20 | d.them.yet.at.the.same.time.not. |
| 18760 | 6b 65 65 70 20 74 68 65 6d 20 6e 65 65 64 6c 65 73 73 6c 79 20 61 72 6f 75 6e 64 20 77 68 69 6c | keep.them.needlessly.around.whil |
| 18780 | 65 20 77 65 20 64 6f 6e 27 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 | e.we.don't...........//......... |
| 187a0 | 20 2f 2f 20 54 68 69 73 20 70 72 6f 70 65 72 74 79 20 6d 61 6b 65 73 20 61 20 63 61 63 68 65 20 | .//.This.property.makes.a.cache. |
| 187c0 | 6f 66 20 6c 61 79 6f 75 74 73 20 61 76 61 69 6c 61 62 6c 65 20 67 6c 6f 62 61 6c 6c 79 20 79 65 | of.layouts.available.globally.ye |
| 187e0 | 74 20 69 6d 70 6c 65 6d 65 6e 74 73 20 61 20 72 65 73 6f 75 72 63 65 20 61 63 71 75 69 73 69 74 | t.implements.a.resource.acquisit |
| 18800 | 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 62 61 73 65 64 20 70 61 74 74 65 72 6e 20 74 6f | ion..........//.based.pattern.to |
| 18820 | 20 6d 61 6b 65 20 73 75 72 65 20 77 65 20 6b 65 65 70 20 74 68 65 20 63 61 63 68 65 20 61 6c 69 | .make.sure.we.keep.the.cache.ali |
| 18840 | 76 65 20 6f 6e 6c 79 20 77 69 74 68 69 6e 20 73 70 65 63 69 66 69 63 20 65 78 65 63 75 74 69 6f | ve.only.within.specific.executio |
| 18860 | 6e 20 73 63 6f 70 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 | n.scopes...........internal.stat |
| 18880 | 69 63 20 72 65 66 20 43 61 63 68 65 20 63 61 63 68 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 | ic.ref.Cache.cache..........{... |
| 188a0 | 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | ...........get..............{... |
| 188c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 73 5f 43 61 | ...............Debug.Assert(s_Ca |
| 188e0 | 63 68 65 49 6e 73 74 61 6e 63 65 52 65 66 20 3e 20 30 2c 20 22 4d 75 73 74 20 68 6f 6c 64 20 61 | cheInstanceRef.>.0,."Must.hold.a |
| 18900 | 6e 20 69 6e 73 74 61 6e 63 65 20 72 65 66 65 72 65 6e 63 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 | n.instance.reference");......... |
| 18920 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 66 20 73 5f 43 61 63 68 65 49 6e 73 74 61 | .........return.ref.s_CacheInsta |
| 18940 | 6e 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a | nce;..............}..........}.. |
| 18960 | 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 43 61 63 68 65 52 | ..........internal.static.CacheR |
| 18980 | 65 66 49 6e 73 74 61 6e 63 65 20 43 61 63 68 65 52 65 66 28 29 0d 0a 20 20 20 20 20 20 20 20 7b | efInstance.CacheRef()..........{ |
| 189a0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 73 5f 43 61 63 68 65 49 6e 73 74 61 6e 63 65 52 | ..............++s_CacheInstanceR |
| 189c0 | 65 66 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 43 61 63 68 | ef;..............return.new.Cach |
| 189e0 | 65 52 65 66 49 6e 73 74 61 6e 63 65 20 7b 76 61 6c 69 64 20 3d 20 74 72 75 65 7d 3b 0d 0a 20 20 | eRefInstance.{valid.=.true};.... |
| 18a00 | 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 72 75 | ......}............internal.stru |
| 18a20 | 63 74 20 43 61 63 68 65 52 65 66 49 6e 73 74 61 6e 63 65 20 3a 20 49 44 69 73 70 6f 73 61 62 6c | ct.CacheRefInstance.:.IDisposabl |
| 18a40 | 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 | e..........{..............public |
| 18a60 | 20 62 6f 6f 6c 20 76 61 6c 69 64 3b 20 2f 2f 20 4d 61 6b 65 20 73 75 72 65 20 77 65 20 63 61 6e | .bool.valid;.//.Make.sure.we.can |
| 18a80 | 20 64 69 73 74 69 6e 67 75 69 73 68 20 64 65 66 61 75 6c 74 2d 69 6e 69 74 69 61 6c 69 7a 65 64 | .distinguish.default-initialized |
| 18aa0 | 20 69 6e 73 74 61 6e 63 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | .instances...............public. |
| 18ac0 | 76 6f 69 64 20 44 69 73 70 6f 73 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | void.Dispose()..............{... |
| 18ae0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 76 61 6c 69 64 29 0d 0a 20 20 20 20 | ...............if.(!valid)...... |
| 18b00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 | ................return;......... |
| 18b20 | 20 20 20 20 20 20 20 20 20 20 20 2d 2d 73 5f 43 61 63 68 65 49 6e 73 74 61 6e 63 65 52 65 66 3b | ...........--s_CacheInstanceRef; |
| 18b40 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 5f 43 61 63 68 65 49 6e 73 | ..................if.(s_CacheIns |
| 18b60 | 74 61 6e 63 65 52 65 66 20 3c 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tanceRef.<=.0).................. |
| 18b80 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 43 61 63 68 65 49 6e | {......................s_CacheIn |
| 18ba0 | 73 74 61 6e 63 65 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | stance.=.default;............... |
| 18bc0 | 20 20 20 20 20 20 20 73 5f 43 61 63 68 65 49 6e 73 74 61 6e 63 65 52 65 66 20 3d 20 30 3b 0d 0a | .......s_CacheInstanceRef.=.0;.. |
| 18be0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ................}............... |
| 18c00 | 20 20 20 20 20 76 61 6c 69 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .....valid.=.false;............. |
| 18c20 | 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 00 00 00 00 00 00 00 | .}..........}......}..}......... |
| 18c40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 00 00 00 49 6e 70 75 74 43 6f 6e 74 72 6f 6c | ....................InputControl |
| 18c60 | 4c 61 79 6f 75 74 00 00 1f 00 00 00 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 | Layout......UnityEngine.InputSys |
| 18c80 | 74 65 6d 2e 4c 61 79 6f 75 74 73 00 | tem.Layouts. |