public CrossSection(ISectionFactory sectionFactory, double width, double interval) { if (width <= 0) { throw new ArgumentOutOfRangeException(nameof(width)); } if (interval <= 0) { throw new ArgumentOutOfRangeException(nameof(interval)); } _sectionFactory = sectionFactory; Width = width; Interval = interval; NumberOfSections = (int)Math.Ceiling(Width / Interval); if (NumberOfSections < 5) { throw new Exception(string.Format(Resources.NOT_ENOUGH_SECTIONS_ERROR, AppConstants.MINIMUM_NUMBER_OF_SECTIONS)); } if (NumberOfSections > 200) { throw new Exception(string.Format(Resources.MORE_THAN_ENOUGH_SECTIONS_ERROR, AppConstants.MAXIMUM_NUMBER_OF_SECTIONS)); } CreateSections(); }
/// <summary> /// Ctor /// </summary> /// <param name="sectionFactory">factory that instantiates menu sections</param> /// <param name="sectionsParent">container for the different sections view</param> public SectionsController(ISectionFactory sectionFactory, Transform sectionsParent) { this.sectionsParent = sectionsParent; this.sectionFactory = sectionFactory; SectionBase.OnRequestOpenSection += OnOpenSectionRequested; SectionBase.OnRequestContextMenuHide += OnHideContextMenuRequested; }
public KtcDocumentBodyFactory( IDocumentNodeFactory nodeFactory, IAssemblyDrawingFactory assemblyDrawingFactory, IDocumentRowFactory rowFactory, ISectionFactory sectionFactory) { _nodeFactory = nodeFactory; _assemblyDrawingFactory = assemblyDrawingFactory; _rowFactory = rowFactory; _sectionFactory = sectionFactory; }
public ArticleFactory(ISimpleTagParserContainer tagParserContainer, IDynamicTagParser <Profile> profileTagParser, ISectionFactory sectionFactory, MarkdownWrapper markdownWrapper, IDynamicTagParser <Document> documentTagParser, IDynamicTagParser <Alert> alertsInlineTagParser, IDynamicTagParser <S3BucketSearch> searchTagParser, IDynamicTagParser <PrivacyNotice> privacyNoticeTagParser, IRepository repository) { _tagParserContainer = tagParserContainer; _sectionFactory = sectionFactory; _markdownWrapper = markdownWrapper; _profileTagParser = profileTagParser; _documentTagParser = documentTagParser; _alertsInlineTagParser = alertsInlineTagParser; _searchTagParser = searchTagParser; _privacyNoticeTagParser = privacyNoticeTagParser; _repository = repository; }
public GameFactory( IGameStateService gameStateService, IDatabaseService databaseService, ILogService logService, IConfigurator configurator, IRandomService randomService, IUniverseFactory universeFactory, IWorldFactory worldFactory, IAreaFactory areaFactory, ISectionFactory sectionFactory) { this.gameStateService = gameStateService; this.databaseService = databaseService; this.logService = logService; this.configurator = configurator; this.randomService = randomService; this.universeFactory = universeFactory; this.worldFactory = worldFactory; this.areaFactory = areaFactory; this.sectionFactory = sectionFactory; }
/// <summary> /// Ctor /// </summary> /// <param name="sectionFactory">factory that instantiates menu sections</param> /// <param name="sectionsParent">container for the different sections view</param> public SectionsController(ISectionFactory sectionFactory, Transform sectionsParent) { this.sectionsParent = sectionsParent; this.sectionFactory = sectionFactory; }
public PageFactory(ISectionFactory sectionFactory) { ChildFactory = sectionFactory as IBaseFactory; }
public RiverFlowCalculatorForm() { InitializeComponent(); _sectionFactory = new SectionFactory(); }
public PageFactory(ISectionFactory sectionFactory) { ChilfFactory = sectionFactory; }
/// <summary> /// Constructor /// </summary> /// <param name="id"> /// The ID of the location. /// </param> /// <param name="name"> /// A string representing the name of the dungeon. /// </param> /// <param name="mapLocations"> /// A list of map locations. /// </param> /// <param name="map"> /// A 32-bit signed integer representing the number of maps in the dungeon. /// </param> /// <param name="compass"> /// A 32-bit signed integer representing the number of compasses in the dungeon. /// </param> /// <param name="smallKeys"> /// A 32-bit signed integer representing the number of small keys in the dungeon. /// </param> /// <param name="bigKey"> /// A 32-bit signed integer representing the number of big keys in the dungeon. /// </param> /// <param name="mapItem"> /// The map item. /// </param> /// <param name="compassItem"> /// The compass item. /// </param> /// <param name="smallKeyItem"> /// The small key item. /// </param> /// <param name="bigKeyItem"> /// The big key item. /// </param> /// <param name="nodes"> /// A list of dungeon node IDs within the dungeon. /// </param> /// <param name="items"> /// A list of dungeon item IDs within the dungeon. /// </param> /// <param name="bosses"> /// A list of dungeon item IDs for bosses within the dungeon. /// </param> /// <param name="smallKeyDoors"> /// A list of small key door IDs within the dungeon. /// </param> /// <param name="bigKeyDoors"> /// A list of big key door IDs within the dungeon. /// </param> /// <param name="entryNodes"> /// A list of entry nodes for this dungeon. /// </param> public Dungeon( IItemDictionary items, IMode mode, IMutableDungeon.Factory mutableDungeonFactory, ILocationFactory locationFactory, IMapLocationFactory mapLocationFactory, ISectionFactory sectionFactory, IMarking.Factory markingFactory, ILocationNoteCollection notes, IDungeonFactory dungeonFactory, IKeyLayoutFactory keyDoorFactory, IDungeonState.Factory stateFactory, LocationID id) : base(locationFactory, mapLocationFactory, sectionFactory, markingFactory, notes, id) { _items = items; _mode = mode; _mutableDungeonFactory = mutableDungeonFactory; _stateFactory = stateFactory; Map = dungeonFactory.GetDungeonMapCount(id); Compass = dungeonFactory.GetDungeonCompassCount(id); SmallKeys = dungeonFactory.GetDungeonSmallKeyCount(id); BigKey = dungeonFactory.GetDungeonBigKeyCount(id); MapItem = dungeonFactory.GetDungeonMapItem(id); CompassItem = dungeonFactory.GetDungeonCompassItem(id); SmallKeyItem = dungeonFactory.GetDungeonSmallKeyItem(id); BigKeyItem = dungeonFactory.GetDungeonBigKeyItem(id); Nodes = dungeonFactory.GetDungeonNodes(id); DungeonItems = dungeonFactory.GetDungeonItems(id); Bosses = dungeonFactory.GetDungeonBosses(id); SmallKeyDrops = dungeonFactory.GetDungeonSmallKeyDrops(id); BigKeyDrops = dungeonFactory.GetDungeonBigKeyDrops(id); SmallKeyDoors = dungeonFactory.GetDungeonSmallKeyDoors(id); BigKeyDoors = dungeonFactory.GetDungeonBigKeyDoors(id); KeyLayouts = keyDoorFactory.GetDungeonKeyLayouts(this); EntryNodes = dungeonFactory.GetDungeonEntryNodes(id); foreach (var section in Sections) { section.PropertyChanged += OnSectionChanged; } foreach (var node in EntryNodes) { node.ChangePropagated += OnNodeChangePropagated; } if (BigKeyItem != null) { BigKeyItem.PropertyChanged += OnItemChanged; } for (int i = 0; i < Environment.ProcessorCount; i++) { CreateDungeonData(); } _mode.PropertyChanged += OnModeChanged; SubscribeToConnectionRequirements(); UpdateSectionAccessibility(); }
public SimulationInitializer(Random seed, ICoreFactory coreFactory, ISectionFactory sectionFactory) { this.coreFactory = coreFactory; this.sectionFactory = sectionFactory; }