private void Init() { if (m_InitDone) { return; } m_InitDone = true; if (m_StrUseMultiAreaChartSeries != "") { string[] LinkStrs = m_StrUseMultiAreaChartSeries.Split(new string[] { ":" }, StringSplitOptions.None); TimeValueChart cLinkChart = FindChartByName(LinkStrs[0]); if (cLinkChart != null) { DataSeries = cLinkChart.DataSeries; // as default use first if (LinkStrs.Count() > 1) { foreach (Series item in cLinkChart.Series) { if (item.Name == LinkStrs[1]) { DataSeries = item; } } // DataSeries = cLinkChart.Series[LinkStrs[1]]; } } } AddToolStrip(); }
private void SynchronizeXAxisToControl(string cChartName) { TimeValueChart cSyncChart = FindChartByName(cChartName); if (cSyncChart != null) { if (cSyncChart.m_CM != null) // Clean context menu created by chart itself { cSyncChart.m_CM.Items.Remove(cSyncChart.m_ChartMenu); cSyncChart.m_autoscrollToolStripMenuItem = null; cSyncChart.m_ChartMenu = null; cSyncChart.m_CM = null; } cSyncChart.m_autoscrollToolStripMenuItem = m_autoscrollToolStripMenuItem; cSyncChart.m_SynchronizeXAxisParent = this; m_SynchronizeXAxisWith.Add(cSyncChart); } }