예제 #1
0
            public DocumentClient(Editor editor, string extension)
            {
                m_editor = editor;
                string fileType = CodeDocument.GetDocumentType(extension);

                m_info = new DocumentClientInfo(fileType, extension, null, null);
            }
예제 #2
0
        /// <summary>
        /// Constructor with parameters</summary>
        /// <param name="fileType">File type (a string like &quot;Text&quot;, &quot;Lua&quot;, etc)</param>
        /// <param name="extension">Extension</param>
        /// <param name="imageName">Name of image file for editor's Open icon</param>
        /// <param name="bOpenEverything">Whether to open all documents</param>
        /// <param name="syntaxHighlighter">SledDocumentSyntaxHighlighter</param>
        /// <param name="embeddedTypes">SledDocumentEmbeddedTypeInfo array</param>
        public SledDocumentClient(string fileType, string extension, string imageName, bool bOpenEverything, SledDocumentSyntaxHighlighter syntaxHighlighter, params SledDocumentEmbeddedTypeInfo[] embeddedTypes)
        {
            Info =
                new DocumentClientInfo(fileType, extension, null, null)
            {
                NewIconName  = imageName,
                OpenIconName = imageName
            };

            if (bOpenEverything)
            {
                if (s_catchAllClient != null)
                {
                    throw new InvalidOperationException("catch-all ISledDocumentClient already set");
                }

                s_catchAllClient = this;
            }

            SyntaxHighlighter = syntaxHighlighter;

            EmbeddedTypes =
                new List <SledDocumentEmbeddedTypeInfo>(
                    embeddedTypes);
        }
예제 #3
0
        public KeyValueEditor(ICommandService commandService,
                              IControlHostService controlHostService,
                              IContextRegistry contextRegistry,
                              IDocumentRegistry documentRegstiry,
                              IDocumentService documentService)
        {
            this.commandService     = commandService;
            this.contextRegistry    = contextRegistry;
            this.controlHostService = controlHostService;
            this.documentRegstiry   = documentRegstiry;
            this.documentService    = documentService;

            documentInfo = new DocumentClientInfo("KVDocument", (string)null, null, null, true);
        }
예제 #4
0
 public ModelViewer(IDocumentRegistry documentRegistry)
 {
     string[] exts = { ".atgi", ".dae" };
     m_info             = new DocumentClientInfo("3D Model", exts, null, null, false);
     m_documentRegistry = documentRegistry;
 }
예제 #5
0
 /// <summary>
 /// Returns whether the client can open or create a document at the given URI</summary>
 /// <param name="uri">Document URI</param>
 /// <returns>True iff the client can open or create a document at the given URI</returns>
 public bool CanOpen(Uri uri)
 {
     return(DocumentClientInfo.IsCompatibleUri(uri));
 }