Beispiel #1
0
 private void OnThisSizeChanged(object sender, EventArgs e)
 {
     if (m_HostControl != null)
     {
         if (m_HostControl is PopupContainerEdit && TranslationToolHelperWinClient.IsLookupControl(m_HostControl.Parent))
         {
             m_HostControl.Parent.Size = Size;
         }
         else
         {
             m_HostControl.Size = Size;
         }
     }
 }
Beispiel #2
0
        private static Control GetRealControl(Control ctl)
        {
            var proxy = ctl as ControlDesignerProxy;

            if (proxy != null)
            {
                if (TranslationToolHelperWinClient.IsLookupControl(proxy.HostControl) &&
                    ReflectionHelper.HasProperty(proxy.HostControl, "PopupEdit", BindingFlags.NonPublic | BindingFlags.Instance))
                {
                    var c = ReflectionHelper.GetProperty(proxy.HostControl, "PopupEdit", BindingFlags.NonPublic | BindingFlags.Instance);
                    if (c != null)
                    {
                        return((Control)c);
                    }
                }

                return(proxy.HostControl);
            }
            return(ctl);
        }