public void Padback_Selection(object sender, MouseButtonEventArgs e)
{
double fromx, fromy;
double tox, toy;
int duration = 500;
int childindex;
int travelID;
string tagvalue;
System.Windows.Point Rubberpoint = new System.Windows.Point();
if (e.ClickCount == 2)
{
Rubberpoint = e.GetPosition(PadParent);
childindex = GetChildIndexClickedOn(Rubberpoint);
if (childindex != -1)
{
UIElement childVisual = (UIElement)VisualTreeHelper.GetChild(PadParent, childindex);
Visual myvisual = (Visual)VisualTreeHelper.GetChild(PadParent, childindex);
tagvalue = ((System.Windows.FrameworkElement)(sender)).Tag.ToString();
DrillLabel.Content = "Values for:" + tagvalue.ToString();
ListBoxItem lbi = new ListBoxItem();
lbi.Content = tagvalue;
DrillList.Items.Add(lbi);
Drill_Into_Pad(tagvalue);
// BUG fromx = WhiskX.X1;
// tox = Rubberpoint.X;
// fromy = WhiskY.Y1;
// toy = Rubberpoint.Y;
// Animator.AnimatePenner(WhiskX, Line.X1Property, Tween.Equations.CubicEaseIn, fromx, tox, duration, OnAnimationComplete, OnAnimationComplete);
// Animator.AnimatePenner(WhiskX, Line.X2Property, Tween.Equations.CubicEaseIn, fromx, tox, duration, OnAnimationComplete, OnAnimationComplete);
// Animator.AnimatePenner(WhiskY, Line.Y1Property, Tween.Equations.CubicEaseIn, fromy, toy, duration, OnAnimationComplete, OnAnimationComplete);
// Animator.AnimatePenner(WhiskY, Line.Y2Property, Tween.Equations.CubicEaseIn, fromy, toy, duration, OnAnimationComplete, OnAnimationComplete);
// Get the Tag of the selection Pt - this is the index from the database for the node...
if (((System.Windows.FrameworkElement)(childVisual)).Tag != null)
{
if (((System.Windows.FrameworkElement)(childVisual)).Tag.ToString() != "METRIC")
{
travelID = Convert.ToInt32(((System.Windows.FrameworkElement)(childVisual)).Tag);
LocalNet l = new LocalNet();
l._FieldBackground = ChildCanvas;
l.Clear_Canvas();
l.Draw_Local_Network(travelID);
}
}
}
}
}