Example #1
0
        private void buttonBaseline_Click(object sender, EventArgs e)
        {
            if (radioButtonDotNET.Checked)
            {
                m_APE.AddFirstMessageDumpControl();
            }
            else
            {
                m_APE.AddFirstMessageDumpActiveX();
            }
            m_APE.SendMessages(EventSet.APE);
            m_APE.WaitForMessages(EventSet.APE);
            string res = m_APE.GetValueFromMessage();

            if (string.IsNullOrEmpty(res))
            {
                Baseline = new List <string>();
            }
            else
            {
                string[] splitSeparator = { "\r\n" };
                Baseline = res.Split(splitSeparator, StringSplitOptions.None).ToList();
                labelBaselineCount.Text = Baseline.Count.ToString();
            }
        }
Example #2
0
        private void AddToolStripDropDownMenuToPropertyListbox()
        {
            int    Items;
            IntPtr temp;

            temp = m_Identity.ParentHandle;
            m_Identity.ParentHandle = NM.GetAncestor(m_Identity.Handle, NM.GetAncestorFlags.GetRootOwner);

            //Get the number of items on the menustrip
            m_APE.AddFirstMessageFindByHandle(DataStores.Store0, m_Identity.ParentHandle, m_Identity.Handle);
            m_APE.AddQueryMessageReflect(DataStores.Store0, DataStores.Store1, "Items", MemberTypes.Property);
            m_APE.AddQueryMessageReflect(DataStores.Store1, DataStores.Store2, "Count", MemberTypes.Property);
            m_APE.AddRetrieveMessageGetValue(DataStores.Store2);
            m_APE.SendMessages(EventSet.APE);
            m_APE.WaitForMessages(EventSet.APE);
            //get the values returned
            Items = m_APE.GetValueFromMessage();

            //Loop through all items
            for (int Item = 0; Item < Items; Item++)
            {
                m_APE.AddFirstMessageFindByHandle(DataStores.Store0, m_Identity.ParentHandle, m_Identity.Handle);
                m_APE.AddQueryMessageReflect(DataStores.Store0, DataStores.Store1, "Items", MemberTypes.Property);
                m_APE.AddQueryMessageReflect(DataStores.Store1, DataStores.Store2, "Item", MemberTypes.Property, new Parameter(m_APE, Item));
                m_APE.AddQueryMessageReflect(DataStores.Store2, DataStores.Store3, "Text", MemberTypes.Property);
                m_APE.AddRetrieveMessageGetValue(DataStores.Store3);
                m_APE.SendMessages(EventSet.APE);
                m_APE.WaitForMessages(EventSet.APE);
                //get the values returned
                string ItemText = m_APE.GetValueFromMessage();

                PropertyListbox.Items.Add("Menu item\t: " + ItemText);
            }

            m_Identity.ParentHandle = temp;
        }