public void SetTransparency(int newValue)
 {
     try
     {
         this.CheckForUpdates();
         DocUtil.EnableTransparency();
         Document     parentDocument = this.ParentDataset.ParentDocument;
         byte         b            = Convert.ToByte(Math.Floor((100.0 - (double)newValue) / 100.0 * 254.0));
         Transparency transparency = new Transparency(b);
         using (parentDocument.LockDocument())
         {
             parentDocument.TransactionManager.EnableGraphicsFlush(true);
             var transactionManager = parentDocument.TransactionManager;
             using (Transaction transaction = transactionManager.StartTransaction())
             {
                 BlockTable       blockTable  = (BlockTable)transaction.GetObject(parentDocument.Database.BlockTableId, 0);
                 BlockTableRecord arg_A1_0    = (BlockTableRecord)transaction.GetObject(blockTable[(BlockTableRecord.ModelSpace)], (OpenMode)1);
                 RasterImage      rasterImage = (RasterImage)transaction.GetObject(this.RasterObjectId, (OpenMode)1);
                 rasterImage.Transparency = (transparency);
                 rasterImage.Draw();
                 parentDocument.TransactionManager.QueueForGraphicsFlush();
                 parentDocument.TransactionManager.FlushGraphics();
                 parentDocument.Editor.UpdateScreen();
                 transaction.Commit();
             }
         }
     }
     catch
     {
     }
 }