This repository has been archived on 2024-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
CDSAE3/CDSAE3_Lian_Lian_Kan/Forms/Item.cs

39 lines
1.1 KiB
C#
Raw Normal View History

2024-04-08 13:04:47 +00:00
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();
}
}
}