public MockApp(TPadProfile profile, ITPadAppContainer container, ITPadAppController controller) { Profile = profile; Container = container; Controller = controller; InitializeComponent(); }
public TPadWindow(TPadProfile profile, ITPadAppLauncher launcher, TPadCore core) { SizeMultiplier = 0.75; // This makes the window smaller when using a single monitor set-up -- for development Launcher = launcher; Profile = profile; Core = core; InitializeComponent(); }
public Simulator(ITPadAppLauncher launcher, TPadProfile profile) { Launcher = launcher; Profile = profile; AppInstances = new ObservableCollection<ITPadApp>(); InitializeComponent(); iDocument.SizeChanged += new SizeChangedEventHandler(iDocument_SizeChanged); ActualDocument = GetDocument("Blank", 0); }
public void Configure(TPadProfile profile, int deviceID, String groupIP, int port, int TTL) { log4net.Config.XmlConfigurator.Configure(); logger = log4net.LogManager.GetLogger(typeof(TPadCore)); Profile = profile; Device = new TPadDevice(deviceID) { Profile = Profile }; Board = new BoardMonitor() { UpdateType = ContextAdapterUpdateType.Interval, UpdateInterval = 100 }; SimBoard = new SimBoardMonitor() { UpdateType = ContextAdapterUpdateType.OnRequest }; Camera = new CameraMonitor(UseCamera) { UpdateType = ContextAdapterUpdateType.Interval, UpdateInterval = 50 }; SimCamera = new SimCameraMonitor() { UpdateType = ContextAdapterUpdateType.OnRequest }; FlippingMonitor flippingMonitor = new FlippingMonitor() { UpdateType = ContextAdapterUpdateType.OnRequest }; StackingMonitor stackingMonitor = new StackingMonitor() { UpdateType = ContextAdapterUpdateType.OnRequest }; ShakingMonitor shakingMonitor = new ShakingMonitor() { UpdateType = ContextAdapterUpdateType.OnRequest }; ButtonMonitor buttonMonitor = new ButtonMonitor() { UpdateType = ContextAdapterUpdateType.OnRequest }; MulticastMonitor multicastMonitor = new MulticastMonitor(groupIP, port, TTL); Registration = new RegistrationService(UseCamera, Device, Camera, SimCamera); GlyphDetection = new GlyphDetectionService(Device); //Wiring up the components Board.OnNotifyContextServices += flippingMonitor.UpdateMonitorReading; Board.OnNotifyContextServices += stackingMonitor.UpdateMonitorReading; Board.OnNotifyContextServices += shakingMonitor.UpdateMonitorReading; Board.OnNotifyContextServices += buttonMonitor.UpdateMonitorReading; SimBoard.OnNotifyContextServices += flippingMonitor.UpdateMonitorReading; SimBoard.OnNotifyContextServices += stackingMonitor.UpdateMonitorReading; SimBoard.OnNotifyContextServices += shakingMonitor.UpdateMonitorReading; SimBoard.OnNotifyContextServices += buttonMonitor.UpdateMonitorReading; Camera.OnNotifyContextServices += Registration.UpdateMonitorReading; Camera.OnNotifyContextServices += GlyphDetection.UpdateMonitorReading; SimCamera.OnNotifyContextServices += Registration.UpdateMonitorReading; SimCamera.OnNotifyContextServices += GlyphDetection.UpdateMonitorReading; flippingMonitor.OnNotifyContextServices += this.UpdateMonitorReading; stackingMonitor.OnNotifyContextServices += this.UpdateMonitorReading; shakingMonitor.OnNotifyContextServices += this.UpdateMonitorReading; buttonMonitor.OnNotifyContextServices += this.UpdateMonitorReading; multicastMonitor.OnNotifyContextServices += this.UpdateMonitorReading; Registration.OnNotifyContextServiceListeners += this.ContextChanged; GlyphDetection.OnNotifyContextServiceListeners += this.ContextChanged; //Register the monitors to the container monitorsContainer.AddMonitor(Board); monitorsContainer.AddMonitor(SimBoard); monitorsContainer.AddMonitor(SimCamera); monitorsContainer.AddMonitor(Camera); monitorsContainer.AddMonitor(flippingMonitor); monitorsContainer.AddMonitor(stackingMonitor); monitorsContainer.AddMonitor(multicastMonitor); //Register the services to the container servicesContainer.AddContextService(this); servicesContainer.AddContextService(Registration); servicesContainer.AddContextService(GlyphDetection); }