Ejemplo n.º 1
0
        public void TestClickSecondItemDocksNewControlInForm()
        {
            //---------------Set up test pack-------------------

            HabaneroMenu habaneroMenu = CreateHabaneroMenuFullySetup();
            HabaneroMenu submenu      = habaneroMenu.AddSubMenu(TestUtil.GetRandomString());

            HabaneroMenu.Item menuItem1            = submenu.AddMenuItem(TestUtil.GetRandomString());
            IFormControl      expectedFormControl1 = CreateFormControlStub();

            menuItem1.FormControlCreator += (() => expectedFormControl1);
            HabaneroMenu.Item menuItem2            = submenu.AddMenuItem(TestUtil.GetRandomString());
            IFormControl      expectedFormControl2 = CreateFormControlStub();

            menuItem2.FormControlCreator += (() => expectedFormControl2);

            IMenuBuilder      menuBuilder = CreateMenuBuilder();
            IMainMenuHabanero menu        = menuBuilder.BuildMainMenu(habaneroMenu);

            menu.DockInForm(habaneroMenu.Form);
            IMenuItem formsMenuItem1 = menu.MenuItems[0].MenuItems[0];
            IMenuItem formsMenuItem2 = menu.MenuItems[0].MenuItems[1];

            formsMenuItem1.PerformClick();

            //-------------Assert Preconditions -------------
            AssertControlDockedInForm((IControlHabanero)expectedFormControl1, (IFormHabanero)habaneroMenu.Form);

            //---------------Execute Test ----------------------
            formsMenuItem2.PerformClick();

            //---------------Test Result -----------------------
            AssertControlDockedInForm((IControlHabanero)expectedFormControl2, (IFormHabanero)habaneroMenu.Form);
        }
Ejemplo n.º 2
0
 public Principal(
     IUsuarioDAL usuarioDAL,
     IDetalleVenta venta_De_Productos,
     IABMUsuario abmUsuario,
     IBitacoraUI bitacora,
     IFormControl formControl,
     IFamilias familias,
     IFamiliaBLL familiaBLL,
     IDatosUsuario datosUsuario,
     IBackupUI backupUI,
     IRestoreUI restoreUI,
     IProductos productosUI,
     IVentaUI ventaUI)
 {
     InitializeComponent();
     this.formControl        = formControl;
     this.usuarioDAL         = usuarioDAL;
     this.venta_De_Productos = venta_De_Productos;
     this.abmUsuario         = abmUsuario;
     this.bitacora           = bitacora;
     this.familias           = familias;
     this.familiaBLL         = familiaBLL;
     this.datosUsuario       = datosUsuario;
     this.backupUI           = backupUI;
     this.restoreUI          = restoreUI;
     this.productosUI        = productosUI;
     this.ventaUI            = ventaUI;
 }
Ejemplo n.º 3
0
 public ABMusuario(
     IBitacoraBLL bitacoraBLL,
     IFormControl formControl,
     IFamiliaBLL familiasBLL,
     IPatenteBLL patenteBLL,
     IDigitoVerificador digitoVerificador,
     IBloqueoUsuario bloqueoUsuario,
     IIdiomaBLL idiomaBLL,
     IAdminPat adminPat,
     IAdminFam adminFam,
     INegarPat negarPat,
     ITraductor traductor)
 {
     this.bitacoraBLL       = bitacoraBLL;
     this.formControl       = formControl;
     this.familiasBLL       = familiasBLL;
     this.patenteBLL        = patenteBLL;
     this.digitoVerificador = digitoVerificador;
     this.bloqueoUsuario    = bloqueoUsuario;
     this.idiomaBLL         = idiomaBLL;
     this.negarPat          = negarPat;
     this.adminFam          = adminFam;
     this.adminPat          = adminPat;
     this.traductor         = traductor;
     InitializeComponent();
     dgusuario.AutoGenerateColumns = false;
 }
