コード例 #1
0
ファイル: CommonHelper.cs プロジェクト: CjShu/xQx-LeagueSharp
        public static void Init()
        {
            TextStatus = new Font(Drawing.Direct3DDevice,
                                  new FontDescription
            {
                FaceName        = "Segoe UI",
                Height          = 17,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural,
                Weight          = FontWeight.Bold
            });

            Text = new Font(Drawing.Direct3DDevice,
                            new FontDescription
            {
                FaceName        = "Segoe UI",
                Height          = 19,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural,
            });

            TextLittle = new Font(Drawing.Direct3DDevice,
                                  new FontDescription
            {
                FaceName        = "Segoe UI",
                Height          = 15,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural,
            });
        }
コード例 #2
0
		static void Main(string[] args)
		{
			Game.OnUpdate += Game_OnUpdate;
			Game.OnWndProc += Game_OnWndProc;
			Console.WriteLine("> Tiny# loaded!");

			txt = new Font(
			   Drawing.Direct3DDevice9,
			   new FontDescription
			   {
				   FaceName = "Tahoma",
				   Height = 12,
				   OutputPrecision = FontPrecision.Default,
				   Quality = FontQuality.Default
			   });

			not = new Font(
			   Drawing.Direct3DDevice9,
			   new FontDescription
			   {
				   FaceName = "Tahoma",
				   Height = 20,
				   OutputPrecision = FontPrecision.Default,
				   Quality = FontQuality.Default
			   });

			Drawing.OnPreReset += Drawing_OnPreReset;
			Drawing.OnPostReset += Drawing_OnPostReset;
			Drawing.OnEndScene += Drawing_OnEndScene;
			AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
		}
コード例 #3
0
        public static void Initialize()
        {
            WaterMarkFont = new Font(Drawing.Direct3DDevice,
                                     new FontDescription
            {
                FaceName        = "微软雅黑",
                Height          = 28,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.Default
            });

            Menu = new Menu("FrozenGJ设置", "Common.FrozenGJ");
            CommonMenu.Instance.AddSubMenu(Menu);

            Info = Menu.AddSubMenu(new Menu("信息设置", "信息设置"));
            Info.AddItem(new MenuItem("水印", "载入屏显示FrozenGJ水印").SetValue(true));
            Info.AddItem(new MenuItem("logo类型", "选择显示的logo的类型").SetValue(new StringList(new[] { "logo1", "logo2" })));
            Info.AddItem(new MenuItem("新闻", "显示FrozenGJ新闻").SetValue(true));
            Info.AddItem(new MenuItem("加群", "点击复制FrozenGJ脚本群号").SetValue(false).DontSave()).ValueChanged += (sender, args) =>
            {
                //System.Diagnostics.Process.Start("http://jq.qq.com/?_wv=1027&k=2EAsP8x");
                //System.Windows.Forms.Clipboard.SetText("FrozenGJ脚本群:10642347");
                //Game.PrintChat("[FrozenGJ]:".ToHtml(Color.RoyalBlue) + "群号已经复制,记得出游戏后添加。FrozenGJ脚本群:10642347".ToUTF8());
            };
            Info.AddItem(new MenuItem("Info0", ""));
            Info.AddItem(new MenuItem("Info1", "版权归属L#,部分代码归代码作者"));

            CustomEvents.Game.OnGameLoad += Game_OnGameLoad;
            Drawing.OnDraw += Drawing_OnDraw;
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: Evervolv1337/Ensage
        private static void Main()
        {
            Events.OnLoad += On_Load;
            Events.OnClose += On_Close;
            _text = new Font(
                Drawing.Direct3DDevice9,
                new FontDescription
                {
                    FaceName = "Segoe UI",
                    Height = 17,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType
                });

            _notice = new Font(
                Drawing.Direct3DDevice9,
                new FontDescription
                {
                    FaceName = "Segoe UI",
                    Height = 30,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType
                });

            _line = new Line(Drawing.Direct3DDevice9);
            Game.OnUpdate += Killsteal;
            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Drawing.OnDraw += Drawing_OnDraw;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
            
        }
コード例 #5
0
        public Tristana()
        {
            Q = new Spell(SpellSlot.Q, 703);

            W = new Spell(SpellSlot.W, 900);
            W.SetSkillshot(.50f, 250f, 1400f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 703);
            R = new Spell(SpellSlot.R, 703);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled = true;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Courier new",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default,
                });

            Utils.PrintMessage("Tristana loaded.");
            Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;
        }
コード例 #6
0
        public static void Init()
        {
            Console.WriteLine(ObjectMgr.LocalHero.Name.ToString());
            if (ObjectMgr.LocalHero.Name.ToString() == "npc_dota_hero_legion_commander")
            {
                Game.OnUpdate += Game_OnUpdate;
                loaded = false;
                text = new Font(
                    Drawing.Direct3DDevice9,
                    new FontDescription
                        {
                            FaceName = "Tahoma",
                            Height = 13,
                            OutputPrecision = FontPrecision.Default,
                            Quality = FontQuality.Default
                        });

                Drawing.OnPreReset += Drawing_OnPreReset;
                Drawing.OnPostReset += Drawing_OnPostReset;
                Drawing.OnEndScene += Drawing_OnEndScene;
                AppDomain.CurrentDomain.DomainUnload += CurrentDomainDomainUnload;
                Game.OnWndProc += Game_OnWndProc;
                Player.OnExecuteOrder += Player_OnExecuteAction;
            }
        }
コード例 #7
0
ファイル: MDrawing.cs プロジェクト: 4859aa/LeagueSharp-Dev
 public static Font GetFont(int fontSize)
 {
     Font font = null;
     try
     {
         if (!Fonts.TryGetValue(fontSize, out font))
         {
             font = new Font(
                 Drawing.Direct3DDevice,
                 new FontDescription
                 {
                     FaceName = Global.DefaultFont,
                     Height = fontSize,
                     OutputPrecision = FontPrecision.Default,
                     Quality = FontQuality.Default
                 });
             Fonts[fontSize] = font;
         }
         else
         {
             if (!_unloaded && (font == null || font.IsDisposed))
             {
                 Fonts.Remove(fontSize);
                 GetFont(fontSize);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return font;
 }
コード例 #8
0
        public Jinx()
        {
            Q = new Spell(SpellSlot.Q);

            W = new Spell(SpellSlot.W, 1450f);
            W.SetSkillshot(0.7f, 60f, 3300f, true, SkillshotType.SkillshotLine);

            E = new Spell(SpellSlot.E, 900f);
            E.SetSkillshot(0.9f, 60f, 1700f, false, SkillshotType.SkillshotCircle);

            R = new Spell(SpellSlot.R, 1500f);
            R.SetSkillshot(0.6f, 140f, 1700f, false, SkillshotType.SkillshotLine);

            Obj_AI_Base.OnProcessSpellCast += Game_OnProcessSpell;

            Utils.PrintMessage("Jinx loaded.");
            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Courier new",
                Height          = 15,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.Default,
            });
        }
コード例 #9
0
 public RenderFont(RenderEngine re, string fontFace, int width, int height)
 {
     _Engine = re;
     _Font   = new SharpDX.Direct3D9.Font(re.Device, height, width, FontWeight.Normal, 1, false,
                                          FontCharacterSet.Default, FontPrecision.Default, FontQuality.Default,
                                          FontPitchAndFamily.Default, fontFace);
 }
コード例 #10
0
ファイル: RecallTracker.cs プロジェクト: hao1630/KickAss
        public static void Initialize()
        {
            _Font = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Tahoma",
                    Height = 18,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType,
                    Weight = FontWeight.Bold

                });

            _FontNumber = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Tahoma",
                    Height = 17,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType,
                    Weight = FontWeight.Bold

                });
        }
