Exemple #1
0
        private void Init()
        {
            DataContext = this;
            _settings   = new Settings("settings.xml");

            log.Info("Current Directory = " + Directory.GetCurrentDirectory());
            log.Info("Current Directory = " + Directory.GetCurrentDirectory());
            log.Info("Modules regexp = " + _settings["ModulePattern"].Value);
            log.Info("Module paths :");
            foreach (var path in _settings["ModuleFolders"].Value as List <String> )
            {
                log.Info("Modules path = " + path);
                log.Info("Modules absolute path = " + System.IO.Path.GetFullPath(path));
            }
            //Initialize the module manager with path to plugins

            _modmanager = new ManagerModules(((List <String>)_settings["ModuleFolders"].Value).OfType <String>());
            List <IPlugin> l = _modmanager.LoadModules(_settings["ModulePattern"].Value.ToString());

            log.Info("Modules found :");
            l.ForEach(p => { log.Info(p.Name); _modules.Add(p); });
            log.Info("Total modules found : " + _modules.Count);

            FirstMainPage    = new ModulesList(_settings, _modules);
            FirstOptionsPage = new GAMEOptions(_settings);

            MainBackground.Source = new BitmapImage(new Uri("pack://application:,,,/GAME.Common.Core;component/Resources/Images/Logos/GAME_logo_white.png", UriKind.Absolute));
            MainFrame.Content     = FirstMainPage;
        }
Exemple #2
0
        private void Init()
        {
            DataContext = this;
            _settings = new Settings("settings.xml");

            log.Info("Current Directory = " + Directory.GetCurrentDirectory());
            log.Info("Current Directory = " + Directory.GetCurrentDirectory());
            log.Info("Modules regexp = " + _settings["ModulePattern"].Value);
            log.Info("Module paths :");
            foreach (var path in _settings["ModuleFolders"].Value as List<String>)
            {
                log.Info("Modules path = " + path);
                log.Info("Modules absolute path = " + System.IO.Path.GetFullPath(path));
            }            
            //Initialize the module manager with path to plugins

            _modmanager = new ManagerModules(((List<String>)_settings["ModuleFolders"].Value).OfType<String>());
            List<IPlugin> l = _modmanager.LoadModules(_settings["ModulePattern"].Value.ToString());
            
            log.Info("Modules found :");
            l.ForEach(p => { log.Info(p.Name); _modules.Add(p); });
            log.Info("Total modules found : " + _modules.Count);

            FirstMainPage = new ModulesList(_settings, _modules);
            FirstOptionsPage = new GAMEOptions(_settings);
            
            MainBackground.Source = new BitmapImage(new Uri("pack://application:,,,/GAME.Common.Core;component/Resources/Images/Logos/GAME_logo_white.png", UriKind.Absolute));
            MainFrame.Content = FirstMainPage;            
        }