using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;

namespace QC.CTDS.DM.DataStructures.FormatDescriptorStructure;

[Serializable]
public class SeriesDisplayProperties : BindableObject, IDataErrorInfo
{
	private string _color;

	private bool _markerOn;

	private int _weight = 1;

	private bool _smooth;

	private bool _cycleColors;

	private int _axisIndex = 1;

	[XmlAttribute]
	public string color
	{
		get
		{
			return _color;
		}
		set
		{
			if (!(_color == value))
			{
				_color = value;
				OnPropertyChanged("color");
			}
		}
	}

	[XmlAttribute]
	public bool markerOn
	{
		get
		{
			return _markerOn;
		}
		set
		{
			if (_markerOn != value)
			{
				_markerOn = value;
				OnPropertyChanged("markerOn");
			}
		}
	}

	[DefaultValue(1)]
	[XmlAttribute]
	public int weight
	{
		get
		{
			return _weight;
		}
		set
		{
			if (_weight != value)
			{
				_weight = value;
				OnPropertyChanged("weight");
			}
		}
	}

	[XmlAttribute]
	[DefaultValue(false)]
	public bool smooth
	{
		get
		{
			return _smooth;
		}
		set
		{
			if (_smooth != value)
			{
				_smooth = value;
				OnPropertyChanged("smooth");
			}
		}
	}

	[XmlAttribute]
	[DefaultValue(false)]
	public bool cycleColors
	{
		get
		{
			return _cycleColors;
		}
		set
		{
			if (_cycleColors != value)
			{
				_cycleColors = value;
				OnPropertyChanged("cycleColors");
			}
		}
	}

	[XmlAttribute]
	[DefaultValue(0)]
	public int axisIndex
	{
		get
		{
			return _axisIndex;
		}
		set
		{
			if (_axisIndex != value)
			{
				_axisIndex = value;
				OnPropertyChanged("axisIndex");
			}
		}
	}

	[XmlIgnore]
	public IDictionary AxisIndices
	{
		get
		{
			IDictionary dictionary = new Dictionary<int, string>();
			dictionary.Add(1, "Primary Axis");
			dictionary.Add(2, "Secondary Axis");
			return dictionary;
		}
	}

	public string Error
	{
		get
		{
			throw new NotImplementedException();
		}
	}

	public string this[string columnName]
	{
		get
		{
			string result = null;
			if (columnName == "weight" && weight < 0)
			{
				result = "Weight cannot be less than 0";
			}
			return result;
		}
	}

	public SeriesDisplayProperties()
	{
	}

	public SeriesDisplayProperties(SeriesDisplayProperties dispProperties)
		: base(dispProperties)
	{
		_color = dispProperties._color;
		_markerOn = dispProperties._markerOn;
		_weight = dispProperties._weight;
		_smooth = dispProperties._smooth;
		_cycleColors = dispProperties._cycleColors;
		_axisIndex = dispProperties._axisIndex;
	}
}
