public SyntaxEditor()
 {
     using (var mem = new MemoryStream(Encoding.Default.GetBytes(Properties.Resources.SyntaxModes)))
     {
         _syntaxModes = SyntaxMode.GetSyntaxModes(mem);
     }
 }
Exemple #2
0
        public AppSyntaxModeProvider()
        {
            var assembly         = Assembly.GetExecutingAssembly();
            var resourcePath     = string.Format("{0}.Resources.SyntaxModes.xml", assembly.GetName().Name);
            var syntaxModeStream = assembly.GetManifestResourceStream(resourcePath);

            SyntaxModes = syntaxModeStream == null ? new List <SyntaxMode>() : SyntaxMode.GetSyntaxModes(syntaxModeStream);
        }
Exemple #3
0
            public MyResourceSyntaxModeProvider()
            {
                Assembly assembly         = typeof(MainForm).Assembly;
                Stream   syntaxModeStream = assembly.GetManifestResourceStream("SoodaQuery.SyntaxModes.xml");

                if (syntaxModeStream == null)
                {
                    throw new ApplicationException();
                }
                syntaxModes = SyntaxMode.GetSyntaxModes(syntaxModeStream);
            }
        public AppSyntaxModeProvider()
        {
            var assembly = Assembly.GetExecutingAssembly();

            //enumerate resource names if need
            //foreach (string resourceName in assembly.GetManifestResourceNames()){}

            //load modes list
            using (var syntaxModeStream = assembly.GetManifestResourceStream("OrcaSql.OSMS.SQLEditor.Resources.SyntaxModes.xml"))
            {
                _syntaxModes = syntaxModeStream != null?SyntaxMode.GetSyntaxModes(syntaxModeStream) : new List <SyntaxMode>();
            }
        }
Exemple #5
0
        public EditorSyntaxModesProvider()
        {
            StreamReader ModesXml = new StreamReader(Config.RootDir + "\\SyntaxModes.xml");

            if (ModesXml.BaseStream != null)
            {
                syntaxModes = SyntaxMode.GetSyntaxModes(ModesXml.BaseStream);
            }
            else
            {
                syntaxModes = new List <SyntaxMode>();
            }
        }
Exemple #6
0
        public SQLToolResourceSyntaxModeProvider()
        {
            Assembly assembly         = this.GetType().Assembly;
            Stream   syntaxModeStream = assembly.GetManifestResourceStream("Lewis.SST.Resources.SyntaxModes.xml");

            if (syntaxModeStream != null)
            {
                syntaxModes = SyntaxMode.GetSyntaxModes(syntaxModeStream);
            }
            else
            {
                syntaxModes = new List <SyntaxMode>();
            }
        }
        public MySyntaxModeProvider()
        {
            Assembly assembly         = Assembly.GetExecutingAssembly();
            Stream   syntaxModeStream = assembly.GetManifestResourceStream("LuaDebugger.Resources.SyntaxModes.xml");

            if (syntaxModeStream != null)
            {
                syntaxModes = SyntaxMode.GetSyntaxModes(syntaxModeStream);
            }
            else
            {
                syntaxModes = new List <SyntaxMode>();
            }
        }
Exemple #8
0
        public AppSyntaxModeProvider()
        {
            Assembly assembly = Assembly.GetExecutingAssembly();
            //foreach (string resourceName in assembly.GetManifestResourceNames()){}
            Stream syntaxModeStream = assembly.GetManifestResourceStream("AbapCodeGeneration.Resources.SyntaxModes.xml");

            if (syntaxModeStream != null)
            {
                syntaxModes = SyntaxMode.GetSyntaxModes(syntaxModeStream);
            }
            else
            {
                syntaxModes = new List <SyntaxMode>();
            }
        }
        public AppSyntaxModeProvider()
        {
            Assembly assembly = Assembly.GetExecutingAssembly();


            Stream syntaxModeStream = assembly.GetManifestResourceStream("XpertDocAnalyzer.highlighting.SyntaxMode.xml");

            if (syntaxModeStream != null)
            {
                syntaxModes = SyntaxMode.GetSyntaxModes(syntaxModeStream);
            }
            else
            {
                syntaxModes = new List <SyntaxMode>();
            }
        }
        public SyntaxModeFileProvider()
        {
            Assembly assembly = Assembly.GetExecutingAssembly();
            //enumerate resource names if need
            //foreach (string resourceName in assembly.GetManifestResourceNames())
            //    System.Diagnostics.Debug.WriteLine(resourceName);

            //load modes list
            Stream syntaxModeStream = assembly.GetManifestResourceStream("PetriNetSimulator2.Syntax.SyntaxModes.xml");

            if (syntaxModeStream != null)
            {
                syntaxModes = SyntaxMode.GetSyntaxModes(syntaxModeStream);
            }
            else
            {
                syntaxModes = new List <SyntaxMode>();
            }
        }
Exemple #11
0
            public ResourceSyntaxModeProvider(string resourceName)
            {
                this.resourceName = resourceName;

                Assembly assembly = Assembly.GetExecutingAssembly();

                string syntaxMode = string.Format("<?xml version=\"1.0\"?>" +
                                                  "<SyntaxModes version=\"1.0\">" +
                                                  "  <Mode extensions=\".apsimx\" file=\"{0}.xshd\" name=\"{0}\"></Mode>" +
                                                  "</SyntaxModes>", resourceName);

                byte[]       bytes            = System.Text.Encoding.UTF8.GetBytes(syntaxMode);
                MemoryStream syntaxModeStream = new MemoryStream(bytes);

                if (syntaxModeStream != null)
                {
                    syntaxModes = SyntaxMode.GetSyntaxModes(syntaxModeStream);
                }
                else
                {
                    syntaxModes = new List <SyntaxMode>();
                }
            }
        public ResourceSyntaxModeProviderEx()
        {
            var syntaxModeStream = GetSyntaxModeStream("SyntaxModesEx.xml");

            _syntaxModes = syntaxModeStream != null?SyntaxMode.GetSyntaxModes(syntaxModeStream) : new List <SyntaxMode>();
        }