void UpdateValidConnections()
        {
            if (devices_ != null)
            {
                bool bAllConnected = true, bAllDisconnected = true;
                foreach (DeviceHolder device in devices_.Values)
                {
                    if (device.HasValidConnection)
                    {
                        bAllDisconnected = false;
                    }
                    else
                    {
                        bAllConnected = false;
                    }
                }

                if (bAllConnected)
                {
                    hasValidConnections = ValidHostsConnections.All;
                }
                else if (bAllDisconnected)
                {
                    hasValidConnections = ValidHostsConnections.None;
                }
                else
                {
                    hasValidConnections = ValidHostsConnections.Some;
                }
            }
            else
            {
                hasValidConnections = ValidHostsConnections.None;
            }
        }
        void UpdateValidConnections()
        {
            if (devices_ != null)
            {
                bool bAllConnected = true, bAllDisconnected = true;
                foreach (DeviceHolder device in devices_.Values)
                {
                    if (device.HasValidConnection)
                        bAllDisconnected = false;
                    else
                        bAllConnected = false;
                }

                if (bAllConnected)
                    hasValidConnections = ValidHostsConnections.All;
                else if (bAllDisconnected)
                    hasValidConnections = ValidHostsConnections.None;
                else
                    hasValidConnections = ValidHostsConnections.Some;
            }
            else
                hasValidConnections = ValidHostsConnections.None;
        }
Ejemplo n.º 3
0
        void SetValidConnections()
        {
            bool bAllConnected = true, bAllDisconnected = true;
            foreach (DeviceHolder device in data_.Devices.Values)
            {
                if (device.HasValidConnection)
                    bAllDisconnected = false;
                else
                    bAllConnected = false;
            }

            if (bAllConnected)
                ValidConnections = ValidHostsConnections.All;
            else if (bAllDisconnected)
                ValidConnections = ValidHostsConnections.None;
            else
                ValidConnections = ValidHostsConnections.Some;
        }