Exemple #1
0
        private void DisplayCurrentSceneNameTip()
        {
            SceneLookupEnum sceneEnum = m_currentSceneSlot.GetCurrentSceneEnum();

            if (sceneEnum == SceneLookupEnum.World_GameRoot)
            {
                return;
            }

            TipData tipData;
            string  sceneName;

            if (m_sceneChineseDictionary.TryGetValue(sceneEnum, out sceneName))
            {
                tipData = new TipData("进入场景", sceneName);
            }
            else
            {
                tipData = new TipData("进入场景", sceneEnum.ToString());
            }
            UIManager.Instance().ShowStaticPanel(UIPanelType.Tipgetpanel, new UI.Panels.Providers.DataProviders.TipDataProvider()
            {
                Data = tipData
            });                                                                                                                                         // 显示UI
        }
 /// <summary>
 /// 显示详情
 /// </summary>
 /// <param name="vData">数据</param>
 public void ShowTipDetail(TipData vData)
 {
     if (m_tipDetail != null)
     {
         m_tipDetail.Init(vData);
     }
 }
Exemple #3
0
        void OnSubmit(InputBox input)
        {
            string str = input.InputString;

            if (str == "")
            {
                return;
            }
            switch (opt)
            {
            case "left":
                ChatData chat = new ChatData();
                chat.name    = "江海胡";
                chat.content = str;
                other.AddAndMove(chat, 30);
                break;

            case "center":
                TipData t = new TipData();
                str       = DateTime.Now.ToString();
                t.content = str;
                tip.AddAndMove(t, 30);
                break;

            case "right":
                chat         = new ChatData();
                chat.name    = "胡强";
                chat.content = str;
                self.AddAndMove(chat, 30);
                break;
            }
            input.InputString = "";
        }
 public void Init(TipsAwardController father, int index, TipData tipData)
 {
     m_father     = father;
     m_index      = index;
     this.tipData = tipData;
     if (m_name != null)
     {
         m_name.text = tipData.tip;
     }
     if (m_description != null)
     {
         m_description.text = tipData.description;
     }
     m_moveTween = transform.DOLocalMoveX(460, 1f);
     StartCoroutine(Wait(5f, Close));
 }