コード例 #11
0
ファイル: Program.cs プロジェクト: EliKhorne/ESharp
        private static void Main(string[] args)
        {
            Menu.AddItem(new MenuItem("auto_reload", "Auto Reload").SetValue(false));
            Menu.AddItem(new MenuItem("refresh_hotkey2", "Force Refresh hotkey").SetValue(new KeyBind('M', KeyBindType.Press)).SetTooltip("Force refresh, regardless of the update rate"));
            Menu.AddItem(new MenuItem("repeat_hotkey2", "Repeat hotkey").SetValue(new KeyBind('N', KeyBindType.Press)).SetTooltip("Hold to refresh at refresh rate"));
            Menu.AddItem(new MenuItem("refresh_rate", "Refresh Rate").SetValue(new Slider(5000, 50, 10000)).SetTooltip("tick per refresh"));
            Menu.AddToMainMenu();
            
            _text = new Font(
               Drawing.Direct3DDevice9,
               new FontDescription
               {
                   FaceName = "Calibri",
                   Height = 25,
                   OutputPrecision = FontPrecision.Default,
                   Quality = FontQuality.Default
               });

            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnWndProc += Game_OnWndProc;
            Game.OnIngameUpdate += Game_OnUpdate;
            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
        }
コード例 #12
0
        public static void Init()
        {
            Game.OnUpdate += Game_OnUpdate;
            loaded = false;
            me = null;
            target = null;

            //item
            scytheOfVyse = null;
            blink = null;
            arcane = null;
            orchid = null;
            dagon = null;
            veil = null;
            soulring = null;
            shiva = null;
            text = new Font(
                Drawing.Direct3DDevice9,
                new FontDescription
                {
                    FaceName = "Tahoma",
                    Height = 13,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default
                });

            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomainDomainUnload;
            Game.OnWndProc += Game_OnWndProc;
            Orbwalking.Load();

        }
コード例 #13
0
        public static void DrawTextCentered(this Font font,
                                            string text,
                                            Obj_AI_Base target,
                                            Color color,
                                            bool outline = false)
        {
            var measure  = GetMeasured(font, text);
            var position = Drawing.WorldToScreen(target.Position);

            if (outline)
            {
                font.DrawText(
                    null, text, (int)(position.X + 1 - measure.Width * 0.5f),
                    (int)(position.Y + 1 - measure.Height * 0.5f), XDColor.Black);
                font.DrawText(
                    null, text, (int)(position.X - 1 - measure.Width * 0.5f),
                    (int)(position.Y - 1 - measure.Height * 0.5f), XDColor.Black);
                font.DrawText(
                    null, text, (int)(position.X + 1 - measure.Width * 0.5f),
                    (int)(position.Y - measure.Height * 0.5f), XDColor.Black);
                font.DrawText(
                    null, text, (int)(position.X - 1 - measure.Width * 0.5f),
                    (int)(position.Y - measure.Height * 0.5f), XDColor.Black);
            }
            font.DrawText(
                null, text, (int)(position.X - measure.Width * 0.5f), (int)(position.Y - measure.Height * 0.5f), new XDColor(color.R, color.G, color.B, color.A));
        }
コード例 #14
0
ファイル: MDrawing.cs プロジェクト: yashine59fr/PortAIO-1
 public static Font GetFont(int fontSize)
 {
     Font font = null;
     try
     {
         if (!Fonts.TryGetValue(fontSize, out font))
         {
             font = new Font(
                 Drawing.Direct3DDevice,
                 new FontDescription
                 {
                     FaceName = "Tahoma",
                     Height = fontSize,
                     OutputPrecision = FontPrecision.Default,
                     Quality = FontQuality.Default
                 });
             Fonts[fontSize] = font;
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(@"An error occurred: '{0}'", e);
     }
     return font;
 }
コード例 #15
0
        public static void DrawTextCentered(this Font font,
                                            string text,
                                            Vector2 position,
                                            XDColor color,
                                            bool outline = false)
        {
            var measure = GetMeasured(font, text);

            if (outline)
            {
                font.DrawText(
                    null, text, (int)(position.X + 1 - measure.Width * 0.5f),
                    (int)(position.Y + 1 - measure.Height * 0.5f), XDColor.Black);
                font.DrawText(
                    null, text, (int)(position.X - 1 - measure.Width * 0.5f),
                    (int)(position.Y - 1 - measure.Height * 0.5f), XDColor.Black);
                font.DrawText(
                    null, text, (int)(position.X + 1 - measure.Width * 0.5f),
                    (int)(position.Y - measure.Height * 0.5f), XDColor.Black);
                font.DrawText(
                    null, text, (int)(position.X - 1 - measure.Width * 0.5f),
                    (int)(position.Y - measure.Height * 0.5f), XDColor.Black);
            }
            font.DrawText(
                null, text, (int)(position.X - measure.Width * 0.5f), (int)(position.Y - measure.Height * 0.5f), color);
        }
コード例 #16
0
ファイル: UrsaRage.cs プロジェクト: 0Metrix0/EnsageSharp
        public static void Init()
        {
            Game.OnUpdate += Game_OnUpdate;
            loaded = false;
            me = null;
            target = null;
            earthshock = null;
            overpower = null;
            enrage = null;
            abyssalBlade = null;
            scytheOfVyse = null;
            blink = null;
            text = new Font(
                Drawing.Direct3DDevice9,
                new FontDescription
                    {
                        FaceName = "Tahoma", Height = 13, OutputPrecision = FontPrecision.Default,
                        Quality = FontQuality.Default
                    });

            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomainDomainUnload;
            Game.OnWndProc += Game_OnWndProc;
            Orbwalking.Load();
        }
コード例 #17
0
ファイル: CommonHelper.cs プロジェクト: CjShu/xQx-LeagueSharp
        public static void Init()
        {
            Text = new Font(Drawing.Direct3DDevice,
                            new FontDescription
            {
                FaceName        = "Segoe UI",
                Height          = 19,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural,
            });

            TextLittle = new Font(Drawing.Direct3DDevice,
                                  new FontDescription
            {
                FaceName        = "Segoe UI",
                Height          = 15,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural,
            });

            Drawing.OnPreReset  += DrawingOnOnPreReset;
            Drawing.OnPostReset += DrawingOnOnPostReset;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomainOnDomainUnload;
            AppDomain.CurrentDomain.ProcessExit  += CurrentDomainOnDomainUnload;
        }
コード例 #18
0
        private static void OnLoadingComplete(EventArgs args)
        {
            if (Player.ChampionName != "Karthus")
            {
                return;
            }
            AbilitySequence = new int[] { 1, 3, 1, 2, 1, 4, 1, 3, 1, 3, 4, 3, 3, 2, 2, 4, 2, 2 };
            Chat.Print("KzKarthus Loaded!", Color.CornflowerBlue);
            Chat.Print("Enjoy the game and DONT FEED!", Color.Red);
            Tahoma16B = new Font(Drawing.Direct3DDevice, new FontDescription {
                FaceName = "Tahoma", Height = 16, Weight = FontWeight.Bold, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType
            });
            KzKarthusMenu.loadMenu();
            Game.OnTick += GameOnTick;
            MyActivator.loadSpells();
            Game.OnUpdate += OnGameUpdate;

            #region Skill
            Q = new Spell.Skillshot(SpellSlot.Q, 950, SkillShotType.Circular, 1000, int.MaxValue, 160);
            W = new Spell.Skillshot(SpellSlot.W, 1000, SkillShotType.Circular, 500, int.MaxValue, 70);
            E = new Spell.Active(SpellSlot.E, 505);
            R = new Spell.Skillshot(SpellSlot.R, 25000, SkillShotType.Circular, 3000, int.MaxValue, int.MaxValue);
            #endregion

            Gapcloser.OnGapcloser += AntiGapCloser;
            Drawing.OnDraw        += GameOnDraw;
        }
コード例 #19
0
		static void Main(string[] args)
		{

			Game.OnUpdate += Game_OnUpdate;
			Game.OnWndProc += Game_OnWndProc;
			Console.WriteLine("> Pugna# loaded!");

			txt = new Font(
			   Drawing.Direct3DDevice9,
			   new FontDescription
			   {
				   FaceName = "Segoe UI",
				   Height = 17,
				   OutputPrecision = FontPrecision.Default,
				   Quality = FontQuality.ClearType
			   });

			noti = new Font(
			   Drawing.Direct3DDevice9,
			   new FontDescription
			   {
				   FaceName = "Segoe UI",
				   Height = 30,
				   OutputPrecision = FontPrecision.Default,
				   Quality = FontQuality.ClearType
			   });

			lines = new Line(Drawing.Direct3DDevice9);

			Drawing.OnPreReset += Drawing_OnPreReset;
			Drawing.OnPostReset += Drawing_OnPostReset;
			Drawing.OnEndScene += Drawing_OnEndScene;
			AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
		}
コード例 #20
0
ファイル: Ezreal.cs プロジェクト: xie979292964/CN
        public Ezreal()
        {
            Q = new Spell(SpellSlot.Q, 1190);
            Q.SetSkillshot(0.25f, 60f, 2000f, true, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 800);
            W.SetSkillshot(0.25f, 80f, 1600f, false, SkillshotType.SkillshotLine);

            E = new Spell(SpellSlot.E);

            R = new Spell(SpellSlot.R, 2500);
            R.SetSkillshot(1f, 160f, 2000f, false, SkillshotType.SkillshotLine);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled      = true;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Courier new",
                Height          = 15,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.Default,
            });

            Utils.PrintMessage("Ezreal loaded.");
        }
