示例#1
0
        public override System.Drawing.Bitmap getNew()
        {
            LedElement ledElement = this.content.Elements[0];

            System.Drawing.Size size = this.content.GetSize();
            if (this.nowDisplay == null)
            {
                this.newBitmap  = LedGraphics.GetBmpFromFile(size, this.nowIndex, this.content.GetFileFullPath());
                this.nowDisplay = base.GetMarqueeDisplayPageInstance(this.content.EffectsSetting, null, this.newBitmap);
                this.nowIndex++;
            }
            System.Drawing.Bitmap next = this.nowDisplay.GetNext();
            if (next != null)
            {
                return(next);
            }
            if (this.nowIndex >= ledElement.PageCount)
            {
                this.nowIndex = 0;
                try
                {
                    this.newBitmap.Dispose();
                    this.oldBitmap.Dispose();
                }
                catch
                {
                }
                return(null);
            }
            if (this.content.EffectsSetting.ExitMode == 0)
            {
                if (this.oldBitmap != null)
                {
                    this.oldBitmap.Dispose();
                }
                this.oldBitmap  = (System.Drawing.Bitmap) this.newBitmap.Clone();
                this.newBitmap  = LedGraphics.GetBmpFromFile(size, this.nowIndex, this.content.GetFileFullPath());
                this.nowDisplay = base.GetMarqueeDisplayPageInstance(this.content.EffectsSetting, this.oldBitmap, this.newBitmap);
            }
            else
            {
                this.newBitmap  = LedGraphics.GetBmpFromFile(size, this.nowIndex, this.content.GetFileFullPath());
                this.nowDisplay = base.GetMarqueeDisplayPageInstance(this.content.EffectsSetting, null, this.newBitmap);
            }
            this.nowIndex++;
            return(this.nowDisplay.GetNext());
        }
