Ejemplo n.º 1
0
 /// <summary>
 /// 查找本地默认目录下,已安装的插件.并启动<br></br>
 /// 寻找PligIns目录下的plugin.conf文件,并执行start方法
 /// </summary>
 public void Start()
 {
     try
     {
         if (state == PlugInRuntimeState.Started)
         {
             throw new Exception("已启动");
         }
         state = PlugInRuntimeState.Starting;
         //初始化框架---之后所有相关都使用这一个Framework对象
         _framework                 = VSDT.Framework.Inistace;
         _framework.dte             = DTEObject;
         _framework.Package         = Package;
         _framework.ServiceProvider = ServiceProvider;
         FrameworkOptions option = new FrameworkOptions();
         option.StartUpDir  = Common.Utility.UtilityEnvironment.GetFrameworkBinPath();
         _framework.Options = option;
         //初始化插件信息
         InitializePlugIns();
         //启动自动启动项
         Start(StartMode.Autorun);
         state = PlugInRuntimeState.Started;
     }
     catch (Exception ex)
     {
         Log.ShowErrorBox(ex);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 查找本地默认目录下,已安装的插件.并启动<br></br>
        /// 寻找PligIns目录下的plugin.conf文件,并执行start方法
        /// </summary>
        public void Start()
        {
            try
            {

                if (state == PlugInRuntimeState.Started)
                {
                    throw new Exception("已启动");
                }
                state = PlugInRuntimeState.Starting;
                //初始化框架---之后所有相关都使用这一个Framework对象
                _framework = VSDT.Framework.Inistace;
                _framework.dte = DTEObject;
                _framework.Package = Package;
                _framework.ServiceProvider = ServiceProvider;
                FrameworkOptions option = new FrameworkOptions();
                option.StartUpDir = Common.Utility.UtilityEnvironment.GetFrameworkBinPath();
                _framework.Options = option;
                //初始化插件信息
                InitializePlugIns();
                //启动自动启动项
                Start(StartMode.Autorun);
                state = PlugInRuntimeState.Started;
            }
            catch (Exception ex)
            {
                Log.ShowErrorBox(ex);
            }
        }