主页
  新闻
    InfoJet Service
    InfoJet POM
    介绍
  代码属性
  代理类型
  DOM修改
  如何使用
  缩写代码
    InfoJet Rules
    InfoJet EditPart
    试用
  下载
  Java
    购买
  价格
  如何购买
    支持
  联系我们
InfoJet POM 缩写代码
InfoJet POM同时支持缩写代码。
缩写代码演示
using Microsoft.Office.InfoPath;
using System;
using System.Windows.Forms;
using System.Xml;
using System.Xml.XPath;
using mshtml;
using InfoJetSoft.POM;

namespace Template1
{
    public partial class FormCode
    {
        private static FormCode formCode = null; //(1)
        public void InternalStartup()
        {
            formCode = this; //(2)
            EventManager.FormEvents.Loading
                += new LoadingEventHandler(FormEvents_Loading);
        }

        [System.ComponentModel.Description("InfoJet POM, EventType=Loading")] //(3)
        public static void FormEvents_Loading(object sender, LoadingEventArgs e) //(4)
        {
            XmlFormProxy formProxy = XmlFormProxy.Create(formCode, sender, e); //(5)
            formProxy.ShowMessageBox("Loading"); //(6)
        }
}
说明
(1). 请声明一个FormCode类型的静态变量formCode。
(2). 在InternalStartup()方法里将当前对象(this)赋予给静态变量formCode。
(3). 将InfoJet POM属性直接添加到事件处理方法上。
(4). 将事件处理方法修改为一个静态方法。
(5). 使用静态方法XmlFormProxy.Create()创建XmlFormProxy的实例,同时将静态变量formCode作为Create()方法的第一个参数。
(6). 请不要使用事件处理方法的任何参数,只使用formProxy。
(7). 缩写代码不能用于InfoPath Forms Services。


Copyright © 2005 - 2012 InfoJetSoft all rights reserved