Esempio n. 1
0
    private void OnBuyBtn(ButtonScript obj, object args, int param1, int param2)
    {
        COM_ADGiftBag msData = GamePlayer.Instance.miaoshaData_;

        if (msData == null)
        {
            return;
        }
        if (msData.isflag_)
        {
            return;
        }
        int smallChangeId = 0;

        if (msData.price_ == 1)
        {
            GlobalValue.Get(Constant.C_SmallChange1ShopID, out smallChangeId);
            gameHandler.PayProduct(smallChangeId);
        }
        else if (msData.price_ == 3)
        {
            GlobalValue.Get(Constant.C_SmallChange3ShopID, out smallChangeId);
            gameHandler.PayProduct(smallChangeId);
        }
    }
Esempio n. 2
0
    void OnClickTen(ButtonScript obj, object args, int param1, int param2)
    {
        if (BagSystem.instance.BagIsFull())
        {
            return;
        }
        int itemCount = BagSystem.instance.GetBagSize();
        int bagSize   = GamePlayer.Instance.GetIprop(PropertyType.PT_BagNum);
        int num       = bagSize - itemCount;

        if (num < 10)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("beibaokongjianbuzu"));
            return;
        }
        isTen = true;
        isOne = false;
        int cost = 0;

        GlobalValue.Get(Constant.C_ZhuanPanTenGo, out cost);
        if (GamePlayer.Instance.GetIprop(PropertyType.PT_MagicCurrency) < cost)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("shuijingbuzu"));
            return;
        }
        Reset();
        isStart          = true;
        tenBtn.isEnabled = false;
        oneBtn.isEnabled = false;
        NetConnection.Instance.zhuanpanGo(10);
        StartCoroutine(RunLottery());
    }
Esempio n. 3
0
    void OnFinishDownFileEvent(int num)
    {
        if (isChcekFile)
        {
            return;
        }

        LuaMaster.Instance.Init();
        ConfigLoader.Instance.Init();

        float speed = 0f;

        GlobalValue.Get(Constant.C_BattleSpeed, out speed);
        Battle.Instance.reportPlaySpeed_ = speed;

        NetConnection.Instance.OnSocketError += SocketHandler;

        ResetGameConfig();

        switchSceneMask_ = new GameObject("SceneMask");
        UIPanel maskPanel = switchSceneMask_.AddComponent <UIPanel>();

        switchSceneMask_.layer = LayerMask.NameToLayer("UI");
        maskPanel.depth        = 4000;
        maskPanel.sortingOrder = 4000;
        BoxCollider bc = switchSceneMask_.AddComponent <BoxCollider>();

        bc.size = new Vector3(UIWidth, UIHeight, 0f);
        switchSceneMask_.transform.parent     = uiRoot.transform;
        switchSceneMask_.transform.localScale = Vector3.one;
        switchSceneMask_.SetActive(false);
    }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        // UIManager.SetButtonEventHandler(closeB.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0);
        UIManager.SetButtonEventHandler(vip1Btn_.gameObject, EnumButtonEvent.OnClick, OnOpenVip, 1, 0);
        UIManager.SetButtonEventHandler(vip2Btn_.gameObject, EnumButtonEvent.OnClick, OnOpenVip, 2, 0);

        UIManager.SetButtonEventHandler(getBtn1.gameObject, EnumButtonEvent.OnClick, OnGetReward, 1, 0);
        UIManager.SetButtonEventHandler(getBtn2.gameObject, EnumButtonEvent.OnClick, OnGetReward, 2, 0);

        GamePlayer.Instance.OnVipUpdate       += OnUpdateVip;
        GamePlayer.Instance.vipRewardfigEnvet += new RequestEventHandler <bool> (OnrewardEnvet);

        int itemId    = 0;
        int itemCount = 1;

        GlobalValue.Get(Constant.C_Vip1Reward, out itemId);
        GlobalValue.Get(Constant.C_Vip1RewardNum, out itemCount);
        ItemCellUI cell = UIManager.Instance.AddItemCellUI(vip1Icon_, (uint)itemId);

        cell.showTips  = true;
        cell.ItemCount = itemCount;
        GlobalValue.Get(Constant.C_Vip2Reward, out itemId);
        GlobalValue.Get(Constant.C_Vip2RewardNum, out itemCount);
        cell           = UIManager.Instance.AddItemCellUI(vip2Icon_, (uint)itemId);
        cell.showTips  = true;
        cell.ItemCount = itemCount;

        OnUpdateVip();
    }
