Exemplo n.º 1
0
    /// <summary>
    /// Callback from the query request. This method is activated via a message from
    /// vVisDataSQLite.
    /// </summary>
    /// <param name="queryResults">Object containing the results of the query and
    /// how to visualize them</param>
    internal void RequestQuery_CallBack(VVISQueryResults queryResults)
    {
        vVisUICtrl.UICalculatingMode(false);

        if (queryResults.queryError)
        {
            vVisUICtrl.WriteDebugText("Error in query: the query requested could not be executed.", Color.red, debugMessageTime);

            //Log error
            if (loggerAssembly != null && loggerAssembly.logVVis)
            {
                log.Error("Error in query: The query requested could not be executed");
            }
        }
        else
        {
            vVisUICtrl.WriteDebugText("Query executed successfully!", Color.green, debugMessageTime);

            VisualizeRoads(queryResults.queryResults, queryResults.visualizeWithGradient, queryResults.color);

            //Log info
            if (loggerAssembly != null && loggerAssembly.logVVis)
            {
                log.Info("Query executed successfully");
            }
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// Coroutine for callback.
    /// </summary>
    /// <param name="requestor">Receiver of the callback.</param>
    IEnumerator CallbackToRequestor(GameObject requestor)
    {
        while (!lastQueryCompleted)
        {
            yield return(new WaitForSeconds(0.1f));
        }

        VVISQueryResults results = new VVISQueryResults(selectedRows, true);

        results.SetAsQueryError(queryError);
        queryError = false;

        requestor.SendMessage("RequestQuery_CallBack", results);
    }