public void Make(System.Drawing.Size pSize, LedBackground pBackground) { int num = base.Size.Width - this.panel1.Width; int num2 = base.Size.Height - this.panel1.Height; this.backGroundSize = pSize; this.ledbackground = pBackground; this.isBackGround = true; this.timer1.Interval = 1000 / formAnimationMaker.FrameRate; this.am = new AnimationMaker(pSize, pBackground); if (pSize.Width > 1000) { pSize.Width = 1000; } if (pBackground.MaterialType == LedMaterialType.Flash) { this.am.changeMaterial(); } else { this.am.ChangeEffect(); } this.am.Size = pSize; this.am.Event += new AnimationEvent(this.am_Event); this.panel1.Controls.Add(this.am); this.am.Location = new System.Drawing.Point(0, 0); this.timer1.Start(); base.Size = new System.Drawing.Size(pSize.Width + num, pSize.Height + num2); this.am.Location = new System.Drawing.Point(0, 0); this.CantClose(); this.countDown = formAnimationMaker.FrameRate * 3; base.ShowDialog(); }
private void animationEditor1_Event(AnimationEventType pType) { switch (pType) { case AnimationEventType.ChangeEffect: { this.StopPreview(); this.animationMaker = new AnimationMaker(this.panelSize, this.animation); int x = (this.panel1.Width - this.animationMaker.Width) / 2; int y = (this.panel1.Height - this.animationMaker.Height) / 2; this.animationMaker.Location = new System.Drawing.Point(x, y); this.animationMaker.Parent = this.panel1; this.animationMaker.ChangeEffect(); return; } case AnimationEventType.Update: this.animationMaker.RefrshAnimation(false); return; case AnimationEventType.StartPreview: case AnimationEventType.StopPreview: break; case AnimationEventType.ReDraw: this.animationMaker.RefrshAnimation(false); break; default: return; } }
public void Edit(System.Drawing.Size pSize, LedAnimation pAnimation) { this.animationMaker = new AnimationMaker(pSize, pAnimation); int x = (this.panel1.Width - this.animationMaker.Width) / 2; int y = (this.panel1.Height - this.animationMaker.Height) / 2; this.animationMaker.Location = new System.Drawing.Point(x, y); this.animationMaker.Parent = this.panel1; this.animation = pAnimation; this.panelSize = pSize; this.animationEditor1.Edit(pAnimation); this.animationEditor1.AllwaysPreview(); this.animationEffect1.Edit(pAnimation); base.ShowDialog(); }
public void Make(System.Drawing.Size pSize, LedAnimation pAnimation) { int num = base.Size.Width - this.panel1.Width; int num2 = base.Size.Height - this.panel1.Height; this.man = pAnimation; this.timer1.Interval = 1000 / formAnimationMaker.FrameRate; this.am = new AnimationMaker(pSize, pAnimation); this.am.ChangeEffect(); this.am.Size = pSize; this.am.Dock = DockStyle.Fill; this.am.Event += new AnimationEvent(this.am_Event); this.panel1.Controls.Add(this.am); this.am.Location = new System.Drawing.Point(0, 0); this.timer1.Start(); base.Size = new System.Drawing.Size(pSize.Width + num, pSize.Height + num2); this.am.Location = new System.Drawing.Point(0, 0); base.ShowDialog(); this.CantClose(); }
static void Init() { AnimationMaker window = (AnimationMaker)EditorWindow.GetWindow(typeof(AnimationMaker)); window.Show(); }