示例#2
0
        protected MarqueeDisplayPageBase GetMarqueeDisplayPageInstance(LedEffectsSetting pEffect, System.Drawing.Bitmap pOldBit, System.Drawing.Bitmap pNewBit)
        {
            int num = 100;

            if (pEffect.EntryMode == 1)
            {
                bool   flag   = true;
                Random random = new Random();
                while (flag)
                {
                    try
                    {
                        num = (int)LedGlobal.EntryModeList[random.Next(0, LedGlobal.EntryModeList.Count)];
                    }
                    catch
                    {
                    }
                    if (num < 100 && num != 1)
                    {
                        flag = false;
                    }
                }
            }
            else
            {
                num = (int)LedGlobal.EntryModeList[(int)pEffect.EntryMode];
            }
            MarqueeDisplayPageBase marqueeDisplayPageBase = null;

            switch (num)
            {
            case 1:
                marqueeDisplayPageBase = new MarqueeDisplayPage1(pOldBit, pNewBit, pEffect);
                break;

            case 2:
                marqueeDisplayPageBase = new MarqueeDisplayPage2(pOldBit, pNewBit, pEffect);
                break;

            case 3:
                marqueeDisplayPageBase = new MarqueeDisplayPage3(pOldBit, pNewBit, pEffect);
                break;

            case 4:
                marqueeDisplayPageBase = new MarqueeDisplayPage4(pOldBit, pNewBit, pEffect);
                break;

            case 5:
                marqueeDisplayPageBase = new MarqueeDisplayPage5(pOldBit, pNewBit, pEffect);
                break;

            case 6:
                marqueeDisplayPageBase = new MarqueeDisplayPage6(pOldBit, pNewBit, pEffect);
                break;

            case 7:
                marqueeDisplayPageBase = new MarqueeDisplayPage7(pOldBit, pNewBit, pEffect);
                break;

            case 8:
                marqueeDisplayPageBase = new MarqueeDisplayPage8(pOldBit, pNewBit, pEffect);
                break;

            case 9:
                marqueeDisplayPageBase = new MarqueeDisplayPage9(pOldBit, pNewBit, pEffect);
                break;

            case 10:
                marqueeDisplayPageBase = new MarqueeDisplayPage10(pOldBit, pNewBit, pEffect);
                break;

            case 11:
                marqueeDisplayPageBase = new MarqueeDisplayPage11(pOldBit, pNewBit, pEffect);
                break;

            case 12:
                marqueeDisplayPageBase = new MarqueeDisplayPage12(pOldBit, pNewBit, pEffect);
                break;

            case 13:
                marqueeDisplayPageBase = new MarqueeDisplayPage13(pOldBit, pNewBit, pEffect);
                break;

            case 14:
                marqueeDisplayPageBase = new MarqueeDisplayPage14(pOldBit, pNewBit, pEffect);
                break;

            case 15:
                marqueeDisplayPageBase = new MarqueeDisplayPage15(pOldBit, pNewBit, pEffect);
                break;

            case 16:
                marqueeDisplayPageBase = new MarqueeDisplayPage16(pOldBit, pNewBit, pEffect);
                break;

            case 17:
                marqueeDisplayPageBase = new MarqueeDisplayPage17(pOldBit, pNewBit, pEffect);
                break;

            case 18:
                marqueeDisplayPageBase = new MarqueeDisplayPage18(pOldBit, pNewBit, pEffect);
                break;

            case 19:
                marqueeDisplayPageBase = new MarqueeDisplayPage19(pOldBit, pNewBit, pEffect);
                break;

            case 20:
                marqueeDisplayPageBase = new MarqueeDisplayPage20(pOldBit, pNewBit, pEffect);
                break;

            case 21:
                marqueeDisplayPageBase = new MarqueeDisplayPage21(pOldBit, pNewBit, pEffect);
                break;

            case 22:
                marqueeDisplayPageBase = new MarqueeDisplayPage22(pOldBit, pNewBit, pEffect);
                break;

            case 23:
                marqueeDisplayPageBase = new MarqueeDisplayPage23(pOldBit, pNewBit, pEffect);
                break;

            case 24:
                marqueeDisplayPageBase = new MarqueeDisplayPage24(pOldBit, pNewBit, pEffect);
                break;

            case 25:
                marqueeDisplayPageBase = new MarqueeDisplayPage25(pOldBit, pNewBit, pEffect);
                break;

            case 26:
                marqueeDisplayPageBase = new MarqueeDisplayPage26(pOldBit, pNewBit, pEffect);
                break;

            case 27:
                marqueeDisplayPageBase = new MarqueeDisplayPage27(pOldBit, pNewBit, pEffect);
                break;

            case 28:
                marqueeDisplayPageBase = new MarqueeDisplayPage28(pOldBit, pNewBit, pEffect);
                break;

            case 29:
                marqueeDisplayPageBase = new MarqueeDisplayPage29(pOldBit, pNewBit, pEffect);
                break;

            case 30:
                marqueeDisplayPageBase = new MarqueeDisplayPage30(pOldBit, pNewBit, pEffect);
                break;

            case 31:
                marqueeDisplayPageBase = new MarqueeDisplayPage31(pOldBit, pNewBit, pEffect);
                break;

            case 32:
                marqueeDisplayPageBase = new MarqueeDisplayPage32(pOldBit, pNewBit, pEffect);
                break;

            case 33:
                marqueeDisplayPageBase = new MarqueeDisplayPage33(pOldBit, pNewBit, pEffect);
                break;

            case 34:
                marqueeDisplayPageBase = new MarqueeDisplayPage34(pOldBit, pNewBit, pEffect);
                break;

            case 35:
                marqueeDisplayPageBase = new MarqueeDisplayPage35(pOldBit, pNewBit, pEffect);
                break;

            case 36:
                marqueeDisplayPageBase = new MarqueeDisplayPage36(pOldBit, pNewBit, pEffect);
                break;

            case 37:
                marqueeDisplayPageBase = new MarqueeDisplayPage37(pOldBit, pNewBit, pEffect);
                break;

            case 38:
                marqueeDisplayPageBase = new MarqueeDisplayPage38(pOldBit, pNewBit, pEffect);
                break;

            case 39:
                marqueeDisplayPageBase = new MarqueeDisplayPage39(pOldBit, pNewBit, pEffect);
                break;

            case 40:
                marqueeDisplayPageBase = new MarqueeDisplayPage40(pOldBit, pNewBit, pEffect);
                break;

            case 41:
                marqueeDisplayPageBase = new MarqueeDisplayPage41(pOldBit, pNewBit, pEffect);
                break;

            case 42:
                marqueeDisplayPageBase = new MarqueeDisplayPage42(pOldBit, pNewBit, pEffect);
                break;

            case 43:
                marqueeDisplayPageBase = new MarqueeDisplayPage43(pOldBit, pNewBit, pEffect);
                break;

            case 44:
                marqueeDisplayPageBase = new MarqueeDisplayPage44(pOldBit, pNewBit, pEffect);
                break;

            case 45:
                marqueeDisplayPageBase = new MarqueeDisplayPage45(pOldBit, pNewBit, pEffect);
                break;

            case 46:
                marqueeDisplayPageBase = new MarqueeDisplayPage46(pOldBit, pNewBit, pEffect);
                break;

            case 47:
                marqueeDisplayPageBase = new MarqueeDisplayPage47(pOldBit, pNewBit, pEffect);
                break;

            case 48:
                marqueeDisplayPageBase = new MarqueeDisplayPage48(pOldBit, pNewBit, pEffect);
                break;

            case 49:
                marqueeDisplayPageBase = new MarqueeDisplayPage49(pOldBit, pNewBit, pEffect);
                break;

            case 50:
                marqueeDisplayPageBase = new MarqueeDisplayPage50(pOldBit, pNewBit, pEffect);
                break;

            case 51:
                marqueeDisplayPageBase = new MarqueeDisplayPage51(pOldBit, pNewBit, pEffect);
                break;

            case 52:
                marqueeDisplayPageBase = new MarqueeDisplayPage52(pOldBit, pNewBit, pEffect);
                break;

            case 53:
                marqueeDisplayPageBase = new MarqueeDisplayPage53(pOldBit, pNewBit, pEffect);
                break;

            case 54:
                marqueeDisplayPageBase = new MarqueeDisplayPage54(pOldBit, pNewBit, pEffect);
                break;

            case 55:
                marqueeDisplayPageBase = new MarqueeDisplayPage55(pOldBit, pNewBit, pEffect);
                break;

            case 56:
                marqueeDisplayPageBase = new MarqueeDisplayPage57(pOldBit, pNewBit, pEffect);
                break;

            case 57:
                marqueeDisplayPageBase = new MarqueeDisplayPage56(pOldBit, pNewBit, pEffect);
                break;
            }
            if (marqueeDisplayPageBase == null)
            {
                marqueeDisplayPageBase = new MarqueeDisplayPage47(pOldBit, pNewBit, pEffect);
            }
            return(marqueeDisplayPageBase);
        }