Beispiel #1
0
        /// <summary>
        ///     Loads this instance.
        /// </summary>
        public void Load()
        {
            this._greenWardTexture = Resources.WT_Green.ToTexture();
            this._pinkWardTexture  = Resources.WT_Pink.ToTexture();

            this._sprite = MDrawing.GetSprite();
            this._text   = MDrawing.GetFont(this.Menu.Item("wardtracker.FontSize").GetValue <Slider>().Value);
            this._line   = MDrawing.GetLine(this.Menu.Item("wardtracker.CircleThickness").GetValue <Slider>().Value);

            Game.OnUpdate += this.OnGameUpdate;
            Obj_AI_Base.OnProcessSpellCast += this.OnObjAiBaseProcessSpellCast;
            GameObject.OnCreate            += this.OnGameObjectCreate;
            GameObject.OnDelete            += this.OnGameObjectDelete;
            Drawing.OnEndScene             += this.OnDrawingEndScene;
            Game.OnWndProc          += this.OnGameWndProc;
            AttackableUnit.OnCreate += this.OnAttackableUnitEnterVisiblityClient;

            Drawing.OnPreReset += args =>
            {
                this._line.OnLostDevice();
                this._sprite.OnLostDevice();
                this._text.OnLostDevice();
            };

            Drawing.OnPostReset += args =>
            {
                this._line.OnResetDevice();
                this._sprite.OnResetDevice();
                this._text.OnResetDevice();
            };
        }
Beispiel #2
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);
        }
Beispiel #3
0
        protected override sealed void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu(Global.Lang.Get("G_Drawing"), Name + "Drawing");
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "TimeFormat", Global.Lang.Get("G_TimeFormat")).SetValue(
                        new StringList(new[] { "mm:ss", "ss" })));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "FontSize", Global.Lang.Get("G_FontSize")).SetValue(
                        new Slider(13, 3, 30)));
                drawingMenu.AddItem(
                    new MenuItem(
                        drawingMenu.Name + "SSTimerOffset",
                        Global.Lang.Get("LastPosition_SSTimer") + " " + Global.Lang.Get("G_Offset")).SetValue(
                        new Slider(5, 0, 20)));

                Menu.AddSubMenu(drawingMenu);

                Menu.AddItem(new MenuItem(Name + "SSTimer", Global.Lang.Get("LastPosition_SSTimer")).SetValue(false));
                Menu.AddItem(new MenuItem(Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                Parent.Menu.AddSubMenu(Menu);

                _sprite = MDrawing.GetSprite();
                _text   = MDrawing.GetFont(Menu.Item(Name + "DrawingFontSize").GetValue <Slider>().Value);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #4
0
        protected sealed override void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu("Drawing", Name + "Drawing");
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "Percent", "Percent").SetValue(false));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "FontSize", "Font Size").SetValue(new Slider(13, 3, 30)));

                Menu.AddSubMenu(drawingMenu);

                Menu.AddItem(new MenuItem(Name + "Turret", "Turret").SetValue(false));
                Menu.AddItem(new MenuItem(Name + "Inhibitor", "Inhibitor").SetValue(false));

                Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(false));

                Parent.Menu.AddSubMenu(Menu);

                _text = MDrawing.GetFont(Menu.Item(Name + "DrawingFontSize").GetValue <Slider>().Value);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #5