コード例 #21
0
ファイル: Program.cs プロジェクト: Faqer/Leaguesharp-2
        private static void OnGameLoad(EventArgs e)
        {
            if (Player.ChampionName != "Kalista")
            {
                return;
            }

            Q = new Spell(SpellSlot.Q, 1130);
            W = new Spell(SpellSlot.W, 5200);
            E = new Spell(SpellSlot.E, 1000);
            R = new Spell(SpellSlot.R, 1400f);

            Q.SetSkillshot(0.25f, 30f, 1700f, true, SkillshotType.SkillshotLine);

            Text = new Font(Drawing.Direct3DDevice, new FontDescription { FaceName = "Arial", Height = 35, Width = 12, Weight = FontWeight.Bold, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default });
            root = new Menu("HastaKalistaBaby", "hkalista", true);
            draw = new Menu("Drawings Settings", "drawing");
            Orbwalker = new Orbwalking.Orbwalker(root.SubMenu("Orbwalker Settings"));

            MenuManager.Create();
            DamageIndicator.Init(Damage.GetEdamage);
            ee = new EarlyEvade();
            AutoLevel.Init();
            Game.OnUpdate += OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Obj_AI_Base.OnProcessSpellCast += Helper.OnProcessSpellCast;
            Spellbook.OnCastSpell += Helper.OnCastSpell;

        }
コード例 #22
0
        /// <summary>
        ///     Loads this instance.
        /// </summary>
        public void Load()
        {
            if (!HeroManager.Enemies.Any())
            {
                return;
            }

            this.teleportTexture = Resources.LP_Teleport.ToTexture();

            var spawn = ObjectManager.Get <Obj_SpawnPoint>().FirstOrDefault(x => x.IsEnemy);

            this.spawnPoint = spawn != null ? spawn.Position : Vector3.Zero;

            foreach (var enemy in HeroManager.Enemies)
            {
                this.heroTextures[enemy.NetworkId] =
                    (ImageLoader.Load("LP", enemy.ChampionName) ?? Resources.LP_Default).ToTexture();
                var eStruct = new LastPositionStruct(enemy)
                {
                    LastPosition = this.spawnPoint
                };
                this.lastPositions.Add(eStruct);
            }

            Drawing.OnEndScene     += this.OnDrawingEndScene;
            Obj_AI_Base.OnTeleport += this.OnObjAiBaseTeleport;

            Drawing.OnPreReset  += args => { this.text.OnLostDevice(); };
            Drawing.OnPostReset += args => { this.text.OnResetDevice(); };

            this.sprite = MDrawing.GetSprite();
            this.text   = MDrawing.GetFont(getSliderItem(this.Menu, "LastPosition.FontSize"));
            this.line   = MDrawing.GetLine(1);
        }
コード例 #23
0
        public Ezreal()
        {
            Q = new Spell(SpellSlot.Q, 1150f);
            Q.SetSkillshot(0.25f, 60f, 2000f, true, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 900f);
            W.SetSkillshot(0.25f, 80f, 1600f, false, SkillshotType.SkillshotLine);

            E = new Spell(SpellSlot.E);

            R = new Spell(SpellSlot.R, 2500f);
            R.SetSkillshot(1f, 160f, 2000f, false, SkillshotType.SkillshotLine);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled = true;

            VText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Courier new",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default,
                });

            Utils.PrintMessage("Ezreal loaded.");
        }
コード例 #24
0
ファイル: HealthTracker.cs プロジェクト: sadnecc/CHportcn
        /// <summary>
        ///     Fired when the scene is completely rendered.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private void Drawing_OnEndScene(EventArgs args)
        {
            if (!getCheckBoxItem(this.Menu, "DrawHealth_"))
            {
                return;
            }

            float i = 0;

            foreach (var hero in HeroManager.Enemies.Where(x => !x.IsDead))
            {
                var champion = hero.ChampionName;
                if (champion.Length > 12)
                {
                    champion = champion.Remove(7) + "...";
                }


                var championInfo = getCheckBoxItem(this.Menu, "DrawHealth_percent")
                    ? champion + " (" + (int)hero.HealthPercent + "%)"
                    : champion;

                // Draws the championnames
                Font.DrawText(null, championInfo, (int)((Drawing.Width - this.HudOffsetRight - this.HudOffsetText - Font.MeasureText(null, championInfo, FontDrawFlags.Left).Width)), (int)(this.HudOffsetTop + i + 4 - Font.MeasureText(null, championInfo, FontDrawFlags.Left).Height / 2f), hero.HealthPercent > 0 ? new ColorBGRA(255, 255, 255, 255) : new ColorBGRA(244, 8, 8, 255));

                // Draws the rectangle
                this.DrawRect(Drawing.Width - this.HudOffsetRight, this.HudOffsetTop + i, 100, this.BarHeight, 1, Color.FromArgb(255, 51, 55, 51));

                // Fils the rectangle
                this.DrawRect(Drawing.Width - this.HudOffsetRight, this.HudOffsetTop + i, hero.HealthPercent <= 0 ? 100 : (int)(hero.HealthPercent), this.BarHeight, 1, hero.HealthPercent < 30 && hero.HealthPercent > 0 ? Color.FromArgb(255, 230, 169, 14) : hero.HealthPercent <= 0 ? Color.FromArgb(255, 206, 20, 30) : Color.FromArgb(255, 29, 201, 38));

                i += 20f + this.HudSpacing;
            }
        }
