示例#1
0
    public static void StartRefreshDeviceList()
    {
        if (!IsRefreshing)
        {
#pragma warning disable CS0162
            if (isLogging)
            {
                Debug.Log(TAG + "StartRefreshDeviceList");
            }
#pragma warning restore CS0162
            IsRefreshing = true;

            instance.InvokeRepeating("RefreshDeviceList", deviceRefreshTime, deviceRefreshTime);

            RefresherList.Clear();
        }
    }
示例#2
0
    public static void StopRefreshDeviceList()
    {
        if (!IsRefreshing)
        {
            return;
        }
#pragma warning disable CS0162
        if (isLogging)
        {
            Debug.Log(TAG + "StopRefreshDeviceList");
        }
#pragma warning restore CS0162

        if (RefresherList.Count == 0 || !IsScanning)
        {
            IsRefreshing = false;
            instance.CancelInvoke("RefreshDeviceList");
        }

        RefresherList.Clear();

        IsRefreshingRssiBlocked = false;
        instance.CancelInvoke("SetisRefreshingRssiBlocked");
    }