public GObject Create() { GObject obj = null; switch (type.GeomType) { case GeomType.Point: obj = new GPoint(type, Points[0]); break; case GeomType.Caption: obj = new GCaption(type, Points[0]); break; case GeomType.Polyline: obj = new GPolyline(type, Points); break; case GeomType.Polygon: obj = new GPolygon(type, Points); break; } if (obj != null) { app.ShowProperties(obj); } app.Lib.Selection.Clear(); app.CheckRepaint(this); app.UpdateControls(); return(obj); }
void MoveUp() { try { if (!CanMoveUp) { return; } TreeNode node = this.SelectedNode; TreeNode prevNode = node.PrevNode; GType type = (GType)node.Tag; GType prevType = (GType)prevNode.Tag; node.Remove(); prevNode.Parent.Nodes.Insert(prevNode.Index, node); this.tvTypes.SelectedNode = node; int priority = type.Priority; type.Priority = prevType.Priority; prevType.Priority = priority; if (app.GetControlsAttr(ControlsAttr.AutoSave)) { using (Context context = Lib.GetContext()) { type.Save(context); prevType.Save(context); } } if (OnTypeMoved != null) { OnTypeMoved(this, new TypeEventArgs(type)); } } catch (Exception ex) { Log.Exception(ex); } finally { app.UpdateControls(); } }
public void ScaleUp() { Map.ScaleUp(); app.UpdateControls(); Repaint(); }