0
        /// <summary>
        ///     Loads this instance.
        /// </summary>
        public void Load()
        {
            try
            {
                this._hudTexture     = Resources.CD_Hud.ToTexture();
                this._hudSelfTexture = Resources.CD_HudSelf.ToTexture();

                foreach (var enemy in HeroManager.AllHeroes)
                {
                    var lEnemy = enemy;
                    this._spellDatas.Add(
                        enemy.NetworkId,
                        this._spellSlots.Select(slot => lEnemy.GetSpell(slot)).ToList());
                    this._summonerDatas.Add(
                        enemy.NetworkId,
                        this._summonerSlots.Select(slot => lEnemy.GetSpell(slot)).ToList());
                }

                foreach (var sName in
                         HeroManager.AllHeroes.SelectMany(
                             h =>
                             this._summonerSlots.Select(summoner => h.Spellbook.GetSpell(summoner).Name.ToLower())
                             .Where(sName => !this._summonerTextures.ContainsKey(FixName(sName)))))
                {
                    this._summonerTextures[FixName(sName)] =
                        ((Bitmap)Resources.ResourceManager.GetObject(string.Format("CD_{0}", FixName(sName)))
                         ?? Resources.CD_SummonerBarrier).ToTexture();
                }

                this._heroes = getCheckBoxItem(this.Menu, "cooldown-tracker-Ally") &&
                               getCheckBoxItem(this.Menu, "cooldown-tracker-Enemy")
                                   ? HeroManager.AllHeroes.ToList()
                                   : (getCheckBoxItem(this.Menu, "cooldown-tracker-Ally")
                                          ? HeroManager.Allies
                                          : (getCheckBoxItem(this.Menu, "cooldown-tracker-Enemy")
                                                 ? HeroManager.Enemies
                                                 : new List <AIHeroClient>())).ToList();

                if (!getCheckBoxItem(this.Menu, "cooldown-tracker-Self"))
                {
                    this._heroes.RemoveAll(h => h.NetworkId == ObjectManager.Player.NetworkId);
                }

                this._sprite = MDrawing.GetSprite();
                this._line   = MDrawing.GetLine(4);
                this._text   = MDrawing.GetFont(getSliderItem(this.Menu, "cooldown-tracker-FontSize"));

                Drawing.OnEndScene             += this.OnDrawingEndScene;
                Obj_AI_Base.OnProcessSpellCast += this.OnObjAiBaseProcessSpellCast;
                Obj_AI_Base.OnTeleport         += this.OnObjAiBaseTeleport;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        protected override void OnLoad()
        {
            _font = MDrawing.GetFont(23);

            Obj_AI_Base.OnProcessSpellCast += OnObjAiBaseProcessSpellCast;
            Spellbook.OnCastSpell          += OnSpellbookCastSpell;
            Orbwalking.OnNonKillableMinion += OnOrbwalkingNonKillableMinion;
            Drawing.OnDraw += OnDrawingDraw;

            IncomingDamageManager.RemoveDelay = 500;
            IncomingDamageManager.Skillshots  = true;
            IncomingDamageManager.AddChampion(Player);

            CheckSoulbound();
        }
Beispiel #7
0
        protected override sealed void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu(Global.Lang.Get("G_Drawing"), Name + "Drawing");
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "FontSize", Global.Lang.Get("G_FontSize")).SetValue(
                        new Slider(25, 10, 40)));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "Color", Global.Lang.Get("G_Color")).SetValue(
                        System.Drawing.Color.White));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "Thickness", Global.Lang.Get("G_Thickness")).SetValue(
                        new Slider(5, 2, 10))).ValueChanged += delegate(object o, OnValueChangeEventArgs args)
                {
                    if (_line != null)
                    {
                        _line.Width = args.GetNewValue <Slider>().Value;
                    }
                };

                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "ChampionName", Global.Lang.Get("Gank_ChampionName")).SetValue(true));

                Menu.AddSubMenu(drawingMenu);

                Menu.AddItem(
                    new MenuItem(Name + "Range", Global.Lang.Get("G_Range")).SetValue(new Slider(3000, 500, 5000)));
                Menu.AddItem(
                    new MenuItem(Name + "Cooldown", Global.Lang.Get("Gank_Cooldown")).SetValue(new Slider(10, 0, 30)));
                Menu.AddItem(
                    new MenuItem(Name + "Duration", Global.Lang.Get("Gank_Duration")).SetValue(new Slider(10, 0, 30)));
                Menu.AddItem(new MenuItem(Name + "Ping", Global.Lang.Get("G_Ping")).SetValue(true));

                Menu.AddItem(new MenuItem(Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                Parent.Menu.AddSubMenu(Menu);

                _line = MDrawing.GetLine(Menu.Item(Name + "DrawingThickness").GetValue <Slider>().Value);
                _text = MDrawing.GetFont(Menu.Item(Name + "DrawingFontSize").GetValue <Slider>().Value);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #8
0
        /// <summary>
        ///     Loads this instance.
        /// </summary>
        public void Load()
        {
            this._greenWardTexture = Resources.WT_Green.ToTexture();
            this._pinkWardTexture  = Resources.WT_Pink.ToTexture();

            this._sprite = MDrawing.GetSprite();
            this._text   = MDrawing.GetFont(getSliderItem(this.Menu, "wardtracker.FontSize"));
            this._line   = MDrawing.GetLine(getSliderItem(this.Menu, "wardtracker.CircleThickness"));

            Game.OnUpdate += this.OnGameUpdate;
            Obj_AI_Base.OnProcessSpellCast += this.OnObjAiBaseProcessSpellCast;
            GameObject.OnCreate            += this.OnGameObjectCreate;
            GameObject.OnDelete            += this.OnGameObjectDelete;
            Drawing.OnEndScene             += this.OnDrawingEndScene;
            Game.OnWndProc          += this.OnGameWndProc;
            AttackableUnit.OnCreate += this.OnAttackableUnitEnterVisiblityClient;
        }
Beispiel #9
0
        protected override sealed void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu        = new Menu(Global.Lang.Get("G_Drawing"), Name + "Drawing");
                var drawingMapMenu     = new Menu(Global.Lang.Get("G_Map"), drawingMenu.Name + "Map");
                var drawingMinimapMenu = new Menu(Global.Lang.Get("G_Minimap"), drawingMenu.Name + "Minimap");

                drawingMapMenu.AddItem(
                    new MenuItem(drawingMapMenu.Name + "TimeFormat", Global.Lang.Get("G_TimeFormat")).SetValue(
                        new StringList(new[] { "mm:ss", "ss" })));
                drawingMapMenu.AddItem(
                    new MenuItem(drawingMapMenu.Name + "FontSize", Global.Lang.Get("G_FontSize")).SetValue(
                        new Slider(20, 3, 30)));
                drawingMapMenu.AddItem(
                    new MenuItem(drawingMapMenu.Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                drawingMinimapMenu.AddItem(
                    new MenuItem(drawingMinimapMenu.Name + "TimeFormat", Global.Lang.Get("G_TimeFormat")).SetValue(
                        new StringList(new[] { "mm:ss", "ss" })));
                drawingMinimapMenu.AddItem(
                    new MenuItem(drawingMinimapMenu.Name + "FontSize", Global.Lang.Get("G_FontSize")).SetValue(
                        new Slider(13, 3, 30)));
                drawingMinimapMenu.AddItem(
                    new MenuItem(drawingMinimapMenu.Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                drawingMenu.AddSubMenu(drawingMapMenu);
                drawingMenu.AddSubMenu(drawingMinimapMenu);

                Menu.AddSubMenu(drawingMenu);

                Menu.AddItem(new MenuItem(Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                Parent.Menu.AddSubMenu(Menu);

                _minimapText = MDrawing.GetFont(Menu.Item(Name + "DrawingMinimapFontSize").GetValue <Slider>().Value);
                _mapText     = MDrawing.GetFont(Menu.Item(Name + "DrawingMapFontSize").GetValue <Slider>().Value);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #10
0
        protected override sealed void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);

                var drawingMenu = new Menu(Global.Lang.Get("G_Drawing"), Name + "Drawing");

                drawingMenu.AddItem(
                    new MenuItem(
                        drawingMenu.Name + "OffsetTop", Global.Lang.Get("G_Offset") + " " + Global.Lang.Get("G_Top"))
                    .SetValue(new Slider(150, 0, Drawing.Height)));

                drawingMenu.AddItem(
                    new MenuItem(
                        drawingMenu.Name + "OffsetRight", Global.Lang.Get("G_Offset") + " " + Global.Lang.Get("G_Right"))
                    .SetValue(new Slider(0, 0, Drawing.Width)));

                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "Scale", Global.Lang.Get("G_Scale")).SetValue(new Slider(10, 5, 15)));

                Menu.AddSubMenu(drawingMenu);
                Menu.AddItem(new MenuItem(Name + "Clickable", Global.Lang.Get("Sidebar_Clickable")).SetValue(false));

                Menu.AddItem(new MenuItem(Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                Parent.Menu.AddSubMenu(Menu);

                _scale = Menu.Item(Menu.Name + "DrawingScale").GetValue <Slider>().Value / 10f;

                _text12 = MDrawing.GetFont((int)(Math.Ceiling(12 * _scale)));
                _text13 = MDrawing.GetFont((int)(Math.Ceiling(13 * _scale)));
                _text18 = MDrawing.GetFont((int)(Math.Ceiling(18 * _scale)));
                _text30 = MDrawing.GetFont((int)(Math.Ceiling(30 * _scale)));
                _line   = MDrawing.GetLine((int)(Math.Ceiling(9 * _scale)));
                _sprite = MDrawing.GetSprite();
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
        protected sealed override void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu("Drawing", Name + "Drawing");
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "TimeFormat", "Time Format").SetValue(
                        new StringList(new[] { "mm:ss", "ss" })));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "FontSize", "Font Size").SetValue(new Slider(13, 3, 30)));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "CircleRadius", "Circle Radius").SetValue(new Slider(150, 25, 300)));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "CircleThickness", "Circle Thickness").SetValue(
                        new Slider(2, 1, 10)));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "GreenCircle", "Green Circle").SetValue(true));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "GreenColor", "Green Color").SetValue(Color.Lime));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "PinkColor", "Pink Color").SetValue(Color.Magenta));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "TrapColor", "Trap Color").SetValue(Color.Red));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "VisionRange", "Vision Range").SetValue(true));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "Minimap", "Minimap").SetValue(true));

                Menu.AddSubMenu(drawingMenu);

                Menu.AddItem(new MenuItem(Name + "FilterWards", "Filter Wards").SetValue(new Slider(250, 0, 600)));
                Menu.AddItem(new MenuItem(Name + "Hotkey", "Hotkey").SetValue(new KeyBind(16, KeyBindType.Press)));
                Menu.AddItem(new MenuItem(Name + "PermaShow", "Perma Show").SetValue(false));

                Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(true));

                Parent.Menu.AddSubMenu(Menu);

                _sprite = MDrawing.GetSprite();
                _text   = MDrawing.GetFont(Menu.Item(Name + "DrawingFontSize").GetValue <Slider>().Value);
                _line   = MDrawing.GetLine(Menu.Item(Name + "DrawingCircleThickness").GetValue <Slider>().Value);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #12
