Exemple #1
0
        public void Init(GameWindow window, TabPage tab)
        {
            this.window = window;
            ProgressBindings = window.ProgressBindings;

            Visible = false;
            Anchor = (
                (System.Windows.Forms.AnchorStyles)
                (
                    (
                        (
                            System.Windows.Forms.AnchorStyles.Top |
                            System.Windows.Forms.AnchorStyles.Bottom
                        ) |
                        System.Windows.Forms.AnchorStyles.Left
                    ) |
                    System.Windows.Forms.AnchorStyles.Right
                )
            );
            Parent = tab;
            SetBounds(0, 0, Parent.Width, Parent.Height);

            InitializeComponent();

            if (ProgressBindings == null)
            {
                return;
            }

            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfCp].StateLabel = lbSelfCp;
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfHp].StateLabel = lbSelfHp;
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfMp].StateLabel = lbSelfMp;
            ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].StateLabel = lbTargetHp;

            // SELF

            // Хил, когда свои ЦП < 80
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfCp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfCp1, tbCp1Key1, tbCp1Key2)
            );

            // Хил, когда свои ЦП < 30
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfCp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfCp2, tbCp2Key1, tbCp2Key2)
            );

            // Хил, когда свои ХП < 80
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfHp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfHp1, tbHp1Key1, tbHp1Key2)
            );

            // Хил, когда свои ХП < 30
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfHp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfHp2, tbHp2Key1, tbHp2Key2)
            );

            // Хил, когда свои МП < 80
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfMp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfMp1, tbMp1Key1, tbMp1Key2)
            );

            // Хил, когда свои МП < 30
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfMp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfMp2, tbMp2Key1, tbMp2Key2)
            );

            // TARGET

            // Атака, когда хп врага от 1 до 100
            ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].Bindings.Add(
                new L2ProgressBinding(window, cbAttack, tbAttack).SetBorder(1, 100)
            );

            // after kill
            ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].Bindings.Add(
                new L2ProgressBindingAfterKill(window, cbAfterKillActive, tbAfterKillKey1, tbAfterKillKey2, tbAfterKillKey3)
            );

            // empty target
            ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].Bindings.Add(
                new L2ProgressBindingEmptyTarget(window, cbEmptyTargetActive, tbEmptyTargetKey1, tbEmptyTargetKey2, tbEmptyTargetKey3)
            );

            for (int i = 0; i <= 8; ++i)
            {
                ProgressBindings.Progresses[(int)L2ObjectStateType.Party1Hp + i].Bindings.Add(
                    new L2ProgressBindingHeal(window, cbHealHp1Active, tbHealHp1Key).SetBorder(0, nudGroupHeal1)
                );
                ProgressBindings.Progresses[(int)L2ObjectStateType.Party1Hp + i].Bindings.Add(
                    new L2ProgressBindingHeal(window, cbHealHp2Active, tbHealHp2Key).SetBorder(0, nudGroupHeal2)
                );
                ProgressBindings.Progresses[(int)L2ObjectStateType.Party1Mp + i].Bindings.Add(
                    new L2ProgressBindingHeal(window, cbRegenMp1Active, tbRegenMp1).SetBorder(0, nudRegenMp1)
                );
            }
        }
Exemple #2
0
        public void Init(GameWindow window, TabPage tab)
        {
            this.window      = window;
            ProgressBindings = window.ProgressBindings;

            Visible = false;
            Anchor  = (
                (System.Windows.Forms.AnchorStyles)
                (
                    (
                        (
                            System.Windows.Forms.AnchorStyles.Top |
                            System.Windows.Forms.AnchorStyles.Bottom
                        ) |
                        System.Windows.Forms.AnchorStyles.Left
                    ) |
                    System.Windows.Forms.AnchorStyles.Right
                )
                );
            Parent = tab;
            SetBounds(0, 0, Parent.Width, Parent.Height);

            InitializeComponent();

            if (ProgressBindings == null)
            {
                return;
            }

            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfCp].StateLabel   = lbSelfCp;
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfHp].StateLabel   = lbSelfHp;
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfMp].StateLabel   = lbSelfMp;
            ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].StateLabel = lbTargetHp;

            // SELF

            // Хил, когда свои ЦП < 80
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfCp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfCp1, tbCp1Key1, tbCp1Key2)
                );

            // Хил, когда свои ЦП < 30
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfCp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfCp2, tbCp2Key1, tbCp2Key2)
                );

            // Хил, когда свои ХП < 80
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfHp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfHp1, tbHp1Key1, tbHp1Key2)
                );

            // Хил, когда свои ХП < 30
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfHp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfHp2, tbHp2Key1, tbHp2Key2)
                );

            // Хил, когда свои МП < 80
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfMp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfMp1, tbMp1Key1, tbMp1Key2)
                );

            // Хил, когда свои МП < 30
            ProgressBindings.Progresses[(int)L2ObjectStateType.SelfMp].Bindings.Add(
                new L2ProgressBinding(window, cbSelfMp2, tbMp2Key1, tbMp2Key2)
                );

            // TARGET

            // Атака, когда хп врага от 1 до 100
            ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].Bindings.Add(
                new L2ProgressBinding(window, cbAttack, tbAttack).SetBorder(1, 100)
                );

            // after kill
            ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].Bindings.Add(
                new L2ProgressBindingAfterKill(window, cbAfterKillActive, tbAfterKillKey1, tbAfterKillKey2, tbAfterKillKey3)
                );

            // empty target
            ProgressBindings.Progresses[(int)L2ObjectStateType.TargetHp].Bindings.Add(
                new L2ProgressBindingEmptyTarget(window, cbEmptyTargetActive, tbEmptyTargetKey1, tbEmptyTargetKey2, tbEmptyTargetKey3)
                );

            for (int i = 0; i <= 8; ++i)
            {
                ProgressBindings.Progresses[(int)L2ObjectStateType.Party1Hp + i].Bindings.Add(
                    new L2ProgressBindingHeal(window, cbHealHp1Active, tbHealHp1Key).SetBorder(0, nudGroupHeal1)
                    );
                ProgressBindings.Progresses[(int)L2ObjectStateType.Party1Hp + i].Bindings.Add(
                    new L2ProgressBindingHeal(window, cbHealHp2Active, tbHealHp2Key).SetBorder(0, nudGroupHeal2)
                    );
                ProgressBindings.Progresses[(int)L2ObjectStateType.Party1Mp + i].Bindings.Add(
                    new L2ProgressBindingHeal(window, cbRegenMp1Active, tbRegenMp1).SetBorder(0, nudRegenMp1)
                    );
            }
        }