Ejemplo n.º 1
0
                public int?Insert(int val, int idx)  //return the nearest
                {
                    LeastIndex = LeastIndex > idx ? idx : LeastIndex;
                    if (val < Val)
                    {
                        var nearest = Index;
                        if (Rc != null)
                        {
                            nearest = Math.Min(nearest, Rc.LeastIndex);
                        }

                        if (Lc == null)
                        {
                            Lc = new Node {
                                Val = val, Index = idx, LeastIndex = idx
                            };
                            return(nearest);
                        }
                        else
                        {
                            var lcInsert = Lc.Insert(val, idx);
                            if (lcInsert == null)
                            {
                                return(nearest);
                            }
                            else
                            {
                                return(Math.Min(nearest, lcInsert.Value));
                            }
                        }
                    }
                    else if (val == Val)
                    {
                        Index = idx;
                        return(Rc?.LeastIndex);
                    }
                    else
                    {
                        if (Rc == null)
                        {
                            Rc = new Node {
                                Val = val, Index = idx, LeastIndex = idx
                            };
                            return(null);
                        }
                        else
                        {
                            return(Rc.Insert(val, idx));
                        }
                    }
                }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool   a       = Lc.Parse(creTextBox2.Text, creTextBox3.Text);
            string actPath = System.Windows.Forms.Application.StartupPath + @"\actc.reg";
            string regPath = System.Windows.Forms.Application.StartupPath + @"\regc.reg";

            if (a)
            {
                FileReadWrite.WriteFile(actPath, creTextBox2.Text);
                FileReadWrite.WriteFile(regPath, creTextBox3.Text);
                Alert.Show("Đăng kí thành công !\nKhởi động lại chương trình \nđể sử dụng");
                Application.Exit();
            }
        }
Ejemplo n.º 3
0
        private static void OnLoad()
        {
            MenuIni = MainMenu.AddMenu("Auto Farm ", "Auto Farm");

            Lh = MenuIni.AddSubMenu("LastHit ", "LastHit");
            Lh.AddGroupLabel("LastHit Settings");
            Lh.Add(
                Player.ChampionName + "Enable",
                new KeyBind("Enable LastHit Toggle", true, KeyBind.BindTypes.PressToggle, 'M'));
            Lh.Add(
                Player.ChampionName + "Enableactive",
                new KeyBind("Enable LastHit Active", false, KeyBind.BindTypes.HoldActive));
            Lh.Add(Player.ChampionName + "combo", new CheckBox("Disable When Combo is active "));
            Lh.Add(Player.ChampionName + "harass", new CheckBox("Disable When Harass is active "));
            Lh.AddSeparator();
            Lh.AddGroupLabel("Spells Settings");
            Lh.Add(Player.ChampionName + "Qmode", new ComboBox("Q Mode", 0, "UnKillable Minions", "LastHit"));
            Lh.Add(Player.ChampionName + "Q", new CheckBox("Use Q ", false));
            Lh.Add(Player.ChampionName + "Wmode", new ComboBox("W Mode", 0, "UnKillable Minions", "LastHit"));
            Lh.Add(Player.ChampionName + "W", new CheckBox("Use W ", false));
            Lh.Add(Player.ChampionName + "Emode", new ComboBox("E Mode", 0, "UnKillable Minions", "LastHit"));
            Lh.Add(Player.ChampionName + "E", new CheckBox("Use E ", false));
            Lh.Add(Player.ChampionName + "Rmode", new ComboBox("R Mode", 0, "UnKillable Minions", "LastHit"));
            Lh.Add(Player.ChampionName + "R", new CheckBox("Use R ", false));

            Lc = MenuIni.AddSubMenu("LaneClear ", "LaneClear");
            Lc.AddGroupLabel("LaneClear Settings");
            Lc.Add(
                Player.ChampionName + "Enable",
                new KeyBind("Enable LaneClear Toggle", true, KeyBind.BindTypes.PressToggle, 'M'));
            Lc.Add(
                Player.ChampionName + "Enableactive",
                new KeyBind("Enable LaneClear Active", false, KeyBind.BindTypes.HoldActive));
            Lc.Add(Player.ChampionName + "combo", new CheckBox("Disable When Combo is active "));
            Lc.Add(Player.ChampionName + "harass", new CheckBox("Disable When Harass is active "));
            Lc.AddSeparator();
            Lc.AddGroupLabel("Spells Settings");
            Lc.Add(Player.ChampionName + "Qmode", new ComboBox("Q Mode", 0, "OnAfterAttack", "Always"));
            Lc.Add(Player.ChampionName + "Q", new CheckBox("Use Q ", false));
            Lc.Add(Player.ChampionName + "Wmode", new ComboBox("W Mode", 0, "OnAfterAttack", "Always"));
            Lc.Add(Player.ChampionName + "W", new CheckBox("Use W ", false));
            Lc.Add(Player.ChampionName + "Emode", new ComboBox("E Mode", 0, "OnAfterAttack", "Always"));
            Lc.Add(Player.ChampionName + "E", new CheckBox("Use E ", false));
            Lc.Add(Player.ChampionName + "Rmode", new ComboBox("R Mode", 0, "OnAfterAttack", "Always"));
            Lc.Add(Player.ChampionName + "R", new CheckBox("Use R ", false));

            ManaMenu = MenuIni.AddSubMenu("Mana Manager ", "Mana Manager");
            ManaMenu.AddGroupLabel("Only Cast if Mana >= %");
            ManaMenu.Add(Player.ChampionName + "Q", new Slider(" Q "));
            ManaMenu.Add(Player.ChampionName + "W", new Slider(" W "));
            ManaMenu.Add(Player.ChampionName + "E", new Slider(" E "));
            ManaMenu.Add(Player.ChampionName + "R", new Slider(" R "));

            DrawMenu = MenuIni.AddSubMenu("Drawings ", "Drawings");
            DrawMenu.AddGroupLabel("Drawings Settings");
            DrawMenu.Add(Player.ChampionName + "Q", new CheckBox("Draw Q ", false));
            DrawMenu.Add(Player.ChampionName + "W", new CheckBox("Draw W ", false));
            DrawMenu.Add(Player.ChampionName + "E", new CheckBox("Draw E ", false));
            DrawMenu.Add(Player.ChampionName + "R", new CheckBox("Draw R ", false));

            SpellManager.Initialize();
            SpellLibrary.Initialize();
            Orbwalker.OnUnkillableMinion += LastHit.Orbwalker_OnUnkillableMinion;
            Drawing.OnDraw         += Drawing_OnDraw;
            Orbwalker.OnPostAttack += LaneClear.Orbwalker_OnPostAttack;
            Game.OnTick            += Game_OnTick;
        }
