示例#1
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                CompanionDisplay      = null;
                CompanionDisplayPoint = Point.Empty;

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

                    CompanionTabControl = null;
                }

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

                    CompanionBagTab = null;
                }

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

                    PickUpFilterTab = null;
                }

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

                    ItemNameFilterTab = null;
                }

                if (EquipmentGrid != null)
                {
                    for (int i = 0; i < EquipmentGrid.Length; i++)
                    {
                        if (EquipmentGrid[i] != null)
                        {
                            if (!EquipmentGrid[i].IsDisposed)
                            {
                                EquipmentGrid[i].Dispose();
                            }

                            EquipmentGrid[i] = null;
                        }
                    }

                    EquipmentGrid = null;
                }

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

                    InventoryGrid = null;
                }

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

                    WeightLabel = null;
                }

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

                    HungerLabel = null;
                }

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

                    NameLabel = null;
                }

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

                    LevelLabel = null;
                }

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

                    ExperienceLabel = null;
                }

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

                    Level3Label = null;
                }

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

                    Level5Label = null;
                }

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

                    Level7Label = null;
                }

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

                    Level10Label = null;
                }

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

                    ModeComboBox = null;
                }

                BagWeight     = 0;
                MaxBagWeight  = 0;
                InventorySize = 0;
            }
        }
示例#2
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                if (ActiveConfig == this)
                {
                    ActiveConfig = null;
                }

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

                    TabControl = null;
                }

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

                    KeyBindWindow = null;
                }

                #region Graphics
                if (GraphicsTab != null)
                {
                    if (!GraphicsTab.IsDisposed)
                    {
                        GraphicsTab.Dispose();
                    }

                    GraphicsTab = null;
                }

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

                    FullScreenCheckBox = null;
                }

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

                    VSyncCheckBox = null;
                }

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

                    LimitFPSCheckBox = null;
                }

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

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

                    DebugLabelCheckBox = null;
                }

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

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

                    LanguageComboBox = null;
                }

                #endregion

                #region Sound
                if (SoundTab != null)
                {
                    if (!SoundTab.IsDisposed)
                    {
                        SoundTab.Dispose();
                    }

                    SoundTab = null;
                }

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

                    SystemVolumeBox = null;
                }

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

                    MusicVolumeBox = null;
                }

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

                    PlayerVolumeBox = null;
                }

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

                    MonsterVolumeBox = null;
                }

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

                    SpellVolumeBox = null;
                }

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

                    BackgroundSoundBox = null;
                }
                #endregion

                #region Game
                if (GameTab != null)
                {
                    if (!GameTab.IsDisposed)
                    {
                        GameTab.Dispose();
                    }

                    GameTab = null;
                }

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

                    ItemNameCheckBox = null;
                }

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

                    MonsterNameCheckBox = null;
                }

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

                    PlayerNameCheckBox = null;
                }

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

                    UserHealthCheckBox = null;
                }

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

                    MonsterHealthCheckBox = null;
                }

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

                    DamageNumbersCheckBox = null;
                }

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

                    EscapeCloseAllCheckBox = null;
                }

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

                    ShiftOpenChatCheckBox = null;
                }

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

                    RightClickDeTargetCheckBox = null;
                }

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

                    MonsterBoxVisibleCheckBox = null;
                }

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

                    LogChatCheckBox = null;
                }


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

                    KeyBindButton = null;
                }
                #endregion

                #region Network
                if (NetworkTab != null)
                {
                    if (!NetworkTab.IsDisposed)
                    {
                        NetworkTab.Dispose();
                    }

                    NetworkTab = null;
                }

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

                    UseNetworkConfigCheckBox = null;
                }

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

                    IPAddressTextBox = null;
                }

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

                    PortBox = null;
                }
                #endregion

                #region Colours
                if (ColourTab != null)
                {
                    if (!ColourTab.IsDisposed)
                    {
                        ColourTab.Dispose();
                    }

                    ColourTab = null;
                }

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

                    LocalColourBox = null;
                }

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

                    GMWhisperInColourBox = null;
                }

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

                    WhisperInColourBox = null;
                }

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

                    WhisperOutColourBox = null;
                }

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

                    GroupColourBox = null;
                }

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

                    GuildColourBox = null;
                }

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

                    ShoutColourBox = null;
                }

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

                    GlobalColourBox = null;
                }

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

                    ObserverColourBox = null;
                }

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

                    HintColourBox = null;
                }

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

                    SystemColourBox = null;
                }

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

                    GainsColourBox = null;
                }
                #endregion

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

                    SaveButton = null;
                }

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

                    CancelButton = null;
                }

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

                    ExitButton = null;
                }
            }
        }
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

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

                    SupportTabControl = null;
                }

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

                    AutoPotionTab = null;
                }

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

                    AutoSkillTab = null;
                }

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

                    AutoBattleTab = null;
                }

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

                    WarriorSkillPanel = null;
                }

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

                    WarriorSkillPanelTitle = null;
                }

                if (Links != null)
                {
                    for (int i = 0; i < Links.Length; i++)
                    {
                        Links[i] = null;
                    }

                    Links = null;
                }

                for (int i = 0; i < Rows.Length; i++)
                {
                    if (Rows[i] == null)
                    {
                        continue;
                    }

                    if (!Rows[i].IsDisposed)
                    {
                        Rows[i].Dispose();
                    }

                    Rows[i] = null;
                }

                Rows = null;

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

                    ScrollBar = null;
                }
            }
        }