Beispiel #1
0
        private void ActorAdd_Click(object sender, EventArgs e)
        {
            var ff = new AddActorForm(data);

            if (ff.ShowDialog(this) == DialogResult.OK)
            {
                data.Actors[ff.Actor.Id] = ff.Actor;
                listBox1.Items.Add(ff.Actor);
            }
        }
Beispiel #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            var ff = new AddActorForm(data);

            if (ff.ShowDialog(this) == DialogResult.OK)
            {
                data.Actors[ff.Actor.Id]      = ff.Actor;
                dataBindingSource1.DataSource = data.Actors.Select(x => x.Value).ToList();
                comboBox1.DataSource          = dataBindingSource1.DataSource;
            }
        }