C# Класс MapAndPageLayoutSynchApp.ControlsSynchronizer

This class is used to synchronize a given PageLayoutControl and a MapControl. When initialized, the user must pass the reference of these control to the class, bind the control together by calling 'BindControls' which in turn sets a joined Map referenced by both control; and set all the buddy controls joined between these two controls. When alternating between the MapControl and PageLayoutControl, you should activate the visible control and deactivate the other by calling ActivateXXX. This class is limited to a situation where the controls are not simultaneously visible.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ActivateMap ( ) : void

Activate the MapControl and deactivate the PagleLayoutControl

ActivatePageLayout ( ) : void

Activate the PagleLayoutControl and deactivate the MapCotrol

AddFrameworkControl ( object control ) : void

by passing the application's toolbars and TOC to the synchronization class, it saves you the management of the buddy control each time the active control changes. This method ads the framework control to an array; once the active control changes, the class iterates through the array and calls SetBuddyControl on each of the stored framework control.

BindControls ( IMapControl3 mapControl, IPageLayoutControl2 pageLayoutControl, bool activateMapFirst ) : void

bind the MapControl and PageLayoutControl together by assigning a new joint focus map

BindControls ( bool activateMapFirst ) : void

bind the MapControl and PageLayoutControl together by assigning a new joint focus map

ControlsSynchronizer ( ) : System

default constructor

ControlsSynchronizer ( IMapControl3 mapControl, IPageLayoutControl2 pageLayoutControl ) : System

class constructor

RemoveFrameworkControl ( object control ) : void

Remove a framework control from the managed list of controls

RemoveFrameworkControlAt ( int index ) : void

Remove a framework control from the managed list of controls by specifying its index in the list

ReplaceMap ( IMap newMap ) : void

given a new map, replaces the PageLayoutControl and the MapControl's focus map

Приватные методы

Метод Описание
SetBuddies ( object buddy ) : void

when the active control changes, the class iterates through the array of the framework controls and calls SetBuddyControl on each of the controls.

Описание методов

ActivateMap() публичный Метод

Activate the MapControl and deactivate the PagleLayoutControl
public ActivateMap ( ) : void
Результат void

ActivatePageLayout() публичный Метод

Activate the PagleLayoutControl and deactivate the MapCotrol
public ActivatePageLayout ( ) : void
Результат void

AddFrameworkControl() публичный Метод

by passing the application's toolbars and TOC to the synchronization class, it saves you the management of the buddy control each time the active control changes. This method ads the framework control to an array; once the active control changes, the class iterates through the array and calls SetBuddyControl on each of the stored framework control.
public AddFrameworkControl ( object control ) : void
control object
Результат void

BindControls() публичный Метод

bind the MapControl and PageLayoutControl together by assigning a new joint focus map
public BindControls ( IMapControl3 mapControl, IPageLayoutControl2 pageLayoutControl, bool activateMapFirst ) : void
mapControl IMapControl3
pageLayoutControl IPageLayoutControl2
activateMapFirst bool true if the MapControl supposed to be activated first
Результат void

BindControls() публичный Метод

bind the MapControl and PageLayoutControl together by assigning a new joint focus map
public BindControls ( bool activateMapFirst ) : void
activateMapFirst bool true if the MapControl supposed to be activated first
Результат void

ControlsSynchronizer() публичный Метод

default constructor
public ControlsSynchronizer ( ) : System
Результат System

ControlsSynchronizer() публичный Метод

class constructor
public ControlsSynchronizer ( IMapControl3 mapControl, IPageLayoutControl2 pageLayoutControl ) : System
mapControl IMapControl3
pageLayoutControl IPageLayoutControl2
Результат System

RemoveFrameworkControl() публичный Метод

Remove a framework control from the managed list of controls
public RemoveFrameworkControl ( object control ) : void
control object
Результат void

RemoveFrameworkControlAt() публичный Метод

Remove a framework control from the managed list of controls by specifying its index in the list
public RemoveFrameworkControlAt ( int index ) : void
index int
Результат void

ReplaceMap() публичный Метод

given a new map, replaces the PageLayoutControl and the MapControl's focus map
public ReplaceMap ( IMap newMap ) : void
newMap IMap
Результат void