Exemple #5
0
 public void NextTip()
 {
     if (index < tips.Length - 1)
     {
         TipData current = tips[++index];
         titleText.text = current.title;
         sprite.sprite  = current.sprite;
         sprite.color   = current.spriteColor;
         bodyText.text  = current.text;
         if (index == tips.Length - 1)
         {
             nextButton.SetActive(false);
         }
         indexText.text = (index + 1) + "/" + tips.Length;
     }
 }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            iconView   = FindViewById(Resource.Id.icon);
            citysView  = FindViewById(Resource.Id.citys);
            infoLayout = FindViewById(Resource.Id.infoLayout);

            View button = FindViewById <Button>(Resource.Id.button1);

            button.Click += (sender, e) => {
                GuideHelper guideHelper = new GuideHelper(this);

                View test = guideHelper.Inflate(Resource.Layout.custom_view_show);
                guideHelper.AddPage(new TipData(test, (int)GravityFlags.Center));

                TipData tipData1 = new TipData(Resource.Drawable.tip1, (int)(GravityFlags.Right | GravityFlags.Bottom), iconView);
                tipData1.SetLocation(0, -DisplayUtils.DipToPix(ApplicationContext, 50));
                guideHelper.AddPage(tipData1);

                TipData tipData2 = new TipData(Resource.Drawable.tip2, citysView);
                guideHelper.AddPage(tipData2);

                TipData tipData3 = new TipData(Resource.Drawable.tip3, infoLayout);
                TipData tipData4 = new TipData(Resource.Drawable.next, (int)(GravityFlags.Bottom | GravityFlags.CenterHorizontal));
                tipData4.SetLocation(0, -DisplayUtils.DipToPix(ApplicationContext, 100));
                tipData4.SetOnClickListener(new tipData4OnClickListener(guideHelper));
                guideHelper.AddPage(false, tipData3, tipData4);

                guideHelper.AddPage(tipData1, tipData2, tipData3);

                //add custom view
                View testView = guideHelper.Inflate(Resource.Layout.custom_view_with_close);
                testView.FindViewById <ImageButton>(Resource.Id.guide_close).Click += (sender2, e2) => {
                    guideHelper.Dismiss();
                };
                TipData tipDataCustom = new TipData(testView, (int)GravityFlags.Center);
                guideHelper.AddPage(false, tipDataCustom);

                guideHelper.Show(false);
            };
        }
    void ParseDataString()
    {
        var Char = new char[] { ',', '\n' };
//		var shit = "GVR,8/1/2013 6:47:26 AM,100,10,10,False,Deep Stack,0,0,0,,True,1/1/2013 2:00:00 PM,0\nGolden Nugget,8/2/2013 6:48:24 AM,0,0,5,False,Daily,0,10,0,,True,1/1/2013 1:00:00 PM,0";
//		var temp = shit.Split(Char);
        var temp = myAlphaNumericValueString.Split(Char);

        myDailyTipData = new List <TipData>();

        for (int i = 0; i < temp.Length; i += 14)
        {
            print(temp[i + 9]);

            var tempTipData = new TipData();
            tempTipData.JobName                 = temp[i];                                      //"Golden Nugget";
            tempTipData.Date                    = System.Convert.ToDateTime(temp[i + 1]);       //SearchDate;
            tempTipData.TipAmount               = (float)System.Convert.ToDouble(temp[i + 2]);  //0.0f;
            tempTipData.NumberOfDowns           = (int)System.Convert.ToDouble(temp[i + 3]);    // 0;
            tempTipData.HoursWorked             = (float)System.Convert.ToDouble(temp[i + 4]);  //0.0f;
            tempTipData.TournamentDowns         = System.Convert.ToBoolean(temp[i + 5]);        //false;
            tempTipData.TournamentName          = temp[i + 6];                                  // "";
            tempTipData.NumberOfTournamentDowns = (int)System.Convert.ToDouble(temp[i + 7]);    // 0;
            tempTipData.TipOut                  = (float)System.Convert.ToDouble(temp[i + 9]);  //0.0f;
            tempTipData.Notes                   = temp[i + 10];                                 // "";
            tempTipData.WorkDay                 = System.Convert.ToBoolean(temp[i + 11]);       // false;
            tempTipData.WorkDayStartTime        = System.Convert.ToDateTime(temp[i + 12]);      //new System.DateTime(SearchDate.Year,SearchDate.Month,SearchDate.Day,0,0,0);
            tempTipData.PayCheckAmount          = (float)System.Convert.ToDouble(temp[i + 13]); //0.0f;

            myDailyTipData.Add(tempTipData);
        }

        UserBlobManager.GetComponent <UserBlobManager>().DailyTipData.Clear();
        UIManager.GetComponent <UI_Manager>().myDailyTipData.Clear();
        UICalendar.GetComponent <UI_Calendar>().DailyTipData.Clear();

        UserBlobManager.GetComponent <UserBlobManager>().DailyTipData = myDailyTipData;
        UIManager.GetComponent <UI_Manager>().myDailyTipData          = myDailyTipData;
        UICalendar.GetComponent <UI_Calendar>().DailyTipData          = myDailyTipData;

        UICalendar.GetComponent <UI_Calendar>().UpdateCalendar();
    }
 public int Compare(TipData x, TipData y)
 {
     if (x.isUnlock && !y.isUnlock)
     {
         return(-1);//不变
     }
     else if (!x.isUnlock && y.isUnlock)
     {
         return(1);// 交换
     }
     else if (x.isUnlock && y.isUnlock)
     {
         // 都是解锁,按照解锁时间比较
         return(y.time.CompareTo(x.time));// 降序
     }
     else
     {
         // 未解锁
         return(x.tip.CompareTo(y.tip));// 升序
     }
 }
