Exemplo n.º 1
0
        private void RefreshInterfacePage()
        {
            SortedList <ulong, Statistics.InterfaceStatistics.InterfaceState> statesList = m_remoterServer.GetInterfaceStates();

            foreach (Interface ci in InterfaceListView.Items)
            {
                if (statesList.ContainsKey(ci.Parent.myID_Internal))
                {
                    ci.ImageIndex = (int)statesList[ci.Parent.myID_Internal];
                }
            }
            if (InterfaceListView.SelectedItems.Count == 0)
            {
                labelIntStateVal.Text      = ns;
                labelIntActiveTimeVal.Text = ns;
                labelIntFailTimeVal.Text   = ns;
                labelIntStandByVal.Text    = ns;
                groupBoxCurrInt.Text       = ns;
            }
            else
            {
                Statistics.InterfaceStatistics.InterfaceStatisticsInternal currInt = m_remoterServer.GetInterface(((Interface)InterfaceListView.SelectedItems[0]).Parent.myID_Internal);
                labelIntStateVal.Text      = currInt.GetState2String;
                labelIntActiveTimeVal.Text = currInt.ActiveTime.ToString();
                labelIntFailTimeVal.Text   = currInt.FailTime.ToString();
                labelIntStandByVal.Text    = currInt.StandbyTime.ToString();
                groupBoxCurrInt.Text       = currInt.ToString();
            }
        }
Exemplo n.º 2
0
 public Interface(Statistics.InterfaceStatistics.InterfaceStatisticsInternal statistics)
     : base(statistics.ToString())
 {
     myStatistics = statistics;
     //        myStatistics.UpdateInterfaceState +=
     //          new Statistics.Interface.InterfaceStateChanged(myInterfaceStat_UpdateInterfaceState);
     //        ObjectToRefresh.Add(this);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets the interface.
 /// </summary>
 /// <param name="index">The index.</param>
 /// <returns>selected (by index) interface</returns>
 public override InterfaceStatisticsInternal GetInterface(ulong index)
 {
     Statistics.InterfaceStatistics.InterfaceStatisticsInternal Interface =
         interfacelistpairs[index].GetStatisticsObjectUpdated();
     return(Interface);
 }