Example #1
0
        internal static FrameworkConfiguration GetTuioConfig(FrameworkElement uiParent)
        {
            AppConfig.LoadAppConfig();

            ProjectionConfig proj = ProjectionConfig.Load(AppConfig.TrackingPath);

            if (proj == null)
            {
                proj = ProjectionConfig.LoadDefaults();
            }

            AlignConfig align = new AlignConfig()
            {
                FlipX = AppConfig.FlipX,
                FlipY = AppConfig.FlipY
            };

            TuioConfiguration conf = new TuioConfiguration
            {
                Owner             = uiParent,
                UIManagedThreadId = Thread.CurrentThread.ManagedThreadId,
                CorrectProjection = AppConfig.CorrectProjection,
                Alignment         = align,
                Projection        = proj,
                Port = AppConfig.Port,
            };

            return(conf);
        }
    public override void initialize()
    {
        TuioConfiguration config = new TuioConfiguration();

        if (tracking == null)
        {
            tracking = new TuioTracking();
        }

        tracking.ConfigureFramework(config);

        tracking.Start();
    }