Page Index Toggle Pages: 1 2 3 [4] 5 6  Send TopicPrint
Very Hot Topic (More than 25 Replies) Undo and groups (Read 58841 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo and groups
Reply #45 - Nov 14th, 2005 at 1:42pm
Print Post  
With which layout class does that happen ?

Thank you.
  
Back to top
 
IP Logged
 
rusted
YaBB Newbies
*
Offline



Posts: 42
Joined: Nov 3rd, 2005
Re: Undo and groups
Reply #46 - Nov 14th, 2005 at 3:42pm
Print Post  
Ok ... in testing to see which layout class caused this, I hit another exception.  I started with the Tree class.  I tried layout with rounded arrows and straight arrows, with centered, cascading and radial TreeLayoutTypes, and with various Directions.  All worked OK.  Then I did a number of UNDO operations until the end of the UNDO history.  Again all worked OK.  Then I tried a REDO, and immediately the following exception was thrown (just how stable IS this code???):

Message: Specified argument was out of the range of valid values.
Parameter name: Index was out of range.  Must be non-negative and less than the size of the collection.
Type: ArgumentOutOfRangeException
Source: mscorlib

Stack:    at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
   at MindFusion.FlowChartX.PointCollection.get_Item(Int32 index)
   at MindFusion.FlowChartX.Arrow.x3ebbf318c184de3b()
   at MindFusion.FlowChartX.Arrow.x06e06df617d17cf1(Graphics x4b101060f4767186, Pen x9c79b5ad7b769b12, Brush xe7ebe10fa44d8d49, Pen xfe39089439ac4f68, Boolean x2f9dabff87b2168b, Boolean x86c500fe5a9b7707)
   at MindFusion.FlowChartX.Arrow.Draw(Graphics g, Boolean shadow)
   at MindFusion.FlowChartX.FlowChart.x15edd106dba2f3b0(Graphics x4b101060f4767186, RectangleF xa6236fc5cd405c4e, Boolean x979174172ae18db3)
   at MindFusion.FlowChartX.FlowChart.x525e7084c19f09ac(Bitmap xcb82cf45bd90fc15, Rectangle xd1cff1e8f8666dbe, Boolean x979174172ae18db3, Boolean x650cceda2a9df79e)
   at MindFusion.FlowChartX.FlowChart.x525e7084c19f09ac(Bitmap xcb82cf45bd90fc15, Rectangle xd1cff1e8f8666dbe, Boolean x979174172ae18db3)
   at MindFusion.FlowChartX.FlowChart.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+I
MsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
  
Back to top
 
IP Logged
 
rusted
YaBB Newbies
*
Offline



Posts: 42
Joined: Nov 3rd, 2005
Re: Undo and groups
Reply #47 - Nov 14th, 2005 at 3:51pm
Print Post  
I got the layout / grouping / undo bug to show again by doing the following:

1.  Perform layout using GRID layout class
2.  Drag one of the node groups into a different position
3.  UNDO .... tables and boxes get 'disconnected'...

this is repeatable.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo and groups
Reply #48 - Nov 14th, 2005 at 5:54pm
Print Post  
thank you,

this version will fix the last issues:

https://mindfusion.org/_temp/FlowChart.NET.zip
  
Back to top
 
IP Logged
 
rusted
YaBB Newbies
*
Offline



Posts: 42
Joined: Nov 3rd, 2005
Re: Undo and groups
Reply #49 - Nov 15th, 2005 at 2:18pm
Print Post  
That seems to have done the trick.  I have another problem now.  If I programatically change the arrow Pen.DashStyle for all arrows in the flowchart , then initially it appears as if only a number of them have been changed.  If I then move the mouse over the 'unchanged' arrows, they get drawn correctly.  I am changing the arrow format within a .SuspendLayout .... .ResumeLayout(True) block as per the code excample below:

Public Sub ApplySolutionOptionsToWorkflow(ByRef s As Solution, ByRef flwChart As FlowChart)

       flwChart.SuspendLayout()

       Dim cmd As Commands.CompositeCmd = flwChart.UndoManager.StartComposite("ApplyProperties")

       Dim pds As DashStyle = Constants.GetSolutionOption(s, Constants.SolutionOption.ArrowPenStyle)
       Dim ast As ArrowStyle = Constants.GetSolutionOption(s, Constants.SolutionOption.ArrowStyle)
      
       flwChart.ArrowPen.DashStyle = pds
       flwChart.ArrowStyle = ast
       flwChart.ArrowCrossings = Constants.GetSolutionOption(s, Constants.SolutionOption.ArrowCrossing)

       Dim arw As Arrow
       Dim bShowText As Boolean = Constants.GetSolutionOption(s, SolutionOption.ShowAnnotations)

       For Each arw In flwChart.Arrows
           arw.Pen.DashStyle = pds
           arw.Style = ast
           arw.HeadPen.DashStyle = DashStyle.Solid ' arrow head ALWAYS solid
           arw.Text = IIf(bShowText, arw.ToolTip, "")
       Next

       flwChart.ShowGrid = Constants.GetSolutionOption(s, SolutionOption.ShowGrid)


       'todo .... show all other options


       cmd.Execute(False)

       flwChart.ResumeLayout(True)
       Application.DoEvents()

    End Sub
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo and groups
Reply #50 - Nov 15th, 2005 at 3:12pm
Print Post  
The developer says that change cannot be detected at this time and is not repainted automatically. The same will happen with all members of Pen , Brush and StringFormat classes. We'll check whether that can be fixed.

For now you can assign a new Pen instance to the arrow.HeadPen, instead of only changing the DashStyle. Or at the end, after all changes, call flwChart.Invalidate to explicitly repaint everything.

Stoyan
  
Back to top
 
IP Logged
 
rusted
YaBB Newbies
*
Offline



Posts: 42
Joined: Nov 3rd, 2005
Re: Undo and groups
Reply #51 - Nov 21st, 2005 at 10:28am
Print Post  
Hi Stoyan

Thanks for all your assistance.  I have decided to buy this component, but obviously will need to buy v4 as it includes all the fixes.

When can I do this as I need to do this fairly urgently.

Thx ...
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo and groups
Reply #52 - Nov 21st, 2005 at 11:29am
Print Post  
Hi,

Thank you, version 4 is still in beta testing, we'll probably release it in the next couple of days. If you need it sooner, you can buy the component here

https://usd.swreg.org/soft_shop/32209/shopscr8.shtml

and we will send you the retail version 4 builds. Then we will send upgrades to customers by the end of the week.

Stoyan
  
Back to top
 
IP Logged
 
rusted
YaBB Newbies
*
Offline



Posts: 42
Joined: Nov 3rd, 2005
Re: Undo and groups
Reply #53 - Nov 28th, 2005 at 9:09am
Print Post  
It's been a week now.  Any news on v4?  Undecided
  
Back to top
 
IP Logged
 
rusted
YaBB Newbies
*
Offline



Posts: 42
Joined: Nov 3rd, 2005
Re: Undo and groups
Reply #54 - Nov 28th, 2005 at 1:08pm
Print Post  
Is there any possibility of getting a version of the DLLs that does not put your "Flowchart.Net Demo Version" text all over the show.  My salesman needs to demo new functionality in our software which includes your control, and cannot because of this as I have not been able to purchase v4 yet.
  
Back to top
 
IP Logged
 
Iva
Junior Member
**
Offline


MindFusion support

Posts: 55
Joined: Aug 6th, 2005
Re: Undo and groups
Reply #55 - Nov 28th, 2005 at 2:34pm
Print Post  
Hello,

The developers are fixing some bugs in the Visio and SVG export libraries; otherwise the core flowchart.dll is quite stable and we'll release version 4 any time now.

Yes we can send you dlls that don't display 'demo version' labels, just drop us a line at our support email address @mindfusion.org.

Thank you,
Iva
MindFusion
  
Back to top
 
IP Logged
 
rusted
YaBB Newbies
*
Offline



Posts: 42
Joined: Nov 3rd, 2005
Re: Undo and groups
Reply #56 - Nov 30th, 2005 at 6:54pm
Print Post  
Thanks.

I have applied these DLLs. 

Unfortunately there still appears to be an issue with the Undo and group ZOrder.  I started a thread in the Discussions forum regarding the ActionRecorded event, and that it isn't being raised every time - I need a consistent means of setting buttons to reflect the dirty state of the flowchart.

If I open an existing flowchart diagram, and select on of my groups (which contains a box as the main node, plus a table and a couple of other boxes as subordinates), and then press the delete key, the group gets deleted, but the ActionRecorded event is NOT raised.

If I then create a NEW group programatically using a CompositeCommand, an ActionRecorded event IS raised. 

If I then select another old group and press the delete key, this time the ActionRecorded event IS raised.   ???

If I now progrmatically call the flowchart's UndoManager.Undo method, the group is recreated and appears on the diagram, but the ZOrder is only correct when the group is selected.  When de-selected, the subordinate items appear below the main item, while they were created above the main item.

Sad
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo and groups
Reply #57 - Dec 1st, 2005 at 5:36am
Print Post  
The group for which the ActionRecorded is not raised - is it a group with AutoDeleteItems enabled, or you programmatically delete the items when 'delete' is pressed?

Stoyan
  
Back to top
 
IP Logged
 
rusted
YaBB Newbies
*
Offline



Posts: 42
Joined: Nov 3rd, 2005
Re: Undo and groups
Reply #58 - Dec 1st, 2005 at 7:31am
Print Post  
Group is created with AutoDeleteItems = True.

1) Start with an empty flowchart, then create group-1 programatically.

2) Display form

3) Select group-1 on flowchart and press Delete key

4) group-1 gets deleted, but ActionRecorded event is NOT raised

5) User then does a mouse down and drag to create a new group (group-2) - I catch the BoxCreating event and start a composite command, then in the BoxCreated event I create the group using the composite command started in the BoxCreating event

6) ActionRecorded event IS raised

7) Then do an Undo ... and this is where it gets interesting ... group-2 is removed (as you'd expect because you are undoing the new group creation) ... BUT .... group-1 re-appears along with a messed up ZOrder




  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo and groups
Reply #59 - Dec 1st, 2005 at 7:54am
Print Post  
What does 'display form' means in 2)? I get ActionRecorded without doing the second step.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 3 [4] 5 6 
Send TopicPrint