Beispiel #1
0
        private void WaitForOverlay_Elapsed(object sender, ElapsedEventArgs e)
        {
            if (SupportedProcessVersion())
            {
                A_WPFOverlay.Overlay o = new A_WPFOverlay.Overlay();
                o.Show();

                waitForOverlay.Stop();
            }
        }
Beispiel #2
0
        private void Window_Main_Load(object sender, EventArgs e)
        {
            if (!SupportedProcessVersion())
            {
                this.Text = "You are running a not supported D3Client(" + GetFileVersion().ToString() +
                            ") Supported Version is " + SupportedVersion;

                return;
            }

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill1, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill2, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill3, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill4, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_SkillLmb, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_SkillRmb, new object[] { true });

            A_WPFOverlay.Overlay o = new A_WPFOverlay.Overlay();
            o.Show();

            directInput = new DirectInput();
            keyboard    = new SlimDX.DirectInput.Keyboard(directInput);
            keyboard.Acquire();


            Point d3helpermainwindowpos = Properties.Settings.Default.D3Helper_MainForm_StartPosition;
            var   screens = Screen.AllScreens.OrderByDescending(x => x.Bounds.X);

            if (d3helpermainwindowpos.X >= screens.Last().Bounds.Left&& d3helpermainwindowpos.X <= screens.First().Bounds.Right&& d3helpermainwindowpos.Y <= screens.First().Bounds.Bottom&& d3helpermainwindowpos.Y >= screens.First().Bounds.Top)
            {
                this.Top  = Properties.Settings.Default.D3Helper_MainForm_StartPosition.Y;
                this.Left = Properties.Settings.Default.D3Helper_MainForm_StartPosition.X;
            }
            else
            {
                this.Top  = 0;
                this.Left = 0;
            }



            this.btn_donate.Image = new Bitmap(Properties.Resources.paypal_donate_button11, new Size(this.btn_donate.Width, this.btn_donate.Height));

            this.btn_info.Image     = new Bitmap(Properties.Resources._480px_Info_icon_002_svg, new Size(this.btn_info.Width, this.btn_info.Height));
            this.btn_settings.Image = new Bitmap(Properties.Resources.pignon, new Size(this.btn_settings.Width, this.btn_settings.Height));


            this.bt_update.Visible = false;

            this.Text = "D3Helper - V" + A_Tools.Version.AppVersion.version;


            DateTime latestOnlineVersion = A_Tools.Version.AppVersion.LatestOnlineVersion;
            DateTime currentVersion      = A_Tools.Version.AppVersion.get_CurrentVersionDate();

            if (latestOnlineVersion > currentVersion)
            {
                this.lb_versionlb.Text = "New Version Available!" + System.Environment.NewLine + latestOnlineVersion.ToString("yy.MM.d.H");
                //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = "New Version Available!"));
                this.bt_update.Visible = true;
            }
            else
            {
                this.lb_versionlb.Text = "";
                //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = ""));
            }
        }
Beispiel #3
0
        private void Window_Main_Load(object sender, EventArgs e)
        {
            if (!SupportedProcessVersion())
            {
                this.Text = "You are running a not supported D3Client(" + GetFileVersion() +
                            ") Supported Version is " + SupportedVersion;

                return;
            }

            typeof(Button).InvokeMember("DoubleBuffered",
    BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
    null, bt_Skill1, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
    BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
    null, bt_Skill2, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
    BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
    null, bt_Skill3, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
    BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
    null, bt_Skill4, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
    BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
    null, bt_SkillLmb, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
    BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
    null, bt_SkillRmb, new object[] { true });

            A_WPFOverlay.Overlay o = new A_WPFOverlay.Overlay();
            o.Show();

            directInput = new DirectInput();
            keyboard = new SlimDX.DirectInput.Keyboard(directInput);
            keyboard.Acquire();
           
           
            Point d3helpermainwindowpos = Properties.Settings.Default.D3Helper_MainForm_StartPosition;
            var screens = Screen.AllScreens.OrderByDescending(x => x.Bounds.X);

            if (d3helpermainwindowpos.X >= screens.Last().Bounds.Left && d3helpermainwindowpos.X <= screens.First().Bounds.Right && d3helpermainwindowpos.Y <= screens.First().Bounds.Bottom && d3helpermainwindowpos.Y >= screens.First().Bounds.Top)
            {
                this.Top = Properties.Settings.Default.D3Helper_MainForm_StartPosition.Y;
                this.Left = Properties.Settings.Default.D3Helper_MainForm_StartPosition.X;
            }
            else
            {
                this.Top = 0;
                this.Left = 0;
            }




            this.btn_donate.Image = new Bitmap(Properties.Resources.paypal_donate_button11, new Size(this.btn_donate.Width, this.btn_donate.Height));
            
            this.btn_info.Image = new Bitmap(Properties.Resources._480px_Info_icon_002_svg, new Size(this.btn_info.Width, this.btn_info.Height));
            this.btn_settings.Image = new Bitmap(Properties.Resources.pignon, new Size(this.btn_settings.Width, this.btn_settings.Height));
            

            this.bt_update.Visible = false;

            this.Text = "D3Helper - V" + A_Tools.Version.AppVersion.version;
            

            DateTime latestOnlineVersion = A_Tools.Version.AppVersion.LatestOnlineVersion;
            DateTime currentVersion = A_Tools.Version.AppVersion.get_CurrentVersionDate();

            if (latestOnlineVersion > currentVersion)
            {
                this.lb_versionlb.Text = "New Version Available!" + System.Environment.NewLine + latestOnlineVersion.ToString("yy.MM.d.H");
                //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = "New Version Available!"));
                this.bt_update.Visible = true;
            }
            else
            {
                this.lb_versionlb.Text = "";
                //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = ""));
            }


        }
