Пример #1
0
        public static void PrepareStyle(
            IPlotGroupStyleCollection externalGroups,
            IPlotGroupStyleCollection localGroups,
            SymbolSizeGetter getter)
        {
            if (!externalGroups.ContainsType(typeof(SymbolSizeGroupStyle)) &&
                null != localGroups &&
                !localGroups.ContainsType(typeof(SymbolSizeGroupStyle)))
            {
                localGroups.Add(new SymbolSizeGroupStyle());
            }


            SymbolSizeGroupStyle grpStyle = null;

            if (externalGroups.ContainsType(typeof(SymbolSizeGroupStyle)))
            {
                grpStyle = (SymbolSizeGroupStyle)externalGroups.GetPlotGroupStyle(typeof(SymbolSizeGroupStyle));
            }
            else if (localGroups != null)
            {
                grpStyle = (SymbolSizeGroupStyle)localGroups.GetPlotGroupStyle(typeof(SymbolSizeGroupStyle));
            }

            if (grpStyle != null && getter != null && !grpStyle.IsInitialized)
            {
                grpStyle.Initialize(getter());
            }
        }
Пример #2
0
		public static void PrepareStyle(
			IPlotGroupStyleCollection externalGroups,
			IPlotGroupStyleCollection localGroups,
			SymbolSizeGetter getter)
		{
			if (!externalGroups.ContainsType(typeof(SymbolSizeGroupStyle))
				&& null != localGroups
				&& !localGroups.ContainsType(typeof(SymbolSizeGroupStyle)))
			{
				localGroups.Add(new SymbolSizeGroupStyle());
			}

			SymbolSizeGroupStyle grpStyle = null;
			if (externalGroups.ContainsType(typeof(SymbolSizeGroupStyle)))
				grpStyle = (SymbolSizeGroupStyle)externalGroups.GetPlotGroupStyle(typeof(SymbolSizeGroupStyle));
			else if (localGroups != null)
				grpStyle = (SymbolSizeGroupStyle)localGroups.GetPlotGroupStyle(typeof(SymbolSizeGroupStyle));

			if (grpStyle != null && getter != null && !grpStyle.IsInitialized)
				grpStyle.Initialize(getter());
		}