コード例 #1
0
ファイル: Tool.cs プロジェクト: InTheSPOT/creative-mode-plus
        public DoUp getUp(String cmd)
        {
            DoUp toRet = dumUp;

            switch (cmd)
            {
            case "Select":
                toRet = setRect;

                break;

            case "Move":
                toRet = upSelect;

                break;

            case "Paint":
                toRet = dumUp;

                break;

            case "Pencil":
                toRet = dumUp;

                break;

            case "Fill":
                toRet = dumUp;

                break;
            }

            return(toRet);
        }
コード例 #2
0
ファイル: Tools.cs プロジェクト: InTheSPOT/creative-mode-plus
        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);
        }
コード例 #3
0
ファイル: Tools.cs プロジェクト: InTheSPOT/creative-mode-plus
        private static void init(PictureBox pic)
        {
            use       = new Tool(pic);
            moveTool  = use.getMove("");
            clickTool = use.getClick("");
            downTool  = use.getDown("");
            upTool    = use.getUp("");

            initialized = true;
        }
コード例 #4
0
ファイル: Tools.cs プロジェクト: InTheSPOT/creative-mode-plus
  private static void init( PictureBox pic )
  {
   use       = new Tool( pic );
   moveTool  = use.getMove( "" );
   clickTool = use.getClick( "" );
   downTool  = use.getDown( "" );
   upTool    = use.getUp( "" );

   initialized = true;

  }
コード例 #5
0
 public ConcreteFluentMigration(DoUp doUp)
 {
     _doUp = doUp;
 }
コード例 #6
0
ファイル: Tools.cs プロジェクト: InTheSPOT/creative-mode-plus
  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 );

  }
コード例 #7
0
 public ConcreteFluentMigration(DoUp doUp)
 {
     _doUp = doUp;
 }