Exemplo n.º 1
0
        private void CleanPrimaryCategories()
        {
            CategoryUnit tu =
                GuessPrimaryCategoryUnit(g.CategoryAxis.GetKnownCategories()[0]);

            log.Debug(g.CategoryAxis.RawCategoriesToString());
            log.Debug("Probable primary category: " + tu);
            switch (tu)
            {
            case CategoryUnit.MONTH:
                log.Debug("Attempting to clean months...");
                g.CategoryAxis.PrimaryCategoryType = CategoryUnit.MONTH;
                CleanMonths();
                break;

            case CategoryUnit.QUARTER:
                log.Debug("Attempting to clean quarters...");
                g.CategoryAxis.PrimaryCategoryType = CategoryUnit.QUARTER;
                CleanQuarters();
                break;

            case CategoryUnit.YEAR:
                log.Debug("Attempting to clean years...");
                g.CategoryAxis.PrimaryCategoryType = CategoryUnit.YEAR;
                CleanYears();
                break;

            default:
                g.CategoryAxis.PrimaryCategoryType = CategoryUnit.UNDEF;
                g.CategoryAxis.PrimaryCategories   = g.CategoryAxis.Categories;
                break;
            }
        }
 public Service(string iD, string name, double price, string category, CategoryUnit unit)
 {
     this.iD       = iD;
     this.name     = name;
     this.price    = price;
     this.category = category;
     this.unit     = unit;
 }