/// <summary> /// Functio that clears up SessionData and Setup file with it HashDictionary. /// </summary> /// <param name="index">Index of the SessionData that has to be cleared out.</param> public static void RemoveSessionDataAndRelatedFiles(int index) { if (index < SDList.Count) { SetupFileHandler.DeleteSetupFileAndItsHashDictionary(SDList[index].SetupFileName); SDList.RemoveAt(index); } }
private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e) { if (SessionHandler.SDList.Count > selectedIndex) { selectedIndex = e.RowIndex; currentTcpSettings = SetupFileHandler.ReadTCPSettingsFromFile(SessionHandler.SDList[e.RowIndex].SetupFileName); } }
private void newSessionBtn_Click(object sender, EventArgs e) { NewSessionForm nsf = new NewSessionForm(); if (nsf.ShowDialog() == DialogResult.OK) { SessionHandler.DisplayThisSessionDataOnDataGridView(ref dataGridView1, nsf.SD); SessionHandler.SDList.Add(nsf.SD); SetupFileHandler.WriteTCPSettingToFile("Setups\\" + nsf.SD.SessionName + ".ini", nsf.SD.SessionName + ".HaDI", new TCPSettings(nsf.SD, 100000)); SessionHandler.WriteAllSessionData(); } }
private void newSessionBtn_Click(object sender, EventArgs e) { NewSessionForm nsf = new NewSessionForm(); nsf.StartPosition = FormStartPosition.CenterParent; if (nsf.ShowDialog() == DialogResult.OK) { SessionHandler.SDList.Add(nsf.SD); SetupFileHandler.WriteTCPSettingToFile("Setups\\" + nsf.SD.SessionName + ".ini", nsf.SD.SessionName + ".HaDI", new TCPSettings(nsf.SD, 100000)); SessionHandler.WriteAllSessionData(); SessionHandler.DisplayThisSessionDataOnDataGridView(ref dataGridView1, nsf.SD); dataGridView1.Rows[dataGridView1.Rows.Count - 1].Selected = true; } }