0
        protected sealed override void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);

                var drawingMenu = new Menu("Drawing", Name + "Drawing");

                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "OffsetTop", "Offset Top").SetValue(
                        new Slider(150, 0, Drawing.Height)));

                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "OffsetRight", "Offset Right").SetValue(
                        new Slider(0, 0, Drawing.Width)));

                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "Spacing", "Spacing").SetValue(new Slider(10, 0, 30)));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "Scale", "Scale").SetValue(new Slider(10, 5, 15)));

                Menu.AddSubMenu(drawingMenu);
                Menu.AddItem(new MenuItem(Name + "Clickable", "Clickable").SetValue(false));

                Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(true));

                Parent.Menu.AddSubMenu(Menu);

                _scale = Menu.Item(Menu.Name + "DrawingScale").GetValue <Slider>().Value / 10f;

                _text14 = MDrawing.GetFont((int)Math.Ceiling(14 * _scale));
                _text18 = MDrawing.GetFont((int)Math.Ceiling(18 * _scale));
                _line7  = MDrawing.GetLine((int)Math.Ceiling(7 * _scale));
                _line17 = MDrawing.GetLine((int)Math.Ceiling(17 * _scale));
                _line24 = MDrawing.GetLine((int)Math.Ceiling(24 * _scale));
                _sprite = MDrawing.GetSprite();
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #13
0
        protected sealed override void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu("Drawing", Name + "Drawing");
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "CircleThickness", "Circle Thickness").SetValue(
                        new Slider(1, 1, 10)));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "CircleColor", "Circle Color").SetValue(Color.White));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "TimeFormat", "Time Format").SetValue(
                        new StringList(new[] { "mm:ss", "ss" })));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "FontSize", "Font Size").SetValue(new Slider(13, 3, 30)));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "SSTimerOffset", "SS Timer Offset").SetValue(new Slider(5, 0, 20)));

                Menu.AddSubMenu(drawingMenu);

                Menu.AddItem(new MenuItem(Name + "SSTimer", "SS Timer").SetValue(false));
                Menu.AddItem(new MenuItem(Name + "SSCircle", "SS Circle").SetValue(false));
                Menu.AddItem(new MenuItem(Menu.Name + "Minimap", "Minimap").SetValue(true));
                Menu.AddItem(new MenuItem(Menu.Name + "Map", "Map").SetValue(true));

                Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(false));

                Parent.Menu.AddSubMenu(Menu);

                _sprite = MDrawing.GetSprite();
                _text   = MDrawing.GetFont(Menu.Item(Name + "DrawingFontSize").GetValue <Slider>().Value);
                _line   = MDrawing.GetLine(1);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #14
