54 lines
1.2 KiB
C#
54 lines
1.2 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 CarManagerV2
|
|
{
|
|
public partial class CarCard : UserControl
|
|
{
|
|
public string CarName
|
|
{
|
|
get { return lblCarName.Text; }
|
|
set { lblCarName.Text = value; }
|
|
}
|
|
public string CarDetails
|
|
{
|
|
get { return lblCarDetails.Text; }
|
|
set { lblCarDetails.Text = value; }
|
|
}
|
|
|
|
public Image CarImage
|
|
{
|
|
get { return pbxCar.Image; }
|
|
set { pbxCar.Image = value; }
|
|
}
|
|
|
|
public CarCard()
|
|
{
|
|
InitializeComponent();
|
|
this.Cursor = Cursors.Hand;
|
|
this.Click += (s, e) => this.OnCardClicked();
|
|
}
|
|
|
|
public event EventHandler CardClicked;
|
|
private void OnCardClicked()
|
|
{
|
|
if (this.CardClicked != null)
|
|
{
|
|
this.CardClicked(this, EventArgs.Empty);
|
|
}
|
|
}
|
|
|
|
private void CarCard_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|