Exemple #1
0
        private void editActive_Click(object sender, EventArgs e)
        {
            var activeElement = CurrentElement;

            if (activeElement == null)
            {
                return;
            }

            var dialog = new AddEditActive(activeElement);

            dialog.Owner = this;
            dialog.Show();

            dialog.FormClosed += delegate(object closedSender, FormClosedEventArgs closedE)
            {
                SyncData();
            };
        }
Exemple #2
0
        private void addActive_Click(object sender, EventArgs e)
        {
            var active = new Active();
            var dialog = new AddEditActive(active);

            dialog.Owner = this;
            dialog.Show();

            dialog.FormClosed += delegate(object senderClosed, FormClosedEventArgs eClosed)
            {
                if (!dialog.IsSuccess)
                {
                    return;
                }

                if (!actives.Contains(active))
                {
                    actives.Add(active);
                }

                SyncData();
            };
        }