Esempio n. 5
0
        private void btn_stock_Click(object sender, EventArgs e)
        {
            inifile.WriteString("daterange", "fromdate", this.dateTimePicker1.Value.Date.ToString("yyyy-MM-dd"));
            inifile.WriteString("daterange", "todate", this.dateTimePicker2.Value.Date.ToString("yyyy-MM-dd"));
            List <RunningPolicy> policies = new List <RunningPolicy>();

            for (int i = 0; i < this.grid_stocks.Rows.Count; i++)
            {
                string           code        = this.grid_stocks.Rows[i].Cells[0].Value.ToString().Trim();
                string           name        = this.grid_stocks.Rows[i].Cells[1].Value.ToString().Trim();
                string           market      = this.grid_stocks.Rows[i].Cells[2].Value.ToString();
                SecurityInfo     si          = GlobalValue.GetFutureByCodeAndMarket(code, market);
                string           programname = this.grid_stocks.Rows[i].Cells[5].Value.ToString();
                string           dllname     = programname.Substring(0, programname.Length - 4);
                Assembly         assembly    = ((GridRowTag)this.grid_stocks.Rows[i].Tag).assembly;
                Type             ClassPolicy = assembly.GetType(string.Format("{0}.Policy", dllname));
                Object           o           = ((GridRowTag)this.grid_stocks.Rows[i].Tag).parameter;
                PolicyProperties pp          = new PolicyProperties();
                pp.Account    = string.Empty;
                pp.IsLianDong = false;
                pp.IsSim      = true;
                Object ObjectPolicy = assembly.CreateInstance(ClassPolicy.FullName, true, BindingFlags.CreateInstance, null, new object[] { si, o, pp }, null, null);
                policies.Add((RunningPolicy)ObjectPolicy);
            }

            this.MainForm.AddStock(policies);
            this.Close();
        }
Esempio n. 6
0
        public Policy(SecurityInfo si, Parameter rpp, PolicyProperties pp)
        {
            this.isSim        = pp.IsSim;
            this.SecInfo      = si;
            this.stockAccount = pp.Account;
            this.parameter    = rpp;
            this.policyName   = string.Format("{0}%{1}%{2}%{3}", PName, si.Code, parameter.Bz1, parameter.Bz2);
            this.startDate    = rpp.StartDate;
            this.endDate      = rpp.EndDate;
            this.inteval      = rpp.Inteval;
            this.isReal       = rpp.IsReal;
            this.policyguid   = Guid.NewGuid();

            initialDataReceiver();
            InitialDataProcessor();
            currentDay         = DateTime.MinValue.Date;
            openPoints         = new List <OpenPoint>();
            IsSimulateFinished = false;
            //isOpened = false;
            if (rpp.save)
            {
                SaveParameter(rpp);
            }

            currentTick = new TickData();
            lockObject  = new object();
            this.isLiveDataProcessor = true;
            MomList    = new List <double>();
            MomAbsList = new List <double>();
            DieBars    = new List <DieBar>();
            tps        = new List <TradePoints>();
            lock_tps   = new object();
            eosusdtsi  = GlobalValue.GetFutureByCodeAndMarket(parameter.Bz1, si.Market);
            eosbtcsi   = GlobalValue.GetFutureByCodeAndMarket(parameter.Bz2, si.Market);
        }
Esempio n. 7
0
 void ShowOk(COM_Wish Wish)
 {
     DesLable.text = Wish.wish_;
     GlobalValue.Get(Constant.C_WishShareMoney, out _Money);
     GlobalValue.Get(Constant.C_WishShareExp, out _Exp);
     PopText.Instance.Show(LanguageManager.instance.GetValue("xuyuantishi").Replace("{n}", _Money.ToString()).Replace("{n1}", _Exp.ToString()));
 }
