public DoDown getDown(String cmd) { DoDown toRet = dumDown; switch (cmd) { case "Select": toRet = setOrigin; break; case "Move": toRet = downSelect; break; case "Paint": toRet = dumDown; break; case "Pencil": toRet = dumDown; break; case "Fill": toRet = dumDown; 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 ); }