private void ProjectCanvas_EndpointSelected(object sender, DataEndPoint endpoint) { if (State == OverviewState.Normal) { OpenEndpoint(endpoint); } else if (State == OverviewState.AddingMapping) { if (mappingCreationSelectedEndpoint == null) { mappingCreationSelectedEndpoint = projectCanvas.HighlightEndpoint = endpoint; projectCanvas.Prompt = "Select endpoint to map TO"; } else { if (endpoint == mappingCreationSelectedEndpoint) { return; } var mapping = CreateAndAddMapping(mappingCreationSelectedEndpoint, endpoint, "New mapping"); mappingCreationSelectedEndpoint = projectCanvas.HighlightEndpoint = null; projectCanvas.Prompt = null; OpenMapping(mapping); } } }
public ClientHandle(int id) { dataEndPoint = new DataEndPoint(); connectionEndPoint = new ConnectionEndPoint(); this.id = id; socket = null; }
public void RemoveEndPoint(DataEndPoint endPoint) { var didRemove = CurrentProject.EndPoints.Remove(endPoint); if (didRemove) { HasChanges = true; } }
public void AddEndPoint(DataEndPoint endPoint) { if (CurrentProject.EndPoints.Contains(endPoint)) { return; } CurrentProject.EndPoints.Add(endPoint); HasChanges = true; }
private Mapping CreateAndAddMapping(DataEndPoint source, DataEndPoint destination, string name) { Mapping mapping = new Mapping(); mapping.Name = name; mapping.Source = source.PopulateCollections(mapping).First(); mapping.Destination = destination.PopulateCollections(mapping).First(); ProjectService.AddMapping(mapping); projectCanvas.AddMapping(mapping); return(mapping); }
private void OpenEndpoint(DataEndPoint endpoint) { var editor = new EndpointEditor(endpoint); NavigationService.Navigate(editor); }
private void OverviewRibbon_MappingCancelled(object sender, EventArgs e) { mappingCreationSelectedEndpoint = projectCanvas.HighlightEndpoint = null; projectCanvas.Prompt = null; }
public EndpointEditor(DataEndPoint endPoint) { InitializeComponent(); EndPoint = endPoint; DataContext = endPoint; }