Beispiel #4
0
        private void Window_Main_Load(object sender, EventArgs e)
        {
            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill1, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill2, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill3, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill4, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_SkillLmb, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_SkillRmb, new object[] { true });


            directInput = new DirectInput();
            keyboard    = new SlimDX.DirectInput.Keyboard(directInput);
            keyboard.Acquire();

            mouse = new SlimDX.DirectInput.Mouse(directInput);
            mouse.Acquire();


            Point d3helpermainwindowpos = Properties.Settings.Default.D3Helper_MainForm_StartPosition;
            var   screens = Screen.AllScreens.OrderByDescending(x => x.Bounds.X);

            if (d3helpermainwindowpos.X >= screens.Last().Bounds.Left&& d3helpermainwindowpos.X <= screens.First().Bounds.Right&& d3helpermainwindowpos.Y <= screens.First().Bounds.Bottom&& d3helpermainwindowpos.Y >= screens.First().Bounds.Top)
            {
                this.Top  = Properties.Settings.Default.D3Helper_MainForm_StartPosition.Y;
                this.Left = Properties.Settings.Default.D3Helper_MainForm_StartPosition.X;
            }
            else
            {
                this.Top  = 0;
                this.Left = 0;
            }


            //this.btn_donate.Image = new Bitmap(Properties.Resources.paypal_donate_button11, new Size(this.btn_donate.Width, this.btn_donate.Height));

            this.btn_info.Image     = new Bitmap(Properties.Resources._480px_Info_icon_002_svg, new Size(this.btn_info.Width, this.btn_info.Height));
            this.btn_settings.Image = new Bitmap(Properties.Resources.pignon, new Size(this.btn_settings.Width, this.btn_settings.Height));



            DateTime latestOnlineVersion = A_Tools.Version.AppVersion.LatestOnlineVersion;
            DateTime currentVersion      = A_Tools.Version.AppVersion.get_CurrentVersionDate();

            if (latestOnlineVersion > currentVersion)
            {
                this.lb_versionlb.Text = "New Version Available!" + System.Environment.NewLine + latestOnlineVersion.ToString("yy.MM.d.H");
                //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = "New Version Available!"));
                this.bt_update.Visible = true;
            }
            else
            {
                this.lb_versionlb.Text = "";
                //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = ""));
            }

            this.Text = "D3Helper - V" + A_Tools.Version.AppVersion.version;



            //create thread waiting for d3 start!
            Thread t = new Thread(delegate()
            {
                //wait till d3 is running
                while (!isDiabloRunning())
                {
                    try
                    {
                        Thread.Sleep(1000);
                    }
                    catch { }
                }

                if (SupportedProcessVersion())
                {
                    //-- Initialize Collector and Handler Thread
                    if (!Program.SingleThreaded)
                    {
                        A_Initialize.Th_ICollector.New_ICollector();
                    }
                    A_Initialize.Th_Handler.New_Handler();
                    //
                    if (A_Tools.Version.AppVersion.isOutdated()) // !!!!! REENABLE THIS!!!!!!
                    {
                        Window_Outdated WO = new Window_Outdated();
                        WO.ShowDialog();
                    }

                    System.Timers.Timer UpdateUI = new System.Timers.Timer(1000);
                    UpdateUI.Elapsed            += RefreshUI;
                    UpdateUI.Start();

                    Load_CustomFonts();
                }
                else
                {
                    this.Text = "You are running a not supported D3Client(" + GetFileVersion() +
                                ") Supported Version is " + SupportedVersion;
                }
            });

            t.SetApartmentState(ApartmentState.STA); //must be STA Thread to access GUI
            t.Start();



            //overlay
            if (SupportedProcessVersion())
            {
                A_WPFOverlay.Overlay o = new A_WPFOverlay.Overlay();
                o.Show();
            }
        }
