示例#1
0
        /// <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);
                }
            }
        }
示例#2
0
        private void SetForm(Nampula.UI.Form pForm)
        {
            pForm.KeyPreview = true;

            SetControlEvents(pForm.Controls);

            SetLabels(pForm);
        }
示例#3
0
        /// <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);
            }
        }
示例#4
0
 /// <summary>
 /// Construtor padrão
 /// </summary>
 /// <param name="pDB"></param>
 public DinamicInterfaceService(DataBaseAdapter pDB, Nampula.UI.Form pForm)
 {
     db = pDB;
     this.CreateNotExists();
     this.SetForm(pForm);
 }