public void Reinit(CogaenEditExtensionPackage package, IEditorGui editor, String caption, String serviceName)
 {
     m_package = package;
     m_editor = editor.GetControl();
     editor.Reinit(serviceName, CogaenEditExtensionPackage.Connection);
     m_content.Content = m_editor;
     // Set the window title reading it from the resources.
     base.Caption = caption;
 }
        private static bool TryCreateInstance(string dllName, string fullPath, out IEditorGui editorGui, out Guid guid)
        {
            editorGui = null;
            guid = Guid.Empty;
            try
            {
                Assembly Library = Assembly.LoadFrom(fullPath);
                // look for a IScriptExporter
                Type[] types = Library.GetTypes();
                foreach (Type type in types)
                {
                    if (type.GetInterface(typeof(IEditorGui).ToString()) != null)
                    {
                        IEditorGui editor = Library.CreateInstance(type.ToString()) as IEditorGui;
                        editorGui = editor;
                        // this should be retrieved via reflection
                        guid = editor.GetGuid();
                        return true;
                    }
                }
            }
            catch (Exception e)
            {
                ConnectionLog.LogError(0, e.Message);
                return false;
            }

            return false;
        }