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

            if (activeElement == null)
            {
                return;
            }

            var dialog = new AddEditType(activeElement);

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

            dialog.FormClosed += delegate(object closedSender, FormClosedEventArgs closedE)
            {
                SyncData();
            };
        }
示例#2
0
        private void addActive_Click(object sender, EventArgs e)
        {
            var type   = new ActiveType();
            var dialog = new AddEditType(type);

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

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

                if (!Program.m_activeTypes.Contains(type))
                {
                    Program.m_activeTypes.Add(type);
                }

                SyncData();
            };
        }