40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace CDSAE3_Lian_Lian_Kan.Forms
|
|||
|
{
|
|||
|
public partial class Item : UserControl
|
|||
|
{
|
|||
|
(int,int) ori_size;
|
|||
|
public Item()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
picture.Parent = Back_Picture;
|
|||
|
}
|
|||
|
public void Item_Init(Image image,(int,int) size,Color BackColor)
|
|||
|
{
|
|||
|
Back_Picture.BackColor = BackColor;
|
|||
|
ori_size = size;
|
|||
|
picture.Image = image;
|
|||
|
picture.SizeMode = PictureBoxSizeMode.Zoom;
|
|||
|
picture.BackColor = Color.Transparent;
|
|||
|
Back_Picture.Size = new Size(Width, Height);
|
|||
|
picture.Size = new Size(Width, Height);
|
|||
|
set_progress(0);
|
|||
|
}
|
|||
|
public void set_progress(int height)
|
|||
|
{
|
|||
|
Size = new Size(ori_size.Item1, height);
|
|||
|
picture.Location = new Point(0, -(70-height));
|
|||
|
picture.Refresh();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|