Esempio n. 1
0
        public void UpdateUI()
        {
            List <Profile> currentProfiles = Controller.GetAllProfiles();

            if (ProfileList.GetListContent().Count != currentProfiles.Count)
            {
                var profiles = ProfileList.GetListContent();
                foreach (var p in profiles)
                {
                    ProfileList.RemoveItem(p);
                }
                foreach (var profile in currentProfiles)
                {
                    ProfileList.AddItem(Items.GetListItem(profile.Name));
                }
            }

            ProfileList.SetCurrentIndex(
                Controller.GetAllProfiles().Select(p => p.Name).ToList().IndexOf(Controller.GetProfile().Name));

            Title.SetText(Controller.GetLanguage()["MainTitle"]);
            BtnStatus.SetText(Controller.GetLanguage()["BatteryButton"]);
            BtnSettings.SetText(Controller.GetLanguage()["SettingsButton"]);

            UpdateUIStartButton();
        }
Esempio n. 2
0
 public void DisableBtn(string btn)
 {
     if (btn == "count")
     {
         Count.BeginInvoke(
             new Action(() =>
         {
             Count.Enabled = false;
         }
                        ));
     }
     else if (btn == "status")
     {
         BtnStatus.BeginInvoke(
             new Action(() =>
         {
             BtnStatus.Enabled = false;
         }
                        ));
     }
     else
     {
         Btn_Train.BeginInvoke(
             new Action(() =>
         {
             Btn_Train.Enabled = false;
         }
                        ));
     }
 }
Esempio n. 3
0
    void ChangeStatus(BtnStatus s)
    {
        m_BtnStatus = s;
        if (m_BtnStatus == BtnStatus.Team)
        {
            //开启左边的组队选项或组队成员列表根obj
            m_trans_mission.gameObject.SetActive(false);
            m_trans_copyTarget.gameObject.SetActive(false);
            m_trans_copyBattleInfo.gameObject.SetActive(false);
            m_trans_nvWa.gameObject.SetActive(false);
            m_trans_answer.gameObject.SetActive(false);
            m_widget_team.gameObject.SetActive(true);
            m_label_missionlabel.color = new Color(111 * 1.0f / 255, 94 * 1.0f / 255, 87 * 1.0f / 255);
            m_label_TeamLbl.color      = new Color(55 * 1.0f / 255, 44 * 1.0f / 255, 39 * 1.0f / 255);

            UpdateTeamList();
        }
        else
        {
            ShowUpBtn();
            m_widget_team.gameObject.SetActive(false);
            m_label_TeamLbl.color      = new Color(111 * 1.0f / 255, 94 * 1.0f / 255, 87 * 1.0f / 255);
            m_label_missionlabel.color = new Color(55 * 1.0f / 255, 44 * 1.0f / 255, 39 * 1.0f / 255);
        }
    }
Esempio n. 4
0
 /// <summary>
 /// boombutton的构造方法,用于初始化
 /// </summary>
 /// <param name="x"></param>
 /// <param name="y"></param>
 public BoomButton(int x, int y)
 {
     this._countAround = 0;
     this._hasBoom     = false;
     this._status      = BtnStatus.close;
     this._x           = x;
     this._y           = y;
 }
Esempio n. 5
0
 public void OnShow(string title, string msg, BtnStatus bs, OnOK _okFunc, OnCancel _cancelFunc)
 {
     okFunc        = _okFunc;
     cancelFunc    = _cancelFunc;
     txtTitle.text = title;
     txtMsg.text   = msg;
     btnCancel.gameObject.SetActive((bs & BtnStatus.BS_Cancel) > 0);
     btnOK.gameObject.SetActive((bs & BtnStatus.BS_OK) > 0);
     this.gameObject.SetActive(true);
 }
Esempio n. 6
0
 /// <summary>
 /// 鼠标释放
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void QueryWin_MouseUp(object sender, MouseEventArgs e)
 {
     SysParam.isQueryDrag = false;
     SysParam.oldX        = -1;
     SysParam.oldY        = -1;
     if (CurX_Status == BtnStatus.Bt_start_Press)
     {
         CurX_Status = BtnStatus.Bt_start_No_Press;
         this.Close();
     }
     QueryWin_Paint(null, null);
 }
Esempio n. 7
0
 void ShowUpBtn()
 {
     if (IsShowUpBtnInCopy())//默认切到上面(副本中)
     {
         this.m_BtnStatus = DataManager.Manager <ComBatCopyDataManager>().GetCopyLeftShowType();
         OnClickUpBtn();
     }
     else
     {
         if (m_BtnStatus != BtnStatus.Team)
         {
             OnClickUpBtn();
         }
     }
 }