Ejemplo n.º 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     if ((string.IsNullOrEmpty(textBox1.Text)) || (string.IsNullOrEmpty(textBox2.Text)))
     {
         MessageBox.Show("Необходимо ввести значения h и hx");
     }
     else
     {
         h  = Convert.ToDouble(textBox1.Text);
         hx = Convert.ToDouble(textBox2.Text);
         //уровень защиты
         if ((radioButton4.Checked) || (radioButton5.Checked) || (radioButton6.Checked) || (radioButton7.Checked))
         {
             //0,9
             if (radioButton1.Checked)
             {
                 if ((h >= 0) && (h < 30))
                 {
                     Lmax = 5.75 * h;
                     Lc   = 2.5 * h;
                     //h0 ?
                     h0          = 0.85 * h;
                     hc          = ((Lmax - L) / (Lmax - Lc)) * h0;
                     r0          = 1.2 * h;
                     rx          = (r0 * (h0 - hx)) / h0;
                     Lx          = (L * (h0 - hx)) / (2 * (h0 - hc));
                     rcx         = (r0 * (hc - hx)) / hc;
                     label2.Text = "Резульаты расчёта:\n" + "Lmax= " + Lmax.ToString("##.##") + "м" + "\nLc= " +
                                   Lc.ToString("##.##") + "м" + "\nrx= " + rx.ToString("####.##") + "м" +
                                   "\nlx= " + Lx.ToString("####.##") + "м" + "\nhc= " + hc.ToString("####.##") + "м";
                 }
                 else if ((h >= 30) && (h < 100))
                 {
                     Lmax        = (5.75 - 3.57 * Math.Pow(10, -3) * (h - 30)) * h;
                     Lc          = 2.5 * h;
                     h0          = 0.85 * h;
                     hc          = ((Lmax - L) / (Lmax - Lc)) * h0;
                     r0          = 1.2 * h;
                     rx          = (r0 * (h0 - hx)) / h0;
                     Lx          = (L * (h0 - hx)) / (2 * (h0 - hc));
                     rcx         = (r0 * (hc - hx)) / hc;
                     label2.Text = "Резульаты расчёта:\n" + "Lmax= " + Lmax.ToString("##.##") + "м" + "\nLc= " +
                                   Lc.ToString("##.##") + "м" + "\nrx= " + rx.ToString("####.##") + "м" +
                                   "\nlx= " + Lx.ToString("####.##") + "м" + "\nhc= " + hc.ToString("####.##") + "м";
                 }
                 else if ((h >= 100) && (h < 150))
                 {
                     Lmax        = 5.5 * h;
                     Lc          = 2.5 * h;
                     h0          = 0.85 * h;
                     hc          = ((Lmax - L) / (Lmax - Lc)) * h0;
                     r0          = (1.2 - Math.Pow(10, -3) * (h - 100)) * h;
                     rx          = (r0 * (h0 - hx)) / h0;
                     Lx          = (L * (h0 - hx)) / (2 * (h0 - hc));
                     rcx         = (r0 * (hc - hx)) / hc;
                     label2.Text = "Резульаты расчёта:\n" + "Lmax= " + Lmax.ToString("##.##") + "м" + "\nLc= " +
                                   Lc.ToString("##.##") + "м" + "\nrx= " + rx.ToString("####.##") + "м" +
                                   "\nlx= " + Lx.ToString("####.##") + "м" + "\nhc= " + hc.ToString("####.##") + "м";
                 }
                 else
                 {
                     MessageBox.Show("Значение h не попадает в допустимый диапазон");
                 }
             }
             //0,99
             if (radioButton2.Checked)
             {
                 if ((h >= 0) && (h < 30))
                 {
                     Lmax = 4.75 * h;
                     Lc   = 2.25 * h;
                     //h0 ?
                     h0          = 0.8 * h;
                     hc          = ((Lmax - L) / (Lmax - Lc)) * h0;
                     r0          = 0.8 * h;
                     rx          = (r0 * (h0 - hx)) / h0;
                     Lx          = (L * (h0 - hx)) / (2 * (h0 - hc));
                     rcx         = (r0 * (hc - hx)) / hc;
                     label2.Text = "Резульаты расчёта:\n" + "Lmax= " + Lmax.ToString("##.##") + "м" + "\nLc= " +
                                   Lc.ToString("##.##") + "м" + "\nrx= " + rx.ToString("####.##") + "м" +
                                   "\nlx= " + Lx.ToString("####.##") + "м" + "\nhc= " + hc.ToString("####.##") + "м";
                 }
                 else if ((h >= 30) && (h < 100))
                 {
                     Lmax        = (4.75 - 3.57 * Math.Pow(10, -3) * (h - 30)) * h;
                     Lc          = (2.25 - 0.00107 * (h - 30)) * h;
                     h0          = 0.8 * h;
                     hc          = ((Lmax - L) / (Lmax - Lc)) * h0;
                     r0          = (0.8 - 1.43 * Math.Pow(10, -3) * (h - 30)) * h;
                     rx          = (r0 * (h0 - hx)) / h0;
                     Lx          = (L * (h0 - hx)) / (2 * (h0 - hc));
                     rcx         = (r0 * (hc - hx)) / hc;
                     label2.Text = "Резульаты расчёта:\n" + "Lmax= " + Lmax.ToString("##.##") + "м" + "\nLc= " +
                                   Lc.ToString("##.##") + "м" + "\nrx= " + rx.ToString("####.##") + "м" +
                                   "\nlx= " + Lx.ToString("####.##") + "м" + "\nhc= " + hc.ToString("####.##") + "м";
                 }
                 else if ((h >= 100) && (h < 150))
                 {
                     Lmax        = 4.5 * h;
                     Lc          = 1.5 * h;
                     h0          = (0.8 - Math.Pow(10, -3) * (h - 100)) * h;
                     hc          = ((Lmax - L) / (Lmax - Lc)) * h0;
                     r0          = 0.7;
                     rx          = (r0 * (h0 - hx)) / h0;
                     Lx          = (L * (h0 - hx)) / (2 * (h0 - hc));
                     rcx         = (r0 * (hc - hx)) / hc;
                     label2.Text = "Резульаты расчёта:\n" + "Lmax= " + Lmax.ToString("##.##") + "м" + "\nLc= " +
                                   Lc.ToString("##.##") + "м" + "\nrx= " + rx.ToString("####.##") + "м" +
                                   "\nlx= " + Lx.ToString("####.##") + "м" + "\nhc= " + hc.ToString("####.##") + "м";
                 }
                 else
                 {
                     MessageBox.Show("Значение h не попадает в допустимый диапазон");
                 }
             }
             //0,999
             if (radioButton3.Checked)
             {
                 if ((h >= 0) && (h < 30))
                 {
                     Lmax = 4.25 * h;
                     Lc   = 2.25 * h;
                     //h0 ?
                     h0          = 0.7 * h;
                     hc          = ((Lmax - L) / (Lmax - Lc)) * h0;
                     r0          = 0.6 * h;
                     rx          = (r0 * (h0 - hx)) / h0;
                     Lx          = (L * (h0 - hx)) / (2 * (h0 - hc));
                     rcx         = (r0 * (hc - hx)) / hc;
                     label2.Text = "Резульаты расчёта:\n" + "Lmax= " + Lmax.ToString("##.##") + "м" + "\nLc= " +
                                   Lc.ToString("##.##") + "м" + "\nrx= " + rx.ToString("####.##") + "м" +
                                   "\nlx= " + Lx.ToString("####.##") + "м" + "\nhc= " + hc.ToString("####.##") + "м";
                 }
                 else if ((h >= 30) && (h < 100))
                 {
                     Lmax        = (4.25 - 3.57 * Math.Pow(10, -3) * (h - 30)) * h;
                     Lc          = (2.25 - 0.00107 * (h - 30)) * h;
                     h0          = (0.7 - 7.14 * Math.Pow(10, -4) * (h - 30)) * h;
                     hc          = ((Lmax - L) / (Lmax - Lc)) * h0;
                     r0          = (0.6 - 1.43 * Math.Pow(10, -4) * (h - 30)) * h;
                     rx          = (r0 * (h0 - hx)) / h0;
                     Lx          = (L * (h0 - hx)) / (2 * (h0 - hc));
                     rcx         = (r0 * (hc - hx)) / hc;
                     label2.Text = "Резульаты расчёта:\n" + "Lmax= " + Lmax.ToString("##.##") + "м" + "\nLc= " +
                                   Lc.ToString("##.##") + "м" + "\nrx= " + rx.ToString("####.##") + "м" +
                                   "\nlx= " + Lx.ToString("####.##") + "м" + "\nhc= " + hc.ToString("####.##") + "м";
                 }
                 else if ((h >= 100) && (h < 150))
                 {
                     Lmax        = 4.0 * h;
                     Lc          = 1.5 * h;
                     h0          = (0.65 - Math.Pow(10, -3) * (h - 100)) * h;
                     hc          = ((Lmax - L) / (Lmax - Lc)) * h0;
                     r0          = (0.5 - 2 * Math.Pow(10, -3) * (h - 100)) * h;
                     rx          = (r0 * (h0 - hx)) / h0;
                     Lx          = (L * (h0 - hx)) / (2 * (h0 - hc));
                     rcx         = (r0 * (hc - hx)) / hc;
                     label2.Text = "Резульаты расчёта:\n" + "Lmax= " + Lmax.ToString("##.##") + "м" + "\nLc= " +
                                   Lc.ToString("##.##") + "м" + "\nrx= " + rx.ToString("####.##") + "м" +
                                   "\nlx= " + Lx.ToString("####.##") + "м" + "\nhc= " + hc.ToString("####.##") + "м";
                 }
                 else
                 {
                     MessageBox.Show("Значение h не попадает в допустимый диапазон");
                 }
             }
         }
         else
         {
             MessageBox.Show("Значение уровня защиты не выбрано");
         }
     }
 }
