示例#1
0
 public void initializeSwitchTable()
 {
     foreach (TrackController ctrl in TrackControllerModule.activeControllers)
     {
         try{
             ListView temp = (ListView)this.Controls.Find(ctrl.controllerName + "SwitchListView", true)[0];
             temp.FullRowSelect = true;
             ListViewExtender     extendo      = new ListViewExtender(temp);
             ListViewButtonColumn buttonAction = new ListViewButtonColumn(3);
             buttonAction.Click     += changeSwitch;
             buttonAction.FixedWidth = true;
             extendo.AddColumn(buttonAction);
         }
         catch (Exception e)
         {
             Console.WriteLine(e);
         }
     }
 }
示例#2
0
 public void initializeCrossingTable()
 {
     foreach (TrackController ctrl in TrackControllerModule.activeControllers)
     {
         try
         {
             ListView temp = (ListView)this.Controls.Find(ctrl.controllerName + "CrossingListView", true)[0];
             Console.WriteLine("Found list view");
             Console.WriteLine(temp);
             temp.FullRowSelect = true;
             ListViewExtender     extendo      = new ListViewExtender(temp);
             ListViewButtonColumn buttonAction = new ListViewButtonColumn(2);
             buttonAction.Click     += toggleCrossing;
             buttonAction.FixedWidth = true;
             extendo.AddColumn(buttonAction);
         }
         catch (Exception e)
         {
             Console.WriteLine(e);
         }
     }
 }