示例#1
0
文件: util.cs 项目: ywscr/MindMap
        public static void reopen(PartOfSpeech p)
        {
            WNDBpart w = WNDBpart.of(p);

            w.index.Close();
            w.data.Close();
            w.index = new StreamReader(IndexFile(p));
            w.data  = new StreamReader(DataFile(p));
        }
示例#2
0
 public static MemoryStream index(PartOfSpeech p)         //StreamReader index(PartOfSpeech p)
 {
     if (laststr == ((System.IO.FileStream)(WNDBpart.of(p).index.BaseStream)).Name)
     {
         return(ms); //WNDBpart.of(p).index;
     }
     else
     {
         laststr = ((System.IO.FileStream)(WNDBpart.of(p).index.BaseStream)).Name;
         StreamReader fs = WNDBpart.of(p).index;
         fs.BaseStream.Position = 0;
         Byte[] b = System.Text.Encoding.Unicode.GetBytes(fs.ReadToEnd());
         ms = new MemoryStream(b);
         return(ms);            //WNDBpart.of(p).index;
     }
 }
示例#3
0
文件: util.cs 项目: ywscr/MindMap
 public static StreamReader data(PartOfSpeech p)
 {
     return(WNDBpart.of(p).data);
 }
示例#4
0
文件: util.cs 项目: ywscr/MindMap
 public static StreamReader index(PartOfSpeech p)
 {
     return(WNDBpart.of(p).index);
 }