Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- // Place your snippets for csharp here. Each snippet is defined under a snippet name and has a prefix, body and
- // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
- // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
- // same ids are connected.
- // Example:
- "Screen set":{
- "prefix": "scrset",
- "body":[
- "scrset(",
- "\t${sSomeScreen}:frm(#${Screen_name}, 60|60|60|55,",
- "\t\tinit:block(),",
- "\t\trefresh:block(),",
- "\t\t$0",
- "\t\tback:call(#Back, cancel())",
- "\t)",
- ")"
- ],
- "description": "Screen set"
- },
- "Menu multi select":{
- "prefix": "menumulti",
- "body":[
- "${sSomeMenu}:menu(#${Menu},${varMenu},multi:yes,dialog:yes",
- "\tdpath(dTemp,.${var_menu})",
- "\tok:call(#Ok,block(",
- "\t\tback()",
- "\t)),",
- "\tcancel:call(#Cancel,cancel())",
- ")"
- ],
- "description": "Menu multi-select"
- },
- "Menu single select":{
- "prefix": "menusingle",
- "body":[
- "${sSomeMenu}:menu(#${Menu},${varMenu},multi:no,dialog:no",
- "\tdpath(dTemp,.${var_menu})",
- "\tdef:call(#Ok,block(",
- "\t\tback()",
- "\t)),",
- "\tback:call(#Cancel,cancel())",
- ")"
- ],
- "description": "Menu single select"
- },
- "dataCount":{
- "prefix": "datacount",
- "body":[
- "dataCount(['plot',${lc}, 'pest', '${PT11}'], '${prop}')"
- ],
- "description": "Data count with property name"
- },
- "dataSet":{
- "prefix": "dataset",
- "body":[
- "dataSet(['plot', ${lc}, 'pest', '${PT11}'], ['${prop1}', '${prop2}'], [${prop1Arr}, ${prop2Arr}])"
- ],
- "description": "dataSet"
- },
- "lastData":{
- "prefix": "lastdata",
- "body":[
- "lastData(\"/data[plot==${lc}&&pest=='${PM200}'].${prop}\")"
- ],
- "description": "lastData query"
- },
- "Query dhist":{
- "prefix": "dhistqps",
- "body":[
- "qps(\"/data[plot==${lc}&&pest=='${PM200}'].${prop}\",\"dHist\")"
- ],
- "description": "QPS dHist"
- },
- "Query dlist array":{
- "prefix": "qpdlist",
- "body":[
- "qp(\".${samples}:dlist/dset.${sample_prop}\",\"dTemp\")"
- ],
- "description": "QP dlist from dTemp"
- },
- "Query single dlist element":{
- "prefix": "qpsingledlist",
- "body":[
- "qps(\".${samples}:dlist/dset[${var}].${sample_prop}\",\"dTemp\")"
- ],
- "description": "QPS single dlist element from dTemp"
- },
- "locationArea":{
- "prefix": "locationarea",
- "body":[
- "set($plotArea,${locationArea(${lc},'DEF')}),"
- ],
- "description": "locationArea"
- },
- "addli":{
- "prefix": "addli",
- "body":[
- "addli($${value},${res(\"${Label}\")},rid:${ldTempOne})"
- ],
- "description": "addli"
- },
- "remli":{
- "prefix": "remli",
- "body":[
- "remli(all,rid:${ldTempOne}) "
- ],
- "description": "remli"
- },
- "Track": {
- "prefix": "track",
- "body": "track(require,3,highest,60,3,12,6,25),",
- "description": "Track"
- },
- "Print to Error log": {
- "prefix": "log",
- "body": [
- "log(warn,${'$1'}),",
- "$2"
- ],
- "description": "Log output to error log"
- },
- "Alert": {
- "prefix": "alert",
- "body": "alert(info, #Please),",
- "description": "Alert"
- },
- "For loop": {
- "prefix": "for",
- "body": [
- "for(${iter}, start:$1, count:$2, block(",
- "\t$0",
- ")),"
- ],
- "description": "Normal For cicle"
- },
- "For each loop": {
- "prefix": "foreach",
- "body": [
- "for(${iter}, $${array}, block(",
- "\t$0",
- ")),"
- ],
- "description": "For each cicle"
- },
- "For loop qp": {
- "prefix": "forqp",
- "body": [
- "for(${iter}, ${qp('.samples/dset.${item}','dTemp')}, block(",
- "\t$0",
- ")),"
- ],
- "description": "For from dlist"
- },
- "If statement": {
- "prefix": "if",
- "body": [
- "if(${notEmpty(${var})}, block(",
- "\t$0",
- ")),"
- ],
- "description": "Normal if statement"
- },
- "If Then statement": {
- "prefix": "ifelse",
- "body": [
- "if(${notEmpty(${var})},",
- "\tthen:block(",
- "\t\t$0",
- "\t),",
- "\telse:block(",
- "\t\t",
- "\t)",
- "),"
- ],
- "description": "If else statement"
- },
- "If one line": {
- "prefix": "ifone",
- "body": "if(notEmpty(${var}),$1,$2),",
- "description": "If on one line"
- },
- "Set": {
- "prefix": "set",
- "body": "set($${var}, ${$1}),",
- "description": "Normal set"
- },
- "Unset": {
- "prefix": "unset",
- "body": "unset(.${var}, dTemp),",
- "description": "Normal unset"
- },
- "Goto": {
- "prefix": "goto",
- "body": "goto(scr,.def.${sSomeScreen})",
- "description": "Goto"
- },
- "Leave screenset": {
- "prefix": "cancelhome",
- "body": "cancel(${qp('.pestPath','dTemp')})",
- "description": "Cancel to leave the screen"
- },
- "auxInfo": {
- "prefix": "auxinfo",
- "body": "auxinfo:producer(prm(tags:no, photos:true, notes:true, dset:${dsScreen})),",
- "description": "auxInfo"
- },
- "resourceList": {
- "prefix": "resourcelist",
- "body": "resourceList:producer(prm(prop:${some_prop}))",
- "description": "resourceList"
- },
- "listOption": {
- "prefix": "listOption",
- "body": "listOptions:producer(prm(prop:${some_prop}))",
- "description": "listOption"
- },
- "Button": {
- "prefix": "btn",
- "body": [
- "btn(#${Back},rvr:false,pim:true,aln:center,lo($1,m(10,20,1,20)),call(na,block(",
- "\t$0",
- "\tcancel(${qp('.pestPath','dTemp')})",
- "))),"
- ],
- "description": "Button"
- },
- "Label": {
- "prefix": "lbl",
- "body": "lbl(#${Label_Title},lo(2,m(5,0,5,0))),",
- "description": "Label"
- },
- "Choice input": {
- "prefix": "ci",
- "body": [
- "ci(single, ${varPresence},req:no,val:no, cols:2, lo(1$1), dpath(dTemp, .${var_presence}),",
- "\topt(no, #No),",
- "\topt(yes, #Yes)",
- "),"
- ],
- "description": "Choice input"
- },
- "Checkbox":{
- "prefix": "cb",
- "body": "cb(${varBool},req:no,val:false,lo(1$1),dpath(dTemp,.${var_bool})),",
- "description": "Check box"
- },
- "Date input":{
- "prefix": "di",
- "body": "di(${date},yes,${date()},lo(1$1),dpath(dTemp,.${date})),",
- "description": "Date input"
- },
- "List input": {
- "prefix": "list",
- "body": [
- "list(in:${listItem},req:yes,",
- "\tdpath(dTemp,.${list_item}),",
- "\tlo(1),",
- "\tli(1,'',ord:1)",
- "\t$0",
- "),"
- ],
- "description": "List input"
- },
- "Numeric input":{
- "prefix": "ni",
- "body": "ni(${itemNumber},req:yes,val:0,min:0,max:100,int:yes,lo(1),dpath(dTemp,.${itemNumber})),",
- "description": "Numeric input"
- },
- "Text input":{
- "prefix": "ti",
- "body": "ti(${itemText},req:yes,rows:4,min:0,max:100,lo(1),dpath(dTemp,.${itemText})),",
- "description": "Text input"
- },
- "Panel":{
- "prefix": "pnl",
- "body": [
- "pnl(cols:59|59|59|59$2,lo(1$1),",
- "\t$0",
- ")"
- ],
- "description": "Panel"
- },
- "Panel repeater":{
- "prefix": "prp",
- "body": [
- "prp(ivar:ri,lo(1$1),dpath(dTemp,.${samples}\\:dlist/dset[ri]),",
- "\tcont:pnl(cols:70|65|65|35,",
- "\t\tlbl(${frm(ri+1,0,0)},sd:true,lo(1,m(0,0,2,0))),",
- "\t\tni(req:true,min:0,lo(2),dpath(dTemp,.${samples}\\:dlist/dset[ri].${one_sample})),",
- "\t\t$0",
- "\t\tdel:btn(X)",
- "\t)",
- "\tadd:btn(#Add_sample)",
- "),"
- ],
- "description": "Panel repeater"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement