コード例 #1
0
        private void C_FilterList_DoubleClick(object sender, System.EventArgs e)
        {
            if (this.C_FilterList.SelectedNode == null)
            {
                return;
            }

            if (this.cmbAttribute.SelectedIndex > 0)
            {
                Webb.Utilities.MessageBoxEx.ShowError("Can not edit advantage filters!");

                return;
            }

            SectionFilter scFilter = this.C_FilterList.SelectedNode.Tag as SectionFilter;

            if (scFilter == null)
            {
                return;
            }

            SectionFilter editFilter = new SectionFilter();

            editFilter.Apply(scFilter);

            PropertyForm _PropertyForm = new PropertyForm();

            string strOldName = editFilter.FilterName;

            string oldinnerFilterName = editFilter.Filter.Name;

            _PropertyForm.BindProperty(editFilter);

            if (_PropertyForm.ShowDialog(this) == DialogResult.OK)
            {
                if (strOldName != editFilter.FilterName)
                {
                    bool exist = this.Contains(editFilter.FilterName);

                    if (exist)
                    {
                        Webb.Utilities.MessageBoxEx.ShowError("FilterName'" + editFilter.FilterName + "' has been exist in thes filters!");
                        return;
                    }
                    else
                    {
                        this.UpdateScFilters(strOldName, editFilter);
                    }
                }
                else
                {
                    this.UpdateScFilters(strOldName, editFilter);
                }
            }
        }