Example #1
0
            public ContextValidation(int cabPercentage,
                                     int cabCount,
                                     int eventHitThreshold,
                                     bool cabCollectLarger,
                                     StackHashCollectionOrder cabCollectionOrder)
            {
                this.CabPercentage     = cabPercentage;
                this.CabCount          = cabCount;
                this.EventHitThreshold = eventHitThreshold;
                this.CabCollectLarger  = cabCollectLarger;
                this.CollectionOrders  = DisplayCollectionOrder.GetCollectionOrders();

                foreach (DisplayCollectionOrder order in this.CollectionOrders)
                {
                    if (order.CollectionOrder == cabCollectionOrder)
                    {
                        this.SelectedCollectionOrder = order;
                        break;
                    }
                }

                Debug.Assert(this.SelectedCollectionOrder != null);
            }
Example #2
0
        private static string GetOrderString(StackHashCollectionOrder order)
        {
            switch (order)
            {
            case StackHashCollectionOrder.AsReceived:
                return(Properties.Resources.CollectionOrderShort_AsReceived);

            case StackHashCollectionOrder.LargestFirst:
                return(Properties.Resources.CollectionOrderShort_LargestFirst);

            case StackHashCollectionOrder.MostRecentFirst:
                return(Properties.Resources.CollectionOrderShort_MostRecentFirst);

            case StackHashCollectionOrder.OldestFirst:
                return(Properties.Resources.CollectionOrderShort_OldestFirst);

            case StackHashCollectionOrder.SmallestFirst:
                return(Properties.Resources.CollectionOrderShort_SmallestFirst);

            default:
                return(string.Empty);
            }
        }
Example #3
0
 public DisplayCollectionOrder(StackHashCollectionOrder collectionOrder, string displayString)
 {
     this.CollectionOrder = collectionOrder;
     _displayString       = displayString;
 }