0
        protected override sealed void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu("Drawing", Name + "Drawing");
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "FontSize", "Font Size").SetValue(new Slider(25, 10, 30)));

                Menu.AddSubMenu(drawingMenu);

                Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(true));

                Parent.Menu.AddSubMenu(Menu);

                _text = MDrawing.GetFont(Menu.Item(Name + "DrawingFontSize").GetValue <Slider>().Value);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #15
0
        protected override sealed void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu(Global.Lang.Get("G_Drawing"), Name + "Drawing");

                var drawingTextMenu = new Menu(Global.Lang.Get("G_Text"), drawingMenu.Name + "Text");
                drawingTextMenu.AddItem(
                    new MenuItem(
                        drawingTextMenu.Name + "OffsetTop", Global.Lang.Get("G_Offset") + " " + Global.Lang.Get("G_Top"))
                    .SetValue(new Slider((int)(Drawing.Height * 0.75d), 0, Drawing.Height)));
                drawingTextMenu.AddItem(
                    new MenuItem(
                        drawingTextMenu.Name + "OffsetLeft",
                        Global.Lang.Get("G_Offset") + " " + Global.Lang.Get("G_Left")).SetValue(
                        new Slider((int)(Drawing.Width * 0.68d), 0, Drawing.Width)));
                drawingTextMenu.AddItem(
                    new MenuItem(drawingTextMenu.Name + "FontSize", Global.Lang.Get("G_FontSize")).SetValue(
                        new Slider(15, 5, 30)));
                drawingTextMenu.AddItem(
                    new MenuItem(drawingTextMenu.Name + "AdditionalTime", Global.Lang.Get("Teleport_AdditionalTime"))
                    .SetValue(new Slider(10, 0, 10))).ValueChanged +=
                    delegate(object o, OnValueChangeEventArgs args)
                {
                    if (_teleportObjects != null)
                    {
                        _teleportObjects.ForEach(t => t.AdditionalTextTime = args.GetNewValue <Slider>().Value);
                    }
                };
                drawingTextMenu.AddItem(
                    new MenuItem(drawingTextMenu.Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                var drawingBarMenu = new Menu(Global.Lang.Get("G_Bar"), drawingMenu.Name + "Bar");
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "FontSize", Global.Lang.Get("G_FontSize")).SetValue(
                        new Slider(13, 5, 30)));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "Scale", Global.Lang.Get("G_Scale")).SetValue(
                        new Slider(10, 1, 20)));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "Height", Global.Lang.Get("G_Height")).SetValue(
                        new Slider(10, 3, 20)));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "Width", Global.Lang.Get("G_Width")).SetValue(
                        new Slider(475, 0, (int)(Drawing.Width / 1.5d))));
                drawingBarMenu.AddItem(
                    new MenuItem(
                        drawingBarMenu.Name + "OffsetTop", Global.Lang.Get("G_Offset") + " " + Global.Lang.Get("G_Top"))
                    .SetValue(new Slider((int)(Drawing.Height * 0.75d), 0, Drawing.Height)));
                drawingBarMenu.AddItem(
                    new MenuItem(
                        drawingBarMenu.Name + "OffsetLeft",
                        Global.Lang.Get("G_Offset") + " " + Global.Lang.Get("G_Left")).SetValue(
                        new Slider((int)(Drawing.Width * 0.425d), 0, Drawing.Width)));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "AdditionalTime", Global.Lang.Get("Teleport_AdditionalTime"))
                    .SetValue(new Slider(5, 0, 10))).ValueChanged += delegate(object o, OnValueChangeEventArgs args)
                {
                    if (_teleportObjects != null)
                    {
                        _teleportObjects.ForEach(t => t.AdditionalBarTime = args.GetNewValue <Slider>().Value);
                    }
                };
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                drawingMenu.AddSubMenu(drawingTextMenu);
                drawingMenu.AddSubMenu(drawingBarMenu);

                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "Debug", Global.Lang.Get("G_Debug")).SetValue(false)).ValueChanged
                    += delegate
                    {
                    foreach (var teleport in _teleportObjects)
                    {
                        teleport.LastStatus = Packet.S2C.Teleport.Status.Unknown;
                        teleport.LastType   = Packet.S2C.Teleport.Type.Unknown;
                    }
                    };

                Menu.AddSubMenu(drawingMenu);

                Menu.AddItem(new MenuItem(Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                Parent.Menu.AddSubMenu(Menu);

                _text    = MDrawing.GetFont(Menu.Item(Name + "DrawingTextFontSize").GetValue <Slider>().Value);
                _barText =
                    MDrawing.GetFont(
                        (int)
                        (Math.Ceiling(
                             Menu.Item(Name + "DrawingBarFontSize").GetValue <Slider>().Value *
                             (Menu.Item(Menu.Name + "DrawingBarScale").GetValue <Slider>().Value / 10d))));
                _line = MDrawing.GetLine(1);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #16
0
        protected override sealed void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu(Global.Lang.Get("G_Drawing"), Name + "Drawing");
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "FontSize", Global.Lang.Get("G_FontSize")).SetValue(
                        new Slider(30, 10, 40)));
                drawingMenu.AddItem(
                    new MenuItem(
                        drawingMenu.Name + "OffsetTop", Global.Lang.Get("G_Offset") + " " + Global.Lang.Get("G_Top"))
                    .SetValue(new Slider(0)));
                drawingMenu.AddItem(
                    new MenuItem(
                        drawingMenu.Name + "OffsetLeft", Global.Lang.Get("G_Offset") + " " + Global.Lang.Get("G_Left"))
                    .SetValue(new Slider(0)));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "Outline", Global.Lang.Get("G_Outline")).SetValue(true));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "Self", Global.Lang.Get("G_Self")).SetValue(false));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "Enemy", Global.Lang.Get("G_Enemy")).SetValue(false));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "Ally", Global.Lang.Get("G_Ally")).SetValue(false));

                Menu.AddSubMenu(drawingMenu);

                var group   = 1;
                var counter = 0;

                var spellMenu =
                    Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Spell") + " " + group, Name + "Spell" + group));
                var listItems = _abilities.OrderBy(a => a.Value.Champ).GroupBy(a => a.Value.Champ).ToList();
                foreach (var items in listItems)
                {
                    var champMenu = new Menu(items.Key.FirstCharToUpper(), spellMenu + items.Key);
                    foreach (var item in items)
                    {
                        if (champMenu.Item(champMenu.Name + item.Value.Name) != null)
                        {
                            continue;
                        }
                        var localItem = item;
                        var mItem     =
                            new MenuItem(champMenu.Name + item.Value.Name, item.Value.Name.FirstCharToUpper()).SetValue(
                                new Circle(
                                    true,
                                    System.Drawing.Color.FromArgb(
                                        item.Value.Color.A, item.Value.Color.R, item.Value.Color.G, item.Value.Color.B)));
                        champMenu.AddItem(mItem).ValueChanged += delegate(object o, OnValueChangeEventArgs args)
                        {
                            localItem.Value.Enabled = args.GetNewValue <Circle>().Active;
                            var color = args.GetNewValue <Circle>().Color;
                            localItem.Value.Color = new Color(color.R, color.G, color.B, color.A);
                        };

                        localItem.Value.Enabled = mItem.GetValue <Circle>().Active;
                        var tColor = mItem.GetValue <Circle>().Color;
                        localItem.Value.Color = new Color(tColor.R, tColor.G, tColor.B, tColor.A);
                    }
                    spellMenu.AddSubMenu(champMenu);
                    counter++;
                    if (counter == 10 && group * 10 != listItems.Count())
                    {
                        counter = 0;
                        group++;
                        spellMenu =
                            Menu.AddSubMenu(new Menu(Global.Lang.Get("G_Spell") + " " + group, Name + "Spell" + group));
                    }
                }

                Menu.AddItem(new MenuItem(Name + "Enabled", Global.Lang.Get("G_Enabled")).SetValue(false));

                Parent.Menu.AddSubMenu(Menu);

                _text = MDrawing.GetFont(Menu.Item(Name + "DrawingFontSize").GetValue <Slider>().Value);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #17
