/// <summary> /// Add default quantity /// </summary> public static void AddDefaultQuantity() { OrderQuantity orderQuantity = new OrderQuantity(true) { SymbolFilename = DEFAULT_TEMPLATE_NAME }; _symbologyConfig.OrderQuantities.Add(orderQuantity); }
private void _Validate(OrderQuantity checkingObject) { if (checkingObject.DefaultValue) return; double minValue = checkingObject.MinValue; double maxValue = checkingObject.MaxValue; foreach (OrderQuantity element in SymbologyManager.OrderQuantities) { if (!element.Equals(checkingObject) && !element.DefaultValue && ((minValue < element.MinValue && maxValue > element.MinValue) || (minValue < element.MaxValue && maxValue > element.MaxValue) || minValue == element.MinValue)) { string mes = string.Format((string)App.Current.FindResource("RangeIntersectsText"), element.MinValue, element.MaxValue); throw new NotSupportedException(mes); } } }
/// <summary> /// Add default quantity /// </summary> public static void AddDefaultQuantity() { OrderQuantity orderQuantity = new OrderQuantity(true) { SymbolFilename = DEFAULT_TEMPLATE_NAME }; _symbologyConfig.OrderQuantities.Add(orderQuantity); }