| | 1 | | using System; |
| | 2 | |
|
| | 3 | | internal interface ISectionFactory |
| | 4 | | { |
| | 5 | | SectionBase GetSectionController(SectionId id); |
| | 6 | | } |
| | 7 | |
|
| | 8 | | internal class SectionFactory : ISectionFactory |
| | 9 | | { |
| | 10 | | SectionBase ISectionFactory.GetSectionController(SectionId id) |
| | 11 | | { |
| 1 | 12 | | SectionBase result = null; |
| | 13 | | switch (id) |
| | 14 | | { |
| | 15 | | case SectionId.SCENES_MAIN: |
| 0 | 16 | | result = new SectionScenesController(); |
| 0 | 17 | | break; |
| | 18 | | case SectionId.SCENES_DEPLOYED: |
| 1 | 19 | | result = new SectionDeployedScenesController(); |
| 1 | 20 | | break; |
| | 21 | | case SectionId.SCENES_PROJECT: |
| 0 | 22 | | result = new SectionProjectScenesController(); |
| 0 | 23 | | break; |
| | 24 | | case SectionId.LAND: |
| 0 | 25 | | result = new SectionLandController(); |
| 0 | 26 | | break; |
| | 27 | | case SectionId.SETTINGS_PROJECT_GENERAL: |
| 0 | 28 | | result = new SectionSceneGeneralSettingsController(); |
| 0 | 29 | | break; |
| | 30 | | case SectionId.SETTINGS_PROJECT_CONTRIBUTORS: |
| 0 | 31 | | result = new SectionSceneContributorsSettingsController(); |
| 0 | 32 | | break; |
| | 33 | | case SectionId.SETTINGS_PROJECT_ADMIN: |
| 0 | 34 | | result = new SectionSceneAdminsSettingsController(); |
| | 35 | | break; |
| | 36 | | } |
| | 37 | |
|
| 1 | 38 | | return result; |
| | 39 | | } |
| | 40 | | } |