0
        protected sealed override void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu("Drawing", Name + "Drawing");
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "TimeFormat", "Time Format").SetValue(
                        new StringList(new[] { "mm:ss", "ss" })));
                drawingMenu.AddItem(
                    new MenuItem(drawingMenu.Name + "FontSize", "Font Size").SetValue(new Slider(13, 3, 30)));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "Enemy", "Enemy").SetValue(false));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "Ally", "Ally").SetValue(false));
                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "Self", "Self").SetValue(false));

                Menu.AddSubMenu(drawingMenu);

                Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(false));

                Menu.Item(Name + "DrawingEnemy").ValueChanged += delegate(object o, OnValueChangeEventArgs args)
                {
                    if (_heroes == null)
                    {
                        return;
                    }
                    var ally  = Menu.Item(Name + "DrawingAlly").GetValue <bool>();
                    var enemy = args.GetNewValue <bool>();
                    _heroes = ally && enemy
                        ? GameObjects.Heroes.ToList()
                        : (ally ? GameObjects.AllyHeroes : (enemy ? GameObjects.EnemyHeroes : new List <AIHeroClient>()))
                              .ToList();

                    if (Menu.Item(Name + "DrawingSelf").GetValue <bool>())
                    {
                        if (_heroes.All(h => h.NetworkId != ObjectManager.Player.NetworkId))
                        {
                            _heroes.Add(ObjectManager.Player);
                        }
                    }
                    else
                    {
                        _heroes.RemoveAll(h => h.NetworkId == ObjectManager.Player.NetworkId);
                    }
                };

                Menu.Item(Name + "DrawingAlly").ValueChanged += delegate(object o, OnValueChangeEventArgs args)
                {
                    if (_heroes == null)
                    {
                        return;
                    }
                    var ally  = args.GetNewValue <bool>();
                    var enemy = Menu.Item(Name + "DrawingEnemy").GetValue <bool>();
                    _heroes = ally && enemy
                        ? GameObjects.Heroes.ToList()
                        : (ally ? GameObjects.AllyHeroes : (enemy ? GameObjects.EnemyHeroes : new List <AIHeroClient>()))
                              .ToList();

                    if (Menu.Item(Name + "DrawingSelf").GetValue <bool>() &&
                        _heroes.All(h => h.NetworkId != ObjectManager.Player.NetworkId))
                    {
                        _heroes.Add(ObjectManager.Player);
                    }
                    if (Menu.Item(Name + "DrawingSelf").GetValue <bool>())
                    {
                        if (_heroes.All(h => h.NetworkId != ObjectManager.Player.NetworkId))
                        {
                            _heroes.Add(ObjectManager.Player);
                        }
                    }
                    else
                    {
                        _heroes.RemoveAll(h => h.NetworkId == ObjectManager.Player.NetworkId);
                    }
                };

                Menu.Item(Name + "DrawingSelf").ValueChanged += delegate(object o, OnValueChangeEventArgs args)
                {
                    if (_heroes == null)
                    {
                        return;
                    }
                    var ally  = Menu.Item(Name + "DrawingAlly").GetValue <bool>();
                    var enemy = Menu.Item(Name + "DrawingEnemy").GetValue <bool>();
                    _heroes = ally && enemy
                        ? GameObjects.Heroes.ToList()
                        : (ally ? GameObjects.AllyHeroes : (enemy ? GameObjects.EnemyHeroes : new List <AIHeroClient>()))
                              .ToList();

                    if (args.GetNewValue <bool>())
                    {
                        if (_heroes.All(h => h.NetworkId != ObjectManager.Player.NetworkId))
                        {
                            _heroes.Add(ObjectManager.Player);
                        }
                    }
                    else
                    {
                        _heroes.RemoveAll(h => h.NetworkId == ObjectManager.Player.NetworkId);
                    }
                };

                Parent.Menu.AddSubMenu(Menu);

                _sprite = MDrawing.GetSprite();
                _line   = MDrawing.GetLine(4);
                _text   = MDrawing.GetFont(Menu.Item(Name + "DrawingFontSize").GetValue <Slider>().Value);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #18
