public static void AsignElem(PEData elem)
    {
        if (elem as DCharacter)
        {
            _currentWindow._characterContainer.data = _currentWindow._characterContainer.data.OrderBy(x => x.GetIdentificator()[0]).ToList();
            _currentWindow._characterSelected       = _currentWindow._characterContainer.data.IndexOf(elem);
        }

        else if (elem as DLocation)
        {
            _currentWindow._locationContainer.data = _currentWindow._locationContainer.data.OrderBy(x => x.GetIdentificator()[0]).ToList();
            _currentWindow._locationSelected       = _currentWindow._locationContainer.data.IndexOf(elem);
        }

        else if (elem as DSoundtrack)
        {
            _currentWindow._soundContainer.data = _currentWindow._soundContainer.data.OrderBy(x => x.GetIdentificator()[0]).ToList();
            _currentWindow._soundSelected       = _currentWindow._soundContainer.data.IndexOf(elem);
        }
    }
示例#2
0
 public bool ReadPE(string fn)
 {
     try
     {
         FileStream fs  = new FileStream(fn, FileMode.Open);
         int        len = (int)fs.Length;
         this.data = new byte[len];
         fs.Read(this.data, 0, len);
         fs.Close();
     }
     catch
     {
         System.Console.WriteLine("Can not open: {0}", fn);
         return(false);
     }
     this.pedata = new PEData(this.data);
     if (this.pedata.cli == null)
     {
         System.Console.WriteLine("Not CIL assembly: {0}", fn);
         return(false);
     }
     return(true);
 }