Ejemplo n.º 1
0
        void GenerateDetailsDictionary()
        {
            int formatIndex = Format == null ? -1 : CountInfo.FormatIndex(Format.Value);

            FormatDetailsDictionary = new Dictionary <string, int>();
            FormatDetailsDictionary.Add(MovieItemStatus.Rented.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Rented)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Rented)]);
            FormatDetailsDictionary.Add(MovieItemStatus.Active.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Active)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Active)]);
            FormatDetailsDictionary.Add("For Sell", Format == null ? CountInfo.ForSell : CountInfo.WithFormatForSell[formatIndex]);
            FormatDetailsDictionary.Add(MovieItemStatus.Lost.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Lost)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Lost)]);
            FormatDetailsDictionary.Add(MovieItemStatus.Damaged.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Damaged)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Damaged)]);
            FormatDetailsDictionary.Add(MovieItemStatus.Sold.ToString(), Format == null ? CountInfo.WithStatus[CountInfo.StatusIndex(MovieItemStatus.Sold)] : CountInfo.WithFormatAndStatus[formatIndex, CountInfo.StatusIndex(MovieItemStatus.Sold)]);
        }