Example #1
0
 private void AddToListView(SendDataFromFile sdf, string[] sc)
 {
     string simNm = sc[0];
     string[] scList = new string[] { sc[0], sc[1], sc[2], "Stopped" };
     ListViewItem itm = new ListViewItem(scList);
     simList.Items.Add(itm);
     Button b = new Button();
     b.Text = "Start";
     b.BackColor = SystemColors.Control;
     b.Font = this.Font;
     b.Name = simNm;
     b.Click += new EventHandler(b_Actions);
     int cnta = simList.Items.IndexOf(itm);
     simList.AddEmbeddedControl(b, 4, cnta);
     simList.Items[cnta].ForeColor = Color.Red;
     _manifest.Add(simNm, new Manifest { allContents = sc, ctrlBtn = b, currentAction = 0, listIndex = itm, sdf = sdf });
 }
Example #2
0
 private void AddLogger(string[] sc)
 {
     int prt = Int32.Parse(sc[1]);
     string fileNm = sc[3];
     int delay = Int32.Parse(sc[2]);
     TcpClientActions tca = new TcpClientActions(prt);
     SendDataFromFile sdf = new SendDataFromFile(tca, fileNm, delay, sc[0]);
     sdf.SimStatusChanged +=new SendDataFromFile.SimStatusChangedEventHandler(sdf_SimStatusChanged);
     AddToListView(sdf, sc);
 }