/// <summary>
        /// Initializes a new instance of the <see cref="LiveStatusViewModel"/> class.
        /// </summary>
        /// <param name="prouction">The prouction.</param>
        public LiveStatusViewModel(IProductionServices prouction)
        {
            _productionServices = prouction;
            Title = "LiveStatus";

            _toolBarViewModel = App.Container.Resolve <AnalysisToolbarViewModel>();

            _settingsWindowViewModel = App.Container.Resolve <SettingsWindowViewModel>();

            OpModeChartContext.ChartVisible             = Settings.Settings.Default.OpModeChartVisible;
            OkNokPartsChartContext.ChartVisible         = Settings.Settings.Default.OkNokChartVisible;
            TemperatureChartContext.ChartVisible        = Settings.Settings.Default.TemperatureChartVisible;
            OutputChartContext.ChartVisible             = Settings.Settings.Default.OutputChartVisible;
            CommonErrorsChartContext.ChartVisible       = Settings.Settings.Default.CommonErrorsChartVisible;
            PcbCameraSelfCheckChartContext.ChartVisible = Settings.Settings.Default.PcbCameraSelfCheckChartVisible;

            _settingsWindowViewModel.PropertyChangedObserverBySource("OpModeChartVisible")
            .Subscribe(vm => OpModeChartContext.ChartVisible = vm.OpModeChartVisible);

            _settingsWindowViewModel.PropertyChangedObserverBySource("OkNokChartVisible")
            .Subscribe(vm => OkNokPartsChartContext.ChartVisible = vm.OkNokChartVisible);

            _settingsWindowViewModel.PropertyChangedObserverBySource("TemperatureChartVisible")
            .Subscribe(vm => TemperatureChartContext.ChartVisible = vm.TemperatureChartVisible);

            _settingsWindowViewModel.PropertyChangedObserverBySource("OutputChartVisible")
            .Subscribe(vm => OutputChartContext.ChartVisible = vm.OutputChartVisible);

            _settingsWindowViewModel.PropertyChangedObserverBySource("CommonErrorsChartVisible")
            .Subscribe(vm => CommonErrorsChartContext.ChartVisible = vm.CommonErrorsChartVisible);

            _settingsWindowViewModel.PropertyChangedObserverBySource("PcbCameraSelfCheckChartVisible")
            .Subscribe(vm => PcbCameraSelfCheckChartContext.ChartVisible = vm.PcbCameraSelfCheckChartVisible);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ErrorListViewModel"/> class.
        /// </summary>
        public ErrorListViewModel(IProductionServices production)
        {
            _productionServices       = production;
            _analysisToolBarViewModel = App.Container.Resolve <AnalysisToolbarViewModel>();

            _analysisToolBarViewModel.PropertyChangedObserverBySource("IsAnySettingOpened")
            .Subscribe(vm => IsVisible = !vm.IsAnySettingOpened);

            IsVisible = true;
        }
        public ErrorHistoryViewModel(IProductionServices production)
        {
            _productionServices = production;
            Title = "ErrorHistory";

            ToolBarContext.NewFilterSettingsApplied += ToolBarContext_NewFilterSettingsApplied;

            ToolBarContext.SelectedMessageType = MessageTypeEnum.ErrorMessage;

            UpdateView();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        /// <param name="productionServices">The production services.</param>
        public MainViewModel(IProductionServices productionServices)
        {
            _productionServices = productionServices;

            // Initalize the pages here!
            this.Pages = new PageViewModel[] {
                App.Container.Resolve <LiveStatusViewModel>(),
                App.Container.Resolve <ErrorHistoryViewModel>()
            };


            this.SelectedPage = Pages.First();

            FirePropertyChanged("ToolBarContext");
        }
        public GeneralMachineDataViewModel(IProductionServices production)
        {
            _productionServices      = production;
            _settingsWindowViewModel = App.Container.Resolve <SettingsWindowViewModel>();

            MachineName = Settings.Settings.Default.MachineName;

            _settingsWindowViewModel.PropertyChangedObserverBySource("MachineName")
            .Subscribe(vm => MachineName = vm.MachineName);

            _updateObserver = Observable.Interval(TimeSpan.FromSeconds(5))
                              .ObserveOnDispatcher()
                              .Subscribe(args => UpdateData());

            UpdateData();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AnalysisToolbarViewModel"/> class.
        /// </summary>
        /// <param name="services">The services.</param>
        public AnalysisToolbarViewModel(IProductionServices services)
        {
            _services = services;

            /*
             * _services.AnalysisObservable.ObserveOnDispatcher()
             *    .Subscribe(measurements =>
             *    {
             *        _currentMeasurements = measurements;
             *    });
             */
            FirePropertyChanged("Products");

            // fill the result options here!
            FirePropertyChanged("ResultOptions");
            FirePropertyChanged("Coordinates");
        }
Exemplo n.º 7
0
 protected BaseChartViewModel(IProductionServices production)
 {
     _productionServices = production;
 }
 public TemperatureChartViewModel(IProductionServices production) : base(production)
 {
     UpdateInterval = Settings.Settings.Default.UpdateIntervalTemperatureChart;
     HoursToDisplay = Settings.Settings.Default.HoursToDisplayTemperature;
     UpdateData();
 }
Exemplo n.º 9
0
 public CommonErrorsChartViewModel(IProductionServices production) : base(production)
 {
     UpdateInterval = Settings.Settings.Default.UpdateIntervalCommonErrorsChart;
     HoursToDisplay = Settings.Settings.Default.HoursToDisplayCommonErrors;
     UpdateData();
 }
Exemplo n.º 10
0
 public OutputChartViewModel(IProductionServices production) : base(production)
 {
     UpdateInterval = Settings.Settings.Default.UpdateIntervalOutputChart;
     HoursToDisplay = Settings.Settings.Default.HoursToDisplayOutput;
     UpdateData();
 }
Exemplo n.º 11
0
 public OkNokPartsChartViewModel(IProductionServices production) : base(production)
 {
     UpdateInterval = Settings.Settings.Default.UpdateIntervalIoNioPartsChart;
     HoursToDisplay = Settings.Settings.Default.HoursToDisplayIoNioParts;
     UpdateData();
 }
        public OpModeDetailViewModel(IProductionServices production)
        {
            _productionServices = production;

            UpdateView();
        }
 public PcbCameraSelfCheckChartViewModel(IProductionServices production) : base(production)
 {
     UpdateInterval = Settings.Settings.Default.UpdateIntervalPcbCameraSelfCheckChart;
     HoursToDisplay = Settings.Settings.Default.HoursToDisplayPcbCameraSelfCheckChart;
     UpdateData();
 }