private void LoadListTransmit() { // returns a string array of the available filter types from the XMLInterfaces string[] transmittypes = XMLInterfaces.ReturnTransmitTypes(_path); Transmit_id.Text = _id; txtPacketName.Text = _packetname; try { _data = Regex.Replace(_data, @"\s", ""); _data.Replace(" ", ""); Transmit_msg0.Text = _data.Substring(0, 2); Transmit_msg1.Text = _data.Substring(2, 2); Transmit_msg2.Text = _data.Substring(4, 2); Transmit_msg3.Text = _data.Substring(6, 2); Transmit_msg4.Text = _data.Substring(8, 2); Transmit_msg5.Text = _data.Substring(10, 2); Transmit_msg6.Text = _data.Substring(12, 2); txtCarType.Text = findCarName(_id, _data); //txtCarType.Visible = true; //useful for next versions } catch (Exception ex) { FileLog.Log("problem using regular expression" + ex.ToString()); } }
//*********************************** //Fill out the form //Written by Parnian Najafi Borazjani //*********************************** private void LoadListTransmit() { // Clear any current items TransmitList.Items.Clear(); // returns a string array of the available filter types from the XMLInterfaces string[] transmittypes = XMLInterfaces.ReturnTransmitTypes(_path); // for each string in the string array an item is added to the filterlist if (transmittypes != null) { for (int x = 0; x < transmittypes.Length; x++) { TransmitList.Items.Add(transmittypes[x]); } } Transmit_id.Text = _id; try { _data = Regex.Replace(_data, @"\s", ""); _data.Replace(" ", ""); //MessageBox.Show(_data); Transmit_msg0.Text = _data.Substring(0, 2); Transmit_msg1.Text = _data.Substring(2, 2); Transmit_msg2.Text = _data.Substring(4, 2); Transmit_msg3.Text = _data.Substring(6, 2); Transmit_msg4.Text = _data.Substring(8, 2); Transmit_msg5.Text = _data.Substring(10, 2); Transmit_msg6.Text = _data.Substring(12, 2); } catch (Exception ex) { FileLog.Log("problem using regular expression" + ex.ToString()); } }
private void AddVehicle_Click(object sender, EventArgs e) { if (vehicle.Text.ToString() == "") { MainWindow.ErrorDisplayString("Error Adding Vehicle: no name provided"); return; } XMLInterfaces.AddVehicle(vehicle.Text.ToString()); //LoadFilters(); ////***** Must be fixed }
// Loads the available transmission buttons from the xml file into the transmit listing private void LoadListTransmit() { // Clear any current items TransmitList.Items.Clear(); // returns a string array of the available filter types from the XMLInterfaces string[] transmittypes = XMLInterfaces.ReturnTransmitTypes(ConfigFiles.Settings1.Default.filterURI); // for each string in the string array an item is added to the filterlist if (transmittypes != null) { for (int x = 0; x < transmittypes.Length; x++) { TransmitList.Items.Add(transmittypes[x]); } toolStripStatusLabel2.Text = "Find Transmit Cars"; } }
// Loads the available filters from the xml file into the filter tab listing private void LoadFilters() { // Clear any current items FilterList.Items.Clear(); // returns a string array of the available filter types from the XMLInterfaces string[] cartypes = XMLInterfaces.ReturnCarTypes(); // for each string in the string array an item is added to the filterlist if (cartypes != null) { for (int x = 0; x < cartypes.Length; x++) { FilterList.Items.Add(cartypes[x]); } toolStripStatusLabel1.Text = "Find Filters"; } }
private void TransmitList_SelectedIndexChanged(object sender, EventArgs e) { TransmitBox.Columns.Clear(); TransmitBox.Items.Clear(); TransmitBox.Columns.Add("Name", 135, HorizontalAlignment.Left); TransmitBox.Columns.Add("Packet Type", 85, HorizontalAlignment.Left); string[] packets = XMLInterfaces.ReturnPackets(TransmitList.SelectedItem.ToString()); for (int y = 0; y < packets.Length; y++) { string[] output = packets[y].Split(';'); ListViewItem item = new ListViewItem(output); TransmitBox.Items.AddRange(new ListViewItem[] { item }); } //// Sets all of the variables for the selected filter //TransmitFilter = TransmitList.SelectedItem.ToString(); //TransmitLoadLabel.Text = TransmitList.SelectedItem.ToString(); }
private void RemoveVehicle_Click(object sender, EventArgs e) { XMLInterfaces.DeleteVehicle(vehicle.Text); this.Close(); }