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));
         }
     }
 }
 public void StartUpdate()
 {
     try
     {
         this.ledSub.PreviewDraw();
         this.ledSub.LastScaleDrawn = LedSubareaDisplayHolder.Griding(this.ledSub.LastDrawn, formDisplay.zoon);
         if (!this.ledSub.SelectedContent.Edge.Enabled)
         {
             formMain.ReleasePicture(this.pictureBox1, this.ledSub.LastScaleDrawn);
         }
     }
     catch
     {
     }
 }
示例#3
0
 public void DisplayItem(LedItem pItem)
 {
     if (pItem == null)
     {
         return;
     }
     for (int i = 0; i < pItem.Subareas.Count; i++)
     {
         LedSubareaDisplayHolder ledSubareaDisplayHolder = new LedSubareaDisplayHolder(pItem.Subareas[i]);
         this.holderList.Add(ledSubareaDisplayHolder);
         this.Panel_Item.Controls.Add(ledSubareaDisplayHolder);
     }
     this.nowItem        = pItem;
     this.nowEdgeDisplay = new EdgeDisplay(pItem.Edge, pItem);
     if (this.nowItem.Edge.Enabled)
     {
         this.timer_ItemEdge.Start();
     }
     formDisplay.zoon = 1m;
 }
示例#4
0
 private void timer_ItemEdge_Tick(object sender, EventArgs e)
 {
     System.Drawing.Bitmap itemEdgeTop    = this.nowEdgeDisplay.ItemEdgeTop;
     System.Drawing.Bitmap itemEdgeRight  = this.nowEdgeDisplay.ItemEdgeRight;
     System.Drawing.Bitmap itemEdgeBottom = this.nowEdgeDisplay.ItemEdgeBottom;
     System.Drawing.Bitmap itemEdgeLeft   = this.nowEdgeDisplay.ItemEdgeLeft;
     this.nowEdgeDisplay.GetNewItemEdge();
     this.edgeTop_pictureBox.Image    = LedSubareaDisplayHolder.Griding(itemEdgeTop, formDisplay.zoon);
     this.edgeRight_pictureBox.Image  = LedSubareaDisplayHolder.Griding(itemEdgeRight, formDisplay.zoon);
     this.edgeBottom_pictureBox.Image = LedSubareaDisplayHolder.Griding(itemEdgeBottom, formDisplay.zoon);
     this.edgeLeft_pictureBox.Image   = LedSubareaDisplayHolder.Griding(itemEdgeLeft, formDisplay.zoon);
     System.Drawing.Bitmap   bitmap   = new System.Drawing.Bitmap(this.nowItem.Edge.Height, this.nowItem.Edge.Height);
     System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(bitmap);
     graphics.Clear(System.Drawing.Color.Transparent);
     graphics.DrawImage(this.nowEdgeDisplay.ItemEdgeTop, new System.Drawing.Point(0, 0));
     graphics.DrawImage(this.nowEdgeDisplay.ItemEdgeLeft, new System.Drawing.Point(0, 0));
     this.EdgeCorner1_pictureBox.Image = LedSubareaDisplayHolder.Griding(bitmap, formDisplay.zoon);
     System.Drawing.Bitmap bitmap2 = new System.Drawing.Bitmap(this.nowItem.Edge.Height, this.nowItem.Edge.Height);
     graphics = System.Drawing.Graphics.FromImage(bitmap2);
     graphics.Clear(System.Drawing.Color.Transparent);
     graphics.DrawImage(this.nowEdgeDisplay.ItemEdgeRight, new System.Drawing.Point(0, 0));
     graphics.DrawImage(this.nowEdgeDisplay.ItemEdgeTop, new System.Drawing.Rectangle(0, 0, bitmap2.Width, bitmap2.Height), new System.Drawing.Rectangle(formDisplay.panel.Width - bitmap2.Width, 0, bitmap2.Width, bitmap2.Width), System.Drawing.GraphicsUnit.Pixel);
     this.EdgeCorner2_pictureBox.Image = LedSubareaDisplayHolder.Griding(bitmap2, formDisplay.zoon);
     System.Drawing.Bitmap bitmap3 = new System.Drawing.Bitmap(this.nowItem.Edge.Height, this.nowItem.Edge.Height);
     graphics = System.Drawing.Graphics.FromImage(bitmap3);
     graphics.Clear(System.Drawing.Color.Transparent);
     graphics.DrawImage(this.nowEdgeDisplay.ItemEdgeBottom, new System.Drawing.Point(0, 0));
     graphics.DrawImage(this.nowEdgeDisplay.ItemEdgeLeft, new System.Drawing.Rectangle(0, 0, bitmap3.Width, bitmap3.Height), new System.Drawing.Rectangle(0, formDisplay.panel.Height - bitmap3.Width, bitmap3.Width, bitmap3.Width), System.Drawing.GraphicsUnit.Pixel);
     this.EdgeCorner3_pictureBox.Image = LedSubareaDisplayHolder.Griding(bitmap3, formDisplay.zoon);
     System.Drawing.Bitmap bitmap4 = new System.Drawing.Bitmap(this.nowItem.Edge.Height, this.nowItem.Edge.Height);
     graphics = System.Drawing.Graphics.FromImage(bitmap4);
     graphics.Clear(System.Drawing.Color.Transparent);
     graphics.DrawImage(this.nowEdgeDisplay.ItemEdgeBottom, new System.Drawing.Rectangle(0, 0, bitmap4.Width, bitmap4.Width), new System.Drawing.Rectangle(formDisplay.panel.Width - bitmap4.Width, 0, bitmap4.Width, bitmap4.Width), System.Drawing.GraphicsUnit.Pixel);
     graphics.DrawImage(this.nowEdgeDisplay.ItemEdgeRight, new System.Drawing.Rectangle(0, 0, bitmap4.Width, bitmap4.Height), new System.Drawing.Rectangle(0, formDisplay.panel.Height - bitmap4.Width, bitmap4.Width, bitmap4.Width), System.Drawing.GraphicsUnit.Pixel);
     this.EdgeCorner4_pictureBox.Image = LedSubareaDisplayHolder.Griding(bitmap4, formDisplay.zoon);
 }
 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);
             }
         }
     }
 }
 private void UpdateEdge()
 {
     System.Drawing.Bitmap @new = this.edgeDis.GetNew();
     formMain.ReleasePicture(this.pictureBox1, LedSubareaDisplayHolder.Griding(@new, formDisplay.zoon));
 }