Пример #1
0
 public bool Open(string fileName)
 {
     FilePath = fileName;
     if (FilePath == null)
     {
         var d = new OpenFileDialog();
         d.Filter = Filter;
         if (d.ShowDialog(OwnerForm) != DialogResult.OK)
         {
             return(false);
         }
         FilePath = d.FileName;
     }
     using (var stm = new FileStream(FilePath, FileMode.Open)) {
         DocumentData.Read(stm);
     }
     DocumentData.Updated();
     return(true);
 }