Ejemplo n.º 1
0
        public void AddMenuInfo()
        {
            IISmpCommands SmpCommandsInfo = new ISmpCommandsClass();

            try
            {
                List <string> strFunctionNamesArray = new List <string>();

                LoadFunctionName(ref strFunctionNamesArray);

                for (int iIndex = 0; iIndex < strFunctionNamesArray.Count; iIndex++)
                {
                    int lNoOfCommands = 0;

                    string strFunctionName = strFunctionNamesArray[iIndex];

                    lNoOfCommands = SmpCommandsInfo.get_NoOfCommands(Convert.ToInt32(m_lSessionID), strFunctionName);

                    int plCommands = 0;

                    plCommands = SmpCommandsInfo.get_MenuCommandEx(Convert.ToInt32(m_lSessionID), strFunctionName);

                    CMenuInfo MenuInfo = new CMenuInfo();

                    MenuInfo.m_strFunctionName = strFunctionName;

                    for (int i = 0; i < lNoOfCommands; i++)
                    {
                        MenuInfo.m_CommandIDArray.Add(plCommands);
                    }
                    m_MenuInfoArray.Add(MenuInfo);
                }
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.ToString());
            }
        }
Ejemplo n.º 2
0
        public CMenuInfo(CMenuInfo MenuInfo)
        {
            m_strFunctionName = MenuInfo.m_strFunctionName;

            m_CommandIDArray.AddRange(MenuInfo.m_CommandIDArray);
        }