Ejemplo n.º 1
0
 public void AddOrderItem(IMenuItem IItem)
 {
     if (IItem != null)
     {
         M_Item.Add((MenuItem)IItem);
         Cost += IItem.BaseCost;
     }
 }
Ejemplo n.º 2
0
    public static M_Item GetItem(SqlDataReader ItemTable)
    {
        M_Item item = new M_Item();

        item.Item_ID    = (int)ItemTable["Item_ID"];
        item.Item_Name  = ItemTable["Item_Name"].ToString();
        item.Item_Desc  = ItemTable["Item_Desc"].ToString();
        item.Item_Order = (int)ItemTable["Item_Order"];
        return(item);
    }
        public ActionResult UpdateStocks(int ID, long Amount, string StockType)
        {
            M_Stocks stocks = new M_Stocks();
            M_Item   item   = new M_Item();

            item = (from c in db.M_Item where c.ID == ID select c).FirstOrDefault();

            if (StockType == "Deduct" && Amount > item.CurrentStock)
            {
                return(Json(new { msg = "Failed" }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                switch (StockType)
                {
                case "Add":
                    stocks.ItemID     = ID;
                    stocks.StockQty   = Amount;
                    stocks.UpdateDate = DateTime.Now;
                    stocks.UpdateID   = user.UserName;
                    stocks.StockType  = "In";
                    stocks.Price      = item.Price;
                    db.M_Stocks.Add(stocks);



                    item.CurrentStock   += Amount;
                    db.Entry(item).State = EntityState.Modified;
                    db.SaveChanges();


                    break;

                case "Deduct":
                    stocks.ItemID     = ID;
                    stocks.StockQty   = Amount;
                    stocks.UpdateDate = DateTime.Now;
                    stocks.UpdateID   = user.UserName;
                    stocks.Price      = item.Price;
                    stocks.StockType  = "Out";
                    db.M_Stocks.Add(stocks);


                    item.CurrentStock   -= Amount;
                    db.Entry(item).State = EntityState.Modified;
                    db.SaveChanges();

                    break;
                }



                return(Json(new { msg = "Success" }, JsonRequestBehavior.AllowGet));
            }
        }
Ejemplo n.º 4
0
    public static int  InsertItem(M_Item item)
    {
        string strsql = "insert Item values(@Item_Name,@Item_Desc,@Item_Order)";

        SqlParameter[] comSql = new SqlParameter[] {
            new SqlParameter("@Item_Name", item.Item_Name),
            new SqlParameter("@Item_Desc", item.Item_Desc),
            new SqlParameter("@Item_Order", item.Item_Order)
        };
        return(DBHelper.IDUTable(strsql, comSql));
    }
Ejemplo n.º 5
0
    public static int UpdateItem(M_Item item)
    {
        string strsql = "update Item set Item_Name=@Item_Name,Item_Desc= @Item_Desc,Item_Order=@Item_Order where Item_ID=@Item_ID ";

        SqlParameter[] comSql = new SqlParameter[] {
            new SqlParameter("@Item_ID", item.Item_ID),
            new SqlParameter("@Item_Name", item.Item_Name),
            new SqlParameter("@Item_Desc", item.Item_Desc),
            new SqlParameter("@Item_Order", item.Item_Order)
        };
        return(DBHelper.IDUTable(strsql, comSql));
    }
Ejemplo n.º 6
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        M_Item item = new M_Item();

        item.Item_Name  = txtItemName.Text.Trim();
        item.Item_Desc  = txtItemDesc.Text.Trim();
        item.Item_Order = Convert.ToInt32(txtItemOrder.Text.Trim());
        if (B_Item.InsertItem(item))
        {
            Response.Write("<script>alert('添加成功!')</script>");
        }
        else
        {
            Response.Write("<script>alert('添加失败!')</script>");
        }
    }
Ejemplo n.º 7
0
        public ActionResult CreateItem(M_Item data)
        {
            try
            {
                data.CreateID     = user.CreateID;
                data.CreateDate   = DateTime.Now;
                data.UpdateID     = user.CreateID;
                data.UpdateDate   = DateTime.Now;
                data.IsDeleted    = false;
                data.CurrentStock = 0;
                M_Item checker = (from c in db.M_Item
                                  where c.ItemName == data.ItemName &&
                                  c.ItemCategory == data.ItemCategory &&
                                  c.Price == data.Price &&
                                  c.RetailPrice == data.RetailPrice &&
                                  c.IsDeleted == false
                                  select c).FirstOrDefault();
                if (checker == null)
                {
                    db.M_Item.Add(data);
                    db.SaveChanges();

                    M_Stocks initialStock = new M_Stocks();
                    initialStock.ItemID     = (from c in db.M_Item orderby c.ID descending select c.ID).FirstOrDefault();
                    initialStock.StockQty   = 0;
                    initialStock.StockType  = "Initial";
                    initialStock.UpdateID   = user.UserName;
                    initialStock.UpdateDate = DateTime.Now;
                    db.M_Stocks.Add(initialStock);
                    db.SaveChanges();

                    long CurrentID = (from c in db.M_Item orderby c.ID select c.ID).FirstOrDefault();

                    return(Json(new { msg = "Success", itemID = CurrentID }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new { msg = "Failed" }, JsonRequestBehavior.AllowGet));
                }
            }
            catch (Exception err)
            {
                return(Json(new { msg = err.Message }, JsonRequestBehavior.AllowGet));
            }
        }
Ejemplo n.º 8
0
 public ActionResult DeleteItem(int ID)
 {
     try
     {
         M_Item dataval = new M_Item();
         dataval = (from u in db.M_Item.ToList()
                    where u.ID == ID
                    select u).FirstOrDefault();
         dataval.IsDeleted       = true;
         db.Entry(dataval).State = EntityState.Modified;
         db.SaveChanges();
         return(Json(new { msg = "Success" }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception err)
     {
         return(Json(new { msg = err.Message }, JsonRequestBehavior.AllowGet));
     }
 }
Ejemplo n.º 9
0
    public static int DeleteItem(M_Item item)
    {
        int count = D_Class.GetItemcount(item.Item_ID);

        if (count > 0)
        {
            HttpContext.Current.Response.Write("<script>alert('删除失败!所属栏目下有记录!')</script>");
            return(-1);
        }
        else
        {
            string         strsql = "delete Item where Item_ID=@Item_ID ";
            SqlParameter[] comSql = new SqlParameter[]
            {
                new SqlParameter("@Item_ID", item.Item_ID),
            };
            return(DBHelper.IDUTable(strsql, comSql));
        }
    }
Ejemplo n.º 10
0
        public ActionResult EditItem(M_Item data)
        {
            try
            {
                M_Item dataval = new M_Item();
                dataval = (from u in db.M_Item.ToList()
                           where u.ID == data.ID
                           select u).FirstOrDefault();
                dataval.ItemCategory = data.ItemCategory;
                dataval.ItemName     = data.ItemName;
                dataval.Price        = data.Price;
                dataval.Photo        = data.Photo;
                dataval.RetailPrice  = data.RetailPrice;

                dataval.UpdateID   = user.UserName;
                dataval.UpdateDate = DateTime.Now;

                M_Item checker = (from c in db.M_Item
                                  where c.ItemName == data.ItemName &&
                                  c.ItemCategory == data.ItemCategory &&
                                  c.Price == data.Price &&
                                  c.RetailPrice == data.RetailPrice &&
                                  c.IsDeleted == false
                                  select c).FirstOrDefault();
                if (checker == null)
                {
                    db.Entry(dataval).State = EntityState.Modified;
                    db.SaveChanges();
                    return(Json(new { msg = "Success" }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new { msg = "Failed" }, JsonRequestBehavior.AllowGet));
                }
            }
            catch (Exception err)
            {
                return(Json(new { msg = err.Message }, JsonRequestBehavior.AllowGet));
            }
        }
Ejemplo n.º 11
0
        public ActionResult GetReceipt(List <POS_Receipt> receiptlist)
        {
            string ReceiptRefNo = "REFNO" + DateTime.Now.ToString("yyyyMMddHHmmss");

            foreach (POS_Receipt s in receiptlist)
            {
                s.ReceiptRefNo = ReceiptRefNo;
                s.CreateID     = "POS";
                s.CreateDate   = DateTime.Now;
                db.POS_Receipt.Add(s);
                db.SaveChanges();
            }

            List <POS_Receipt> ItemList = new List <POS_Receipt>();

            ItemList = receiptlist.Where(x => x.Type == "Item").ToList();
            foreach (POS_Receipt s in ItemList)
            {
                M_Item item = new M_Item();
                item = (from c in db.M_Item where c.ID == s.ItemID select c).FirstOrDefault();
                item.CurrentStock   -= s.Amount;
                db.Entry(item).State = EntityState.Modified;

                M_Stocks stock = new M_Stocks();
                stock.ItemID     = s.ID;
                stock.StockType  = "Out";
                stock.StockQty   = s.Amount;
                stock.Remarks    = string.Empty;
                stock.Price      = item.Price;
                stock.UpdateID   = "POS";
                stock.UpdateDate = DateTime.Now;
                db.M_Stocks.Add(stock);
                db.SaveChanges();
            }

            return(Json(new { }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 12
0
        public static void Load()
        {
            Chat.Print("<font color = '#cfa9a'>Welcome to </font><font color = '#ffffff'>[ Nebula ] " + Player.Instance.ChampionName + "</font><font color = '#cfa9a'>. Addon is ready.</font>");

            Menu = MainMenu.AddMenu("[ Nebula ] Soraka", "By.Natrium");
            Menu.Add("Language.Select", new ComboBox("Language / 언어", 0, "English", "한국어"));
            Menu.AddVisualFrame(new VsFrame("Img_Lux", System.Drawing.Color.Purple));

            Controller language;

            switch (Menu["Language.Select"].Cast <ComboBox>().CurrentValue)
            {
            case 0:
                language = new Eng();
                break;

            case 1:
                language = new Kor();
                break;

            default:
                language = new Eng();
                break;
            }

            Menu.AddLabel(language.Dictionary[EnumContext.SelectLanguage]);
            Menu.AddSeparator(10);
            Menu.AddLabel(language.Dictionary[EnumContext.Text_1]);
            Menu.AddLabel(language.Dictionary[EnumContext.Text_2]);

            M_Main = Menu.AddSubMenu(language.Dictionary[EnumContext.Main]);
            M_Main.AddGroupLabel(language.Dictionary[EnumContext.Combo]);
            M_Main.Add("Combo_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Main.Add("Combo_E", new CheckBox(language.Dictionary[EnumContext.SpellE]));
            M_Main.AddSeparator(20);
            M_Main.AddGroupLabel(language.Dictionary[EnumContext.Harass]);
            M_Main.Add("Harass_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Main.Add("Harass_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 30));
            M_Main.AddSeparator(10);
            M_Main.Add("Harass_E", new CheckBox(language.Dictionary[EnumContext.SpellE]));
            M_Main.Add("Harass_E_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 80));
            M_Main.AddSeparator(20);
            M_Main.AddGroupLabel(language.Dictionary[EnumContext.Flee]);
            M_Main.Add("Flee_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Main.Add("Flee_E", new CheckBox(language.Dictionary[EnumContext.SpellE]));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Clear = Menu.AddSubMenu(language.Dictionary[EnumContext.Clear]);
            M_Clear.AddGroupLabel(language.Dictionary[EnumContext.LaneClear]);
            M_Clear.Add("Lane_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Clear.Add("Lane_Q_Hit", new Slider(language.Dictionary[EnumContext.LaneQHit] + "{0} ]", 2, 0, 5));
            M_Clear.Add("Lane_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 45));
            M_Clear.AddSeparator(20);
            M_Clear.AddGroupLabel(language.Dictionary[EnumContext.JungleClear]);
            M_Clear.Add("Jungle_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Clear.Add("Jungle_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 25));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Item = Menu.AddSubMenu(language.Dictionary[EnumContext.Item]);
            M_Item.AddLabel(language.Dictionary[EnumContext.sModeCombo]);
            M_Item.Add("Item.BK", new CheckBox(language.Dictionary[EnumContext.sBK]));
            M_Item.Add("Item.BK.Hp", new Slider(language.Dictionary[EnumContext.sBKHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.sBKHp2], 95, 0, 100));
            M_Item.AddSeparator(10);
            M_Item.Add("Item.Mikael", new CheckBox(language.Dictionary[EnumContext.sMikael]));
            M_Item.Add("Item.Mikael_Op", new ComboBox(language.Dictionary[EnumContext.sMikaelOp], 0, language.Dictionary[EnumContext.sMikaelOp1], language.Dictionary[EnumContext.sMikaelOp2]));
            M_Item.Add("Fear", new CheckBox(language.Dictionary[EnumContext.sFear]));
            M_Item.Add("Silence", new CheckBox(language.Dictionary[EnumContext.sSilence]));
            M_Item.Add("Slow", new CheckBox(language.Dictionary[EnumContext.sSlow]));
            M_Item.Add("Snare", new CheckBox(language.Dictionary[EnumContext.sSnare]));
            M_Item.Add("Stun", new CheckBox(language.Dictionary[EnumContext.sStun]));
            M_Item.Add("Taunt", new CheckBox(language.Dictionary[EnumContext.sTaunt]));
            M_Item.AddLabel(language.Dictionary[EnumContext.sAlways]);
            M_Item.Add("Item.Solari", new CheckBox(language.Dictionary[EnumContext.sSolari]));
            M_Item.Add("Item.Solari.MyHp", new Slider(language.Dictionary[EnumContext.MyHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.MyHp2], 50));
            M_Item.Add("Item.Solari.AMyHp", new Slider(language.Dictionary[EnumContext.sSolariAMyHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.sSolariAMyHp2], 25));
            M_Item.Add("Item.Solari.TeamHp", new Slider(language.Dictionary[EnumContext.TeamHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.TeamHp2], 65));
            M_Item.AddSeparator(10);
            M_Item.Add("Item.Redemption", new CheckBox(language.Dictionary[EnumContext.sRedemption]));
            M_Item.Add("Item.Redemption.MyHp", new Slider(language.Dictionary[EnumContext.MyHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.MyHp2], 50, 0, 100));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Auto = Menu.AddSubMenu(language.Dictionary[EnumContext.Auto]);
            M_Auto.Add("Auto_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Auto.Add("Auto_Q_Mode", new ComboBox(language.Dictionary[EnumContext.AutoQMode], 0, language.Dictionary[EnumContext.AutoQModeOp1], language.Dictionary[EnumContext.AutoQModeOp2]));
            M_Auto.Add("Auto_Q_Hit", new Slider(language.Dictionary[EnumContext.AutoQHit], 65));
            M_Auto.Add("Auto_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 55));
            M_Auto.AddSeparator(10);
            M_Auto.Add("Auto_W", new CheckBox(language.Dictionary[EnumContext.SpellW]));
            M_Auto.Add("Auto_W_Semi", new KeyBind(language.Dictionary[EnumContext.AutoWSemi], false, KeyBind.BindTypes.HoldActive, 'W'));
            M_Auto.Add("Auto_W_Target", new ComboBox(language.Dictionary[EnumContext.AutoWOp], 0, language.Dictionary[EnumContext.AutoWOp1], language.Dictionary[EnumContext.AutoWOp2], language.Dictionary[EnumContext.AutoWOp3]));
            foreach (var MyTeam in EntityManager.Heroes.Allies.Where(x => !x.IsMe))
            {
                M_Auto.Add("Auto_W_" + MyTeam.ChampionName, new CheckBox(MyTeam.ChampionName));
            }
            M_Auto.Add("Auto_W_MyHp", new Slider(language.Dictionary[EnumContext.AutoWMyHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.AutoWMyHp2], 50));
            M_Auto.Add("Auto_W_TeamHp", new Slider(language.Dictionary[EnumContext.TeamHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.TeamHp2], 65));
            M_Auto.AddSeparator(10);
            M_Auto.Add("Auto_R", new CheckBox(language.Dictionary[EnumContext.SpellR]));
            M_Auto.Add("Auto_R_MyHp", new Slider(language.Dictionary[EnumContext.MyHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.MyHp2], 35));
            M_Auto.Add("Auto_R_TeamHp", new Slider(language.Dictionary[EnumContext.TeamHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.TeamHp2], 35));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Misc = Menu.AddSubMenu(language.Dictionary[EnumContext.Msic]);
            M_Misc.Add("Misc_Ignite", new CheckBox(language.Dictionary[EnumContext.AutoIgnite]));
            M_Misc.Add("Misc_KillSt", new CheckBox(language.Dictionary[EnumContext.KillSteal]));
            M_Misc.AddSeparator(20);
            M_Misc.AddLabel("Gapcloser");
            M_Misc.Add("Misc_Gap_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Misc.Add("Misc_Gap_E", new CheckBox(language.Dictionary[EnumContext.SpellE], false));
            M_Misc.AddSeparator(20);
            M_Misc.AddLabel("Interrupt");
            M_Misc.Add("Misc_Int_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ], false));
            M_Misc.Add("Misc_Int_Q_Lv", new ComboBox(language.Dictionary[EnumContext.InterruptLv], 0, language.Dictionary[EnumContext.InterruptLv1], language.Dictionary[EnumContext.InterruptLv2]));
            M_Misc.Add("Misc_Int_E", new CheckBox(language.Dictionary[EnumContext.SpellE]));
            M_Misc.Add("Misc_Int_E_Lv", new ComboBox(language.Dictionary[EnumContext.InterruptLv], 1, language.Dictionary[EnumContext.InterruptLv1], language.Dictionary[EnumContext.InterruptLv2]));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Draw = Menu.AddSubMenu(language.Dictionary[EnumContext.Draw]);
            M_Draw.Add("Draw_Killable", new CheckBox(language.Dictionary[EnumContext.DrawText]));
            M_Draw.AddSeparator(10);
            M_Draw.Add("Draw_Q", new CheckBox(language.Dictionary[EnumContext.DrawQ]));
            M_Draw.AddSeparator(10);
            M_Draw.Add("Draw_W", new CheckBox(language.Dictionary[EnumContext.DrawW]));
            M_Draw.AddSeparator(10);
            M_Draw.Add("Draw_E", new CheckBox(language.Dictionary[EnumContext.DrawE]));

            CheckVersion.CheckUpdate();

            Gapcloser.OnGapcloser            += OnGapcloser;
            Interrupter.OnInterruptableSpell += OnInterruptableSpell;
            Obj_AI_Base.OnProcessSpellCast   += Mode_Item.OnProcessSpellCast;
            Obj_AI_Base.OnBasicAttack        += Mode_Item.OnBasicAttack;
            Game.OnUpdate  += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
        }
Ejemplo n.º 13
0
    public static bool InsertItem(M_Item item)
    {
        int count = D_Item.InsertItem(item);

        return(count > 0 ? true : false);
    }
Ejemplo n.º 14
0
        public static void Load()
        {
            Chat.Print("<font color = '#20b2aa'>Welcome to </font><font color = '#ffffff'>[ Nebula ] " + Player.Instance.ChampionName + "</font><font color = '#20b2aa'>. Addon is ready.</font>");
            CheckVersion.CheckUpdate();

            Menu = MainMenu.AddMenu("[ Nebula ] Nasus", "By.Natrium");
            Menu.Add("Language.Select", new ComboBox("Language / 언어", 0, "English", "한국어"));
            Menu.AddVisualFrame(new VsFrame("Ward.Preview", System.Drawing.Color.Purple));

            Controller language;

            switch (Menu["Language.Select"].Cast <ComboBox>().CurrentValue)
            {
            case 0:
                language = new Eng();
                break;

            case 1:
                language = new Kor();
                break;

            default:
                language = new Eng();
                break;
            }

            Menu.AddLabel(language.Dictionary[EnumContext.SelectLanguage]);
            Menu.AddSeparator(10);
            Menu.AddLabel(language.Dictionary[EnumContext.Text_1]);
            Menu.AddLabel(language.Dictionary[EnumContext.Text_2]);

            M_Main = Menu.AddSubMenu(language.Dictionary[EnumContext.Main]);
            M_Main.AddGroupLabel(language.Dictionary[EnumContext.Combo]);
            M_Main.Add("Combo_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Main.Add("Combo_W", new CheckBox(language.Dictionary[EnumContext.SpellW]));
            M_Main.Add("Combo_W_Dis", new Slider(language.Dictionary[EnumContext.ComboWDis1] + "[ {0} ]" + language.Dictionary[EnumContext.ComboWDis2], 350, 0, 600));
            M_Main.Add("Combo_E", new CheckBox(language.Dictionary[EnumContext.SpellE]));
            M_Main.Add("Combo_R", new CheckBox(language.Dictionary[EnumContext.SpellR]));
            M_Main.Add("Combo_R_Hp", new Slider(language.Dictionary[EnumContext.MyHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.MyHp2], 55));
            M_Main.AddSeparator(20);
            M_Main.AddGroupLabel(language.Dictionary[EnumContext.Harass]);
            M_Main.Add("Harass_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Main.Add("Harass_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 30));
            M_Main.AddSeparator(10);
            M_Main.Add("Harass_E", new CheckBox(language.Dictionary[EnumContext.SpellE]));
            M_Main.Add("Harass_E_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 80));
            M_Main.AddSeparator(10);
            M_Main.Add("Harass_R", new CheckBox(language.Dictionary[EnumContext.SpellR]));
            M_Main.Add("Harass_R_Hp", new Slider(language.Dictionary[EnumContext.MyHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.MyHp2], 55));
            M_Main.Add("Harass_R_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 25));
            M_Main.AddSeparator(20);
            M_Main.AddGroupLabel(language.Dictionary[EnumContext.Flee]);
            M_Main.Add("Flee_W", new CheckBox(language.Dictionary[EnumContext.SpellW]));
            M_Main.Add("Flee_E", new CheckBox(language.Dictionary[EnumContext.SpellE]));
            M_Main.Add("Flee_R", new CheckBox(language.Dictionary[EnumContext.SpellR]));
            M_Main.Add("Flee_R_Hp", new Slider(language.Dictionary[EnumContext.MyHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.MyHp2], 35));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Clear = Menu.AddSubMenu(language.Dictionary[EnumContext.Clear]);
            M_Clear.AddGroupLabel(language.Dictionary[EnumContext.LaneClear]);
            M_Clear.Add("Lane_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Clear.Add("Lane_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 45));
            M_Clear.AddSeparator(10);
            M_Clear.Add("Lane_E", new CheckBox(language.Dictionary[EnumContext.SpellE]));
            M_Clear.Add("Lane_E_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 85));
            M_Clear.AddSeparator(20);
            M_Clear.AddGroupLabel(language.Dictionary[EnumContext.JungleClear]);
            M_Clear.Add("Jungle_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Clear.Add("Jungle_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 25));
            M_Clear.Add("Jungle_E", new CheckBox(language.Dictionary[EnumContext.SpellE]));
            M_Clear.Add("Jungle_E_Hit", new Slider(language.Dictionary[EnumContext.JungleHitNum1] + "[ {0} ]" + language.Dictionary[EnumContext.JungleHitNum2], 2, 0, 5));
            M_Clear.Add("Jungle_E_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus1] + "[ {0}% ]" + language.Dictionary[EnumContext.ManaStatus2], 75));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Item = Menu.AddSubMenu(language.Dictionary[EnumContext.Item]);
            M_Item.AddLabel(language.Dictionary[EnumContext.sModeCombo]);
            M_Item.Add("Item.Youmuu", new CheckBox(language.Dictionary[EnumContext.sYoummu]));
            M_Item.Add("Item.BK", new CheckBox(language.Dictionary[EnumContext.sBK]));
            M_Item.Add("Item.BK.Hp", new Slider(language.Dictionary[EnumContext.sBKHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.sBKHp2], 95, 0, 100));
            M_Item.AddSeparator(10);
            M_Item.Add("QSS", new CheckBox(language.Dictionary[EnumContext.sQSS]));
            M_Item.Add("Scimitar", new CheckBox(language.Dictionary[EnumContext.sScimiter]));
            M_Item.Add("CastDelay", new Slider("{0}ms" + language.Dictionary[EnumContext.sDelay], 350, 0, 1200));
            M_Item.AddSeparator(10);
            M_Item.Add("Blind", new CheckBox(language.Dictionary[EnumContext.sBlind]));
            M_Item.Add("Charm", new CheckBox(language.Dictionary[EnumContext.sCharm]));
            M_Item.Add("Fear", new CheckBox(language.Dictionary[EnumContext.sFear]));
            M_Item.Add("Ploymorph", new CheckBox(language.Dictionary[EnumContext.sPloymorph]));
            M_Item.Add("Poisons", new CheckBox(language.Dictionary[EnumContext.sPoisons]));
            M_Item.Add("Silence", new CheckBox(language.Dictionary[EnumContext.sSilence]));
            M_Item.Add("Slow", new CheckBox(language.Dictionary[EnumContext.sSlow]));
            M_Item.Add("Stun", new CheckBox(language.Dictionary[EnumContext.sStun]));
            M_Item.Add("Supression", new CheckBox(language.Dictionary[EnumContext.sSupression]));
            M_Item.Add("Taunt", new CheckBox(language.Dictionary[EnumContext.sTaunt]));
            M_Item.Add("Snare", new CheckBox(language.Dictionary[EnumContext.sSnare]));
            M_Item.AddSeparator(10);
            M_Item.AddLabel(language.Dictionary[EnumContext.sAlways]);
            M_Item.Add("Item.Redemption", new CheckBox(language.Dictionary[EnumContext.sRedemption]));
            M_Item.Add("Item.Redemption.MyHp", new Slider(language.Dictionary[EnumContext.MyHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.MyHp2], 50, 0, 100));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Misc = Menu.AddSubMenu(language.Dictionary[EnumContext.Msic]);
            M_Misc.Add("Misc_Ignite", new CheckBox(language.Dictionary[EnumContext.AutoIgnite]));
            M_Misc.AddSeparator(10);
            M_Misc.Add("Misc_KillSt", new CheckBox(language.Dictionary[EnumContext.KillSteal]));
            M_Misc.Add("Misc_KillStE", new ComboBox(language.Dictionary[EnumContext.KillOption], 0, language.Dictionary[EnumContext.KillText1], language.Dictionary[EnumContext.KillText2]));
            M_Misc.AddSeparator(10);
            M_Misc.Add("Misc_JungleSt", new CheckBox(language.Dictionary[EnumContext.JungleSteal]));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Draw = Menu.AddSubMenu(language.Dictionary[EnumContext.Draw]);
            M_Draw.Add("Draw_Killable", new CheckBox(language.Dictionary[EnumContext.DrawText]));
            M_Draw.AddSeparator(10);
            M_Draw.Add("Draw_Q", new CheckBox(language.Dictionary[EnumContext.DrawQ]));
            M_Draw.AddSeparator(10);
            M_Draw.Add("Draw_W", new CheckBox(language.Dictionary[EnumContext.DrawW]));
            M_Draw.AddSeparator(10);
            M_Draw.Add("Draw_E", new CheckBox(language.Dictionary[EnumContext.DrawE]));

            Game.OnUpdate  += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
        }
Ejemplo n.º 15
0
 public static void UpdateItem(M_Item item)
 {
     D_Item.UpdateItem(item);
 }
Ejemplo n.º 16
0
        public static void Load()
        {
            Chat.Print("<font color = '#cfa9a'>Hosgeldiniz </font><font color = '#ffffff'>[ Nebula ] " + Player.Instance.ChampionName + "</font><font color = '#cfa9a'>. Addon hazir.</font>");

            Menu = MainMenu.AddMenu("[ Nebula ] TwistedFate", "By.Natrium");
            Menu.Add("Language.Select", new ComboBox("Dil", 0, "English", "Turkce"));
            //Menu.AddVisualFrame(new VsFrame("Load_Img", System.Drawing.Color.Purple));

            Controller language;

            switch (Menu["Language.Select"].Cast <ComboBox>().CurrentValue)
            {
            case 0:
                language = new Eng();
                break;

            case 1:
                language = new TR();
                break;

            default:
                language = new Eng();
                break;
            }

            Menu.AddLabel(language.Dictionary[EnumContext.SelectLanguage]);
            Menu.AddSeparator(10);
            Menu.AddLabel(language.Dictionary[EnumContext.Text_1]);
            Menu.AddLabel(language.Dictionary[EnumContext.Text_2]);

            M_Combo = Menu.AddSubMenu(language.Dictionary[EnumContext.Combo]);
            M_Combo.Add("Combo_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Combo.Add("Combo_Q_Stun", new ComboBox(language.Dictionary[EnumContext.ComboQMode], 0, language.Dictionary[EnumContext.ComboQMode0], language.Dictionary[EnumContext.ComboQMode1]));
            M_Combo.Add("Combo_Q_Pre", new Slider(language.Dictionary[EnumContext.QPrediction], 75));
            M_Combo.Add("Combo_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus] + "[ {0}% ]" + language.Dictionary[EnumContext.sMore], 25));
            M_Combo.AddSeparator(10);
            M_Combo.Add("Combo_W", new CheckBox(language.Dictionary[EnumContext.SpellW]));
            M_Combo.Add("Combo_W_Pick", new ComboBox(language.Dictionary[EnumContext.CardMode], 0,
                                                     language.Dictionary[EnumContext.CardMode0], language.Dictionary[EnumContext.CardMode1], language.Dictionary[EnumContext.CardMode2]));
            M_Combo.Add("Combo_W_Red", new Slider(language.Dictionary[EnumContext.EnemyNum0] + "[ {0} }" + language.Dictionary[EnumContext.EnemyNum1], 4, 1, 5));
            M_Combo.Add("Combo_W_Blue", new Slider(language.Dictionary[EnumContext.ManaStatus] + "[ {0}% ]" + language.Dictionary[EnumContext.BlueStatus], 25));

            M_Harras = Menu.AddSubMenu(language.Dictionary[EnumContext.Harass]);
            M_Harras.Add("Harass_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Harras.Add("Harass_Q_Pre", new Slider(language.Dictionary[EnumContext.QPrediction], 75));
            M_Harras.Add("Harass_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus] + "[ {0}% ]" + language.Dictionary[EnumContext.sMore], 30));
            M_Harras.AddSeparator(10);
            M_Harras.Add("Harass_W", new CheckBox(language.Dictionary[EnumContext.SpellW]));
            M_Harras.Add("Harras_W_Pick", new ComboBox(language.Dictionary[EnumContext.CardMode], 0,
                                                       language.Dictionary[EnumContext.CardMode0], language.Dictionary[EnumContext.CardMode1], language.Dictionary[EnumContext.CardMode2])); //스마트 모드 챔치언 주위에 적이 3명이거나 라이너 + 미니언2이상일때 레드카드
            M_Harras.Add("Harras_W_Blue", new Slider(language.Dictionary[EnumContext.ManaStatus] + "[ {0}% ]" + language.Dictionary[EnumContext.BlueStatus], 25));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Clear = Menu.AddSubMenu(language.Dictionary[EnumContext.Clear]);
            M_Clear.AddGroupLabel(language.Dictionary[EnumContext.LaneClear]);
            M_Clear.Add("Lane_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Clear.Add("Lane_Q_Mode", new ComboBox(language.Dictionary[EnumContext.LaneMode], 0,
                                                    language.Dictionary[EnumContext.LaneMode0], language.Dictionary[EnumContext.LaneMode1], language.Dictionary[EnumContext.LaneMode2]));
            M_Clear.Add("Lane_Q_Hit", new Slider(language.Dictionary[EnumContext.MinionsNum] + "[ {0} ]", 2, 0, 5));
            M_Clear.Add("Lane_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus] + "[ {0}% ]" + language.Dictionary[EnumContext.sMore], 45));
            M_Clear.AddSeparator(10);
            M_Clear.Add("Lane_W_Red", new CheckBox("W 레드 사용"));
            M_Clear.Add("Lane_W_RedHit", new Slider(language.Dictionary[EnumContext.MinionsNum] + "[ {0} ]", 3, 0, 5));
            M_Clear.Add("Lane_W_RedKill", new Slider(language.Dictionary[EnumContext.MinionsKNum] + "[ {0} ]", 2, 0, 5));
            M_Clear.Add("Lane_W_Blue", new CheckBox("W 블루 사용"));
            M_Clear.Add("Lane_W_TotalMana", new Slider(language.Dictionary[EnumContext.ManaStatus] + "[ {0}% ]" + language.Dictionary[EnumContext.sLow], 50));
            M_Clear.AddSeparator(20);
            M_Clear.AddGroupLabel(language.Dictionary[EnumContext.JungleClear]);
            M_Clear.Add("Jungle_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Clear.Add("Jungle_Q_Mana", new Slider(language.Dictionary[EnumContext.ManaStatus] + "[ {0}% ]" + language.Dictionary[EnumContext.sMore], 25));
            M_Clear.AddSeparator(10);
            M_Clear.Add("Jungle_W", new CheckBox(language.Dictionary[EnumContext.SpellW]));
            M_Clear.Add("Jungle_W_Pick", new ComboBox(language.Dictionary[EnumContext.CardMode], 0,
                                                      language.Dictionary[EnumContext.CardMode0], language.Dictionary[EnumContext.CardMode1], language.Dictionary[EnumContext.CardMode2]));
            M_Clear.Add("Jungle_W_TotalMana", new Slider(language.Dictionary[EnumContext.ManaStatus] + "[ {0}% ]" + language.Dictionary[EnumContext.BlueStatus], 35));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Item.AddLabel(language.Dictionary[EnumContext.ItemExp]);
            M_Item.Add("Item_BK_Hp", new Slider(language.Dictionary[EnumContext.sBKHp1] + "[ {0}% ]" + language.Dictionary[EnumContext.sBKHp2], 95, 0, 100));
            M_Item.AddSeparator(10);
            M_Item.Add("QSS", new CheckBox(language.Dictionary[EnumContext.sQsilver]));
            M_Item.Add("Scimitar", new CheckBox(language.Dictionary[EnumContext.sScimitar]));
            M_Item.Add("CastDelay", new Slider(language.Dictionary[EnumContext.Delay], 350, 0, 1200));
            M_Item.AddSeparator(10);
            M_Item.AddLabel(language.Dictionary[EnumContext.SpellQ]);
            M_Item.Add("Blind", new CheckBox(language.Dictionary[EnumContext.sBlind]));
            M_Item.Add("Charm", new CheckBox(language.Dictionary[EnumContext.sCharm]));
            M_Item.Add("Fear", new CheckBox(language.Dictionary[EnumContext.sFear]));
            M_Item.Add("Ploymorph", new CheckBox(language.Dictionary[EnumContext.sPolymorph]));
            M_Item.Add("Poisons", new CheckBox(language.Dictionary[EnumContext.sPoisons]));
            M_Item.Add("Silence", new CheckBox(language.Dictionary[EnumContext.sSilence]));
            M_Item.Add("Slow", new CheckBox(language.Dictionary[EnumContext.sSlow]));
            M_Item.Add("Stun", new CheckBox(language.Dictionary[EnumContext.sStun]));
            M_Item.Add("Supression", new CheckBox(language.Dictionary[EnumContext.sSupression]));
            M_Item.Add("Taunt", new CheckBox(language.Dictionary[EnumContext.sTaunt]));
            M_Item.Add("Snare", new CheckBox(language.Dictionary[EnumContext.sSnare]));
            M_Item.AddSeparator(10);
            M_Item.AddLabel(language.Dictionary[EnumContext.sZhonya]);
            M_Item.Add("Item_Zy", new CheckBox(language.Dictionary[EnumContext.sZhonya]));
            M_Item.Add("Item_Zy_BHp", new Slider(language.Dictionary[EnumContext.sZhonyaBHp] + "[ {0}% ]" + language.Dictionary[EnumContext.sLow], 35, 0, 100));
            M_Item.Add("Item_Zy_BDmg", new Slider(language.Dictionary[EnumContext.sZhonyaBDmg] + "[ {0}% ]" + language.Dictionary[EnumContext.sMore], 50, 0, 100));
            M_Item.AddSeparator(10);
            M_Item.Add("Item_Zy_SHp", new Slider(language.Dictionary[EnumContext.sZhonyaSHp] + "[ {0}% ]" + language.Dictionary[EnumContext.sLow], 35, 0, 100));
            M_Item.Add("Item_Zy_SDmg", new Slider(language.Dictionary[EnumContext.sZhonyaSDmg] + "[ {0}% ]" + language.Dictionary[EnumContext.sMore], 50, 0, 100));
            M_Item.AddSeparator(10);
            M_Item.AddLabel(language.Dictionary[EnumContext.sZhonyaR]);
            foreach (var enemyR in EntityManager.Heroes.Enemies)
            {
                M_Item.Add("R_" + enemyR.ChampionName.ToLower(), new CheckBox(enemyR.ChampionName + " [ R ]"));
            }
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Misc = Menu.AddSubMenu(language.Dictionary[EnumContext.Msic]);
            M_Misc.Add("Misc_Ignite", new CheckBox(language.Dictionary[EnumContext.AutoIgnite]));
            M_Misc.Add("Misc_KillSt", new CheckBox(language.Dictionary[EnumContext.KillSteal]));
            M_Misc.Add("Misc_JungSt", new CheckBox(language.Dictionary[EnumContext.JungSteal]));
            M_Misc.Add("Misc_Auto_Q", new CheckBox(language.Dictionary[EnumContext.AutoQ]));
            M_Misc.Add("Misc_Auto_Yel", new CheckBox(language.Dictionary[EnumContext.AutoPickYel]));
            M_Misc.Add("Misc_Delay", new CheckBox(language.Dictionary[EnumContext.PickDelay], false));
            M_Misc.Add("Misc_DisableAA", new CheckBox(language.Dictionary[EnumContext.DisAA]));
            M_Misc.AddSeparator(20);
            M_Misc.AddLabel("Gapcloser");
            M_Misc.Add("Misc_Gap_Q", new CheckBox(language.Dictionary[EnumContext.SpellQ]));
            M_Misc.AddSeparator(20);
            M_Misc.AddLabel("Interrupt");
            M_Misc.Add("Misc_Int_Q", new CheckBox(language.Dictionary[EnumContext.SpellW]));
            M_Misc.Add("Misc_Int_Q_Lv", new ComboBox(language.Dictionary[EnumContext.InterruptLv], 0, language.Dictionary[EnumContext.InterruptLv1], language.Dictionary[EnumContext.InterruptLv2]));
            //===================================================================================================================================================================//
            //===================================================================================================================================================================//
            M_Draw = Menu.AddSubMenu(language.Dictionary[EnumContext.Draw]);
            M_Draw.Add("Draw_Killable", new CheckBox(language.Dictionary[EnumContext.DrawText]));
            M_Draw.AddSeparator(10);
            M_Draw.Add("Draw_Q", new CheckBox(language.Dictionary[EnumContext.DrawQ]));
            M_Draw.AddSeparator(10);
            M_Draw.Add("Draw_W", new CheckBox(language.Dictionary[EnumContext.DrawW]));
            M_Draw.AddSeparator(10);
            M_Draw.Add("Draw_R", new CheckBox(language.Dictionary[EnumContext.DrawR]));

            CheckVersion.CheckUpdate();

            Gapcloser.OnGapcloser            += OnGapcloser;
            Interrupter.OnInterruptableSpell += OnInterruptableSpell;
            Orbwalker.OnPreAttack            += Orbwalker_OnPreAttack;
            Obj_AI_Base.OnProcessSpellCast   += Mode_Item.OnProcessSpellCast;
            Obj_AI_Base.OnBasicAttack        += Mode_Item.OnBasicAttack;
            Game.OnUpdate  += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
        }
Ejemplo n.º 17
0
 public static void DeleteItem(M_Item item)
 {
     D_Item.DeleteItem(item);
 }