44 lines
1.0 KiB
C#
44 lines
1.0 KiB
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace UseCases
|
|
{
|
|
public partial class EditActor : Form
|
|
{
|
|
public EditActor()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public EditActor(String name)
|
|
{
|
|
ActorName = name;
|
|
InitializeComponent();
|
|
textBox1.Text = name;
|
|
}
|
|
|
|
public String ActorName { get; private set; }
|
|
|
|
private void EditActor_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void btOk_Click(object sender, EventArgs e)
|
|
{
|
|
if (textBox1.Text == "")
|
|
{
|
|
if (
|
|
MessageBox.Show("Are you sure you want to remove this actor?", "Are you sure?",
|
|
MessageBoxButtons.YesNo) != DialogResult.Yes)
|
|
{
|
|
return;//if the user doesn't want to remove actor cancel
|
|
}
|
|
}
|
|
ActorName = textBox1.Text;
|
|
DialogResult = DialogResult.OK;
|
|
Close();
|
|
}
|
|
}
|
|
}
|