UpdateProperties() public méthode

Updates the properties of the plot series.
public UpdateProperties ( ) : void
Résultat void
Exemple #1
0
        public void Function(PlotValue plot, MatrixValue series, StringValue property, Value newValue)
        {
            var s = new List <String>();

            if (series is RangeValue)
            {
                var r    = series as RangeValue;
                var step = (Int32)r.Step;
                var end  = r.All ? plot.Count : (Int32)r.End;

                for (var j = (Int32)r.Start; j <= end; j += step)
                {
                    s.Add(j.ToString());
                    AlterSeriesProperty(plot, j - 1, property.Value, newValue);
                }
            }
            else
            {
                var end = series.Length;

                for (var i = 1; i <= end; i++)
                {
                    var n = series[i].GetIntegerOrThrowException("series", Name);
                    s.Add(n.ToString());
                    AlterSeriesProperty(plot, n - 1, property.Value, newValue);
                }
            }

            Context.RaiseNotification(new NotificationEventArgs(NotificationType.Failure, "Series " + String.Join(", ", s.ToArray()) + " changed."));
            plot.UpdateProperties();
        }
Exemple #2
0
        public void Function(PlotValue plot, ScalarValue series, StringValue property, Value newValue)
        {
            if (plot.Count == 0)
            {
                throw new YAMPNoSeriesAvailableException("The given plot contains no series.");
            }

            var n = series.GetIntegerOrThrowException("series", Name);

            if (n < 1 || n > plot.Count)
            {
                throw new YAMPArgumentRangeException("series", 1, plot.Count);
            }

            AlterSeriesProperty(plot, n - 1, property.Value, newValue);
            plot.UpdateProperties();
            Context.RaiseNotification(new NotificationEventArgs(NotificationType.Success, "Series " + n + " changed."));
        }
Exemple #3
0
        public void Function(PlotValue plot, MatrixValue series, StringValue property, Value newValue)
        {
            var s = new List<String>();

            if (series is RangeValue)
            {
                var r = series as RangeValue;
                var step = (Int32)r.Step;
                var end = r.All ? plot.Count : (Int32)r.End;

                for (var j = (Int32)r.Start; j <= end; j += step)
                {
                    s.Add(j.ToString());
                    AlterSeriesProperty(plot, j - 1, property.Value, newValue);
                }
            }
            else
            {
                var end = series.Length;

                for (var i = 1; i <= end; i++)
                {
                    var n = series[i].GetIntegerOrThrowException("series", Name);
                    s.Add(n.ToString());
                    AlterSeriesProperty(plot, n - 1, property.Value, newValue);
                }
            }

            Context.RaiseNotification(new NotificationEventArgs(NotificationType.Failure, "Series " + String.Join(", ", s.ToArray()) + " changed."));
            plot.UpdateProperties();
        }
Exemple #4
0
        public void Function(PlotValue plot, ScalarValue series, StringValue property, Value newValue)
        {
            if (plot.Count == 0)
                throw new YAMPNoSeriesAvailableException("The given plot contains no series.");

            var n = series.GetIntegerOrThrowException("series", Name);

            if (n < 1 || n > plot.Count)
                throw new YAMPArgumentRangeException("series", 1, plot.Count);

            AlterSeriesProperty(plot, n - 1, property.Value, newValue);
            plot.UpdateProperties();
            Context.RaiseNotification(new NotificationEventArgs(NotificationType.Success, "Series " + n + " changed."));
        }