Example #1
0
        public void FilesProcessing()
        {
            string[] fileNames = Directory.GetFiles(Constants.DataFilesFolder);

            var recordCollector = RecordCollector.GetInstance();

            foreach (var fileName in fileNames)
            {
                using (container = new UnityContainer())
                {
                    var menuConfiguration = new MenuConfiguration(container);
                    menuConfiguration.Configure();

                    var menu = container.Resolve <IMenu>();

                    var configurator = new ReportConfigurator(container, fileName, menu);

                    configurator.Setup();

                    if (configurator.IsSuccesfulConfiguration)
                    {
                        var record = new OfficerProcessingRecord();

                        record.FileName = fileName;

                        recordCollector.AddRecord(record);

                        Run();
                    }
                }
            }
            recordCollector.WriteRecordList();
        }
 public SmartPowerTreads(IServiceContext serviceContext)
 {
     _hero          = serviceContext.Owner as Hero;
     _updateHandler = UpdateManager.Subscribe(OnGameUpdate, 200);
     _random        = new Random();
     _configs       = new MenuConfiguration();
 }
Example #3
0
 public static Menu FromConfig(MenuConfiguration config, IActionFactory actionFactory)
 {
     return(new Menu(
                CommandBindingCollection.FromCollection(config.CommandBindings, actionFactory),
                config.Pages.Select((p, i) => MenuPage.FromConfig(p, i, actionFactory)),
                config.Help,
                config.Help2));
 }
Example #4
0
        public MenuScene(Microsoft.Xna.Framework.Game game) : base(game)
        {
            camera = new Camera2D(Game);
            //Game.Components.Add((IGameComponent)camera);

            screen = EntityFactory.CreateSprite("default");
            MenuConfiguration menuConfiguration = Game.Content.Load <MenuConfiguration>("Menu.Config");

            screen.LoadContent(menuConfiguration.AssetName);
            screen.Scale = menuConfiguration.Scale;
        }
Example #5
0
        public void MenuConfiguration_ConstructorParameterContainerNotNullReturnsMenuConfiguration()
        {
            IUnityContainer fakeUnityContainer = new UnityContainer();

            var menuConfiguration = new MenuConfiguration(fakeUnityContainer);

            menuConfiguration.Configure();

            var isRegistered = fakeUnityContainer.IsRegistered <IMenu>();

            Assert.True(isRegistered);
        }
Example #6
0
 static void Main(string[] args)
 {
     MainMenu mainMenu = new MainMenu();
     mainMenu.Handle();
     MenuConfiguration menuConfiguration = new MenuConfiguration();
 }
Example #7
0
 public MainMenu()
 {
     eq = new Dictionary<string, Equipment>();
     menuConfiguration = new MenuConfiguration();
 }
 public ConfigurationController(IOptions <SiteConfiguration> siteConfiguration, IOptions <MenuConfiguration> menuConfiguration)
 {
     _siteConfiguration = siteConfiguration.Value;
     _menuConfiguration = menuConfiguration.Value;
 }