예제 #1
0
        public void AddConditions()
        {
            using var dialog = new AddConditionDialog(Module, null);
            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            var newItem = dialog.Item;

            SelectedItem.Conditions.Add(newItem);
        }
예제 #2
0
        private void BtnEditClick(object sender, EventArgs e)
        {
            var listViewItem = ((ConditionListViewItem)lvConditions.SelectedItems[0]);
            var dialog       = new AddConditionDialog(ServiceProvider, listViewItem.Item);

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            listViewItem.Update();
            InformChanges();
        }
예제 #3
0
        private void BtnAddClick(object sender, EventArgs e)
        {
            using (var dialog = new AddConditionDialog(ServiceProvider, null))
            {
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                var newItem = dialog.Item;
                Rule.Conditions.Add(newItem);
                var listViewItem = new ConditionListViewItem(newItem);
                lvConditions.Items.Add(listViewItem);
                listViewItem.Selected = true;
            }
            InformChanges();
        }