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;
        }
Beispiel #2
0
        internal static FrameworkConfiguration GetTraalConfig(FrameworkElement uiParent)
        {
            AppConfig.LoadAppConfig();

            ProjectionConfig proj = ProjectionConfig.Load(AppConfig.TrackingPath);
            if (proj == null) proj = ProjectionConfig.LoadDefaults();

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

            var conf = new TraalConfiguration
            {
                Owner = uiParent,
                UIManagedThreadId = Thread.CurrentThread.ManagedThreadId,
                CorrectProjection = AppConfig.CorrectProjection,
                UseVfwDriver = false,
                Alignment = align,
                Projection = proj,
                TrackingConfigPath = AppConfig.TrackingPath,
            };

            return conf;
        }