public int ServerStart(Microsoft.Office.Interop.Excel.IRTDUpdateEvent callbackObject) //这里是首次用到自动化服务器,然后创建这个类的实例后,调用的方法,(这个RTD的实例只会有一个) { this.CallbackObject = callbackObject; this.Spollingor = new System.Timers.Timer(); this.Spollingor.Interval = 5 * 1000; this.Spollingor.Elapsed += Spollingor_Elapsed; this.Spollingor.Start(); return(1); }
int Microsoft.Office.Interop.Excel.IRtdServer.ServerStart(Microsoft.Office.Interop.Excel.IRTDUpdateEvent CallbackObject) { try { m_RTDSupport = K2BaseSvrClient.K2SVRRTDSvrClient.Instance(); m_callback = CallbackObject; m_RTDSupport.UpdateNotify += new K2BaseSvrClient.OnUpdateNotify(OnUpdateNofiy); m_RTDSupport.StartServer("K2RTDX"); } catch (Exception myE) { } return 1; }