コード例 #25
0
ファイル: RecallTracker.cs プロジェクト: wx8829110/WUYANZZZ
        public void Load()
        {
            this.Heroes  = ObjectManager.Get <Obj_AI_Hero>().ToList();
            this.Enemies = HeroManager.Enemies.ToList();

            this.EnemyInfo = this.Enemies.Select(x => new EnemyInfo(x)).ToList();
            this.Map       = Utility.Map.GetMap().Type;

            this.Text = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Calibri",
                Height          = this.Menu.Item("RecallTracker.FontSize").GetValue <Slider>().Value,
                Width           = 6,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.Default
            });

            Obj_AI_Base.OnTeleport += this.Obj_AI_Base_OnTeleport;
            Drawing.OnDraw         += this.Drawing_OnDraw;
            Drawing.OnPreReset     += args => { this.Text.OnLostDevice(); };
            Drawing.OnPostReset    += args => { this.Text.OnResetDevice(); };
            AppDomain.CurrentDomain.DomainUnload += this.CurrentDomainDomainUnload;
            AppDomain.CurrentDomain.ProcessExit  += this.CurrentDomainDomainUnload;
        }
コード例 #26
0
ファイル: Ashe.cs プロジェクト: qktlfflzk/Backup5.4
        public Ashe()
        {
            Q = new Spell(SpellSlot.Q);
            W = new Spell(SpellSlot.W, 1200);
            E = new Spell(SpellSlot.E, 2500);
            R = new Spell(SpellSlot.R, 20000);

            W.SetSkillshot(250f, (float) (24.32f * Math.PI / 180), 902f, true, SkillshotType.SkillshotCone);
            E.SetSkillshot(377f, 299f, 1400f, false, SkillshotType.SkillshotLine);
            R.SetSkillshot(250f, 130f, 1600f, false, SkillshotType.SkillshotLine);

            Interrupter.OnPossibleToInterrupt += Game_OnPossibleToInterrupt;
            Obj_AI_Base.OnProcessSpellCast += Game_OnProcessSpell;

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled = true;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Courier new",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default,
                });

            Utils.PrintMessage("Ashe loaded.");
        }
コード例 #27
0
        public void LoadOKTW()
        {
            TextBold = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {

                    FaceName = "Impact",
                    Height = 36,
                    Weight = FontWeight.Normal,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default
                });

            Text = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Calibri",
                    Height = 16,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType
                });

            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("SS", "SS notification").SetValue(true));

            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnUpdate += OnUpdate;
        }
コード例 #28
0
        /*
         * /// <summary>
         * ///     The bold font.
         * /// </summary>
         * internal static Font FontBold;
         *
         * /// <summary>
         * ///     The italic font.
         * /// </summary>
         * internal static Font FontItalic;
         *
         * /// <summary>
         * ///     The bold and italic font.
         * /// </summary>
         * internal static Font FontBoldItalic;
         */
        #endregion

        #region Constructors and Destructors

        /// <summary>
        ///     Initializes a static instance of the <see cref="MenuDrawHelper" /> class.
        /// </summary>
        static MenuDrawHelper()
        {
            var device          = Drawing.Direct3DDevice;
            var faceName        = Menu.Root.Item("FontName").GetValue <StringList>().SelectedValue;
            var height          = Menu.Root.Item("FontSize").GetValue <Slider>().Value;
            var outputPercision = FontPrecision.Default;
            var quality         = (FontQuality)Enum.Parse(typeof(FontQuality), Menu.Root.Item("FontQuality").GetValue <StringList>().SelectedValue, true);

            Font = new Font(
                device,
                height,
                0,
                FontWeight.DoNotCare,
                0,
                false,
                FontCharacterSet.Default,
                outputPercision,
                quality,
                FontPitchAndFamily.DontCare | FontPitchAndFamily.Decorative | FontPitchAndFamily.Modern,
                faceName);

            Drawing.OnPreReset  += OnPreReset;
            Drawing.OnPostReset += OnPostReset;
            AppDomain.CurrentDomain.DomainUnload += OnDomainUnload;
        }
コード例 #29
0
        public void Load()
        {
            txt = new Font(
               Drawing.Direct3DDevice9,
               new FontDescription
               {
                   FaceName = "Tahoma",
                   Height = 11,
                   OutputPrecision = FontPrecision.Default,
                   Quality = FontQuality.Default
               });

            not = new Font(
               Drawing.Direct3DDevice9,
               new FontDescription
               {
                   FaceName = "Tahoma",
                   Height = 12,
                   OutputPrecision = FontPrecision.Default,
                   Quality = FontQuality.Default
               });

            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;

            OnLoadMessage();
        }
コード例 #30
0
ファイル: SpellR.cs プロジェクト: yashine59fr/PortAIO-1
        public SpellR()
        {
            Text = new Font(Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Malgun Gothic",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearTypeNatural
                });

            TextBold = new Font(Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Malgun Gothic",
                    Height = 15,
                    Weight = FontWeight.Bold,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearTypeNatural
                });

            TextWarning = new Font(Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Malgun Gothic",
                    Height = 75,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearTypeNatural
                });

            Load();
        }
コード例 #31
0
        /// <summary>
        ///     The domain unload event.
        /// </summary>
        /// <param name="sender">
        ///     The sender.
        /// </param>
        /// <param name="eventArgs">
        ///     The event args.
        /// </param>
        private static void OnDomainUnload(object sender, EventArgs eventArgs)
        {
            if (Font != null)
            {
                Font.OnLostDevice();
                Font.Dispose();
                Font = null;
            }

            if (FontBold != null)
            {
                FontBold.OnLostDevice();
                FontBold.Dispose();
                FontBold = null;
            }

            if (FontBoldItalic != null)
            {
                FontBoldItalic.OnLostDevice();
                FontBoldItalic.Dispose();
                FontBoldItalic = null;
            }

            if (FontItalic != null)
            {
                FontItalic.OnLostDevice();
                FontItalic.Dispose();
                FontItalic = null;
            }
        }
コード例 #32
0
ファイル: Utils.cs プロジェクト: uio25371555/LeagueSharp2
        public Utils()
        {
            Text = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Segoe UI",
                Height          = 16,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural
            });

            TextBold = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Segoe UI",
                Height          = 16,
                Weight          = FontWeight.Bold,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural
            });

            TextWarning = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Malgun Gothic",
                Height          = 75,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural
            });
        }
コード例 #33
0
ファイル: SkillBar.cs プロジェクト: AwkwardDev/LeagueSharp2
        public SkillBar(Menu config)
        {
            MenuSkillBar = config.AddSubMenu(new Menu("Cooldown Tracker", "SkillBar"));
            MenuSkillBar.AddItem(new MenuItem("OnAllies", "On Allies").SetValue(false));
            MenuSkillBar.AddItem(new MenuItem("OnEnemies", "On Enemies").SetValue(true));
            Sprite = new Sprite(Drawing.Direct3DDevice);
            HudTexture = Texture.FromMemory(
                Drawing.Direct3DDevice, (byte[]) new ImageConverter().ConvertTo(Resources.main, typeof(byte[])), 127, 41,
                0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
            FrameLevelTexture = Texture.FromMemory(
                Drawing.Direct3DDevice, (byte[]) new ImageConverter().ConvertTo(Resources.spell_level, typeof(byte[])),
                2, 3, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
            ButtonRedTexture = Texture.FromMemory(
                Drawing.Direct3DDevice, (byte[]) new ImageConverter().ConvertTo(Resources.disable, typeof(byte[])), 14,
                14, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
            SmallText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Calibri",
                    Height = 13,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default,
                });

            AppDomain.CurrentDomain.DomainUnload += DomainUnload;
            AppDomain.CurrentDomain.ProcessExit += DomainUnload;
            CustomEvents.Game.OnGameLoad += Game_OnGameLoad;
        }
コード例 #34
0
        public Tristana()
        {
            Q = new Spell(SpellSlot.Q, 703);
            W = new Spell(SpellSlot.W, 703);
            E = new Spell(SpellSlot.E, 703);
            R = new Spell(SpellSlot.R, 703);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled      = true;

            AntiGapcloser.OnEnemyGapcloser    += AntiGapcloser_OnEnemyGapcloser;
            Interrupter.OnPossibleToInterrupt += Interrupter_OnPossibleToInterrupt;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Courier new",
                Height          = 15,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.Default,
            });

            Utils.PrintMessage("Tristana loaded.");
        }
