CssValueFunction.cs 146 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using CB.Common;
  7. using CB.Data;
  8. using CB.Entity;
  9. using CB.Interface;
  10. namespace CB.TrendChart
  11. {
  12. public class CssValueFunction
  13. {
  14. #region 单值
  15. /// <summary>
  16. /// 单值单列期号
  17. /// </summary>
  18. /// <param name="isValue"></param>
  19. /// <param name="fomart"></param>
  20. /// <param name="attr"></param>
  21. /// <param name="css"></param>
  22. /// <param name="itemValue"></param>
  23. /// <param name="index"></param>
  24. /// <returns></returns>
  25. public static string SingleCell_TermItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  26. string itemValue, int index)
  27. {
  28. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  29. }
  30. /// <summary>
  31. /// 单值单列开奖号012路值
  32. /// </summary>
  33. /// <param name="isValue"></param>
  34. /// <param name="fomart"></param>
  35. /// <param name="attr"></param>
  36. /// <param name="css"></param>
  37. /// <param name="itemValue"></param>
  38. /// <param name="index"></param>
  39. /// <returns></returns>
  40. public static string SingleCell_012StatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  41. string itemValue, int index)
  42. {
  43. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  44. }
  45. /// <summary>
  46. /// 单值单列和尾
  47. /// </summary>
  48. /// <param name="isValue"></param>
  49. /// <param name="fomart"></param>
  50. /// <param name="attr"></param>
  51. /// <param name="css"></param>
  52. /// <param name="itemValue"></param>
  53. /// <param name="index"></param>
  54. /// <returns></returns>
  55. public static string SingleCell_HeWeiItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  56. string itemValue, int index)
  57. {
  58. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  59. }
  60. /// <summary>
  61. /// 单值单列跨度值
  62. /// </summary>
  63. /// <param name="isValue"></param>
  64. /// <param name="fomart"></param>
  65. /// <param name="attr"></param>
  66. /// <param name="css"></param>
  67. /// <param name="itemValue"></param>
  68. /// <param name="index"></param>
  69. /// <returns></returns>
  70. public static string SingleCell_SpanItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  71. string itemValue, int index)
  72. {
  73. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  74. }
  75. /// <summary>
  76. /// 单值单列组三跨度值
  77. /// </summary>
  78. /// <param name="isValue"></param>
  79. /// <param name="fomart"></param>
  80. /// <param name="attr"></param>
  81. /// <param name="css"></param>
  82. /// <param name="itemValue"></param>
  83. /// <param name="index"></param>
  84. /// <returns></returns>
  85. public static string SingleCell_ZSSpanItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  86. string itemValue, int index)
  87. {
  88. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  89. }
  90. /// <summary>
  91. /// 单值单列和值
  92. /// </summary>
  93. /// <param name="isValue"></param>
  94. /// <param name="fomart"></param>
  95. /// <param name="attr"></param>
  96. /// <param name="css"></param>
  97. /// <param name="itemValue"></param>
  98. /// <param name="index"></param>
  99. /// <returns></returns>
  100. public static string SingleCell_SumItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  101. string itemValue, int index)
  102. {
  103. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  104. }
  105. /// <summary>
  106. /// 单值单列试机号
  107. /// </summary>
  108. /// <param name="isValue"></param>
  109. /// <param name="fomart"></param>
  110. /// <param name="attr"></param>
  111. /// <param name="css"></param>
  112. /// <param name="itemValue"></param>
  113. /// <param name="index"></param>
  114. /// <returns></returns>
  115. public static string SingleCell_ShiJiHaoItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  116. string itemValue, int index)
  117. {
  118. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  119. }
  120. /// <summary>
  121. /// 单值多列试机号分布
  122. /// </summary>
  123. /// <param name="isValue"></param>
  124. /// <param name="fomart"></param>
  125. /// <param name="attr"></param>
  126. /// <param name="css"></param>
  127. /// <param name="itemValue"></param>
  128. /// <param name="index"></param>
  129. /// <returns></returns>
  130. public static string SingleValue_ShiJiHao(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  131. string itemValue, int index)
  132. {
  133. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  134. }
  135. /// <summary>
  136. /// 单值多列组三形态
  137. /// </summary>
  138. /// <param name="isValue"></param>
  139. /// <param name="fomart"></param>
  140. /// <param name="attr"></param>
  141. /// <param name="css"></param>
  142. /// <param name="itemValue"></param>
  143. /// <param name="index"></param>
  144. /// <returns></returns>
  145. public static string SingleValue_ZsStatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  146. string itemValue, int index)
  147. {
  148. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  149. }
  150. /// <summary>
  151. /// 单值多列组三奇偶形态
  152. /// </summary>
  153. /// <param name="isValue"></param>
  154. /// <param name="fomart"></param>
  155. /// <param name="attr"></param>
  156. /// <param name="css"></param>
  157. /// <param name="itemValue"></param>
  158. /// <param name="index"></param>
  159. /// <returns></returns>
  160. public static string SingleValue_ZsJoStatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  161. string itemValue, int index)
  162. {
  163. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  164. }
  165. /// <summary>
  166. /// 单值多列和尾分布形态
  167. /// </summary>
  168. /// <param name="isValue"></param>
  169. /// <param name="fomart"></param>
  170. /// <param name="attr"></param>
  171. /// <param name="css"></param>
  172. /// <param name="itemValue"></param>
  173. /// <param name="index"></param>
  174. /// <returns></returns>
  175. public static string SingleValue_HeWeiItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  176. string itemValue, int index)
  177. {
  178. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  179. }
  180. /// <summary>
  181. /// 单值多列组三大小形态
  182. /// </summary>
  183. /// <param name="isValue"></param>
  184. /// <param name="fomart"></param>
  185. /// <param name="attr"></param>
  186. /// <param name="css"></param>
  187. /// <param name="itemValue"></param>
  188. /// <param name="index"></param>
  189. /// <returns></returns>
  190. public static string SingleValue_ZsDxStatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  191. string itemValue, int index)
  192. {
  193. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  194. }
  195. /// <summary>
  196. /// 单值多列组三012形态
  197. /// </summary>
  198. /// <param name="isValue"></param>
  199. /// <param name="fomart"></param>
  200. /// <param name="attr"></param>
  201. /// <param name="css"></param>
  202. /// <param name="itemValue"></param>
  203. /// <param name="index"></param>
  204. /// <returns></returns>
  205. public static string SingleValue_Zs012StatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  206. string itemValue, int index)
  207. {
  208. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  209. }
  210. /// <summary>
  211. /// 单值单列后区号码
  212. /// </summary>
  213. /// <param name="isValue"></param>
  214. /// <param name="fomart"></param>
  215. /// <param name="attr"></param>
  216. /// <param name="css"></param>
  217. /// <param name="itemValue"></param>
  218. /// <param name="index"></param>
  219. /// <returns></returns>
  220. public static string SingleCell_HqItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  221. string itemValue, int index)
  222. {
  223. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  224. }
  225. /// <summary>
  226. /// 单值单列重号项
  227. /// </summary>
  228. /// <param name="isValue"></param>
  229. /// <param name="fomart"></param>
  230. /// <param name="attr"></param>
  231. /// <param name="css"></param>
  232. /// <param name="itemValue"></param>
  233. /// <param name="index"></param>
  234. /// <returns></returns>
  235. public static string SingleCell_RepeatedNumber(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  236. string itemValue, int index)
  237. {
  238. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  239. }
  240. /// <summary>
  241. /// 单值单列连号项
  242. /// </summary>
  243. /// <param name="isValue"></param>
  244. /// <param name="fomart"></param>
  245. /// <param name="attr"></param>
  246. /// <param name="css"></param>
  247. /// <param name="itemValue"></param>
  248. /// <param name="index"></param>
  249. /// <returns></returns>
  250. public static string SingleCell_LinkNumber(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  251. string itemValue, int index)
  252. {
  253. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  254. }
  255. /// <summary>
  256. /// 和值(区间)分布
  257. /// </summary>
  258. /// <param name="isValue"></param>
  259. /// <param name="fomart"></param>
  260. /// <param name="attr"></param>
  261. /// <param name="css"></param>
  262. /// <param name="itemValue"></param>
  263. /// <param name="index"></param>
  264. /// <returns></returns>
  265. public static string SingleValue_SumItemGroup(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  266. string itemValue, int index)
  267. {
  268. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  269. }
  270. /// <summary>
  271. /// 单值单列开奖号码
  272. /// </summary>
  273. /// <param name="isValue"></param>
  274. /// <param name="fomart"></param>
  275. /// <param name="attr"></param>
  276. /// <param name="css"></param>
  277. /// <param name="itemValue"></param>
  278. /// <param name="index"></param>
  279. /// <returns></returns>
  280. public static string SingleCell_OpenCodeItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  281. string itemValue, int index)
  282. {
  283. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  284. }
  285. /// <summary>
  286. /// 单值单列012比
  287. /// </summary>
  288. /// <param name="isValue"></param>
  289. /// <param name="fomart"></param>
  290. /// <param name="attr"></param>
  291. /// <param name="css"></param>
  292. /// <param name="itemValue"></param>
  293. /// <param name="index"></param>
  294. /// <returns></returns>
  295. public static string SingleCell_ProportionOf012Item(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  296. string itemValue, int index)
  297. {
  298. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  299. }
  300. /// <summary>
  301. /// 单值单列大小比例
  302. /// </summary>
  303. /// <param name="isValue"></param>
  304. /// <param name="fomart"></param>
  305. /// <param name="attr"></param>
  306. /// <param name="css"></param>
  307. /// <param name="itemValue"></param>
  308. /// <param name="index"></param>
  309. /// <returns></returns>
  310. public static string SingleCell_ProportionOfDxItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  311. string itemValue, int index)
  312. {
  313. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  314. }
  315. /// <summary>
  316. /// 单值单列质合形态比例
  317. /// </summary>
  318. /// <param name="isValue"></param>
  319. /// <param name="fomart"></param>
  320. /// <param name="attr"></param>
  321. /// <param name="css"></param>
  322. /// <param name="itemValue"></param>
  323. /// <param name="index"></param>
  324. /// <returns></returns>
  325. public static string SingleCell_ProportionOfZhItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  326. string itemValue, int index)
  327. {
  328. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  329. }
  330. /// <summary>
  331. /// 单值单列奇偶比例
  332. /// </summary>
  333. /// <param name="isValue"></param>
  334. /// <param name="fomart"></param>
  335. /// <param name="attr"></param>
  336. /// <param name="css"></param>
  337. /// <param name="itemValue"></param>
  338. /// <param name="index"></param>
  339. /// <returns></returns>
  340. public static string SingleCell_ProportionOfJoItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  341. string itemValue, int index)
  342. {
  343. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  344. }
  345. /// <summary>
  346. /// 单值多列号码项
  347. /// </summary>
  348. /// <param name="isValue"></param>
  349. /// <param name="fomart"></param>
  350. /// <param name="attr"></param>
  351. /// <param name="css"></param>
  352. /// <param name="itemValue"></param>
  353. /// <param name="index"></param>
  354. /// <returns></returns>
  355. public static string SingleValue_NumberItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  356. {
  357. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  358. }
  359. /// <summary>
  360. /// 单值多列大小状态项
  361. /// </summary>
  362. /// <param name="isValue"></param>
  363. /// <param name="fomart"></param>
  364. /// <param name="attr"></param>
  365. /// <param name="css"></param>
  366. /// <param name="itemValue"></param>
  367. /// <param name="index"></param>
  368. /// <returns></returns>
  369. public static string SingleValue_DaXiaoStatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  370. {
  371. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  372. }
  373. /// <summary>
  374. /// 单值多列012分布项
  375. /// </summary>
  376. /// <param name="isValue"></param>
  377. /// <param name="fomart"></param>
  378. /// <param name="attr"></param>
  379. /// <param name="css"></param>
  380. /// <param name="itemValue"></param>
  381. /// <param name="index"></param>
  382. /// <returns></returns>
  383. public static string SingleValue_Number012StatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  384. {
  385. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  386. }
  387. /// <summary>
  388. /// 单值多列奇偶状态项
  389. /// </summary>
  390. /// <param name="isValue"></param>
  391. /// <param name="fomart"></param>
  392. /// <param name="attr"></param>
  393. /// <param name="css"></param>
  394. /// <param name="itemValue"></param>
  395. /// <param name="index"></param>
  396. /// <returns></returns>
  397. public static string SingleValue_JiOuStatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  398. {
  399. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  400. }
  401. /// <summary>
  402. /// 单值多列多于两个号码跨度项
  403. /// </summary>
  404. /// <param name="isValue"></param>
  405. /// <param name="fomart"></param>
  406. /// <param name="attr"></param>
  407. /// <param name="css"></param>
  408. /// <param name="itemValue"></param>
  409. /// <param name="index"></param>
  410. /// <returns></returns>
  411. public static string SingleValue_SpanItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  412. {
  413. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  414. }
  415. /// <summary>
  416. /// 单值多列两个号码跨度项
  417. /// </summary>
  418. /// <param name="isValue"></param>
  419. /// <param name="fomart"></param>
  420. /// <param name="attr"></param>
  421. /// <param name="css"></param>
  422. /// <param name="itemValue"></param>
  423. /// <param name="index"></param>
  424. /// <returns></returns>
  425. public static string SingleValue_SpanNumberItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  426. {
  427. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  428. }
  429. /// <summary>
  430. /// 单值多列开奖号码和值奇偶分布项
  431. /// </summary>
  432. /// <param name="isValue"></param>
  433. /// <param name="fomart"></param>
  434. /// <param name="attr"></param>
  435. /// <param name="css"></param>
  436. /// <param name="itemValue"></param>
  437. /// <param name="index"></param>
  438. /// <returns></returns>
  439. public static string SingleValue_HzJoStatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  440. {
  441. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  442. }
  443. /// <summary>
  444. /// 单值多列开奖号码和值大小分布项
  445. /// </summary>
  446. /// <param name="isValue"></param>
  447. /// <param name="fomart"></param>
  448. /// <param name="attr"></param>
  449. /// <param name="css"></param>
  450. /// <param name="itemValue"></param>
  451. /// <param name="index"></param>
  452. /// <returns></returns>
  453. public static string SingleValue_HzDxStatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  454. {
  455. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  456. }
  457. /// <summary>
  458. /// 单值多列开奖号码和值分布
  459. /// </summary>
  460. /// <param name="isValue"></param>
  461. /// <param name="fomart"></param>
  462. /// <param name="attr"></param>
  463. /// <param name="css"></param>
  464. /// <param name="itemValue"></param>
  465. /// <param name="index"></param>
  466. /// <returns></returns>
  467. public static string SingleValue_SumItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  468. {
  469. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  470. }
  471. /// <summary>
  472. /// 单值单列开奖号码质合项
  473. /// </summary>
  474. /// <param name="isValue"></param>
  475. /// <param name="fomart"></param>
  476. /// <param name="attr"></param>
  477. /// <param name="css"></param>
  478. /// <param name="itemValue"></param>
  479. /// <param name="index"></param>
  480. /// <returns></returns>
  481. public static string SingleCell_ZhiHeStatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  482. {
  483. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  484. }
  485. /// <summary>
  486. /// 单值多列开奖号码质合分布项
  487. /// </summary>
  488. /// <param name="isValue"></param>
  489. /// <param name="fomart"></param>
  490. /// <param name="attr"></param>
  491. /// <param name="css"></param>
  492. /// <param name="itemValue"></param>
  493. /// <param name="index"></param>
  494. /// <returns></returns>
  495. public static string SingleValue_ZhiHeStatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  496. {
  497. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  498. }
  499. /// <summary>
  500. /// 单值多列组三类型
  501. /// </summary>
  502. /// <param name="isValue"></param>
  503. /// <param name="fomart"></param>
  504. /// <param name="attr"></param>
  505. /// <param name="css"></param>
  506. /// <param name="itemValue"></param>
  507. /// <param name="index"></param>
  508. /// <returns></returns>
  509. public static string SingleValue_ZuHeStatusItem<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  510. {
  511. if (itemValue == "组三")
  512. {
  513. return GetCssValue(isValue, fomart, attr, css, "3", index);
  514. }
  515. if (itemValue == "组六")
  516. {
  517. return GetCssValueExtend1(isValue, fomart, attr, css, "6", index);
  518. }
  519. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  520. }
  521. /// <summary>
  522. /// 单值单列双色球AC值
  523. /// </summary>
  524. /// <param name="isValue"></param>
  525. /// <param name="fomart"></param>
  526. /// <param name="attr"></param>
  527. /// <param name="css"></param>
  528. /// <param name="itemValue"></param>
  529. /// <param name="index"></param>
  530. /// <returns></returns>
  531. public static string SingleCell_Ac<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  532. {
  533. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  534. }
  535. /// <summary>
  536. /// 单值单列双色球三区比
  537. /// </summary>
  538. /// <param name="isValue"></param>
  539. /// <param name="fomart"></param>
  540. /// <param name="attr"></param>
  541. /// <param name="css"></param>
  542. /// <param name="itemValue"></param>
  543. /// <param name="index"></param>
  544. /// <returns></returns>
  545. public static string SingleCell_SanQu<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  546. {
  547. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  548. }
  549. /// <summary>
  550. /// 单值单列AC值奇偶值
  551. /// </summary>
  552. /// <param name="isValue"></param>
  553. /// <param name="fomart"></param>
  554. /// <param name="attr"></param>
  555. /// <param name="css"></param>
  556. /// <param name="itemValue"></param>
  557. /// <param name="index"></param>
  558. /// <returns></returns>
  559. public static string SingleCell_AcJiOu<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  560. {
  561. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  562. }
  563. /// <summary>
  564. /// 单值单列AC值质合值
  565. /// </summary>
  566. /// <param name="isValue"></param>
  567. /// <param name="fomart"></param>
  568. /// <param name="attr"></param>
  569. /// <param name="css"></param>
  570. /// <param name="itemValue"></param>
  571. /// <param name="index"></param>
  572. /// <returns></returns>
  573. public static string SingleCell_AcZhiHe<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  574. {
  575. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  576. }
  577. /// <summary>
  578. /// 单值单列AC值012路
  579. /// </summary>
  580. /// <param name="isValue"></param>
  581. /// <param name="fomart"></param>
  582. /// <param name="attr"></param>
  583. /// <param name="css"></param>
  584. /// <param name="itemValue"></param>
  585. /// <param name="index"></param>
  586. /// <returns></returns>
  587. public static string SingleCell_Ac012Lu<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  588. {
  589. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  590. }
  591. /// <summary>
  592. /// 和尾奇偶状态
  593. /// </summary>
  594. /// <param name="isValue"></param>
  595. /// <param name="fomart"></param>
  596. /// <param name="attr"></param>
  597. /// <param name="css"></param>
  598. /// <param name="itemValue"></param>
  599. /// <param name="index"></param>
  600. /// <returns></returns>
  601. public static string SingleValue_HeWeiJiOu<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  602. {
  603. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  604. }
  605. /// <summary>
  606. /// 单值单列试机号和值项
  607. /// </summary>
  608. /// <param name="isValue"></param>
  609. /// <param name="fomart"></param>
  610. /// <param name="attr"></param>
  611. /// <param name="css"></param>
  612. /// <param name="itemValue"></param>
  613. /// <param name="index"></param>
  614. /// <returns></returns>
  615. public static string SingleCell_ShiJiHaoHzItem<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  616. {
  617. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  618. }
  619. /// <summary>
  620. /// 单值单列试机号跨度项
  621. /// </summary>
  622. /// <param name="isValue"></param>
  623. /// <param name="fomart"></param>
  624. /// <param name="attr"></param>
  625. /// <param name="css"></param>
  626. /// <param name="itemValue"></param>
  627. /// <param name="index"></param>
  628. /// <returns></returns>
  629. public static string SingleCell_ShiJiHaoSpanItem<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  630. {
  631. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  632. }
  633. /// <summary>
  634. /// 单值单列试机号大小比项
  635. /// </summary>
  636. /// <param name="isValue"></param>
  637. /// <param name="fomart"></param>
  638. /// <param name="attr"></param>
  639. /// <param name="css"></param>
  640. /// <param name="itemValue"></param>
  641. /// <param name="index"></param>
  642. /// <returns></returns>
  643. public static string SingleCell_ProportionOfShiJiHaoDxItem<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  644. {
  645. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  646. }
  647. /// <summary>
  648. /// 单值多列试机号组三组六类型比项
  649. /// </summary>
  650. /// <param name="isValue"></param>
  651. /// <param name="fomart"></param>
  652. /// <param name="attr"></param>
  653. /// <param name="css"></param>
  654. /// <param name="itemValue"></param>
  655. /// <param name="index"></param>
  656. /// <returns></returns>
  657. public static string SingleValue_ShiJiHaoTypeItem<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  658. {
  659. if (itemValue == "组三")
  660. {
  661. return GetCssValue(isValue, fomart, attr, css, "3", index);
  662. }
  663. if (itemValue == "组六")
  664. {
  665. return GetCssValueExtend1(isValue, fomart, attr, css, "6", index);
  666. }
  667. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  668. }
  669. /// <summary>
  670. /// 单值单列组三号码
  671. /// </summary>
  672. /// <param name="isValue"></param>
  673. /// <param name="fomart"></param>
  674. /// <param name="attr"></param>
  675. /// <param name="css"></param>
  676. /// <param name="itemValue"></param>
  677. /// <param name="index"></param>
  678. /// <returns></returns>
  679. public static string SingleCell_ZsHaoMaItem<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  680. {
  681. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  682. }
  683. /// <summary>
  684. /// 单值单列组三遗漏
  685. /// </summary>
  686. /// <param name="isValue"></param>
  687. /// <param name="fomart"></param>
  688. /// <param name="attr"></param>
  689. /// <param name="css"></param>
  690. /// <param name="itemValue"></param>
  691. /// <param name="index"></param>
  692. /// <returns></returns>
  693. public static string SingleCell_ZsMissItem<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  694. {
  695. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  696. }
  697. /// <summary>
  698. /// 单值单列试机号奇偶比比项
  699. /// </summary>
  700. /// <param name="isValue"></param>
  701. /// <param name="fomart"></param>
  702. /// <param name="attr"></param>
  703. /// <param name="css"></param>
  704. /// <param name="itemValue"></param>
  705. /// <param name="index"></param>
  706. /// <returns></returns>
  707. public static string SingleCell_ProportionOfShiJiHaoJoItem<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  708. {
  709. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  710. }
  711. #endregion
  712. #region 多值
  713. /// <summary>
  714. /// 多值多列重号分布
  715. /// </summary>
  716. /// <param name="isValue"></param>
  717. /// <param name="fomart"></param>
  718. /// <param name="attr"></param>
  719. /// <param name="css"></param>
  720. /// <param name="itemValue"></param>
  721. /// <param name="index"></param>
  722. /// <returns></returns>
  723. public static string MultiValue_RepeatNumber<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  724. {
  725. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  726. //上一期数据 ,下一期数据
  727. IList<int> lastOpenCode = null, nextOpenCode = null;
  728. //根据Cid判断_彩种
  729. switch (ItemConfig.Cid)
  730. {
  731. case 2:
  732. case 3: //P5
  733. IList<TCP3Info> TCP3lastList = TCP3Service.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  734. if (null != TCP3lastList && TCP3lastList[0].Term == LocalEntity.Term && TCP3lastList.Count == 2)
  735. {
  736. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCP3lastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  737. }
  738. IList<TCP3Info> TCP3nextList = TCP3Service.ToListForNextTrend(LocalEntity.Term, null);
  739. if (null != TCP3nextList && TCP3nextList[0].Term == LocalEntity.Term && TCP3nextList.Count == 2)//获取后一期开奖数据
  740. {
  741. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCP3nextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  742. }
  743. if (null != lastOpenCode && lastOpenCode.Contains(itemValue.ToInt())) //如果上期开奖号码中有本期项值(即重号)
  744. {
  745. return GetCssValueExtend1(isValue, fomart, attr, css, itemValue, index);
  746. }
  747. if (null != nextOpenCode && nextOpenCode.Contains(itemValue.ToInt())) //如果下期开奖号码中有本期项值(即重号)
  748. {
  749. return GetCssValueExtend1(isValue, fomart, attr, css, itemValue, index);
  750. }
  751. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  752. case 4: //双色球
  753. IList<FCSSQInfo> FCSSQlastList = FCSSQService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  754. if (null != FCSSQlastList && FCSSQlastList[0].Term == LocalEntity.Term && FCSSQlastList.Count == 2)
  755. {
  756. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  757. }
  758. IList<FCSSQInfo> FCSSQnextList = FCSSQService.ToListForNextTrend(LocalEntity.Term, null);
  759. if (null != FCSSQnextList && FCSSQnextList[0].Term == LocalEntity.Term && FCSSQnextList.Count == 2)//获取后一期开奖数据
  760. {
  761. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  762. }
  763. if (css != null) //有样式
  764. {
  765. if (css.ChildList == null) //没有子样式
  766. {
  767. if (isValue) //项值
  768. {
  769. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  770. }
  771. else //遗漏
  772. {
  773. return string.Format(fomart, css.MissCssName, attr, itemValue);
  774. }
  775. }
  776. else //有子样式
  777. {
  778. foreach (var item in css.ChildList)
  779. {
  780. for (int i = item.endNum; i >= item.startNum; i--)
  781. {
  782. if (isValue)
  783. {
  784. if (index == i - css.ChildList[0].startNum)
  785. {
  786. if (null != lastOpenCode && lastOpenCode.Contains(itemValue.ToInt())) //如果上期开奖号码中有本期项值(即重号)
  787. {
  788. return string.Format(fomart, item.Extend1, attr, itemValue);
  789. }
  790. if (null != nextOpenCode && nextOpenCode.Contains(itemValue.ToInt())) //如果下期开奖号码中有本期项值(即重号)
  791. {
  792. return string.Format(fomart, item.Extend1, attr, itemValue);
  793. }
  794. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  795. }
  796. }
  797. else
  798. {
  799. if (index == i - css.ChildList[0].startNum)
  800. {
  801. return string.Format(fomart, item.MissCssName, attr, itemValue);
  802. }
  803. }
  804. }
  805. }
  806. }
  807. }
  808. break;
  809. case 5: //七乐彩
  810. IList<FCQLCInfo> FCQLClastList = FCQLCService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  811. if (null != FCQLClastList && FCQLClastList[0].Term == LocalEntity.Term && FCQLClastList.Count == 2)
  812. {
  813. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCQLClastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  814. }
  815. IList<FCQLCInfo> FCQLCnextList = FCQLCService.ToListForNextTrend(LocalEntity.Term, null);
  816. if (null != FCQLCnextList && FCQLCnextList[0].Term == LocalEntity.Term && FCQLCnextList.Count == 2)//获取后一期开奖数据
  817. {
  818. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCQLCnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  819. }
  820. if (css != null) //有样式
  821. {
  822. if (css.ChildList == null) //没有子样式
  823. {
  824. if (isValue) //项值
  825. {
  826. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  827. }
  828. else //遗漏
  829. {
  830. return string.Format(fomart, css.MissCssName, attr, itemValue);
  831. }
  832. }
  833. else //有子样式
  834. {
  835. foreach (var item in css.ChildList)
  836. {
  837. for (int i = item.endNum; i >= item.startNum; i--)
  838. {
  839. if (isValue)
  840. {
  841. if (index == i - css.ChildList[0].startNum)
  842. {
  843. if (null != lastOpenCode && lastOpenCode.Contains(itemValue.ToInt())) //如果上期开奖号码中有本期项值(即重号)
  844. {
  845. if (list[list.Count - 1] == itemValue.ToInt()) //是特别号码
  846. {
  847. return string.Format(fomart, item.Extend3, attr, itemValue);
  848. }
  849. return string.Format(fomart, item.Extend2, attr, itemValue);
  850. }
  851. if (null != nextOpenCode && nextOpenCode.Contains(itemValue.ToInt())) //如果下期开奖号码中有本期项值(即重号)
  852. {
  853. if (list[list.Count - 1] == itemValue.ToInt()) //是特别号码
  854. {
  855. return string.Format(fomart, item.Extend3, attr, itemValue);
  856. }
  857. return string.Format(fomart, item.Extend2, attr, itemValue);
  858. }
  859. if (list[list.Count - 1] == itemValue.ToInt()) //是特别号码
  860. {
  861. return string.Format(fomart, item.Extend1, attr, itemValue);
  862. }
  863. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  864. }
  865. }
  866. else
  867. {
  868. if (index == i - css.ChildList[0].startNum)
  869. {
  870. return string.Format(fomart, item.MissCssName, attr, itemValue);
  871. }
  872. }
  873. }
  874. }
  875. }
  876. }
  877. break;
  878. case 12: //大乐透
  879. IList<TCDLTInfo> TCDLTlastList = TCDLTService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  880. if (null != TCDLTlastList && TCDLTlastList[0].Term == LocalEntity.Term && TCDLTlastList.Count == 2)
  881. {
  882. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  883. }
  884. IList<TCDLTInfo> TCDLTnextList = TCDLTService.ToListForNextTrend(LocalEntity.Term, null);
  885. if (null != TCDLTnextList && TCDLTnextList[0].Term == LocalEntity.Term && TCDLTnextList.Count == 2)//获取后一期开奖数据
  886. {
  887. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  888. }
  889. if (css != null) //有样式
  890. {
  891. if (css.ChildList == null) //没有子样式
  892. {
  893. if (isValue) //项值
  894. {
  895. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  896. }
  897. else //遗漏
  898. {
  899. return string.Format(fomart, css.MissCssName, attr, itemValue);
  900. }
  901. }
  902. else //有子样式
  903. {
  904. foreach (var item in css.ChildList)
  905. {
  906. for (int i = item.endNum; i >= item.startNum; i--)
  907. {
  908. if (isValue)
  909. {
  910. if (index == i - css.ChildList[0].startNum)
  911. {
  912. if (null != lastOpenCode && lastOpenCode.Contains(itemValue.ToInt())) //如果上期开奖号码中有本期项值(即重号)
  913. {
  914. return string.Format(fomart, item.Extend1, attr, itemValue);
  915. }
  916. if (null != nextOpenCode && nextOpenCode.Contains(itemValue.ToInt())) //如果下期开奖号码中有本期项值(即重号)
  917. {
  918. return string.Format(fomart, item.Extend1, attr, itemValue);
  919. }
  920. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  921. }
  922. }
  923. else
  924. {
  925. if (index == i - css.ChildList[0].startNum)
  926. {
  927. return string.Format(fomart, item.MissCssName, attr, itemValue);
  928. }
  929. }
  930. }
  931. }
  932. }
  933. }
  934. break;
  935. }
  936. return string.Format(fomart, "", attr, itemValue); //没有样式(填充默认颜色)
  937. }
  938. /// <summary>
  939. /// 多值多列连号
  940. /// </summary>
  941. /// <param name="isValue"></param>
  942. /// <param name="fomart"></param>
  943. /// <param name="attr"></param>
  944. /// <param name="css"></param>
  945. /// <param name="itemValue"></param>
  946. /// <param name="index"></param>
  947. /// <returns></returns>
  948. public static string MultiValue_LinkNumber<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  949. {
  950. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  951. //根据Cid判断_彩种
  952. switch (ItemConfig.Cid)
  953. {
  954. case 4: //双色球
  955. if (css != null) //有样式
  956. {
  957. if (css.ChildList == null) //没有子样式
  958. {
  959. if (isValue) //项值
  960. {
  961. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  962. }
  963. else //遗漏
  964. {
  965. return string.Format(fomart, css.MissCssName, attr, itemValue);
  966. }
  967. }
  968. else //有子样式
  969. {
  970. foreach (var item in css.ChildList)
  971. {
  972. for (int i = item.endNum; i >= item.startNum; i--)
  973. {
  974. if (isValue)
  975. {
  976. if (index == i - css.ChildList[0].startNum)
  977. {
  978. if (list.Contains(itemValue.ToInt() - 1) || list.Contains(itemValue.ToInt() + 1)) //是连号用扩展样式1
  979. {
  980. return string.Format(fomart, item.Extend1, attr, itemValue);
  981. }
  982. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  983. }
  984. }
  985. else
  986. {
  987. if (index == i - css.ChildList[0].startNum)
  988. {
  989. return string.Format(fomart, item.MissCssName, attr, itemValue);
  990. }
  991. }
  992. }
  993. }
  994. }
  995. }
  996. break;
  997. case 5: //七乐彩
  998. if (css != null) //有样式
  999. {
  1000. if (css.ChildList == null) //没有子样式
  1001. {
  1002. if (isValue) //项值
  1003. {
  1004. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1005. }
  1006. else //遗漏
  1007. {
  1008. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1009. }
  1010. }
  1011. else //有子样式
  1012. {
  1013. foreach (var item in css.ChildList)
  1014. {
  1015. for (int i = item.endNum; i >= item.startNum; i--)
  1016. {
  1017. if (isValue)
  1018. {
  1019. if (index == i - css.ChildList[0].startNum)
  1020. {
  1021. if (list.Contains(itemValue.ToInt() - 1) || list.Contains(itemValue.ToInt() + 1)) //是连号用扩展样式(红球用扩展2,蓝球用扩展3)
  1022. {
  1023. if (itemValue.ToInt() == list[list.Count - 1])//蓝球连号
  1024. {
  1025. return string.Format(fomart, item.Extend3, attr, itemValue);
  1026. }
  1027. return string.Format(fomart, item.Extend2, attr, itemValue);
  1028. }
  1029. if (itemValue.ToInt() == list[list.Count - 1])//不是连号,是项值(蓝球)
  1030. {
  1031. return string.Format(fomart, item.Extend1, attr, itemValue);
  1032. }
  1033. return string.Format(fomart, item.NumberCssName, attr, itemValue);//不是连号,是项值(红球)
  1034. }
  1035. }
  1036. else
  1037. {
  1038. if (index == i - css.ChildList[0].startNum)
  1039. {
  1040. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1041. }
  1042. }
  1043. }
  1044. }
  1045. }
  1046. }
  1047. break;
  1048. case 12: //大乐透
  1049. if (css != null) //有样式
  1050. {
  1051. if (css.ChildList == null) //没有子样式
  1052. {
  1053. if (isValue) //项值
  1054. {
  1055. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1056. }
  1057. else //遗漏
  1058. {
  1059. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1060. }
  1061. }
  1062. else //有子样式
  1063. {
  1064. foreach (var item in css.ChildList)
  1065. {
  1066. for (int i = item.endNum; i >= item.startNum; i--)
  1067. {
  1068. if (isValue)
  1069. {
  1070. if (index == i - css.ChildList[0].startNum)
  1071. {
  1072. if (list.Contains(itemValue.ToInt() - 1) || list.Contains(itemValue.ToInt() + 1)) //是连号用扩展样式1
  1073. {
  1074. return string.Format(fomart, item.Extend1, attr, itemValue);
  1075. }
  1076. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  1077. }
  1078. }
  1079. else
  1080. {
  1081. if (index == i - css.ChildList[0].startNum)
  1082. {
  1083. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1084. }
  1085. }
  1086. }
  1087. }
  1088. }
  1089. }
  1090. break;
  1091. }
  1092. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  1093. }
  1094. /// <summary>
  1095. /// 多值多列开奖号码
  1096. /// </summary>
  1097. /// <param name="isValue"></param>
  1098. /// <param name="fomart"></param>
  1099. /// <param name="attr"></param>
  1100. /// <param name="css"></param>
  1101. /// <param name="itemValue"></param>
  1102. /// <param name="index"></param>
  1103. /// <returns></returns>
  1104. public static string MultiValue_OpenCodeItem<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  1105. {
  1106. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1107. IDictionary<int, int> d = new Dictionary<int, int>();
  1108. //根据Cid判断_彩种
  1109. switch (ItemConfig.Cid)
  1110. {
  1111. case 1: //福彩3D
  1112. case 2: //体彩P3
  1113. case 88: //江苏快3 djp 2016-06-16 新增组三样式形态
  1114. case 86: //安徽快3
  1115. case 87: //湖北快3 暂未开奖2016-06-16
  1116. case 89: //吉林快3
  1117. case 96: //河北快3
  1118. case 97: //内蒙古快3
  1119. foreach (var item in list)
  1120. {
  1121. if (!d.ContainsKey(item))
  1122. d.Add(item, 0);
  1123. d[item]++;
  1124. }
  1125. foreach (var item in d.Keys)
  1126. {
  1127. if (2 == d[item])
  1128. {
  1129. if (item.ToString() == itemValue)
  1130. {
  1131. return GetCssValueExtend1(isValue, fomart, attr, css, itemValue, index);
  1132. }
  1133. }
  1134. if (3 == d[item])
  1135. {
  1136. return GetCssValueExtend2(isValue, fomart, attr, css, itemValue, index);
  1137. }
  1138. }
  1139. break;
  1140. case 5: //七乐彩
  1141. case 60: //福建31选7
  1142. case 61: //福建36选7
  1143. case 65: //华东15选5
  1144. case 68: //新疆35选7
  1145. case 69: //南粤36选7
  1146. if (list[list.Count - 1].ToString() == itemValue)
  1147. {
  1148. return GetCssValueExtend1(isValue, fomart, attr, css, itemValue, index);
  1149. }
  1150. break;
  1151. case 19: //七星彩
  1152. foreach (var item in list)
  1153. {
  1154. if (!d.ContainsKey(item))
  1155. d.Add(item, 0);
  1156. d[item]++;
  1157. }
  1158. foreach (var item in d.Keys)
  1159. {
  1160. if (2 <= d[item])
  1161. {
  1162. if (item.ToString() == itemValue)
  1163. {
  1164. return GetCssValueExtend1(isValue, fomart, attr, css, itemValue, index);
  1165. }
  1166. }
  1167. }
  1168. break;
  1169. case 103: //快乐扑克3
  1170. {
  1171. foreach (var item in list)
  1172. {
  1173. var _p = item % 100;
  1174. if (!d.ContainsKey(_p))
  1175. d.Add(_p, 0);
  1176. d[_p]++;
  1177. }
  1178. foreach (var item in d.Keys)
  1179. {
  1180. if (2 == d[item])
  1181. {
  1182. if (item.ToString() == itemValue)
  1183. {
  1184. return GetCssValueExtend1(isValue, fomart, attr, css, itemValue, index);
  1185. }
  1186. }
  1187. if (3 == d[item])
  1188. {
  1189. return GetCssValueExtend2(isValue, fomart, attr, css, itemValue, index);
  1190. }
  1191. }
  1192. }
  1193. break;
  1194. }
  1195. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  1196. }
  1197. /// <summary>
  1198. /// 多值多列折号
  1199. /// </summary>
  1200. /// <param name="isValue"></param>
  1201. /// <param name="fomart"></param>
  1202. /// <param name="attr"></param>
  1203. /// <param name="css"></param>
  1204. /// <param name="itemValue"></param>
  1205. /// <param name="index"></param>
  1206. /// <returns></returns>
  1207. public static string MultiValue_ZheHaoNumber<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  1208. {
  1209. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1210. //上一期数据 ,下一期数据
  1211. IList<int> lastOpenCode = null, nextOpenCode = null;
  1212. //根据Cid判断_彩种
  1213. switch (ItemConfig.Cid)
  1214. {
  1215. case 4: //双色球
  1216. IList<FCSSQInfo> FCSSQlastList = FCSSQService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  1217. if (null != FCSSQlastList && FCSSQlastList[0].Term == LocalEntity.Term && FCSSQlastList.Count == 2)
  1218. {
  1219. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1220. }
  1221. IList<FCSSQInfo> FCSSQnextList = FCSSQService.ToListForNextTrend(LocalEntity.Term, null);
  1222. if (null != FCSSQnextList && FCSSQnextList[0].Term == LocalEntity.Term && FCSSQnextList.Count == 2)//获取后一期开奖数据
  1223. {
  1224. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1225. }
  1226. if (css != null) //有样式
  1227. {
  1228. if (css.ChildList == null) //没有子样式
  1229. {
  1230. if (isValue) //项值
  1231. {
  1232. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1233. }
  1234. else //遗漏
  1235. {
  1236. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1237. }
  1238. }
  1239. else //有子样式
  1240. {
  1241. foreach (var item in css.ChildList)
  1242. {
  1243. for (int i = item.endNum; i >= item.startNum; i--)
  1244. {
  1245. if (isValue)
  1246. {
  1247. if (index == i - css.ChildList[0].startNum)
  1248. {
  1249. if (null != lastOpenCode && ((lastOpenCode.Contains(itemValue.ToInt() - 1) && list.Contains(itemValue.ToInt() - 1)) || (lastOpenCode.Contains(itemValue.ToInt() - 1) && lastOpenCode.Contains(itemValue.ToInt())) || (lastOpenCode.Contains(itemValue.ToInt()) && lastOpenCode.Contains(itemValue.ToInt() + 1)) || (lastOpenCode.Contains(itemValue.ToInt() + 1) && list.Contains(itemValue.ToInt() + 1)) || (lastOpenCode.Contains(itemValue.ToInt()) && list.Contains(itemValue.ToInt() - 1)) || (lastOpenCode.Contains(itemValue.ToInt()) && list.Contains(itemValue.ToInt() + 1)))) //根据上期开奖号码判断当前是否折号
  1250. {
  1251. return string.Format(fomart, item.Extend1, attr, itemValue);
  1252. }
  1253. if (null != nextOpenCode && ((nextOpenCode.Contains(itemValue.ToInt() - 1) && list.Contains(itemValue.ToInt() - 1)) || (nextOpenCode.Contains(itemValue.ToInt() - 1) && nextOpenCode.Contains(itemValue.ToInt())) || (nextOpenCode.Contains(itemValue.ToInt()) && nextOpenCode.Contains(itemValue.ToInt() + 1)) || (nextOpenCode.Contains(itemValue.ToInt() + 1) && list.Contains(itemValue.ToInt() + 1)) || (nextOpenCode.Contains(itemValue.ToInt()) && list.Contains(itemValue.ToInt() - 1)) || (nextOpenCode.Contains(itemValue.ToInt()) && list.Contains(itemValue.ToInt() + 1)))) //根据下期开奖号码判断当前是否折号
  1254. {
  1255. return string.Format(fomart, item.Extend1, attr, itemValue);
  1256. }
  1257. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  1258. }
  1259. }
  1260. else
  1261. {
  1262. if (index == i - css.ChildList[0].startNum)
  1263. {
  1264. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1265. }
  1266. }
  1267. }
  1268. }
  1269. }
  1270. }
  1271. break;
  1272. case 12: //大乐透
  1273. IList<TCDLTInfo> TCDLTlastList = TCDLTService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  1274. if (null != TCDLTlastList && TCDLTlastList[0].Term == LocalEntity.Term && TCDLTlastList.Count == 2)
  1275. {
  1276. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1277. }
  1278. IList<TCDLTInfo> TCDLTnextList = TCDLTService.ToListForNextTrend(LocalEntity.Term, null);
  1279. if (null != TCDLTnextList && TCDLTnextList[0].Term == LocalEntity.Term && TCDLTnextList.Count == 2)//获取后一期开奖数据
  1280. {
  1281. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1282. }
  1283. if (css != null) //有样式
  1284. {
  1285. if (css.ChildList == null) //没有子样式
  1286. {
  1287. if (isValue) //项值
  1288. {
  1289. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1290. }
  1291. else //遗漏
  1292. {
  1293. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1294. }
  1295. }
  1296. else //有子样式
  1297. {
  1298. foreach (var item in css.ChildList)
  1299. {
  1300. for (int i = item.endNum; i >= item.startNum; i--)
  1301. {
  1302. if (isValue)
  1303. {
  1304. if (index == i - css.ChildList[0].startNum)
  1305. {
  1306. if (null != lastOpenCode && ((lastOpenCode.Contains(itemValue.ToInt() - 1) && list.Contains(itemValue.ToInt() - 1)) || (lastOpenCode.Contains(itemValue.ToInt() - 1) && lastOpenCode.Contains(itemValue.ToInt())) || (lastOpenCode.Contains(itemValue.ToInt()) && lastOpenCode.Contains(itemValue.ToInt() + 1)) || (lastOpenCode.Contains(itemValue.ToInt() + 1) && list.Contains(itemValue.ToInt() + 1)) || (lastOpenCode.Contains(itemValue.ToInt()) && list.Contains(itemValue.ToInt() - 1)) || (lastOpenCode.Contains(itemValue.ToInt()) && list.Contains(itemValue.ToInt() + 1)))) //根据上期开奖号码判断当前是否折号
  1307. {
  1308. return string.Format(fomart, item.Extend1, attr, itemValue);
  1309. }
  1310. if (null != nextOpenCode && ((nextOpenCode.Contains(itemValue.ToInt() - 1) && list.Contains(itemValue.ToInt() - 1)) || (nextOpenCode.Contains(itemValue.ToInt() - 1) && nextOpenCode.Contains(itemValue.ToInt())) || (nextOpenCode.Contains(itemValue.ToInt()) && nextOpenCode.Contains(itemValue.ToInt() + 1)) || (nextOpenCode.Contains(itemValue.ToInt() + 1) && list.Contains(itemValue.ToInt() + 1)) || (nextOpenCode.Contains(itemValue.ToInt()) && list.Contains(itemValue.ToInt() - 1)) || (nextOpenCode.Contains(itemValue.ToInt()) && list.Contains(itemValue.ToInt() + 1)))) //根据下期开奖号码判断当前是否折号
  1311. {
  1312. return string.Format(fomart, item.Extend1, attr, itemValue);
  1313. }
  1314. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  1315. }
  1316. }
  1317. else
  1318. {
  1319. if (index == i - css.ChildList[0].startNum)
  1320. {
  1321. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1322. }
  1323. }
  1324. }
  1325. }
  1326. }
  1327. }
  1328. break;
  1329. }
  1330. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  1331. }
  1332. /// <summary>
  1333. /// 多值多列斜连号分布
  1334. /// </summary>
  1335. /// <param name="isValue"></param>
  1336. /// <param name="fomart"></param>
  1337. /// <param name="attr"></param>
  1338. /// <param name="css"></param>
  1339. /// <param name="itemValue"></param>
  1340. /// <param name="index"></param>
  1341. /// <returns></returns>
  1342. public static string MultiValue_XieLianHaoNumber<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  1343. {
  1344. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1345. //上一期数据 ,下一期数据
  1346. IList<int> lastOpenCode = null, nextOpenCode = null;
  1347. //根据Cid判断_彩种
  1348. switch (ItemConfig.Cid)
  1349. {
  1350. case 4: //双色球
  1351. IList<FCSSQInfo> FCSSQlastList = FCSSQService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  1352. if (null != FCSSQlastList && FCSSQlastList[0].Term == LocalEntity.Term && FCSSQlastList.Count == 2)
  1353. {
  1354. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1355. }
  1356. IList<FCSSQInfo> FCSSQnextList = FCSSQService.ToListForNextTrend(LocalEntity.Term, null);
  1357. if (null != FCSSQnextList && FCSSQnextList[0].Term == LocalEntity.Term && FCSSQnextList.Count == 2)//获取后一期开奖数据
  1358. {
  1359. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1360. }
  1361. if (css != null) //有样式
  1362. {
  1363. if (css.ChildList == null) //没有子样式
  1364. {
  1365. if (isValue) //项值
  1366. {
  1367. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1368. }
  1369. else //遗漏
  1370. {
  1371. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1372. }
  1373. }
  1374. else //有子样式
  1375. {
  1376. foreach (var item in css.ChildList)
  1377. {
  1378. for (int i = item.endNum; i >= item.startNum; i--)
  1379. {
  1380. if (isValue)
  1381. {
  1382. if (index == i - css.ChildList[0].startNum)
  1383. {
  1384. if (null != lastOpenCode && (lastOpenCode.Contains(itemValue.ToInt() - 1) || lastOpenCode.Contains(itemValue.ToInt() + 1))) //根据上期开奖号码判断当前是否斜连号
  1385. {
  1386. return string.Format(fomart, item.Extend1, attr, itemValue);
  1387. }
  1388. if (null != nextOpenCode && (nextOpenCode.Contains(itemValue.ToInt() - 1) || nextOpenCode.Contains(itemValue.ToInt() + 1))) //根据下期开奖号码判断当前是否斜连号
  1389. {
  1390. return string.Format(fomart, item.Extend1, attr, itemValue);
  1391. }
  1392. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  1393. }
  1394. }
  1395. else
  1396. {
  1397. if (index == i - css.ChildList[0].startNum)
  1398. {
  1399. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1400. }
  1401. }
  1402. }
  1403. }
  1404. }
  1405. }
  1406. break;
  1407. case 12: //大乐透
  1408. IList<TCDLTInfo> TCDLTlastList = TCDLTService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  1409. if (null != TCDLTlastList && TCDLTlastList[0].Term == LocalEntity.Term && TCDLTlastList.Count == 2)
  1410. {
  1411. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1412. }
  1413. IList<TCDLTInfo> TCDLTnextList = TCDLTService.ToListForNextTrend(LocalEntity.Term, null);
  1414. if (null != TCDLTnextList && TCDLTnextList[0].Term == LocalEntity.Term && TCDLTnextList.Count == 2)//获取后一期开奖数据
  1415. {
  1416. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1417. }
  1418. if (css != null) //有样式
  1419. {
  1420. if (css.ChildList == null) //没有子样式
  1421. {
  1422. if (isValue) //项值
  1423. {
  1424. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1425. }
  1426. else //遗漏
  1427. {
  1428. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1429. }
  1430. }
  1431. else //有子样式
  1432. {
  1433. foreach (var item in css.ChildList)
  1434. {
  1435. for (int i = item.endNum; i >= item.startNum; i--)
  1436. {
  1437. if (isValue)
  1438. {
  1439. if (index == i - css.ChildList[0].startNum)
  1440. {
  1441. if (null != lastOpenCode && (lastOpenCode.Contains(itemValue.ToInt() - 1) || lastOpenCode.Contains(itemValue.ToInt() + 1))) //根据上期开奖号码判断当前是否斜连号
  1442. {
  1443. return string.Format(fomart, item.Extend1, attr, itemValue);
  1444. }
  1445. if (null != nextOpenCode && (nextOpenCode.Contains(itemValue.ToInt() - 1) || nextOpenCode.Contains(itemValue.ToInt() + 1))) //根据下期开奖号码判断当前是否斜连号
  1446. {
  1447. return string.Format(fomart, item.Extend1, attr, itemValue);
  1448. }
  1449. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  1450. }
  1451. }
  1452. else
  1453. {
  1454. if (index == i - css.ChildList[0].startNum)
  1455. {
  1456. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1457. }
  1458. }
  1459. }
  1460. }
  1461. }
  1462. }
  1463. break;
  1464. }
  1465. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  1466. }
  1467. /// <summary>
  1468. /// 多值多列跳号
  1469. /// </summary>
  1470. /// <param name="isValue"></param>
  1471. /// <param name="fomart"></param>
  1472. /// <param name="attr"></param>
  1473. /// <param name="css"></param>
  1474. /// <param name="itemValue"></param>
  1475. /// <param name="index"></param>
  1476. /// <returns></returns>
  1477. public static string MultiValue_XieTiaoHaoNumber<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  1478. {
  1479. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1480. //上一期数据 ,下一期数据
  1481. IList<int> lastOpenCode = null, nextOpenCode = null, lastlastOpenCode = null, nextnextOpenCode = null; ;
  1482. //根据Cid判断_彩种
  1483. switch (ItemConfig.Cid)
  1484. {
  1485. case 4: //双色球
  1486. IList<FCSSQInfo> FCSSQlastList = FCSSQService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  1487. if (null != FCSSQlastList && FCSSQlastList[0].Term == LocalEntity.Term && FCSSQlastList.Count == 2)
  1488. {
  1489. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1490. IList<FCSSQInfo> FCSSQlastlastList = FCSSQService.ToListForTrend(FCSSQlastList[1].Term, null);//获取前一期开奖数据
  1491. if (null != FCSSQlastlastList && FCSSQlastlastList[0].Term == FCSSQlastList[1].Term && FCSSQlastlastList.Count == 2)
  1492. {
  1493. lastlastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQlastlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1494. }
  1495. }
  1496. IList<FCSSQInfo> FCSSQnextList = FCSSQService.ToListForNextTrend(LocalEntity.Term, null);
  1497. if (null != FCSSQnextList && FCSSQnextList[0].Term == LocalEntity.Term && FCSSQnextList.Count == 2)//获取后一期开奖数据
  1498. {
  1499. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1500. IList<FCSSQInfo> FCSSQnextnextList = FCSSQService.ToListForNextTrend(FCSSQnextList[1].Term, null);//获取前一期开奖数据
  1501. if (null != FCSSQnextnextList && FCSSQnextnextList[0].Term == FCSSQnextList[1].Term && FCSSQnextnextList.Count == 2)
  1502. {
  1503. nextnextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQnextnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1504. }
  1505. }
  1506. if (css != null) //有样式
  1507. {
  1508. if (css.ChildList == null) //没有子样式
  1509. {
  1510. if (isValue) //项值
  1511. {
  1512. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1513. }
  1514. else //遗漏
  1515. {
  1516. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1517. }
  1518. }
  1519. else //有子样式
  1520. {
  1521. foreach (var item in css.ChildList)
  1522. {
  1523. for (int i = item.endNum; i >= item.startNum; i--)
  1524. {
  1525. if (isValue)
  1526. {
  1527. if (index == i - css.ChildList[0].startNum)
  1528. {
  1529. if (null != lastlastOpenCode && (lastlastOpenCode.Contains(itemValue.ToInt() + 2) || lastlastOpenCode.Contains(itemValue.ToInt() - 2)))
  1530. //根据上上期开奖号码判断当前是否为斜跳号
  1531. {
  1532. return string.Format(fomart, item.Extend1, attr, itemValue);
  1533. }
  1534. if (null != nextnextOpenCode && (nextnextOpenCode.Contains(itemValue.ToInt() + 2) || nextnextOpenCode.Contains(itemValue.ToInt() - 2)))
  1535. //根据下下期开奖号码判断当前是否为斜跳号
  1536. {
  1537. return string.Format(fomart, item.Extend1, attr, itemValue);
  1538. }
  1539. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  1540. }
  1541. }
  1542. else
  1543. {
  1544. if (index == i - css.ChildList[0].startNum)
  1545. {
  1546. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1547. }
  1548. }
  1549. }
  1550. }
  1551. }
  1552. }
  1553. break;
  1554. case 12: //大乐透
  1555. IList<TCDLTInfo> TCDLTlastList = TCDLTService.ToListForTrend(LocalEntity.Term, null); //获取前一期开奖数据
  1556. if (null != TCDLTlastList && TCDLTlastList[0].Term == LocalEntity.Term && TCDLTlastList.Count == 2)
  1557. {
  1558. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTlastList[1] as TEntity,
  1559. ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1560. IList<TCDLTInfo> TCDLTlastlastList = TCDLTService.ToListForTrend(TCDLTlastList[1].Term, null);
  1561. //获取前一期开奖数据
  1562. if (null != TCDLTlastlastList && TCDLTlastlastList[0].Term == TCDLTlastList[1].Term &&
  1563. TCDLTlastlastList.Count == 2)
  1564. {
  1565. lastlastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTlastlastList[1] as TEntity,
  1566. ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1567. }
  1568. }
  1569. IList<TCDLTInfo> TCDLTnextList = TCDLTService.ToListForNextTrend(LocalEntity.Term, null);
  1570. if (null != TCDLTnextList && TCDLTnextList[0].Term == LocalEntity.Term && TCDLTnextList.Count == 2)
  1571. //获取后一期开奖数据
  1572. {
  1573. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTnextList[1] as TEntity,
  1574. ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1575. IList<TCDLTInfo> TCDLTnextnextList = TCDLTService.ToListForNextTrend(TCDLTnextList[1].Term, null);
  1576. //获取前一期开奖数据
  1577. if (null != TCDLTnextnextList && TCDLTnextnextList[0].Term == TCDLTnextList[1].Term &&
  1578. TCDLTnextnextList.Count == 2)
  1579. {
  1580. nextnextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTnextnextList[1] as TEntity,
  1581. ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1582. }
  1583. }
  1584. if (css != null) //有样式
  1585. {
  1586. if (css.ChildList == null) //没有子样式
  1587. {
  1588. if (isValue) //项值
  1589. {
  1590. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1591. }
  1592. else //遗漏
  1593. {
  1594. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1595. }
  1596. }
  1597. else //有子样式
  1598. {
  1599. foreach (var item in css.ChildList)
  1600. {
  1601. for (int i = item.endNum; i >= item.startNum; i--)
  1602. {
  1603. if (isValue)
  1604. {
  1605. if (index == i - css.ChildList[0].startNum)
  1606. {
  1607. if (null != lastlastOpenCode && (lastlastOpenCode.Contains(itemValue.ToInt() + 2) || lastlastOpenCode.Contains(itemValue.ToInt() - 2)))
  1608. //根据上上期开奖号码判断当前是否为斜跳号
  1609. {
  1610. return string.Format(fomart, item.Extend1, attr, itemValue);
  1611. }
  1612. if (null != nextnextOpenCode && (nextnextOpenCode.Contains(itemValue.ToInt() + 2) || nextnextOpenCode.Contains(itemValue.ToInt() - 2)))
  1613. //根据下下期开奖号码判断当前是否为斜跳号
  1614. {
  1615. return string.Format(fomart, item.Extend1, attr, itemValue);
  1616. }
  1617. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  1618. }
  1619. }
  1620. else
  1621. {
  1622. if (index == i - css.ChildList[0].startNum)
  1623. {
  1624. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1625. }
  1626. }
  1627. }
  1628. }
  1629. }
  1630. }
  1631. break;
  1632. }
  1633. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  1634. }
  1635. /// <summary>
  1636. /// 多值多列竖三连号
  1637. /// </summary>
  1638. /// <param name="isValue"></param>
  1639. /// <param name="fomart"></param>
  1640. /// <param name="attr"></param>
  1641. /// <param name="css"></param>
  1642. /// <param name="itemValue"></param>
  1643. /// <param name="index"></param>
  1644. /// <returns></returns>
  1645. public static string MultiValue_ShuSanLianHaoNumber<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  1646. {
  1647. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1648. //上一期数据 ,下一期数据
  1649. IList<int> lastOpenCode = null, nextOpenCode = null, lastlastOpenCode = null, nextnextOpenCode = null; ;
  1650. //根据Cid判断_彩种
  1651. switch (ItemConfig.Cid)
  1652. {
  1653. case 4: //双色球
  1654. IList<FCSSQInfo> FCSSQlastList = FCSSQService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  1655. if (null != FCSSQlastList && FCSSQlastList[0].Term == LocalEntity.Term && FCSSQlastList.Count == 2)
  1656. {
  1657. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1658. IList<FCSSQInfo> FCSSQlastlastList = FCSSQService.ToListForTrend(FCSSQlastList[1].Term, null);//获取前一期开奖数据
  1659. if (null != FCSSQlastlastList && FCSSQlastlastList[0].Term == FCSSQlastList[1].Term && FCSSQlastlastList.Count == 2)
  1660. {
  1661. lastlastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQlastlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1662. }
  1663. }
  1664. IList<FCSSQInfo> FCSSQnextList = FCSSQService.ToListForNextTrend(LocalEntity.Term, null);
  1665. if (null != FCSSQnextList && FCSSQnextList[0].Term == LocalEntity.Term && FCSSQnextList.Count == 2)//获取后一期开奖数据
  1666. {
  1667. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1668. IList<FCSSQInfo> FCSSQnextnextList = FCSSQService.ToListForNextTrend(FCSSQnextList[1].Term, null);//获取前一期开奖数据
  1669. if (null != FCSSQnextnextList && FCSSQnextnextList[0].Term == FCSSQnextList[1].Term && FCSSQnextnextList.Count == 2)
  1670. {
  1671. nextnextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(FCSSQnextnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1672. }
  1673. }
  1674. if (css != null) //有样式
  1675. {
  1676. if (css.ChildList == null) //没有子样式
  1677. {
  1678. if (isValue) //项值
  1679. {
  1680. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1681. }
  1682. else //遗漏
  1683. {
  1684. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1685. }
  1686. }
  1687. else //有子样式
  1688. {
  1689. foreach (var item in css.ChildList)
  1690. {
  1691. for (int i = item.endNum; i >= item.startNum; i--)
  1692. {
  1693. if (isValue)
  1694. {
  1695. if (index == i - css.ChildList[0].startNum)
  1696. {
  1697. if (null != lastOpenCode && null != nextOpenCode &&
  1698. lastOpenCode.Contains(itemValue.ToInt()) &&
  1699. nextOpenCode.Contains(itemValue.ToInt())) //根据上下期开奖号码判断当前是否为竖三连号
  1700. {
  1701. return string.Format(fomart, item.Extend1, attr, itemValue);
  1702. }
  1703. if (null != lastlastOpenCode && null != lastOpenCode && lastOpenCode.Contains(itemValue.ToInt()) && lastlastOpenCode.Contains(itemValue.ToInt())) //根据上期和上上期开奖号码判断当前是否为竖三连号
  1704. {
  1705. return string.Format(fomart, item.Extend1, attr, itemValue);
  1706. }
  1707. if (null != nextnextOpenCode && null != nextOpenCode && nextOpenCode.Contains(itemValue.ToInt()) && nextnextOpenCode.Contains(itemValue.ToInt())) //根据下期和下下期开奖号码判断当前是否为竖三连号
  1708. {
  1709. return string.Format(fomart, item.Extend1, attr, itemValue);
  1710. }
  1711. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  1712. }
  1713. }
  1714. else
  1715. {
  1716. if (index == i - css.ChildList[0].startNum)
  1717. {
  1718. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1719. }
  1720. }
  1721. }
  1722. }
  1723. }
  1724. }
  1725. break;
  1726. }
  1727. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  1728. }
  1729. /// <summary>
  1730. /// 多值多列竖跳号
  1731. /// </summary>
  1732. /// <param name="isValue"></param>
  1733. /// <param name="fomart"></param>
  1734. /// <param name="attr"></param>
  1735. /// <param name="css"></param>
  1736. /// <param name="itemValue"></param>
  1737. /// <param name="index"></param>
  1738. /// <returns></returns>
  1739. public static string MultiValue_ShuTiaoHaoNumber<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  1740. {
  1741. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1742. //上一期数据 ,下一期数据
  1743. IList<int> lastOpenCode = null, nextOpenCode = null, lastlastOpenCode = null, nextnextOpenCode = null; ;
  1744. //根据Cid判断_彩种
  1745. switch (ItemConfig.Cid)
  1746. {
  1747. case 12: //大乐透
  1748. IList<TCDLTInfo> TCDLTlastList = TCDLTService.ToListForTrend(LocalEntity.Term, null);//获取前一期开奖数据
  1749. if (null != TCDLTlastList && TCDLTlastList[0].Term == LocalEntity.Term && TCDLTlastList.Count == 2)
  1750. {
  1751. lastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1752. IList<TCDLTInfo> TCDLTlastlastList = TCDLTService.ToListForTrend(TCDLTlastList[1].Term, null);//获取前一期开奖数据
  1753. if (null != TCDLTlastlastList && TCDLTlastlastList[0].Term == TCDLTlastList[1].Term && TCDLTlastlastList.Count == 2)
  1754. {
  1755. lastlastOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTlastlastList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1756. }
  1757. }
  1758. IList<TCDLTInfo> TCDLTnextList = TCDLTService.ToListForNextTrend(LocalEntity.Term, null);
  1759. if (null != TCDLTnextList && TCDLTnextList[0].Term == LocalEntity.Term && TCDLTnextList.Count == 2)//获取后一期开奖数据
  1760. {
  1761. nextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1762. IList<TCDLTInfo> TCDLTnextnextList = TCDLTService.ToListForNextTrend(TCDLTnextList[1].Term, null);//获取前一期开奖数据
  1763. if (null != TCDLTnextnextList && TCDLTnextnextList[0].Term == TCDLTnextList[1].Term && TCDLTnextnextList.Count == 2)
  1764. {
  1765. nextnextOpenCode = LotteryUtils.GetOpenCodeList<TEntity>(TCDLTnextnextList[1] as TEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1766. }
  1767. }
  1768. if (css != null) //有样式
  1769. {
  1770. if (css.ChildList == null) //没有子样式
  1771. {
  1772. if (isValue) //项值
  1773. {
  1774. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  1775. }
  1776. else //遗漏
  1777. {
  1778. return string.Format(fomart, css.MissCssName, attr, itemValue);
  1779. }
  1780. }
  1781. else //有子样式
  1782. {
  1783. foreach (var item in css.ChildList)
  1784. {
  1785. for (int i = item.endNum; i >= item.startNum; i--)
  1786. {
  1787. if (isValue)
  1788. {
  1789. if (index == i - css.ChildList[0].startNum)
  1790. {
  1791. if (null != lastlastOpenCode && lastlastOpenCode.Contains(itemValue.ToInt())) //根据上上期开奖号码判断当前是否为竖跳号
  1792. {
  1793. return string.Format(fomart, item.Extend1, attr, itemValue);
  1794. }
  1795. if (null != nextnextOpenCode && nextnextOpenCode.Contains(itemValue.ToInt())) //根据下下期开奖号码判断当前是否为竖跳号
  1796. {
  1797. return string.Format(fomart, item.Extend1, attr, itemValue);
  1798. }
  1799. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  1800. }
  1801. }
  1802. else
  1803. {
  1804. if (index == i - css.ChildList[0].startNum)
  1805. {
  1806. return string.Format(fomart, item.MissCssName, attr, itemValue);
  1807. }
  1808. }
  1809. }
  1810. }
  1811. }
  1812. }
  1813. break;
  1814. }
  1815. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  1816. }
  1817. #endregion
  1818. #region 特殊
  1819. /// <summary>
  1820. /// 福彩3D 012路走势图4
  1821. /// </summary>
  1822. /// <typeparam name="TEntity"></typeparam>
  1823. /// <param name="LocalEntity"></param>
  1824. /// <param name="ItemConfig"></param>
  1825. /// <param name="isValue"></param>
  1826. /// <param name="fomart"></param>
  1827. /// <param name="attr"></param>
  1828. /// <param name="css"></param>
  1829. /// <param name="itemValue"></param>
  1830. /// <param name="index"></param>
  1831. /// <returns></returns>
  1832. public static string SpecialValue_FC3D012_4<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  1833. {
  1834. StringBuilder table = new StringBuilder(1000);
  1835. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1836. table.Append("<table id=\"zstable\" class=\"zstable\">");
  1837. table.Append("<tbody>");
  1838. table.Append("<tr>");
  1839. for (int i = 0; i < 10; i = i + 3)
  1840. {
  1841. if (list.Count(s => s == i) == 3)
  1842. {
  1843. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend2, i));
  1844. table.Append("</td>");
  1845. }
  1846. if (list.Count(s => s == i) == 2)
  1847. {
  1848. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend1, i));
  1849. table.Append("</td>");
  1850. }
  1851. if (list.Count(s => s == i) == 1)
  1852. {
  1853. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.NumberCssName, i));
  1854. table.Append("</td>");
  1855. }
  1856. if (list.Count(s => s == i) == 0)
  1857. {
  1858. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, i));
  1859. table.Append("</td>");
  1860. }
  1861. }
  1862. table.Append("</tr>");
  1863. table.Append("<tr>");
  1864. for (int i = 1; i < 10; i = i + 3)
  1865. {
  1866. if (list.Count(s => s == i) == 3)
  1867. {
  1868. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend2, i));
  1869. table.Append("</td>");
  1870. }
  1871. if (list.Count(s => s == i) == 2)
  1872. {
  1873. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend1, i));
  1874. table.Append("</td>");
  1875. }
  1876. if (list.Count(s => s == i) == 1)
  1877. {
  1878. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.NumberCssName, i));
  1879. table.Append("</td>");
  1880. }
  1881. if (list.Count(s => s == i) == 0)
  1882. {
  1883. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, i));
  1884. table.Append("</td>");
  1885. }
  1886. }
  1887. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, ""));
  1888. table.Append("</td>");
  1889. table.Append("</tr>");
  1890. table.Append("<tr>");
  1891. for (int i = 2; i < 10; i = i + 3)
  1892. {
  1893. if (list.Count(s => s == i) == 3)
  1894. {
  1895. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend2, i));
  1896. table.Append("</td>");
  1897. }
  1898. if (list.Count(s => s == i) == 2)
  1899. {
  1900. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend1, i));
  1901. table.Append("</td>");
  1902. }
  1903. if (list.Count(s => s == i) == 1)
  1904. {
  1905. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.NumberCssName, i));
  1906. table.Append("</td>");
  1907. }
  1908. if (list.Count(s => s == i) == 0)
  1909. {
  1910. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, i));
  1911. table.Append("</td>");
  1912. }
  1913. }
  1914. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, ""));
  1915. table.Append("</td>");
  1916. table.Append("</tr>");
  1917. table.Append("<tr>");
  1918. table.Append(string.Format("<td colspan=\"4\" class=\"{0}\">{1}", css.MissCssName, LocalEntity.Term.ToString() + " 期"));
  1919. table.Append("</td>");
  1920. table.Append("</tr>");
  1921. table.Append("</tbody>");
  1922. table.Append("</table>");
  1923. return string.Format(fomart, "", attr, table.ToString());
  1924. }
  1925. /// <summary>
  1926. /// 体彩P3 012路走势图4
  1927. /// </summary>
  1928. /// <typeparam name="TEntity"></typeparam>
  1929. /// <param name="LocalEntity"></param>
  1930. /// <param name="ItemConfig"></param>
  1931. /// <param name="isValue"></param>
  1932. /// <param name="fomart"></param>
  1933. /// <param name="attr"></param>
  1934. /// <param name="css"></param>
  1935. /// <param name="itemValue"></param>
  1936. /// <param name="index"></param>
  1937. /// <returns></returns>
  1938. public static string SpecialValue_TCP3012_4<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  1939. {
  1940. StringBuilder table = new StringBuilder(1000);
  1941. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  1942. table.Append("<table id=\"zstable\" class=\"zstable\">");
  1943. table.Append("<tbody>");
  1944. table.Append("<tr>");
  1945. for (int i = 0; i < 10; i = i + 3)
  1946. {
  1947. if (list.Count(s => s == i) == 3)
  1948. {
  1949. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend2, i));
  1950. table.Append("</td>");
  1951. }
  1952. if (list.Count(s => s == i) == 2)
  1953. {
  1954. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend1, i));
  1955. table.Append("</td>");
  1956. }
  1957. if (list.Count(s => s == i) == 1)
  1958. {
  1959. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.NumberCssName, i));
  1960. table.Append("</td>");
  1961. }
  1962. if (list.Count(s => s == i) == 0)
  1963. {
  1964. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, i));
  1965. table.Append("</td>");
  1966. }
  1967. }
  1968. table.Append("</tr>");
  1969. table.Append("<tr>");
  1970. for (int i = 1; i < 10; i = i + 3)
  1971. {
  1972. if (list.Count(s => s == i) == 3)
  1973. {
  1974. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend2, i));
  1975. table.Append("</td>");
  1976. }
  1977. if (list.Count(s => s == i) == 2)
  1978. {
  1979. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend1, i));
  1980. table.Append("</td>");
  1981. }
  1982. if (list.Count(s => s == i) == 1)
  1983. {
  1984. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.NumberCssName, i));
  1985. table.Append("</td>");
  1986. }
  1987. if (list.Count(s => s == i) == 0)
  1988. {
  1989. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, i));
  1990. table.Append("</td>");
  1991. }
  1992. }
  1993. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, ""));
  1994. table.Append("</td>");
  1995. table.Append("</tr>");
  1996. table.Append("<tr>");
  1997. for (int i = 2; i < 10; i = i + 3)
  1998. {
  1999. if (list.Count(s => s == i) == 3)
  2000. {
  2001. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend2, i));
  2002. table.Append("</td>");
  2003. }
  2004. if (list.Count(s => s == i) == 2)
  2005. {
  2006. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.Extend1, i));
  2007. table.Append("</td>");
  2008. }
  2009. if (list.Count(s => s == i) == 1)
  2010. {
  2011. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.NumberCssName, i));
  2012. table.Append("</td>");
  2013. }
  2014. if (list.Count(s => s == i) == 0)
  2015. {
  2016. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, i));
  2017. table.Append("</td>");
  2018. }
  2019. }
  2020. table.Append(string.Format("<td width=\"48px\" class=\"{0}\">{1}", css.MissCssName, ""));
  2021. table.Append("</td>");
  2022. table.Append("</tr>");
  2023. table.Append("<tr>");
  2024. table.Append(string.Format("<td colspan=\"4\" class=\"{0}\">{1}", css.MissCssName, LocalEntity.Term.ToString() + " 期"));
  2025. table.Append("</td>");
  2026. table.Append("</tr>");
  2027. table.Append("</tbody>");
  2028. table.Append("</table>");
  2029. return string.Format(fomart, "", attr, table.ToString());
  2030. }
  2031. /// <summary>
  2032. /// 福彩 双色球出号频率
  2033. /// </summary>
  2034. /// <typeparam name="TEntity"></typeparam>
  2035. /// <param name="LocalEntity"></param>
  2036. /// <param name="ItemConfig"></param>
  2037. /// <param name="isValue"></param>
  2038. /// <param name="fomart"></param>
  2039. /// <param name="attr"></param>
  2040. /// <param name="css"></param>
  2041. /// <param name="itemValue"></param>
  2042. /// <param name="index"></param>
  2043. /// <returns></returns>
  2044. public static string SpecialValue_FCSSQ_ChuHaoPL<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, ChartCssConfigInfo css, int[] ItemIndex, string fomart) where TEntity : LotteryOpenCode
  2045. {
  2046. StringBuilder sp = new StringBuilder();
  2047. if (ItemConfig.ItemCount == 33) //红球
  2048. {
  2049. sp.Append("<tr>");
  2050. sp.Append("<td class=\"white pl\">150</td>");
  2051. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2052. {
  2053. sp.Append(string.Format("<td rowspan=\"16\" style=\"vertical-align: bottom;\" class=\"{0} \">", GetCssName(true, css, i)));
  2054. sp.Append(string.Format("<span>{0}</span><br>", ItemConfig.ItemString[i]));
  2055. sp.Append(string.Format("<img src=\"http://www.55128.cn/images/zst/redline.gif\" style=\"vertical-align: bottom;\" width=\"8\" height=\"{0}\">", (3 * ItemIndex[i]).ToString()));
  2056. sp.Append("</td>");
  2057. }
  2058. sp.Append("@Row1");
  2059. sp.Append("<tr><td class=\"pl\">140</td></tr><tr><td class=\"pl\">130</td></tr><tr><td class=\"pl\">120</td></tr><tr><td class=\"pl\">110</td></tr><tr><td class=\"pl\">100</td></tr><tr><td class=\"pl\">90</td></tr><tr><td class=\"pl\">80</td></tr><tr><td class=\"pl\">70</td></tr><tr><td class=\"pl\">60</td></tr><tr><td class=\"pl\">50</td></tr><tr><td class=\"pl\">40</td></tr><tr><td class=\"pl\">30</td></tr><tr><td class=\"pl\">20</td></tr><tr><td class=\"pl\">10</td></tr><tr><td class=\"pl\">0</td></tr>");
  2060. sp.Append("<tr>");
  2061. sp.Append("<td class=\"white\">出现次数</td>");
  2062. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2063. {
  2064. sp.Append(GetCssValue(true, fomart, "", css, ItemIndex[i].ToString(), i));
  2065. }
  2066. sp.Append("@Row2");
  2067. sp.Append("<tr>");
  2068. sp.Append("<td class=\"white\">出现频率(%)</td>");
  2069. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2070. {
  2071. sp.Append(GetCssValue(true, fomart, "", css, string.Format("{0:F1}", (double)ItemIndex[i] * 100 / ItemIndex.Sum()), i));
  2072. }
  2073. sp.Append("@Row3");
  2074. }
  2075. if (ItemConfig.ItemCount == 16) //蓝球
  2076. {
  2077. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2078. {
  2079. sp.Append(string.Format("<td rowspan=\"16\" style=\"vertical-align: bottom;\" class=\"{0}\">", GetCssName(true, css, i)));
  2080. sp.Append(string.Format("<span>{0}</span><br>", ItemConfig.ItemString[i]));
  2081. sp.Append(string.Format("<img src=\"http://www.55128.cn/images/zst/blueline.gif\" style=\"vertical-align: bottom;\" width=\"8\" height=\"{0}\">", (3 * ItemIndex[i]).ToString()));
  2082. sp.Append("</td>");
  2083. }
  2084. sp.Append("</tr>");
  2085. sp.Append("~");
  2086. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2087. {
  2088. sp.Append(GetCssValue(true, fomart, "", css, ItemIndex[i].ToString(), i));
  2089. }
  2090. sp.Append("</tr>");
  2091. sp.Append("~");
  2092. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2093. {
  2094. sp.Append(GetCssValue(true, fomart, "", css, string.Format("{0:F1}", (double)ItemIndex[i] * 100 / ItemIndex.Sum()), i));
  2095. }
  2096. sp.Append("</tr>");
  2097. }
  2098. return sp.ToString();
  2099. }
  2100. /// <summary>
  2101. /// 体彩 大乐透出号频率
  2102. /// </summary>
  2103. /// <typeparam name="TEntity"></typeparam>
  2104. /// <param name="LocalEntity"></param>
  2105. /// <param name="ItemConfig"></param>
  2106. /// <param name="isValue"></param>
  2107. /// <param name="fomart"></param>
  2108. /// <param name="attr"></param>
  2109. /// <param name="css"></param>
  2110. /// <param name="itemValue"></param>
  2111. /// <param name="index"></param>
  2112. /// <returns></returns>
  2113. public static string SpecialValue_TCDLT_ChuHaoPL<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, ChartCssConfigInfo css, int[] ItemIndex, string fomart) where TEntity : LotteryOpenCode
  2114. {
  2115. StringBuilder sp = new StringBuilder();
  2116. if (ItemConfig.ItemCount == 35) //红球
  2117. {
  2118. sp.Append("<tr>");
  2119. sp.Append("<td class=\"white pl\">150</td>");
  2120. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2121. {
  2122. sp.Append(string.Format("<td rowspan=\"16\" style=\"vertical-align: bottom;\" class=\"{0} \">", GetCssName(true, css, i)));
  2123. sp.Append(string.Format("<span>{0}</span><br>", ItemConfig.ItemString[i]));
  2124. sp.Append(string.Format("<img src=\"http://www.55128.cn/images/zst/redline.gif\" style=\"vertical-align: bottom;\" width=\"8\" height=\"{0}\">", (3 * ItemIndex[i]).ToString()));
  2125. sp.Append("</td>");
  2126. }
  2127. sp.Append("@Row1");
  2128. sp.Append("<tr><td class=\"pl\">140</td></tr><tr><td class=\"pl\">130</td></tr><tr><td class=\"pl\">120</td></tr><tr><td class=\"pl\">110</td></tr><tr><td class=\"pl\">100</td></tr><tr><td class=\"pl\">90</td></tr><tr><td class=\"pl\">80</td></tr><tr><td class=\"pl\">70</td></tr><tr><td class=\"pl\">60</td></tr><tr><td class=\"pl\">50</td></tr><tr><td class=\"pl\">40</td></tr><tr><td class=\"pl\">30</td></tr><tr><td class=\"pl\">20</td></tr><tr><td class=\"pl\">10</td></tr><tr><td class=\"pl\">0</td></tr>");
  2129. sp.Append("<tr>");
  2130. sp.Append("<td class=\"white\">出现次数</td>");
  2131. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2132. {
  2133. sp.Append(GetCssValue(true, fomart, "", css, ItemIndex[i].ToString(), i));
  2134. }
  2135. sp.Append("@Row2");
  2136. sp.Append("<tr>");
  2137. sp.Append("<td class=\"white\">出现频率(%)</td>");
  2138. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2139. {
  2140. sp.Append(GetCssValue(true, fomart, "", css, string.Format("{0:F1}", (double)ItemIndex[i] * 100 / ItemIndex.Sum()), i));
  2141. }
  2142. sp.Append("@Row3");
  2143. }
  2144. if (ItemConfig.ItemCount == 12) //蓝球
  2145. {
  2146. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2147. {
  2148. sp.Append(string.Format("<td rowspan=\"16\" style=\"vertical-align: bottom;\" class=\"{0}\">", GetCssName(true, css, i)));
  2149. sp.Append(string.Format("<span>{0}</span><br>", ItemConfig.ItemString[i]));
  2150. sp.Append(string.Format("<img src=\"http://www.55128.cn/images/zst/blueline.gif\" style=\"vertical-align: bottom;\" width=\"8\" height=\"{0}\">", (3 * ItemIndex[i]).ToString()));
  2151. sp.Append("</td>");
  2152. }
  2153. sp.Append("</tr>");
  2154. sp.Append("~");
  2155. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2156. {
  2157. sp.Append(GetCssValue(true, fomart, "", css, ItemIndex[i].ToString(), i));
  2158. }
  2159. sp.Append("</tr>");
  2160. sp.Append("~");
  2161. for (int i = 0; i < ItemConfig.ItemCount; i++)
  2162. {
  2163. sp.Append(GetCssValue(true, fomart, "", css, string.Format("{0:F1}", (double)ItemIndex[i] * 100 / ItemIndex.Sum()), i));
  2164. }
  2165. sp.Append("</tr>");
  2166. }
  2167. return sp.ToString();
  2168. }
  2169. #endregion
  2170. #region 高频
  2171. /// <summary>
  2172. /// 多值多列快乐12开奖号码分布
  2173. /// </summary>
  2174. /// <param name="isValue"></param>
  2175. /// <param name="fomart"></param>
  2176. /// <param name="attr"></param>
  2177. /// <param name="css"></param>
  2178. /// <param name="itemValue"></param>
  2179. /// <param name="index"></param>
  2180. /// <returns></returns>
  2181. public static string MultiValue_KL12<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2182. {
  2183. IList<int> list = LotteryUtils.GetOpenCodeList<TEntity>(LocalEntity, ItemConfig.IndexStart, ItemConfig.IndexEnd);
  2184. //根据Cid判断_彩种
  2185. switch (ItemConfig.Cid)
  2186. {
  2187. case 5000: //快乐12
  2188. if (list[0].ToString() == itemValue)
  2189. {
  2190. return GetCssValueExtend1(isValue, fomart, attr, css, itemValue, index);
  2191. }
  2192. else
  2193. {
  2194. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2195. }
  2196. }
  2197. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2198. }
  2199. #endregion
  2200. /// <summary>
  2201. /// 获取应该调用哪个CSS名称
  2202. /// </summary>
  2203. /// <param name="isValue"></param>
  2204. /// <param name="fomart"></param>
  2205. /// <param name="attr"></param>
  2206. /// <param name="css"></param>
  2207. /// <param name="itemValue"></param>
  2208. /// <param name="index"></param>
  2209. /// <returns></returns>
  2210. public static string GetCssName(bool isValue, ChartCssConfigInfo css, int index)
  2211. {
  2212. if (css != null) //有样式
  2213. {
  2214. if (css.ChildList == null)//没有子样式
  2215. {
  2216. if (isValue) //项值
  2217. {
  2218. return css.NumberCssName;
  2219. }
  2220. else //遗漏
  2221. {
  2222. return css.MissCssName;
  2223. }
  2224. }
  2225. else //有子样式
  2226. {
  2227. foreach (var item in css.ChildList)
  2228. {
  2229. for (int i = item.endNum; i >= item.startNum; i--)
  2230. {
  2231. if (isValue)
  2232. {
  2233. if (index == i - css.ChildList[0].startNum)
  2234. {
  2235. return item.NumberCssName;
  2236. }
  2237. }
  2238. else
  2239. {
  2240. if (index == i - css.ChildList[0].startNum)
  2241. {
  2242. return item.MissCssName;
  2243. }
  2244. }
  2245. }
  2246. }
  2247. }
  2248. }
  2249. return ""; //没有样式(填充默认颜色)
  2250. }
  2251. /// <summary>
  2252. /// 设置样式通用方法
  2253. /// </summary>
  2254. /// <param name="isValue"></param>
  2255. /// <param name="fomart"></param>
  2256. /// <param name="attr"></param>
  2257. /// <param name="css"></param>
  2258. /// <param name="itemValue"></param>
  2259. /// <param name="index"></param>
  2260. /// <returns></returns>
  2261. public static string GetCssValue(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  2262. {
  2263. if (css != null) //有样式
  2264. {
  2265. if (css.ChildList == null)//没有子样式
  2266. {
  2267. if (isValue) //项值
  2268. {
  2269. return string.Format(fomart, css.NumberCssName, attr, itemValue);
  2270. }
  2271. else //遗漏
  2272. {
  2273. return string.Format(fomart, css.MissCssName, attr, itemValue);
  2274. }
  2275. }
  2276. else //有子样式
  2277. {
  2278. foreach (var item in css.ChildList)
  2279. {
  2280. for (int i = item.endNum; i >= item.startNum; i--)
  2281. {
  2282. if (isValue)
  2283. {
  2284. if (index == i - css.ChildList[0].startNum)
  2285. {
  2286. return string.Format(fomart, item.NumberCssName, attr, itemValue);
  2287. }
  2288. }
  2289. else
  2290. {
  2291. if (index == i - css.ChildList[0].startNum)
  2292. {
  2293. return string.Format(fomart, item.MissCssName, attr, itemValue);
  2294. }
  2295. }
  2296. }
  2297. }
  2298. }
  2299. }
  2300. return string.Format(fomart, "", attr, itemValue); //没有样式(填充默认颜色)
  2301. }
  2302. /// <summary>
  2303. /// 设置样式通用方法(使用扩展样式1)
  2304. /// </summary>
  2305. /// <param name="isValue"></param>
  2306. /// <param name="fomart"></param>
  2307. /// <param name="attr"></param>
  2308. /// <param name="css"></param>
  2309. /// <param name="itemValue"></param>
  2310. /// <param name="index"></param>
  2311. /// <returns></returns>
  2312. private static string GetCssValueExtend1(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  2313. {
  2314. if (css != null) //有样式
  2315. {
  2316. if (css.ChildList == null)//没有子样式
  2317. {
  2318. if (isValue) //项值
  2319. {
  2320. return string.Format(fomart, css.Extend1, attr, itemValue);
  2321. }
  2322. else //遗漏
  2323. {
  2324. return string.Format(fomart, css.MissCssName, attr, itemValue);
  2325. }
  2326. }
  2327. else //有子样式
  2328. {
  2329. foreach (var item in css.ChildList)
  2330. {
  2331. for (int i = item.endNum; i >= item.startNum; i--)
  2332. {
  2333. if (isValue)
  2334. {
  2335. if (index == i - css.ChildList[0].startNum)
  2336. {
  2337. return string.Format(fomart, item.Extend1, attr, itemValue);
  2338. }
  2339. }
  2340. else //遗漏
  2341. {
  2342. if (index == i - css.ChildList[0].startNum)
  2343. {
  2344. return string.Format(fomart, item.MissCssName, attr, itemValue);
  2345. }
  2346. }
  2347. }
  2348. }
  2349. }
  2350. }
  2351. return string.Format(fomart, "", attr, itemValue); //没有样式(填充默认颜色)
  2352. }
  2353. /// <summary>
  2354. /// 设置样式通用方法(使用扩展样式2)
  2355. /// </summary>
  2356. /// <param name="isValue"></param>
  2357. /// <param name="fomart"></param>
  2358. /// <param name="attr"></param>
  2359. /// <param name="css"></param>
  2360. /// <param name="itemValue"></param>
  2361. /// <param name="index"></param>
  2362. /// <returns></returns>
  2363. private static string GetCssValueExtend2(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  2364. {
  2365. if (css != null) //有样式
  2366. {
  2367. if (css.ChildList == null)//没有子样式
  2368. {
  2369. if (isValue) //项值
  2370. {
  2371. return string.Format(fomart, css.Extend2, attr, itemValue);
  2372. }
  2373. else //遗漏
  2374. {
  2375. return string.Format(fomart, css.MissCssName, attr, itemValue);
  2376. }
  2377. }
  2378. else //有子样式
  2379. {
  2380. foreach (var item in css.ChildList)
  2381. {
  2382. for (int i = item.endNum; i >= item.startNum; i--)
  2383. {
  2384. if (isValue)
  2385. {
  2386. if (index == i - css.ChildList[0].startNum)
  2387. {
  2388. return string.Format(fomart, item.Extend2, attr, itemValue);
  2389. }
  2390. }
  2391. else //遗漏
  2392. {
  2393. if (index == i - css.ChildList[0].startNum)
  2394. {
  2395. return string.Format(fomart, item.MissCssName, attr, itemValue);
  2396. }
  2397. }
  2398. }
  2399. }
  2400. }
  2401. }
  2402. return string.Format(fomart, "", attr, itemValue); //没有样式(填充默认颜色)
  2403. }
  2404. /// <summary>
  2405. /// 设置样式通用方法(使用扩展样式3)
  2406. /// </summary>
  2407. /// <param name="isValue"></param>
  2408. /// <param name="fomart"></param>
  2409. /// <param name="attr"></param>
  2410. /// <param name="css"></param>
  2411. /// <param name="itemValue"></param>
  2412. /// <param name="index"></param>
  2413. /// <returns></returns>
  2414. private static string GetCssValueExtend3(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  2415. {
  2416. if (css != null) //有样式
  2417. {
  2418. if (css.ChildList == null)//没有子样式
  2419. {
  2420. if (isValue) //项值
  2421. {
  2422. return string.Format(fomart, css.Extend3, attr, itemValue);
  2423. }
  2424. else //遗漏
  2425. {
  2426. return string.Format(fomart, css.MissCssName, attr, itemValue);
  2427. }
  2428. }
  2429. else //有子样式
  2430. {
  2431. foreach (var item in css.ChildList)
  2432. {
  2433. for (int i = item.endNum; i >= item.startNum; i--)
  2434. {
  2435. if (isValue)
  2436. {
  2437. if (index == i - css.ChildList[0].startNum)
  2438. {
  2439. return string.Format(fomart, item.Extend3, attr, itemValue);
  2440. }
  2441. }
  2442. else //遗漏
  2443. {
  2444. if (index == i - css.ChildList[0].startNum)
  2445. {
  2446. return string.Format(fomart, item.MissCssName, attr, itemValue);
  2447. }
  2448. }
  2449. }
  2450. }
  2451. }
  2452. }
  2453. return string.Format(fomart, "", attr, itemValue); //没有样式(填充默认颜色)
  2454. }
  2455. /// <summary>
  2456. /// 设置样式通用方法(使用扩展样式2)
  2457. /// </summary>
  2458. /// <param name="isValue"></param>
  2459. /// <param name="fomart"></param>
  2460. /// <param name="attr"></param>
  2461. /// <param name="css"></param>
  2462. /// <param name="itemValue"></param>
  2463. /// <param name="index"></param>
  2464. /// <returns></returns>
  2465. private static string GetCssValueExtend4(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  2466. {
  2467. if (css != null) //有样式
  2468. {
  2469. if (css.ChildList == null)//没有子样式
  2470. {
  2471. if (isValue) //项值
  2472. {
  2473. return string.Format(fomart, css.Extend4, attr, itemValue);
  2474. }
  2475. else //遗漏
  2476. {
  2477. return string.Format(fomart, css.MissCssName, attr, itemValue);
  2478. }
  2479. }
  2480. else //有子样式
  2481. {
  2482. foreach (var item in css.ChildList)
  2483. {
  2484. for (int i = item.endNum; i >= item.startNum; i--)
  2485. {
  2486. if (isValue)
  2487. {
  2488. if (index == i - css.ChildList[0].startNum)
  2489. {
  2490. return string.Format(fomart, item.Extend4, attr, itemValue);
  2491. }
  2492. }
  2493. else //遗漏
  2494. {
  2495. if (index == i - css.ChildList[0].startNum)
  2496. {
  2497. return string.Format(fomart, item.MissCssName, attr, itemValue);
  2498. }
  2499. }
  2500. }
  2501. }
  2502. }
  2503. }
  2504. return string.Format(fomart, "", attr, itemValue); //没有样式(填充默认颜色)
  2505. }
  2506. /// <summary>
  2507. /// 设置样式通用方法(使用扩展样式2)
  2508. /// </summary>
  2509. /// <param name="isValue"></param>
  2510. /// <param name="fomart"></param>
  2511. /// <param name="attr"></param>
  2512. /// <param name="css"></param>
  2513. /// <param name="itemValue"></param>
  2514. /// <param name="index"></param>
  2515. /// <returns></returns>
  2516. private static string GetCssValueExtend5(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  2517. {
  2518. if (css != null) //有样式
  2519. {
  2520. if (css.ChildList == null)//没有子样式
  2521. {
  2522. if (isValue) //项值
  2523. {
  2524. return string.Format(fomart, css.Extend5, attr, itemValue);
  2525. }
  2526. else //遗漏
  2527. {
  2528. return string.Format(fomart, css.MissCssName, attr, itemValue);
  2529. }
  2530. }
  2531. else //有子样式
  2532. {
  2533. foreach (var item in css.ChildList)
  2534. {
  2535. for (int i = item.endNum; i >= item.startNum; i--)
  2536. {
  2537. if (isValue)
  2538. {
  2539. if (index == i - css.ChildList[0].startNum)
  2540. {
  2541. return string.Format(fomart, item.Extend5, attr, itemValue);
  2542. }
  2543. }
  2544. else //遗漏
  2545. {
  2546. if (index == i - css.ChildList[0].startNum)
  2547. {
  2548. return string.Format(fomart, item.MissCssName, attr, itemValue);
  2549. }
  2550. }
  2551. }
  2552. }
  2553. }
  2554. }
  2555. return string.Format(fomart, "", attr, itemValue); //没有样式(填充默认颜色)
  2556. }
  2557. /// <summary>
  2558. /// 回摆
  2559. /// </summary>
  2560. /// <typeparam name="TEntity"></typeparam>
  2561. /// <param name="LocalEntity"></param>
  2562. /// <param name="ItemConfig"></param>
  2563. /// <param name="isValue"></param>
  2564. /// <param name="fomart"></param>
  2565. /// <param name="attr"></param>
  2566. /// <param name="css"></param>
  2567. /// <param name="itemValue"></param>
  2568. /// <param name="index"></param>
  2569. /// <returns></returns>
  2570. public static string SingleValue_HB<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2571. {
  2572. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2573. }
  2574. /// <summary>
  2575. /// 振幅
  2576. /// </summary>
  2577. /// <param name="isValue"></param>
  2578. /// <param name="fomart"></param>
  2579. /// <param name="attr"></param>
  2580. /// <param name="chartCssConfigInfo"></param>
  2581. /// <param name="itemValue"></param>
  2582. /// <param name="index"></param>
  2583. /// <returns></returns>
  2584. public static string SingleCell_ZF(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2585. {
  2586. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2587. }
  2588. /// <summary>
  2589. /// 福建31选7三区比
  2590. /// </summary>
  2591. /// <typeparam name="TEntity"></typeparam>
  2592. /// <param name="LocalEntity"></param>
  2593. /// <param name="isValue"></param>
  2594. /// <param name="fomart"></param>
  2595. /// <param name="attr"></param>
  2596. /// <param name="css"></param>
  2597. /// <param name="itemValue"></param>
  2598. /// <param name="index"></param>
  2599. /// <returns></returns>
  2600. public static string SingleCell_FJ31X7SanQu<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2601. {
  2602. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2603. }
  2604. /// <summary>
  2605. /// 福建31选7三区比
  2606. /// </summary>
  2607. /// <typeparam name="TEntity"></typeparam>
  2608. /// <param name="LocalEntity"></param>
  2609. /// <param name="isValue"></param>
  2610. /// <param name="fomart"></param>
  2611. /// <param name="attr"></param>
  2612. /// <param name="css"></param>
  2613. /// <param name="itemValue"></param>
  2614. /// <param name="index"></param>
  2615. /// <returns></returns>
  2616. public static string SingleCell_FJ36X7SanQu<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2617. {
  2618. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2619. }
  2620. /// <summary>
  2621. /// 和尾大小
  2622. /// </summary>
  2623. /// <typeparam name="TEntity"></typeparam>
  2624. /// <param name="LocalEntity"></param>
  2625. /// <param name="isValue"></param>
  2626. /// <param name="fomart"></param>
  2627. /// <param name="attr"></param>
  2628. /// <param name="css"></param>
  2629. /// <param name="itemValue"></param>
  2630. /// <param name="index"></param>
  2631. /// <returns></returns>
  2632. public static string SingleValue_HeWeiDx<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2633. {
  2634. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2635. }
  2636. /// <summary>
  2637. /// 生肖
  2638. /// </summary>
  2639. /// <typeparam name="TEntity"></typeparam>
  2640. /// <param name="LocalEntity"></param>
  2641. /// <param name="isValue"></param>
  2642. /// <param name="fomart"></param>
  2643. /// <param name="attr"></param>
  2644. /// <param name="css"></param>
  2645. /// <param name="itemValue"></param>
  2646. /// <param name="index"></param>
  2647. /// <returns></returns>
  2648. public static string SingleValue_ShengXiao(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2649. {
  2650. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2651. }
  2652. /// <summary>
  2653. /// 华东15选5三区比
  2654. /// </summary>
  2655. /// <typeparam name="TEntity"></typeparam>
  2656. /// <param name="LocalEntity"></param>
  2657. /// <param name="isValue"></param>
  2658. /// <param name="fomart"></param>
  2659. /// <param name="attr"></param>
  2660. /// <param name="css"></param>
  2661. /// <param name="itemValue"></param>
  2662. /// <param name="index"></param>
  2663. /// <returns></returns>
  2664. public static string SingleCell_HD15X5SanQu<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2665. {
  2666. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2667. }
  2668. /// <summary>
  2669. /// 华东15选5一区个数
  2670. /// </summary>
  2671. /// <param name="isValue"></param>
  2672. /// <param name="fomart"></param>
  2673. /// <param name="attr"></param>
  2674. /// <param name="chartCssConfigInfo"></param>
  2675. /// <param name="itemValue"></param>
  2676. /// <param name="index"></param>
  2677. /// <returns></returns>
  2678. public static string SingleValue_Hd11x5Yq(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2679. {
  2680. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2681. }
  2682. /// <summary>
  2683. /// 华东15选5二区个数
  2684. /// </summary>
  2685. /// <param name="isValue"></param>
  2686. /// <param name="fomart"></param>
  2687. /// <param name="attr"></param>
  2688. /// <param name="chartCssConfigInfo"></param>
  2689. /// <param name="itemValue"></param>
  2690. /// <param name="index"></param>
  2691. /// <returns></returns>
  2692. public static string SingleValue_Hd11x5Eq(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2693. {
  2694. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2695. }
  2696. /// <summary>
  2697. /// 华东15选5三区个数
  2698. /// </summary>
  2699. /// <param name="isValue"></param>
  2700. /// <param name="fomart"></param>
  2701. /// <param name="attr"></param>
  2702. /// <param name="chartCssConfigInfo"></param>
  2703. /// <param name="itemValue"></param>
  2704. /// <param name="index"></param>
  2705. /// <returns></returns>
  2706. public static string SingleValue_Hd11x5Sq(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2707. {
  2708. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2709. }
  2710. /// <summary>
  2711. /// 南粤36选7三区比
  2712. /// </summary>
  2713. /// <typeparam name="TEntity"></typeparam>
  2714. /// <param name="LocalEntity"></param>
  2715. /// <param name="isValue"></param>
  2716. /// <param name="fomart"></param>
  2717. /// <param name="attr"></param>
  2718. /// <param name="css"></param>
  2719. /// <param name="itemValue"></param>
  2720. /// <param name="index"></param>
  2721. /// <returns></returns>
  2722. public static string SingleCell_NY36x7SanQu<TEntity>(TEntity LocalEntity, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2723. {
  2724. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2725. }
  2726. /// <summary>
  2727. /// 和值012路
  2728. /// </summary>
  2729. /// <param name="isValue"></param>
  2730. /// <param name="fomart"></param>
  2731. /// <param name="attr"></param>
  2732. /// <param name="chartCssConfigInfo"></param>
  2733. /// <param name="itemValue"></param>
  2734. /// <param name="index"></param>
  2735. /// <returns></returns>
  2736. public static string SingleCell_Hz012(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2737. {
  2738. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2739. }
  2740. /// <summary>
  2741. /// 快3三不同走势
  2742. /// </summary>
  2743. /// <param name="isValue"></param>
  2744. /// <param name="fomart"></param>
  2745. /// <param name="attr"></param>
  2746. /// <param name="chartCssConfigInfo"></param>
  2747. /// <param name="itemValue"></param>
  2748. /// <param name="index"></param>
  2749. /// <returns></returns>
  2750. public static string SingleCell_K3sbt(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2751. {
  2752. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2753. }
  2754. /// <summary>
  2755. /// 快三二不同走势
  2756. /// </summary>
  2757. /// <typeparam name="TEntity"></typeparam>
  2758. /// <param name="LocalEntity"></param>
  2759. /// <param name="ItemConfig"></param>
  2760. /// <param name="isValue"></param>
  2761. /// <param name="fomart"></param>
  2762. /// <param name="attr"></param>
  2763. /// <param name="css"></param>
  2764. /// <param name="itemValue"></param>
  2765. /// <param name="index"></param>
  2766. /// <returns></returns>
  2767. public static string SetK3ebtItemValue<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2768. {
  2769. return GetCssValueExtend1(isValue, fomart, attr, css, itemValue, index);
  2770. }
  2771. /// <summary>
  2772. /// 快3二不同走势
  2773. /// </summary>
  2774. /// <param name="isValue"></param>
  2775. /// <param name="fomart"></param>
  2776. /// <param name="attr"></param>
  2777. /// <param name="chartCssConfigInfo"></param>
  2778. /// <param name="itemValue"></param>
  2779. /// <param name="index"></param>
  2780. /// <returns></returns>
  2781. public static string SingleCell_K3ebt(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2782. {
  2783. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2784. }
  2785. public static string SingleValue_JoValue(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2786. {
  2787. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2788. }
  2789. public static string SingleValue_DxValue(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2790. {
  2791. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2792. }
  2793. public static string SingleValue_ZhValue(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2794. {
  2795. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2796. }
  2797. public static string SetSbtxtItemValue<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2798. {
  2799. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2800. }
  2801. public static string SetEbtxtItemValue<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2802. {
  2803. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2804. }
  2805. public static string SingleValue_DxJoValue(bool isValue, string fomart, string attr, ChartCssConfigInfo chartCssConfigInfo, string itemValue, int index)
  2806. {
  2807. return GetCssValue(isValue, fomart, attr, chartCssConfigInfo, itemValue, index);
  2808. }
  2809. /// <summary>
  2810. /// 单值多列快乐扑克3花色状态项
  2811. /// </summary>
  2812. /// <param name="isValue"></param>
  2813. /// <param name="fomart"></param>
  2814. /// <param name="attr"></param>
  2815. /// <param name="css"></param>
  2816. /// <param name="itemValue"></param>
  2817. /// <param name="index"></param>
  2818. /// <returns></returns>
  2819. public static string SingleValue_KLPKHS_StatusItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index)
  2820. {
  2821. var _css = new ChartCssConfigInfo { MissCssName = "miss-yred", NumberCssName = "bg-yellow" };
  2822. if (css != null)
  2823. {
  2824. _css.MissCssName = css.MissCssName;
  2825. _css.NumberCssName = css.NumberCssName;
  2826. }
  2827. _css.NumberCssName += " " + itemValue + "-no";
  2828. return GetCssValue(isValue, fomart, attr, _css, itemValue, index);
  2829. }
  2830. public static string SingleValue_SJP<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2831. {
  2832. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2833. }
  2834. public static string SingleValue_HwSjp<TEntity>(TEntity LocalEntity, TrendChartItemInfo ItemConfig, bool isValue, string fomart, string attr, ChartCssConfigInfo css, string itemValue, int index) where TEntity : LotteryOpenCode
  2835. {
  2836. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2837. }
  2838. public static string SingleValue_HeWei012Item(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  2839. string itemValue, int index)
  2840. {
  2841. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2842. }
  2843. public static string SingleValue_MaxItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  2844. string itemValue, int index)
  2845. {
  2846. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2847. }
  2848. public static string SingleValue_MinItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  2849. string itemValue, int index)
  2850. {
  2851. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2852. }
  2853. public static string SingleValue_AvgItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  2854. string itemValue, int index)
  2855. {
  2856. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2857. }
  2858. public static string SingleValue_HkhItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  2859. string itemValue, int index)
  2860. {
  2861. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2862. }
  2863. public static string SingleValue_HkcItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  2864. string itemValue, int index)
  2865. {
  2866. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2867. }
  2868. public static string SingleValue_WhzItem(bool isValue, string fomart, string attr, ChartCssConfigInfo css,
  2869. string itemValue, int index)
  2870. {
  2871. return GetCssValue(isValue, fomart, attr, css, itemValue, index);
  2872. }
  2873. }
  2874. }