示例#1
0
 public void DisposeSinkHelper()
 {
     if (null != _sinkHelper)
     {
         _sinkHelper.Dispose();
         _sinkHelper = null;
     }
 }
示例#2
0
        public void DisposeEventBridge()
        {
            if (null != _appEvents_SinkHelper)
            {
                _appEvents_SinkHelper.Dispose();
                _appEvents_SinkHelper = null;
            }

            _connectPoint = null;
        }
示例#3
0
        public void CreateEventBridge()
        {
            if (false == NetOffice.Settings.EnableEvents)
            {
                return;
            }

            if (null != _connectPoint)
            {
                return;
            }

            if (null == _activeSinkId)
            {
                _activeSinkId = SinkHelper.GetConnectionPoint(this, ref _connectPoint, AppEvents_SinkHelper.Id);
            }


            if (AppEvents_SinkHelper.Id.Equals(_activeSinkId, StringComparison.InvariantCultureIgnoreCase))
            {
                _appEvents_SinkHelper = new AppEvents_SinkHelper(this, _connectPoint);
                return;
            }
        }
示例#4
0
 public Application(string progId)
 {
     CreateFromProgId(progId);
     _sinkHelper = new AppEvents_SinkHelper(this);
 }
示例#5
0
 public Application()
 {
     CreateFromProgId("Excel.Application");
     _sinkHelper = new AppEvents_SinkHelper(this);
 }
示例#6
0
 public Application(COMObject parentObject, object comProxy, Type comProxyType) : base(parentObject, comProxy, comProxyType)
 {
     _sinkHelper = new AppEvents_SinkHelper(this);
 }