private void FillGridDefs() { if (_listDefsAll == null || _listDefsAll.Count == 0) { RefreshDefs(); } DefL.FillGridDefs(gridDefs, _selectedDefCatOpt, _listDefsCur); //the following do not require a refresh of the table: if (_selectedDefCatOpt.CanHide) { butHide.Visible = true; } else { butHide.Visible = false; } if (_selectedDefCatOpt.CanEditName) { groupEdit.Enabled = true; groupEdit.Text = Lans.g(this, "Edit Items"); } else { groupEdit.Enabled = false; groupEdit.Text = Lans.g(this, "Not allowed"); } textGuide.Text = _selectedDefCatOpt.HelpText; }
private void butDown_Click(object sender, EventArgs e) { if (DefL.DownClick(gridDefs)) { _isDefChanged = true; FillGridDefs(); } }
private void butUp_Click(object sender, EventArgs e) { if (DefL.UpClick(gridDefs, _listDefsCur)) { _isDefChanged = true; FillGridDefs(); } }
private void butHide_Click(object sender, EventArgs e) { if (DefL.HideDef(gridDefs, _selectedDefCatOpt)) { RefreshDefs(); FillGridDefs(); _isDefChanged = true; } }
private void gridDefs_CellDoubleClick(object sender, ODGridClickEventArgs e) { Def selectedDef = (Def)gridDefs.ListGridRows[e.Row].Tag; _isDefChanged = DefL.GridDefsDoubleClick(selectedDef, gridDefs, _selectedDefCatOpt, _listDefsCur, _listDefsAll, _isDefChanged); if (_isDefChanged) { RefreshDefs(); FillGridDefs(); } }
private void UserControlSetupWizDefinitions_Load(object sender, EventArgs e) { IsDone = true; //this is optional, so the user is done whenever they choose List <DefCat> listDefCats = new List <DefCat>(); //Only including the most important categories so the user is not intimidated with all the options. listDefCats.Add(DefCat.AccountColors); listDefCats.Add(DefCat.AdjTypes); listDefCats.Add(DefCat.AppointmentColors); listDefCats.Add(DefCat.ApptConfirmed); listDefCats.Add(DefCat.ApptProcsQuickAdd); listDefCats.Add(DefCat.AutoNoteCats); listDefCats.Add(DefCat.BillingTypes); listDefCats.Add(DefCat.BlockoutTypes); listDefCats.Add(DefCat.ChartGraphicColors); listDefCats.Add(DefCat.CommLogTypes); listDefCats.Add(DefCat.ImageCats); listDefCats.Add(DefCat.PaymentTypes); listDefCats.Add(DefCat.ProcCodeCats); listDefCats.Add(DefCat.RecallUnschedStatus); listDefCats.Add(DefCat.TxPriorities); List <DefCatOptions> listDefCatsOrdered = new List <DefCatOptions>(); listDefCatsOrdered = DefL.GetOptionsForDefCats(listDefCats.ToArray()); listDefCatsOrdered = listDefCatsOrdered.OrderBy(x => x.DefCat.GetDescription()).ToList(); //orders alphabetically. ODBoxItem <DefCatOptions> defCatItem; foreach (DefCatOptions defCOpt in listDefCatsOrdered) { defCatItem = new ODBoxItem <DefCatOptions>(Lans.g(this, defCOpt.DefCat.GetDescription()), defCOpt); listCategory.Items.Add(defCatItem); if (defCOpt.DefCat == listDefCatsOrdered[0].DefCat) { listCategory.SelectedItem = defCatItem; } } }