0
        /// <summary>
        ///     Loads this instance.
        /// </summary>
        public void Load()
        {
            try
            {
                this._hudTexture     = Resources.CD_Hud.ToTexture();
                this._hudSelfTexture = Resources.CD_HudSelf.ToTexture();

                foreach (var enemy in HeroManager.AllHeroes)
                {
                    var lEnemy = enemy;
                    this._spellDatas.Add(
                        enemy.NetworkId,
                        this._spellSlots.Select(slot => lEnemy.GetSpell(slot)).ToList());
                    this._summonerDatas.Add(
                        enemy.NetworkId,
                        this._summonerSlots.Select(slot => lEnemy.GetSpell(slot)).ToList());
                }

                foreach (var sName in
                         HeroManager.AllHeroes.SelectMany(
                             h =>
                             this._summonerSlots.Select(summoner => h.Spellbook.GetSpell(summoner).Name.ToLower())
                             .Where(sName => !this._summonerTextures.ContainsKey(FixName(sName)))))
                {
                    this._summonerTextures[FixName(sName)] =
                        ((Bitmap)Resources.ResourceManager.GetObject(string.Format("CD_{0}", FixName(sName)))
                         ?? Resources.CD_SummonerBarrier).ToTexture();
                }

                this._heroes = this.Menu.Item("cooldown-tracker-Ally").GetValue <bool>() &&
                               this.Menu.Item("cooldown-tracker-Enemy").GetValue <bool>()
                                   ? HeroManager.AllHeroes.ToList()
                                   : (this.Menu.Item("cooldown-tracker-Ally").GetValue <bool>()
                                          ? HeroManager.Allies
                                          : (this.Menu.Item("cooldown-tracker-Enemy").GetValue <bool>()
                                                 ? HeroManager.Enemies
                                                 : new List <Obj_AI_Hero>())).ToList();

                if (!this.Menu.Item("cooldown-tracker-Self").GetValue <bool>())
                {
                    this._heroes.RemoveAll(h => h.NetworkId == ObjectManager.Player.NetworkId);
                }

                this._sprite = MDrawing.GetSprite();
                this._line   = MDrawing.GetLine(4);
                this._text   = MDrawing.GetFont(this.Menu.Item("cooldown-tracker-FontSize").GetValue <Slider>().Value);

                Drawing.OnEndScene += this.OnDrawingEndScene;

                Drawing.OnPreReset += args =>
                {
                    this._line.OnLostDevice();
                    this._sprite.OnLostDevice();
                    this._text.OnLostDevice();
                };

                Drawing.OnPostReset += args =>
                {
                    this._line.OnResetDevice();
                    this._sprite.OnResetDevice();
                    this._text.OnResetDevice();
                };

                Obj_AI_Base.OnProcessSpellCast += this.OnObjAiBaseProcessSpellCast;
                Obj_AI_Base.OnTeleport         += this.OnObjAiBaseTeleport;
            }
            catch (Exception e)
            {
                Logging.AddEntry(LoggingEntryType.Error, "@SpellTracker1.cs: An error occurred: {0}", e);
            }
        }