Beispiel #5
0
        private void Window_Main_Load(object sender, EventArgs e)
        {
            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill1, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill2, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill3, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_Skill4, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_SkillLmb, new object[] { true });

            typeof(Button).InvokeMember("DoubleBuffered",
                                        BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                        null, bt_SkillRmb, new object[] { true });


            directInput = new DirectInput();
            keyboard    = new SlimDX.DirectInput.Keyboard(directInput);
            keyboard.Acquire();

            mouse = new SlimDX.DirectInput.Mouse(directInput);
            mouse.Acquire();


            Point d3helpermainwindowpos = Properties.Settings.Default.D3Helper_MainForm_StartPosition;
            var   screens = Screen.AllScreens.OrderByDescending(x => x.Bounds.X);

            if (d3helpermainwindowpos.X >= screens.Last().Bounds.Left&& d3helpermainwindowpos.X <= screens.First().Bounds.Right&& d3helpermainwindowpos.Y <= screens.First().Bounds.Bottom&& d3helpermainwindowpos.Y >= screens.First().Bounds.Top)
            {
                this.Top  = Properties.Settings.Default.D3Helper_MainForm_StartPosition.Y;
                this.Left = Properties.Settings.Default.D3Helper_MainForm_StartPosition.X;
            }
            else
            {
                this.Top  = 0;
                this.Left = 0;
            }


            //this.btn_donate.Image = new Bitmap(Properties.Resources.paypal_donate_button11, new Size(this.btn_donate.Width, this.btn_donate.Height));

            this.btn_info.Image     = new Bitmap(Properties.Resources._480px_Info_icon_002_svg, new Size(this.btn_info.Width, this.btn_info.Height));
            this.btn_settings.Image = new Bitmap(Properties.Resources.pignon, new Size(this.btn_settings.Width, this.btn_settings.Height));



            DateTime latestOnlineVersion = A_Tools.Version.AppVersion.LatestOnlineVersion;
            DateTime currentVersion      = A_Tools.Version.AppVersion.get_CurrentVersionDate();

            if (latestOnlineVersion > currentVersion)
            {
                this.lb_versionlb.Text = "New Version Available!" + System.Environment.NewLine + latestOnlineVersion.ToString("yy.MM.d.H");
                //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = "New Version Available!"));
                this.bt_update.Visible = true;
            }
            else
            {
                this.lb_versionlb.Text = "";
                //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = ""));
            }

            this.Text = "D3Helper - V" + A_Tools.Version.AppVersion.version;



            //Use SimpleCast!
            T_SimpleCast.StartSimpleCastThread();

            //fill combobox for simple cast
            loadSimeCastListToCombobox();



            //create thread waiting for d3 start!
            Thread t = new Thread(delegate()
            {
                //wait till d3 is running
                while (!isDiabloRunning())
                {
                    try
                    {
                        Thread.Sleep(1000);
                    }
                    catch { }
                }

                if (SupportedProcessVersion())
                {
                    //-- Initialize Collector and Handler Thread
                    //if (!Program.SingleThreaded)
                    A_Initialize.Th_ICollector.New_ICollector();
                    A_Initialize.Th_Handler.New_Handler();


                    System.Timers.Timer UpdateUI = new System.Timers.Timer(1000);
                    UpdateUI.Elapsed            += RefreshUI;
                    UpdateUI.Start();

                    Load_CustomFonts();
                }
                else
                {
                    this.Text = "You are running a not supported D3Client(" + GetFileVersion() +
                                ") Supported Version is " + SupportedVersion;
                }
            });

            t.SetApartmentState(ApartmentState.STA); //must be STA Thread to access GUI
            t.Start();



            //overlay
            if (SupportedProcessVersion())
            {
                A_WPFOverlay.Overlay o = new A_WPFOverlay.Overlay();
                o.Show();
            }

            Me.Threads.AntiIdleThread = new Thread(() =>
            {
                AntiIdle antiIdle = new AntiIdle();
            });
            if (Properties.Settings.Default.AntiIdleBool)
            {
                Me.Threads.AntiIdleThread.Start();
            }

            try
            {
                if (Me.Threads.RosBotUpgradeKadalaThread.ThreadState == System.Threading.ThreadState.Unstarted)
                {
                    Me.Threads.RosBotUpgradeKadalaThread = new Thread(() =>
                    {
                        RosBotUpgradeKadala rosBotUpgradeKadala = new RosBotUpgradeKadala();
                    });
                    if (Properties.Settings.Default.RosBotUpgradeKadalaBool)
                    {
                        Me.Threads.RosBotUpgradeKadalaThread.Start();
                    }
                }
            }
            catch
            {
                Me.Threads.RosBotUpgradeKadalaThread = new Thread(() =>
                {
                    RosBotUpgradeKadala rosBotUpgradeKadala = new RosBotUpgradeKadala();
                });
                if (Properties.Settings.Default.RosBotUpgradeKadalaBool)
                {
                    Me.Threads.RosBotUpgradeKadalaThread.Start();
                }
            }

            Me.Threads.HomingPadsThread = new Thread(() =>
            {
                HomingPadsHandler homingPadsHandler = new HomingPadsHandler();
            });
            // Probably best to not start this thread unless user has it turned on in settings
            // Will require a restart of D3helper any time it's turned on/off though
            if (Properties.Settings.Default.HomingPadsBool)
            {
                Me.Threads.HomingPadsThread.Start();
            }
        }