ShowDialog() public method

public ShowDialog ( IInterfaceImplementer implementer ) : DialogResult
implementer IInterfaceImplementer
return DialogResult
Esempio n. 1
0
 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);
             }
         }
     }
 }
Esempio n. 2
0
		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);
							}
						}
					}
				}
			}
		}
Esempio n. 3
0
		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);
					}
				}
			}
		}