internal static void AddDisplayJavaScriptToCheckBox( CommonCheckBox checkBox, bool controlsVisibleWhenBoxChecked, params WebControl[] controls )
 {
     var s = "";
     foreach( var c in controls )
         s += "setElementDisplay( '" + c.ClientID + "', " + ( controlsVisibleWhenBoxChecked ? "" : "!" ) + "checked );";
     checkBox.AddOnClickJsMethod( s );
 }
        internal static void AddDisplayJavaScriptToCheckBox(CommonCheckBox checkBox, bool controlsVisibleWhenBoxChecked, params WebControl[] controls)
        {
            var s = "";

            foreach (var c in controls)
            {
                s += "setElementDisplay( '" + c.ClientID + "', " + (controlsVisibleWhenBoxChecked ? "" : "!") + "checked );";
            }
            checkBox.AddOnClickJsMethod(s);
        }
예제 #3
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                CheckBoxRightPoint = Point.Empty;

                if (TypeFilterLabel != null)
                {
                    if (!TypeFilterLabel.IsDisposed)
                    {
                        TypeFilterLabel.Dispose();
                    }

                    TypeFilterLabel = null;
                }

                if (GradeFilterLabel != null)
                {
                    if (!GradeFilterLabel.IsDisposed)
                    {
                        GradeFilterLabel.Dispose();
                    }

                    GradeFilterLabel = null;
                }

                if (BookLabel != null)
                {
                    if (!BookLabel.IsDisposed)
                    {
                        BookLabel.Dispose();
                    }

                    BookLabel = null;
                }

                if (WeaponCheckBox != null)
                {
                    if (!WeaponCheckBox.IsDisposed)
                    {
                        WeaponCheckBox.Dispose();
                    }

                    WeaponCheckBox = null;
                }

                if (ArmourCheckBox != null)
                {
                    if (!ArmourCheckBox.IsDisposed)
                    {
                        ArmourCheckBox.Dispose();
                    }

                    ArmourCheckBox = null;
                }

                if (HelmetCheckBox != null)
                {
                    if (!HelmetCheckBox.IsDisposed)
                    {
                        HelmetCheckBox.Dispose();
                    }

                    HelmetCheckBox = null;
                }

                if (ShieldCheckBox != null)
                {
                    if (!ShieldCheckBox.IsDisposed)
                    {
                        ShieldCheckBox.Dispose();
                    }

                    ShieldCheckBox = null;
                }

                if (NecklaceCheckBox != null)
                {
                    if (!NecklaceCheckBox.IsDisposed)
                    {
                        NecklaceCheckBox.Dispose();
                    }

                    NecklaceCheckBox = null;
                }

                if (BraceletCheckBox != null)
                {
                    if (!BraceletCheckBox.IsDisposed)
                    {
                        BraceletCheckBox.Dispose();
                    }

                    BraceletCheckBox = null;
                }

                if (RingCheckBox != null)
                {
                    if (!RingCheckBox.IsDisposed)
                    {
                        RingCheckBox.Dispose();
                    }

                    RingCheckBox = null;
                }

                if (ShoesCheckBox != null)
                {
                    if (!ShoesCheckBox.IsDisposed)
                    {
                        ShoesCheckBox.Dispose();
                    }

                    ShoesCheckBox = null;
                }

                if (BookWarriorCheckBox != null)
                {
                    if (!BookWarriorCheckBox.IsDisposed)
                    {
                        BookWarriorCheckBox.Dispose();
                    }

                    BookWarriorCheckBox = null;
                }

                if (BookWizardCheckBox != null)
                {
                    if (!BookWizardCheckBox.IsDisposed)
                    {
                        BookWizardCheckBox.Dispose();
                    }

                    BookWizardCheckBox = null;
                }

                if (BookTaoistCheckBox != null)
                {
                    if (!BookTaoistCheckBox.IsDisposed)
                    {
                        BookTaoistCheckBox.Dispose();
                    }

                    BookTaoistCheckBox = null;
                }

                if (BookAssassinCheckBox != null)
                {
                    if (!BookAssassinCheckBox.IsDisposed)
                    {
                        BookAssassinCheckBox.Dispose();
                    }

                    BookAssassinCheckBox = null;
                }

                if (PotionCheckBox != null)
                {
                    if (!PotionCheckBox.IsDisposed)
                    {
                        PotionCheckBox.Dispose();
                    }

                    PotionCheckBox = null;
                }

                if (OreCheckBox != null)
                {
                    if (!OreCheckBox.IsDisposed)
                    {
                        OreCheckBox.Dispose();
                    }

                    OreCheckBox = null;
                }

                if (GoldCheckBox != null)
                {
                    if (!GoldCheckBox.IsDisposed)
                    {
                        GoldCheckBox.Dispose();
                    }

                    GoldCheckBox = null;
                }

                if (CommonCheckBox != null)
                {
                    if (!CommonCheckBox.IsDisposed)
                    {
                        CommonCheckBox.Dispose();
                    }

                    CommonCheckBox = null;
                }

                if (EliteCheckBox != null)
                {
                    if (!EliteCheckBox.IsDisposed)
                    {
                        EliteCheckBox.Dispose();
                    }

                    EliteCheckBox = null;
                }

                if (SuperiorCheckBox != null)
                {
                    if (!SuperiorCheckBox.IsDisposed)
                    {
                        SuperiorCheckBox.Dispose();
                    }

                    SuperiorCheckBox = null;
                }
            }
        }
 private CheckBoxToControlArrayDisplayLink(CommonCheckBox checkBox, bool controlsVisibleWhenBoxChecked, params WebControl[] controls)
 {
     this.checkBox = checkBox;
     this.controlsVisibleWhenBoxChecked = controlsVisibleWhenBoxChecked;
     this.controls = controls;
 }
 /// <summary>
 /// Creates a new check box display link and adds it to the current EwfPage.
 /// </summary>
 public static void AddToPage(CommonCheckBox checkBox, bool controlsVisibleWhenBoxChecked, params WebControl[] controls)
 {
     EwfPage.Instance.AddDisplayLink(new CheckBoxToControlArrayDisplayLink(checkBox, controlsVisibleWhenBoxChecked, controls));
 }
 /// <summary>
 /// Creates a new check box display link and adds it to the current EwfPage.
 /// </summary>
 public static void AddToPage( CommonCheckBox checkBox, bool controlsVisibleWhenBoxChecked, params WebControl[] controls )
 {
     EwfPage.Instance.AddDisplayLink( new CheckBoxToControlArrayDisplayLink( checkBox, controlsVisibleWhenBoxChecked, controls ) );
 }
 private CheckBoxToControlArrayDisplayLink( CommonCheckBox checkBox, bool controlsVisibleWhenBoxChecked, params WebControl[] controls )
 {
     this.checkBox = checkBox;
     this.controlsVisibleWhenBoxChecked = controlsVisibleWhenBoxChecked;
     this.controls = controls;
 }