Ejemplo n.º 1
0
 private void UpdateText()
 {
     if (this.dis == null)
     {
         this.content = (LedDText)this.ledSub.SelectedContent;
         this.dis     = LedSubareaDisplayHolder.getMarqueeDisplayByContent(this.content);
         this.edgeDis = new EdgeDisplay(this.ledSub.SelectedContent.Edge, this.ledSub);
     }
     System.Drawing.Bitmap @new = this.dis.getNew();
     if (@new == null)
     {
         this.dis     = LedSubareaDisplayHolder.getMarqueeDisplayByContent(this.content);
         this.edgeDis = new EdgeDisplay(this.ledSub.SelectedContent.Edge, this.ledSub);
         @new         = this.dis.getNew();
     }
     lock (@new)
     {
         if (this.content.Edge.Enabled)
         {
             System.Drawing.Bitmap new2 = this.edgeDis.GetNew(@new);
             formMain.ReleasePicture(this.pictureBox1, LedSubareaDisplayHolder.Griding(new2, formDisplay.zoon));
         }
         else
         {
             formMain.ReleasePicture(this.pictureBox1, LedSubareaDisplayHolder.Griding(@new, formDisplay.zoon));
         }
     }
 }
Ejemplo n.º 2
0
 private void timer_Marquee_Tick(object sender, EventArgs e)
 {
     if (!this.isAnimation && this.ledSub.Contents.Count == 0)
     {
         return;
     }
     if (this.dis == null)
     {
         this.nowMarqueeIndex = 0;
         if (this.isAnimation)
         {
             this.content = this.ledAnimation;
         }
         else
         {
             this.content = (LedPictureText)this.ledSub.Contents[0];
         }
         this.dis = LedSubareaDisplayHolder.getMarqueeDisplayByContent(this.content);
         if (this.ledSub != null && this.ledSub.Contents.Count > 1)
         {
             this.dis.NeedChangeContent = true;
         }
         this.edgeDis = new EdgeDisplay(this.content.Edge, this.ledSub);
     }
     System.Drawing.Bitmap @new = this.dis.getNew();
     if (@new == null)
     {
         if (this.isAnimation)
         {
             this.content = this.ledAnimation;
         }
         else
         {
             this.nowMarqueeIndex++;
             if (this.nowMarqueeIndex == this.ledSub.Contents.Count)
             {
                 this.nowMarqueeIndex = 0;
             }
             this.content = (LedPictureText)this.ledSub.Contents[this.nowMarqueeIndex];
         }
         this.dis = LedSubareaDisplayHolder.getMarqueeDisplayByContent(this.content);
         if (this.ledSub != null && this.ledSub.Contents.Count > 1)
         {
             this.dis.NeedChangeContent = true;
         }
         this.edgeDis = new EdgeDisplay(this.content.Edge, this.ledSub);
         @new         = this.dis.getNew();
     }
     if (@new != null)
     {
         lock (@new)
         {
             if (this.content.Edge.Enabled)
             {
                 System.Drawing.Bitmap new2 = this.edgeDis.GetNew(@new);
                 formMain.ReleasePicture(this.pictureBox1, LedSubareaDisplayHolder.Griding(new2, formDisplay.zoon));
             }
             else
             {
                 System.Drawing.Bitmap pBit = LedSubareaDisplayHolder.Griding(@new, formDisplay.zoon);
                 formMain.ReleasePicture(this.pictureBox1, pBit);
             }
         }
     }
 }