示例#1
0
        /// <summary>
        /// Inicializa a extensão nos Artigos ( Customer)
        /// Não mostra mensagens
        /// </summary>
        /// <param name="Sender"></param>
        /// <param name="e">
        /// IN:
        /// PropertyList:
        ///     "Window": Form,
        ///     "IManagementConsole": IManagementConsole
        ///
        /// OUT:
        ///     e.result:     true: para extender os menus, e sinalizar sucesso
        ///     e.set_Data(): Passar um ExtenderMenuItems para extender os menus
        ///
        /// Não mostra mensagens
        ///</param>
        void myEvents_OnInitialize(object Sender, ExtenderEventArgs e)
        {
            var propertyList = (ExtendedPropertyList)e.get_data();

            if (propertyList.PropertyExists("IManagementConsole"))
            {
                managementConsole = (IManagementConsole)propertyList.get_Value("IManagementConsole");

                // Form a colocar no TAB dos clientes
                var formProps = new FormProps();
                managementConsole.AddChildPanel(formProps);
            }
            // Acrescentar Items ao menu
            var newMenu = new ExtenderMenuItems();

            var menuGroup = newMenu.Add("mniXFormacao", "Formação X");

            menuGroup.GroupType  = ExtenderGroupType.ExtenderGroupTypeExtraOptions;  //Opções de menu
            menuGroup.BeginGroup = true;                                             //Novo grupo
            //
            var menuItem = menuGroup.ChildItems.Add("mniXCustomer1", "Meu menu 1");

            menuItem.GroupType = ExtenderGroupType.ExtenderGroupTypeExtraOptions;   //Opções de menu

            menuItem           = menuGroup.ChildItems.Add("mniXCustomer2", "Meu menu 2");
            menuItem.GroupType = ExtenderGroupType.ExtenderGroupTypeExtraOptions;   //Opções de menu

            object oMenu = newMenu;

            e.result.set_data(ref oMenu);

            e.result.Success       = true;
            e.result.ResultMessage = string.Empty;
        }
示例#2
0
 private void MyEvents_OnDispose()
 {
     if (formProps != null)
     {
         formProps.Dispose();
         formProps = null;
     }
 }
示例#3
0
 public void Dispose()
 {
     myEvents = null;
     if (formProps != null)
     {
         formProps.Dispose();
         formProps = null;
     }
 }
示例#4
0
        private void MyEvents_OnInitialize(object Sender, ExtenderEventArgs e)
        {
            ExtendedPropertyList propList = null;

            propList = (ExtendedPropertyList)e.get_data();


            if (propList.PropertyExists("IManagementConsole"))
            {
                managementConsole = (IManagementConsole)propList.get_Value("IManagementConsole");

                formProps = new FormProps();
                managementConsole.AddChildPanel(formProps);
            }
        }