CssValueFunction.cs 147 KB

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