Exemple #1
0
 public void Drop(IDropInfo dropInfo)
 {
     if (dropInfo.Data is FilteredConnectablesGroup group && group.Scope is IConnectable)
     {
         IConnectable connectable         = group.Scope as IConnectable;
         var          compatibleProtocols = SelectedController.CompatibleProtocols(connectable).Distinct().ToList();
         if (compatibleProtocols.Count == 1)
         {
             var connection = SelectedController.Connect(connectable, compatibleProtocols.First());
             connection.Length        = this.DefaultWireLength;
             connection.ConduitType   = this.DefaultConduitType;
             connection.ConduitLength = this.DefaultConduitLength;
             connection.IsPlenum      = this.DefaultPlenum;
         }
         else
         {
             SelectionNeeded     = true;
             CompatibleProtocols = compatibleProtocols;
         }
     }
Exemple #2
0
 private void selectProtocolExecute()
 {
     SelectedController.Connect(SelectedConnectable, SelectedProtocol);
     cancelProtocolSelectionExecute();
 }