Beispiel #19
0
        protected sealed override void OnLoad()
        {
            try
            {
                Menu = new Menu(Name, Name);
                var drawingMenu = new Menu("Drawing", Name + "Drawing");

                var drawingTextMenu = new Menu("Text", drawingMenu.Name + "Text");
                drawingTextMenu.AddItem(
                    new MenuItem(drawingTextMenu.Name + "OffsetTop", "Offset Top").SetValue(
                        new Slider((int)(Drawing.Height * 0.75d), 0, Drawing.Height)));
                drawingTextMenu.AddItem(
                    new MenuItem(drawingTextMenu.Name + "OffsetLeft", "Offset Left").SetValue(
                        new Slider((int)(Drawing.Width * 0.68d), 0, Drawing.Width)));
                drawingTextMenu.AddItem(
                    new MenuItem(drawingTextMenu.Name + "FontSize", "Font Size").SetValue(new Slider(15, 5, 30)));
                drawingTextMenu.AddItem(
                    new MenuItem(drawingTextMenu.Name + "AdditionalTime", "Additional Time").SetValue(
                        new Slider(10, 0, 10))).ValueChanged += delegate(object o, OnValueChangeEventArgs args)
                {
                    if (_teleportObjects != null)
                    {
                        _teleportObjects.ForEach(t => t.AdditionalTextTime = args.GetNewValue <Slider>().Value);
                    }
                };
                drawingTextMenu.AddItem(new MenuItem(drawingTextMenu.Name + "Enabled", "Enabled").SetValue(false));

                var drawingBarMenu = new Menu("Bar", drawingMenu.Name + "Bar");
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "FontSize", "Font Size").SetValue(new Slider(13, 5, 30)));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "Scale", "Scale").SetValue(new Slider(10, 1, 20)));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "Height", "Height").SetValue(new Slider(10, 3, 20)));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "Width", "Width").SetValue(
                        new Slider(475, 0, (int)(Drawing.Width / 1.5d))));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "OffsetTop", "Offset Top").SetValue(
                        new Slider((int)(Drawing.Height * 0.75d), 0, Drawing.Height)));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "OffsetLeft", "Offset Left").SetValue(
                        new Slider((int)(Drawing.Width / 2f - (int)(Drawing.Width / 1.5f) / 2f), 0, Drawing.Width)));
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "AdditionalTime", "Additional Time").SetValue(
                        new Slider(5, 0, 10))).ValueChanged += delegate(object o, OnValueChangeEventArgs args)
                {
                    if (_teleportObjects != null)
                    {
                        _teleportObjects.ForEach(t => t.AdditionalBarTime = args.GetNewValue <Slider>().Value);
                    }
                };
                drawingBarMenu.AddItem(
                    new MenuItem(drawingBarMenu.Name + "HCenter", "Horizontal Center").SetValue(false)).ValueChanged +=
                    delegate(object sender, OnValueChangeEventArgs args)
                {
                    if (args.GetNewValue <bool>())
                    {
                        Utility.DelayAction.Add(
                            1, delegate
                        {
                            try
                            {
                                var dScale   = Menu.Item(Name + "DrawingBarScale").GetValue <Slider>().Value / 10d;
                                var barWidth =
                                    (float)
                                    Math.Ceiling(
                                        Menu.Item(Name + "DrawingBarWidth").GetValue <Slider>().Value *
                                        dScale);

                                var centerPoint = (int)(Drawing.Width / 2f - barWidth / 2f);
                                Menu.Item(Name + "DrawingBarOffsetLeft")
                                .SetValue(new Slider(centerPoint, 0, Drawing.Width));
                                Menu.Item(Name + "DrawingBarHCenter").SetValue(false);
                            }
                            catch (Exception ex)
                            {
                                Global.Logger.AddItem(new LogItem(ex));
                            }
                        });
                    }
                };
                drawingBarMenu.AddItem(new MenuItem(drawingBarMenu.Name + "Enabled", "Enabled").SetValue(false));

                drawingMenu.AddSubMenu(drawingTextMenu);
                drawingMenu.AddSubMenu(drawingBarMenu);

                drawingMenu.AddItem(new MenuItem(drawingMenu.Name + "Self", "Self").SetValue(false))
                .DontSave()
                .ValueChanged += delegate(object o, OnValueChangeEventArgs args)
                {
                    if (args.GetNewValue <bool>())
                    {
                        _teleportObjects.Add(new TeleportObject(ObjectManager.Player));
                    }
                    else
                    {
                        _teleportObjects.RemoveAll(t => t.Hero.NetworkId.Equals(ObjectManager.Player.NetworkId));
                    }
                };

                Menu.AddSubMenu(drawingMenu);

                var notificationMenu = new Menu("Notification", Name + "Notification");

                notificationMenu.AddItem(new MenuItem(notificationMenu.Name + "Started", "Started").SetValue(false));
                notificationMenu.AddItem(new MenuItem(notificationMenu.Name + "Aborted", "Aborted").SetValue(false));
                notificationMenu.AddItem(new MenuItem(notificationMenu.Name + "Finished", "Finished").SetValue(false));

                Menu.AddSubMenu(notificationMenu);

                var chatMenu = new Menu("Chat (Local)", Name + "Chat");

                chatMenu.AddItem(new MenuItem(chatMenu.Name + "Started", "Started").SetValue(false));
                chatMenu.AddItem(new MenuItem(chatMenu.Name + "Aborted", "Aborted").SetValue(false));
                chatMenu.AddItem(new MenuItem(chatMenu.Name + "Finished", "Finished").SetValue(false));

                Menu.AddSubMenu(chatMenu);

                Menu.AddItem(new MenuItem(Name + "Enabled", "Enabled").SetValue(false));

                Parent.Menu.AddSubMenu(Menu);

                _text    = MDrawing.GetFont(Menu.Item(Name + "DrawingTextFontSize").GetValue <Slider>().Value);
                _barText =
                    MDrawing.GetFont(
                        (int)
                        Math.Ceiling(
                            Menu.Item(Name + "DrawingBarFontSize").GetValue <Slider>().Value *
                            (Menu.Item(Menu.Name + "DrawingBarScale").GetValue <Slider>().Value / 10d)));
                _line = MDrawing.GetLine(1);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Beispiel #20
