protected override IProperty Clone() { IPropertyUriFileOrPathImpl result = new IPropertyUriFileOrPathImpl(_Caption, _Name, _Owner, _Domain.Constraint, _AttributeTarget, _AttributeRequirement, _DomainType); result.Extension = _Extension; result.Filter = _Filter; result.Value = Value; result.Group = _Group; return(result); }
void btn_Click(object sender, EventArgs e) { Button btn = sender as Button; if (btn.Tag != null) { IPropertyUriFileOrPathImpl pa = btn.Tag as IPropertyUriFileOrPathImpl; openFileDialog1.DefaultExt = pa.Extension; openFileDialog1.Filter = pa.Filter; openFileDialog1.Title = pa.Caption; openFileDialog1.FileName = (pa as IProperty).Value; if (openFileDialog1.ShowDialog() == DialogResult.OK) { (pa as IProperty).Value = openFileDialog1.FileName; AttributeControlMapping[pa].Text = (pa as IProperty).Value; } } //if (btn.Tag != null) }