示例#1
0
        /// <summary>
        /// Load the Boundary test generation plugin
        /// </summary>
        /// <param name="dllPath">path to the plugin Dll</param>
        /// <param name="className">class name of the plugin </param>
        protected void LoadCPPParserPlugin(string dllPath, string className)
        {
            Type ObjType = null;
            if (File.Exists(dllPath))
            {

                try
                {
                    Assembly ass = null;
                    ass = Assembly.LoadFile(dllPath);
                    if (ass != null)
                    {
                        ObjType = ass.GetType(className);
                        if (ObjType != null)
                        {
                            ICppParser plugin = (ICppParser)Activator.CreateInstance(ObjType);
                            if (plugin != null)
                            {
                                plugin.registerCallBack(this);
                                PluginList.Add(plugin);
                                plugin.Owner = this;
                                m_CppParser = plugin;
                                plugin.Show(dockParent, WeifenLuo.WinFormsUI.Docking.DockState.DockRightAutoHide);
                                evPluginLoaded(plugin);


                            }
                            else
                            {
                                //do nothing
                            }
                        }
                    }
                }
                catch (Exception err)
                {
                    MessageBox.Show(err.ToString());

                }
            }
        }
 public CPPParserUi(ICppParser parser)
 {
     InitializeComponent();
     m_Parser = parser;
     m_Host = m_Parser.Owner;
 }