Beispiel #1
0
 public StepInput(IConfigController configController, ICodeParser codeParser, SDBuildStrings sdBuildStrings, IExporter[] allExporters)
 {
     ConfigController  = configController;
     CoreConfigSection = configController.GetConfigSection <ICoreConfigSection>();
     CodeParser        = codeParser;
     SDBuildStrings    = sdBuildStrings;
     AllExporters      = allExporters;
 }
Beispiel #2
0
 public StepInput(IConfigController configController, ICodeParser codeParser, SDBuildStrings sdBuildStrings, IExporter[] allExporters)
 {
     ConfigController = configController;            
     CoreConfigSection = configController.GetConfigSection<ICoreConfigSection>();
     CodeParser = codeParser;
     SDBuildStrings = sdBuildStrings;
     AllExporters = allExporters;
 }
Beispiel #3
0
        public ShellViewModel(SDGuiStrings strings, IConfigController configController, IBuildController buildController, Action onCloseHandle)
        {
            _onCloseHandle   = onCloseHandle;
            _buildController = buildController;
            _buildController.BuildMessenger.OnStepMessage += (s) => StepMessage = s;

            _configController = configController;

            Strings = strings;

            Config         = configController.GetConfigSection <ICoreConfigSection>();
            ConfigSections = configController.GetAllConfigSections().ToList();

            ProgressBarViewModel = new ProgressBarViewModel(buildController, strings);

            _configController.OnRecentProjectsChanged += RecentProjectsChanged;

            _buildWindow = new BuildView(Strings, buildController.BuildMessenger);

            RecentProjectsChanged();
        }
Beispiel #4
0
        public void Start(string[] args)
        {
            _arguments = new ConsoleArguments(args);

            if (_arguments["config"] != null)
            {
                _configController.Load(_arguments["config"]);
                _buildController = _builderFactory();

                _buildMessenger.OnBuildMessage += System.Console.WriteLine;

                _buildController.StartBuild(_configController.GetConfigSection <ICoreConfigSection>(), false);
            }
            else
            {
                System.Console.WriteLine(_strings.ConfigMissing + " -config " + _strings.Path);
            }

            System.Console.WriteLine(_strings.PressToEnd);
            System.Console.ReadLine();
        }
Beispiel #5
0
        public ShellViewModel(SDGuiStrings strings, IConfigController configController, BuildController buildController, Action onCloseHandle)
        {
            _onCloseHandle = onCloseHandle;
            _buildController = buildController;
            _buildController.BuildMessenger.OnStepMessage += (s) => StepMessage = s;
            _buildController.BuildMessenger.OnBuildFailed += () => Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => _buildWindow.Show()));

            _configController = configController;

            Strings = strings;

            Config = configController.GetConfigSection<ICoreConfigSection>();
            ConfigSections = configController.GetAllConfigSections().ToList();

            _configController.OnRecentProjectsChanged += RecentProjectsChanged;

            _buildWindow = new BuildView(Strings, buildController.BuildMessenger);

            ProgressBarViewModel = new ProgressBarViewModel(buildController, strings);

            RecentProjectsChanged();
        }
Beispiel #6
0
        public ShellViewModel(SDGuiStrings strings, IConfigController configController, BuildController buildController, Action onCloseHandle)
        {
            _onCloseHandle = onCloseHandle;
            _buildController = buildController;
            _buildController.BuildMessenger.OnStepMessage += (s) => StepMessage = s;
            _buildController.BuildMessenger.OnBuildFailed += () => Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => _buildWindow.Show()));

            _configController = configController;

            Strings = strings;

            Config = configController.GetConfigSection<ICoreConfigSection>();
            ConfigSections = configController.GetAllConfigSections().ToList();

            _configController.OnRecentProjectsChanged += RecentProjectsChanged;

            _buildWindow = new BuildView(Strings, buildController.BuildMessenger);

            ProgressBarViewModel = new ProgressBarViewModel(buildController, strings);

            RecentProjectsChanged();
        }
Beispiel #7
0
        private void AddSection(IConfigSection configSection)
        {
            var displayNameAttribute = (NameAttribute)Attribute.GetCustomAttribute(configSection.GetType(), typeof(NameAttribute));

            if (displayNameAttribute != null)
            {
                var configSectionControl = new ConfigSectionControl(_localController, _configController.GetConfigSection <ICoreConfigSection>(), _allExporters, _buildController);
                configSectionControl.SectionHeader = _localController.GetLocalString(displayNameAttribute.LocalType, displayNameAttribute.DisplayName);
                configSectionControl.ConfigSection = configSection;

                configPanel.Children.Add(configSectionControl);
            }
        }