Exemple #9
0
    void FindTipDataByDate(System.DateTime SearchDate)
    {
        UIEnterData.GetComponent <UI_EnterData>().myDailyTipData = new List <TipData>();
        myDailyTipData = new List <TipData>();
        for (var i = 0; i < UserBlobManager.GetComponent <UserBlobManager>().DailyTipData.Count; i++)
        {
            if (UserBlobManager.GetComponent <UserBlobManager>().DailyTipData[i].Date.Year == SearchDate.Year &&
                UserBlobManager.GetComponent <UserBlobManager>().DailyTipData[i].Date.Month == SearchDate.Month &&
                UserBlobManager.GetComponent <UserBlobManager>().DailyTipData[i].Date.Day == SearchDate.Day)
            {
                myDailyTipData.Add(UserBlobManager.GetComponent <UserBlobManager>().DailyTipData[i]);
                myDailyTipData.TrimExcess();

//				print (myDailyTipData[0].Date.ToString());
            }
        }
        // add new temp entry so the list isnt empty
        if (myDailyTipData.Count < 1)
        {
            var tempTipData = new TipData();
            tempTipData.JobName                 = "Golden Nugget";
            tempTipData.Date                    = SearchDate;
            tempTipData.TipAmount               = 0.0f;
            tempTipData.NumberOfDowns           = 0;
            tempTipData.HoursWorked             = 0.0f;
            tempTipData.TournamentDowns         = false;
            tempTipData.TournamentName          = "";
            tempTipData.NumberOfTournamentDowns = 0;
            tempTipData.TipOut                  = 0.0f;
            tempTipData.Notes                   = "";
            tempTipData.WorkDay                 = false;
            tempTipData.WorkDayStartTime        = new System.DateTime(SearchDate.Year, SearchDate.Month, SearchDate.Day, 0, 0, 0);
            tempTipData.PayCheckAmount          = 0.0f;

            myDailyTipData.Add(tempTipData);
//			print (" added day because the current day was not found");
        }
    }
    void AddNewData()
    {
        var tempTipData = new TipData();

        tempTipData.JobName                 = "Golden Nugget";
        tempTipData.Date                    = myDailyTipData[myTipDataIndex].Date;
        tempTipData.TipAmount               = 0.0f;
        tempTipData.NumberOfDowns           = 0;
        tempTipData.HoursWorked             = 0.0f;
        tempTipData.TournamentDowns         = false;
        tempTipData.TournamentName          = "";
        tempTipData.NumberOfTournamentDowns = 0;
        tempTipData.TipOut                  = 0.0f;
        tempTipData.Notes                   = "";
        tempTipData.WorkDay                 = false;
        tempTipData.WorkDayStartTime        = new System.DateTime(myDailyTipData[myTipDataIndex].Date.Year, myDailyTipData[myTipDataIndex].Date.Month, myDailyTipData[myTipDataIndex].Date.Day, 0, 0, 0); //myDailyTipData[myTipDataIndex].Date;
        tempTipData.PayCheckAmount          = 0.0f;

        myDailyTipData.Add(tempTipData);
        myDailyTipData.TrimExcess();
        myTipDataIndex = myDailyTipData.Count - 1;
//		print ("AddNewData");
    }
Exemple #11
0
        void OnSubmit(InputBox input)
        {
            string str = input.InputString;

            if (str == "")
            {
                return;
            }
            switch (opt)
            {
            case "left":
                ChatData chat = new ChatData();
                chat.name           = "江海胡";
                chat.content        = str;
                settings.textAnchor = TextAnchor.UpperLeft;
                chat.conSize        = HTextGenerator.GetPreferredSize(new StringEx(str, settings.richText), ref settings);
                other.AddAndMove(chat, chat.conSize.y + 10);
                break;

            case "center":
                TipData t = new TipData();
                str       = DateTime.Now.ToString();
                t.content = str;
                tip.AddAndMove(t, 30);
                break;

            case "right":
                chat                = new ChatData();
                chat.name           = "胡强";
                chat.content        = str;
                settings.textAnchor = TextAnchor.UpperRight;
                chat.conSize        = HTextGenerator.GetPreferredSize(new StringEx(str, settings.richText), ref settings);
                self.AddAndMove(chat, chat.conSize.y + 10);
                break;
            }
            input.InputString = "";
        }
Exemple #12
0
 float GetTipSize(TipItem tip, TipData data)
 {
     return(40);
 }
Exemple #13
0
 void TipItemUpdate(TipItem tip, TipData data, int index)
 {
     tip.content.Text = data.content;
 }