181 |
exUndo, An Undo operation is performed (CTR + Z), exRedo, A Redo operation is performed (CTR + Y). exUndoRedoUpdate, The Undo/Redo queue is updated
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value case (default:value;32:`exUndoRedoUpdate`;33:`exUndo`;34:`exRedo`)",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value case (default:value;32:`exUndoRedoUpdate`;33:`exUndo`;34:`exRedo`)",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Press CTRL+Z to Undo, CTRL+Y to Redo" ); |
180 |
exLinkObjects, the user creates an element on the surface. The AllowLinkObjects property specifies the keys combination to allow user to link elements on the surface
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 9 ? `exLinkObjects` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 9 ? `exLinkObjects` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); var_Elements.Add("Node <b>3",64,-64); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Hold SHIFT, click an element, and drag to another element to create a link between them" ); |
179 |
exEditObject, the user edits the element's caption
// Click event - Occurs when the user presses and then releases the left mouse button over the control. private void axSurface1_ClickEvent(object sender, EventArgs e) { // ElementFromPoint(-1,-1).Edit(0) } //this.axSurface1.ClickEvent += new EventHandler(this.axSurface1_ClickEvent); // LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 8 ? `exEditObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 8 ? `exEditObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Click an element to edit its caption" ); |
178 |
exCreateObject, the user creates an element on the surface. The AllowCreateObject property specifies the keys combination to allow user to create elements on the surface
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 7 ? `exCreateObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 7 ? `exCreateObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null).Selected = true; var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Double-click on the surface and immediately drag to a new position to create an element" ); |
177 |
exSelectNothing, the user clicks an empty zone of the surface. The AllowSelectNothing property specifies the keys combination to allow user to select nothing on the surface
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 6 ? `exSelectNothing` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 6 ? `exSelectNothing` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowSelectNothing = true; axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null).Selected = true; var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Select an element, and then click outside to select nothing" ); |
176 |
exSelectObject, the user clicks the object to get it selected. The AllowSelectObject property specifies the keys combination to allow user to select the object
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 5 ? `exSelectObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 5 ? `exSelectObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Hold ALT and click, then drag to select elements within the drawn rectangle. Click an element to select it. CTRL + CLick to uns" + "elect it" ); |
175 |
exMoveObject, the user moves the object. The AllowMoveObject property specifies the keys combination to allow user to move the object
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 4 ? `exMoveObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 4 ? `exMoveObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Move an element" ); |
174 |
exResizeObject, the user resizes the object. The AllowResizeObject property specifies the keys combination to allow user to resize the object
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 3 ? `exResizeObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 3 ? `exResizeObject` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64).AutoSize = false; var_Elements.Add("Node <b>2",null,null).AutoSize = false; var_Elements.Add("Node <b>3",64,-64).AutoSize = false; axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Resize an element" ); |
173 |
exSurfaceHome, the user clicks the Home button on the control's toolbar, so the surface is restored to original position. The Home method has the same effect
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 2 ? `exSurfaceHome` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 2 ? `exSurfaceHome` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Click the Home button" ); |
172 |
exSurfaceZoom, the user magnifies or shrinks the surface. The AllowZoomSurface property specifies the keys combination to allow user to zoom the surface
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 1 ? `exSurfaceZoom` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 1 ? `exSurfaceZoom` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Click and drag the surface to reposition it" ); |
171 |
exSurfaceMove, the user scrolls or moves the surface. The AllowMoveSurface property specifies the keys combination to allow user to move / scroll the surface
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 0 ? `exSurfaceMove` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( axSurface1.FormatABC("value = 0 ? `exSurfaceMove` : value",e.operation,null,null).ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); System.Diagnostics.Debug.Print( "Click and drag the surface to reposition it" ); |
170 |
FormatABC method formats the A,B,C values based on the giving expression and returns the result
System.Diagnostics.Debug.Print( axSurface1.FormatABC("value format ``",1000,null,null).ToString() ); |
169 |
FreezeEvents(Freeze) method prevents firing any event. For instance, FreezeEvents(True) freezes the control's events, no no event is fired, until the FreezeEvents(False) is called
// Event event - Notifies the application once the control fires an event. private void axSurface1_Event(object sender, AxEXSURFACELib._ISurfaceEvents_EventEvent e) { System.Diagnostics.Debug.Print( axSurface1.get_EventParam(-2).ToString() ); } //this.axSurface1.Event += new AxEXSURFACELib._ISurfaceEvents_EventEventHandler(this.axSurface1_Event); axSurface1.FreezeEvents(true); System.Diagnostics.Debug.Print( "No event is fired after FreezeEvents(True) call" ); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); |
168 |
The exAllowChangeFrom(0x20)/exAllowChangeTo(0x40) flag of LinkControlPointEnum type allows the user to adjust the link's from/to element by dragging and dropping the start control point (requires the exStartControlPoint/exEndControlPoint flag)
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); System.Diagnostics.Debug.Print( axSurface1.FocusLink.ID.ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); System.Diagnostics.Debug.Print( axSurface1.FocusLink.ID.ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); var_Elements.Add("Node <b>3",64,-64); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.FocusLink = "L1"; axSurface1.EndUpdate(); |
167 |
The LayoutStartChanging(exFocusLink)/LayoutEndChanging(exFocusLink) event notifies your application when the user focuses on a new link
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); System.Diagnostics.Debug.Print( axSurface1.FocusLink.ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); System.Diagnostics.Debug.Print( axSurface1.FocusLink.ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.EndUpdate(); |
166 |
Focus a link
// LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); // LayoutStartChanging event - Occurs when the control's layout is about to be changed. private void axSurface1_LayoutStartChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutStartChanging" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); } //this.axSurface1.LayoutStartChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutStartChangingEventHandler(this.axSurface1_LayoutStartChanging); axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Node <b>1",-64,-64); var_Elements.Add("Node <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],"L1"); axSurface1.FocusLink = "L1"; axSurface1.EndUpdate(); |
165 |
The caption is displayed on the back, so the picture overrides it. How can I place the caption on the foreground
|
164 |
Draws a frame arround the link's arrow
|
163 |
Draws a frame arround the arrow for all links
|
162 |
Change the size to display the arrow of the link
|
161 |
Change the size to display the arrows for all links
|
160 |
Extends the caption on the element's width
|
159 |
Gets the width/height of the element to fit its content ( as if the AutoSize property is True )
// AnchorClick event - Occurs when an anchor element is clicked. private void axSurface1_AnchorClick(object sender, AxEXSURFACELib._ISurfaceEvents_AnchorClickEvent e) { EXSURFACELib.Element var_Element = axSurface1.Elements["Account"]; var_Element.Height = var_Element.AutoHeight; } //this.axSurface1.AnchorClick += new AxEXSURFACELib._ISurfaceEvents_AnchorClickEventHandler(this.axSurface1_AnchorClick); EXSURFACELib.Element var_Element = axSurface1.Elements.Add("<solidline> <c><b>Bank Account</b></solidline><br>+ owner: String <r><a 1;e64=gA8ABzABvABsABpABkg8JABuABlAAgAA4AAwisXjMYH0TAECM" + "YAjsCMwAM4AkMGhEGOUei0Yl8bkQAOAAlsGmsSlp0h0SgkCF8DgsNhUMhEKiESkYAoMlk8phssmcCltLMNTAFOlFDlc2l0amMxjomAAjAA5AA2tMaHcfplZk1blVDqtu" + "oNXjoAAEBA=>▲</a><br><solidline>+ balance: Currency = 0</solidline><br>+ deposit(amount: Currency)<r><a 2;e64=gA8ABjAA+AEC" + "MwAM8DABvABshoAOQAEAAHAAGEWjEajMGNoAMoAOgANERMgAOcHAAvAEJhcEh0Qh0Tg0CmkqMMFlUuhkxiMTisXjNCjk6EwAEYAHIAG1MjY7lUsnkwh8/nUClk5gwAAE" + "BA==>▲</a><br>+ withdraw(amount: Currency)",null,null); var_Element.ID = "Account"; var_Element.X = -128; var_Element.CaptionSingleLine = EXSURFACELib.CaptionSingleLineEnum.exCaptionBreakWrap; var_Element.AutoSize = false; var_Element.Width = 256; var_Element.Height = var_Element.AutoHeight; var_Element.CaptionAlign = (EXSURFACELib.ContentAlignmentEnum)0x4; |
158 |
Expandable-caption
// AnchorClick event - Occurs when an anchor element is clicked. private void axSurface1_AnchorClick(object sender, AxEXSURFACELib._ISurfaceEvents_AnchorClickEvent e) { System.Diagnostics.Debug.Print( e.anchorID.ToString() ); } //this.axSurface1.AnchorClick += new AxEXSURFACELib._ISurfaceEvents_AnchorClickEventHandler(this.axSurface1_AnchorClick); EXSURFACELib.Element var_Element = axSurface1.Elements.Add("<solidline> <c><b>Bank Account</b></solidline><br>+ owner: String <r><a 1;e64=gA8ABzABvABsABpABkg8JABuABlAAgAA4AAwisXjMYH0TAECM" + "YAjsCMwAM4AkMGhEGOUei0Yl8bkQAOAAlsGmsSlp0h0SgkCF8DgsNhUMhEKiESkYAoMlk8phssmcCltLMNTAFOlFDlc2l0amMxjomAAjAA5AA2tMaHcfplZk1blVDqtu" + "oNXjoAAEBA=>▲</a><br><solidline>+ balance: Currency = 0</solidline><br>+ deposit(amount: Currency)<r><a 2;e64=gA8ABjAA+AEC" + "MwAM8DABvABshoAOQAEAAHAAGEWjEajMGNoAMoAOgANERMgAOcHAAvAEJhcEh0Qh0Tg0CmkqMMFlUuhkxiMTisXjNCjk6EwAEYAHIAG1MjY7lUsnkwh8/nUClk5gwAAE" + "BA==>▲</a><br>+ withdraw(amount: Currency)",null,null); var_Element.ID = "Account"; var_Element.X = -256; var_Element.Y = -164; var_Element.CaptionSingleLine = EXSURFACELib.CaptionSingleLineEnum.exCaptionBreakWrap; var_Element.CaptionAlign = (EXSURFACELib.ContentAlignmentEnum)0x4; EXSURFACELib.Element var_Element1 = axSurface1.Elements.Add("<solidline> <c><b>Person</b></solidline><br>+ name: String <r><a 1;e64=gA8ABzABvABsABpABkg8JABuABlAAgAA4AAwisXjMYH0TAECMYAjsCMw" + "AM4AkMGhEGOUei0Yl8bkQAOAAlsGmsSlp0h0SgkCF8DgsNhUMhEKiESkYAoMlk8phssmcCltLMNTAFOlFDlc2l0amMxjomAAjAA5AA2tMaHcfplZk1blVDqtuoNXjoAA" + "EBA=>▲</a><br><solidline># birth: Date</solidline><br>+ getCurrentAge(): int<r><a 2;e64=gA8ABjAA+AECMwAM8DABvABshoAOQAEAAH" + "AAGEWjEajMGNoAMoAOgANERMgAOcHAAvAEJhcEh0Qh0Tg0CmkqMMFlUuhkxiMTisXjNCjk6EwAEYAHIAG1MjY7lUsnkwh8/nUClk5gwAAEBA==>▲</a>",null,null); var_Element1.ID = "Person"; var_Element1.Y = -164; var_Element1.CaptionSingleLine = EXSURFACELib.CaptionSingleLineEnum.exCaptionBreakWrap; EXSURFACELib.Element var_Element2 = axSurface1.Elements.Add("<solidline> <c><b>Student</b></solidline><br><solidline>+ classes: List<Course> <r><a 1;e64=gA8ABzABvABsABpABkg8JABuABlAA+AAgAE" + "CMcTi4AMwAM4AjMGhEGOUVAA4AAwk8plcqihwAElg0wiUlOkOiUEgQvgcFhsKhkIhUQiUUnccj0gn0jmMagUlowAMNOpEfkMNkkmlEqrctjQmAAjAA5AA2sssHcbnkdq" + "1Ln1QtVSjQAAEBA==>▲</a></solidline><br>- attend(class: Course)<r><a 2;e64=gA8ABjAA+AECMwAM8DABvABshoAOQAEAAHAAGEWjEajMGNoA" + "MoAOgANERMgAOcHAAvAEJhcEh0Qh0Tg0CmkqMMFlUuhkxiMTisXjNCjk6EwAEYAHIAG1MjY7lUsnkwh8/nUClk5gwAAEBA==>▲</a><br>- sleep()",null,null); var_Element2.ID = "Student"; var_Element2.Y = -64; var_Element2.CaptionSingleLine = EXSURFACELib.CaptionSingleLineEnum.exCaptionBreakWrap; EXSURFACELib.Link var_Link = axSurface1.Links.Add(axSurface1.Elements["Account"],axSurface1.Elements["Student"],null); var_Link.Caption = "<fgcolor A0A0A0><solidline 808080> <c><b>Link</b></solidline><br># count: number <r><a ;exp=12992>➤</a>"; |
157 |
Expandable-caption
|
156 |
Fullfit the caption on the element's width
|
155 |
Wrap the caption by <br> or "\r\n" sequence only
|
154 |
Display a custom tooltip
|
153 |
Shows the tooltip of the object moved relative to its default position
|
152 |
Rename Undo/Redo commands into the control's toolbar
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; axSurface1.ToolBarFormat = "-1,100,101,|,103,104"; axSurface1.set_ToolBarCaption(100,"<img>1</img>Acasa"); axSurface1.set_ToolBarCaption(103,"Anuleaza <img>3</img>"); axSurface1.set_ToolBarCaption(104,"<img>4</img>Reface"); axSurface1.set_ToolBarToolTip(100,"Restabileste vizualizarea la origine."); axSurface1.set_ToolBarToolTip(101,"Mareste vizualizarea."); axSurface1.set_ToolBarToolTip(103,"Anuleaza ultima actiune UI. Pentru a anula o actiune apasati Ctrl+Z."); axSurface1.set_ToolBarToolTip(104,"Inverseaza cea mai recenta operatie de anulare. Pentru a reface o actiune apasati Ctrl+Y."); EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-48); var_Elements.Add("Item <b>2",32,32); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); axSurface1.EndUpdate(); |
151 |
Add Undo/Redo commands to control's toolbar
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; axSurface1.ToolBarFormat = "-1,100,101,|,103,104"; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-48); var_Elements.Add("Item <b>2",32,32); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); axSurface1.EndUpdate(); |
150 |
Clear Undo/Redo queue (method 2)
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); int c = axSurface1.UndoRedoQueueLength; axSurface1.UndoRedoQueueLength = 0; axSurface1.UndoRedoQueueLength = c; System.Diagnostics.Debug.Print( axSurface1.get_UndoListAction(null,null) ); axSurface1.EndUpdate(); |
149 |
Clear Undo/Redo queue (method 1)
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); axSurface1.AllowUndoRedo = true; System.Diagnostics.Debug.Print( axSurface1.get_UndoListAction(null,null) ); axSurface1.EndUpdate(); |
148 |
Removes Redo operations
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); axSurface1.Undo(); axSurface1.RedoRemoveAction(10,null); System.Diagnostics.Debug.Print( axSurface1.get_RedoListAction(null,null) ); axSurface1.EndUpdate(); |
147 |
Removes Undo operations
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); axSurface1.UndoRemoveAction(10,null); System.Diagnostics.Debug.Print( axSurface1.get_UndoListAction(null,null) ); axSurface1.EndUpdate(); |
146 |
Record the UI operations as a block of undo/redo operations
|
145 |
Groups the next to current Undo/Redo Actions in a single block
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); axSurface1.GroupUndoRedoActions(3); System.Diagnostics.Debug.Print( axSurface1.get_UndoListAction(null,null) ); axSurface1.EndUpdate(); |
144 |
Limits the number of entries within the Undo/Redo queue
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; axSurface1.UndoRedoQueueLength = 1; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); System.Diagnostics.Debug.Print( axSurface1.get_UndoListAction(null,null) ); axSurface1.EndUpdate(); |
143 |
Lists the Redo actions that can be performed on the surface
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); axSurface1.Undo(); System.Diagnostics.Debug.Print( axSurface1.get_RedoListAction(null,null) ); axSurface1.EndUpdate(); |
142 |
Lists the Undo actions that can be performed on the surface
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); System.Diagnostics.Debug.Print( axSurface1.get_UndoListAction(null,null) ); axSurface1.EndUpdate(); |
141 |
Checks whether the Undo operation is possible
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); axSurface1.Undo(); System.Diagnostics.Debug.Print( "CanRedo" ); System.Diagnostics.Debug.Print( axSurface1.CanRedo.ToString() ); axSurface1.EndUpdate(); |
140 |
Call Redo by code
|
139 |
Checks whether the Undo operation is possible
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); System.Diagnostics.Debug.Print( "CanUndo" ); System.Diagnostics.Debug.Print( axSurface1.CanUndo.ToString() ); axSurface1.EndUpdate(); |
138 |
Call Undo by code
|
137 |
Save the element's properties for Undo/Redo operations, by code
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Item <b>1",-64,-64); var_Elements.Add("Item <b>2",null,null); axSurface1.StartBlockUndoRedo(); EXSURFACELib.Link var_Link = axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); int h = var_Link.StartUpdateLink; var_Link.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Link.Width = 2; var_Link.ShowDir = false; var_Link.ShowLinkType = EXSURFACELib.ShowLinkTypeEnum.exLinkStraight; var_Link.EndUpdateLink(h); axSurface1.EndBlockUndoRedo(); axSurface1.EndUpdate(); |
136 |
No color is restored for the link when Undo/Redo operation is executed
// AddElement event - A new element has been added to the surface. private void axSurface1_AddElement(object sender, AxEXSURFACELib._ISurfaceEvents_AddElementEvent e) { // Element.ShowCheckBox = True // Element.CheckBoxAlign = 2 } //this.axSurface1.AddElement += new AxEXSURFACELib._ISurfaceEvents_AddElementEventHandler(this.axSurface1_AddElement); axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Check <b>1",-64,-64); var_Elements.Add("Check <b>2",null,null).Checked = EXSURFACELib.CheckStateEnum.exChecked; axSurface1.StartBlockUndoRedo(); EXSURFACELib.Link var_Link = axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); int h = var_Link.StartUpdateLink; var_Link.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Link.Width = 2; var_Link.ShowDir = false; var_Link.ShowLinkType = EXSURFACELib.ShowLinkTypeEnum.exLinkStraight; var_Link.EndUpdateLink(h); axSurface1.EndBlockUndoRedo(); axSurface1.EndUpdate(); |
135 |
Save the element's properties for Undo/Redo operations, by code
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; axSurface1.Elements.Add("Item <b>1",-64,-64); axSurface1.StartBlockUndoRedo(); EXSURFACELib.Element var_Element = axSurface1.Elements.Add("Item <b>2",null,null); int h = var_Element.StartUpdateElement; var_Element.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,0)); var_Element.ForeColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,255)); var_Element.BorderColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Element.EndUpdateElement(h); axSurface1.EndBlockUndoRedo(); axSurface1.EndUpdate(); |
134 |
No color is restored for the element when Undo/Redo operation is executed
axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; axSurface1.Elements.Add("Item <b>1",-64,-64); axSurface1.StartBlockUndoRedo(); EXSURFACELib.Element var_Element = axSurface1.Elements.Add("Item <b>2",null,null); int h = var_Element.StartUpdateElement; var_Element.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,0)); var_Element.ForeColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,255)); var_Element.BorderColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Element.EndUpdateElement(h); axSurface1.EndBlockUndoRedo(); axSurface1.EndUpdate(); |
133 |
How can I ensure that a specified element fits the surface's visible area
|
132 |
LayoutEndChanging(exUndo), LayoutEndChanging(exRedo) or LayoutEndChanging(exUndoRedoUpdate) notifiy your application once a Undo/Redo operation is executed (CTRL+Z, CTRL+Y) or updated
// AddElement event - A new element has been added to the surface. private void axSurface1_AddElement(object sender, AxEXSURFACELib._ISurfaceEvents_AddElementEvent e) { // Element.ShowCheckBox = True // Element.CheckBoxAlign = 2 } //this.axSurface1.AddElement += new AxEXSURFACELib._ISurfaceEvents_AddElementEventHandler(this.axSurface1_AddElement); // LayoutEndChanging event - Notifies your application once the control's layout has been changed. private void axSurface1_LayoutEndChanging(object sender, AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEvent e) { System.Diagnostics.Debug.Print( "LayoutEndChanging" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); } //this.axSurface1.LayoutEndChanging += new AxEXSURFACELib._ISurfaceEvents_LayoutEndChangingEventHandler(this.axSurface1_LayoutEndChanging); axSurface1.BeginUpdate(); axSurface1.AllowUndoRedo = true; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Check <b>1",-64,-64); var_Elements.Add("Check <b>2",null,null).Checked = EXSURFACELib.CheckStateEnum.exChecked; axSurface1.Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); axSurface1.EndUpdate(); |
131 |
Turn on the Undo/Redo feature
|
130 |
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)
|
129 |
ImageSize property on 16 (default) (specifies the size of control' icons)
|
128 |
We want to have option to start/end connectors at the middle of each side of the elements
|
127 |
How can I determine the position the user clicks within the element's boundaries (Click event)
// Click event - Occurs when the user presses and then releases the left mouse button over the control. private void axSurface1_ClickEvent(object sender, EventArgs e) { Object e = (axSurface1.get_ElementFromPoint(-1,-1) as Object); string X = -1; string Y = -1; axSurface1.PointToPosition(X,Y); System.Diagnostics.Debug.Print( e.ToString() ); System.Diagnostics.Debug.Print( X.ToString() ); System.Diagnostics.Debug.Print( Y.ToString() ); } //this.axSurface1.ClickEvent += new EventHandler(this.axSurface1_ClickEvent); axSurface1.BeginUpdate(); EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element 1",null,null); var_Elements.Add("Element 2",128,64); axSurface1.FitToClient(); axSurface1.EndUpdate(); |
126 |
How can I determine the position the user clicks within the element's boundaries (MouseMove event)
// MouseMove event - Occurs when the user moves the mouse. private void axSurface1_MouseMoveEvent(object sender, AxEXSURFACELib._ISurfaceEvents_MouseMoveEvent e) { Object e = (axSurface1.get_ElementFromPoint(e.x,e.y) as Object); axSurface1.PointToPosition(e.x,e.y); System.Diagnostics.Debug.Print( e.ToString() ); System.Diagnostics.Debug.Print( e.x.ToString() ); System.Diagnostics.Debug.Print( e.y.ToString() ); } //this.axSurface1.MouseMoveEvent += new AxEXSURFACELib._ISurfaceEvents_MouseMoveEventHandler(this.axSurface1_MouseMoveEvent); axSurface1.BeginUpdate(); EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element 1",null,null); var_Elements.Add("Element 2",128,64); axSurface1.FitToClient(); axSurface1.EndUpdate(); |
125 |
How can I convert the screen position (mouse) to surface position
// MouseMove event - Occurs when the user moves the mouse. private void axSurface1_MouseMoveEvent(object sender, AxEXSURFACELib._ISurfaceEvents_MouseMoveEvent e) { System.Diagnostics.Debug.Print( "Point " ); System.Diagnostics.Debug.Print( e.x.ToString() ); System.Diagnostics.Debug.Print( e.y.ToString() ); axSurface1.PointToPosition(e.x,e.y); System.Diagnostics.Debug.Print( "Position " ); System.Diagnostics.Debug.Print( e.x.ToString() ); System.Diagnostics.Debug.Print( e.y.ToString() ); } //this.axSurface1.MouseMoveEvent += new AxEXSURFACELib._ISurfaceEvents_MouseMoveEventHandler(this.axSurface1_MouseMoveEvent); axSurface1.BeginUpdate(); EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element <sha ;;0>1",null,null); var_Elements.Add("Element <sha ;;0>2",164,64); var_Elements.Add("Element <sha ;;0>3",0,132); EXSURFACELib.Links var_Links = axSurface1.Links; var_Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); var_Links.Add(axSurface1.Elements[3],axSurface1.Elements[2],null); var_Links.Add(axSurface1.Elements[3],axSurface1.Elements[1],null); axSurface1.FitToClient(); axSurface1.AxisStyle = (EXSURFACELib.LinesStyleEnum)0xc0; axSurface1.AxisColor = Color.FromArgb(128,128,128); axSurface1.EndUpdate(); |
124 |
Is is possible to show just the positive coordinates
|
123 |
Cartesian coordinates (positive coordinates are shown top-right to the origin)
|
122 |
Default coordinates (positive coordinates are shown bottom-right to the origin)
|
121 |
Is it possible to customize the path of the links orthogonally similar with Microsoft Visio tool
|
120 |
Does your control supports OLE Drag and Drop
// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur. private void axSurface1_OLEDragDrop(object sender, AxEXSURFACELib._ISurfaceEvents_OLEDragDropEvent e) { System.Diagnostics.Debug.Print( e.data.ToString() ); } //this.axSurface1.OLEDragDrop += new AxEXSURFACELib._ISurfaceEvents_OLEDragDropEventHandler(this.axSurface1_OLEDragDrop); // OLEStartDrag event - Occurs when the OLEDrag method is called. private void axSurface1_OLEStartDrag(object sender, AxEXSURFACELib._ISurfaceEvents_OLEStartDragEvent e) { // Data.SetData("some data to drag") } //this.axSurface1.OLEStartDrag += new AxEXSURFACELib._ISurfaceEvents_OLEStartDragEventHandler(this.axSurface1_OLEStartDrag); axSurface1.OLEDropMode = EXSURFACELib.exOLEDropModeEnum.exOLEDropManual; EXSURFACELib.Element var_Element = axSurface1.Elements.Add("Click the Element wait for .5 second until + cursor is shown, to start <b>OLE Drag and Drop</b>",null,null); var_Element.CaptionSingleLine = EXSURFACELib.CaptionSingleLineEnum.exCaptionWordWrap; var_Element.AutoSize = false; var_Element.Width = 256; var_Element.Height = 56; |
119 |
Is it possible to disable customizing the path of a specified link
|
118 |
How do I let user customizes the link's path
axSurface1.BeginUpdate(); axSurface1.AllowLinkControlPoint = (EXSURFACELib.LinkControlPointEnum)0xffffff80 | EXSURFACELib.LinkControlPointEnum.exAllowChangeTo | EXSURFACELib.LinkControlPointEnum.exAllowChangeFrom | EXSURFACELib.LinkControlPointEnum.exOrthoArrange | EXSURFACELib.LinkControlPointEnum.exMiddleControlPoint | EXSURFACELib.LinkControlPointEnum.exControlPoint | EXSURFACELib.LinkControlPointEnum.exEndControlPoint | EXSURFACELib.LinkControlPointEnum.exStartControlPoint; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element <sha ;;0>A",null,null); var_Elements.Add("Element <sha ;;0>B",164,64); var_Elements.Add("Element <sha ;;0>B",0,132); EXSURFACELib.Links var_Links = axSurface1.Links; var_Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null).CustomPath = "0.5,0.25,0.5,.75"; var_Links.Add(axSurface1.Elements[3],axSurface1.Elements[2],null).CustomPath = "0.5,0.25,0.5,.75"; EXSURFACELib.Link var_Link = var_Links.Add(axSurface1.Elements[3],axSurface1.Elements[1],null); var_Link.ShowLinkType = EXSURFACELib.ShowLinkTypeEnum.exLinkStraight | EXSURFACELib.ShowLinkTypeEnum.exLinkDirect; var_Link.StartPos = EXSURFACELib.AlignmentEnum.LeftAlignment; axSurface1.Zoom = 200; axSurface1.FitToClient(); axSurface1.EndUpdate(); |
117 |
How can I generate a picture/image/graph from my diagram
EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element A",null,null).ID = "A"; var_Elements.Add("Element B",null,null).ID = "B"; var_Elements.Add("Element C",null,null).ID = "C"; var_Elements.Add("Element D",null,null).ID = "D"; var_Elements.Add("Element E",null,null).ID = "E"; var_Elements.Add("Element E",null,null).ID = "F"; EXSURFACELib.Links var_Links = axSurface1.Links; var_Links.Add(axSurface1.Elements["A"],axSurface1.Elements["B"],null); var_Links.Add(axSurface1.Elements["A"],axSurface1.Elements["C"],null); var_Links.Add(axSurface1.Elements["B"],axSurface1.Elements["D"],null); var_Links.Add(axSurface1.Elements["B"],axSurface1.Elements["C"],null); var_Links.Add(axSurface1.Elements["A"],axSurface1.Elements["E"],null); var_Links.Add(axSurface1.Elements["A"],axSurface1.Elements["F"],null); axSurface1.set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeCompact,false); axSurface1.Arrange(null); object var_CopyTo = axSurface1.get_CopyTo("c:/temp/xtest.jpg"); System.Diagnostics.Debug.Print( "!!!check the file c:/temp/xtest.jpg!!!" ); |
116 |
How can I generate a picture/image/graph from my diagram
EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element A",null,null).ID = "A"; var_Elements.Add("Element B",null,null).ID = "B"; var_Elements.Add("Element C",null,null).ID = "C"; var_Elements.Add("Element D",null,null).ID = "D"; var_Elements.Add("Element E",null,null).ID = "E"; var_Elements.Add("Element E",null,null).ID = "F"; EXSURFACELib.Links var_Links = axSurface1.Links; var_Links.Add(axSurface1.Elements["A"],axSurface1.Elements["B"],null); var_Links.Add(axSurface1.Elements["A"],axSurface1.Elements["C"],null); var_Links.Add(axSurface1.Elements["B"],axSurface1.Elements["D"],null); var_Links.Add(axSurface1.Elements["B"],axSurface1.Elements["C"],null); var_Links.Add(axSurface1.Elements["A"],axSurface1.Elements["E"],null); var_Links.Add(axSurface1.Elements["A"],axSurface1.Elements["F"],null); axSurface1.set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeCompact,false); axSurface1.Arrange(null); // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. EXPRINTLib.Print var_Print = new EXPRINTLib.Print(); var_Print.PrintExt = (axSurface1.GetOcx() as EXSURFACELib.Surface); var_Print.CopyTo("c:/temp/xtest.jpg"); System.Diagnostics.Debug.Print( "!!!check the file c:/temp/xtest.jpg!!!" ); |
115 |
How can I print the component
EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element <sha ;;0>A",null,null); var_Elements.Add("Element <sha ;;0>B",0,76); EXSURFACELib.Element var_Element = var_Elements.Add("Element <sha ;;0>C",-76,32); var_Element.AutoSize = false; var_Element.Height = 32; EXSURFACELib.Element var_Element1 = var_Elements.Add("Element <sha ;;0>D",76,32); var_Element1.AutoSize = false; var_Element1.Height = 32; EXSURFACELib.Links var_Links = axSurface1.Links; EXSURFACELib.Link var_Link = var_Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); var_Link.StartPos = EXSURFACELib.AlignmentEnum.CenterAlignment; var_Link.EndPos = EXSURFACELib.AlignmentEnum.CenterAlignment; EXSURFACELib.Link var_Link1 = var_Links.Add(axSurface1.Elements[2],axSurface1.Elements[1],null); var_Link1.StartPos = EXSURFACELib.AlignmentEnum.CenterAlignment; var_Link1.EndPos = EXSURFACELib.AlignmentEnum.CenterAlignment; var_Links.Add(axSurface1.Elements[3],axSurface1.Elements[4],null); EXSURFACELib.Link var_Link2 = var_Links.Add(axSurface1.Elements[4],axSurface1.Elements[3],null); var_Link2.StartPos = EXSURFACELib.AlignmentEnum.LeftAlignment; var_Link2.EndPos = EXSURFACELib.AlignmentEnum.RightAlignment; // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. EXPRINTLib.Print var_Print = new EXPRINTLib.Print(); var_Print.PrintExt = (axSurface1.GetOcx() as EXSURFACELib.Surface); var_Print.Preview(); |
114 |
How can I show direct-links
|
113 |
How can I show straight-links
|
112 |
How can I show round-links
|
111 |
I've tried to insert a "<br>" in the Caption property text and it just ignores it
axSurface1.BeginUpdate(); EXSURFACELib.Elements var_Elements = axSurface1.Elements; EXSURFACELib.Element var_Element = var_Elements.Add("caption",null,null); var_Element.CaptionSingleLine = EXSURFACELib.CaptionSingleLineEnum.exCaptionWordWrap; var_Element.Caption = "first caption<br>second caption<br>third caption"; axSurface1.EndUpdate(); |
110 |
How do I align the extra-caption
axSurface1.BeginUpdate(); EXSURFACELib.Elements var_Elements = axSurface1.Elements; EXSURFACELib.Element var_Element = var_Elements.Add("caption",null,null); var_Element.AutoSize = false; var_Element.Width = 128; var_Element.Height = 64; var_Element.ExtraCaption = "extra-caption"; var_Element.ExtraCaptionAlign = EXSURFACELib.ContentAlignmentEnum.exBottomRight; axSurface1.EndUpdate(); |
109 |
How can I add an extra caption
|
108 |
I am using the reserve-neighbors feature, the question is how to shift left/right the neighbors instead of up/down
axSurface1.BeginUpdate(); axSurface1.AllowMoveNeighbors = EXSURFACELib.MoveNeighborsEnum.exMoveNeighborsHorizontally; axSurface1.set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeDir,1); axSurface1.AllowInsertObject = false; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element <sha ;;0>A",null,null); var_Elements.Add("Element <sha ;;0>B ( move it )",16,32); var_Elements.Add("Element <sha ;;0>C",128,0); axSurface1.EndUpdate(); |
107 |
I am using the reserve-neighbors feature, the question is if possible to specify the distance between neighbors
axSurface1.BeginUpdate(); axSurface1.AllowMoveNeighbors = EXSURFACELib.MoveNeighborsEnum.exMoveNeighborsVertically; axSurface1.set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeDX,0); axSurface1.set_DefArrange(EXSURFACELib.DefArrangeEnum.exDefArrangeDY,0); axSurface1.AllowInsertObject = false; EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element <sha ;;0>A",null,null); var_Elements.Add("Element <sha ;;0>B ( move it )",0,32); var_Elements.Add("Element <sha ;;0>C",0,64); axSurface1.EndUpdate(); |
106 |
How do I enable the reserve-neighbors feature
|
105 |
I've noticed that recently, the elements get compacted once the Arrange method is performed. How can I prevent that
|
104 |
Is it possible to add a link to show from bottom/down to top/up, rather that right to left (method-2)
// AddLink event - A new link has been added to the links collection. private void axSurface1_AddLink(object sender, AxEXSURFACELib._ISurfaceEvents_AddLinkEvent e) { } //this.axSurface1.AddLink += new AxEXSURFACELib._ISurfaceEvents_AddLinkEventHandler(this.axSurface1_AddLink); EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element <sha ;;0>A",null,null); var_Elements.Add("Element <sha ;;0>B",48,48); EXSURFACELib.Links var_Links = axSurface1.Links; var_Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); |
103 |
Is it possible to add a link to show from bottom/down to top/up, rather that right to left (method-1)
EXSURFACELib.Elements var_Elements = axSurface1.Elements; var_Elements.Add("Element <sha ;;0>A",null,null); var_Elements.Add("Element <sha ;;0>B",48,48); EXSURFACELib.Links var_Links = axSurface1.Links; EXSURFACELib.Link var_Link = var_Links.Add(axSurface1.Elements[1],axSurface1.Elements[2],null); var_Link.StartPos = EXSURFACELib.AlignmentEnum.DownAlignment; var_Link.EndPos = EXSURFACELib.AlignmentEnum.UpAlignment; |
102 |
How do I enable the cross link support ( mixed )
|
101 |
How do I enable the cross link support ( triangular )
|