U.D.PB.A.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. Namespace.register("U.MD.D.PB.A"); //pb帖子区域
  2. //#region 窗体帖子
  3. /*
  4. * 获取用户文章和版块信息
  5. *
  6. * @param {object} 帖子信息
  7. * @param {object} 目录信息
  8. * @param {element} 弹框
  9. * @param {element} 帖子内容区域
  10. * @returns {Object}
  11. */
  12. U.MD.D.PB.A.WAPMHBK = function (UDE, UBE, URID, UDOD) {
  13. try {
  14. (typeof UDE == "string") && (UDE = { "ArticleID": UDE, "PublishedDirectoryID": "" }); //如果不是帖子实体自定义一个
  15. var _UCE, _UDOD = $("#UD_SYPH")[0] || $("#UD_SYP")[0], //文章模板
  16. _UDTD = _UDOD.id == "UD_SYP" ? _UDOD : "", //判断是否使用模板
  17. _UGE = U.MD.D.H.ET["NT"]["PB"]["BK"], //板块信息
  18. _UDID = UDE.PublishedDirectoryID != null ? UDE.PublishedDirectoryID : UBE["UserDirectoryID"] || ""; //论坛id
  19. (_UDID) && (UBE = UBE || _$(_UGE).Select({ "UserDirectoryID": _UDID })[0], (!UBE) && (_UGE.push(UBE = {}))); //获取数据来源
  20. if (_UDTD) { //新建弹窗
  21. _UDOD = U.UF.UI.Form({ min: false, max: false, id: "UD_SYPH", style: { width: "80%", height: "80%" }, content: _UDTD, //调用弹窗
  22. title: "<div class='UD_SYF_STI'>文章查看</div>", bst: { style: { "overflow": "auto" }, onscroll: U.UF.M.SSCH({ "AF": U.MD.D.PB.Re.FGRPMHBK }).SCH() }, hst: { style: { "padding": "0"}} //页面滚动加载评论
  23. }).be;
  24. }
  25. else {//窗体弹出
  26. _UDTD = U.UF.UI.Form.et["UD_SYPH"].body;
  27. $(_UDOD).Center(); _UDTD.scrollTop = 0; //初始化时候导航到顶部
  28. _UDTD = $(U.UF.UI.Form.et["UD_SYPH"].body).Child()[0]; //内容元素
  29. }
  30. if (UBE && UBE["IF"] || !U.UF.Ut.isEmpty(UBE)) { //数据存在直接打印
  31. if (UDE["ArticleID"]) { //打印帖子
  32. U.MD.D.PB.A.APMHBK(UDE, UBE, _UDTD, UDOD); //帖子内容输出
  33. U.MD.D.PB.Re.RPMHBK(UDE, 1, URID); //评论内容输出
  34. }
  35. else { U.MD.D.PB.YMHBK(UBE); }
  36. if ((_UCE = US.forum.news) && (_$((_UCE = _UCE[0])).Select({ "ArticleID": UDE["ArticleID"] }))[0]) {
  37. U.MD.D.Blog.N.SNXX(UDE.ArticleID, _UCE);
  38. }
  39. U.MD.N.UrlWrite["pbt", UDE["ArticleID"]], UDE["ArticleTitle"]; //设置url提示
  40. }
  41. else { //帖子打印
  42. U.UF.A.Request(US.AUTH, ["GetPND", _UDID || US.EMPTYGUID, (US.userInfo.userid || US.EMPTYGUID), UDE.ArticleID]), U.MD.D.PB.A.AsynWAPMHBK, [[_UDTD, true], UDE, _UGE, UBE, URID, UDOD]; //获取后腰数据
  43. }
  44. }
  45. catch (e) { }
  46. }
  47. //获取用户版块异步
  48. U.MD.D.PB.A.AsynWAPMHBK = function (r) {
  49. var context = r.context,
  50. _UDE = context[1], //帖子信息
  51. _UGE = context[2], //板块信息
  52. _UBE = context[3] || {}, //当前板块信息
  53. _URID = context[4], //回复内容
  54. _UDOD = context[5]; //板块内文章元素
  55. r = r.value;
  56. U.MD.D.PB.CLYMHBK(U.MD.D.H.ET["NT"]["PB"]["BK"], _UBE, r[0], _UBE.PublishedDirectoryID); //文章目录信息处理
  57. U.UF.Ut.AddObj(_UDE, (_UDE["IF"] = r[1][0])); //给文章添加详细信息
  58. U.MD.D.PB.A.WAPMHBK(_UDE, _UBE, _URID, _UDOD); //打印文章
  59. }
  60. /**
  61. * 打印用户文章区域
  62. *
  63. * @param {object} 帖子信息
  64. * @param {object} 目录信息
  65. * @param {element} 帖子内容区域
  66. * @param {element} 板块页面上的帖子元素
  67. * @returns {Object}
  68. */
  69. U.MD.D.PB.A.APMHBK = function (UDE, UBE, UDOD, UDTD) {
  70. if (UDE["IF"]) { //选择文章和版块
  71. var _UGE = U.MD.D.H.ET["NT"]["PB"];
  72. UBE = UBE || _$(_UGE["BK"]).FindOne({ "UserDirectoryID": UDE.PublishedDirectoryID });
  73. U.MD.D.PB.A.PAPMHBK(UDE, UBE, UDOD, UDTD); _UGE["DWZ"] = UDE;
  74. }
  75. else {
  76. U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_P_S_SelectArticleInformation", UDE.ArticleID], U.MD.D.PB.A.AsynAPMHBK, [[UDOD, true], UDE, UBE, UDOD, UDTD]);
  77. // U.UF.A.Request(US.AUTH,"pb.ArticleContent", [UDE.ArticleID, "PB"], U.MD.D.PB.A.AsynAPMHBK, [[UDOD, true], UDE, UBE, UDOD, UDTD]);
  78. } //获取用户文章
  79. }
  80. //用户文章异步
  81. U.MD.D.PB.A.AsynAPMHBK = function (r) {
  82. var context = r.context,
  83. _UDE = context[1], //帖子信息
  84. _UBE = context[2], //目录信息
  85. _UDOD = context[3], //弹框
  86. _UDTD = context[4]; //帖子内容区域
  87. r = r.value;
  88. _UDE["IF"] = r[0]; //给帖子添加内容
  89. U.MD.D.PB.A.APMHBK(_UDE, _UBE, _UDOD, _UDTD); //打印文章
  90. }
  91. /**
  92. * 文章展示
  93. *
  94. * @param {object} 帖子信息
  95. * @param {object} 目录信息
  96. * @param {element} 帖子内容区域
  97. * @param {element} 板块页面上的帖子元素
  98. * @returns {Object}
  99. */
  100. U.MD.D.PB.A.PAPMHBK = function (UDE, UBE, UDOD, UDTD) {
  101. var _UDCD, _UIMG = [], _UIF = UDE["IF"], //各个部分的元素,文章详细信息
  102. _userid = US.userInfo.userid, //用户id
  103. _UDAD = $(UDOD).Child(); //内容
  104. //头部
  105. _UDCD = $("div", _UDAD[0]); //头部区域
  106. _UDCD[3].innerHTML = _UIF.ArticleTitle; //标题
  107. $($("img", _UDCD[0])[0] || $$("img", {}, _UDCD[0])).addAttrArray({ //用户头像
  108. "onerror": U.UF.M.ImgError, "alt": _UIF.UserNickName,
  109. "onclick": [[U.MD.U.I.ViewOtherUserInfo, [_UIF.UserID]]],
  110. "src": U.UF.M.GetImgU(_UIF.UserThumbnailImageHead)
  111. });
  112. $(_UDCD[4]).addAttrArray({ "style": { "display": (_userid && UDE.UserID == _userid) ? "block" : "none" }, //是否具有编辑的权限
  113. "title": "编辑修改", "innerHTML": "编辑修改",
  114. "onclick": [[U.MD.D.PB.A.PAPMHPJ, [UDE, _UDAD[1], _UDCD[3], UDTD]]]
  115. });
  116. _UDCD[6].innerText = _UIF.UserNickName; //用户名
  117. _UDCD[7].innerText = U.UF.D.getDateInterval(_UIF.ArticleAddTime); //发帖子时间
  118. //内容
  119. $(_UDAD[1]).addAttrArray({ "innerHTML": _UIF.ArticleContent, "className": "UD_SYPCLCC" });
  120. _UDCD = $("img", _UDAD[1]);
  121. for (i = 0; i < _UDCD.length; i++) { //给图片添加弹出图片阅览器
  122. _UIMG.push({ "Time": UDE.ArticleAddTime, "Thm": _UDCD[i].src,
  123. "Img": _UDCD[i].alt.indexOf(US.FILESYSTEMURL) > -1 ? _UDCD[i].alt : _UDCD[i].src
  124. });
  125. $(_UDCD[i]).addAttrArray({ "style": { "cssText": "" }, "onclick": [[U.UF.M.StopBubble], [U.MD.I.Img, [_UIF, _UIMG, i]]] }); //给图片添加点击事件
  126. }
  127. $("a", _UDAD[1]).addAttrArray({ "target": "_blank" }); //当前页面不跳转
  128. //信息
  129. _UDCD = $("div", _UDAD[2]);
  130. _UDCD[1].innerHTML = 0; //分享数
  131. _UDCD[4].innerHTML = _UIF.ArticleReplayNumber; //评论数
  132. _UDCD[7].innerHTML = _UIF.AricitleReadNumber; //浏览数
  133. //评论
  134. _UDCD = $("div", _UDAD[3]);
  135. _UDCD[2].innerText = "发表评论..."; //发表的内容
  136. _UDCD[14].onclick = U.UF.M.apply(this, [[U.MD.D.PB.Re.APRPMHBK, [null, _UDCD[2], UDE]]]); //发帖的按钮
  137. UDOD.style.display = "block"; //显示
  138. }
  139. //#endregion
  140. //#region 功能区域
  141. //#region 修改的帖子
  142. //窗体修改弹出
  143. U.MD.D.PB.A.PAPMHPJ = function (UDE, UDOD, UDTD, UDSD) {
  144. U.MD.D.PB.A.FBTZTC(null, UDE, U.UF.M.apply(null, [[U.MD.D.PB.A.PAPMHTJ, [UDE]], [U.MD.D.PB.A.ModifyA, [UDE, UDOD, UDTD, UDSD]]]));
  145. }
  146. //提交
  147. U.MD.D.PB.A.PAPMHTJ = function (UDE, UDOD, UCB) {
  148. if (!U.MD.U.L.isLogin(3)) {
  149. var _UAT, _UIT = "", _UST = UDOD.innerHTML || UDOD; U.UF.Ut.isFunction(UCB) ? "" : ((_UIT = arguments[2] || ""), UCB = arguments[3]); (U.UF.Ut.isString(UDE)) && (UDE = { ArticleID: UDE, ArticleTitle: _UIT, ArticleContent: _UST });
  150. if (_UIT.length == 0 || _UIT.length > 40) { _UAT = "标题太长或者为空"; } else if (_UST.length < 1) { _UAT = "内容太长或者为空"; } else {
  151. U.UF.Ut.AddObj([UDE, UDE["IF"] || {}], { ArticleContentBrief: _UST, ArticleTitle: _UIT, ArticleContent: _UST });
  152. U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UU_P_U_ModifyArticle", US.userInfo.userid, UDE.ArticleID, _UIT, _UST, U.UF.M.Shorttext(_UST)]), U.MD.D.PB.A.AsynPAPMHTJ, ["", UCB];
  153. // U.UF.A.Request(US.AUTH,"pb.modifyarticle", [US.userInfo.userid, UDE.ArticleID, _UIT, _UST], U.MD.D.PB.A.AsynPAPMHTJ, ["", UCB]);
  154. }
  155. U.Alert(_UAT || "同步中"); return !_UAT;
  156. }
  157. }
  158. //提交文章异步
  159. U.MD.D.PB.A.AsynPAPMHTJ = function (r) {
  160. U.Alert("修改成功"); var _UCB = r.context[1]; r = r.value; (_UCB) && (_UCB(r));
  161. }
  162. //成功提交后修改帖子内容
  163. U.MD.D.PB.A.ModifyA = function (UDE, UDOD, UDTD, UDSD) {
  164. var _UTF, _UDPD, _UIMG, _UDMD, _UDKD, _UDRD; $("div", UDSD)[5].innerHTML = UDTD.innerHTML = UDE.ArticleTitle; UDOD.innerHTML = UDE.IF.ArticleContent;
  165. (_UDMD = $("div", UDSD)[13]).innerHTML = UDE.ArticleContentBrief; _UDPD = $(_UDMD).Parent(); _UDKD = $(_UDPD).Child(); _UIMG = $("img", _UDMD)[0]; _UDMD.innerText = _UDMD.innerText.trim();
  166. if (_UIMG) {
  167. if (_UDKD.length > 1) { _UDRD = $(_UDKD[1]).Child()[0]; _UDRD.innerText = ""; }
  168. else { if ((_UDMD.innerText = _UDMD.innerText.addEllipsis(200)) == "") { _UDMD.style.display = "none"; _UTF = true; }; _UDKD = $$("div", { "className": "UD_SYSXZBPOCR", "style": { "marginTop": _UTF ? "0px" : "", "height": (222 - Math.ceil(_UDMD.innerText.count() / 52) * 20) + "px"} }, $(_UDMD).Parent()); _UDRD = $$("div", { "onclick": U.UF.M.apply() }, _UDKD); } U.MD.D.H.JZTPJS(_UIMG.src, _UDRD, UDE);
  169. }
  170. else if (_UDKD[1]) { $(_UDKD[1]).remove(); }
  171. }
  172. //#endregion
  173. //#region 版块搜索帖子
  174. //搜索帖子
  175. U.MD.D.PB.A.TZSS = function (UDOD, UP, UDID) {
  176. var _UGE = U.MD.D.H.ET["NT"]["PB"], _userid = US.userInfo.userid,
  177. _UBE = _UGE["DBK"],
  178. _UDV = UDOD.value.trim().addEllipsis(50).valueOf();
  179. if (UDOD.value != UDOD.defaultValue && _UDV) {
  180. _UGE["USID"] = [_UDV, UDID = (UDID || (_UBE && _UBE["UserDirectoryID"]) || US.EMPTYGUID), _UGE["USID"] == _userid ? _userid : US.EMPTYGUID]; U.MD.D.PB.A.FTZSS(_UDV, UP, UDID, _UGE["USID"][2]);
  181. } //搜索帖子
  182. else { U.Alert("请正确的输入.."); }
  183. }
  184. //获取搜索帖子
  185. U.MD.D.PB.A.FTZSS = function (UDV, UP, UDID, userid) {
  186. var _UDTD = $("#UD_SYSXZBYPR")[0], _UE = UP * 30, _US = _UE - 29; (UP == 1) && (_UDTD.innerText = "");
  187. U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_P_S_PostSearch", UDID, UDV, _US, _UE, userid], U.MD.D.PB.A.AsynTZSS, [[UP == 1 ? _UDTD : UD_SYSXZBYPD, true], _UDTD, UP]); //获取搜索的帖子
  188. // U.UF.A.Request(US.AUTH,"pb.SearchArtlce", [UDV, _US, _UE, UDID, userid], U.MD.D.PB.A.AsynTZSS, [[UP == 1 ? _UDTD : UD_SYSXZBYPD, true], _UDTD, UP]); //获取搜索的帖子
  189. }
  190. //搜索帖子异步
  191. U.MD.D.PB.A.AsynTZSS = function (r) {
  192. var context = r.context,
  193. _UDOD = context[1],
  194. _UP = context[2];
  195. r = r.value;
  196. if (r) {//打印搜索
  197. if (_UP == 1) {
  198. _UDOD.innerText = "";
  199. (!r.length) && (U.MD.D.PB.PMHBKK(_UDOD));
  200. }
  201. (r.length) && (U.MD.D.PB.NSYPBL(_UDOD, r));
  202. }
  203. }
  204. //#endregion
  205. //#region 发表功能
  206. //弹出发表帖子
  207. U.MD.D.PB.A.FBTZTC = function (UDID, UAE, UCB) {
  208. if (!U.MD.U.L.isLogin(3)) {
  209. var _UDBD, _UDTD = $("#UD_SYSXZBFCA"),
  210. _UDOD = document.body,
  211. UDID = U.UF.Ut.isString(UDID) ? UDID : null,
  212. _UDE = UDID ? (_$(U.MD.D.H.ET["NT"]["PB"]["BK"]).Select({ UserDirectoryID: UDID })[0] || { UserDirectoryID: UDID }) : (U.MD.D.H.ET["NT"]["PB"]["DBK"] || null);
  213. if (_UDE) {
  214. return U.UF.UI.EditorLoad({ id: "PB_Editor", head: true, isc: false, name: UAE ? "帖子修改" : _UDE.UserDirectoryName + "帖子发表", title: UAE ? UAE.ArticleTitle : "",
  215. context: UAE ? UAE.IF.ArticleContent : "", fcb: U.UF.M.apply(_UDBD, [[U.MD.D.PB.A.FBTZMU, [_UDE, UCB]]])
  216. });
  217. }
  218. else {
  219. U.Alert("请选择版块..");
  220. }
  221. }
  222. }
  223. //我要发布点击
  224. U.MD.D.PB.A.DJWYFB = function () {
  225. var i, _UDE = U.MD.D.H.ET["NT"]["PB"]["DBK"];
  226. if (_UDE) { $("#UD_SYSXZBFCAC")[0].onmousedown(); } //直接选择发帖
  227. else {//跳转到最新里查看发帖
  228. _UDE = ["UD_SYSSTO", "UD_SYSXZBTOC"];
  229. for (i = 0; i < _UDE.length; i++) { $("#" + _UDE[i]).Child()[1].onclick(); }
  230. U.Alert("请选择目录!");
  231. }
  232. }
  233. //发表帖子
  234. U.MD.D.PB.A.FBTZMU = function (UDE, UCB, UCT, UTI) {
  235. return !U.MD.D.PB.A.FBMSSBK(UDE, UTI, UCT, UCB || U.MD.D.PB.A.AFBTZMU);
  236. }
  237. //发表帖子函数
  238. U.MD.D.PB.A.FBMSSBK = function (UDE, UTI, UCT, UCB) {
  239. var _UAT = "请登录发帖"; if ((_UAT = U.MD.D.PB.A.FBMSSBKG(UDE, UTI, UCT, UCB)) === true) { _UAT = "正在提交请稍后"; return true; }; (_UAT) && (U.Alert(_UAT)); return false;
  240. }
  241. //发表帖子处理
  242. U.MD.D.PB.A.FBMSSBKG = function (UDE, UIT, UTH, UCB) {
  243. if (!U.MD.U.L.isLogin(3)) {
  244. if (UIT.trim().length == 0 || UIT.trim().length > 40) { _UAT = "标题太长或者为空"; }
  245. else if ($$("div", { "innerHTML": UTH }).innerText.trim().length < 0) { _UAT = "内容太长或者为空"; } //不合格的发帖
  246. else {
  247. (U.UF.Ut.isString(UDE)) && (UDE = { UserDirectoryID: UDE });
  248. U.UF.A.Request(US.AUTH, ["addArticle", UDE.UserDirectoryID, UIT, UTH, "false"], U.MD.D.PB.A.AsynFBMSSBKG, ["", UDE, UIT, UTH, UCB]); return true;
  249. } //合格的发帖
  250. return _UAT; //函数回调
  251. }
  252. }
  253. //发表帖子成功的异步
  254. U.MD.D.PB.A.AsynFBMSSBKG = function (r) {
  255. var _UCE, _UBE, _UDOD = $("#UD_SYSXZBYPR")[0], context = r.context, _UDE = context[1], _UCB = context[4], _UTF = "服务器繁忙"; r = r.value; _UCE = new U.MD.D.PB.A.BMSSBTI[0, U.UF.D.toTimeStamp(new Date()), context[3], context[3], r, 0, context[2], US.userInfo.userid, US.userInfo.UserNickName, US.userInfo.UserThumbnailImageHead]
  256. if (r) {
  257. _UTF = "发表成功";
  258. if (_UDE["IF"] || US.userInfo.PB) {
  259. $("#UD_SYSXZBELSD&div")[2] = (_UDE.ACF++) + 1;
  260. _UBE = _UDE["IF"] ? _UDE["IF"][0][1] : US.userInfo.PB[1][_UDE.UserDirectoryID][1];
  261. (!_UBE.length) && (_UDOD.innerText = ""); _UBE.unshift(_UCE); //添加发帖内容
  262. }
  263. (_UCB) && (_UCB(_UCE, _UDE)); //回调查看
  264. }
  265. U.Alert(_UTF); //添加文章
  266. }
  267. //发帖子结束处理
  268. U.MD.D.PB.A.AFBTZMU = function (UCE, UDE) {
  269. U.MD.D.PB.NSYPBL($("#UD_SYSXZBYPR")[0], [UCE], UDE, true);
  270. }
  271. //发表帖子的变化
  272. U.MD.D.PB.A.BMSSBK = function (UDOD, UDE, UCE, UTF) {
  273. try {
  274. if (UDOD) {
  275. var _UH, _UDSD, _UPH, _UDPD = UDOD.parentNode, _UDMD = $("#UD_SYSXZBFC"), _UDAD = $(_UDPD).Child();
  276. if ((UTF == "none" || (UTF == "block" && $("#UD_SYSXZBFCATDO").parentg().css("display") == "none")) && _UDMD) {//
  277. (UTF == "none" && ((_UDSD = _UDPD.parentNode) != _UDMD[0])) && (_UDMD.append($(_UDPD).addAttrArray({ "onmousedown": [[U.MD.D.H.WZTJQ, [null, $(_UDPD).Child()[1]]], [U.UF.M.StopBubble]], "style": { "position": ""} })));
  278. _UDAD[_UDAD.length - 1].style.display = _UDAD[_UDAD.length - 2].style.display = _UDAD[0].style.display = UTF; UCE["height"] = ""; $(_UDPD).addAttrArray({ "style": UDE }); $(UDOD).addAttrArray({ "style": UCE }); //头部或者底部是否显示
  279. _UPH = $(_UDPD).height(); (_UPH) && (UDOD.style.height = _UPH - ($(_UDAD[0]).height() + $(_UDAD[2]).height() + 20) + "px");
  280. return true;
  281. }
  282. }
  283. } catch (e) { }
  284. (UTF != "block") && (U.UF.SI.CloseWindow($(UDOD).Parent()));
  285. }
  286. //发帖子窗体变化
  287. U.MD.D.PB.A.BMSSBKSB = function (UDOD) {
  288. var _UDPD = $(UDOD).parentg(2), _UDAD = _UDPD.childg();
  289. _UDAD.css("height", _UDPD.height() - _UDAD.height(0) - _UDAD.height(2) - 22 + "px", 1);
  290. }
  291. //取消发表帖子函数
  292. U.MD.D.PB.A.QXFBMSSBK = function (UDOD) {
  293. var _UDPD = $(UDOD).Parent(2), _UDAD = $(_UDPD).Child(); $("input", _UDPD)[0].value = _UDAD[1].innerText = "";
  294. U.MD.D.PB.A.BMSSBK(_UDAD[1], { "cssText": "" }, { "textIndent": "10px", "color": "#000" }, "none");
  295. }
  296. //帖子的实体
  297. U.MD.D.PB.A.BMSSBTI = function (UDE) {
  298. this.AricitleReadNumber = UDE[0];
  299. this.ArticleAddTime = UDE[1];
  300. this.ArticleContent = UDE[2];
  301. this.ArticleContentBrief = UDE[3];
  302. this.ArticleID = UDE[4];
  303. this.ArticleReplayNumber = UDE[5];
  304. this.ArticleTitle = UDE[6];
  305. this.UserID = UDE[7];
  306. this.UserNickName = UDE[8];
  307. this.UserThumbnailImageHead = UDE[9];
  308. }
  309. //#endregion
  310. //#endregion