Add project files.
This commit is contained in:
53
CarManagerV2/CarCard.cs
Normal file
53
CarManagerV2/CarCard.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user