Beispiel #1
0
 private void ListBoxDoubleClick(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         OpenFileHandler.OpenFile(listBox1.SelectedItem.ToString(),
                                  new MemoryStream(loadedSarc.Files[listBox1.SelectedItem.ToString()]));
     }
 }
Beispiel #2
0
 public void OpenFile(string filename, Stream file)
 {
     byte[] data;
     if (file is MemoryStream)
     {
         data = ((MemoryStream)file).ToArray();
     }
     else
     {
         var s = new MemoryStream();
         file.CopyTo(s);
         data = s.ToArray();
         s.Dispose();
     }
     OpenFileHandler.OpenFile(filename, new MemoryStream(YAZ0.Decompress(data)));
 }