/// <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; }
private void MyEvents_OnDispose() { if (formProps != null) { formProps.Dispose(); formProps = null; } }
public void Dispose() { myEvents = null; if (formProps != null) { formProps.Dispose(); formProps = null; } }
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); } }