示例#1
0
        private void InternalVisibileChanged(EventArgs e)
        {
            var c       = this.Controls;
            var visible = this.Visible;

            //Console.WriteLine(this.Name + " InternalVisibileChanged" + new { visible });

            InternalBeforeVisibleChanged();

            if (VisibleChanged != null)
            {
                VisibleChanged(this, e);
            }


            if (c != null)
            {
                //Console.WriteLine(this.Name + " InternalVisibileChanged" + new { visible, c.Count });

                for (int i = 0; i < c.Count; i++)
                {
                    __Control v = c[i];

                    //Console.WriteLine(this.Name + " InternalVisibileChanged " + new { visible, v.Visible, v.Name });


                    //if (v.Visible)
                    //{
                    v.OnParentVisibleChanged(null /* EventArgs.Empty */);
                    //}

                    if (!visible)
                    {
                        v.OnParentBecameInvisible();
                    }
                }
            }
        }
示例#2
0
            public void Add(Control e)
            {
                __Control _Owner = Owner;
                __Control _e     = e;

                var __Owner = _Owner.InternalGetElement();
                var __e     = _e.InternalGetElement();

                this.Items.Add(e);

                var __Owner_JFrame = __Owner as javax.swing.JFrame;

                if (__Owner_JFrame != null)
                {
                    __Owner_JFrame.getContentPane().add(__e);
                    return;
                }

                var __Owner_JDialog = __Owner as javax.swing.JDialog;

                if (__Owner_JDialog != null)
                {
                    __Owner_JDialog.getContentPane().add(__e);
                    return;
                }

                var __Owner_JPanel = __Owner as javax.swing.JPanel;

                if (__Owner_JPanel != null)
                {
                    __Owner_JPanel.add(__e);
                    return;
                }

                throw new NotSupportedException();
            }