ArcFM Engine Developer Guide
Tabbed MDI Window

Resource Center Home

Product Availability: ArcFM Engine

In ArcFM Viewer, the Data View tabs are part of a MDI window. The ArcFM Viewer user interface allows the user to easily add tabs to the Data View window (see Using ArcFM Viewer for ArcGIS Engine online help). This developer sample illustrates how to make a custom MDI window tab that displays a report.

Developer Sample: Developer Samples\Tabbed MDI Windows\C# - Tabbed MDI Windows\

How to Implement:

  1. You may modify the code sample. This step is not required.
  2. Build the solution.
  3. Copy the DLL to the ArcFM Solution\bin directory.
  4. Add the tabbed MDI window to a custom.layout file. For example, create a file called sample.custom.layout (or create it) and add the following line of XML to the <MdiTabManager> section.
    <MdiTab key="DevMDIWindow">
     <MdiWindow type="Miner.DeveloperSamples.Engine.DevMDIWindow, ArcFMViewerEngineMDIWindow" >
       <CreateData>
        <Param type="System.String" value="DevMDIWindow" />
       </CreateData>
     </MdiWindow>
    </MdiTab>
  1. So the XML in your sample.custom.layout file will look something like this:

    sample.custom.layout
    Copy Code
    <?xml version="1.0" encoding="us-ascii"?>
    <LayoutData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layoutFormat="2">
      <MainWindow>
        <MdiTabManager>
          <MdiTabGroups>
            <MdiTabGroup>
               <MdiTabs>
                  <MdiTab key="DevMDIWindow">
                    <MdiWindow type="Miner.DeveloperSamples.Engine.DevMDIWindow, ArcFMViewerEngineMDIWindow" >
                      <CreateData>
                         <Param type="System.String" value="DevMDIWindow" />
                      </CreateData>
                   </MdiWindow>
                  </MdiTab>
                </MdiTabs>
           </MdiTabGroup>
          </MdiTabGroups>
        </MdiTabManager> 
      </MainWindow>
    </LayoutData>
    
  1. Save the custom.layout file to the ArcFM Solution\bin\Addons\ArcFMViewer directory if you're using ArcFM Viewer for ArcGIS Engine. If you add the custom layout file to the Addons directory, the MDI window will appear in other ArcFM Engine applications as well (e.g., Engine Administrator).

Additional Information:

Requires:

All of the files shown below are required for the project to compile successfully. Download these files from the ArcFM Solution Resource Center here.

File

Description

ArcFMViewerMdiTab.sln

C# solution containing the MDI Tab code sample for ArcFM Viewer for ArcGIS Engine

ArcFMViewerMdiTab.csproj

C# project containing the code to generate a custom MDI Tab object

DevMDIWindow.cs
  (view code)

Class module that contains the MDI window form

The following reference files are required for the project to compile successfully.

Miner.Windows

System

System.Drawing

System.Windows.Forms

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com