Ejemplo n.º 5
0
        private static void OnLoad()
        {
            MenuIni = MainMenu.AddMenu("Auto Farm ", "Auto Farm");

            Lh = MenuIni.AddSubMenu("LastHit ", "LastHit");
            Lh.AddGroupLabel("LastHit Settings");
            Lh.Add(
                Player.ChampionName + "Enable",
                new KeyBind("SonVurus Aktiflestirme Tusu", true, KeyBind.BindTypes.PressToggle, 'M'));
            Lh.Add(
                Player.ChampionName + "Enableactive",
                new KeyBind("SonVurus Aktif", false, KeyBind.BindTypes.HoldActive));
            Lh.Add(Player.ChampionName + "combo", new CheckBox("Kombo etkin oldugunda devre disi birak "));
            Lh.Add(Player.ChampionName + "harass", new CheckBox("Durtme etkin oldugunda devre disi birak "));
            Lh.AddSeparator();
            Lh.AddGroupLabel("Spells Settings");
            Lh.Add(Player.ChampionName + "Qmode", new ComboBox("Q Modu", 0, "Kesemeyecegim minyona", "SonVurus"));
            Lh.Add(Player.ChampionName + "Q", new CheckBox("Kullan Q ", false));
            Lh.Add(Player.ChampionName + "Wmode", new ComboBox("W Modu", 0, "Kesemeyecegim minyona", "SonVurus"));
            Lh.Add(Player.ChampionName + "W", new CheckBox("Kullan W ", false));
            Lh.Add(Player.ChampionName + "Emode", new ComboBox("E Modu", 0, "Kesemeyecegim minyona", "SonVurus"));
            Lh.Add(Player.ChampionName + "E", new CheckBox("Kullan E ", false));
            Lh.Add(Player.ChampionName + "Rmode", new ComboBox("R Modu", 0, "Kesemeyecegim minyona", "SonVurus"));
            Lh.Add(Player.ChampionName + "R", new CheckBox("Kullan R ", false));

            Lc = MenuIni.AddSubMenu("LaneClear ", "LaneClear");
            Lc.AddGroupLabel("LaneClear Settings");
            Lc.Add(
                Player.ChampionName + "Enable",
                new KeyBind("Koridor temizleme aktiflestirme tusu", true, KeyBind.BindTypes.PressToggle, 'M'));
            Lc.Add(
                Player.ChampionName + "Enableactive",
                new KeyBind("Koridor temizleme aktif", false, KeyBind.BindTypes.HoldActive));
            Lc.Add(Player.ChampionName + "combo", new CheckBox("Kombo etkin oldugunda devre disi birak "));
            Lc.Add(Player.ChampionName + "harass", new CheckBox("Durtme etkin oldugunda devre disi birak "));
            Lc.AddSeparator();
            Lc.AddGroupLabel("Spells Settings");
            Lc.Add(Player.ChampionName + "Qmode", new ComboBox("Q Modu", 0, "SaldiridanSonra", "Surekli"));
            Lc.Add(Player.ChampionName + "Q", new CheckBox("Kullan Q ", false));
            Lc.Add(Player.ChampionName + "Wmode", new ComboBox("W Modu", 0, "SaldiridanSonra", "Surekli"));
            Lc.Add(Player.ChampionName + "W", new CheckBox("Kullan W ", false));
            Lc.Add(Player.ChampionName + "Emode", new ComboBox("E Modu", 0, "SaldiridanSonra", "Surekli"));
            Lc.Add(Player.ChampionName + "E", new CheckBox("Kullan E ", false));
            Lc.Add(Player.ChampionName + "Rmode", new ComboBox("R Modu", 0, "SaldiridanSonra", "Surekli"));
            Lc.Add(Player.ChampionName + "R", new CheckBox("Kullan R ", false));

            ManaMenu = MenuIni.AddSubMenu("Mana Manager ", "Mana Manager");
            ManaMenu.AddGroupLabel("Sadece kullanilsin Mana >= %");
            ManaMenu.Add(Player.ChampionName + "Q", new Slider(" Q "));
            ManaMenu.Add(Player.ChampionName + "W", new Slider(" W "));
            ManaMenu.Add(Player.ChampionName + "E", new Slider(" E "));
            ManaMenu.Add(Player.ChampionName + "R", new Slider(" R "));

            DrawMenu = MenuIni.AddSubMenu("Drawings ", "Drawings");
            DrawMenu.AddGroupLabel("Drawings Settings");
            DrawMenu.Add(Player.ChampionName + "Q", new CheckBox("Goster Q ", false));
            DrawMenu.Add(Player.ChampionName + "W", new CheckBox("Goster W ", false));
            DrawMenu.Add(Player.ChampionName + "E", new CheckBox("Goster E ", false));
            DrawMenu.Add(Player.ChampionName + "R", new CheckBox("Goster R ", false));

            SpellManager.Initialize();
            SpellLibrary.Initialize();
            Orbwalker.OnUnkillableMinion += LastHit.Orbwalker_OnUnkillableMinion;
            Drawing.OnDraw         += Drawing_OnDraw;
            Orbwalker.OnPostAttack += LaneClear.Orbwalker_OnPostAttack;
            Game.OnTick            += Game_OnTick;
        }
        private static void OnLoad()
        {
            MenuIni = MainMenu.AddMenu("Auto Farm ", "Auto Farm");

            Lh = MenuIni.AddSubMenu("LastHit ", "LastHit");
            Lh.AddGroupLabel("Sonvuruş Ayarları");
            Lh.Add(
                Player.ChampionName + "Enable",
                new KeyBind("Son vuruş tuşu", true, KeyBind.BindTypes.PressToggle, 'M'));
            Lh.Add(
                Player.ChampionName + "Enableactive",
                new KeyBind("Son vuruş Aktif", false, KeyBind.BindTypes.HoldActive));
            Lh.Add(Player.ChampionName + "combo", new CheckBox("Komboda Kullanma"));
            Lh.Add(Player.ChampionName + "harass", new CheckBox("Dürtmede Kullanma"));
            Lh.AddSeparator();
            Lh.AddGroupLabel("Spells Settings");
            Lh.Add(Player.ChampionName + "Qmode", new ComboBox("Q Modu", 0, "UnKillable Minions", "LastHit"));
            Lh.Add(Player.ChampionName + "Q", new CheckBox("Kullan Q ", false));
            Lh.Add(Player.ChampionName + "Wmode", new ComboBox("W Modu", 0, "UnKillable Minions", "LastHit"));
            Lh.Add(Player.ChampionName + "W", new CheckBox("Kullan W ", false));
            Lh.Add(Player.ChampionName + "Emode", new ComboBox("E Modu", 0, "UnKillable Minions", "LastHit"));
            Lh.Add(Player.ChampionName + "E", new CheckBox("Kullan E ", false));
            Lh.Add(Player.ChampionName + "Rmode", new ComboBox("R Modu", 0, "UnKillable Minions", "LastHit"));
            Lh.Add(Player.ChampionName + "R", new CheckBox("Kullan R ", false));

            Lc = MenuIni.AddSubMenu("LaneClear ", "LaneClear");
            Lc.AddGroupLabel("Lanetemizleme Ayarları");
            Lc.Add(
                Player.ChampionName + "Enable",
                new KeyBind("Lanetemizleme aktif Tuşu", true, KeyBind.BindTypes.PressToggle, 'M'));
            Lc.Add(
                Player.ChampionName + "Enableactive",
                new KeyBind("Lanetemizleme aktif", false, KeyBind.BindTypes.HoldActive));
            Lc.Add(Player.ChampionName + "combo", new CheckBox("Kombo sırasında devredışı bırak "));
            Lc.Add(Player.ChampionName + "harass", new CheckBox("Dürtme sırasından devredışı bırak "));
            Lc.AddSeparator();
            Lc.AddGroupLabel("Büyü Ayarları");
            Lc.Add(Player.ChampionName + "Qmode", new ComboBox("Q Modu", 0, "OnAfterAttack", "Always"));
            Lc.Add(Player.ChampionName + "Q", new CheckBox("Kullan Q ", false));
            Lc.Add(Player.ChampionName + "Wmode", new ComboBox("W Modu", 0, "OnAfterAttack", "Always"));
            Lc.Add(Player.ChampionName + "W", new CheckBox("Kullan W ", false));
            Lc.Add(Player.ChampionName + "Emode", new ComboBox("E Modu", 0, "OnAfterAttack", "Always"));
            Lc.Add(Player.ChampionName + "E", new CheckBox("Kullan E ", false));
            Lc.Add(Player.ChampionName + "Rmode", new ComboBox("R Modu", 0, "OnAfterAttack", "Always"));
            Lc.Add(Player.ChampionName + "R", new CheckBox("Kullan R ", false));

            ManaMenu = MenuIni.AddSubMenu("Mana Manager ", "Mana Manager");
            ManaMenu.AddGroupLabel("Manam sadece şundan yüksekse >= %");
            ManaMenu.Add(Player.ChampionName + "Q", new Slider("Q Kullan"));
            ManaMenu.Add(Player.ChampionName + "W", new Slider("W Kullan"));
            ManaMenu.Add(Player.ChampionName + "E", new Slider("E Kullan"));
            ManaMenu.Add(Player.ChampionName + "R", new Slider("R Kullan"));

            DrawMenu = MenuIni.AddSubMenu("Drawings ", "Drawings");
            DrawMenu.AddGroupLabel("Gösterge Ayarları");
            DrawMenu.Add(Player.ChampionName + "Q", new CheckBox("Göster Q ", false));
            DrawMenu.Add(Player.ChampionName + "W", new CheckBox("Göster W ", false));
            DrawMenu.Add(Player.ChampionName + "E", new CheckBox("Göster E ", false));
            DrawMenu.Add(Player.ChampionName + "R", new CheckBox("Göster R ", false));

            SpellManager.Initialize();
            SpellLibrary.Initialize();
            Orbwalker.OnUnkillableMinion += LastHit.Orbwalker_OnUnkillableMinion;
            Drawing.OnDraw         += Drawing_OnDraw;
            Orbwalker.OnPostAttack += LaneClear.Orbwalker_OnPostAttack;
            Game.OnTick            += Game_OnTick;
        }
