Example #1
0
        private static AlertData getAlertDate(ErrorType errorType)
        {
            AlertData alertData = null;

            switch(errorType)
            {
                case ErrorType.OverlayStuff:
                    alertData = new AlertData() { Title = "Kod 1" };
                break;
                case ErrorType.ServerOverload:
                    alertData = new AlertData() { Title = "Kod 2", Message = "Serverfel har inträffat, meddela utvecklarna" };
                break;
            }

            if(alertData != null && alertData.Message == null)
                alertData.Message = "Fel har inträffat, meddela utvecklarna";

            return alertData;
        }
Example #2
0
 internal static Boolean IsAlertFiredByHandINT(IntPtr instance, AlertType alertEvent, Int32 handID, out AlertData alertData)
 {
     alertData = new AlertData();
     return PXCMHandData_IsAlertFiredByHand(instance, alertEvent, handID, alertData);
 }
Example #3
0
 internal static pxcmStatus QueryFiredAlertDataINT(IntPtr instance, Int32 index, out AlertData alertData)
 {
     alertData = new AlertData();
     return PXCMHandData_QueryFiredAlertData(instance, index, alertData);
 }
Example #4
0
        /**
            @brief Return whether the specified alert is fired for a specific hand in the current frame, and retrieve its data.
		
            @param[in] alertEvent - the alert type.
            @param[in] handID - the ID of the hand whose alert should be retrieved. 
            @param[out] alertData - the information for the fired event.
            @return true if the alert is fired, false otherwise.
		
            @see AlertType
            @see AlertData

        */
        public Boolean IsAlertFiredByHand(AlertType alertEvent, Int32 handID, out AlertData alertData)
        {
            return IsAlertFiredByHandINT(instance, alertEvent, handID, out alertData);
        }
Example #5
0
        /**
            @brief Return whether the specified alert is fired in the current frame, and retrieve its data if it is.
		
            @param[in] alertEvent - the ID of the fired event.
            @param[out] alertData - the information for the fired event.
		
            @return true if the alert is fired, false otherwise.
		
            @see AlertType
            @see AlertData
        */
        public Boolean IsAlertFired(AlertType alertEvent, out AlertData alertData)
        {
            return IsAlertFiredINT(instance, alertEvent, out alertData);
        }
Example #6
0
        /** 
             @brief Get the details of the fired alert with the given index.
		
             @param[in] index - the zero-based index of the requested fired alert.
             @param[out] alertData - the information for the fired event. 
		
             @note the index is between 0 and the result of QueryFiredAlertsNumber()
		
             @return PXCM_STATUS_NO_ERROR - operation succeeded.
             @return PXCM_STATUS_PARAM_UNSUPPORTED - invalid input parameter.
		
             @see AlertData
             @see QueryFiredAlertsNumber
         */
        public pxcmStatus QueryFiredAlertData(Int32 index, out AlertData alertData)
        {
            return QueryFiredAlertDataINT(instance, index, out alertData);
        }
Example #7
0
 /**
     @brief Return whether the specified alert is fired for a specific face in the current frame, and retrieve its data.
     @param[in] alertEvent the label of the alert event.
     @param[out] outAlertName parameter to contain the name of the alert,maximum size - ALERT_NAME_SIZE
     @see AlertData
     @return PXC_STATUS_NO_ERROR if returning the alert's name was successful; otherwise, return one of the following errors:
     PXCM_STATUS_PARAM_UNSUPPORTED - if outAlertName is null.
     PXCM_STATUS_DATA_UNAVAILABLE - if no alert corresponding to alertEvent was found.
 */
 public pxcmStatus QueryAlertNameByID(AlertData.AlertType alertEvent, out String outAlertName)
 {
     return QueryAlertNameByIDINT(instance, alertEvent, out outAlertName);
 }
Example #8
0
 internal static extern Boolean PXCMFaceData_IsAlertFiredByFace(IntPtr instance, AlertData.AlertType alertEvent, Int32 faceID, [Out] AlertData alertData);
Example #9
0
 /**
     @brief Return whether the specified alert is fired for a specific face in the current frame, and retrieve its data.
     @param[in] alertEvent the label of the alert event.
     @param[in] faceID the ID of the face who's alert should be retrieved. 
     @param[out] alertData contains all the information for the fired event.
     @see AlertData
     @return true if the alert is fired, false otherwise.
 */
 public Boolean IsAlertFiredByFace(AlertData.AlertType alertEvent, Int32 faceID, out AlertData alertData)
 {
     alertData = new AlertData();
     return PXCMFaceData_IsAlertFiredByFace(instance, alertEvent, faceID, alertData);
 }
Example #10
0
 /**
     @brief Return whether the specified alert is fired in the current frame, and retrieve its data if it is.
     @param[in] alertEvent the ID of the event.
     @param[out] alertData contains all the information for the fired event.
     @see AlertData
     @return true if the alert is fired, false otherwise.
 */
 public Boolean IsAlertFired(AlertData.AlertType alertEvent, out AlertData alertData)
 {
     alertData = new AlertData();
     return PXCMFaceData_IsAlertFired(instance, alertEvent, alertData);
 }
Example #11
0
 /** 
     @brief Get the details of the fired alert at the requested index.
     @param[in] index the zero-based index of the requested fired alert .
     @param[out] alertData contains all the information for the fired event. 
     @see AlertData
     @note the index is between 0 and the result of GetFiredAlertsNumber()
     @see GetFiredAlertsNumber()
     @return PXC_STATUS_NO_ERROR if returning fired alert data was successful; otherwise, return one of the following errors:
     PXC_STATUS_PROCESS_FAILED - Module failure during processing.\n
     PXC_STATUS_DATA_NOT_INITIALIZED - Data failed to initialize.\n
 */
 public pxcmStatus QueryFiredAlertData(Int32 index, out AlertData alertData)
 {
     alertData = new AlertData();
     return PXCMFaceData_QueryFiredAlertData(instance, index, alertData);
 }
Example #12
0
 internal static pxcmStatus QueryAlertNameByIDINT(IntPtr instance, AlertData.AlertType alertEvent, out String outAlertName)
 {
     StringBuilder alertName = new StringBuilder(ALERT_NAME_SIZE);
     pxcmStatus sts = PXCMFaceData_QueryAlertNameByID(instance, alertEvent, alertName);
     outAlertName = (sts >= pxcmStatus.PXCM_STATUS_NO_ERROR) ? alertName.ToString() : "";
     return sts;
 }
Example #13
0
 private static extern pxcmStatus PXCMFaceData_QueryAlertNameByID(IntPtr instance, AlertData.AlertType alertEvent, StringBuilder outAlertName);
 private void OnAlert(AlertData data)
 {
     handler.onAlert(data);
 }