Exemple #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);

            MTSmoothContainer smartAreaCont = new MTSmoothContainer(smartArea, main, prop);

            framework.RegisterElement(smartAreaCont);

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

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

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

            SingleToneTrans.getInstance().addToArea(smartArea);
            SingleToneTrans.getInstance().addToCont(smartAreaCont);
        }
Exemple #2
0
 public void setInit(Canvas _main, Window target, FrameworkControl fw, SmartArea s)
 {
     main      = _main;
     window    = target;
     framework = fw;
     _sArea    = s;
 }
 public int getAreaIndex(SmartArea e)
 {
     int index = 0;
     foreach (SmartArea s in smartAreaList)
     {
         if (e.userIP == s.userIP)
             break;
         index++;
     }
     return index;
 }
Exemple #4
0
 private void BeginInvokeRemove(SmartArea s, string _ip)
 {
     if (s.Dispatcher.CheckAccess())
     {
         removeSmartArea(_ip);
     }
     else
     {
         s.Dispatcher.BeginInvoke(new removeSmartAreaDelegate(removeSmartArea), _ip);
     }
 }
Exemple #5
0
 private void BeginInvokeCreate(SmartArea s, string _ip, PointF pt, double angle)
 {
     if (s.Dispatcher.CheckAccess())
     {
         createSmartArea(_ip, pt, angle);
     }
     else
     {
         s.Dispatcher.BeginInvoke(new createSmartAreaDelegate(createSmartArea), _ip, pt, angle);
     }
 }
Exemple #6
0
 private void BeginInvokeCont(SmartArea s, string _ip, float offsetX, float offsetY, double angle)
 {
     if (s.Dispatcher.CheckAccess())
     {
         findContainer(_ip, offsetX, offsetY, angle);
     }
     else
     {
         s.Dispatcher.BeginInvoke(new MTContDelegate(findContainer), _ip, offsetX, offsetY, angle);
     }
 }
Exemple #7
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 #8
0
        public int getAreaIndex(SmartArea e)
        {
            int index = 0;

            foreach (SmartArea s in smartAreaList)
            {
                if (e.userIP == s.userIP)
                {
                    break;
                }
                index++;
            }
            return(index);
        }
 public void removeArea(SmartArea e)
 {
     smartAreaList.Remove(e);
 }
 public void addToArea(SmartArea e)
 {
     smartAreaList.Add(e);
 }
        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;
        }
Exemple #12
0
 public void removeArea(SmartArea e)
 {
     smartAreaList.Remove(e);
 }
Exemple #13
0
 public void addToArea(SmartArea e)
 {
     smartAreaList.Add(e);
 }