Esempio n. 8
0
    void OnEnable()
    {
        RefreshstrengthenOk       = Refresh;
        RefreshGstrengthenOk      = Refresh;
        RefreshGstrengthenlevelOk = RefreshGstrengthenlevel;
        //Refresh (BabyData.babyReId);

        if (GamePlayer.Instance.babies_list_.Count != 0)
        {
            Refresh(MainbabyProperty.idss[0]);
            if (BabyData.babyReId != 0 && BabyData.intensifyLevel != 0)
            {
                RefreshGstrengthenlevels(BabyData.babyReId, BabyData.intensifyLevel);
            }

            HeadIconLoader.Instance.LoadIcon(ItemData.GetData(itemID()).icon_, icon);
            numLabel.text = BagSystem.instance.GetItemMaxNum((uint)itemID()) + "/" + itemCount().ToString();
        }
        else
        {
            ClearText();
        }
        if (GlobalValue.isBattleScene(StageMgr.Scene_name))
        {
            enterBtn.gameObject.SetActive(false);
        }
    }
Esempio n. 9
0
    private void OnAddFriendFun(ButtonScript obj, object args, int param1, int param2)
    {
        funPane.gameObject.SetActive(false);
        if (_selectFriend == null)
        {
            return;
        }
        if (FriendSystem.Instance().GetFriend(_selectFriend.instId_) != null)
        {
            MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("alreadyhave"), null, true);
            return;
        }

        int fMax = 0;

        GlobalValue.Get(Constant.C_FriendMax, out fMax);
        if (FriendSystem.Instance().friends_.Count >= fMax)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax"));
            return;
        }
        MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("addfriend").Replace("{n}", _selectFriend.name_), () => {
            NetConnection.Instance.addFriend(_selectFriend.instId_);
        });
    }
Esempio n. 10
0
    private void OnClicktanheBtn(ButtonScript obj, object args, int param1, int param2)
    {
        int OffineTimeMax = 0;
        int itemid        = 0;

        GlobalValue.Get(Constant.C_FamilyLeaderOffineTimeMax, out OffineTimeMax);
        GlobalValue.Get(Constant.C_FamilyLoseLeaderItem, out itemid);
        uint offlineTime = GuildSystem.GetPremier().offlineTime_;

        if (GetTime(offlineTime) > OffineTimeMax)
        {
            ItemData idata = ItemData.GetData(itemid);
            if (BagSystem.instance.GetItemCount((uint)itemid) == 0)
            {
                PopText.Instance.Show(LanguageManager.instance.GetValue("shangchenggoumai").Replace("{n}", idata.name_));
            }
            else
            {
                MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("tanhezuzhang"), () => {
                    NetConnection.Instance.familyLoseLeader();
                });
            }
        }
        else
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("tanhecuowu"));
        }
    }
Esempio n. 11
0
    private void OnenterBtn(ButtonScript obj, object args, int param1, int param2)
    {
        if (GlobalValue.isBattleScene(StageMgr.Scene_name))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("zhanoougoumai"), PopText.WarningType.WT_Warning, true);
        }
        else
        {
            if (GamePlayer.Instance.isFund_)
            {
                PopText.Instance.Show(LanguageManager.instance.GetValue("yijinggoumaiguo"));
                return;
            }
            int growFund = 0;
            GlobalValue.Get(Constant.C_GrowFundShopID, out growFund);
            gameHandler.PayProduct(growFund);
            //StoreUI.SwithShowMe(2);
        }


//		MessageBoxUI.ShowMe (LanguageManager.instance.GetValue("querengoumaishuijing"), () => {
//			if(GamePlayer.Instance.GetIprop(PropertyType.PT_MagicCurrency)<openFund)
//			{
//                MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("notEnoughMagicCurrency"), delegate
//                {
//                    StoreUI.SwithShowMe(1);
//                });
//				return ;
//			}
//			NetConnection.Instance.buyFund (0);
//		});
    }
