public StreamingRectangleUserControl(ClientTagVisualization tagVisualization, double width, double height)
     : this()
 {
     this._tagVisualization = tagVisualization;
     ScreenRectangle.Width = width;
     ScreenRectangle.Height = height;
 }
 public PairingUserControl(ClientTagVisualization parent)
 {
     InitializeComponent();
     //this._clientId = clientId;
     this._parent = parent;
     this._clientHandler = ClientSessionsController.Instance;
     InitializePairing();
 }
Ejemplo n.º 3
0
 public override void OnSessionEnd()
 {
     if (_visualizer != null)
     {
         Debug.WriteLineIf(DebugSettings.DEBUG_EVENTS, "Raising IdentifiedPersonLeftEvent");
         _visualizer.Dispatcher.Invoke((Action)delegate()
         {
             _visualizer.RaiseEvent(new RoutedIdentifiedEventArgs(IdentifiedEvents.IdentifiedPersonLeftEvent, _session.ClientId, _visualization));
         });
     }
     Visualization = null;
     _visualizer = null;
 }
        internal CalibrationUserControl(ClientTagVisualization parent, CalibrationData existingCalibration)
            : this(parent, false)
        {
            // Nice-To-Have: Indlæs eksisterende calibration her...
            this.MinWidth = 180;
            this.MinHeight = 300;
            LayoutControl(300, 180);

            if (existingCalibration != null)
            {
                AdjustWidth(existingCalibration.Width);
                AdjustHeight(existingCalibration.Height);
            }
        }
        private CalibrationUserControl(ClientTagVisualization parent, bool doDefaultLayout)
        {
            this._parent = parent;
            InitializeComponent();

            //if (parent.BlobRectangle != null && !parent.BlobRectangle.Equals(new Rect()))
            //{
            //    //this.LayoutTransform = new RotateTransform(parent.BlobOrientation);
            //    LayoutControl(parent.BlobRectangle.Width, parent.BlobRectangle.Height);
            //}
            //else
            if (doDefaultLayout)
            {
                this.MinWidth = 180;
                this.MinHeight = 300;
                LayoutControl(300, 180);
            }
            //Debug.WriteLine("CalibrationUserControl constructor: this.Visualizer == null?: " + (parent.Visualizer == null));
        }
Ejemplo n.º 6
0
 public virtual void OnLostTag()
 {
     this.Visualization = null;
 }
Ejemplo n.º 7
0
 public virtual void OnGotTag(ClientTagVisualization visualization)
 {
     this.Visualization = visualization;
     _session.ClientId.PersonalizedView = visualization;
 }
Ejemplo n.º 8
0
 public PairedState(ClientSession session, ClientTagVisualization visualization)
     : base(session)
 {
     this.Visualization = visualization;
 }
 /// <summary>
 /// Factory method which ensures that the UI is properly updated
 /// upon initialization
 /// </summary>
 /// <param name="session">The session which state is to be updated</param>
 /// <param name="visualization">The visualization of the client</param>
 public static void SetAsState(ClientSession session, ClientTagVisualization visualization)
 {
     CalibrationState cs = new CalibrationState(session, visualization);
     session.State = cs;
     cs.UpdateUI();
 }
 public CalibrationState(ClientSession session, ClientTagVisualization visualization)
     : base(session, visualization)
 {
 }
 /// <summary>
 /// When a set of pairing codes are no longer needed, they should be 
 /// unregistered, so they can be used again by someone else.
 /// </summary>
 public void UnregisterPairingCodes(ClientTagVisualization visualization)
 {
     lock (_pairingCodeToVisualisationDictionaryLock)
     {
         foreach (PairingCodeType codeType in _pairingCodeToVisualisationLookUp.Keys)
         {
             List<string> keys = new List<string>(_pairingCodeToVisualisationLookUp[codeType].Keys);
             foreach (string key in keys)
             {
                 if (_pairingCodeToVisualisationLookUp[codeType][key].Equals(visualization))
                 {
                     _pairingCodeToVisualisationLookUp[codeType].Remove(key);
                 }
             }
         }
     }
 }
 /// <summary>
 /// When a set of pairing codes have been generated, they should be 
 /// registered, so that no one else can use them.
 /// A bool is returned indicating whether the registration went well.
 /// </summary>
 public bool RegisterPairingCodes(ClientTagVisualization visualization, PairingCodeSet codes)
 {
     bool codeNotInUse = true;
     lock (_pairingCodeToVisualisationDictionaryLock)
     {
         // Check if the pin code is already registered
         if (_pairingCodeToVisualisationLookUp.ContainsKey(codes.PinCode.Type))
         {
             if (_pairingCodeToVisualisationLookUp[codes.PinCode.Type].ContainsKey(codes.PinCode.Code))
             {
                 codeNotInUse = false; // Codes already in use
             }
         }
         else
         {
             // If there is not any Pin Codes registered
             _pairingCodeToVisualisationLookUp.Add(codes.PinCode.Type, new Dictionary<string, ClientTagVisualization>());
         }
         if (codeNotInUse)
         {
             _pairingCodeToVisualisationLookUp[codes.PinCode.Type].Add(codes.PinCode.Code, visualization);
         }
     }
     return codeNotInUse;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Factory method which ensures that the UI is properly updated
 /// upon initialization
 /// </summary>
 /// <param name="session">The session which state is to be updated</param>
 /// <param name="visualization">The visualization of the client</param>
 public static void SetAsState(ClientSession session, ClientTagVisualization visualization)
 {
     StreamingState ss = new StreamingState(session, visualization);
     session.State = ss;
     ss.UpdateUI();
 }
Ejemplo n.º 14
0
 public StreamingState(ClientSession session, ClientTagVisualization visualization)
     : base(session, visualization)
 {
 }
 public CalibrationUserControl(ClientTagVisualization parent)
     : this(parent, true)
 {
 }