private void FillForm() { //this is not refined enough to be called more than once on the form because it will not //remember the toolbars that were selected. ToolButItems.Refresh(); ProgramProperties.Refresh(); textProgName.Text = ProgramCur.ProgName; textProgDesc.Text = ProgramCur.ProgDesc; checkEnabled.Checked = ProgramCur.Enabled; textPath.Text = ProgramCur.Path; textCommandLine.Text = ProgramCur.CommandLine; textNote.Text = ProgramCur.Note; ToolButItems.GetForProgram(ProgramCur.ProgramNum); listToolBars.Items.Clear(); for (int i = 0; i < Enum.GetNames(typeof(ToolBarsAvail)).Length; i++) { listToolBars.Items.Add(Enum.GetNames(typeof(ToolBarsAvail))[i]); } for (int i = 0; i < ToolButItems.ForProgram.Count; i++) { listToolBars.SetSelected((int)((ToolButItem)ToolButItems.ForProgram[i]).ToolBar, true); } if (ToolButItems.ForProgram.Count > 0) //the text on all buttons will be the same for now { textButtonText.Text = ((ToolButItem)ToolButItems.ForProgram[0]).ButtonText; } ProgramPropertiesForProgram = ProgramProperties.GetForProgram(ProgramCur.ProgramNum); listProperties.Items.Clear(); for (int i = 0; i < ProgramPropertiesForProgram.Count; i++) { listProperties.Items.Add(((ProgramProperty)ProgramPropertiesForProgram[i]).PropertyDesc + ": " + ((ProgramProperty)ProgramPropertiesForProgram[i]).PropertyValue); } }
private void FillForm() { //ComboClinic is filled in the load method if (PIn.Int(_patNumOrChartNum.PropertyValue) == 1) { radioChart.Checked = true; } else { radioPatient.Checked = true; } List <ToolButItem> listToolButItems = ToolButItems.GetForProgram(_progCur.ProgramNum); listToolBars.Items.Clear(); for (int i = 0; i < Enum.GetNames(typeof(ToolBarsAvail)).Length; i++) { listToolBars.Items.Add(Enum.GetNames(typeof(ToolBarsAvail))[i]); } for (int i = 0; i < listToolButItems.Count; i++) { listToolBars.SetSelected((int)listToolButItems[i].ToolBar, true); } checkEnabled.Checked = _progCur.Enabled; textPath.Text = _progCur.Path; textButtonText.Text = listToolButItems[0].ButtonText; pictureBox.Image = PIn.Bitmap(_progCur.ButtonImage); try { textInfoFile.Text = _infoFilePath.PropertyValue; _pathOverrideOld = ProgramProperties.GetLocalPathOverrideForProgram(_progCur.ProgramNum); textOverride.Text = _pathOverrideOld; if (_dictLocationIDs.ContainsKey(_clinicNumCur)) { textLocationID.Text = _dictLocationIDs[_clinicNumCur].PropertyValue; } } catch (Exception) { MsgBox.Show(this, "You are missing a program property from the database. Please call support to resolve this issue."); DialogResult = DialogResult.Cancel; return; } }
private void FillForm() { //this is not refined enough to be called more than once on the form because it will not //remember the toolbars that were selected. ToolButItems.RefreshCache(); ProgramProperties.RefreshCache(); textProgName.Text = ProgramCur.ProgName; textProgDesc.Text = ProgramCur.ProgDesc; checkEnabled.Checked = ProgramCur.Enabled; textPath.Text = ProgramCur.Path; textCommandLine.Text = ProgramCur.CommandLine; textPluginDllName.Text = ProgramCur.PluginDllName; textNote.Text = ProgramCur.Note; pictureBox.Image = PIn.Bitmap(ProgramCur.ButtonImage); List <ToolButItem> itemsForProgram = ToolButItems.GetForProgram(ProgramCur.ProgramNum); listToolBars.Items.Clear(); for (int i = 0; i < Enum.GetNames(typeof(ToolBarsAvail)).Length; i++) { listToolBars.Items.Add(Enum.GetNames(typeof(ToolBarsAvail))[i]); } for (int i = 0; i < itemsForProgram.Count; i++) { listToolBars.SetSelected((int)itemsForProgram[i].ToolBar, true); } if (!AllowToolbarChanges) //As we add more static bridges, we will need to enhance this to show/hide controls as needed. { listToolBars.ClearSelected(); listToolBars.Enabled = false; } if (itemsForProgram.Count > 0) //the text on all buttons will be the same for now { textButtonText.Text = itemsForProgram[0].ButtonText; } FillGrid(); }
public FormBencoSetup() { InitializeComponent(); _prog = Programs.GetCur(ProgramName.BencoPracticeManagement); _listToolButs = ToolButItems.GetForProgram(_prog.ProgramNum); //Only set up for Main Toolbar }