コード例 #35
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="device">DX Object</param>
 /// <param name="hook">String</param>
 /// <param name="x">Position X</param>
 /// <param name="y">Position Y</param>
 public void Text(Device device, string hook, int x, int y)
 {
     try
     {
         using (var font = new SharpDX.Direct3D9.Font(device, new FontDescription()
         {
             Height = 18,
             FaceName = "Arial",
             Italic = false,
             Width = 0,
             MipLevels = 1,
             CharacterSet = FontCharacterSet.Default,
             OutputPrecision = FontPrecision.Default,
             Quality = FontQuality.ClearTypeNatural,
             PitchAndFamily = FontPitchAndFamily.Default | FontPitchAndFamily.DontCare,
             Weight = FontWeight.Bold
         }))
         {
             {
                 font.DrawText(null, hook, x, y, new SharpDX.ColorBGRA(255, 0, 0, (byte)Math.Round((Math.Abs(6.0f) * 255f))));
             }
         }
     }
     catch (Exception ex)
     {
         Interface.Text("Info: Text() " + ex.Message + "\r\n" + ex.StackTrace);
     }
 }
コード例 #36
0
 /// <summary>
 ///     Initializes static members of the <see cref="MenuSettings" /> class.
 ///     Default Settings Static Constructor.
 /// </summary>
 static MenuSettings()
 {
     ContainerHeight = 30;
     ContainerSelectedColor = new ColorBGRA(255, 255, 255, 255 / 2);
     ContainerSeparatorColor = new ColorBGRA(255, 255, 255, 100);
     Position = new Vector2(30, 30);
     ContainerWidth = 200f;
     Font = new Font(
         Drawing.Direct3DDevice, 
         14, 
         0, 
         FontWeight.DoNotCare, 
         0, 
         false, 
         FontCharacterSet.Default,
         FontPrecision.TrueType,
         FontQuality.ClearTypeNatural,
         FontPitchAndFamily.DontCare | FontPitchAndFamily.Decorative | FontPitchAndFamily.Modern, 
         "Tahoma");
     ContainerTextMarkOffset = 8f;
     ContainerTextOffset = 15f;
     HoverColor = new ColorBGRA(255, 255, 255, 50);
     RootContainerColor = new ColorBGRA(0, 0, 0, (byte)(255 / 1.5f));
     TextColor = Color.White;
 }
コード例 #37
0
 private static void Main(string[] args)
 {
     Sprite         = new Sprite(Drawing.Direct3DDevice);
     HUDult         = Texture.FromMemory(Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.HUDult, typeof(byte[])), 16, 16, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
     blackTexture   = Texture.FromMemory(Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.schwarz, typeof(byte[])), 62, 90, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
     HUD            = Texture.FromMemory(Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.HUDtest, typeof(byte[])), 62, 90, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
     hpTexture      = Texture.FromMemory(Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.HPbar, typeof(byte[])), 58, 10, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
     manaTexture    = Texture.FromMemory(Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.MANAbar, typeof(byte[])), 58, 10, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
     energieTexture = Texture.FromMemory(Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.Energiebar, typeof(byte[])), 58, 10, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
     small          = new SharpDX.Direct3D9.Font(Drawing.Direct3DDevice, new FontDescription()
     {
         FaceName        = "Verdana",
         Height          = 10,
         OutputPrecision = FontPrecision.Default,
         Quality         = FontQuality.Default
     });
     respawnfont = new SharpDX.Direct3D9.Font(Drawing.Direct3DDevice, new FontDescription()
     {
         FaceName        = "Verdana",
         Height          = 40,
         OutputPrecision = FontPrecision.Default,
         Quality         = FontQuality.Default
     });
     CustomEvents.Game.OnGameLoad += Game_OnGameLoad;
 }
コード例 #38
0
ファイル: Tristana.cs プロジェクト: rokaHakor/GodlikeSkillz
        public Tristana()
        {
            Q = new Spell(SpellSlot.Q, 703);

            W = new Spell(SpellSlot.W, 900);
            W.SetSkillshot(.50f, 250f, 1400f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 703);
            R = new Spell(SpellSlot.R, 703);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled = true;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Courier new",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default,
                });

            Utils.PrintMessage("Tristana loaded.");
            Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;
        }
コード例 #39
0
ファイル: DamageIndicator.cs プロジェクト: mariogk/EB
        public static void Initialize(DamageToUnitDelegate damageToUnit)
        {
            DamageToUnit = damageToUnit;
            Drawing.OnEndScene += OnEndScene;

            _Font = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Segoi UI",
                    Height = 18,
                    Weight = FontWeight.Bold,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType,


                });

            _Font2 = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Segoi UI",
                    Height = 12,
                    Weight = FontWeight.Bold,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType,

                });
        }
コード例 #40
0
ファイル: Program.cs プロジェクト: vitac1998/Ensage
        static void Main(string[] args)
        {
            var hotkey = new MenuItem("hotkey", "Toggle hotkey").SetValue(
               new KeyBind('O', KeyBindType.Toggle));
            hotkey.ValueChanged += Hotkey_ValueChanged;
            Menu.AddItem(hotkey);

            Menu.AddItem(new MenuItem("positionX", "X-Position").SetValue(
              new Slider(5, 0, Drawing.Width)));

            Menu.AddItem(new MenuItem("positionY", "Y-Position").SetValue(
              new Slider(50, 0, Drawing.Height)));

            Menu.AddToMainMenu();

            ChangeToggleValue(false);

            Timer.Tick += Timer_Tick;
            text = new Font(
               Drawing.Direct3DDevice9,
               new FontDescription
               {
                   FaceName = "Calibri",
                   Height = 13,
                   OutputPrecision = FontPrecision.Default,
                   Quality = FontQuality.Default
               });

            Drawing.OnPreReset += Drawing_OnPreReset;
            Drawing.OnPostReset += Drawing_OnPostReset;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Game.OnUpdate += Game_OnGameUpdate;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
        }
コード例 #41
0
ファイル: Tristana.cs プロジェクト: Jackie-Tian/ll
        public Tristana()
        {
            Q = new Spell(SpellSlot.Q, 703);

            W = new Spell(SpellSlot.W, 900);
            W.SetSkillshot(.50f, 250f, 1400f, false, SkillshotType.SkillshotCircle);

            E = new Spell(SpellSlot.E, 703);
            R = new Spell(SpellSlot.R, 703);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled = true;

            AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser;
            Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Courier new",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.Default
                });

            Utils.Utils.PrintMessage("Tristana loaded.");
        }
コード例 #42
0
ファイル: DamageIndicator.cs プロジェクト: Casanje/ItsMeMario
        public static void Init()
        {
            Drawing.OnEndScene += Drawing_OnEndScene;

            _Font = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Segoi UI",
                    Height = 16,
                    Weight = FontWeight.Bold,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType,
                });

            _Font2 = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Segoi UI",
                    Height = 11,
                    Weight = FontWeight.Bold,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearType,
                });
        }