Esempio n. 12
0
    void Start()
    {
        UIManager.SetButtonEventHandler(juanXBtn.gameObject, EnumButtonEvent.OnClick, buttonClick, 0, 0);
        UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, onClickClose, 0, 0);
        UIManager.SetButtonEventHandler(duihuanBtn.gameObject, EnumButtonEvent.OnClick, onClickduihua, 0, 0);
        UIManager.SetButtonEventHandler(leftBtn.gameObject, EnumButtonEvent.OnClick, onClickLeft, 0, 0);
        UIManager.SetButtonEventHandler(rightBtn.gameObject, EnumButtonEvent.OnClick, onClickRight, 0, 0);
        UIManager.SetButtonEventHandler(tipsCloseBtn.gameObject, EnumButtonEvent.OnClick, onClicktipsCloseBtn, 0, 0);
        maxMoney         = GamePlayer.Instance.GetIprop(PropertyType.PT_Money);
        moneyinput.value = "0";
        FamilyData fa = FamilyData.GetData((int)GuildBuildingType.GBT_Bank, (int)GuildSystem.Mguild.buildings_[((int)GuildBuildingType.GBT_Bank) - 1].level_);

        fads                     = fa;
        levelLable.text          = GuildSystem.Mguild.buildings_[((int)GuildBuildingType.GBT_Bank) - 1].level_.ToString();
        maxFamilyMoneyLable.text = fa.number_.ToString();
        levelSp.spriteName       = GuildSystem.Mguild.buildings_[((int)GuildBuildingType.GBT_Bank) - 1].level_.ToString();
        GlobalValue.Get(Constant.C_FamilyOneDayFundzLose, out weihu);
        weihuLable.text                        = (GuildSystem.Mguild.buildings_[((int)GuildBuildingType.GBT_Main) - 1].level_ * weihu).ToString();
        curFamilyMoneyLable.text               = GuildSystem.Mguild.fundz_.ToString();
        GuildSystem.InitGuildDataOk           += UpdateGuild;
        GameManager.Instance.UpdatePlayermake += UpdatePlayerMoneyOk;
        UpdateGuild(GuildSystem.Mguild);
        GuildSystem.updateGuildfndzOk  += updatefndz;
        GuildSystem.UpdateGuildLevelok += updateguildLevel;
    }
Esempio n. 13
0
 public static bool SceneLoadedFinish()
 {
     if (wait4LoadQue_.Count > 0)
     {
         WaitLoadInfo wli = wait4LoadQue_.Dequeue();
         LoadingAsyncScene(wli.name_, wli.type_, wli.withUI_, wli.withDynRes_, wli.manualClose_, wli.resetLocker_);
         if (GlobalValue.isBattleScene(wli.name_))
         {
             return(true);
         }
     }
     else if (GameManager.Instance.nextBattle_ != null)
     {
         Battle.Instance.ComboBattle();
         GameManager.Instance.nextBattle_ = null;
         return(true);
     }
     else// if (!GamePlayer.Instance.isInBattle)
     {
         if (Prebattle.Instance.ExcuteNextScene() == false)
         {
             if (Scene_name.Equals(GlobalValue.StageName_piantoudonghuaf) || Scene_name.Equals("Village01"))
             {
                 ApplicationEntry.Instance.PlaceCinema();
             }
         }
     }
     return(false);
 }
        public ActionResult ApproveRecord(string RECEIPT_ID, Remit_ReceiptRepo ReceiptRepo)
        {
            try
            {
                if (RECEIPT_ID == string.Empty)
                {
                    X.Msg.Show(new MessageBoxConfig
                    {
                        Title   = "Error",
                        Message = "Sorry! No 'Receipt' has been selected for approval.",
                        Buttons = MessageBox.Button.OK,
                        Icon    = MessageBox.Icon.ERROR,
                        Width   = 350
                    });
                    return(this.Direct());
                }
                GlobalValue.Get_Scheme_Today_Date(ReceiptRepo.Scheme_Id);

                if (ReceiptRepo.ApproveReceiptRecord(RECEIPT_ID, ReceiptRepo))
                {
                    X.Msg.Show(new MessageBoxConfig
                    {
                        Title   = "Success",
                        Message = "Receipt Successfully Approved.",
                        Buttons = MessageBox.Button.OK,
                        Icon    = MessageBox.Icon.INFO,
                        Width   = 350
                    });
                    ClearControls_Approve();
                    Store store = X.GetCmp <Store>("receiptStore");
                    store.Reload();

                    return(this.Direct());
                }
                else
                {
                    X.Msg.Show(new MessageBoxConfig
                    {
                        Title   = "Error",
                        Message = "Operation  failed.",
                        Buttons = MessageBox.Button.OK,
                        Icon    = MessageBox.Icon.ERROR,
                        Width   = 350
                    });
                    return(this.Direct());
                }
            }
            catch (Exception ex)
            {
                X.Msg.Show(new MessageBoxConfig
                {
                    Title   = "Error",
                    Message = "Error in approving payment. process aborted. Contact system admin.",
                    Buttons = MessageBox.Button.OK,
                    Icon    = MessageBox.Icon.ERROR,
                    Width   = 350
                });
                return(this.Direct());
            }
        }
