Пример #1
0
        private void OnControlVisibleChanged(object sender, EventArgs args)
        {
            SWF.Control control = (SWF.Control)sender;

            if (control.Visible == true)
            {
                FragmentRootControlProvider root
                    = (FragmentRootControlProvider)ProviderFactory.GetProvider(Parent);
                root.AddChildProvider(this);
            }
            else
            {
                DeleteControl(control);
            }
        }
Пример #2
0
        public void AddControl(SWF.Control control)
        {
            if (parent == null)
            {
                parent = InstancesTracker.GetParentFromControl(control);
            }

            if (controls.Contains(control) == false)
            {
                controls.Add(control);
                if (controls.Count == 1 && control.Visible == true)
                {
                    FragmentRootControlProvider root
                        = (FragmentRootControlProvider)ProviderFactory.GetProvider(Parent);
                    root.AddChildProvider(this);
                }
                control.VisibleChanged += new EventHandler(OnControlVisibleChanged);
            }
        }