Esempio n. 8
0
 /// <summary>
 /// 鼠标按下
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void QueryWin_MouseDown(object sender, MouseEventArgs e)
 {
     SysParam.isQueryDrag = true;
     if (SysParam.oldX <= 0 || SysParam.oldY <= 0)
     {
         SysParam.oldX = e.X;
         SysParam.oldY = e.Y;
     }
     if (e.X > ConstInfor.QueryX_Place && e.X < ConstInfor.QueryX_Place + ConstInfor.QueryX_Width && e.Y < ConstInfor.QueryX_Height && e.Y > 0)
     {
         if (CurX_Status == BtnStatus.Bt_start_No_Press)
         {
             CurX_Status = BtnStatus.Bt_start_Press;
         }
     }
     QueryWin_Paint(null, null);
 }
Esempio n. 9
0
    void OnClickMission(GameObject go)
    {
        if (m_BtnStatus == BtnStatus.Mission)
        {
            DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.MissionPanel);
            return;
        }

        m_spriteEx_btnMission.ChangeSprite(1);
        m_spriteEx_btnMission.flip = UIBasicSprite.Flip.Nothing;

        m_spriteEx_btnTeam.ChangeSprite(2);
        m_spriteEx_btnTeam.flip = UIBasicSprite.Flip.Nothing;

        BtnStatus btnStatus = DataManager.Manager <ComBatCopyDataManager>().GetCopyLeftShowType();

        ChangeStatus(btnStatus);
    }
Esempio n. 10
0
    void OnClickUpBtn()
    {
        if (m_BtnStatus == BtnStatus.Team)
        {
            return;
        }

        m_widget_team.gameObject.SetActive(false);
        m_spriteEx_btnMission.ChangeSprite(1);
        m_spriteEx_btnMission.flip = UIBasicSprite.Flip.Nothing;
        m_spriteEx_btnTeam.ChangeSprite(2);
        m_spriteEx_btnTeam.flip = UIBasicSprite.Flip.Nothing;

        this.m_BtnStatus = DataManager.Manager <ComBatCopyDataManager>().GetCopyLeftShowType();
        if (this.m_BtnStatus == BtnStatus.Mission)
        {
            m_label_missionlabel.text = "任务";
            m_trans_mission.gameObject.SetActive(true);
            m_trans_copyTarget.gameObject.SetActive(false);
            m_trans_copyBattleInfo.gameObject.SetActive(false);
            m_trans_nvWa.gameObject.SetActive(false);
            m_trans_answer.gameObject.SetActive(false);

            UpdateTaskList();
        }
        else if (this.m_BtnStatus == BtnStatus.CopyTarget)
        {
            //副本目标
            m_label_missionlabel.text = "目标";
            m_trans_mission.gameObject.SetActive(false);
            m_trans_copyTarget.gameObject.SetActive(true);
            m_trans_copyBattleInfo.gameObject.SetActive(false);
            m_trans_nvWa.gameObject.SetActive(false);
            m_trans_answer.gameObject.SetActive(false);

            UpdateCopyTarget();
        }
        else if (this.m_BtnStatus == BtnStatus.CopyBattleInfo)
        {
            //副本战况
            m_label_missionlabel.text = "战况";
            m_trans_mission.gameObject.SetActive(false);
            m_trans_copyTarget.gameObject.SetActive(false);
            m_trans_copyBattleInfo.gameObject.SetActive(true);
            m_trans_nvWa.gameObject.SetActive(false);
            m_trans_answer.gameObject.SetActive(false);

            InitCopyBattleInfoWidget();

            UpdateCopyBattleInfo();
        }
        else if (this.m_BtnStatus == BtnStatus.NvWa)
        {
            //女娲
            m_label_missionlabel.text = "招募";
            m_trans_mission.gameObject.SetActive(false);
            m_trans_copyTarget.gameObject.SetActive(false);
            m_trans_copyBattleInfo.gameObject.SetActive(false);
            m_trans_nvWa.gameObject.SetActive(true);
            m_trans_answer.gameObject.SetActive(false);

            InitNvWa();
        }

        else if (this.m_BtnStatus == BtnStatus.Answer)
        {
            //答题
            m_label_missionlabel.text = "目标";
            m_trans_mission.gameObject.SetActive(false);
            m_trans_copyTarget.gameObject.SetActive(false);
            m_trans_copyBattleInfo.gameObject.SetActive(false);
            m_trans_nvWa.gameObject.SetActive(false);
            m_trans_answer.gameObject.SetActive(true);

            InitAnswer();
        }
    }
Esempio n. 11
0
 /// <summary>
 /// 另一个构造函数
 /// </summary>
 public BoomButton()
 {
     this._countAround = 0;
     this._hasBoom     = false;
     this._status      = BtnStatus.close;
 }