Пример #1
0
        /// <summary>
        /// Try to apply the symbol size group style. Returns true if successfull applied.
        /// </summary>
        /// <param name="externalGroups"></param>
        /// <param name="localGroups"></param>
        /// <param name="setter"></param>
        /// <returns></returns>
        public static bool ApplyStyle(
            IPlotGroupStyleCollection externalGroups,
            IPlotGroupStyleCollection localGroups,
            SymbolSizeSetter setter)
        {
            SymbolSizeGroupStyle      grpStyle = null;
            IPlotGroupStyleCollection grpColl  = null;

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

            if (null != grpColl)
            {
                grpStyle = (SymbolSizeGroupStyle)grpColl.GetPlotGroupStyle(typeof(SymbolSizeGroupStyle));
                grpColl.OnBeforeApplication(typeof(SymbolSizeGroupStyle));
                setter(grpStyle.SymbolSize);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
        public void TransferFrom(IPlotGroupStyle fromb)
        {
            SymbolSizeGroupStyle from = (SymbolSizeGroupStyle)fromb;

            this._isInitialized = from._isInitialized;
            _symbolSize         = from._symbolSize;
        }
Пример #3
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());
            }
        }
Пример #4
0
 public static void AddExternalGroupStyle(IPlotGroupStyleCollection externalGroups)
 {
     if (PlotGroupStyle.ShouldAddExternalGroupStyle(externalGroups, typeof(SymbolSizeGroupStyle)))
     {
         SymbolSizeGroupStyle gstyle = new SymbolSizeGroupStyle();
         gstyle.IsStepEnabled = true;
         externalGroups.Add(gstyle);
     }
 }
Пример #5
0
 public SymbolSizeGroupStyle(SymbolSizeGroupStyle from)
 {
     this._isInitialized = from._isInitialized;
     this._symbolSize    = from._symbolSize;
 }
Пример #6
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                SymbolSizeGroupStyle s = null != o ? (SymbolSizeGroupStyle)o : new SymbolSizeGroupStyle();

                return(s);
            }
Пример #7
0
 public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
 {
     SymbolSizeGroupStyle s = (SymbolSizeGroupStyle)obj;
 }
Пример #8
0
		public SymbolSizeGroupStyle(SymbolSizeGroupStyle from)
		{
			this._isInitialized = from._isInitialized;
			this._symbolSize = from._symbolSize;
		}
Пример #9
0
		public static void AddExternalGroupStyle(IPlotGroupStyleCollection externalGroups)
		{
			if (PlotGroupStyle.ShouldAddExternalGroupStyle(externalGroups, typeof(SymbolSizeGroupStyle)))
			{
				SymbolSizeGroupStyle gstyle = new SymbolSizeGroupStyle();
				gstyle.IsStepEnabled = true;
				externalGroups.Add(gstyle);
			}
		}