private void FormChartProcedureEntryEdit_Load(object sender, System.EventArgs e) { AutoCodes.RefreshCache(); ProcButtonItems.RefreshCache(); if (IsNew) { this.Text = Lan.g(this, "Add Procedure Button"); } else { this.Text = Lan.g(this, "Edit Procedure Button"); } textDescript.Text = ProcButtonCur.Description; _listProcButtonCatDefs = Defs.GetDefsForCategory(DefCat.ProcButtonCats, true); for (int i = 0; i < _listProcButtonCatDefs.Count; i++) { comboCategory.Items.Add(_listProcButtonCatDefs[i].ItemName); if (ProcButtonCur.Category == _listProcButtonCatDefs[i].DefNum) { comboCategory.SelectedIndex = i; } } if (comboCategory.SelectedIndex == -1) { comboCategory.SelectedIndex = 0; //we know that there will always be at least one cat. Validated in FormProcButtons } pictureBox.Image = PIn.Bitmap(ProcButtonCur.ButtonImage); checkMultiVisit.Checked = ProcButtonCur.IsMultiVisit; long[] codeNumList = ProcButtonItems.GetCodeNumListForButton(ProcButtonCur.ProcButtonNum); long[] auto = ProcButtonItems.GetAutoListForButton(ProcButtonCur.ProcButtonNum); listADA.Items.Clear(); for (int i = 0; i < codeNumList.Length; i++) { listADA.Items.Add(ProcedureCodes.GetStringProcCode(codeNumList[i])); } listAutoCodes.Items.Clear(); _listShortDeep = AutoCodes.GetListDeep(true); for (int i = 0; i < _listShortDeep.Count; i++) { listAutoCodes.Items.Add(_listShortDeep[i].Description); for (int j = 0; j < auto.Length; j++) { if (auto[j] == _listShortDeep[i].AutoCodeNum) { listAutoCodes.SetSelected(i, true); break; } } } //fill images to pick from for (int i = 0; i < imageList.Images.Count; i++) { listView.Items.Add("", i); } }
private void FillList() { AutoCodes.RefreshCache(); listAutoCodes.Items.Clear(); _listAutoCodes = AutoCodes.GetListDeep(); foreach (AutoCode autoCode in _listAutoCodes) { if (autoCode.IsHidden) { listAutoCodes.Items.Add(autoCode.Description + "(hidden)"); } else { listAutoCodes.Items.Add(autoCode.Description); } } }