Infosys在阅读器中打开 / AI 翻译

TE13xx | Scope View · 0 次阅读

Displaying minimum and maximum

In the Array bar chart example shown above, lines for minimum and maximum can be seen. These can also be set via the style classes on a channel.

private void btnMin_Click(object sender, EventArgs e)
{
    foreach(Chart chart in scopeProjectPanel.ScopeProject.SubMember.OfType<Chart>())
    {
        foreach(AxisGroup ag in chart.SubMember.OfType<AxisGroup>())
        {
            foreach(Channel channel in ag.SubMember.OfType<Channel>())
            {
                MinMaxStyle minMaxStyle = channel.SubMember.OfType<ChannelStyle>().First().SubMember.OfType<MinMaxStyle>().First();
                minMaxStyle.ShowMin = !minMaxStyle.ShowMin;
            }
        }
    }
}

private void btnShowMax_Click(object sender, EventArgs e)
{
    foreach (Chart chart in scopeProjectPanel.ScopeProject.SubMember.OfType<Chart>())
    {
        foreach (AxisGroup ag in chart.SubMember.OfType<AxisGroup>())
        {
            foreach (Channel channel in ag.SubMember.OfType<Channel>())
            {
                MinMaxStyle minMaxStyle = channel.SubMember.OfType<ChannelStyle>().First().SubMember.OfType<MinMaxStyle>().First();
                minMaxStyle.ShowMax = !minMaxStyle.ShowMax;
            }
        }
    }
}