protected override void Dispose(bool disposing)
        {
            if (disposing && HasDropDownItems)
            {
                DropDown.Dispose();
            }

            base.Dispose(disposing);
        }
Ejemplo n.º 2
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if ((disposing && base.HasDropDownItems) && !DropDown.IsAutoGenerated)
     {
         DropDown.Dispose();
         DropDown = null;
     }
 }
Ejemplo n.º 3
0
        public void Deactivate()
        {
            if (root != null)
            {
                if (dropDown != null)
                {
                    if (scrollBar != null)
                    {
                        dropDown.DetachScrollBar();
                        scrollBar.Dispose();
                        scrollBar = null;
                    }

                    parent1.Remove(dropDown);
                    dropDown.Dispose();
                    dropDown = null;
                }
                if (dropDown2 != null)
                {
                    if (scrollBar2 != null)
                    {
                        dropDown2.DetachScrollBar();
                        scrollBar2.Dispose();
                        scrollBar2 = null;
                    }

                    parent2.Remove(dropDown2);
                    dropDown2.Dispose();
                    dropDown2 = null;
                }

                if (createText[0] != null)
                {
                    parent1.Remove(createText[0]);
                    createText[0].Dispose();
                    createText[0] = null;
                }
                if (createText[1] != null)
                {
                    parent2.Remove(createText[1]);
                    createText[1].Dispose();
                    createText[1] = null;
                }

                root.Remove(parent1);
                parent1.Dispose();
                parent1 = null;
                root.Remove(parent2);
                parent2.Dispose();
                parent2 = null;

                NUIApplication.GetDefaultWindow().Remove(root);
                root.Dispose();
                root = null;
            }
        }
Ejemplo n.º 4
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (!disposing || !base.HasDropDownItems || DropDown.IsAutoGenerated)
     {
         return;
     }
     DropDown.Dispose();
     DropDown = null;
 }
Ejemplo n.º 5
0
 public void Dispose()
 {
     dropDown?.Dispose();
     if (EnableRadioButtons)
     {
         foreach (var rb in radioButtons)
         {
             rb?.Dispose();
         }
     }
 }
Ejemplo n.º 6
0
        public void Deactivate()
        {
            if (root != null)
            {
                if (dropDown != null)
                {
                    if (scrollBar != null)
                    {
                        dropDown.DetachScrollBar();
                        scrollBar.Dispose();
                        scrollBar = null;
                    }

                    root.Remove(dropDown);
                    dropDown.Dispose();
                    dropDown = null;
                }
                if (dropDown2 != null)
                {
                    if (scrollBar2 != null)
                    {
                        dropDown2.DetachScrollBar();
                        scrollBar2.Dispose();
                        scrollBar2 = null;
                    }

                    root.Remove(dropDown2);
                    dropDown2.Dispose();
                    dropDown2 = null;
                }

                if (createText[0] != null)
                {
                    root.Remove(createText[0]);
                    createText[0].Dispose();
                    createText[0] = null;
                }
                if (createText[1] != null)
                {
                    root.Remove(createText[1]);
                    createText[1].Dispose();
                    createText[1] = null;
                }

                Window.Instance.Remove(root);
                root.Dispose();
                root = null;
            }
        }