Exemplo n.º 1
0
        public void readfile(ref string[] path,int i)
        {
            Thread g=Thread.CurrentThread;

            //  g.Name="dr";
               // MessageBox.Show(g.Name);
            int fileno=0, lineno;
            foreach (string s in path)
            {
                Thread.Sleep(100);
                lineno = 0;
                StreamReader read = new StreamReader(@s);
                string line;
              //  MessageBox.Show("sleep");

               // MessageBox.Show("awake");
                while ((line = read.ReadLine()) != null)
                {

                    line = line.Trim();
                    if (line.StartsWith("/*") )
                    {

                        lineno++;
                        while (!line.EndsWith("*/"))
                        {

                         line=   read.ReadLine();
                            lineno++;
                        }

                        continue;
                    }
                    if (line.Equals(""))
                    {
                        lineno++;
                        continue;
                    }
                    if (line.StartsWith("//") || line.StartsWith("///"))
                    {

                        lineno++;
                        continue;
                    }

                    lineno++;
                   // Console.WriteLine("in first function   :"+line + "  " + lineno+"  "+fileno+"  "+s);
                    match ma = new match();

                    ma.selectlinematch(ref path, line, fileno, lineno,i);

                }
                fileno++;

            }
        }
Exemplo n.º 2
0
        public void readfile(ref string[] path, int i)
        {
            Thread g = Thread.CurrentThread;

            //  g.Name="dr";
            // MessageBox.Show(g.Name);
            int fileno = 0, lineno;

            foreach (string s in path)
            {
                Thread.Sleep(100);
                lineno = 0;
                StreamReader read = new StreamReader(@s);
                string       line;
                //  MessageBox.Show("sleep");


                // MessageBox.Show("awake");
                while ((line = read.ReadLine()) != null)
                {
                    line = line.Trim();
                    if (line.StartsWith("/*"))
                    {
                        lineno++;
                        while (!line.EndsWith("*/"))
                        {
                            line = read.ReadLine();
                            lineno++;
                        }

                        continue;
                    }
                    if (line.Equals(""))
                    {
                        lineno++;
                        continue;
                    }
                    if (line.StartsWith("//") || line.StartsWith("///"))
                    {
                        lineno++;
                        continue;
                    }

                    lineno++;
                    // Console.WriteLine("in first function   :"+line + "  " + lineno+"  "+fileno+"  "+s);
                    match ma = new match();

                    ma.selectlinematch(ref path, line, fileno, lineno, i);
                }
                fileno++;
            }
        }