-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStepDisplay.cs
More file actions
28 lines (23 loc) · 781 Bytes
/
StepDisplay.cs
File metadata and controls
28 lines (23 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Drawing;
using System.Windows.Forms;
namespace MemeGen
{
public partial class StepDisplay : UserControl
{
public Image Image { get; }
public string Caption { get; }
public StepDisplay() { }
public StepDisplay(Image image, string caption)
{
InitializeComponent();
Image = image;
Caption = caption;
Height = tableCaption.Height = pbImage.Height = (int)Math.Round(Image.Height / (decimal)Image.Width * pbImage.Width);
pbImage.Location = new Point { X = 0, Y = 0 };
tableCaption.Location = new Point { X = 300, Y = 0 };
pbImage.Image = Image = image;
lblCaption.Text = Caption = caption;
}
}
}