Пример #1
0
 private bool P2PCommand(List <string> list)
 {
     if (list.Count > 0)
     {
         List <SyncType> syncTypes = new List <SyncType>();
         foreach (var option in list)
         {
             SyncType syncType;
             if (SyncType.TryParse(option, out syncType))
             {
                 syncTypes.Add(syncType);
             }
         }
         if (syncTypes.Count > 0)
         {
             GwupeClientAppContext.CurrentAppContext.SettingsManager.SyncTypes = syncTypes;
             LogSystemMessage("P2P is now set to " + String.Join(", ", syncTypes));
             return(true);
         }
     }
     LogSystemMessage("Usage: /P2P [<Internal|External|Facilitator|All>]");
     return(true);
 }