Ejemplo n.º 1
0
        private void toolStripLoadSession_Click(object sender, EventArgs e)
        {
            EnvironmentSessionListForm dlgSessions = new EnvironmentSessionListForm(EnvironmentSessionProvider.LoadSessions());

            if (dlgSessions.ShowDialog() == DialogResult.OK)
            {
                ActivateVarSet(dlgSessions.SelectedTarget);

                foreach (EnvironmentSessionItem item in dlgSessions.SelectedSession.Items)
                {
                    EnvironmentVariable variable = _activeVars.GetVariable(item.Name);

                    _session.Update(dlgSessions.SelectedTarget, item, variable);
                    _activeVars.SetVariable(item.Name, item.Value);
                }

                RefreshVarSet();
            }
        }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        m_ApiKey = EnvironmentVariables.GetVariable("GREETER_AZURE_FACE_API_KEY");
        Debug.Log("Endpoint is : " + m_Endpoint);

        m_BaseManager   = GameObject.Find("BaseManager").GetComponent <BaseManager>();
        m_StatusText    = GameObject.FindGameObjectWithTag("Status").GetComponent <TMPro.TextMeshProUGUI>();
        m_WebcamManager = GameObject.FindGameObjectWithTag("CameraManager").GetComponent <WebcamManager>();

        persons = new List <PersonInGroup.Person>();

        m_ValidationButton = GameObject.Find("Validate").GetComponent <Button>();
        if (m_ValidationButton != null)
        {
            m_ValidationButton.onClick.AddListener(() =>
            {
                StartValidation();
            });
        }
    }
Ejemplo n.º 3
0
    void Initializations()
    {
        m_StatusManager  = FindObjectOfType <StatusManager>();
        m_CaptureManager = FindObjectOfType <CaptureManager>();
        if (!m_StatusManager || !m_CaptureManager)
        {
            Debug.LogError(Constants.UI_MANAGER_NOT_FOUND);
        }
        else
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            StartCoroutine("GetSettings");
#endif
#if UNITY_EDITOR
            m_ApiKey = EnvironmentVariables.GetVariable("GREETER_AZURE_FACE_API_KEY");
#endif
            if (m_ApiKey != null && !m_ApiKey.Equals(Constants.NONE))
            {
                m_StatusManager.ShowStatus("Ready");
                m_Ready = true;
            }
        }
    }
Ejemplo n.º 4
0
 void GetApiKey()
 {
     API_KEY = EnvironmentVariables.GetVariable(ENV_KEY);
 }