コード例 #1
0
        private void addEditFilterButton_Click(object sender, EventArgs e)
        {
            FilterEditorPopup popup = new FilterEditorPopup();

            popup.FilterEditorPanel.FieldDisplaySettings = FieldDisplaySettings;
            popup.FilterEditorPanel.DisplayName          = DisplayName;
            popup.FilterEditorPanel.DBManager            = DBManager;
            popup.ShowHelpButton = ShowFilterHelpButton;
            popup.HelpAction     = FilterHelpAction;

            DBFilter <T> filter = _node.Filter;

            if (filter == null)
            {
                filter      = new DBFilter <T>();
                filter.Name = _node.Name;
            }

            popup.FilterEditorPanel.AttachedFilter = filter;
            popup.ShowDialog();

            if (_node.Filter == null)
            {
                _node.Filter = filter;
            }
            else
            {
                _node.OnModified();
            }

            PopulateControls();
        }