Exemple #1
0
        public static void PrepareStyle(
            IPlotGroupStyleCollection externalGroups,
            IPlotGroupStyleCollection localGroups,
            Getter getter)
        {
            if (!externalGroups.ContainsType(typeof(ScatterSymbolGroupStyle)) &&
                null != localGroups &&
                !localGroups.ContainsType(typeof(ScatterSymbolGroupStyle)))
            {
                localGroups.Add(new ScatterSymbolGroupStyle());
            }

            ScatterSymbolGroupStyle grpStyle = null;

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

            if (grpStyle != null && getter != null && !grpStyle.IsInitialized)
            {
                grpStyle.Initialize(getter());
            }
        }
Exemple #2
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                ScatterSymbolGroupStyle s = null != o ? (ScatterSymbolGroupStyle)o : new ScatterSymbolGroupStyle();

                s._isStepEnabled = info.GetBoolean("StepEnabled");
                s._listOfValues  = ScatterSymbolListManager.Instance.OldSolid;
                s._value         = s._listOfValues[0];

                return(s);
            }
Exemple #3
0
 public static void AddExternalGroupStyle(IPlotGroupStyleCollection externalGroups)
 {
     if (PlotGroupStyle.ShouldAddExternalGroupStyle(externalGroups, typeof(ScatterSymbolGroupStyle)))
     {
         var gstyle = new ScatterSymbolGroupStyle
         {
             IsStepEnabled = true
         };
         externalGroups.Add(gstyle);
     }
 }
Exemple #4
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                ScatterSymbolGroupStyle s = null != o ? (ScatterSymbolGroupStyle)o : new ScatterSymbolGroupStyle();

                s._isStepEnabled = info.GetBoolean("StepEnabled");

                var value = (IScatterSymbol)info.GetValue("Value", s);

                var listOfValues = (ScatterSymbolList)info.GetValue("ListOfValues", s);

                ScatterSymbolListManager.Instance.TryRegisterList(listOfValues, Main.ItemDefinitionLevel.Project, out var registeredList);
                s._listOfValues = registeredList;

                s.SetValueCoercedToGroup(value);

                return(s);
            }
Exemple #5
0
        public static void ApplyStyle(
            IPlotGroupStyleCollection externalGroups,
            IPlotGroupStyleCollection localGroups,
            Setter setter)
        {
            ScatterSymbolGroupStyle   grpStyle = null;
            IPlotGroupStyleCollection grpColl  = null;

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

            if (null != grpColl)
            {
                grpStyle = (ScatterSymbolGroupStyle)grpColl.GetPlotGroupStyle(typeof(ScatterSymbolGroupStyle));
                grpColl.OnBeforeApplication(typeof(ScatterSymbolGroupStyle));
                setter(grpStyle.ShapeAndStyle);
            }
        }
Exemple #6
0
 public ScatterSymbolGroupStyle(ScatterSymbolGroupStyle from)
 {
     _isStepEnabled = from._isStepEnabled;
     _value         = from._value;
     _listOfValues  = from._listOfValues;
 }
		public static void AddExternalGroupStyle(IPlotGroupStyleCollection externalGroups)
		{
			if (PlotGroupStyle.ShouldAddExternalGroupStyle(externalGroups, typeof(ScatterSymbolGroupStyle)))
			{
				ScatterSymbolGroupStyle gstyle = new ScatterSymbolGroupStyle();
				gstyle.IsStepEnabled = true;
				externalGroups.Add(gstyle);
			}
		}
		public ScatterSymbolGroupStyle(ScatterSymbolGroupStyle from)
		{
			this._isStepEnabled = from._isStepEnabled;
			this._value = from._value;
			this._listOfValues = from._listOfValues;
		}