Esempio n. 15
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     GlobalValue.InitialValue();
     Application.Run(new TranslateUnit());
 }
Esempio n. 16
0
    void OnClickBegin(ButtonScript obj, object args, int param1, int param2)
    {
        int max = 0;

        GlobalValue.Get(Constant.C_LearnSkillMaxNum, out max);
        int level = prof.getSkilMaxLevel(skData_._Id);

        if (level == 0)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("learnSkillJobNotMatch"));
            return;
        }
        else if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < skData_._LearnLv)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("skillLevel").Replace("{n}", skData_._LearnLv.ToString()));
            return;
        }
        else
        if (GamePlayer.Instance.Properties[(int)PropertyType.PT_Money] < skData_._LearnCoin)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("EN_MoneyLess"));
            return;
        }
        else if (IsAlreadyLearnedSkills(SkpData._Id))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("learnSkillReplice"));
            return;
        }
        else if (skData_._LearnQuestID != 0 && !QuestSystem.IsComplate(skData_._LearnQuestID))
        {
            QuestData qd = QuestData.GetData(skData_._LearnQuestID);
            if (qd != null)
            {
                if (QuestSystem.IsComplate(qd.id_))
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("YouHadQuest"));
                    return;
                }
                else if (QuestSystem.IsQuestDoing(qd.id_))
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("YouHadComplateQuest"));
                    return;
                }
                string msg = LanguageManager.instance.GetValue("YouNeedDoThisQuest") +
                             StringTool.MakeNGUIStringInfoFmt(skData_._LearnQuestID.ToString(), qd.questName_);
                MessageBoxUI.ShowMe(msg, null, true, null, __TryGotoQuestNpc);
            }

            //PopText.Instance.Show("任务没有完成");
        }
        else if (GetLearaSkillNum() >= max)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("EN_SkillSoltFull"));
            return;
        }
        else
        {
            MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("learSkill"), __NormalLearnSkill);
        }
    }
Esempio n. 17
0
    /// <summary>
    /// ²É¼¯°´Å¥°´ÏÂ
    /// </summary>
    public void OnOneBtn(ButtonScript obj, object args, int param1, int param2)
    {
        GatherData gd      = GatherData.GetGather(_GatherId);
        COM_Gather gatherD = GatherSystem.instance.GetOpenGather(_GatherId);
        int        maxNum  = 0;

        GlobalValue.Get(Constant.C_GatherNumMax, out maxNum);
        if (gatherD != null)
        {
            if (gatherD.num_ >= maxNum)
            {
                PopText.Instance.Show(LanguageManager.instance.GetValue("EN_GatherTimesLess"));
                return;
            }
        }

        //if(BagSystem.instance.BagIsFull())
        //{
        //	PopText.Instance.Show(LanguageManager.instance.GetValue("bagfull"));
        //	return;
        //}
        if (_GatherId == 0)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("qingxuanzhecaiji"));
            return;
        }
        //GatherData gd = GatherData.GetGather(_GatherId);
        GatherSystem.instance.Gather(_GatherId, 1);
    }
Esempio n. 18
0
        private void Update()
        {
            if (GlobalValue.GetCurrentGamePhase() == ENUM_GamePhase.Play)
            {
                GetWeaponRotation();
                if (Input.GetMouseButtonDown(0))
                {
                    //播放动画
                    m_WeaponAni.SetTrigger("Attack");
                    //产生子弹
                    CreateButtel();
                    //播放音效
                    m_Audio.Play();
                }

                //武器跟随鼠标旋转
                if (m_WeaponRotation < -90 || m_WeaponRotation > 90)
                {
                    this.transform.rotation = Quaternion.Euler(0, 180, 180 - m_WeaponRotation);
                }
                else
                {
                    this.transform.rotation = Quaternion.Euler(0, 0, m_WeaponRotation);
                }
            }
        }
