Пример #1
0
        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();
        }
Пример #2
0
        private void ChkBack3_CheckedChanged(object sender, EventArgs e)
        {
            CheckBox checkBox = (CheckBox)sender;

            if (!checkBox.Focused)
            {
                return;
            }
            if (checkBox.Checked)
            {
                if (this.IsContent)
                {
                    using (IEnumerator <LedBackground> enumerator = this.Content.ParentSubarea.ParentItem.Backgrounds.GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            LedBackground current = enumerator.Current;
                            if (current.Enabled)
                            {
                                MessageBox.Show(formMain.ML.GetStr("formMain_message_Reuse_Background"));
                                this.ChkBack3.Checked = false;
                                return;
                            }
                        }
                        goto IL_156;
                    }
                }
                foreach (LedSubarea current2 in this.Item.Subareas)
                {
                    foreach (LedContent current3 in current2.Contents)
                    {
                        foreach (LedBackground current4 in current3.Backgrounds)
                        {
                            if (current4.Enabled)
                            {
                                MessageBox.Show(formMain.ML.GetStr("formMain_message_Reuse_Background"));
                                this.ChkBack3.Checked = false;
                                return;
                            }
                        }
                    }
                }
IL_156:
                this.ChkBack3.Checked = true;
                if (this.backgroundNo3 == null)
                {
                    this.backgroundNo3 = new LedBackground();
                }
                this.backgroundNo3.Enabled = true;
                this.Back3.Enabled         = true;
            }
            else
            {
                this.backgroundNo3.Enabled = false;
                this.Back3.Enabled         = false;
            }
            this.DisplayBackground(2);
        }
Пример #3
0
        private void changeBackgroundMaterial(LedBackground BackgroundMaterial, int Material)
        {
            formBackgroundEffectSelecter formBackgroundEffectSelecter = new formBackgroundEffectSelecter();

            formBackgroundEffectSelecter.Size = new System.Drawing.Size(276, 658);
            formBackgroundEffectSelecter.SelectEffect(BackgroundMaterial);
            formBackgroundEffectSelecter.Dispose();
            BackgroundMaterial.Changed = true;
            this.DisplayBackground(Material);
        }
 public void SelectEffect(LedBackground pBackground)
 {
     this.background         = pBackground;
     this.backOriginalName   = pBackground.MaterialName;
     this.backOriginalType   = pBackground.MaterialType;
     this.backOriginalLayout = pBackground.MaterialLayout;
     base.Size = new System.Drawing.Size(648, 349);
     this.Load_formEffectSelecter();
     base.ShowDialog();
 }
Пример #5
0
		private void MakeAnimation(System.Drawing.Size pSize, LedBackground pBackground)
		{
			if (pBackground == null)
			{
				return;
			}
			if (pBackground.Changed && !pBackground.CustomChecked)
			{
				formAnimationMaker formAnimationMaker = new formAnimationMaker();
				formAnimationMaker.Make(pSize, pBackground);
				pBackground.Changed = false;
				formAnimationMaker.Dispose();
			}
		}
Пример #6
0
 public AnimationMaker(System.Drawing.Size pSize, LedBackground pBackground)
 {
     if (pSize.Width > 1000)
     {
         pSize.Width = 1000;
     }
     this.isBackgroundModel = true;
     this.InitializeComponent();
     base.Size                 = pSize;
     this.displaySize          = pSize;
     this.Wpr                  = new AnimationMaker.FlaWndProc(this.EFFWndProc);
     this.OldWndProc           = AnimationMaker.SetWindowLong(this.player.Handle, -4, this.Wpr);
     this.background           = pBackground;
     this.background.PageCount = 0;
 }
Пример #7
0
        public void LoadBackground(LedContent pContent)
        {
            this.Content       = pContent;
            this.IsContent     = true;
            this.backgroundNo1 = pContent.GetBackgroud(1);
            this.backgroundNo2 = pContent.GetBackgroud(2);
            this.backgroundNo3 = pContent.GetBackgroud(3);
            if (this.backgroundNo2 == null)
            {
                this.backgroundNo2    = new LedBackground();
                this.backgroundNo2.No = 2;
                LedBackground expr_5A = this.backgroundNo2;
                expr_5A.ID += ColorfulBackground.material_no.ToString();
                ColorfulBackground.material_no++;
                pContent.AddBackground(this.backgroundNo2);
            }
            if (this.backgroundNo3 == null)
            {
                this.backgroundNo3    = new LedBackground();
                this.backgroundNo3.No = 3;
                LedBackground expr_B1 = this.backgroundNo3;
                expr_B1.ID += ColorfulBackground.material_no.ToString();
                ColorfulBackground.material_no++;
                pContent.AddBackground(this.backgroundNo3);
            }
            if (this.backgroundNo1.MaterialName == string.Empty)
            {
                this.backgroundNo1.MaterialName = "BM0000.swf";
                this.backgroundNo1.MaterialType = LedMaterialType.Flash;
            }
            else if (!formBackgroundEffectSelecter.LoadedMaterials.ContainsKey(this.backgroundNo1.MaterialName))
            {
                this.backgroundNo1.MaterialName = "BM0000.swf";
                this.backgroundNo1.MaterialType = LedMaterialType.Flash;
            }
            if (this.backgroundNo2.MaterialName == string.Empty)
            {
                this.backgroundNo2.MaterialName = "BM0000.swf";
                this.backgroundNo2.MaterialType = LedMaterialType.Flash;
            }
            else if (!formBackgroundEffectSelecter.LoadedMaterials.ContainsKey(this.backgroundNo2.MaterialName))
            {
                this.backgroundNo2.MaterialName = "BM0000.swf";
                this.backgroundNo2.MaterialType = LedMaterialType.Flash;
            }
            if (this.backgroundNo3.MaterialName == string.Empty)
            {
                this.backgroundNo3.MaterialName = "BM0000.swf";
                this.backgroundNo3.MaterialType = LedMaterialType.Flash;
            }
            else if (!formBackgroundEffectSelecter.LoadedMaterials.ContainsKey(this.backgroundNo3.MaterialName))
            {
                this.backgroundNo3.MaterialName = "BM0000.swf";
                this.backgroundNo3.MaterialType = LedMaterialType.Flash;
            }
            string saveDirectory = pContent.ParentSubarea.ParentItem.ParentPanel.GetSaveDirectory();

            this.backgroundNo1.SaveDirectory = (this.backgroundNo2.SaveDirectory = (this.backgroundNo3.SaveDirectory = saveDirectory));
            this.ChkBackState();
            this.DisplayBackground(3);
        }