Ejemplo n.º 7
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            GetDatabaseInfo getDatabaseInfo = new GetDatabaseInfo();

            if (!getDatabaseInfo.isconfiged)
            {
                FrmDelete requestconn = new FrmDelete();
                requestconn.label1.Text =
                    "Chưa có kết nối database.\n Bạn có muốn chọn database không?";
                if (requestconn.ShowDialog() == DialogResult.OK)
                {
                    FrmConfigDatabase frmConfigDatabase = new FrmConfigDatabase();
                    frmConfigDatabase.ShowDialog();
                }
            }
            else
            {
                if (DAO.DataProvider.TestConnection(getDatabaseInfo.mode, getDatabaseInfo.serverName,
                                                    getDatabaseInfo.databaseName, getDatabaseInfo.user, getDatabaseInfo.pass))
                {
                    Services.get_GUI.serverName   = getDatabaseInfo.serverName;
                    Services.get_GUI.databaseName = getDatabaseInfo.databaseName;
                    Services.get_GUI.Mode         = getDatabaseInfo.mode;
                    Services.get_GUI.UserName     = getDatabaseInfo.user;
                    Services.get_GUI.Password     = getDatabaseInfo.pass;
                    Services.get_GUI getGUI = new get_GUI();
                    if (getGUI.GetSetupByStore(StaticClass.storeId) == null)
                    {
                        FrmDelete requestconn = new FrmDelete();
                        requestconn.label1.Text =
                            "Kết nối không thành công.\n Bạn có muốn chọn database không?";
                        if (requestconn.ShowDialog() == DialogResult.OK)
                        {
                            FrmConfigDatabase frmConfigDatabase = new FrmConfigDatabase();
                            frmConfigDatabase.ShowDialog();
                            return;
                        }
                    }
                    Lc.Check();

                    if (StaticClass.version == Lc.Version.Demo)
                    {
                        FrmRegisterInfo frmRegisterInfo;
                        int             num = getGUI.GetNumOfInvoice();
                        if (num > 50)
                        {
                            frmRegisterInfo = new FrmRegisterInfo("Quá 100 hóa đơn.", false);
                            //frmRegisterInfo.ShowDialog();
                            Application.Run(frmRegisterInfo);
                            //if (MessBox2Choice.ShowBox("Quá 100 hóa đơn.\n Bạn có muốn đăng kí không?", Color.Red) == DialogResult.Yes)
                            //{
                            //    Application.Run(new FrmRegister());
                            //}
                        }
                        else
                        {
                            frmRegisterInfo = new FrmRegisterInfo("Bạn còn " + (100 - num).ToString() + " hóa đơn để thử\n với phiên bản Demo", true);
                            //frmRegisterInfo.ShowDialog();
                            frmRegisterInfo.ShowDialog();
                            //Alert.Show("Bạn còn " + (100 - num).ToString()+" hóa đơn để thử\n với phiên bản Demo");
                            Application.Run(new FrmLogin());
                        }
                    }
                    else
                    {
                        Application.Run(new FrmLogin());
                        //Application.Run(new FrmGeneralSetup());
                    }
                }
                else
                {
                    FrmDelete requestconn = new FrmDelete();
                    requestconn.label1.Text =
                        "Kết nối không thành công.\n Bạn có muốn chọn database không?";
                    if (requestconn.ShowDialog() == DialogResult.OK)
                    {
                        FrmConfigDatabase frmConfigDatabase = new FrmConfigDatabase();
                        frmConfigDatabase.ShowDialog();
                    }
                }
            }
            //Application.Run(new FrmCustomer());
        }