コード例 #43
0
        public Ashe()
        {
            Q = new Spell(SpellSlot.Q);
            W = new Spell(SpellSlot.W, 1200);
            E = new Spell(SpellSlot.E, 2500);
            R = new Spell(SpellSlot.R, 20000);

            W.SetSkillshot(250f, (float)(24.32f * Math.PI / 180), 902f, true, SkillshotType.SkillshotCone);
            E.SetSkillshot(377f, 299f, 1400f, false, SkillshotType.SkillshotLine);
            R.SetSkillshot(250f, 130f, 1600f, false, SkillshotType.SkillshotLine);

            Interrupter.OnPossibleToInterrupt += Game_OnPossibleToInterrupt;
            Obj_AI_Base.OnProcessSpellCast    += Game_OnProcessSpell;

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled      = true;

            vText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Courier new",
                Height          = 15,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.Default,
            });

            Utils.PrintMessage("Ashe loaded.");
        }
コード例 #44
0
ファイル: BaseChamp.cs プロジェクト: xQxCPMxQx/Leaguesharp-7
        public BaseChamp(string szChampName)
        {
            Text = new Font(Drawing.Direct3DDevice,
                new FontDescription
                {
                    FaceName = "Malgun Gothic",
                    Height = 15,
                    OutputPrecision = FontPrecision.Default,
                    Quality = FontQuality.ClearTypeNatural
                });

            Config = new Menu(String.Format("Synx {0} !", szChampName), szChampName, true);

            TargetSelector.AddToMenu(Config.SubMenu("Target Selector"));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            activator = new Menu("Activator", "activator");
            new Smite(TargetSelector.DamageType.Magical, activator);
            new Ignite(TargetSelector.DamageType.Magical, activator);

            drawing = new Menu("Drawings", "drawings");

            Config.AddSubMenu(activator);
            Config.AddSubMenu(drawing);
            SpellDatabase.InitalizeSpellDatabase();
        }
コード例 #45
0
        public SkillBar(Menu config)
        {
            MenuSkillBar = config.AddSubMenu(new Menu("技能 CD", "SkillBar"));
            MenuSkillBar.AddItem(new MenuItem("OnAllies", "显示 友军").SetValue(false));
            MenuSkillBar.AddItem(new MenuItem("OnEnemies", "显示 敌方").SetValue(true));
            Sprite     = new Sprite(Drawing.Direct3DDevice);
            HudTexture = Texture.FromMemory(
                Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.main, typeof(byte[])), 127, 41,
                0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
            FrameLevelTexture = Texture.FromMemory(
                Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.spell_level, typeof(byte[])),
                2, 3, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
            ButtonRedTexture = Texture.FromMemory(
                Drawing.Direct3DDevice, (byte[])new ImageConverter().ConvertTo(Resources.disable, typeof(byte[])), 14,
                14, 0, Usage.None, Format.A1, Pool.Managed, Filter.Default, Filter.Default, 0);
            SmallText = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Calibri",
                Height          = 13,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.Default,
            });

            AppDomain.CurrentDomain.DomainUnload += DomainUnload;
            AppDomain.CurrentDomain.ProcessExit  += DomainUnload;
            CustomEvents.Game.OnGameLoad         += Game_OnGameLoad;
        }
コード例 #46
0
        public BaseUlt()
        {
            (Menu = new Menu("【初见汉化】基地大招3", "BaseUlt3", true)).AddToMainMenu();
            Menu.AddItem(new MenuItem("showRecalls", "显示回城").SetValue(true));
            Menu.AddItem(new MenuItem("baseUlt", "泉水大招").SetValue(true));
            Menu.AddItem(new MenuItem("checkCollision", "碰撞检测").SetValue(true));
            Menu.AddItem(new MenuItem("panicKey", "禁用大招按键").SetValue(new KeyBind(107, KeyBindType.Press)));         //32 == space
            Menu.AddItem(new MenuItem("regardlessKey", "任何时候 (保持)").SetValue(new KeyBind(109, KeyBindType.Press))); //17 == ctrl
            Menu.AddSubMenu(new Menu("初见汉化", "by chujian"));
            Menu.SubMenu("by chujian").AddItem(new MenuItem("qunhao", "汉化群:386289593"));
            Menu.SubMenu("by chujian").AddItem(new MenuItem("qunhao1", "交流群:333399"));
            Heroes  = ObjectManager.Get <Obj_AI_Hero>().ToList();
            Enemies = Heroes.Where(x => x.IsEnemy).ToList();
            Allies  = Heroes.Where(x => x.IsAlly).ToList();

            EnemyInfo = Enemies.Select(x => new EnemyInfo(x)).ToList();

            bool compatibleChamp = IsCompatibleChamp(ObjectManager.Player.ChampionName);

            TeamUlt           = Menu.AddSubMenu(new Menu("基地大招团队", "TeamUlt"));
            DisabledChampions = Menu.AddSubMenu(new Menu("可击杀目标", "DisabledChampions"));

            if (compatibleChamp)
            {
                foreach (Obj_AI_Hero champ in Allies.Where(x => !x.IsMe && IsCompatibleChamp(x.ChampionName)))
                {
                    TeamUlt.AddItem(new MenuItem(champ.ChampionName, "队友使用基地大招: " + champ.ChampionName).SetValue(false).DontSave());
                }

                foreach (Obj_AI_Hero champ in Enemies)
                {
                    DisabledChampions.AddItem(new MenuItem(champ.ChampionName, "别开枪: " + champ.ChampionName).SetValue(false).DontSave());
                }
            }

            EnemySpawnPos = ObjectManager.Get <Obj_SpawnPoint>().FirstOrDefault(x => x.IsEnemy).Position; //ObjectManager.Get<GameObject>().FirstOrDefault(x => x.Type == GameObjectType.obj_SpawnPoint && x.IsEnemy).Position;

            Map = Utility.Map.GetMap().Type;

            Ultimate = new Spell(SpellSlot.R);

            Text = new Font(Drawing.Direct3DDevice, new FontDescription {
                FaceName = "Calibri", Height = 13, Width = 6, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default
            });

            Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport;
            Drawing.OnPreReset     += Drawing_OnPreReset;
            Drawing.OnPostReset    += Drawing_OnPostReset;
            Drawing.OnDraw         += Drawing_OnDraw;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
            AppDomain.CurrentDomain.ProcessExit  += CurrentDomain_DomainUnload;

            if (compatibleChamp)
            {
                Game.OnGameUpdate += Game_OnGameUpdate;
            }

            Game.PrintChat("<font color=\"#1eff00\">BaseUlt3 by Beaving</font> - <font color=\"#00BFFF\">Loaded</font>");
        }
