Exemplo n.º 1
0
        private void FiltersChanged(object sender, EventArgs e)
        {
            this.FilterUserControl.Model = this.Model;

            this.StartDate.SelectedDateChanged += StartDate_SelectedDateChanged;
            this.EndDate.SelectedDateChanged += EndDate_SelectedDateChanged;
            this.GroupingComboBox.SelectionChanged += GroupingComboBox_SelectionChanged;
        }
Exemplo n.º 2
0
        public MainPage()
        {
            InitializeComponent();

            this.Model = new HomeViewModel();

            this.Model.Grouping = Grouping.Week;
            this.Model.FiltersChanged += FiltersChanged;
            this.Model.AppliedFiltersChanged += AppliedFiltersChanged;

            this.Model.RefreshData();

            this.DataContext = this.Model;
        }
Exemplo n.º 3
0
        private void GroupingComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            foreach (ComboBoxItem addedItem in e.AddedItems)
            {
                switch ((string)addedItem.Content)
                {
                    case "Day":
                        this.Model.Grouping = Grouping.Day;
                        break;
                    case "Week":
                        this.Model.Grouping = Grouping.Week;
                        break;
                    case "Month":
                        this.Model.Grouping = Grouping.Month;
                        break;
                    default:
                        this.Model.Grouping = Grouping.Year;
                        break;
                }
            }

            this.HoursChartUserControl.Model = this.Model;
            this.RevenuesChartUserControl.Model = this.Model;
        }
Exemplo n.º 4
0
 private void AppliedFiltersChanged(object sender, EventArgs e)
 {
     this.HoursChartUserControl.Model = this.Model;
     this.RevenuesChartUserControl.Model = this.Model;
 }