Exemple #1
0
        //插入图片
        private void insertImage_Click(object sender, RoutedEventArgs e)
        {
            _inkFrame.InkCollector.InkCanvas.EditingMode = InkCanvasEditingMode.None;
            //打开图片选择框
            OpenFileDialog openfile = new OpenFileDialog()
            {
                Filter      = "Jpeg Files (*.jpg)|*.jpg|Bitmap files (*.bmp)|*.bmp|All Files(*.*)|*.*",
                Multiselect = true
            };

            if (openfile.ShowDialog() == DialogResult.OK)
            {
                string  FileName     = openfile.FileName;
                string  SafeFileName = openfile.SafeFileName;
                MyImage newimage     = new MyImage(FileName);
                newimage.SafeFileName = SafeFileName;
                InkConstants.AddBound(newimage);
                AddImageCommand cmd = new AddImageCommand(_inkFrame.InkCollector, newimage);
                cmd.execute();
                _inkFrame.InkCollector.CommandStack.Push(cmd);
                _inkFrame.pointView.pointView.AddNode(_inkFrame.pointView.pointView.nodeList, _inkFrame.pointView.pointView.links);
            }
            this.Height       = GlobalValues.ControlPanel_OtherModeHeight;
            InkCollector.Mode = InkMode.AutoMove;
        }
Exemple #2
0
        //导入草图方法
        public void LoadSketch(List <System.Drawing.Bitmap> BitmapList, List <Point> points, int width, int height)
        {
            List <BitmapImage> bmpList = new List <BitmapImage>();
            int i = 0;

            foreach (System.Drawing.Bitmap bit in BitmapList)
            {
                bmpList.Add(WPFInk.tool.ConvertClass.getInstance().BitmapToBitmapImage(bit));
            }



            int    j;
            string pathName = GlobalValues.FilesPath + "//WPFink/0.bmp";

            BitmapList[0].Save(pathName);
            MyImage preMyImage = new MyImage(pathName);
            MyImage MyImage0   = preMyImage;

            preMyImage.Width    = width;
            preMyImage.Height   = height;
            preMyImage.Left     = points[0].X;
            preMyImage.Top      = points[0].Y;
            preMyImage.PathName = pathName;
            preMyImage.setLocation((int)points[0].X, (int)points[0].Y);
            InkConstants.AddBound(preMyImage);

            AddImageCommand cmd = new AddImageCommand(InkCollector, preMyImage);

            cmd.execute();
            ImageConnector connector = null;

            for (i = 0; i < bmpList.Count - 1; i++)
            {
                j        = i + 1;
                pathName = GlobalValues.FilesPath + "//WPFink/" + j + ".bmp";

                BitmapList[j].Save(pathName);
                MyImage newimage = new MyImage(pathName);
                newimage.Width  = width;
                newimage.Height = height;
                newimage.setLocation((int)points[j].X, (int)points[j].Y);
                newimage.Left     = points[j].X;
                newimage.Top      = points[j].Y;
                newimage.PathName = pathName;
                InkConstants.AddBound(newimage);
                AddImageCommand cmd2 = new AddImageCommand(InkCollector, newimage);
                cmd2.execute();
                connector  = new ImageConnector(preMyImage, newimage);
                preMyImage = newimage;
                MyStroke myStroke = connector.MYSTROKE;
                myStroke.Stroke.DrawingAttributes.Width  = 4;
                myStroke.Stroke.DrawingAttributes.Height = 4;
                myStroke.IsSketchConnector = true;
                Command sc = new AddStrokeCommand(InkCollector, myStroke);
                sc.execute();
            }
        }
Exemple #3
0
        private void addImage(string name, Thickness margin, InkCanvas inkCanvas)
        {
            BitmapImage bitmapImage = new BitmapImage(new Uri("pack://siteoforigin:,,,/images/" + name + ".jpg", UriKind.RelativeOrAbsolute));
            Image       image       = new Image();

            image.Source = bitmapImage;
            image.Width  = bitmapImage.Width;
            image.Height = bitmapImage.Height;
            image.Margin = margin;
            MyImage myImage = new MyImage(image);

            myImage.Left   = image.Margin.Left;
            myImage.Top    = image.Margin.Top;
            myImage.Height = image.Height;
            myImage.Width  = image.Width;
            InkConstants.AddBound(myImage);
            Command aic = new AddImageCommand(_inkFrame.InkCollector, myImage);

            aic.execute();
            _inkFrame.InkCollector.CommandStack.Push(aic);
        }
