/// <summary> /// Exibe o formulário para alteração da descrição /// </summary> /// <param name="form">Formulário onde está o controle</param> /// <param name="pControl">Nome do Controle</param> /// <param name="pColumn">Nome da Coluna</param> /// <param name="pDesc">Descrição atual do controle</param> private void ShowPropertyForm(Nampula.UI.Form pForm, string pControl, string pColumn, string pDesc) { var userControl = GetUserControlOrNull(pForm.Name, pControl, pColumn); if (userControl == null) { userControl = CreateUserControlProperty(); userControl.Form = pForm.Name; userControl.Control = pControl; userControl.Column = pColumn; userControl.Caption = pDesc; } else { userControl.StateRecord = eState.eUpdate; } using (var form = new frmSettingDescription(userControl, pDesc)) { if (form.ShowDialog(pForm) == DialogResult.OK) { SetLabels(pForm); } } }
private void SetForm(Nampula.UI.Form pForm) { pForm.KeyPreview = true; SetControlEvents(pForm.Controls); SetLabels(pForm); }
/// <summary> /// Atribui as legendas a tela /// </summary> /// <param name="pForm">Formulário</param> private void SetLabels(Nampula.UI.Form pForm) { var userControl = CreateUserControlProperty(); var query = new TableQuery(userControl); query.Where.Add(new QueryParam(userControl.Collumns[UserControlProperty.FieldsName.Form], pForm.Name)); var listProperty = userControl.FillCollection <UserControlProperty>(query); if (!listProperty.IsEmpty()) { SetLabels(pForm.Controls, listProperty); } }
/// <summary> /// Construtor padrão /// </summary> /// <param name="pDB"></param> public DinamicInterfaceService(DataBaseAdapter pDB, Nampula.UI.Form pForm) { db = pDB; this.CreateNotExists(); this.SetForm(pForm); }