/// <summary> /// Creates a new object that is a copy of the current instance. /// </summary> /// <returns>A new object that is a copy of this instance.</returns> public object Clone() { DisplaySettings ds = new DisplaySettings(); ds.Top = this.Top; ds.Left = this.Left; ds.TabName = this.TabName; return ds; }
/// <summary> /// Creates a new object that is a copy of the current instance. /// </summary> /// <returns>A new object that is a copy of this instance.</returns> public object Clone() { DisplaySettings ds = new DisplaySettings(); ds.Top = this.Top; ds.Left = this.Left; ds.TabName = this.TabName; return(ds); }
/// <summary> /// Handles the marker events. /// </summary> /// <param name="context">Parsed event context.</param> private void HandleMarkerEvent(NameValueCollection context) { Shape shape = VisioUtils.GetShape(_application, context); if (shape == null) { return; } string shapeName = VisioUtils.GetProperty(shape, "User", "Midgard"); if (shapeName == null) { // se for um visio desenhado com a versão antiga (sem os layers) shapeName = VisioUtils.GetShapeType(shape); if (shapeName == null) { return; } } string command = context["cmd"]; if (command == null) { return; } /* * */ string mode = "live";// GetMode(); using (XmlForm form = new XmlForm()) { form.LoadDefinition(shapeName, shape); form.Design(mode, Application.ActivePage); IShapeHandler shapeHandler = (IShapeHandler)form.Tag; DisplaySettings newSettings = shapeHandler.Execute(command, context, _displaySettings, _forceFormChange); if (newSettings != null) { _displaySettings = newSettings; } } }
/// <summary> /// Initialize a new instance of the EventSink class. /// </summary> /// <param name="application">Reference to current Visio instance.</param> public EventSink(VisioApplication application) { _application = application; _events = new ArrayList(); _displaySettings = new DisplaySettings(); }
/// <summary> /// Handles the marker events. /// </summary> /// <param name="context">Parsed event context.</param> private void HandleMarkerEvent(NameValueCollection context) { Shape shape = VisioUtils.GetShape(_application, context); if (shape == null) return; string shapeName = VisioUtils.GetProperty(shape, "User", "Midgard"); if (shapeName == null) { // se for um visio desenhado com a versão antiga (sem os layers) shapeName = VisioUtils.GetShapeType(shape); if (shapeName == null) return; } string command = context["cmd"]; if (command == null) return; /* * */ string mode = "live";// GetMode(); using (XmlForm form = new XmlForm()) { form.LoadDefinition(shapeName, shape); form.Design(mode, Application.ActivePage); IShapeHandler shapeHandler = (IShapeHandler)form.Tag; DisplaySettings newSettings = shapeHandler.Execute(command, context, _displaySettings, _forceFormChange); if (newSettings != null) _displaySettings = newSettings; } }