public ShowDialog ( IInterfaceImplementer implementer ) : DialogResult | ||
implementer | IInterfaceImplementer | |
return | DialogResult |
private void toolImplementList_Click(object sender, EventArgs e) { if (parent is IInterfaceImplementer) { using (ImplementDialog dialog = new ImplementDialog( )) { if (dialog.ShowDialog(parent as IInterfaceImplementer) == DialogResult.OK) { foreach (Operation operation in dialog.GetSelectedOperations( )) { Implement(( IInterfaceImplementer )parent, operation, dialog.ImplementExplicitly); } OnContentsChanged(EventArgs.Empty); } } } }
private void toolImplementList_Click(object sender, EventArgs e) { IInterfaceImplementer type = shape.CompositeType as IInterfaceImplementer; if (type != null) { using (ImplementDialog dialog = new ImplementDialog()) { if (dialog.ShowDialog(type) == DialogResult.OK) { foreach (Operation operation in dialog.GetSelectedOperations()) { Operation defined = type.GetDefinedOperation(operation); bool implementExplicitly = dialog.ImplementExplicitly && type.Language.SupportsExplicitImplementation; if (defined == null) { type.Implement(operation, implementExplicitly); } else if (defined.Type != operation.Type) { type.Implement(operation, true); } } } } } }
private void toolImplementList_Click(object sender, EventArgs e) { if (parent is IInterfaceImplementer) { using (ImplementDialog dialog = new ImplementDialog()) { if (dialog.ShowDialog(parent as IInterfaceImplementer) == DialogResult.OK) { foreach (Operation operation in dialog.GetSelectedOperations()) { Implement((IInterfaceImplementer) parent, operation, dialog.ImplementExplicitly); } OnContentsChanged(EventArgs.Empty); } } } }