Exemple #4
0
        void TitleInk_MouseUp(object sender, MouseButtonEventArgs e)
        {
            Title_InkFrame.InkCollector.Sketch.Images[3].Bound.Visibility = Visibility.Collapsed;
            Image image = InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\pentagram.png");

            image.Width      = 60;
            image.Height     = 60;
            image.Visibility = Visibility.Collapsed;
            image.Margin     = new Thickness(_videoOperation._videoAnnotation.Annotation_InkFrame.ActualWidth / 2 - 30,
                                             _videoOperation._videoAnnotation.Annotation_InkFrame.ActualHeight / 2 - 30, 0, 0);
            MyImage newimage = new MyImage(image);

            newimage.Left = 240;
            newimage.Top  = 240;
            InkConstants.AddBound(newimage);
            AddImageCommand cmd = new AddImageCommand(_videoOperation._videoAnnotation.Annotation_InkFrame.InkCollector, newimage);

            cmd.execute();
            _videoOperation._videoAnnotation.Annotation_InkFrame.InkCollector.CommandStack.Push(cmd);

            Image image2 = InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\pentagramRed.png");

            image2.Width  = 60;
            image2.Height = 60;
            image2.Margin = new Thickness(_videoOperation._videoAnnotation.Annotation_InkFrame.ActualWidth / 2 - 30,
                                          _videoOperation._videoAnnotation.Annotation_InkFrame.ActualHeight / 2 - 30, 0, 0);
            MyImage newimage2 = new MyImage(image2);

            newimage2.Left = 240;
            newimage2.Top  = 240;
            InkConstants.AddBound(newimage2);
            AddImageCommand cmd2 = new AddImageCommand(_videoOperation._videoAnnotation.Annotation_InkFrame.InkCollector, newimage2);

            cmd2.execute();
            _videoOperation._videoAnnotation.Annotation_InkFrame.InkCollector.CommandStack.Push(cmd2);
        }
