Exemple #1
0
        void CheckPreparation()
        {
            if (m_FoldoutIncomingTrafic == null)
            {
                m_FoldoutIncomingTrafic = new NetworkTraficBuffer();
            }

            if (m_FoldoutOutgoingTrafic == null)
            {
                m_FoldoutOutgoingTrafic = new NetworkTraficBuffer();
            }

            if (m_NavigationMenu == null)
            {
                m_NavigationMenu = new NavigationMenu();
            }

            if (m_TraficChart == null)
            {
                m_TraficChart = new TraficChart(m_FoldoutIncomingTrafic, Color.red, m_FoldoutOutgoingTrafic, Color.blue, Color.grey, new Color(1, 1, 1, 0.5f));
            }

            if (m_IncomingTraficDetail == null)
            {
                m_IncomingTraficDetail = new TraficDetail("Incoming By Channel");
            }

            if (m_OutgoingTraficDetail == null)
            {
                m_OutgoingTraficDetail = new TraficDetail("Outgoing By Channel");
            }
        }
Exemple #2
0
        public TraficChart(NetworkTraficBuffer incomingBuffer, Color incomingColor, NetworkTraficBuffer outgoingBuffer, Color outgointColor, Color helpColor, Color selectedColor)
        {
            m_IncomingBuffer = incomingBuffer;
            m_IncomingColor  = incomingColor;
            m_OutgoingBuffer = outgoingBuffer;
            m_OutgoingColor  = outgointColor;

            m_HelpColor     = helpColor;
            m_SelectedColor = selectedColor;
        }
Exemple #3
0
        ushort GetHighestValue(NetworkTraficBuffer values)
        {
            ushort highest = 10;

            for (int i = 0; i < values.Count; i++)
            {
                if (highest < values[i].TotalChannelTrafic)
                {
                    highest = values[i].TotalChannelTrafic;
                }
            }

            return(highest);
        }