コード例 #47
0
        private static void Load()
        {
            text = new Font(Drawing.Direct3DDevice,
                            new FontDescription
            {
                FaceName        = "Tahoma",
                Height          = 13,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural,
            });

            textBold = new Font(Drawing.Direct3DDevice,
                                new FontDescription
            {
                FaceName        = "Tahoma",
                Height          = 13,
                Weight          = FontWeight.Bold,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearTypeNatural,
            });


            LocalMenu = new Menu("XinZhao | Target Selector", "TSxQx");

            Program.Config.AddSubMenu(LocalMenu);
            LocalMenu.AddItem(new MenuItem("TS.Mode", "Selector Mode:").SetValue(new StringList(new[] { "L# Target Selector", "XinZhao Target Selector" }, 1)));
            LocalMenu.AddItem(new MenuItem("TS.Active", "Active").SetValue(true));
            LocalMenu.AddItem(new MenuItem("TS.SearchRange", MenuTab + "Enemy Searching Range")).SetValue(new Slider(950, 1500));

            LocalMenu.AddItem(new MenuItem("TS.Enemies.Title", "Enemies:"));
            {
                foreach (var enemy in HeroManager.Enemies)
                {
                    LocalMenu.AddItem(
                        new MenuItem("Selected" + enemy.ChampionName, MenuTab + enemy.CharData.BaseSkinName)
                        .SetValue(new StringList(new[] { "Low Target", "Medium Target", "High Target" },
                                                 GetPriority(enemy.ChampionName))));
                }
            }

            LocalMenu.AddItem(new MenuItem("TS.Other.Title", "Other Settings:"));
            {
                LocalMenu.AddItem(new MenuItem("TS.AutoPriority", MenuTab + "Auto arrange priorities").SetShared().SetValue(false))
                .ValueChanged += AutoPriorityItemValueChanged;
            }
            LocalMenu.AddItem(new MenuItem("TargetingMode", MenuTab + "Target Mode").SetShared().SetValue(new StringList(Enum.GetNames(typeof(TargetingMode)))));
            LocalMenu.AddItem(new MenuItem("TS.Click", MenuTab + "Chance Enemy's Hitchance with Mouse Left-click").SetValue(true));

            LocalMenu.AddItem(new MenuItem("Draw.Title", "Drawings"));
            {
                LocalMenu.AddItem(new MenuItem("Draw.Search", MenuTab + "Show Search Range").SetValue(new Circle(true, Color.GreenYellow)));
                LocalMenu.AddItem(new MenuItem("Draw.Status", MenuTab + "Show Targeting Status").SetValue(true));
                LocalMenu.AddItem(new MenuItem("Draw.Status.Show", MenuTab + MenuTab + "Show This:").SetValue(new StringList(new[] { "All", "Just High Target Enemies" })));
            }
            CustomEvents.Game.OnGameLoad += Game_OnGameLoad;
            Game.OnUpdate  += OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnWndProc += Game_OnWndProc;
        }
コード例 #48
0
ファイル: MenuDrawHelper.cs プロジェクト: CjShu/PortAIOCommon
        /// <summary>
        ///     Initializes a static instance of the <see cref="MenuDrawHelper" /> class.
        /// </summary>
        static MenuDrawHelper()
        {
            var device          = Drawing.Direct3DDevice;
            var faceName        = Menu.Root.Item("FontName").GetValue <StringList>().SelectedValue;
            var height          = Menu.Root.Item("FontSize").GetValue <Slider>().Value;
            var outputPercision = FontPrecision.Default;
            var quality         =
                (FontQuality)
                Enum.Parse(
                    typeof(FontQuality),
                    Menu.Root.Item("FontQuality").GetValue <StringList>().SelectedValue,
                    true);

            Font = new Font(
                device,
                new FontDescription
            {
                FaceName = faceName, Height = height, OutputPrecision = outputPercision, Quality = quality
            });

            FontBold = new Font(
                device,
                new FontDescription
            {
                FaceName        = faceName,
                Height          = height,
                OutputPrecision = outputPercision,
                Weight          = FontWeight.Bold,
                Quality         = quality
            });

            FontItalic = new Font(
                device,
                new FontDescription
            {
                FaceName        = faceName,
                Height          = height,
                OutputPrecision = outputPercision,
                Italic          = true,
                Quality         = quality
            });

            FontBoldItalic = new Font(
                device,
                new FontDescription
            {
                FaceName        = faceName,
                Height          = height,
                OutputPrecision = outputPercision,
                Weight          = FontWeight.Bold,
                Italic          = true,
                Quality         = quality
            });

            Drawing.OnPreReset  += OnPreReset;
            Drawing.OnPostReset += OnPostReset;
            AppDomain.CurrentDomain.DomainUnload += OnDomainUnload;
            AppDomain.CurrentDomain.ProcessExit  += OnDomainUnload;
        }
コード例 #49
0
 public static void DrawTextCentered(this Font font,
                                     string text,
                                     Vector2 position,
                                     Color color,
                                     bool outline = false)
 {
     DrawTextCentered(font, text, position, ColorToXD(color), outline);
 }
コード例 #50
0
ファイル: Text.cs プロジェクト: spall9/Marksman-AIO
        public void Dispose()
        {
            Font?.Dispose();
            GC.SuppressFinalize(this);

            Drawing.OnPreReset  -= Drawing_OnPreReset;
            Drawing.OnPostReset -= Drawing_OnPostReset;
        }
コード例 #51
0
        public BaseUlt()
        {
            (Menu = new Menu("实力回城3", "BaseUlt3", true)).AddToMainMenu();
            Menu.AddItem(new MenuItem("showRecalls", "显示回城").SetValue(true));
            Menu.AddItem(new MenuItem("baseUlt", "使用大招").SetValue(true));
            Menu.AddItem(new MenuItem("panicKey", "禁用大招按键").SetValue(new KeyBind(32, KeyBindType.Press)));          //32 == space
            Menu.AddItem(new MenuItem("regardlessKey", "无时间限制 (保持)").SetValue(new KeyBind(17, KeyBindType.Press))); //17 == ctrl

            Heroes  = ObjectManager.Get <Obj_AI_Hero>().ToList();
            Enemies = Heroes.Where(x => x.IsEnemy).ToList();
            Allies  = Heroes.Where(x => x.IsAlly).ToList();

            EnemyInfo = Enemies.Select(x => new EnemyInfo(x)).ToList();

            bool compatibleChamp = IsCompatibleChamp(ObjectManager.Player.ChampionName);

            if (compatibleChamp)
            {
                TeamUlt = Menu.AddSubMenu(new Menu("团队大招", "TeamUlt"));

                foreach (Obj_AI_Hero champ in Allies.Where(x => !x.IsMe && IsCompatibleChamp(x.ChampionName)))
                {
                    TeamUlt.AddItem(new MenuItem(champ.ChampionName, "Ally with baseult: " + champ.ChampionName).SetValue(false).DontSave());
                }

                DisabledChampions = Menu.AddSubMenu(new Menu("禁止英雄目标", "DisabledChampions"));

                foreach (Obj_AI_Hero champ in Enemies)
                {
                    DisabledChampions.AddItem(new MenuItem(champ.ChampionName, "Don't shoot: " + champ.ChampionName).SetValue(false).DontSave());
                }
            }

            EnemySpawnPos = ObjectManager.Get <GameObject>().FirstOrDefault(x => x.Type == GameObjectType.obj_SpawnPoint && x.IsEnemy).Position;

            Map = Utility.Map.GetMap()._MapType;

            Ultimate = new Spell(SpellSlot.R);

            Text = new Font(Drawing.Direct3DDevice, new FontDescription {
                FaceName = "Calibri", Height = 13, Width = 6, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default
            });

            Game.OnGameProcessPacket             += Game_OnGameProcessPacket;
            Drawing.OnPreReset                   += Drawing_OnPreReset;
            Drawing.OnPostReset                  += Drawing_OnPostReset;
            Drawing.OnDraw                       += Drawing_OnDraw;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
            AppDomain.CurrentDomain.ProcessExit  += CurrentDomain_DomainUnload;

            if (compatibleChamp)
            {
                Game.OnGameUpdate += Game_OnGameUpdate;
            }

            Game.PrintChat("<font color=\"#1eff00\">BaseUlt3 by Doramio</font> - <font color=\"#00BFFF\">Loaded</font>");
        }
コード例 #52
0
ファイル: Text.cs プロジェクト: spall9/Marksman-AIO
        private void Drawing_OnPostReset(EventArgs args)
        {
            if (Font == null || Font.IsDisposed)
            {
                return;
            }

            Font?.OnResetDevice();
        }
