Beispiel #1
0
        private void ActivateCategoryButtons()
        {
            try
            {
                _allowEvents = false;

                rbAvg.IsEnabled = SimulationData.DataCategoryExists("stats/AVG");
                rbMin.IsEnabled = SimulationData.DataCategoryExists("stats/MIN");
                rbMax.IsEnabled = SimulationData.DataCategoryExists("stats/MAX");
                rbRaw.IsEnabled = SimulationData.DataCategoryExists("");

                string selectedCategory = App.ControlPanelModel.SelectedCategory;
                if (selectedCategory == null)
                {
                    if (rbAvg.IsEnabled)
                    {
                        this.Category   = "stats/AVG";
                        rbAvg.IsChecked = true;
                    }
                    else if (rbRaw.IsEnabled)
                    {
                        this.Category   = "";
                        rbRaw.IsChecked = true;
                    }
                    else if (rbMin.IsEnabled)
                    {
                        this.Category   = "stats/MIN";
                        rbMin.IsChecked = true;
                    }
                    else if (rbMax.IsEnabled)
                    {
                        this.Category   = "stats/MAX";
                        rbMax.IsChecked = true;
                    }
                }
            }
            finally
            {
                _allowEvents = true;
            }
        }