Exemplo n.º 1
0
        public FormProperty()
        {
            InitializeComponent();

            buttonRemoveProperty.Click += (s, e) => RemoveProperty.RaiseEventEx(this);

            tbType.TextChanged += (s, e) =>
            {
                DatatypeChanged.RaiseEventEx(this);
                validationPropertyGrid1.SetAvailableOptions(
                    ValidationOptions.GetApplicableValidationOptionsForType(tbType.Text));
            };
            tbName.TextChanged             += (s, e) => PropertyNameChanged.RaiseEventEx(this);
            cbReadOnly.CheckedChanged      += (s, e) => ReadOnlyChanged.RaiseEventEx(this);
            cbIsKeyProperty.CheckedChanged += (s, e) => IsKeyChanged.RaiseEventEx(this);

            tbType.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            tbType.AutoCompleteSource = AutoCompleteSource.CustomSource;
            var collection = new AutoCompleteStringCollection();

            collection.AddRange(SQLServer.CLRTypeList.ToArray());
            tbType.AutoCompleteCustomSource = collection;
        }
Exemplo n.º 2
0
        private void buttonDeleteProperty_Click(object sender, EventArgs e)
        {
            var selectedProperty = listBoxProperties.GetSelectedItem <Property>();

            RemoveProperty.RaiseEventEx(this, new GenericEventArgs <Property>(selectedProperty));
        }