ArcFM Engine Developer Guide
MDI Tab Code Sample

Version: 10.2.1c and 10.2.1c SP3

Resource Center Home

This sample code demonstrates how to create a MDI tab that displays report information rather than a view of the data. MDI windows must be added to a Custom Layout XML file before they will appear in the user interface.

This sample requires installation of the ArcFM Solution Software Developer Kit (SDK). You may need to change the existing installation in Add/Remove Programs to add Developer Resources.

Product Availability: ArcFM Viewer for ArcGIS Engine, Responder

References: Miner.Windows, Miner

  1. A using statement is required for Miner.Windows.TabbedMdi.

  2. Custom MDI tabs derive from MdiTabForm. Implement required ICreateData interface for persistence information.

  3. The Key allows the framework to uniquely identify each instance of the tab.

  4. This method allows the Key to be persisted to the .layout file.

C# Sample
Copy Code
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
//1
using Miner.Windows.TabbedMdi;

namespace Miner.DeveloperSamples.Engine
{
 /// <summary>
 /// Summary description for Form1.
 /// </summary>
 
//2
 public class DevMDIWindow : MdiTabForm, ICreateData
 {
  private System.Windows.Forms.RichTextBox rtfReportViewer;
  private System.Windows.Forms.Button cmdLoadReport;
  /// <summary>
  /// Required designer variable.
  /// </summary>
  private System.ComponentModel.Container components = null;
//3
  public DevMDIWindow(string key) : base(key)
  {
  }

  /// <summary>
  /// Clean up any resources being used.
  /// </summary>
  protected override void Dispose( bool disposing )
  {
   if( disposing )
   {
    if(components != null)
    {
     components.Dispose();
    }
   }
   base.Dispose( disposing );
  }
///Windows Form Designer Generated Code
  private void cmdLoadReport_Click(object sender, System.EventArgs e)
  {
   rtfReportViewer.LoadFile("..\\Developer Resources\\Developer Samples\\Tabbed MDI Windows\\C# - Tabbed MDI Windows\\Resources\\Report.rtf");
  }
//4
  public object[] DefineParameters()
  {
   object[] objs = new object[] {this.key};
   return objs;
  }

 }
}

 

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com