public override void FillPanel(ArchivedFile file, Panel pn) { Frame[] frameArr1 = ImageDecoder.LoadFrames(file); Panel panel = pn; FileTabSheet fileTabSheet = new FileTabSheet(); fileTabSheet.SetFile(file); pn = fileTabSheet.DecodedPanel; pn.AutoScroll = true; pn.AutoScrollMargin = new Size(5, 5); int i1 = 5; for (int i2 = 0; i2 < (int)frameArr1.Length; i2++) { Frame[] frameArr2 = new Frame[] { frameArr1[i2] }; int[] iArr = new int[] { 1 }; Animation animation = new Animation(frameArr2, iArr); AnimationBox animationBox = new AnimationBox(); animationBox.Title = "Imagen"; Animation[] animationArr = new Animation[] { animation }; animationBox.Animations = animationArr; animationBox.Name = Path.GetFileNameWithoutExtension(file.FileName); animationBox.UpdateSize(); animationBox.SetBounds(5, i1, animationBox.Width, animationBox.Height); pn.Controls.Add(animationBox); i1 += animationBox.Height + 5; } panel.Controls.Add(fileTabSheet); }