コード例 #1
0
        private void buttonCopy_Click(object sender, RoutedEventArgs e)
        {
            if (lcp == null)
            {
                SilverlightLFC.common.Environment.ShowMessage("未将按钮和测试对象关联!"); return;
            }
            CameraTestDesktop d = CameraTestDesktop.getDesktop();

            d.addClip(lcp.getPhoto());
        }
コード例 #2
0
        private void buttonRemove_Click(object sender, RoutedEventArgs e)
        {
            Image i = Tag as Image;

            Visibility = Visibility.Collapsed;
            CameraTestDesktop d = CameraTestDesktop.getDesktop();

            if (d.ClipList.Children.Contains(i))
            {
                d.ClipList.Children.Remove(i);
            }
        }
コード例 #3
0
        private void buttonAdd_Click(object sender, RoutedEventArgs e)
        {
            WriteableBitmap b = OpenImage();

            if (b == null)
            {
                return;
            }
            image1.Source = b;
            CameraTestDesktop d = CameraTestDesktop.getDesktop();

            d.addClip(b);
        }
コード例 #4
0
        private void buttonPaste_Click(object sender, RoutedEventArgs e)
        {
            if (lcp == null)
            {
                SilverlightLFC.common.Environment.ShowMessage("未将按钮和测试对象关联!"); return;
            }
            CameraTestDesktop d  = CameraTestDesktop.getDesktop();
            WriteableBitmap   wb = d.getClip();

            if (wb == null)
            {
                return;
            }
            lcp.setPhoto(wb);
        }
コード例 #5
0
        public void ToIcon()
        {
            if (ctp == null)
            {
                return;
            }
            ActionAnimationShow a       = new ActionAnimationShow(ctp);
            CameraTestDesktop   cd      = CameraTestDesktop.getDesktop();
            StackPanel          taskBar = CameraTestDesktop.getTaskBar();

            FormPoint = new Point(Canvas.GetLeft(ctp), Canvas.GetTop(ctp));
            Point ep = CameraTestDesktop.getPosition(this);

            a.AnimationComplete += new AnimationCompleteEventHandler(hidea_AnimationComplete);
            a.HideZoomProjection(500, FormPoint, ep);
        }
コード例 #6
0
 public CameraTestProject()
 {
     InitializeComponent();
     am = new ActionMove(this, this.LayoutRoot);
     CameraTestDesktop cd = CameraTestDesktop.getDesktop();
 }
コード例 #7
0
        private void LayoutRoot_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            CameraTestDesktop cd = CameraTestDesktop.getDesktop();

            cd.currentProject = this;
        }
コード例 #8
0
        public static Point getPosition(UIElement u)
        {
            GeneralTransform gt = u.TransformToVisual(CameraTestDesktop.getDesktop());

            return(gt.TransformPoint(new Point()));
        }