Beispiel #1
0
        public IvaProgramDescription[] GetProgramDescriptionList()
        {
            this.ThrowExceptionIfDisposed();
            this.ThrowExceptionIfClosed();
            IvBankList[] bankList = new IvBankList[32];
            int          num      = (int)Ivff.IvaLoadBankList((Stream)this._reader, ref this._ivaHandler, ref bankList);

            IvaProgramDescription[] programDescriptionArray = new IvaProgramDescription[32];
            for (int index = 0; index < 32; ++index)
            {
                programDescriptionArray[index] = new IvaProgramDescription(index, this.CmosType, ref bankList[index]);
            }
            return(programDescriptionArray);
        }
 internal IvaProgramDescription(int index, CmosType cmosType, ref IvBankList src)
 {
     this.ProgramNo       = index;
     this.ProgramName     = src.BankName;
     this.Configured      = src.ConfiguredBank;
     this.MasterAvailable = src.Enable;
     Color[] imageData = new Color[4800];
     if (this.MasterAvailable)
     {
         if (cmosType == CmosType.CmosMono)
         {
             Holder <IvThumbnailMono> holder = new Holder <IvThumbnailMono>();
             IvaUtils.CopyStructure <IvThumbnailImage, IvThumbnailMono>(ref src.ThumbnailImage, ref holder.Target);
             for (int index1 = 0; index1 < 60; ++index1)
             {
                 for (int index2 = 0; index2 < 80; ++index2)
                 {
                     byte num = holder.Target.ImageBuffer[index1 * 80 + index2];
                     imageData[index1 * 80 + index2] = Color.FromArgb((int)num, (int)num, (int)num);
                 }
             }
         }
         else
         {
             Holder <IvThumbnailColor> holder = new Holder <IvThumbnailColor>();
             IvaUtils.CopyStructure <IvThumbnailImage, IvThumbnailColor>(ref src.ThumbnailImage, ref holder.Target);
             for (int index1 = 0; index1 < 60; ++index1)
             {
                 for (int index2 = 0; index2 < 80; ++index2)
                 {
                     ushort num = holder.Target.ImageBuffer[index1 * 80 + index2];
                     imageData[index1 * 80 + index2] = Color.FromArgb(((int)num & 63488) >> 8, ((int)num & 2000) >> 3, ((int)num & 31) << 3);
                 }
             }
         }
     }
     this.ThumbnailImage = new ThumbnailImage(imageData);
 }