Exemple #1
0
        private void UpdateSecondaryCharts()
        {
            if (SelectedChartItem == null)
            {
                return;
            }

            var headerName = SelectedChartItem.Header.ToString();
            var subset     = GetFrametimesSubset();

            if (subset == null)
            {
                return;
            }

            if (headerName == "L-shape")
            {
                Task.Factory.StartNew(() => SetLShapeChart(subset));
            }
            else if (headerName == "FPS")
            {
                Task.Factory.StartNew(() =>
                                      FpsGraphDataContext.SetFpsChart(_localRecordDataServer?.GetFpsPointTimeWindow()));
            }
        }
Exemple #2
0
        public DataViewModel(IStatisticProvider frametimeStatisticProvider,
                             IFrametimeAnalyzer frametimeAnalyzer,
                             IEventAggregator eventAggregator,
                             IAppConfiguration appConfiguration)
        {
            _frametimeStatisticProvider = frametimeStatisticProvider;
            _frametimeAnalyzer          = frametimeAnalyzer;
            _eventAggregator            = eventAggregator;
            _appConfiguration           = appConfiguration;

            SubscribeToUpdateSession();

            CopyStatisticalParameterCommand = new DelegateCommand(OnCopyStatisticalParameter);
            CopyLShapeQuantilesCommand      = new DelegateCommand(OnCopyQuantiles);
            CopySystemInfoCommand           = new DelegateCommand(OnCopySystemInfoCommand);
            AcceptParameterSettingsCommand  = new DelegateCommand(OnAcceptParameterSettings);

            ParameterFormatter = value => value.ToString(string.Format("F{0}",
                                                                       _appConfiguration.FpsValuesRoundingDigits), CultureInfo.InvariantCulture);
            _localRecordDataServer    = new LocalRecordDataServer();
            FrametimeGraphDataContext = new FrametimeGraphDataContext(_localRecordDataServer,
                                                                      _appConfiguration, _frametimeStatisticProvider);
            FpsGraphDataContext = new FpsGraphDataContext(_localRecordDataServer,
                                                          _appConfiguration, _frametimeStatisticProvider);

            MessageDialogContent = new ContitionalMessageDialog();

            InitializeStatisticParameter();
        }