Esempio n. 19
0
    void OnClickJHY(ButtonScript obj, object args, int param1, int param2)
    {
        if (!GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Friend))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("haoyouWeikai"));
        }
        else
        if (!(((PlayerInst.openSubSystemFlag_) & (0x1 << (int)OpenSubSystemFlag.OSSF_Friend)) != 0))
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("Duifanghaoyou"));
        }
        else
        {
            if (FriendSystem.Instance().IsmyFriend((int)PlayerInst.instId_))
            {
                PopText.Instance.Show(LanguageManager.instance.GetValue("alreadyhave"));
            }
            else
            {
                int fMax = 0;
                GlobalValue.Get(Constant.C_FriendMax, out fMax);
                if (FriendSystem.Instance().friends_.Count >= fMax)
                {
                    PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax"));
                    return;
                }
                NetConnection.Instance.addFriend((uint)PlayerInst.instId_);
            }

            gameObject.SetActive(false);
        }
    }
Esempio n. 20
0
    void UpdateRight()
    {
        UIASSETS_ID uiId = GlobalValue.GetMoreActivityID(crtType_);

        if (uiId != (UIASSETS_ID)0)
        {
            loadingSub_ = true;
            UIAssetMgr.LoadUI(uiId, (AssetBundle Asset, ParamData Param) =>
            {
                if (rightContent_ == null)
                {
                    UIAssetMgr.DeleteAsset(uiId, true);
                    return;
                }

                GameObject subUi = (GameObject)GameObject.Instantiate(Asset.mainAsset) as GameObject;
                Asset.Unload(false);
                subUi.transform.parent        = rightContent_;
                subUi.transform.localScale    = Vector3.one;
                subUi.transform.localPosition = Vector3.zero;
                UIManager.Instance.AdjustUIDepth(subUi.transform, false);
                loadingSub_ = false;
            }, null);
        }
    }
Esempio n. 21
0
    void Start()
    {
        InitUIText();
//		RefreshstrengthenOk = Refresh;
//		RefreshGstrengthenOk = Refresh;
//		RefreshGstrengthenlevelOk = RefreshGstrengthenlevel;

        if (GamePlayer.Instance.babies_list_.Count != 0)
        {
            Refresh(MainbabyProperty.idss[0]);
            HeadIconLoader.Instance.LoadIcon(ItemData.GetData(itemID()).icon_, icon);
            numLabel.text = BagSystem.instance.GetItemMaxNum((uint)itemID()) + "/" + itemCount().ToString();
        }
        else
        {
            ClearText();
        }

        BagSystem.instance.DelItemInstEvent += updateUI;
        UIManager.SetButtonEventHandler(enterBtn.gameObject, EnumButtonEvent.OnClick, OnClickbtn, 0, 0);
        if (GlobalValue.isBattleScene(StageMgr.Scene_name))
        {
            enterBtn.gameObject.SetActive(false);
        }
    }
Esempio n. 22
0
        public bool GetLoginUser(sec_UserRepo userrepo)
        {
            try
            {
                var    param         = new DynamicParameters();
                string security_Code = "[email protected]";
                userrepo.Password = GlobalValue.AES_Encrypt(userrepo.Password, security_Code);

                param.Add("P_USER_ID", userrepo.User_Id, DbType.String, ParameterDirection.Input);
                param.Add("P_PASSWORD", userrepo.Password, DbType.String, ParameterDirection.Input);
                param.Add("VDATA", null, DbType.Int32, ParameterDirection.Output);
                db.GetConnection().Execute("LOGIN_PROCEDURES.SEL_LOGIN_USER", param, commandType: CommandType.StoredProcedure);
                int paramoption = param.Get <int>("VDATA");
                if (paramoption <= 0)
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 23
0
    private void OnAddFriendList(ButtonScript obj, COM_ContactInfo info)
    {
        if (info == null)
        {
            return;
        }
        if (FriendSystem.Instance().GetFriend(info.instId_) != null)
        {
            MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("alreadyhave"), null, true);
            return;
        }
        if (FriendSystem.Instance().friends_.Count >= 100)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax"));
            return;
        }
        int fMax = 0;

        GlobalValue.Get(Constant.C_FriendMax, out fMax);
        if (FriendSystem.Instance().friends_.Count >= fMax)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax"));
            return;
        }
        MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("addfriend").Replace("{n}", info.name_), () => {
            NetConnection.Instance.addFriend(info.instId_);
        });
    }
