Ejemplo n.º 1
0
        public ConfigGridControl(IConfigController configController, IExporter[] allExporters, ILocalController localController, BuildController buildController)
        {
            _allExporters = allExporters;
            _localController = localController;
            _configController = configController;
            _buildController = buildController;

            InitializeComponent();
            InitializeGrid();
        }
Ejemplo n.º 2
0
        public ConfigSectionControl(ILocalController localController, ICoreConfigSection coreConfigSection, IExporter[] allExporters, BuildController buildController)
        {
            _localController = localController;
            _coreConfigSection = coreConfigSection;
            _allExporters = allExporters;
            _buildController = buildController;

            DataContext = this;
            InitializeComponent();
        }
Ejemplo n.º 3
0
        public VisibilityViewModel(ICoreConfigSection sharpDoxConfig, BuildController buildController, Action onCloseHandle)
        {
            _sharpDoxConfig = sharpDoxConfig;
            _buildController = buildController;
            _onCloseHandle = onCloseHandle;

            sharpDoxConfig.PropertyChanged += ConfigChanged;

            buildController.BuildMessenger.OnBuildCompleted += ParseCompleted;
            buildController.BuildMessenger.OnBuildFailed += ParseStopped;
        }
Ejemplo n.º 4
0
        public VisibilityEditorView(SDGuiStrings strings, ICoreConfigSection sharpdoxConfig, BuildController buildController)
        {
            Strings = strings;
            Config = sharpdoxConfig;

            DataContext = new VisibilityViewModel(sharpdoxConfig, buildController, Hide);
            InitializeComponent();

            MouseLeftButtonDown += OnMouseDown;
            MouseLeftButtonUp += OnMouseUp;
        }
        public ConfigVisibilityControl(SDGuiStrings strings, ICoreConfigSection coreConfigSection, BuildController buildController)
        {
            _strings = strings;
            _coreConfigSection = coreConfigSection;
            _buildController = buildController;

            coreConfigSection.PropertyChanged += ExcludedIdentifiersChanged;
            ExcludedIdentifiersChanged(null, null);

            DataContext = this;
            InitializeComponent();
        }
Ejemplo n.º 6
0
        public ProgressBarViewModel(BuildController buildController, SDGuiStrings strings)
        {
            _strings = strings;
            BuildButtonText = strings.Build;

            buildController.BuildMessenger.OnBuildProgress += (i) => { if (i == 0) ChangeProgress(BuildStatus.Running); BuildProgress = i; };
            buildController.BuildMessenger.OnStepProgress += (i) => { StepProgress = i; };

            buildController.BuildMessenger.OnBuildCompleted += (p) => ChangeProgress(BuildStatus.Success);
            buildController.BuildMessenger.OnBuildFailed += () => ChangeProgress(BuildStatus.Error);
            buildController.BuildMessenger.OnBuildStopped += () => ChangeProgress(BuildStatus.Stopped);
        }
Ejemplo n.º 7
0
        public Shell(IConfigController configController, IExporter[] allExporters, ILocalController localController, BuildController buildController)
        {
            var guiStrings = localController.GetLocalStrings<SDGuiStrings>();
            DataContext = new ShellViewModel(guiStrings, configController, buildController, ExecuteOnClose);
            Strings = guiStrings;
            Style = (Style)FindResource("SharpDoxWindowStyle");

            Closing += (sender, args) => ExecuteOnClose();
            SourceInitialized += OnWindowSourceInitialized;

            InitializeComponent();
            svBody.Content = new ConfigGridControl(configController, allExporters, localController, buildController);
        }
Ejemplo n.º 8
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();
        }
Ejemplo n.º 9
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);
            }

            #if DEBUG
            System.Console.WriteLine(_strings.PressToEnd);
            System.Console.ReadLine();
            #endif
        }