I am confuse about the "syc. about Map And PageLayout".As I posted a thread before, the same issue about this.But nobody reply.Sad about saying this.Here is the siple code://Swith page between "Map" and "PageLayout".
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) {
if (tab_control.SelectedIndex == 0) { //Switch to the Map View page.
toolbar.SetBuddyControl(map);
toc.SetBuddyControl(map);
}
else if (tab_control.SelectedIndex == 1) { //Switch to the PageLayout page.
toolbar.SetBuddyControl(page_layout);
toc.SetBuddyControl(page_layout);
}
}
private void FormMain_Load(object sender, EventArgs e) {
//Set the Map as the buddies for the ToolBar and TOCControl.
toolbar.SetBuddyControl(map);
toc.SetBuddyControl(map);
}
If this code run in a App that is not contain a stuff called "LicenseInitializer.cs". The App will auto shut down when I switch the Page "Map" to "PageLayout".That is to say,I just do not know what the sfuff "LicenseInitializer.cs" do, the APP runs normal when switch the same way.