增加运行时和非运行时参数变更自动刷新图表

This commit is contained in:
monitor1394
2020-03-05 20:25:19 +08:00
parent 11ee36de58
commit 7465bb760d
44 changed files with 1989 additions and 1209 deletions

View File

@@ -40,42 +40,74 @@ namespace XCharts
/// Whether to show axis name.
/// 是否显示坐标名称。
/// </summary>
public bool show { get { return m_Show; } set { m_Show = value; } }
public bool show
{
get { return m_Show; }
set { if (PropertyUtility.SetStruct(ref m_Show, value)) SetComponentDirty(); }
}
/// <summary>
/// the name of axis.
/// 坐标轴名称。
/// </summary>
public string name { get { return m_Name; } set { m_Name = value; } }
public string name
{
get { return m_Name; }
set { if (PropertyUtility.SetClass(ref m_Name, value)) SetComponentDirty(); }
}
/// <summary>
/// Location of axis name.
/// 坐标轴名称显示位置。
/// </summary>
public Location location { get { return m_Location; } set { m_Location = value; } }
public Location location
{
get { return m_Location; }
set { if (PropertyUtility.SetStruct(ref m_Location, value)) SetComponentDirty(); }
}
/// <summary>
/// the offset of axis name and axis line.
/// 坐标轴名称与轴线之间的偏移。
/// </summary>
public Vector2 offset { get { return m_Offset; } set { m_Offset = value; } }
public Vector2 offset
{
get { return m_Offset; }
set { if (PropertyUtility.SetStruct(ref m_Offset, value)) SetComponentDirty(); }
}
/// <summary>
/// Rotation of axis name.
/// 坐标轴名字旋转,角度值。
/// </summary>
public float rotate { get { return m_Rotate; } set { m_Rotate = value; } }
public float rotate
{
get { return m_Rotate; }
set { if (PropertyUtility.SetStruct(ref m_Rotate, value)) SetComponentDirty(); }
}
/// <summary>
/// Color of axis name.
/// 坐标轴名称的文字颜色。
/// </summary>
public Color color { get { return m_Color; } set { m_Color = value; } }
public Color color
{
get { return m_Color; }
set { if (PropertyUtility.SetColor(ref m_Color, value)) SetComponentDirty(); }
}
/// <summary>
/// axis name font size.
/// 坐标轴名称的文字大小。
/// </summary>
public int fontSize { get { return m_FontSize; } set { m_FontSize = value; } }
public int fontSize
{
get { return m_FontSize; }
set { if (PropertyUtility.SetStruct(ref m_FontSize, value)) SetComponentDirty(); }
}
/// <summary>
/// axis name font style.
/// 坐标轴名称的文字风格。
/// </summary>
public FontStyle fontStyle { get { return m_FontStyle; } set { m_FontStyle = value; } }
public FontStyle fontStyle
{
get { return m_FontStyle; }
set { if (PropertyUtility.SetStruct(ref m_FontStyle, value)) SetComponentDirty(); }
}
public static AxisName defaultAxisName
{
@@ -93,39 +125,5 @@ namespace XCharts
};
}
}
public void Copy(AxisName other)
{
m_Show = other.show;
m_Name = other.name;
m_Location = other.location;
m_Offset = other.offset;
m_Rotate = other.rotate;
m_Color = other.color;
m_FontSize = other.fontSize;
m_FontStyle = other.fontStyle;
}
public override bool Equals(object obj)
{
if (obj == null || GetType() != obj.GetType())
{
return false;
}
var other = (AxisName)obj;
return m_Show == other.show &&
m_Name.Equals(other.name) &&
m_Location == other.location &&
m_Rotate == other.rotate &&
m_Color == other.color &&
m_Offset == other.offset &&
m_FontSize == other.fontSize &&
m_FontStyle == other.fontStyle;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}