我正在使用IfFileExists函数,但我认为它只包含跳转后的第一行.我怎样才能做类似C的事情,比如{..../.../....}?!
IfFileExists "$PROGRAMFILES\InduSoft Web Studio v7.0\Bin\RunStartUp.exe" StartUpExists PastStartUpExists
StartUpExists:
StrCpy $Text "$PROGRAMFILES\InduSoft Web Studio v7.0\Bin\RunStartUp.exe"
PastStartUpExists:
nsDialogs::Create 1018
Pop $Dialog
nsDialogs::SelectFileDialog open "$PROGRAMFILES\InduSoft Web Studio v7.0\Bin\RunStartUp.exe" "*.exe"
Pop $Text
${NSD_CreateText} 0 13u 100% -13u $Text
Pop $Text
${NSD_CreateText} 0
${NSD_GetText} $Text $0
CreateShortCut "$SMPROGRAMS\Advanlab\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
CreateShortCut "$SMPROGRAMS\Advanlab\Uninstall.lnk" "$INSTDIR\uninst.exe"
CreateShortCut "$SMPROGRAMS\Advanlab\Advanlab.lnk" "$0"
CreateShortCut "$DESKTOP\Advanlab.lnk" "$0"
Run Code Online (Sandbox Code Playgroud) 如果我有以下表格:
Product
+----+------+
| id | name |
+----+------+
| 1 | box |
| 2 | car |
| 3 | ball |
+----+------+
Color
+----+-------+
| id | name |
+----+-------+
| 1 | red |
| 2 | green |
| 3 | blue |
+----+-------+
Size
+----+--------+
| id | number |
+----+--------+
| 1 | 1 |
| 2 | 5 |
| 3 | 10 |
+----+--------+
Color Options (#product | #color)
+---------+-------+
| …
Run Code Online (Sandbox Code Playgroud) 我正在使用以下代码来获取触摸事件,绘制路径并将其存储在 ArrayList 上,并且它正在工作。
@Override
public boolean onTouchEvent(MotionEvent event) {
float touchX = event.getX();
float touchY = event.getY();
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
drawPath.moveTo(touchX, touchY);
break;
case MotionEvent.ACTION_MOVE:
drawPath.lineTo(touchX, touchY);
drawCanvas.drawPath(drawPath, drawPaint);
paths.add(drawPath);
drawPath.reset();
drawPath.moveTo(touchX, touchY);
break;
case MotionEvent.ACTION_UP:
drawCanvas.drawPath(drawPath, drawPaint);
paths.add(drawPath);
drawPath.reset();
break;
default:
return false;
}
invalidate();
return true;
}
Run Code Online (Sandbox Code Playgroud)
在我想再次绘制它但颜色不同之后它不起作用。如果我创建路径,如评论,它的工作原理:s
public void printPath(){
Path testePath = new Path();
//testePath.moveTo(0, 0);
//testePath.lineTo(300, 300);
Paint testePaint = new Paint();
testePaint.setColor(0xFF00FF00);
testePaint.setAntiAlias(true);
testePaint.setStrokeWidth(brushSize);
testePaint.setStyle(Paint.Style.STROKE);
testePaint.setStrokeJoin(Paint.Join.ROUND);
testePaint.setStrokeCap(Paint.Cap.ROUND);
testePath = paths.remove(0);
drawCanvas.drawPath(testePath, testePaint); …
Run Code Online (Sandbox Code Playgroud)