Esempio n. 24
0
 public Policy(SecurityInfo si, Parameter rpp, PolicyProperties pp)
 {
     this.isSim        = pp.IsSim;
     this.SecInfo      = si;
     this.stockAccount = pp.Account;
     this.parameter    = rpp;
     this.policyName   = PName;
     this.startDate    = rpp.StartDate;
     this.endDate      = rpp.EndDate;
     this.inteval      = rpp.Inteval;
     this.isReal       = rpp.IsReal;
     this.policyguid   = Guid.NewGuid();
     initialDataReceiver();
     InitialDataProcessor();
     currentDay         = DateTime.Now;
     openPoints         = new List <OpenPoint>();
     IsSimulateFinished = false;
     //isOpened = false;
     if (rpp.save)
     {
         SaveParameter(rpp);
     }
     currentTick = new TickData();
     this.isLiveDataProcessor = true;
     tps        = new ConcurrentDictionary <Guid, TradePoints>();
     SecondSi   = GlobalValue.GetFutureByCodeAndMarket(parameter.SecondCode, parameter.SecondMarket);
     SecondTick = new TickData();
 }
Esempio n. 25
0
 void Start()
 {
     item.SetActive(false);
     //GuildSystem.updateGuildShopOk += UpdateGuildShopOK;
     gongxianLable.text = GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId).contribution_.ToString();
     GlobalValue.Get(Constant.C_FamilyShopConsume, out xiaohao);
     xiaohaoLable.text = xiaohao.ToString();
     UIManager.SetButtonEventHandler(shuaxinBtn.gameObject, EnumButtonEvent.OnClick, onClickRef, 0, 0);
     COM_GuildShopItem [] shopitem = GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId).shopItems_;
     refXiaohao        = Mathf.Pow(2, GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId).shopRefreshTimes_) * xiaohao;
     xiaohaoLable.text = refXiaohao.ToString();
     if (IsRefShopCountDown(GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId)))
     {
         shuaxinBtn.isEnabled = false;
     }
     UpdateGuildShop(shopitem);
     if (isShowMe)
     {
         CloseBtn.gameObject.SetActive(true);
         UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, onClickClose, 0, 0);
         back.gameObject.SetActive(true);
     }
     else
     {
         CloseBtn.gameObject.SetActive(false);
         back.gameObject.SetActive(false);
     }
     updateRefGuildShopCount(GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId));
 }
Esempio n. 26
0
 static public void teamCallMemberBack()
 {
     for (int i = 0; i < _MyTeamInfo.members_.Length; i++)
     {
         if (_MyTeamInfo.members_[i].instId_ != GamePlayer.Instance.InstId)
         {
             continue;
         }
         if (!_MyTeamInfo.members_[i].isBattle_)
         {
             if (!GlobalValue.isBattleScene(StageMgr.Scene_name))
             {
                 MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("zhaohuan"), () => {
                     NetConnection.Instance.backTeam();
                     Prebattle.Instance.ChangeWalkEff(Prebattle.WalkState.WS_Normal);
                 }, false, () => {
                     NetConnection.Instance.refuseBackTeam();
                 });
             }
             else
             {
                 isBattleOpen = true;
             }
         }
         else
         {
             isBattleOpen = true;
         }
     }
 }