Exemple #5
0
        private void loadSketchBook()
        {
            TextBox tb = new TextBox();

            tb.Text            = "Symbol";
            tb.Margin          = new Thickness(10, 10, 0, 0);
            tb.BorderThickness = new Thickness(0);
            Title_InkFrame._inkCanvas.Children.Add(tb);
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\bad.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\good.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\music.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\pentagram.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\triangle.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\Malesymbol.png"));

            TextBox tb2 = new TextBox();

            tb2.Text            = "Motion";
            tb2.Margin          = new Thickness(10, 120, 0, 0);
            tb2.BorderThickness = new Thickness(0);
            Title_InkFrame._inkCanvas.Children.Add(tb2);
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\crash.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\localMove.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\move2.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\move1.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\ray.png"));


            TextBox tb3 = new TextBox();

            tb3.Text            = "Human";
            tb3.Margin          = new Thickness(10, 220, 0, 0);
            tb3.BorderThickness = new Thickness(0);
            Title_InkFrame._inkCanvas.Children.Add(tb3);
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\skiing2.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\skiing1.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\people3.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\people2.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\people1.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\man1.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\Horse_boy_girl.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\girl7.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\girl6.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\girl5.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\girl4.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\girl3.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\girl2.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\girl1.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\Girl_on_horse.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boygirl.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boy7.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boy6.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boy5.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boy4.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boy3.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boy2.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boy1.png"));


            //TextBox tb4 = new TextBox();
            //tb4.Text = "Motion";
            //tb4.Margin = new Thickness(10, 10, 0, 0);
            //tb4.BorderThickness = new Thickness(0);
            //Title_InkFrame._inkCanvas.Children.Add(tb4);



            TextBox tb5 = new TextBox();

            tb5.Text            = "Animal";
            tb5.Margin          = new Thickness(10, 580, 0, 0);
            tb5.BorderThickness = new Thickness(0);
            Title_InkFrame._inkCanvas.Children.Add(tb5);
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\horse9.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\horse8.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\horse7.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\horse6.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\horse5.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\horse4.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\horse3.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\horse2.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\horse1.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\hen.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\dog6.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\dog5.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\dog4.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\dog3.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\dog2.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\dog1.png"));
            images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\cloud2.png"));



            //TextBox tb6 = new TextBox();
            //tb6.Text = "Bird";
            //tb6.Margin = new Thickness(10, 10, 0, 0);
            //tb6.BorderThickness = new Thickness(0);
            //Title_InkFrame._inkCanvas.Children.Add(tb6);
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\bird4.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\bird3.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\bird2.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\bird1.png"));

            //TextBox tb7 = new TextBox();
            //tb7.Text = "Boat";
            //tb7.Margin = new Thickness(10, 10, 0, 0);
            //tb7.BorderThickness = new Thickness(0);
            //Title_InkFrame._inkCanvas.Children.Add(tb7);
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boat2.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\boat1.png"));

            //TextBox tb8 = new TextBox();
            //tb8.Text = "Building";
            //tb8.Margin = new Thickness(10, 10, 0, 0);
            //tb8.BorderThickness = new Thickness(0);
            //Title_InkFrame._inkCanvas.Children.Add(tb8);
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\building3.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\building2.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\building1.png"));

            //TextBox tb9 = new TextBox();
            //tb9.Text = "Emotion";
            //tb9.Margin = new Thickness(10, 10, 0, 0);
            //tb9.BorderThickness = new Thickness(0);
            //Title_InkFrame._inkCanvas.Children.Add(tb9);
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\smilingface.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\question mark.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\Exclamation Mark.png"));

            //TextBox tb10 = new TextBox();
            //tb10.Text = "Scene";
            //tb10.Margin = new Thickness(10, 10, 0, 0);
            //tb10.BorderThickness = new Thickness(0);
            //Title_InkFrame._inkCanvas.Children.Add(tb10);
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\sun.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\moon.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\cloud1.png"));

            //TextBox tb11 = new TextBox();
            //tb11.Text = "Olympic";
            //tb11.Margin = new Thickness(10, 10, 0, 0);
            //tb11.BorderThickness = new Thickness(0);
            //Title_InkFrame._inkCanvas.Children.Add(tb11);
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\tower.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\pavilion.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\oly.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\lake.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\hill.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\birdnest.png"));

            //TextBox tb12 = new TextBox();
            //tb12.Text = "Flower";
            //tb12.Margin = new Thickness(10, 10, 0, 0);
            //tb12.BorderThickness = new Thickness(0);
            //Title_InkFrame._inkCanvas.Children.Add(tb12);
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\flower8.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\flower7.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\flower6.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\flower5.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\flower4.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\flower3.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\flower2.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\flower1.png"));

            //TextBox tb13 = new TextBox();
            //tb13.Text = "Other";
            //tb13.Margin = new Thickness(10, 10, 0, 0);
            //tb13.BorderThickness = new Thickness(0);
            //Title_InkFrame._inkCanvas.Children.Add(tb13);
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\whale.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\water.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\tree1.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\table1.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\strawberry.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\road1.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\plane1.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\mountain1.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\car1.png"));
            //images.Add(InkConstants.getImageFromName(GlobalValues.FilesPath + @"\WPFInkResource\sketchBook\bag.png"));


            images[3].MouseDown += new MouseButtonEventHandler(TitleInk_MouseDown);
            images[3].MouseUp   += new MouseButtonEventHandler(TitleInk_MouseUp);
            int count = images.Count;
            int i     = 0;

            for (i = 0; i < 6; i++)
            {
                images[i].Width  = sketchWidth;
                images[i].Height = sketchHeight;

                images[i].VerticalAlignment   = VerticalAlignment.Top;
                images[i].HorizontalAlignment = HorizontalAlignment.Left;
                images[i].Margin = new Thickness(i % sketchCountPerRow * sketchWidth + HorizontalInterval,
                                                 20 + VerticalInterval, 0, 0);
                MyImage newimage = new MyImage(images[i]);
                newimage.Left = images[i].Margin.Left;
                newimage.Top  = images[i].Margin.Top;
                InkConstants.AddBound(newimage);
                AddImageCommand cmd = new AddImageCommand(Title_InkFrame.InkCollector, newimage);
                cmd.execute();
                Title_InkFrame.InkCollector.CommandStack.Push(cmd);
            }
            for (i = 6; i < 11; i++)
            {
                images[i].Width  = sketchWidth;
                images[i].Height = sketchHeight;

                images[i].VerticalAlignment   = VerticalAlignment.Top;
                images[i].HorizontalAlignment = HorizontalAlignment.Left;
                images[i].Margin = new Thickness((i - 6) % sketchCountPerRow * sketchWidth + HorizontalInterval,
                                                 130 + VerticalInterval, 0, 0);
                MyImage newimage = new MyImage(images[i]);
                newimage.Left = images[i].Margin.Left;
                newimage.Top  = images[i].Margin.Top;
                InkConstants.AddBound(newimage);
                AddImageCommand cmd = new AddImageCommand(Title_InkFrame.InkCollector, newimage);
                cmd.execute();
                Title_InkFrame.InkCollector.CommandStack.Push(cmd);
            }
            for (i = 11; i < 34; i++)
            {
                images[i].Width  = sketchWidth;
                images[i].Height = sketchHeight;

                images[i].VerticalAlignment   = VerticalAlignment.Top;
                images[i].HorizontalAlignment = HorizontalAlignment.Left;
                images[i].Margin = new Thickness((i - 11) % sketchCountPerRow * sketchWidth + HorizontalInterval,
                                                 (i - 11) / sketchCountPerRow * sketchHeight + VerticalInterval + 240, 0, 0);
                MyImage newimage = new MyImage(images[i]);
                newimage.Left = images[i].Margin.Left;
                newimage.Top  = images[i].Margin.Top;
                InkConstants.AddBound(newimage);
                AddImageCommand cmd = new AddImageCommand(Title_InkFrame.InkCollector, newimage);
                cmd.execute();
                Title_InkFrame.InkCollector.CommandStack.Push(cmd);
            }
            for (i = 34; i < 51; i++)
            {
                images[i].Width  = sketchWidth;
                images[i].Height = sketchHeight;

                images[i].VerticalAlignment   = VerticalAlignment.Top;
                images[i].HorizontalAlignment = HorizontalAlignment.Left;
                images[i].Margin = new Thickness((i - 34) % sketchCountPerRow * sketchWidth + HorizontalInterval,
                                                 (i - 34) / sketchCountPerRow * sketchHeight + VerticalInterval + 580, 0, 0);
                MyImage newimage = new MyImage(images[i]);
                newimage.Left = images[i].Margin.Left;
                newimage.Top  = images[i].Margin.Top;
                InkConstants.AddBound(newimage);
                AddImageCommand cmd = new AddImageCommand(Title_InkFrame.InkCollector, newimage);
                cmd.execute();
                Title_InkFrame.InkCollector.CommandStack.Push(cmd);
            }
            //for (i = 0; i < 6; i++)
            //{
            //    images[i].Width = sketchWidth;
            //    images[i].Height = sketchHeight;

            //    images[i].VerticalAlignment = VerticalAlignment.Top;
            //    images[i].HorizontalAlignment = HorizontalAlignment.Left;
            //    images[i].Margin = new Thickness(i % sketchCountPerRow * sketchWidth + HorizontalInterval,
            //        i / sketchCountPerRow * sketchHeight + VerticalInterval, 0, 0);
            //    MyImage newimage = new MyImage(images[i]);
            //    newimage.Left = images[i].Margin.Left;
            //    newimage.Top = images[i].Margin.Top;
            //    InkConstants.AddBound(newimage);
            //    AddImageCommand cmd = new AddImageCommand(Title_InkFrame.InkCollector, newimage);
            //    cmd.execute();
            //    Title_InkFrame.InkCollector.CommandStack.Push(cmd);
            //}
            //for (i = 0; i < 6; i++)
            //{
            //    images[i].Width = sketchWidth;
            //    images[i].Height = sketchHeight;

            //    images[i].VerticalAlignment = VerticalAlignment.Top;
            //    images[i].HorizontalAlignment = HorizontalAlignment.Left;
            //    images[i].Margin = new Thickness(i % sketchCountPerRow * sketchWidth + HorizontalInterval,
            //        i / sketchCountPerRow * sketchHeight + VerticalInterval, 0, 0);
            //    MyImage newimage = new MyImage(images[i]);
            //    newimage.Left = images[i].Margin.Left;
            //    newimage.Top = images[i].Margin.Top;
            //    InkConstants.AddBound(newimage);
            //    AddImageCommand cmd = new AddImageCommand(Title_InkFrame.InkCollector, newimage);
            //    cmd.execute();
            //    Title_InkFrame.InkCollector.CommandStack.Push(cmd);
            //}
            //for (i = 0; i < 6; i++)
            //{
            //    images[i].Width = sketchWidth;
            //    images[i].Height = sketchHeight;

            //    images[i].VerticalAlignment = VerticalAlignment.Top;
            //    images[i].HorizontalAlignment = HorizontalAlignment.Left;
            //    images[i].Margin = new Thickness(i % sketchCountPerRow * sketchWidth + HorizontalInterval,
            //        i / sketchCountPerRow * sketchHeight + VerticalInterval, 0, 0);
            //    MyImage newimage = new MyImage(images[i]);
            //    newimage.Left = images[i].Margin.Left;
            //    newimage.Top = images[i].Margin.Top;
            //    InkConstants.AddBound(newimage);
            //    AddImageCommand cmd = new AddImageCommand(Title_InkFrame.InkCollector, newimage);
            //    cmd.execute();
            //    Title_InkFrame.InkCollector.CommandStack.Push(cmd);
            //}
            //for (i = 0; i < 6; i++)
            //{
            //    images[i].Width = sketchWidth;
            //    images[i].Height = sketchHeight;

            //    images[i].VerticalAlignment = VerticalAlignment.Top;
            //    images[i].HorizontalAlignment = HorizontalAlignment.Left;
            //    images[i].Margin = new Thickness(i % sketchCountPerRow * sketchWidth + HorizontalInterval,
            //        i / sketchCountPerRow * sketchHeight + VerticalInterval, 0, 0);
            //    MyImage newimage = new MyImage(images[i]);
            //    newimage.Left = images[i].Margin.Left;
            //    newimage.Top = images[i].Margin.Top;
            //    InkConstants.AddBound(newimage);
            //    AddImageCommand cmd = new AddImageCommand(Title_InkFrame.InkCollector, newimage);
            //    cmd.execute();
            //    Title_InkFrame.InkCollector.CommandStack.Push(cmd);
            //}
        }