using System;
using System.Threading;
namespace Example_L2_Basic_Device_Access
{
[System.AddIn.AddIn("S", Version = "4", Publisher = "aaa", Description = "Provides examples on how to communicate with devices. Such as how to call methods of a Standard Resource or read Standard Names.")]
public partial class ISTARSServices : STARS.InternalInterfaces.VSTAItf.ISTARSServices
{
private MyAddin m_MyAddin;
private void ISTARSServices_Startup(object sender, EventArgs e)
{
m_MyAddin = new MyAddin();
m_MyAddin.Run(this);
}
private void ISTARSServices_Shutdown(object sender, EventArgs e)
{
IDisposable dis = m_MyAddin as IDisposable;
if (dis != null)
dis.Dispose();
}
#region VSTA generated code
private void InternalStartup()
{
this.Startup += new System.EventHandler(ISTARSServices_Startup);
this.Shutdown += new System.EventHandler(ISTARSServices_Shutdown);
}
#endregion
}
}
不知道“STARS”是什麼。但是從字面理解,service startup是啟動服務運行的邏輯。addin說明這是一個插件。