Exemple #1
0
        public void bt_filebox_Click(object sender, RoutedEventArgs e)
        {
            if (main.Children.Contains(fBox) == false)
            {
                fBox = new FileBox3();
                main.Children.Add(fBox);

                fBoxProp.ElementSupport.AddSupport(TouchAction.Tap);
                fBoxProp.ElementSupport.AddSupport(TouchAction.Drag);
                fBoxProp.ElementSupport.AddSupport(TouchAction.ScrollY);

                fBoxCont = new MTSmoothContainer(fBox, main, fBoxProp);
                fBoxCont.SetPosition(thisPosition.X, thisPosition.Y,
                                     thisAngle + thisCont.RotateFilter.Target, 1.0);

                framework.RegisterElement(fBoxCont);
                fBox.setInit(main, window, framework, fBoxCont, thisAngle, userIP);

                isCreated = true;
            }
            else
            {
                main.Children.Remove(fBox);
                framework.UnregisterElement(fBoxCont.Id);
                fBox      = new FileBox3();
                isCreated = false;
            }
        }
Exemple #2
0
        void bt1_Click(object sender, RoutedEventArgs e)
        {
            if (!(main.Children.Contains(pMenu)))
            {
                PointF globalPt = new PointF(thisCont.ObjectTouches.MoveCenter.X, thisCont.ObjectTouches.MoveCenter.Y);
                pMenu = new phoneMenu();

                main.Children.Add(pMenu);

                pMenuProp.ElementSupport.AddSupportForAll();

                pMenuCont = new MTSmoothContainer(pMenu, main, pMenuProp);

                pMenuCont.SetPosition(globalPt.X, globalPt.Y, gridRotateTrans.Angle, 1.0);
                framework.RegisterElement(pMenuCont);

                pMenu.setInit(main, window, framework, pMenuCont, gridRotateTrans.Angle, userIP);
            }
            else
            {
                main.Children.Remove(pMenu);
                framework.UnregisterElement(pMenuCont.Id);
                pMenuCont.isRemoved = true;
            }
        }
Exemple #3
0
        public void bt5_Click(PointF p)
        {
            main.Children.Remove(this);
            pptImg.Source = null;

            framework.UnregisterElement(thisCont.Id);
            thisCont.isRemoved = true;
        }
Exemple #4
0
 public void img_bt2_Click(PointF p)
 {
     animation(this);
     if (btGrid.Visibility == Visibility.Visible)
     {
         main.Children.Remove(this);
         framework.UnregisterElement(thisCont.Id);
         thisCont.isRemoved = true;
     }
 }
Exemple #5
0
        public void removeSmartArea(string _ip)
        {
            //Init SmartArea Control
            SmartArea         smartArea = SingleToneTrans.getInstance().getArea(_ip);
            MTSmoothContainer cont      = SingleToneTrans.getInstance().getCont(_ip);

            SingleToneTrans.getInstance().removeArea(smartArea);
            SingleToneTrans.getInstance().removeCont(cont);

            main.Children.Remove(smartArea);
            framework.UnregisterElement(cont.Id);
            cont.isRemoved = true;
        }
Exemple #6
0
        public void removeSmartArea(string _ip)
        {
            //Init SmartArea Control
            SmartArea smartArea = SingleToneTrans.getInstance().getArea(_ip);


            SingleToneTrans.getInstance().addToArea(smartArea);
            int _index             = SingleToneTrans.getInstance().getAreaIndex(smartArea);
            MTSmoothContainer cont = SingleToneTrans.getInstance().getIndexAtCont(_index);

            MainElement.Children.Remove(smartArea);
            framework.UnregisterElement(cont.Id);
            cont.isRemoved = true;
        }
Exemple #7
0
 public void bt_close_Click()
 {
     main.Children.Remove(this);
     framework.UnregisterElement(thisCont.Id);
     thisCont.isRemoved = true;
 }
Exemple #8
0
 private void mode_bt_close_Click(object sender, RoutedEventArgs e)
 {
     main.Children.Remove(this);
     framework.UnregisterElement(thisCont.Id);
     thisCont.isRemoved = true;
 }