Ejemplo n.º 1
0
        //Determines user intent by checking location of drop against threshold and whether a clone exists (i.e. drag intent)
        private void L1Module_ContainerManipulationCompleted(object sender, ContainerManipulationCompletedEventArgs e)
        {
            L1Module    l      = sender as L1Module;
            ScatterView parent = l.Parent as ScatterView;

            try
            {
                if (!(myClone == null))
                {
                    if ((parent.Name == "L1_permTab") || (parent.Name == "L1_manTab"))
                    {
                        //Drop L1Module into L2 or delete
                        l.L1ModuleInL1();
                    }
                    else
                    {
                        //Drop L1Module into L2Module or delete
                        l.L1ModuleInL2();
                    }

                    parent.Items.Remove(l);
                }
                else
                {
                    if (parent.Name == "L2_L1ModulesSV")
                    { //If in L2
                        if (l.BorderBrush != Brushes.White)
                        {
                            //Restore white border
                            l.BorderBrush = Brushes.White;
                        }
                        else
                        {
                            l.BorderBrush = Brushes.Navy;
                        } //highlights border
                    }
                }
            }
            catch (Exception exc) { Console.WriteLine("L1M Completd \n" + exc); }
        }