コード例 #1
0
        public MainViewModel()
        {
            InstanceConverter  = new InstanceInSetToStringConverter();
            LocationCollection = new ObservableCollectionContentNotifying <DemandLocation>();
            ChartData          = new ObservableCollectionContentNotifying <PlotTrend>();

            LocationCollection.ClearAndAddRange(Selects.GetDemandLocations().Take(5));
            var locs = new List <int> {
                18, 55
            };

            locs.ForEach(x => LocationCollection.Single(y => y.LocationID == x).IsUsed = true);
            UpdateHeader();
            SelectedItem = TrendChoices.FiscalPeriod;
            UpdateChartData();
            LocationCollection.OnCollectionItemChanged += UpdateHeader;
        }
コード例 #2
0
        public ChartViewModel(Person person)
        {
            //Setup
            InstanceConverter = new InstanceInSetToStringConverter();
            _person           = person;
            _data             = new List <spTransactionSummationByDuration_Result>();
            Start             = DateTime.Now.Date.AddMonths(-2);
            End              = DateTime.Now.Date;
            Floor            = 100;
            SelectedGrouping = GroupingFrequency.Month;
            SelectedChart    = ChartType.BarChart;

            Categories = new ObservableCollectionContentNotifying <Category>();
            InitialCategorySet();

            ChartData = new ObservableCollectionContentNotifying <PlotTrend>();
            UpdateChartDataForPlotTrends();
            _loaded = true;
        }