Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Some questions : ) (Read 9202 times)
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Some questions : )
Feb 21st, 2011 at 10:56am
Print Post  
Good morning stoyo.
I have few litle questions.


1- Based on what i read, i can rotate any node created with hanles.

I make a faster test and not work:

private void button1_Click(object sender, RoutedEventArgs e)

{


ShapeNode MyNode = new ShapeNode(form);


MyNode.HandlesStyle = HandlesStyle.EasyMove;


MyNode.EnabledHandles = AdjustmentHandles.Rotate;


}

What im doing wrong?


2- Exist some easy way to clean all noded of the screen in one simple step?

3- How can impement undo?

4- How can make selected node, can be moved using the keyboard arrows, up, down left right?


Please if can repply with code example, i really apreicate.

Best regards !
« Last Edit: Feb 22nd, 2011 at 10:11am by PDM. »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SOme questions : )
Reply #1 - Feb 21st, 2011 at 12:51pm
Print Post  
Hi,

1. What doesn't work?
2. diagram.ClearAll();
3. Check tutorial 4 and undo/redo in the docs.
4. http://mindfusion.eu/Forum/YaBB.pl?board=wpfdg_disc;action=display;num=123874209...

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: SOme questions : )
Reply #2 - Feb 21st, 2011 at 2:18pm
Print Post  
Anwer , cant rotate nodes. or i suposed handler change to permit rotate.
Not really clear how rotation of noded works.


ABout move with keyboard:

  form.CommandBindings.Add(new CommandBinding(Diagram.NavigateLeft, (sender, args) =>
           {
               DiagramNode node = form.ActiveItem as DiagramNode;
               if (node != null)
                   node.Move(node.Bounds.Left -5 , node.Bounds.Top);
                  
           }));

I tested that and work perfect, but whne i try move to right, the node is always moved in big jumps:



This is correct?

      form.CommandBindings.Add(new CommandBinding(Diagram.NavigateRight, (sender, args) =>
       {
       DiagramNode node = form.ActiveItem as DiagramNode;
       if (node != null)
         
           node.Move(node.Bounds.Right + 5  , node.Bounds.Top);
        }));

WHy is moved in big JUMPS ? and not in jumps of 5 pixels?

Bets regards.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SOme questions : )
Reply #3 - Feb 21st, 2011 at 8:58pm
Print Post  
You should call node.Move(node.Bounds.Left + 5 ...) to move it five points to the right. Your code above adds the whole width of the node to the 5pt offset.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: SOme questions : )
Reply #4 - Feb 21st, 2011 at 10:00pm
Print Post  
OK,

node.Move(node.Bounds.Left - 5 , node.Bounds.Top); for left x 5 pix

node.Move(node.Bounds.Left + 5 , node.Bounds.Top); for righ movement in jumps x  5 pixels.

Sorry for ask this but im trying all and cant move up or down, what is the way to move up and down?

Thankyou
« Last Edit: Feb 22nd, 2011 at 6:12am by PDM. »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SOme questions : )
Reply #5 - Feb 22nd, 2011 at 7:55am
Print Post  
You must be joking. If Move(x + 5, y) offsets the node horizontally, where should you place the +5 to offset it vertically?
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Some questions : )
Reply #6 - Feb 22nd, 2011 at 9:57am
Print Post  
I have this fixed minutes ago after i do this post, jajaja
Sorry for not update the post.

node.Move(node.Bounds.X, node.Bounds.Y - 5);

node.Move(node.Bounds.X, node.Bounds.Y + 5);

Just confused stoyo, thankyou for your patience : )

Grin
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Some questions : )
Reply #7 - Feb 22nd, 2011 at 10:49am
Print Post  
The only think not understand yet is the question one,  how rotate node.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Some questions : )
Reply #8 - Feb 22nd, 2011 at 11:04am
Print Post  
You should see a rotation handle drawn at a few pixels above the node, unless you are resetting EnabledHandles later to exclude the rotation bit. And better set MyNode.EnabledHandles = AdjustmentHandles.All instead of Rotate, or otherwise move and resize will be disabled. Actually if you can move or resize the node after the code above runs, then it's evident the value is changed back to the default later.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Some questions : )
Reply #9 - Feb 22nd, 2011 at 11:47am
Print Post  
Fixed !! Smiley
Thankyou! anyway no is see again truble swith serialization.


DiagramNode node = form.ActiveItem as DiagramNode;

node.RotationAngle = 90;

I added thsi code to button, when active node is slected and press my button node is rotated, but i have a big surprise when save and load again.
Rotation not seralized?
Why?

How serialize angle for all nodes i create?

Also copy and paste not copy the node roation angle, i think is for teh same reason not serialized im trying to figure how workaround this.
Your examples are always welcome : )

Best regards.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Some questions : )
Reply #10 - Feb 22nd, 2011 at 12:30pm
Print Post  
I imagine all propeties of nodes, like size, position, and angle are autmatically serialized.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Some questions : )
Reply #11 - Feb 22nd, 2011 at 4:24pm
Print Post  
Rotation is supported only for ShapeNodes and only they will save the value. I suppose that's why you could not rotate with the handles if you are using different nodes. RotationAngle is a property of the base class because we started implementing rotation for all types but our developers never finished this.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Some questions : )
Reply #12 - Feb 23rd, 2011 at 1:04am
Print Post  
Basically soon be avialble for all kind of nodes?
Have some ETA for this or can confirm when this be enabled?
Im stuck again, at this point if im not wrong i have around 90%  of all things i need, 100% working.
But rotation is one feature important on my project and is really needed.
Im not order mindfusion diagram for wpf licence yet, if order the licence is one thing help to have this completed, letme know for inmediate order.
Anyway need know real ETA or if this never be completed.
If no plans to complete in very very near future, this be really ugly surprise, due the component no is usefull to me.
I hoppe mindfusion team can solve this, this comonent is awesome and easy to use, is perfect, just need rotation.
Hoppe this rotation issue can be posted at top level of TODO.
I repeat,  if complete the order of my licence help to that, letmeknow.
Bets regards.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Some questions : )
Reply #13 - Feb 23rd, 2011 at 4:31am
Print Post  
Stoyo, you think is possible serialize rotation in some way until this is supported like fature by mindfusion?

Bets regards.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Some questions : )
Reply #14 - Feb 23rd, 2011 at 2:43pm
Print Post  
Not sure why you would want to rotate anything but ShapeNodes, but ok we'll implement serialization and rotation through handles in the next few days. You will use that with other node types at your own risk though; we'll have to do a lot of tests to see what happens with containers, links connected to table rows, etc. before making this official.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint