Beispiel #1
0
        public void createSmartArea(string _ip, PointF pt, double angle)
        {
            //Init SmartArea Control
            SmartArea smartArea = new SmartArea();

            ElementProperties prop = new ElementProperties();

            prop.ElementSupport.AddSupport(TouchFramework.TouchAction.Drag);
            prop.ElementSupport.AddSupport(TouchFramework.TouchAction.Tap);

            smartAreaCont = new MTSmoothContainer(smartArea, MainElement, prop);
            framework.RegisterElement(smartAreaCont);

            smartArea.Tag        = _ip;
            smartAreaCont.userIP = _ip;

            MainElement.Children.Add(smartArea);
            smartArea.setInit(MainElement, window, framework, smartAreaCont, _ip, angle);

            smartAreaCont.SetPosition(pt.X, pt.Y, angle, 1.0);

            SingleToneTrans.getInstance().addToArea(smartArea);
            SingleToneTrans.getInstance().addToCont(smartAreaCont);
            _smartArea = smartArea;
        }
Beispiel #2
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;
        }