Ejemplo n.º 1
0
        public bool Load(DocOf nLeftorRight,string fname)
        {
            fnames[(int)nLeftorRight]	= fname;
            //!CFile::GetStatus(pszFname,fstat[nLeftorRight]);

            ListAnchor list = lines[(int)nLeftorRight];
            list.RemoveAll();
            uint linenr = 1;
            StreamReader sr = new StreamReader( fname, Encoding.GetEncoding(932));	//Shif-JIS
            try{
                string text;
                while( ( text = sr.ReadLine() ) != null ){
                    list.AddTail( new Line( text, linenr++ ) );
                }
            }
            finally{
                sr.Close();
            }
            return true;
        }
Ejemplo n.º 2
0
 public bool IsLoaded(DocOf nLeftorRight)
 {
     return !lines[(int)nLeftorRight].IsEmpty();
 }