private void SetMapScale(string filename, string symbolname, int axismax, int lockmode)
{
foreach (DevExpress.XtraBars.Docking.DockPanel pnl in dockManager1.Panels)
{
foreach (Control c in pnl.Controls)
{
if (c is MapViewerEx)
{
MapViewerEx vwr = (MapViewerEx)c;
if (vwr.Map_name == symbolname || m_appSettings.SynchronizeMapviewersDifferentMaps)
{
vwr.Max_y_axis_value = axismax;
//vwr.ReShowTable(false);
vwr.LockMode = lockmode;
vwr.Invalidate();
}
}
else if (c is DevExpress.XtraBars.Docking.DockPanel)
{
DevExpress.XtraBars.Docking.DockPanel tpnl = (DevExpress.XtraBars.Docking.DockPanel)c;
foreach (Control c2 in tpnl.Controls)
{
if (c2 is MapViewerEx)
{
MapViewerEx vwr2 = (MapViewerEx)c2;
if (vwr2.Map_name == symbolname || m_appSettings.SynchronizeMapviewersDifferentMaps)
{
vwr2.Max_y_axis_value = axismax;
//vwr2.ReShowTable(false);
vwr2.LockMode = lockmode;
vwr2.Invalidate();
}
}
}
}
else if (c is DevExpress.XtraBars.Docking.ControlContainer)
{
DevExpress.XtraBars.Docking.ControlContainer cntr = (DevExpress.XtraBars.Docking.ControlContainer)c;
foreach (Control c3 in cntr.Controls)
{
if (c3 is MapViewerEx)
{
MapViewerEx vwr3 = (MapViewerEx)c3;
if (vwr3.Map_name == symbolname || m_appSettings.SynchronizeMapviewersDifferentMaps)
{
vwr3.Max_y_axis_value = axismax;
vwr3.LockMode = lockmode;
//vwr3.ReShowTable(false);
vwr3.Invalidate();
}
}
}
}
}
}
}