示例#1
0
        private int GetPanelMinimumDimension(SplitterPanel panel)
        {
            //Get the panel dimension
            GUI.m_APE.AddFirstMessageFindByHandle(DataStores.Store0, Identity.ParentHandle, Identity.Handle);
            switch (panel)
            {
            case SplitterPanel.Panel1:
                GUI.m_APE.AddQueryMessageReflect(DataStores.Store0, DataStores.Store1, "Panel1MinSize", MemberTypes.Property);
                break;

            case SplitterPanel.Panel2:
                GUI.m_APE.AddQueryMessageReflect(DataStores.Store0, DataStores.Store1, "Panel2MinSize", MemberTypes.Property);
                break;

            default:
                throw GUI.ApeException("Unknown splitter panel: " + panel.ToString());
            }
            GUI.m_APE.AddRetrieveMessageGetValue(DataStores.Store1);
            GUI.m_APE.SendMessages(EventSet.APE);
            GUI.m_APE.WaitForMessages(EventSet.APE);
            //Get the value(s) returned MUST be done straight after the WaitForMessages call
            int dimensionSize = GUI.m_APE.GetValueFromMessage();

            return(dimensionSize);
        }