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()); } }
// 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"; } }