Exemplo n.º 1
0
 public CreatePipleList(CreatePipleListController controller)
 {
     InitializeComponent();
     _controller = controller;
     ShowPipleList();
     UpdateForm += OnUpdateForm;
 }
Exemplo n.º 2
0
        private void buttonChangeListPiple_Click(object sender, EventArgs e)
        {
            if (_controller.PipleList == null)
            {
                _controller.PipleList = new List <string>();
            }

            var             newCreatePipleController = new CreatePipleListController(_controller.PipleList);
            CreatePipleList formPipleList            = new CreatePipleList(newCreatePipleController);

            if (formPipleList.ShowDialog() == DialogResult.OK)
            {
                var newPipleList = newCreatePipleController.PipleList;
                _controller.PipleList = newPipleList;
                foreach (var piple in newPipleList)
                {
                    listBoxPiple.Items.Add(piple);
                }
            }
            UpdateForm?.Invoke(this, e);
        }