Skill.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using System;
  4. using System.Xml;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Collections;
  8. using System.Collections.Generic;
  9. public class Skill : SkillRoot
  10. {
  11. #region Config
  12. #region 配置
  13. public float UnlockAheadAmt
  14. {
  15. get { return UnlockAheadBaseAmt + (UnlockLv - Manager.Level - 1) * UnlockAheadDeltaAmt; }
  16. }
  17. public override string FullIDPrefix
  18. {
  19. get { return "Skill"; }
  20. }
  21. public bool CoolLock;
  22. public float CD;
  23. public float Person;
  24. public float SkillCD;
  25. public float UseAmt;
  26. public float Duration;
  27. public float CoinOnce;
  28. public float CoinPerson;
  29. public float DiamondOnce;
  30. public double UpgradeAmt;
  31. public float Plus;
  32. public float CdBuff = 1;
  33. public float PersonBuff;
  34. public float SkillCdBuff;
  35. public float CoinOnceBuff;
  36. public int UnlockLv;
  37. public float UnlockAmt;
  38. public float UnlockAheadBaseAmt;
  39. public float UnlockAheadDeltaAmt;
  40. public string UnlockPos;
  41. public Current BuyCur;
  42. public Current UnlockCur;
  43. public Current UpgradeCur;
  44. public Current UnlockAheadCur;
  45. public string Label;
  46. public string Anim;
  47. public string UpgradeCD;
  48. public string UpgradeFml;
  49. public string UpgradePlus;
  50. public string UpgradePerson;
  51. public string UpgradeDuration;
  52. public string UpgradeCoinOnce;
  53. #endregion
  54. public float UseTimer;
  55. public float CoolTimer;
  56. public float NewPlus;
  57. public float NewPerson;
  58. public float NewSkillCD;
  59. public float NewDuration;
  60. public float NewCoinOnce;
  61. public float NewSkillCdBuff;
  62. public float NewPersonBuff;
  63. public float NewCoinPerson;
  64. public float NewCoinOnceBuff;
  65. public double NewUpgradeAmt;
  66. public override SkillStatus ItemStatus
  67. {
  68. get { return ItemStatus_; }
  69. set
  70. {
  71. ItemStatus_ = value;
  72. if (ItemStatus_ == SkillStatus.Buy)
  73. {
  74. ItemBtn.interactable = true;
  75. if (BuyCur == Current.AD)
  76. {
  77. LanguageManager.Add(ItemBtnLab, new MulLanStr(LanguageLabel.Common__AD));
  78. }
  79. else
  80. {
  81. LanguageManager.Add(ItemBtnLab, new MulLanStr(LanguageLabel.UI__Fe_BtnLab3), "\n", Auxiliary.ImageParse(BuyCur), UseAmt.ToString("0"));
  82. }
  83. }
  84. else if (ItemStatus_ == SkillStatus.Use)
  85. {
  86. ItemBtn.interactable = false;
  87. }
  88. else if (ItemStatus_ == SkillStatus.Lock)
  89. {
  90. ItemBtn.interactable = true;
  91. LanguageManager.Add(ItemBtnLab, new MulLanStr(LanguageLabel.UI__Fe_BtnLab0), "\n", new MulLanStr(LanguageLabel.UI__Fe_BtnLab4), UnlockLv.ToString());
  92. }
  93. else if (ItemStatus_ == SkillStatus.Cool)
  94. {
  95. ItemBtn.interactable = false;
  96. }
  97. }
  98. }
  99. #endregion
  100. public Skill(XmlAttributeCollection attribute)
  101. {
  102. #region 配置
  103. ID_ = int.Parse(attribute[0].Value);
  104. Icon_ = attribute[31].Value;
  105. Anim = attribute[32].Value;
  106. Label = attribute[33].Value;
  107. UnlockPos = attribute[19].Value;
  108. UpgradeCD = attribute[29].Value;
  109. UpgradeFml = attribute[24].Value;
  110. UpgradePlus = attribute[25].Value;
  111. UpgradePerson = attribute[26].Value;
  112. UpgradeDuration = attribute[28].Value;
  113. UpgradeCoinOnce = attribute[27].Value;
  114. UnlockLv = Auxiliary.StringToInt(attribute[13].Value,0);
  115. ItemIndex = Auxiliary.StringToInt(attribute[3].Value,0);
  116. CD = Auxiliary.StringToFloat(attribute[12].Value,0);
  117. UseAmt = Auxiliary.StringToFloat(attribute[21].Value,0);
  118. Duration = Auxiliary.StringToFloat(attribute[11].Value,0);
  119. UnlockAmt = Auxiliary.StringToFloat(attribute[18].Value,0);
  120. DiamondOnce = Auxiliary.StringToFloat(attribute[9].Value,0);
  121. UnlockAheadBaseAmt = Auxiliary.StringToFloat(attribute[16].Value,0);
  122. UnlockAheadDeltaAmt = Auxiliary.StringToFloat(attribute[15].Value, 0);
  123. SkillTab = SkillClassParse(attribute[2].Value);
  124. CoolLock = Auxiliary.StringToBool(attribute[5].Value, false);
  125. UpgradeAmt = UpgradeAmtParse(attribute[23].Value);
  126. BuyCur = Auxiliary.CurrentParse(attribute[20].Value);
  127. UnlockCur = Auxiliary.CurrentParse(attribute[17].Value);
  128. UpgradeCur = Auxiliary.CurrentParse(attribute[22].Value);
  129. UnlockAheadCur = Auxiliary.CurrentParse(attribute[14].Value);
  130. ValueBuffParse(out Person, out PersonBuff, attribute[7].Value);
  131. ValueBuffParse(out SkillCD, out SkillCdBuff, attribute[10].Value);
  132. ValueBuffParse(out CoinOnce, out CoinOnceBuff, attribute[8].Value);
  133. ValueBuffParse(out CoinPerson, out Plus, attribute[6].Value);
  134. #endregion
  135. SkillType = SkillType.Skill;
  136. }
  137. public virtual void AnnulBuff()
  138. {
  139. Manager.SkillPlus -= NewPlus;
  140. Manager.SkillPerson -= NewPerson;
  141. Manager.SkillPersonBuff -= NewPersonBuff;
  142. Manager.SkillCoinPerson -= NewCoinPerson;
  143. if (!NewSkillCD.Equal(0))
  144. {
  145. for (int i = 0; i < Manager.SkillList.Count; i++)
  146. {
  147. Manager.SkillList[i].ReceiveCool(-NewSkillCD, true, false);
  148. }
  149. }
  150. if (!NewSkillCdBuff.Equal(0))
  151. {
  152. for (int i = 0; i < Manager.SkillList.Count; i++)
  153. {
  154. Manager.SkillList[i].ReceiveCool(-NewSkillCdBuff, true, true);
  155. }
  156. }
  157. }
  158. public virtual bool DoCool()
  159. {
  160. CoolTimer -= Time.deltaTime;
  161. TimeSpan timeSpan = new TimeSpan(0, 0, Mathf.CeilToInt(CoolTimer));
  162. if (timeSpan.Hours >= 1)
  163. {
  164. ItemBtnLab.text = string.Format("{0}\n{1}{2}:{3}", Language.GetStr(LanguageLabel.UI__Fe_BtnLab6), Language.GetStr(LanguageLabel.UI__Fe_BtnLab7), timeSpan.Hours.ToString("00"), timeSpan.Minutes.ToString("00"));
  165. }
  166. else
  167. {
  168. ItemBtnLab.text = string.Format("{0}\n{1}{2}:{3}", Language.GetStr(LanguageLabel.UI__Fe_BtnLab6), Language.GetStr(LanguageLabel.UI__Fe_BtnLab7), timeSpan.Minutes.ToString("00"), timeSpan.Seconds.ToString("00"));
  169. }
  170. if (CoolTimer <= 0)
  171. {
  172. ItemStatus = SkillStatus.Buy;
  173. return true;
  174. }
  175. else
  176. {
  177. return false;
  178. }
  179. }
  180. public override bool DoUpdate()
  181. {
  182. UseTimer -= Time.deltaTime;
  183. TimeSpan timeSpan = new TimeSpan(0, 0, Mathf.CeilToInt(UseTimer));
  184. if (timeSpan.Hours >= 1)
  185. {
  186. ItemBtnLab.text = string.Format("{0}\n{1}{2}:{3}", Language.GetStr(LanguageLabel.UI__Fe_BtnLab8), Language.GetStr(LanguageLabel.UI__Fe_BtnLab7), timeSpan.Hours.ToString("00"), timeSpan.Minutes.ToString("00"));
  187. }
  188. else
  189. {
  190. ItemBtnLab.text = string.Format("{0}\n{1}{2}:{3}", Language.GetStr(LanguageLabel.UI__Fe_BtnLab8), Language.GetStr(LanguageLabel.UI__Fe_BtnLab7), timeSpan.Minutes.ToString("00"), timeSpan.Seconds.ToString("00"));
  191. }
  192. if (UseTimer <= 0)
  193. {
  194. AnnulEffect();
  195. return true;
  196. }
  197. else
  198. {
  199. return false;
  200. }
  201. }
  202. public override void AnnulEffect()
  203. {
  204. CoolTimer = CD * CdBuff - 1;
  205. ItemStatus = SkillStatus.Cool;
  206. Manager.CoolList.Add(this);
  207. AnnulBuff();
  208. }
  209. public override void UpdateStatus()
  210. {
  211. if (!Manager.Complete)
  212. {
  213. return;
  214. }
  215. if (Manager.Level >= UnlockLv)
  216. {
  217. if (ItemStatus == SkillStatus.Lock)
  218. {
  219. ItemIcon.material = null;
  220. ItemStatus = SkillStatus.Buy;
  221. }
  222. }
  223. }
  224. protected virtual void GetAward()
  225. {
  226. float temp = NewCoinOnce + Manager.CoinPerson * NewCoinOnceBuff;
  227. Manager.AddCoin(temp, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.AD);
  228. Manager.AddDiamond(DiamondOnce, StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.AD);
  229. StringBuilder sb = new StringBuilder();
  230. if (!temp.Equal(0))
  231. {
  232. sb.AppendFormat("{0}{1}{2}", Language.GetStr(LanguageLabel.UI__J_Info0), TransferLabel.CoinSprite, temp.ToString("0"));
  233. }
  234. if (!DiamondOnce.Equal(0))
  235. {
  236. sb.AppendFormat("{0}{1}{2}", Language.GetStr(LanguageLabel.UI__J_Info0), TransferLabel.DiamondSprite, DiamondOnce.ToString("0"));
  237. }
  238. string str = sb.ToString();
  239. if (!string.IsNullOrEmpty(str))
  240. {
  241. InfoBoxManager.GardenInfoBox.Show(sb.ToString(), 10f, Color.white, ResourceManager.LoadSprite("Atlas", Folder.Atlas));
  242. }
  243. }
  244. protected virtual void GetBuff()
  245. {
  246. if (UseTimer.Equal(-1))
  247. {
  248. AnnulEffect();
  249. }
  250. else
  251. {
  252. ItemStatus = SkillStatus.Use;
  253. Manager.UseList.Add(this);
  254. }
  255. Manager.SkillPlus += NewPlus;
  256. Manager.SkillPerson += NewPerson;
  257. Manager.SkillPersonBuff += NewPersonBuff;
  258. Manager.SkillCoinPerson += NewCoinPerson;
  259. if (!NewSkillCD.Equal(0))
  260. {
  261. for (int i = 0; i < Manager.SkillList.Count; i++)
  262. {
  263. Manager.SkillList[i].ReceiveCool(NewSkillCD, true, false);
  264. }
  265. }
  266. if (!NewSkillCdBuff.Equal(0))
  267. {
  268. for (int i = 0; i < Manager.SkillList.Count; i++)
  269. {
  270. Manager.SkillList[i].ReceiveCool(NewSkillCdBuff, true, true);
  271. }
  272. }
  273. }
  274. protected virtual void Buy()
  275. {
  276. if (ID_ == 5)
  277. {
  278. StaticsManager.GetInstance().AdClicked(1);
  279. }
  280. else if (ID_ == 6)
  281. {
  282. StaticsManager.GetInstance().AdClicked(2);
  283. }
  284. Manager.Pay
  285. (
  286. FullID,
  287. UseAmt,
  288. BuyCur,
  289. () =>
  290. {
  291. AudioManager.PlayClip(Clip.SkillClip);
  292. if (BuyCur != Current.AD)
  293. {
  294. Manager.SkillAmt++;
  295. }
  296. UseTimer = NewDuration - 1;
  297. GetBuff();
  298. GetAward();
  299. InfoBoxManager.GardenInfoBox.Show(string.Format("{0}{1}", Language.GetStr(LanguageLabel.UI__J_Info1), Language.GetStr(LabelUtility.CombineLanguageLabel(LanguageLabel.SkillName, FullID))), 10f, Color.white, ResourceManager.LoadSprite(ResourceLabel.Atlas, Folder.Atlas));
  300. },
  301. StaticsManager.ItemID.使用技能,
  302. StaticsManager.ConsumeModule.Shop
  303. );
  304. }
  305. protected virtual void OnClick()
  306. {
  307. AudioManager.PlayClip(Clip.BtnClip);
  308. if (ItemStatus == SkillStatus.Buy)
  309. {
  310. if (BuyCur == Current.AD)
  311. {
  312. Buy();
  313. }
  314. else
  315. {
  316. ResourceManager.Get(ObjectLabel.Fe_Info).TweenForCG();
  317. ResourceManager.SetText(ObjectLabel.Fe_Tit, Name);
  318. ResourceManager.SetSprite(ObjectLabel.Fe_Icon, Icon);
  319. ResourceManager.SetText(ObjectLabel.Fe_Lab0, "");
  320. ResourceManager.SetText(ObjectLabel.Fe_Lab1, GetDescription(0));
  321. ResourceManager.SetText(ObjectLabel.Fe_BtnLab, string.Format("{0}({1}{2:0})", Language.GetStr(LanguageLabel.UI__Fe_BtnLab3), Auxiliary.ImageParse(BuyCur), UseAmt));
  322. ResourceManager.SetButtonEvent
  323. (
  324. ObjectLabel.Fe_Btn,
  325. () =>
  326. {
  327. Buy();
  328. ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
  329. }
  330. );
  331. }
  332. }
  333. else if (ItemStatus == SkillStatus.Lock)
  334. {
  335. ResourceManager.Get(ObjectLabel.Fe_Info).TweenForCG();
  336. ResourceManager.SetText(ObjectLabel.Fe_Tit, Name);
  337. ResourceManager.SetSprite(ObjectLabel.Fe_Icon, Icon);
  338. ResourceManager.SetText(ObjectLabel.Fe_Lab0, "");
  339. ResourceManager.SetText(ObjectLabel.Fe_Lab1, GetDescription(0));
  340. ResourceManager.SetText(ObjectLabel.Fe_BtnLab, string.Format("{0}({1}{2:0})", Language.GetStr(LanguageLabel.UI__Fe_BtnLab0), Auxiliary.ImageParse(UnlockAheadCur), UnlockAheadAmt.ToString("0")));
  341. ResourceManager.SetButtonEvent
  342. (
  343. ObjectLabel.Fe_Btn,
  344. () =>
  345. {
  346. UnlockAhead();
  347. ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
  348. }
  349. );
  350. }
  351. }
  352. protected virtual void UnlockAhead()
  353. {
  354. Manager.Pay
  355. (
  356. FullID,
  357. UnlockAheadAmt,
  358. UnlockAheadCur,
  359. () =>
  360. {
  361. AudioManager.PlayClip(Clip.BtnClip);
  362. ItemIcon.material = null;
  363. ItemStatus = SkillStatus.Buy;
  364. },
  365. StaticsManager.ItemID.提前解锁技能,
  366. StaticsManager.ConsumeModule.Shop
  367. );
  368. }
  369. public override void Reactive()
  370. {
  371. if (ItemStatus == SkillStatus.Use)
  372. {
  373. AnnulBuff();
  374. Manager.UseList.Remove(this);
  375. }
  376. else if (ItemStatus == SkillStatus.Cool)
  377. {
  378. Manager.CoolList.Remove(this);
  379. }
  380. }
  381. public override void Init(bool firstInit, float elapse, List<List<Skill>> useList, XmlAttributeCollection attribute)
  382. {
  383. Level = int.Parse(attribute[3].Value);
  384. UseTimer = float.Parse(attribute[5].Value);
  385. CoolTimer = float.Parse(attribute[4].Value);
  386. ItemStatus_ = (SkillStatus)Enum.Parse(typeof(SkillStatus), attribute[2].Value);
  387. NewPlus = Plus;
  388. NewPerson = Person;
  389. NewSkillCD = SkillCD;
  390. NewDuration = Duration;
  391. NewCoinOnce = CoinOnce;
  392. NewSkillCdBuff = SkillCdBuff;
  393. NewPersonBuff = PersonBuff;
  394. NewCoinPerson = CoinPerson;
  395. NewUpgradeAmt = UpgradeAmt;
  396. NewCoinOnceBuff = CoinOnceBuff;
  397. if (ItemStatus_ == SkillStatus.Lock || ItemStatus_ == SkillStatus.UnLock)
  398. {
  399. ItemIcon.material = Lib.GrayMat;
  400. }
  401. else
  402. {
  403. ItemIcon.material = null;
  404. }
  405. if (ItemStatus_ == SkillStatus.Use)
  406. {
  407. GetBuff();
  408. if (UseTimer < elapse)
  409. {
  410. Manager.UseList.Remove(this);
  411. if (useList.Count > 0)
  412. {
  413. if (UseTimer < Manager.CircleTimer)
  414. {
  415. useList[0].UniqueAdd(this);
  416. }
  417. else
  418. {
  419. int circle = 1 + Mathf.FloorToInt((UseTimer - Manager.CircleTimer)/Manager.CircleTime);
  420. useList[circle].UniqueAdd(this);
  421. }
  422. }
  423. }
  424. else
  425. {
  426. UseTimer -= elapse;
  427. }
  428. }
  429. else if (ItemStatus_ == SkillStatus.Cool)
  430. {
  431. CoolTimer -= elapse;
  432. Manager.CoolList.Add(this);
  433. }
  434. ItemBtn.onClick.RemoveAllListeners();
  435. ItemBtn.onClick.AddListener(OnClick);
  436. ItemLab.text = GetDescription(0);
  437. ItemStatus = ItemStatus;
  438. }
  439. public override void ReceiveCool(float amt, bool current, bool buff)
  440. {
  441. if (!CoolLock)
  442. {
  443. return;
  444. }
  445. if (current)
  446. {
  447. if (ItemStatus != SkillStatus.Cool)
  448. {
  449. return;
  450. }
  451. if (buff)
  452. {
  453. CoolTimer -= CD * amt;
  454. }
  455. else
  456. {
  457. CoolTimer -= amt;
  458. }
  459. }
  460. else
  461. {
  462. if (buff)
  463. {
  464. CdBuff = 1 - amt;
  465. }
  466. else
  467. {
  468. CD -= amt;
  469. }
  470. }
  471. }
  472. #region 解读器
  473. protected double UpgradeAmtParse(string str)
  474. {
  475. if (string.IsNullOrEmpty(str))
  476. {
  477. return UnlockAmt;
  478. }
  479. else
  480. {
  481. return double.Parse(str);
  482. }
  483. }
  484. protected override string GetDescription(int offset)
  485. {
  486. float temp;
  487. string[] strings = Desc.Split(TransferLabel.OpenChar, TransferLabel.CloseChar);
  488. StringBuilder stringBuilder = new StringBuilder();
  489. for (int i = 0; i < strings.Length; i++)
  490. {
  491. if (strings[i].Contains(TransferLabel.Level))
  492. {
  493. }
  494. else if (strings[i].Contains(TransferLabel.Person))
  495. {
  496. #region MyRegion
  497. if (!Person.Equal(0))
  498. {
  499. temp = NewPerson;
  500. UpgradeValue(ref temp, Person, UpgradePerson, offset);
  501. UpgradeUnit(ref temp, strings[i]);
  502. float remainder = temp % 1;
  503. if (remainder > 0)
  504. {
  505. stringBuilder.Append(temp.ToString("0") + "+");
  506. }
  507. else
  508. {
  509. stringBuilder.Append(temp.ToString("0"));
  510. }
  511. }
  512. else if (!PersonBuff.Equal(0))
  513. {
  514. temp = NewPersonBuff;
  515. UpgradeValue(ref temp, UpgradePerson, offset);
  516. stringBuilder.Append(string.Format("{0:0}%", temp * 100));
  517. }
  518. #endregion
  519. }
  520. else if (strings[i].Contains(TransferLabel.Duration))
  521. {
  522. #region MyRegion
  523. temp = NewDuration;
  524. UpgradeValue(ref temp, Duration, UpgradeDuration, offset);
  525. UpgradeUnit(ref temp, strings[i]);
  526. stringBuilder.Append(temp.ToString("0"));
  527. #endregion
  528. }
  529. else if (strings[i].Contains(TransferLabel.CoinOnce))
  530. {
  531. #region MyRegion
  532. if (!CoinOnce.Equal(0))
  533. {
  534. temp = NewCoinOnce;
  535. UpgradeValue(ref temp, CoinOnce, UpgradeCoinOnce, offset);
  536. stringBuilder.Append(temp.ToString("0"));
  537. }
  538. else if (!CoinOnceBuff.Equal(0))
  539. {
  540. temp = NewCoinOnceBuff;
  541. UpgradeValue(ref temp, UpgradeCoinOnce, offset);
  542. stringBuilder.Append(temp.ToString("0"));
  543. }
  544. #endregion
  545. }
  546. else if (strings[i].Contains(TransferLabel.DiamondOnce))
  547. {
  548. #region MyRegion
  549. stringBuilder.Append(DiamondOnce.ToString("0"));
  550. #endregion
  551. }
  552. else if (strings[i].Contains(TransferLabel.CoinPerson))
  553. {
  554. #region MyRegion
  555. if (!CoinPerson.Equal(0))
  556. {
  557. temp = NewCoinPerson;
  558. UpgradeValue(ref temp, CoinPerson, UpgradePlus, offset);
  559. float remainder = temp % 1;
  560. if (remainder > 0)
  561. {
  562. stringBuilder.Append(temp.ToString("0") + "+");
  563. }
  564. else
  565. {
  566. stringBuilder.Append(temp.ToString("0"));
  567. }
  568. }
  569. else if (!Plus.Equal(0))
  570. {
  571. temp = NewPlus;
  572. UpgradeValue(ref temp, UpgradePlus, offset);
  573. stringBuilder.Append(string.Format("{0:0}%", temp * 100));
  574. }
  575. else
  576. {
  577. throw new Exception();
  578. }
  579. #endregion
  580. }
  581. else
  582. {
  583. stringBuilder.Append(strings[i]);
  584. }
  585. }
  586. return stringBuilder.ToString();
  587. }
  588. #endregion
  589. }