Ejemplo n.º 1
0
        internal static void AddClient(PWClient client)
        {
            var win = new Forms.ClientForm(client);

            Clients.Add(win);
            win.Show();
        }
Ejemplo n.º 2
0
        public AutoSpotForm(ClientForm parent, BLL.PWClient client) : base(parent, new PopUpCoords(client.dbConfig.AutoSpot.WinPinned, client.dbConfig.AutoSpot.WinShowAttachParent, client.dbConfig.AutoSpot.ScreenX, client.dbConfig.AutoSpot.ScreenY))
        {
            InitializeComponent();
            this.Client = client;

            this.Activated += (sender, e) => { PAssistMobRefresh_Click(this.pAssistMobRefresh, null); };

            this.lBuffKey.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoSpot.BuffKey = e.Delta > 0 ? Values.GetAllKeyPost(this.Client.dbConfig.AutoSpot.BuffKey, true) : Values.GetAllKeyPrev(this.Client.dbConfig.AutoSpot.BuffKey, true);
                this.Client.dbConfig.PendingChanges   = true;
                DoDrawControls();
            };
            this.lBuffExpire.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoSpot.BuffExpireTime = e.Delta > 0 ? Values.GetTimesPost(this.Client.dbConfig.AutoSpot.BuffExpireTime) : Values.GetTimesPrev(this.Client.dbConfig.AutoSpot.BuffExpireTime);
                this.Client.dbConfig.PendingChanges          = true;
                DoDrawControls();
            };
            this.lBuffCast.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoSpot.BuffCastTime = e.Delta > 0 ? Values.GetTimesPost(this.Client.dbConfig.AutoSpot.BuffCastTime) : Values.GetTimesPrev(this.Client.dbConfig.AutoSpot.BuffCastTime);
                this.Client.dbConfig.PendingChanges        = true;
                DoDrawControls();
            };
            this.lAssist.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoSpot.AssistKey = e.Delta > 0 ? Values.GetAllKeyPost(this.Client.dbConfig.AutoSpot.AssistKey, true) : Values.GetAllKeyPrev(this.Client.dbConfig.AutoSpot.AssistKey, true);
                this.Client.dbConfig.PendingChanges     = true;
                DoDrawControls();
            };
            this.lPickKey.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoSpot.PickKey = e.Delta > 0 ? Values.GetAllKeyPost(this.Client.dbConfig.AutoSpot.PickKey, true) : Values.GetAllKeyPrev(this.Client.dbConfig.AutoSpot.PickKey, true);
                this.Client.dbConfig.PendingChanges   = true;
                DoDrawControls();
            };
            this.lPickTime.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoSpot.PickTime = e.Delta > 0 ? Values.GetTimesPost(this.Client.dbConfig.AutoSpot.PickTime) : Values.GetTimesPrev(this.Client.dbConfig.AutoSpot.PickTime);
                this.Client.dbConfig.PendingChanges    = true;
                DoDrawControls();
            };
            this.lAssitMob.MouseWheel += (sender, e) =>
            {
                var values = this.NPCs.Select(p => Convert.ToInt32(p.Key)).ToList();
                this.Client.dbConfig.AutoSpot.AssistMob = (e.Delta > 0) ? Values.GetPost(this.Client.dbConfig.AutoSpot.AssistMob, values) : Values.GetPrev(this.Client.dbConfig.AutoSpot.AssistMob, values);
                //this.Client.dbConfig.PendingChanges = true;
                DoDrawControls();
            };


            DoDrawControls();
        }
Ejemplo n.º 3
0
        public AutoAssistForm(ClientForm parent, BLL.PWClient client) : base(parent, new PopUpCoords(client.dbConfig.AutoAssist.WinPinned, client.dbConfig.AutoAssist.WinShowAttachParent, client.dbConfig.AutoAssist.ScreenX, client.dbConfig.AutoAssist.ScreenY))
        {
            InitializeComponent();
            this.Client = client;

            this.lFollow.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoAssist.FollowParty = e.Delta > 0 ? Values.GetPartysPost(this.Client.dbConfig.AutoAssist.FollowParty) : Values.GetPartysPrev(this.Client.dbConfig.AutoAssist.FollowParty);
                this.Client.dbConfig.PendingChanges         = true;
                DoDrawControls();
            };

            this.lAssistPlayer.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoAssist.AssistPJKey = e.Delta > 0 ? Values.GetPartysPost(this.Client.dbConfig.AutoAssist.AssistPJKey) : Values.GetPartysPrev(this.Client.dbConfig.AutoAssist.AssistPJKey);
                this.Client.dbConfig.PendingChanges         = true;
                DoDrawControls();
            };
            this.lAssistKey.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoAssist.AssistKey = e.Delta > 0 ? Values.GetAllKeyPost(this.Client.dbConfig.AutoAssist.AssistKey) : Values.GetAllKeyPrev(this.Client.dbConfig.AutoAssist.AssistKey);
                this.Client.dbConfig.PendingChanges       = true;
                DoDrawControls();
            };
            this.lAssistTime.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoAssist.AssistTime = e.Delta > 0 ? Values.GetTimesPost(this.Client.dbConfig.AutoAssist.AssistTime) : Values.GetTimesPrev(this.Client.dbConfig.AutoAssist.AssistTime);
                this.Client.dbConfig.PendingChanges        = true;
                DoDrawControls();
            };

            this.lPickKey.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoAssist.PickKey = e.Delta > 0 ? Values.GetAllKeyPost(this.Client.dbConfig.AutoAssist.PickKey, true) : Values.GetAllKeyPrev(this.Client.dbConfig.AutoAssist.PickKey, true);
                this.Client.dbConfig.PendingChanges     = true;
                DoDrawControls();
            };
            this.lPickTime.MouseWheel += (sender, e) =>
            {
                this.Client.dbConfig.AutoAssist.PickTime = e.Delta > 0 ? Values.GetTimesPost(this.Client.dbConfig.AutoAssist.PickTime) : Values.GetTimesPrev(this.Client.dbConfig.AutoAssist.PickTime);
                this.Client.dbConfig.PendingChanges      = true;
                DoDrawControls();
            };
            DoDrawControls();
        }
Ejemplo n.º 4
0
        public PopUpForm(ClientForm parent, PopUpCoords initial)
        {
            InitializeComponent();
            this.lTitle.Text = this.Title;

            this.ClientForm = parent;
            this.Coords     = initial;

            this.Deactivate += (sender, e) => this.SetShow(false);
            this.Activated  += (sender, e) => { CalculatePosition(); ReDraw(); this.Closeable = true; };
            this.ClientForm.OnCustomMove += (sender, e) => CalculatePosition();

            // Windows Move
            this.MouseDown += (sender, e) =>
            {
                WinMovePosition = new Point(Cursor.Position.X - Location.X, Cursor.Position.Y - Location.Y);
                WinMoveMover    = true;
                WinMoveMoved    = false;
            };
            this.MouseMove += (sender, e) => { if (WinMoveMover)
                                               {
                                                   this.Location = new Point(Cursor.Position.X - WinMovePosition.X, Cursor.Position.Y - WinMovePosition.Y); WinMoveMoved = true;
                                               }
            };
            this.MouseUp += (sender, e) =>
            {
                WinMoveMover = false;
                if (WinMoveMoved)
                {
                    this.Coords.IsAttach = false;
                    this.Coords.X        = this.Location.X;
                    this.Coords.Y        = this.Location.Y;
                    CoordsChanges(this.Coords);
                    ReDraw();
                }
            };
        }