コード例 #1
0
        private void SaveClassProperties()
        {
            _descriptor.Properties.Clear();

            foreach (ListViewItem item in listView1.Items)
            {
                ActiveRecordPropertyDescriptor prop = item.Tag as ActiveRecordPropertyDescriptor;

                if (_parent != null && _parent.Properties.Contains(prop))
                {
                    // This is important as modification here
                    // wont affect the property descriptor on the parent
                    prop = (ActiveRecordPropertyDescriptor)prop.Clone();
                }

                _descriptor.Properties.Add(prop);

                prop.Generate = item.Checked;
            }
        }