コード例 #53
0
ファイル: OKTWdraws.cs プロジェクト: qq2128969/LeagueRepo
        public void LoadOKTW()
        {
            Config.SubMenu("About OKTW©").AddItem(new MenuItem("logo", "Intro logo OKTW").SetValue(true));

            if (Config.Item("logo").GetValue<bool>())
            {
                Intro = new Render.Sprite(LoadImg("intro"), new Vector2((Drawing.Width / 2) - 500, (Drawing.Height / 2) - 350));
                Intro.Add(0);
                Intro.OnDraw();
            }

            Utility.DelayAction.Add(7000, () => Intro.Remove());

            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("disableDraws", "DISABLE UTILITY DRAWS").SetValue(false));

            Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("championInfo", "Game Info").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("ShowKDA", "Show flash and R CD").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("ShowRecall", "Show recall").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("posX", "posX").SetValue(new Slider(20, 100, 0)));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("Enemy info grid").AddItem(new MenuItem("posY", "posY").SetValue(new Slider(10, 100, 0)));

            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("GankAlert", "Gank Alert").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("HpBar", "Dmg indicators BAR OKTW© style").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("ShowClicks", "Show enemy clicks").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("SS", "SS notification").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("showWards", "Show hidden objects, wards").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("minimap", "Mini-map hack").SetValue(true));

            if (Program.AIOmode != 2)
            {
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarm", "OKTW spells farm").SetValue(true)).Show();
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarmMode", "SPELLS FARM TOGGLE MODE").SetValue(new StringList(new[] { "Scroll down", "Scroll press", "Key toggle", "Disable" }, 1)));
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarmKeyToggle", "Key toggle").SetValue(new KeyBind("N".ToCharArray()[0], KeyBindType.Toggle)));
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("showNot", "Show notification").SetValue(true));
                Config.Item("spellFarm").Permashow(true);
            }

            Tahoma13B = new Font( Drawing.Direct3DDevice, new FontDescription
               { FaceName = "Tahoma", Height = 14, Weight = FontWeight.Bold, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType });

            Tahoma13 = new Font( Drawing.Direct3DDevice, new FontDescription
                { FaceName = "Tahoma", Height = 14, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType });

            TextBold = new Font(Drawing.Direct3DDevice, new FontDescription
                {FaceName = "Impact", Height = 30, Weight = FontWeight.Normal, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType});

            Q = new Spell(SpellSlot.Q);
            E = new Spell(SpellSlot.E);
            W = new Spell(SpellSlot.W);
            R = new Spell(SpellSlot.R);

            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnDraw += OnDraw;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Game.OnWndProc += Game_OnWndProc;

        }
コード例 #54
0
ファイル: Helper.cs プロジェクト: MeteTR/LeagueSharp2
		public static void DrawText(Font font, string text, int posX, int posY, Color color)
		{
			Rectangle rec = font.MeasureText(null, text, FontDrawFlags.Center);
			font.DrawText(null, text, posX + 1 + rec.X, posY + 1, Color.Black);
			font.DrawText(null, text, posX + rec.X, posY + 1, Color.Black);
			font.DrawText(null, text, posX - 1 + rec.X, posY - 1, Color.Black);
			font.DrawText(null, text, posX + rec.X, posY - 1, Color.Black);
			font.DrawText(null, text, posX + rec.X, posY, color);
		}
コード例 #55
0
        public void Dispose()
        {
            Font?.Dispose();
            GC.SuppressFinalize(this);

            Drawing.OnPreReset  -= Drawing_OnPreReset;
            Drawing.OnPostReset -= Drawing_OnPostReset;
            AppDomain.CurrentDomain.DomainUnload -= CurrentDomain_DomainUnload;
        }
コード例 #56
0
        public void LoadOKTW()
        {
            Sub = Config.AddSubMenu("Utility, Draws OKTW©");
            Sub.Add("disableDraws", new CheckBox("DISABLE UTILITY DRAWS", false));

            Sub.AddGroupLabel("Enemy info grid");
            Sub.Add("championInfo", new CheckBox("Game Info"));
            Sub.Add("ShowKDA", new CheckBox("Show flash and R CD"));
            Sub.Add("posX", new Slider("posX", 20));
            Sub.Add("posY", new Slider("posY", 10));
            Sub.AddSeparator();

            Sub.Add("GankAlert", new CheckBox("Gank Alert"));
            Sub.Add("HpBar", new CheckBox("Dmg indicators BAR OKTW© style"));
            Sub.Add("ShowClicks", new CheckBox("Show enemy clicks"));
            Sub.Add("SS", new CheckBox("SS notification"));
            Sub.Add("showWards", new CheckBox("Show hidden objects, wards"));
            Sub.Add("minimap", new CheckBox("Mini-map hack"));

            Tahoma13B = new Font(Drawing.Direct3DDevice,
                                 new FontDescription
            {
                FaceName        = "Tahoma",
                Height          = 14,
                Weight          = FontWeight.Bold,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearType
            });

            Tahoma13 = new Font(Drawing.Direct3DDevice,
                                new FontDescription
            {
                FaceName        = "Tahoma",
                Height          = 14,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearType
            });

            TextBold = new Font(Drawing.Direct3DDevice,
                                new FontDescription
            {
                FaceName        = "Impact",
                Height          = 30,
                Weight          = FontWeight.Normal,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearType
            });

            Q = new Spell(SpellSlot.Q);
            E = new Spell(SpellSlot.E);
            W = new Spell(SpellSlot.W);
            R = new Spell(SpellSlot.R);

            Drawing.OnDraw     += OnDraw;
            Drawing.OnEndScene += Drawing_OnEndScene;
        }
コード例 #57
0
ファイル: Program.cs プロジェクト: gutaewoo/Universal
 public static void Main(string[] args)
 {
     CustomEvents.Game.OnGameLoad += delegate
     {
         font = new Font(
             Drawing.Direct3DDevice, 14, 0, FontWeight.DoNotCare, 0, false, FontCharacterSet.Default,
             FontPrecision.Default, FontQuality.Antialiased,
             FontPitchAndFamily.DontCare | FontPitchAndFamily.Decorative, "Tahoma");
         Drawing.OnEndScene += Drawing_OnDraw;
     };
 }
コード例 #58
0
        public DrawsOktw()
        {
            Tahoma13B = new Font(Drawing.Direct3DDevice, new FontDescription
            { FaceName = "Tahoma", Height = 14, Weight = FontWeight.Bold, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType });

            Tahoma13 = new Font(Drawing.Direct3DDevice, new FontDescription
            { FaceName = "Tahoma", Height = 14, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType });

            TextBold = new Font(Drawing.Direct3DDevice, new FontDescription
            { FaceName = "Impact", Height = 30, Weight = FontWeight.Normal, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType });
        }
コード例 #59
0
ファイル: Extension.cs プロジェクト: rickson22/LeagueSharp
		private static Rectangle GetMeasured(Font font, string text) {
			Rectangle rec;
			var key = font.Description.FaceName + font.Description.Width + font.Description.Height +
					  font.Description.Weight + text;
			if (!Measured.TryGetValue(key, out rec))
			{
				rec = font.MeasureText(null, text, FontDrawFlags.Center);
				Measured.Add(key, rec);
			}
			return rec;
		}
コード例 #60
0
ファイル: Program.cs プロジェクト: rickson22/LeagueSharp
		private static void Game_OnGameLoad(EventArgs args) {
			if (!LoadSpell())
			{
				return;
			}
			font = new Font(Drawing.Direct3DDevice, new FontDescription { FaceName = "微软雅黑", Height = 28 });

			LoadMenu();

			Game.OnUpdate += Game_OnUpdate;
			Drawing.OnDraw += Drawing_OnDraw;
		}