Esempio n. 27
0
    void InitUI()
    {
        if (!SignUpManager.Instance.isEmpty())
        {
            GameObject iconBg = null;
            HookKeeper hk     = null;
            ItemData   data   = null;
            ItemCellUI icon   = null;
            for (int i = 1; i < SignUpManager.Instance.MaxCount; ++i)
            {
                iconBg = (GameObject)GameObject.Instantiate(IconBg_) as GameObject;
                iconBg.transform.parent     = ListView_.transform;
                iconBg.transform.localScale = Vector3.one;
                iconBg.SetActive(true);
                data                    = ItemData.GetData(SignUpManager.Instance.GetRewardIDByIndex(i));
                hk                      = iconBg.GetComponent <HookKeeper>();
                icon                    = UIManager.Instance.AddItemCellUI(hk.icon_, (uint)data.id_, 0f, 20f);
                icon.showTips           = true;
                iconBg.transform.parent = Grid_.transform;
            }
            Grid_.Reposition();
        }

        ComboSignUpMonth_.text = System.DateTime.Today.Month.ToString();
        GlobalValue.Get(Constant.C_SignPay, out mendCost_);
        MendSignUpCost_.text = mendCost_.ToString();
    }
Esempio n. 28
0
 public static void InitMySelling(COM_SellItem[] items)
 {
     Open_           = true;
     mySellingList_  = new List <COM_SellItem>(items);
     collectionList_ = new List <string>(LoadCollection());
     GlobalValue.Get(Constant.C_AucGoodProtect, out GoodProtectDay);
 }
Esempio n. 29
0
    void HitHim(int idx)
    {
        if (members_[idx].ControlEntity == null)
        {
            ApplicationEntry.Instance.PostSocketErr(57557);
            return;
        }
        simpleHitCount++;
        AttaclPanel.Instance.togetherHitCrl_.SetNum(simpleHitCount);
        SkillData skill           = SkillData.GetMinxiLevelData(GlobalValue.GetAttackID(members_[idx].GetWeaponType()));
        bool      playSkillEffect = aim_.ControlEntity.PlaySkillBeattackEffect(skill._Id);

        if (playSkillEffect)
        {
            EffectAPI.Play((EFFECT_ID)skill._Beattack_effectID, aim_.ControlEntity.ActorObj);
        }
        else
        {
            int effId = aim_.ControlEntity.GetStateBeattackEffectID(skill._Id);
            EffectAPI.Play((EFFECT_ID)effId, aim_.ControlEntity.ActorObj);
        }

        int change = (int)props_[memberCount_].prop_.value_ - CurrentHp_;

        CurrentHp_ += change;
        aim_.ControlEntity.hitOver_ = props_[memberCount_].fly_;

        int[]  typs = aim_.ControlEntity.StateTypes;
        int    rtst = 0;
        string err  = "";

        GameScript.Call(ScriptGameEvent.SGE_TogetherState, new object[] { typs }, new object[] { rtst }, ref err);

        TogetherStateType tst = (TogetherStateType)rtst;//GameScript.TogetherStateEvent (ScriptGameEvent.SGE_TogetherState, aim_.ControlEntity.StateTypes);

        if (tst == TogetherStateType.TST_Self)
        {
            skipIdx = memberCount_;
            aim_.ControlEntity.PopValueChange(change, PropertyType.PT_HpCurr, aim_.battlePlayer.hpMax_, aim_.battlePlayer.mpMax_);
            includeChange += change;
        }
        else if (tst == TogetherStateType.TST_Enemy)
        {
            members_[memberCount_].ControlEntity.PopValueChange(change, PropertyType.PT_HpCurr, aim_.battlePlayer.hpMax_, aim_.battlePlayer.mpMax_);
        }

        bool hasAInvalid = hasActionInvalid();

        if (idx != members_.Length - 1)
        {
            aim_.ControlEntity.Beattack_1(skill._Id, skill._Level, !hasAInvalid, false, false, members_[memberCount_]);
        }
        else
        {
            aim_.ControlEntity.Beattack_1(skill._Id, skill._Level, !hasAInvalid, CurrentHp_ <= 0, false, members_[memberCount_]);
        }
        aim_.ControlEntity.LookAt(members_[memberCount_].ControlEntity.ActorObj);
        aim_.ControlEntity.UpdateStateTick(true);
    }
Esempio n. 30
0
 void OnEnable()
 {
     MainbabyReform();
     if (GlobalValue.isBattleScene(StageMgr.Scene_name))
     {
         enterBtn.gameObject.SetActive(false);
     }
 }