Esempio n. 1
0
        void onOpenPath(string path)
        {
            if (path.EndsWith(":"))
            {
                path += "\\";
            }

            if (currentpath == path)
            {
                return;
            }

            PathAnalyser pathanalyser = LsKeyword.getThis().getPathAnalyser();

            pathanalyser.openPath(path, true, -1);

            //currentpath = path;
            setCurrentPath(path);

            //
            listBox1.Items.Clear();
            ArrayList als = pathanalyser.listPath(path);

            foreach (string s in als)
            {
                listBox1.Items.Add(s);
            }
        }
Esempio n. 2
0
        public void loadFile()
        {
            if (pathfile == null || pathfile.Length == 0)
            {
                return;
            }

            ArrayList als = this.readFile(pathfile);

            // proc relative path;
            Hashtable hss = new Hashtable();
            string    str;
            string    rpath = relativepath + "\\";

            for (int i = 0; i < als.Count; i++)
            {
                string s = (string)als[i];
                str = s;
                if (s[0] == '\\')
                {
                    str = relativepath + s;
                }
                else if (s[0] == '.')
                {
                    str = relativepath + s.Substring(1, s.Length - 1);
                    //str = s.Replace(
                }
                //Int32 it2 = (Int32)alslinenum[i];
                hss.Add(str, (Int32)alslinenum[i]);
            }

            //
            PathAnalyser pas = LsKeyword.getThis().getPathAnalyser();

            pas.reset();

            pas.openPath(relativepath, true, -1);
            foreach (DictionaryEntry de in hss)
            {
                //Int32 it = (Int32)de.Value;
                pas.openPath((string)de.Key, false, (Int32)de.Value);
            }
            //LsKeyword.getThis().getSearchForm().showList(hss);
        }