Ejemplo n.º 4
0
 public DatosUsuario(IFormControl formControl, IUsuarioBLL usuarioBLL, IDigitoVerificador digitoVerificador)
 {
     this.usuarioBLL        = usuarioBLL;
     this.formControl       = formControl;
     this.digitoVerificador = digitoVerificador;
     InitializeComponent();
 }
Ejemplo n.º 5
0
        public void TestClickMenuItemTwiceOnlyLeavesSameControlDocked()
        {
            //---------------Set up test pack-------------------
            HabaneroMenu habaneroMenu = CreateHabaneroMenuFullySetup();
            HabaneroMenu submenu      = habaneroMenu.AddSubMenu(TestUtil.GetRandomString());

            HabaneroMenu.Item menuItem            = submenu.AddMenuItem(TestUtil.GetRandomString());
            IFormControl      expectedFormControl = CreateFormControlStub();

            menuItem.FormControlCreator += (() => expectedFormControl);
            IMenuBuilder      menuBuilder = CreateMenuBuilder();
            IMainMenuHabanero menu        = menuBuilder.BuildMainMenu(habaneroMenu);

            menu.DockInForm(habaneroMenu.Form);
            IMenuItem formsMenuItem = menu.MenuItems[0].MenuItems[0];

            formsMenuItem.PerformClick();

            //-------------Assert Preconditions -------------
            AssertControlDockedInForm((IControlHabanero)expectedFormControl, (IFormHabanero)habaneroMenu.Form);

            //---------------Execute Test ----------------------
            formsMenuItem.PerformClick();

            //---------------Test Result -----------------------
            AssertControlDockedInForm((IControlHabanero)expectedFormControl, (IFormHabanero)habaneroMenu.Form);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 初始化模型表单控件
 /// </summary>
 /// <typeparam name="TModel">模型类型</typeparam>
 /// <typeparam name="TProperty">属性类型</typeparam>
 /// <param name="control">表单控件</param>
 /// <param name="expression">属性表达式</param>
 /// <param name="member">成员</param>
 public static void InitModelControl <TModel, TProperty>(IFormControl control, Expression <Func <TModel, TProperty> > expression, MemberInfo member)
 {
     control.Name(Util.Helpers.String.FirstLowerCase(Lambda.GetName(expression)));
     control.Placeholder(Reflection.GetDisplayNameOrDescription(member));
     InitModel(control, expression);
     InitRequired(control, expression);
 }
        public void ProjectFormTest()
        {
            // Dumy Code for Load App.Management Assembly

            // Find All EntityForm in Solution
            var         b          = AppDomain.CurrentDomain.GetAssemblies();
            var         assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(asembly => asembly.FullName.StartsWith("App.")).ToList();;
            List <Type> ListOfEntityFormControl = new List <Type>();
            var         Assemblies = GetListOfEntryAssemblyWithReferences();

            foreach (var asembly in Assemblies)
            {
                ListOfEntityFormControl
                .AddRange(
                    asembly.GetTypes()
                    .Where(type => type.GetInterfaces().Contains(typeof(IFormControl)))
                    );
            }

            // Test Each EntityFormControl
            foreach (Type typeEntityFormControl in ListOfEntityFormControl)
            {
                // Create EntityFormControl Instance
                IFormControl EntityFormContol = Activator.CreateInstance(typeEntityFormControl) as IFormControl;

                // Create test object value
                BaseEntity entityValye = Activator.CreateInstance(EntityFormContol.TypeOfEntity) as BaseEntity;

                //project.Title = "Category 1";
                //project.Id = 1;
                //project.Ordre = 1;
                //project.DateCreation = DateTime.Now;
                //project.DateModification = DateTime.Now;
                //project.Description = "Description 1";

                //// Write value
                //projectForm.Value = project;
                //PrivateObject privateObject = new PrivateObject(projectForm);
                //TextBox TitleTextBox = privateObject.GetFieldOrProperty("titleTextBox") as TextBox;
                //Assert.AreEqual(TitleTextBox.Text, project.Title);

                //// Read value
                //Project readedProject = projectForm.Value as Project;

                //Assert.AreEqual(project.Title, readedProject.Title);
                //Assert.AreEqual(project.Id, readedProject.Id);
                //Assert.AreEqual(project.DateCreation, readedProject.DateCreation);
                //Assert.AreEqual(project.DateModification, readedProject.DateModification);
                //Assert.AreEqual(project.Description, readedProject.Description);
            }



            // Affichage du rapprot de Test
            string msg = string.Format("Test de {0} Form", ListOfEntityFormControl.Count);

            MessageBox.Show(msg);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 初始化模型
        /// </summary>
        private static void InitModel <TModel, TProperty>(IFormControl control, Expression <Func <TModel, TProperty> > expression)
        {
            var model = GetModel(expression);

            if (string.IsNullOrWhiteSpace(model))
            {
                return;
            }
            control.Model(model);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 初始化必填项验证
        /// </summary>
        private static void InitRequired <TModel, TProperty>(IFormControl control, Expression <Func <TModel, TProperty> > expression)
        {
            var attribute = Lambda.GetAttribute <RequiredAttribute>(expression);

            if (attribute == null)
            {
                return;
            }
            control.Required(attribute.ErrorMessage);
        }
Ejemplo n.º 10
0
 private void Form1_Load(object sender, EventArgs e)
 {
     this.AcceptButton = btn_ingresar;
     log           = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     PrincipalForm = IoCContainer.Resolve <IPrincipal>();
     usuarioBLL    = IoCContainer.Resolve <IUsuarioBLL>();
     formControl   = IoCContainer.Resolve <IFormControl>();
     CargarCombo();
     formControl.LenguajeSeleccionado = (Idioma)cbo_idioma.SelectedItem;
     Traduccir();
     ComprobarBaseDeDatos();
 }
Ejemplo n.º 11
0
        /// <summary>
        ///   Changes render behavior to add on
        /// </summary>
        /// <returns>The updated form control</returns>
        public static IFormControl <TModel, TValue> WithDefaultBehavior <TModel, TValue>(
            this IFormControl <TModel, TValue> control)
        {
            IBootstrapFormComponent <TModel, TValue> component = control.Component as IBootstrapFormComponent <TModel, TValue>;

            if (component == null)
            {
                return(control);
            }

            component.WithDefaultBehavior();

            return(control);
        }
Ejemplo n.º 12
0
 public void DoClick()
 {
     try
     {
         if (_habaneroMenuItem.CustomHandler != null)
         {
             _habaneroMenuItem.CustomHandler(this, new EventArgs());
         }
         else
         {
             IControlHabanero control;
             if (_habaneroMenuItem.Form == null || _habaneroMenuItem.Form.Controls.Count <= 0)
             {
                 return;
             }
             if (_habaneroMenuItem.FormControlCreator != null)
             {
                 if (_formControl == null)
                 {
                     _formControl = _habaneroMenuItem.FormControlCreator();
                 }
                 _formControl.SetForm(null);
                 control = (IControlHabanero)_formControl;
             }
             else if (_habaneroMenuItem.ControlManagerCreator != null)
             {
                 if (_controlManager == null)
                 {
                     _controlManager = _habaneroMenuItem.ControlManagerCreator(_habaneroMenuItem.ControlFactory);
                 }
                 control = _controlManager.Control;
             }
             else
             {
                 throw new Exception
                           ("Please set up the MenuItem with at least one Creational or custom handling delegate");
             }
             control.Dock = Base.DockStyle.Fill;
             IControlHabanero controlToNestIn = _habaneroMenuItem.Form.Controls[0];
             controlToNestIn.Controls.Clear();
             controlToNestIn.Controls.Add(control);
         }
     }
     catch (Exception ex)
     {
         GlobalRegistry.UIExceptionNotifier.Notify(ex, null, null);
     }
 }
Ejemplo n.º 13
0
        /// <summary>
        /// Sets the current control to the one with the specified heading
        /// </summary>
        /// <param name="heading">The heading</param>
        /// <returns>Returns the relevant IFormControl object</returns>
        public IFormControl SetCurrentControl(String heading)
        {
            if (_formsbyHeading == null)
            {
                _formsbyHeading = new Hashtable();
                _formsbyForm    = new Hashtable();
            }
            if (_formsbyHeading.Contains(heading))
            {
                IFormHabanero frm = (IFormHabanero)_formsbyHeading[heading];
                if (_fontSize != 0.0f)
                {
                    frm.Font = new Font(frm.Font.FontFamily, _fontSize);
                }
                frm.Show();
                frm.Refresh();
                frm.Focus();
                frm.PerformLayout();
                return((IFormControl)frm.Controls[0]);
            }
            IFormControl formCtl = GetFormControl(heading);

            IFormHabanero newMdiForm = _controlFactory.CreateForm();

            newMdiForm.Width       = 800;
            newMdiForm.Height      = 600;
            newMdiForm.MdiParent   = _parentForm;
            newMdiForm.WindowState = FormWindowState.Maximized;

            //IControlHabanero ctl = formCtl;

            newMdiForm.Text = heading;
            newMdiForm.Controls.Clear();
            BorderLayoutManager layoutManager = _controlFactory.CreateBorderLayoutManager(newMdiForm);

            layoutManager.AddControl((IControlHabanero)formCtl, BorderLayoutManager.Position.Centre);
            newMdiForm.Show();
            _formsbyHeading.Add(heading, newMdiForm);
            _formsbyForm.Add(newMdiForm, heading);
            formCtl.SetForm(newMdiForm);
            newMdiForm.Closed += MdiFormClosed;

            return(formCtl);
        }
Ejemplo n.º 14
0
        public void TestSetFormControlCreator()
        {
            //---------------Set up test pack-------------------
            FormControlStub formControlStub = new FormControlStub();

            HabaneroMenu.Item menuItem = new HabaneroMenu.Item(null, TestUtil.GetRandomString());
            //---------------Assert PreConditions---------------
            Assert.IsNull(menuItem.FormControlCreator);
            //---------------Execute Test ----------------------
            menuItem.FormControlCreator += (() => formControlStub);
            IFormControl formControl = menuItem.FormControlCreator();

            //---------------Test Result -----------------------
            Assert.IsNotNull(menuItem.FormControlCreator);
            Assert.IsNotNull(formControl);
            Assert.IsInstanceOf(typeof(FormControlStub), formControl);
            Assert.AreSame(formControlStub, formControl);
            //---------------Tear Down -------------------------
        }
Ejemplo n.º 15
0
 public DetalleVentaUI(
     IVentaBLL ventaBLL,
     IDetalleVentaBLL detalleVentaBLL,
     IProductoBLL productoBLL,
     IProductos productos,
     IClienteBLL clienteBLL,
     IClientes cliente,
     IFormControl formControl,
     ITraductor traductor)
 {
     this.ventaBLL        = ventaBLL;
     this.detalleVentaBLL = detalleVentaBLL;
     this.productoBLL     = productoBLL;
     this.productos       = productos;
     this.cliente         = cliente;
     this.clienteBLL      = clienteBLL;
     this.formControl     = formControl;
     this.traductor       = traductor;
     InitializeComponent();
     dgDetalleVta.AutoGenerateColumns = false;
 }
Ejemplo n.º 16
0
        public void DoClick()
        {
            try
            {
                if (_habaneroMenuItem.CustomHandler != null)
                {
                    _habaneroMenuItem.CustomHandler(this, new EventArgs());
                }
                else
                {
                    if (ReshowForm())
                    {
                        return;
                    }
                    if (_habaneroMenuItem.Form == null || _habaneroMenuItem.Form.Controls.Count <= 0)
                    {
                        return;
                    }
                    _createdForm             = _habaneroMenuItem.ControlFactory.CreateForm();
                    _createdForm.Width       = 800;
                    _createdForm.Height      = 600;
                    _createdForm.MdiParent   = (IFormHabanero)_habaneroMenuItem.Form;
                    _createdForm.WindowState = Habanero.Faces.Base.FormWindowState.Maximized;
                    _createdForm.Text        = _habaneroMenuItem.Name;
                    //Deerasha 2009/11/26: Line below prevents the std VS icon from appearing on form's upper right
                    ((Form)_createdForm).ShowIcon = false;
                    _createdForm.Controls.Clear();

                    BorderLayoutManager layoutManager = _habaneroMenuItem.ControlFactory.CreateBorderLayoutManager
                                                            (_createdForm);

                    IControlHabanero control;
                    if (_habaneroMenuItem.FormControlCreator != null)
                    {
                        _formControl = _habaneroMenuItem.FormControlCreator();
                        _formControl.SetForm(_createdForm);
                        control = (IControlHabanero)_formControl;
                    }
                    else if (_habaneroMenuItem.ControlManagerCreator != null)
                    {
                        _controlManager = _habaneroMenuItem.ControlManagerCreator(_habaneroMenuItem.ControlFactory);
                        control         = _controlManager.Control;
                    }
                    else
                    {
                        throw new Exception
                                  ("Please set up the MenuItem with at least one Creational or custom handling delegate");
                    }
                    layoutManager.AddControl(control, BorderLayoutManager.Position.Centre);
                    _createdForm.Show();
                    _createdForm.Closed += delegate
                    {
                        _createdForm    = null;
                        _formControl    = null;
                        _controlManager = null;
                    };
                }
            }
            catch (Exception ex)
            {
                GlobalRegistry.UIExceptionNotifier.Notify(ex, null, null);
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// This actually executes the Code when PerformClick is selected <see cref="T:Habanero.Faces.Base.IMenuItem" />.
        /// </summary>
        public void DoClick()
        {
            try
            {
                if (_habaneroMenuItem.CustomHandler != null)
                {
                    _habaneroMenuItem.CustomHandler(this, new EventArgs());
                }
                else
                {
                    IControlHabanero control;
                    if (_habaneroMenuItem.Form == null || _habaneroMenuItem.Form.Controls.Count <= 0)
                    {
                        return;
                    }
                    if (_habaneroMenuItem.FormControlCreator != null)
                    {
                        if (_formControl == null)
                        {
                            _formControl = _habaneroMenuItem.FormControlCreator();
                        }
                        _formControl.SetForm(null);
                        control = (IControlHabanero)_formControl;
                    }
                    else if (_habaneroMenuItem.ControlManagerCreator != null)
                    {
                        if (_controlManager == null)
                        {
                            _controlManager = _habaneroMenuItem.ControlManagerCreator(_habaneroMenuItem.ControlFactory);
                        }
                        control = _controlManager.Control;
                    }
                    else
                    {
                        throw new Exception
                                  ("Please set up the MenuItem with at least one Creational or custom handling delegate");
                    }
                    control.Dock = Habanero.Faces.Base.DockStyle.Fill;

                    // support the menu control either being the top control of the form, or the first subcontrol of the top control
                    SplitContainer splitContainer;
                    if (_habaneroMenuItem.Form.Controls[0] is SplitContainer)
                    {
                        splitContainer = (SplitContainer)_habaneroMenuItem.Form.Controls[0];
                    }
                    else
                    {
                        splitContainer = (SplitContainer)_habaneroMenuItem.Form.Controls[0].Controls[0];
                    }
                    SplitterPanel      panel2          = splitContainer.Panel2;
                    MainEditorPanelWin mainEditorPanel = (MainEditorPanelWin)panel2.Controls[0];
                    mainEditorPanel.MainTitleIconControl.Title.Text = _habaneroMenuItem.ParentMenu.Name + " > " + this.Text;
                    mainEditorPanel.EditorPanel.Controls.Clear();
                    mainEditorPanel.EditorPanel.Controls.Add(control);
                    mainEditorPanel.Width -= 1;
                    mainEditorPanel.Width += 1;
                }
            }
            catch (Exception ex)
            {
                GlobalRegistry.UIExceptionNotifier.Notify(ex, null, null);
            }
        }
Ejemplo n.º 18
0
 /// <summary>
 /// 创建 FormValueFormatException 对象
 /// </summary>
 /// <param name="control">设置错误值的表单控件</param>
 /// <param name="message">异常消息</param>
 public FormValueFormatException( IFormControl control, string message )
   : base( message )
 {
   Control = control;
 }
Ejemplo n.º 19
0
 public FormControlOverride(MvcBootstrapHelper <TModel> helper, IFormControl component)
     : base(helper, component)
 {
 }
Ejemplo n.º 20
0
 /// <summary>
 /// 创建 FormValueFormatException 对象
 /// </summary>
 /// <param name="control">设置错误值的表单控件</param>
 /// <param name="message">异常消息</param>
 public FormValueFormatException(IFormControl control, string message)
     : base(message)
 {
     Control = control;
 }
Ejemplo n.º 21
0
 public static IItemWriter <T, AnyContent> Control <T>(this IItemWriter <T, AnyContent> target, IFormControl value)
     where T : FormGroup
 {
     target.Item.Control = value;
     return(target);
 }
Ejemplo n.º 22
0
 public Traductor(IFormControl formControl, IIdiomaBLL idiomaBLL)
 {
     this.formControl = formControl;
     this.idiomaBLL   = idiomaBLL;
 }
        /// <summary>
        /// /Handle the click event in the OnClick method.  Here we will test the selected object, get the object’s model and label file, and create the label.
        /// </summary>
        /// <param name="e">The context of the VS tools and metadata</param>
        public override void OnClick(AddinDesignerEventArgs e)
        {
            try
            {
                // Get the metamodel service
                IMetaModelService metaModelService = helper.MetaModelService;
                
                // Is the selected element a table?
                if (e.SelectedElement is ITable)
                {
                    ITable table = e.SelectedElement as ITable;
                    helper.setModelAndLabelFile(metaModelService.GetTableModelInfo(table.Name));

                    labelPrefix = table.Name;
                }
                else if (e.SelectedElement is IBaseField)
                {
                    IBaseField baseField = e.SelectedElement as IBaseField;
                    var table = baseField.Table;
                    helper.setModelAndLabelFile(metaModelService.GetTableModelInfo(table.Name));

                    labelPrefix = String.Format("{0}_{1}", baseField.Table.Name, baseField.Name);
                }
                if (e.SelectedElement is IView)
                {
                    IView view = e.SelectedElement as IView;
                    helper.setModelAndLabelFile(metaModelService.GetTableModelInfo(view.Name));

                    labelPrefix = view.Name;
                }
                else if (e.SelectedElement is IViewBaseField)
                {
                    IViewBaseField baseField = e.SelectedElement as IViewBaseField;
                    var view = baseField.View;
                    helper.setModelAndLabelFile(metaModelService.GetViewModelInfo(view.Name));

                    labelPrefix = String.Format("{0}_{1}", baseField.View.Name, baseField.Name);
                }
                else if (e.SelectedElement is IFormDesign)
                {
                    IFormDesign formDesign = e.SelectedElement as IFormDesign;
                    var form = formDesign.Form;
                    helper.setModelAndLabelFile(metaModelService.GetFormModelInfo(form.Name));

                    labelPrefix = formDesign.Form.Name;  
                }
                else if (e.SelectedElement is IFormControl)
                {
                    IFormControl formControl = e.SelectedElement as IFormControl;
                    IRootElement rootElement = formControl.RootElement as IRootElement;
                    if (rootElement is IFormExtension)
                    {
                        helper.setModelAndLabelFile(metaModelService.GetFormExtensionModelInfo(rootElement.Name));
                        labelPrefix = String.Format("{0}_{1}", rootElement.Name, formControl.Name);
                        labelPrefix = labelPrefix.Replace(".","_");
                    }
                    else
                    {
                        helper.setModelAndLabelFile(metaModelService.GetFormModelInfo(rootElement.Name));
                        labelPrefix = String.Format("{0}_{1}", rootElement.Name, formControl.Name);
                    }
                }
                else if (e.SelectedElement is ISecurityPrivilege)
                {
                    ISecurityPrivilege securityObject = e.SelectedElement as ISecurityPrivilege;
                    helper.setModelAndLabelFile(metaModelService.GetSecurityPrivilegeModelInfo(securityObject.Name));

                    labelPrefix = String.Format("{0}_{1}", Tags.PrivilegeTag, securityObject.Name);
                }
                else if (e.SelectedElement is ISecurityDuty)
                {
                    ISecurityDuty securityObject = e.SelectedElement as ISecurityDuty;
                    helper.setModelAndLabelFile(metaModelService.GetSecurityDutyModelInfo(securityObject.Name));

                    labelPrefix = String.Format("{0}_{1}", Tags.DutyTag, securityObject.Name);
                }
                else if (e.SelectedElement is ISecurityRole)
                {
                    ISecurityRole securityObject = e.SelectedElement as ISecurityRole;
                    helper.setModelAndLabelFile(metaModelService.GetSecurityRoleModelInfo(securityObject.Name));

                    labelPrefix = String.Format("{0}_{1}", Tags.RoleTag, securityObject.Name);
                }
                else if (e.SelectedElement is IEdtBase)
                {
                    IEdtBase edt = e.SelectedElement as IEdtBase;
                    helper.setModelAndLabelFile(metaModelService.GetExtendedDataTypeModelInfo(edt.Name));

                    labelPrefix = String.Format("{0}_{1}", Tags.EDTTag, edt.Name);           
                }
                else if (e.SelectedElement is IMenuItem)
                {
                    IMenuItem AxMenuItem = e.SelectedElement as IMenuItem;
                    labelPrefix = String.Format("{0}_{1}", Tags.MenuItemTag, AxMenuItem.Name);

                    if (AxMenuItem is IMenuItemAction)
                    {
                        helper.setModelAndLabelFile(metaModelService.GetMenuItemActionModelInfo(AxMenuItem.Name));
                    }
                    else if (AxMenuItem is IMenuItemDisplay)
                    {
                        helper.setModelAndLabelFile(metaModelService.GetMenuItemDisplayModelInfo(AxMenuItem.Name));
                        
                    }
                    else if (AxMenuItem is IMenuItemOutput)
                    {
                        helper.setModelAndLabelFile(metaModelService.GetMenuItemOutputModelInfo(AxMenuItem.Name));
                    }

                }
                else if (e.SelectedElement is IReportDataSetField)
                {
                    IReportDataSetField dataField = e.SelectedElement as IReportDataSetField;

                    helper.setModelAndLabelFile(metaModelService.GetReportModelInfo(dataField.DataSet.Report.Name));

                    labelPrefix = String.Format("{0}_{1}_{2}", dataField.DataSet.Report.Name, dataField.DataSet.Name, dataField.Name);
                }
                helper.createPropertyLabels(e.SelectedElement, labelPrefix);
            }
            catch (Exception ex)
            {
                Microsoft.Dynamics.Framework.Tools.MetaModel.Core.CoreUtility.HandleExceptionWithErrorMessage(ex);

            }
        }