Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.26 KB | None | 0 0
  1. {
  2. // Place your snippets for csharp here. Each snippet is defined under a snippet name and has a prefix, body and
  3. // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
  4. // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
  5. // same ids are connected.
  6. // Example:
  7. "Screen set":{
  8. "prefix": "scrset",
  9. "body":[
  10. "scrset(",
  11. "\t${sSomeScreen}:frm(#${Screen_name}, 60|60|60|55,",
  12. "\t\tinit:block(),",
  13. "\t\trefresh:block(),",
  14. "\t\t$0",
  15. "\t\tback:call(#Back, cancel())",
  16. "\t)",
  17. ")"
  18. ],
  19. "description": "Screen set"
  20. },
  21. "Menu multi select":{
  22. "prefix": "menumulti",
  23. "body":[
  24. "${sSomeMenu}:menu(#${Menu},${varMenu},multi:yes,dialog:yes",
  25. "\tdpath(dTemp,.${var_menu})",
  26. "\tok:call(#Ok,block(",
  27. "\t\tback()",
  28. "\t)),",
  29. "\tcancel:call(#Cancel,cancel())",
  30. ")"
  31. ],
  32. "description": "Menu multi-select"
  33. },
  34. "Menu single select":{
  35. "prefix": "menusingle",
  36. "body":[
  37. "${sSomeMenu}:menu(#${Menu},${varMenu},multi:no,dialog:no",
  38. "\tdpath(dTemp,.${var_menu})",
  39. "\tdef:call(#Ok,block(",
  40. "\t\tback()",
  41. "\t)),",
  42. "\tback:call(#Cancel,cancel())",
  43. ")"
  44. ],
  45. "description": "Menu single select"
  46. },
  47. "dataCount":{
  48. "prefix": "datacount",
  49. "body":[
  50. "dataCount(['plot',${lc}, 'pest', '${PT11}'], '${prop}')"
  51. ],
  52. "description": "Data count with property name"
  53. },
  54. "dataSet":{
  55. "prefix": "dataset",
  56. "body":[
  57. "dataSet(['plot', ${lc}, 'pest', '${PT11}'], ['${prop1}', '${prop2}'], [${prop1Arr}, ${prop2Arr}])"
  58. ],
  59. "description": "dataSet"
  60. },
  61. "lastData":{
  62. "prefix": "lastdata",
  63. "body":[
  64. "lastData(\"/data[plot==${lc}&&pest=='${PM200}'].${prop}\")"
  65. ],
  66. "description": "lastData query"
  67. },
  68. "Query dhist":{
  69. "prefix": "dhistqps",
  70. "body":[
  71. "qps(\"/data[plot==${lc}&&pest=='${PM200}'].${prop}\",\"dHist\")"
  72. ],
  73. "description": "QPS dHist"
  74. },
  75. "Query dlist array":{
  76. "prefix": "qpdlist",
  77. "body":[
  78. "qp(\".${samples}:dlist/dset.${sample_prop}\",\"dTemp\")"
  79. ],
  80. "description": "QP dlist from dTemp"
  81. },
  82. "Query single dlist element":{
  83. "prefix": "qpsingledlist",
  84. "body":[
  85. "qps(\".${samples}:dlist/dset[${var}].${sample_prop}\",\"dTemp\")"
  86. ],
  87. "description": "QPS single dlist element from dTemp"
  88. },
  89. "locationArea":{
  90. "prefix": "locationarea",
  91. "body":[
  92. "set($plotArea,${locationArea(${lc},'DEF')}),"
  93. ],
  94. "description": "locationArea"
  95. },
  96. "addli":{
  97. "prefix": "addli",
  98. "body":[
  99. "addli($${value},${res(\"${Label}\")},rid:${ldTempOne})"
  100. ],
  101. "description": "addli"
  102. },
  103. "remli":{
  104. "prefix": "remli",
  105. "body":[
  106. "remli(all,rid:${ldTempOne}) "
  107. ],
  108. "description": "remli"
  109. },
  110. "Track": {
  111. "prefix": "track",
  112. "body": "track(require,3,highest,60,3,12,6,25),",
  113. "description": "Track"
  114. },
  115. "Print to Error log": {
  116. "prefix": "log",
  117. "body": [
  118. "log(warn,${'$1'}),",
  119. "$2"
  120. ],
  121. "description": "Log output to error log"
  122. },
  123. "Alert": {
  124. "prefix": "alert",
  125. "body": "alert(info, #Please),",
  126. "description": "Alert"
  127. },
  128. "For loop": {
  129. "prefix": "for",
  130. "body": [
  131. "for(${iter}, start:$1, count:$2, block(",
  132. "\t$0",
  133. ")),"
  134. ],
  135. "description": "Normal For cicle"
  136. },
  137. "For each loop": {
  138. "prefix": "foreach",
  139. "body": [
  140. "for(${iter}, $${array}, block(",
  141. "\t$0",
  142. ")),"
  143. ],
  144. "description": "For each cicle"
  145. },
  146. "For loop qp": {
  147. "prefix": "forqp",
  148. "body": [
  149. "for(${iter}, ${qp('.samples/dset.${item}','dTemp')}, block(",
  150. "\t$0",
  151. ")),"
  152. ],
  153. "description": "For from dlist"
  154. },
  155. "If statement": {
  156. "prefix": "if",
  157. "body": [
  158. "if(${notEmpty(${var})}, block(",
  159. "\t$0",
  160. ")),"
  161. ],
  162. "description": "Normal if statement"
  163. },
  164. "If Then statement": {
  165. "prefix": "ifelse",
  166. "body": [
  167. "if(${notEmpty(${var})},",
  168. "\tthen:block(",
  169. "\t\t$0",
  170. "\t),",
  171. "\telse:block(",
  172. "\t\t",
  173. "\t)",
  174. "),"
  175. ],
  176. "description": "If else statement"
  177. },
  178. "If one line": {
  179. "prefix": "ifone",
  180. "body": "if(notEmpty(${var}),$1,$2),",
  181. "description": "If on one line"
  182. },
  183. "Set": {
  184. "prefix": "set",
  185. "body": "set($${var}, ${$1}),",
  186. "description": "Normal set"
  187. },
  188. "Unset": {
  189. "prefix": "unset",
  190. "body": "unset(.${var}, dTemp),",
  191. "description": "Normal unset"
  192. },
  193. "Goto": {
  194. "prefix": "goto",
  195. "body": "goto(scr,.def.${sSomeScreen})",
  196. "description": "Goto"
  197. },
  198. "Leave screenset": {
  199. "prefix": "cancelhome",
  200. "body": "cancel(${qp('.pestPath','dTemp')})",
  201. "description": "Cancel to leave the screen"
  202. },
  203. "auxInfo": {
  204. "prefix": "auxinfo",
  205. "body": "auxinfo:producer(prm(tags:no, photos:true, notes:true, dset:${dsScreen})),",
  206. "description": "auxInfo"
  207. },
  208. "resourceList": {
  209. "prefix": "resourcelist",
  210. "body": "resourceList:producer(prm(prop:${some_prop}))",
  211. "description": "resourceList"
  212. },
  213. "listOption": {
  214. "prefix": "listOption",
  215. "body": "listOptions:producer(prm(prop:${some_prop}))",
  216. "description": "listOption"
  217. },
  218. "Button": {
  219. "prefix": "btn",
  220. "body": [
  221. "btn(#${Back},rvr:false,pim:true,aln:center,lo($1,m(10,20,1,20)),call(na,block(",
  222. "\t$0",
  223. "\tcancel(${qp('.pestPath','dTemp')})",
  224. "))),"
  225. ],
  226. "description": "Button"
  227. },
  228. "Label": {
  229. "prefix": "lbl",
  230. "body": "lbl(#${Label_Title},lo(2,m(5,0,5,0))),",
  231. "description": "Label"
  232. },
  233. "Choice input": {
  234. "prefix": "ci",
  235. "body": [
  236. "ci(single, ${varPresence},req:no,val:no, cols:2, lo(1$1), dpath(dTemp, .${var_presence}),",
  237. "\topt(no, #No),",
  238. "\topt(yes, #Yes)",
  239. "),"
  240. ],
  241. "description": "Choice input"
  242. },
  243. "Checkbox":{
  244. "prefix": "cb",
  245. "body": "cb(${varBool},req:no,val:false,lo(1$1),dpath(dTemp,.${var_bool})),",
  246. "description": "Check box"
  247. },
  248. "Date input":{
  249. "prefix": "di",
  250. "body": "di(${date},yes,${date()},lo(1$1),dpath(dTemp,.${date})),",
  251. "description": "Date input"
  252. },
  253. "List input": {
  254. "prefix": "list",
  255. "body": [
  256. "list(in:${listItem},req:yes,",
  257. "\tdpath(dTemp,.${list_item}),",
  258. "\tlo(1),",
  259. "\tli(1,'',ord:1)",
  260. "\t$0",
  261. "),"
  262. ],
  263. "description": "List input"
  264. },
  265. "Numeric input":{
  266. "prefix": "ni",
  267. "body": "ni(${itemNumber},req:yes,val:0,min:0,max:100,int:yes,lo(1),dpath(dTemp,.${itemNumber})),",
  268. "description": "Numeric input"
  269. },
  270. "Text input":{
  271. "prefix": "ti",
  272. "body": "ti(${itemText},req:yes,rows:4,min:0,max:100,lo(1),dpath(dTemp,.${itemText})),",
  273. "description": "Text input"
  274. },
  275. "Panel":{
  276. "prefix": "pnl",
  277. "body": [
  278. "pnl(cols:59|59|59|59$2,lo(1$1),",
  279. "\t$0",
  280. ")"
  281. ],
  282. "description": "Panel"
  283. },
  284. "Panel repeater":{
  285. "prefix": "prp",
  286. "body": [
  287. "prp(ivar:ri,lo(1$1),dpath(dTemp,.${samples}\\:dlist/dset[ri]),",
  288. "\tcont:pnl(cols:70|65|65|35,",
  289. "\t\tlbl(${frm(ri+1,0,0)},sd:true,lo(1,m(0,0,2,0))),",
  290. "\t\tni(req:true,min:0,lo(2),dpath(dTemp,.${samples}\\:dlist/dset[ri].${one_sample})),",
  291. "\t\t$0",
  292. "\t\tdel:btn(X)",
  293. "\t)",
  294. "\tadd:btn(#Add_sample)",
  295. "),"
  296. ],
  297. "description": "Panel repeater"
  298. }
  299. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement