Esempio n. 1
0
        private void OpenFileExternally(string fileName)
        {
            bool abortOperation;

            CheckoutFileIfNeeded(fileName, out abortOperation);
            if (abortOperation)
            {
                return;
            }

            string lowerCaseFileName = fileName.ToLower();

            if (lowerCaseFileName.EndsWith(".ui"))
            {
                VSPackage.extLoader.loadDesigner(fileName);

                // Designer can't cope with many files in a short time.
                System.Threading.Thread.Sleep(1000);
            }
            else if (lowerCaseFileName.EndsWith(".ts"))
            {
                ExtLoader.loadLinguist(fileName);
            }
#if false
            // QRC files are directly opened, using the QRC editor.
            else if (lowerCaseFileName.EndsWith(".qrc"))
            {
                Connect.extLoader.loadQrcEditor(fileName);
            }
#endif
        }
Esempio n. 2
0
        public override int CreateEditorInstance(
            uint createEditorFlags,
            string documentMoniker,
            string physicalView,
            IVsHierarchy hierarchy,
            uint itemid,
            System.IntPtr docDataExisting,
            out System.IntPtr docView,
            out System.IntPtr docData,
            out string editorCaption,
            out Guid commandUIGuid,
            out int createDocumentWindowFlags)
        {
            int baseReturn = base.CreateEditorInstance(createEditorFlags, documentMoniker, physicalView, hierarchy, itemid, docDataExisting, out docView, out docData, out editorCaption, out commandUIGuid, out createDocumentWindowFlags);

            if (baseReturn != VSConstants.S_OK)
            {
                return(baseReturn);
            }

            ExtLoader.loadLinguist(documentMoniker);
            return(VSConstants.S_OK);
        }
Esempio n. 3
0
 private void loadLinguist(object sender, EventArgs e)
 {
     ExtLoader.loadLinguist(null);
 }