Esempio n. 1
0
        private void SetPenSize(int Idx)
        {
            Canvas.SetTop(img2Brd, 126);
            Canvas.SetTop(img1Brd, 126);
            Canvas.SetTop(img3Brd, 126);
            //2017/7/10添加
            Canvas.SetTop(img4Brd, 126);
            Canvas.SetTop(img5Brd, 126);

            img2Brd.BorderThickness = new Thickness(0, 0, 0, 0);
            img1Brd.BorderThickness = new Thickness(0, 0, 0, 0);
            img3Brd.BorderThickness = new Thickness(0, 0, 0, 0);
            //2017/7/10添加
            img4Brd.BorderThickness = new Thickness(0, 0, 0, 0);
            img5Brd.BorderThickness = new Thickness(0, 0, 0, 0);

            switch (Idx)
            {
            case 0:
            {
                myPaint.ChangeInkThickness(5);
                Canvas.SetTop(img1Brd, 100);
                img1Brd.BorderThickness = new Thickness(0.5, 0.5, 0.5, 0.5);
                break;
            }

            case 1:
            {
                myPaint.ChangeInkThickness(10);
                Canvas.SetTop(img2Brd, 100);
                img2Brd.BorderThickness = new Thickness(0.5, 0.5, 0.5, 0.5);
                break;
            }

            case 2:
            {
                myPaint.ChangeInkThickness(20);
                Canvas.SetTop(img3Brd, 100);
                img3Brd.BorderThickness = new Thickness(0.5, 0.5, 0.5, 0.5);
                break;
            }

            case 3:
            {
                myPaint.ChangeInkThickness(8);
                Canvas.SetTop(img4Brd, 100);
                img4Brd.BorderThickness = new Thickness(0.5, 0.5, 0.5, 0.5);
                break;
            }

            case 4:
            {
                myPaint.ChangeInkThickness(15);
                Canvas.SetTop(img5Brd, 100);
                img5Brd.BorderThickness = new Thickness(0.5, 0.5, 0.5, 0.5);
                break;
            }
            }
        }