예제 #1
0
        public override void ConfigureFramework(FrameworkConfiguration config)
        {
            if (!(config is TuioConfiguration)) throw new ArgumentException("Config must be TraalConfiguration");

            this.config = config as TuioConfiguration;
                
            base.ConfigureFramework(config);
        }
예제 #2
0
        public override void ConfigureFramework(FrameworkConfiguration config)
        {
            if (!(config is TuioConfiguration))
            {
                throw new ArgumentException("Config must be TraalConfiguration");
            }

            this.config = config as TuioConfiguration;

            base.ConfigureFramework(config);
        }
예제 #3
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;
        }