示例#1
0
 private void filllvwRouteStatus()
 {
     lvwRouteStatus.Items.Clear();
     for (int i = 0; i < clsHdRouteStatus.RowCount; i++)
     {
         clsHdRouteStatus.setDataRow(i);
         ListViewItem lvi = new ListViewItem(clsHdRouteStatus.RouteTitle);
         lvi.Tag = clsHdRouteStatus.HDRoute;
         lvi.SubItems.Add(clsHdRouteStatus.NbrClients.ToString());
         lvi.SubItems.Add(parmStatus.GetLongName(Convert.ToInt32(clsHdRouteStatus.RouteStatus)));
         lvi.SubItems.Add(clsHdRouteStatus.HDRoute.ToString());
         lvwRouteStatus.Items.Add(lvi);
     }
 }
示例#2
0
        private void filllvwRouteStatus()
        {
            loading = true;
            cntrRoutesStatusInit();
            lvwRouteStatus.Items.Clear();
            for (int i = 0; i < clsHDRouteSheet.RowCount; i++)
            {
                clsHDRouteSheet.setDataRow(i);
                ListViewItem lvi = new ListViewItem(clsHDRouteSheet.RouteTitle);
                lvi.Tag = clsHDRouteSheet.RouteStatus;
                lvi.SubItems.Add(clsHDRouteSheet.NbrClients.ToString());
                lvi.SubItems.Add(parmHDRouteSheetStatus.GetLongName(Convert.ToInt32(clsHDRouteSheet.RouteStatus)));
                lvi.SubItems.Add(clsHDRouteSheet.HDRoute.ToString());
                lvi.SubItems.Add(clsHDRouteSheet.ID.ToString());

                switch (clsHDRouteSheet.RouteStatus)
                {
                case 0:
                    lvi.BackColor = Color.LightSalmon;
                    break;

                case 1:
                    lvi.BackColor = Color.LightCyan;
                    break;

                case 2:
                    lvi.BackColor = Color.LightSteelBlue;
                    break;

                case 3:
                    lvi.BackColor = Color.LightSeaGreen;
                    break;

                default:
                    break;
                }
                lvwRouteStatus.Items.Add(lvi);
            }
            EnableRouteControls(true);
            loading = false;
        }