0
        /// <summary>
        ///     Loads this instance.
        /// </summary>
        public void Load()
        {
            if (!HeroManager.Enemies.Any())
            {
                return;
            }

            EloBuddy.SDK.Core.DelayAction(() =>
            {
                var multiplicator = EloBuddy.SDK.Extensions.WorldToMinimap(new Vector3(1000, 1000, 0)).Distance(EloBuddy.SDK.Extensions.WorldToMinimap(new Vector3(2000, 1000, 0))) / 1000f;
                if (multiplicator <= float.Epsilon)
                {
                    Load();
                }
                else
                {
                    MinimapMultiplicator = multiplicator;
                    Vector2 leftUpper;
                    Vector2 rightLower;
                    if (Game.MapId == GameMapId.CrystalScar)
                    {
                        leftUpper  = EloBuddy.SDK.Extensions.WorldToMinimap(new Vector3(0, 13800, 0));
                        rightLower = EloBuddy.SDK.Extensions.WorldToMinimap(new Vector3(13800, 0, 0));
                    }
                    else
                    {
                        leftUpper  = EloBuddy.SDK.Extensions.WorldToMinimap(new Vector3(0, 14800, 0));
                        rightLower = EloBuddy.SDK.Extensions.WorldToMinimap(new Vector3(14800, 0, 0));
                    }

                    MinimapRectangle = new SharpDX.Rectangle((int)leftUpper.X, (int)leftUpper.Y, (int)(rightLower.X - leftUpper.X), (int)(rightLower.Y - leftUpper.Y));

                    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;

                    Teleport.OnTeleport += Teleport_OnTeleport;

                    this.sprite = MDrawing.GetSprite();
                    this.text   = MDrawing.GetFont(this.Menu.Item("LastPosition.FontSize").GetValue <Slider>().Value);
                    this.line   = MDrawing.GetLine(1);
                }
            }, 1000);
        }