private void OnUpgradeEvent_checkingDelegation(OnUpdateEvenArgs e)
 {
     if (OnUpgrade_Event != null)
         OnUpgrade_Event(this, e);
 }
 private void Handle_OnUpgrade_Event(object sender, OnUpdateEvenArgs e)
 {
     this.BuyingUpgradeComplete(e);
     this.UnActiveComfirmationWindow();
 }
 internal void UnActiveComfirmationWindow()
 {
     confirmationWindow.SetActiveRecursively(false);
     currentOnUpdateTarget = null;
 }
    void BuyingUpgradeComplete(OnUpdateEvenArgs e)
    {
        if (currentPageIndex == 0)
            Mz_StorageManage.AccountBalance -= firstPage_prices[e.I, e.J];
        else if (currentPageIndex == 1)
            Mz_StorageManage.AccountBalance -= secondPage_prices[e.I, e.J];
        else if (currentPageIndex == 2)
            Mz_StorageManage.AccountBalance -= thirdPage_prices[e.I, e.J];

        //<@-- Additional parameter use for the item who special than other.
        //        if (e.AdditionalParams != string.Empty)
        //        {
        //            switch (e.AdditionalParams)
        //            {
        //                default:
        //                    break;
        //            }
        //        }

        upgradeButton_Sprites[e.I, e.J].spriteId = UnActiveUpgradeButtonID;
        SushiShop.NumberOfCansellItem.Add(e.Item_id);
        SushiShop.NewItem_IDs.Add (e.Item_id);

        sceneController.ManageAvailabelMoneyBillBoard();
        sceneController.gameEffectManager.Create2DSpriteAnimationEffect(GameEffectManager.BLOOMSTAR_EFFECT_PATH, upgradeButton_Objs[e.I, e.J].transform);
        sceneController.audioEffect.PlayOnecWithOutStop(sceneController.audioEffect.longBring_clip);

        CalculateObjectsToDisplay();
    }
    internal void BuyingUpgradeMechanism(string upgradeName)
    {
        if(currentPageIndex == 0)
        {
            #region <!-- page 0, low 0.

            if(upgradeName == "upgrade_00")
            {
                #region <@-- "buying : Eel_sushi".

                if (Mz_StorageManage.AccountBalance >= firstPage_prices[0,0])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(eel_sushi_id) == false) {
                        Debug.Log("buying : Eel_sushi");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 0, Item_id = eel_sushi_id, };
                        this.ActiveComfirmationWindow();

                        //<@-- Handle buying upgrade tutor.
                        if (MainMenu._HasNewGameEvent) {
                            sceneController.SetActivateTotorObject(false);
                        }
                    }
                    else{
                        this.PlaySoundWarning();
                    }
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_01")
            {
                #region <@-- "buying : Fatty_tuna_sushi"

                if (Mz_StorageManage.AccountBalance >= firstPage_prices[0,1])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(fattyTuna_sushi_id) == false) {
                        Debug.Log("buying : Fatty_tuna_sushi");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 1, Item_id = fattyTuna_sushi_id, };
                        this.ActiveComfirmationWindow();
                    }
                    else{
                        this.PlaySoundWarning();
                    }
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_02")
            {
                #region <@-- buying : Octopus_sushi.

                if (Mz_StorageManage.AccountBalance >= firstPage_prices[0,2])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(octopus_sushi_id) == false) {
                        Debug.Log("buying : Octopus_sushi");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 2, Item_id = octopus_sushi_id, };
                        this.ActiveComfirmationWindow();
                    }
                    else{
                        this.PlaySoundWarning();
                    }
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_03")
            {
                #region <@-- "buying : Prawn_sushi".

                if (Mz_StorageManage.AccountBalance >= firstPage_prices[0, 3])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(prawn_sushi_id) == false) {
                        Debug.Log("buying : Prawn_sushi");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 3, Item_id = prawn_sushi_id, };
                        this.ActiveComfirmationWindow();
                    }
                    else{
                        this.PlaySoundWarning();
                    }
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }

            #endregion

            #region <!-- page 0, Low 1.

            else if(upgradeName == "upgrade_10")
            {
                #region <@-- "buying : Salmon_sushi".

                if (Mz_StorageManage.AccountBalance >= firstPage_prices[1, 0]) {
                    if(SushiShop.NumberOfCansellItem.Contains(salmon_sushi_id) == false) {
                        Debug.Log("buying : Salmon_sushi");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 0, Item_id = salmon_sushi_id, };
                        this.ActiveComfirmationWindow();
                    }
                    else{
                        this.PlaySoundWarning();
                    }
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_11")
            {
                #region <@-- "buying : Skipjack_tuna_sushi".

                if(Mz_StorageManage.AccountBalance >= firstPage_prices[1, 1])
                {
                    if (SushiShop.NumberOfCansellItem.Contains(skipjackTuna_sushi_id) == false)
                    {
                        Debug.Log("buying : Skipjack_tuna_sushi");
                        this.currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 1, Item_id = skipjackTuna_sushi_id, };
                        this.ActiveComfirmationWindow();
                    }
                    else{
                        this.PlaySoundWarning();
                    }
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_12")
            {
                #region <@-- "buying : Spicy_shell_sushi".

                if(Mz_StorageManage.AccountBalance >= firstPage_prices[1, 2])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(spicyShell_sushi_id) == false) {
                        Debug.Log("buying : Spicy_shell_sushi");
                        this.currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 2, Item_id = spicyShell_sushi_id };
                        this.ActiveComfirmationWindow();
                    }
                    else {
                        this.PlaySoundWarning();
                    }
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_13")
            {
                #region <@-- "buying : Sweetened_egg_sushi".

                if(Mz_StorageManage.AccountBalance >= firstPage_prices[1, 3])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(sweetenedEgg_sushi_id) == false) {
                        Debug.Log("buying : Sweetened_egg_sushi");
                        this.currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 3, Item_id = sweetenedEgg_sushi_id };
                        this.ActiveComfirmationWindow();
                    }
                    else {
                        this.PlaySoundWarning();
                    }
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }

            #endregion
        }
        else if(currentPageIndex == 1)
        {
            #region <!-- Page 1 low 0.

            if(upgradeName == "upgrade_00")
            {
                #region <@-- "buying : Roe_maki".

                if(Mz_StorageManage.AccountBalance >= secondPage_prices[0,0])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(roe_maki_id) == false) {
                        Debug.Log("buying : Roe_maki");
                        this.currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 0, Item_id = roe_maki_id };
                        this.ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_01")
            {
                #region <@-- "buying : Prawn_brown_maki".

                if(Mz_StorageManage.AccountBalance >= secondPage_prices[0,1])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(flyingFishRoe_maki_id) == false) {
                        Debug.Log("buying : Prawn_brown_maki");
                        this.currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 1, Item_id = flyingFishRoe_maki_id };
                        this.ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_02")
            {
                #region <@-- "buying : Pickling_cucumber_filled_maki".

                if(Mz_StorageManage.AccountBalance >= secondPage_prices[0,2])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(PicklesFilled_maki_id) == false) {
                        Debug.Log("buying : Pickling_cucumber_filled_maki");
                        this.currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 2, Item_id = PicklesFilled_maki_id };
                        this.ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_03")
            {
                #region <@-- "buying : Ramen".

                if (Mz_StorageManage.AccountBalance >= secondPage_prices[0, 3])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(ramen_id) == false) {
                        Debug.Log("buying : Ramen");
                        this.currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 3, Item_id = ramen_id };
                        this.ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else
                {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }

            #endregion

            #region <!-- page1 low 1.

            if(upgradeName == "upgrade_10")
            {
                #region <@-- "buying : Zaru_soba".

                if(Mz_StorageManage.AccountBalance >= secondPage_prices[1,0])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(zaru_soba_id) == false) {
                        Debug.Log("buying : Zaru_soba");
                        this.currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 0, Item_id = zaru_soba_id };
                        this.ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_11")
            {
                #region <@-- "buying : Yaki_soba".

                if(Mz_StorageManage.AccountBalance >= secondPage_prices[1,1])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(yaki_soba_id) == false) {
                        Debug.Log("buying : Yaki_soba");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 1, Item_id = yaki_soba_id };
                        ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_12")
            {
                #region <@-- "buying : Tempura".

                if(Mz_StorageManage.AccountBalance >= secondPage_prices[1,2])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(tempura_id) == false) {
                        Debug.Log("buying : Tempura");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 2, Item_id = tempura_id };
                        ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_13")
            {
                #region <@-- "buying : Curry_with_rice".

                if(Mz_StorageManage.AccountBalance >= secondPage_prices[1,3])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(curry_with_rice_id) == false) {
                        Debug.Log("buying : Curry_with_rice");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 3, Item_id = curry_with_rice_id };
                        ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }

            #endregion
        }
        else if(currentPageIndex == 2)
        {
            #region <!-- page2 low 0.

            if(upgradeName == "upgrade_00")
            {
                #region <@-- "buying : Miso_soup".

                if(Mz_StorageManage.AccountBalance >= thirdPage_prices[0,0]) {
                    if(SushiShop.NumberOfCansellItem.Contains(miso_soup_id) == false) {
                        Debug.Log("buying : Miso_soup");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 0, Item_id = miso_soup_id };
                        ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_01")
            {
                #region <@-- "buying : Kimji".

                if(Mz_StorageManage.AccountBalance >= thirdPage_prices[0,1]) {
                    if(SushiShop.NumberOfCansellItem.Contains(kimji_id) == false) {
                        Debug.Log("buying : Kimji");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 1, Item_id = kimji_id };
                        ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_02")
            {
                #region <@-- "buying : Bean_ice_jam_on_crunching".

                if(Mz_StorageManage.AccountBalance >= thirdPage_prices[0,2]) {
                    if(SushiShop.NumberOfCansellItem.Contains(Bean_ice_jam_on_crunching_id) == false) {
                        Debug.Log("buying : Bean_ice_jam_on_crunching");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 2, Item_id = Bean_ice_jam_on_crunching_id };
                        ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }
            else if(upgradeName == "upgrade_03")
            {
                #region <@-- "buying : GreenTea_icecream".

                if(Mz_StorageManage.AccountBalance >= thirdPage_prices[0,3])
                {
                    if(SushiShop.NumberOfCansellItem.Contains(GreenTea_icecream_id) == false)  {
                        Debug.Log("buying : GreenTea_icecream");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 0, J = 3, Item_id = GreenTea_icecream_id };
                        ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    this.PLayWarningCannotBuyItem();
                }

                #endregion
            }

            #endregion

            #region <!-- page2 low 1.
        /*
            if(upgradeName == "upgrade_10")
            {
                #region <@-- "buying : butter_cookie".

                if(Mz_StorageManage.AccountBalance >= thirdPage_prices[1,0]) {
                    int id = (int)GoodDataStore.FoodMenuList.Butter_cookie;
                    if(BakeryShop.NumberOfCansellItem.Contains(id) == false) {
                        Debug.Log("buying : butter_cookie");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 0, Item_id = id };
                        ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    sceneController.audioEffect.PlayOnecWithOutStop(sceneController.audioEffect.wrong_Clip);
                }

                #endregion
            }
            else if(upgradeName == "upgrade_11")
            {
                #region <@-- "buying : hotdog_cheese".

                if(Mz_StorageManage.AccountBalance >= thirdPage_prices[1,1])
                {
                    int id = (int)GoodDataStore.FoodMenuList.HotdogWithCheese;
                    if(BakeryShop.NumberOfCansellItem.Contains(id) == false) {
                        Debug.Log("buying : hotdog_cheese");
                        currentOnUpdateTarget = new OnUpdateEvenArgs() { I = 1, J = 1, Item_id = id };
                        ActiveComfirmationWindow();
                    }
                    else
                        PlaySoundWarning();
                }
                else {
                    sceneController.audioEffect.PlayOnecWithOutStop(sceneController.audioEffect.wrong_Clip);
                }

                #endregion
            }
        */
            #endregion
        }
    }