Ejemplo n.º 1
0
Archivo: Feature.cs Proyecto: dbeti/GPS
 public Feature(string name, GraphObject graphObject,
                FeatureType featureType, string description = "")
 {
     Name = name;
     GraphObject = graphObject;
     FeatureType = featureType;
     Description = description;
 }
Ejemplo n.º 2
0
 public void HighlightAsSelected(GraphObject graphObject)
 {
     if (graphObject != null)
     {
         specialHighlight[graphObject] = displayProps.SelectedPen;
         Refresh();
     }
 }
Ejemplo n.º 3
0
 public void RemoveHighlight(GraphObject graphObject)
 {
     if (graphObject != null &&
         specialHighlight.ContainsKey(graphObject))
     {
         specialHighlight.Remove(graphObject);
         Refresh();
     }
 }
Ejemplo n.º 4
0
 public void ProcessGraphClick(GraphMouseEventArgs args)
 {
     parent.graphContainer.RemoveHighlight(selected);
     selected = args.GraphObject;
     if (selected != null)
     {
         parent.infoSplit.Panel2Collapsed = false;
         parent.graphObjectEditor.GraphObject = selected;
         parent.graphContainer.HighlightAsSelected(selected);
     }
     else
     {
         parent.infoSplit.Panel2Collapsed = true;
     }
 }
Ejemplo n.º 5
0
 public void Cleanup()
 {
     parent.graphContainer.RemoveHighlight(selected);
     selected = null;
 }
Ejemplo n.º 6
0
 public GraphMouseEventArgs(MouseEventArgs args, GraphObject obj)
     : base(args.Button, args.Clicks, args.X, args.Y, args.Delta)
 {
     GraphObject = obj;
 }
Ejemplo n.º 7
0
 public GraphObjectEventArgs(
     GraphObject graphObject,
     ChangeKind changeKind)
 {
     GraphObject = graphObject;
     ChangeKind = changeKind;
 }
Ejemplo n.º 8
0
 private void deleteButton_Click(object sender, EventArgs e)
 {
     if (graphObject.GraphObjectId != 0)
     {
         specificsEditor.removeObject();
         DbContext.SaveChanges();
         GraphObject = new Node();
         OnGraphObjectUpdated(new GraphObjectEventArgs(
             graphObject, ChangeKind.Deleted));
     }
 }
Ejemplo n.º 9
0
 public void VisitGraphObject(GraphObject graphObject)
 {
     throw new ArgumentException("Cannot draw a basic GraphObject");
 }