void tabdet_onSurfaceGraphViewChangedEx(object sender, MapViewerEx.SurfaceGraphViewChangedEventArgsEx e)
{
if (m_appSettings.SynchronizeMapviewers || m_appSettings.SynchronizeMapviewersDifferentMaps)
{
foreach (DevExpress.XtraBars.Docking.DockPanel pnl in dockManager1.Panels)
{
foreach (Control c in pnl.Controls)
{
if (c is MapViewerEx)
{
if (c != sender)
{
MapViewerEx vwr = (MapViewerEx)c;
if (vwr.Map_name == e.Mapname || m_appSettings.SynchronizeMapviewersDifferentMaps)
{
vwr.SetSurfaceGraphViewEx(e.DepthX, e.DepthY, e.Zoom, e.Rotation, e.Elevation);
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)
{
if (c2 != sender)
{
MapViewerEx vwr2 = (MapViewerEx)c2;
if (vwr2.Map_name == e.Mapname || m_appSettings.SynchronizeMapviewersDifferentMaps)
{
vwr2.SetSurfaceGraphViewEx(e.DepthX, e.DepthY, e.Zoom, e.Rotation, e.Elevation);
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)
{
if (c3 != sender)
{
MapViewerEx vwr3 = (MapViewerEx)c3;
if (vwr3.Map_name == e.Mapname || m_appSettings.SynchronizeMapviewersDifferentMaps)
{
vwr3.SetSurfaceGraphViewEx(e.DepthX, e.DepthY, e.Zoom, e.Rotation, e.Elevation);
vwr3.Invalidate();
}
}
}
}
}
}
}
}
}