private void btnLoadBOMList_Click(object sender, EventArgs e) { try { if (openBOMListFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { lvBOMList.Items.Clear(); ListViewUtils.LoadListview(lvBOMList, openBOMListFileDialog.FileName); } } catch (Exception ex) { WriteStatus("btnLoadBOMList_Click ERROR: " + ex.ToString()); } }
void LoadLists() { // TODO: in future get these from xml setup file try { ListViewUtils.LoadListview(lvBOMList, AppSettings.WorkingFolder + @"\default.bomlst"); } catch { MessageBox.Show("Could not load bom list", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information); } try { txtIgnoreParts.Text = System.IO.File.ReadAllText(AppSettings.WorkingFolder + @"\parts.ignore"); } catch { MessageBox.Show("Could not load the parts to be ignored list", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information); } }