public DoMove getMove(String cmd) { DoMove toRet = dumMove; switch (cmd) { case "Select": toRet = selection; break; case "Paint": toRet = moveCursor; break; case "Pencil": toRet = movePencil; break; case "Move": toRet = moveSelect; break; case "Fill": toRet = dumMove; break; } return(toRet); }
private static void changeTool(Button pressed) { if (name == "Move") { use.flatten(); } switch (pressed.Name) { case "btnSelect": cName = "CreativeModePlus.res.brush.General.png"; name = "Select"; break; case "btnMove": cName = "CreativeModePlus.res.brush.MoveSelect.png"; name = "Move"; break; case "btnFill": cName = "CreativeModePlus.res.brush.General.png"; name = "Fill"; break; case "btnPaint": cName = "CreativeModePlus.res.brush.General.png"; name = "Paint"; break; case "btnPencil": cName = "CreativeModePlus.res.brush.Pencil.png"; name = "Pencil"; frmMain.cmbPaint.SelectedIndex = 0; break; } if (name != "Pencil") { frmMain.cmbPaint.Enabled = true; } else { frmMain.cmbPaint.Enabled = false; } moveTool = use.getMove(name); downTool = use.getDown(name); upTool = use.getUp(name); clickTool = use.getClick(name); }
private static void init(PictureBox pic) { use = new Tool(pic); moveTool = use.getMove(""); clickTool = use.getClick(""); downTool = use.getDown(""); upTool = use.getUp(""); initialized = true; }
private static void init( PictureBox pic ) { use = new Tool( pic ); moveTool = use.getMove( "" ); clickTool = use.getClick( "" ); downTool = use.getDown( "" ); upTool = use.getUp( "" ); initialized = true; }
private static void changeTool( Button pressed ) { if( name == "Move" ) use.flatten(); switch( pressed.Name ) { case "btnSelect": cName = "CreativeModePlus.res.brush.General.png"; name = "Select"; break; case "btnMove": cName = "CreativeModePlus.res.brush.MoveSelect.png"; name = "Move"; break; case "btnFill": cName = "CreativeModePlus.res.brush.General.png"; name = "Fill"; break; case "btnPaint": cName = "CreativeModePlus.res.brush.General.png"; name = "Paint"; break; case "btnPencil": cName = "CreativeModePlus.res.brush.Pencil.png"; name = "Pencil"; frmMain.cmbPaint.SelectedIndex = 0; break; } if( name != "Pencil" ) frmMain.cmbPaint.Enabled = true; else frmMain.cmbPaint.Enabled = false; moveTool = use.getMove( name ); downTool = use.getDown( name ); upTool = use.getUp( name ); clickTool = use.getClick( name ); }