Initial Commit
This commit is contained in:
43
UseCases/EditActor.cs
Normal file
43
UseCases/EditActor.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user