コード例 #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 buttonITEGray_Click(object sender, RoutedEventArgs e)
        {
            ITEGrayscaleChartTest w = new ITEGrayscaleChartTest();

            ActionShow.CenterShow(CameraTestDesktop.getDesktopPanel(), w);
            Canvas Desk = CameraTestDesktop.getDesktopPanel();

            if (Desk.Children.Contains(this))
            {
                Desk.Children.Remove(this);
            }
        }
コード例 #3
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);
            }
        }
コード例 #4
0
        private void buttonShutterSpeed_Click(object sender, RoutedEventArgs e)
        {
            ShutterSpeed w = new ShutterSpeed();

            ActionShow.CenterShow(CameraTestDesktop.getDesktopPanel(), w);
            Canvas Desk = CameraTestDesktop.getDesktopPanel();

            if (Desk.Children.Contains(this))
            {
                Desk.Children.Remove(this);
            }
        }
コード例 #5
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);
        }
コード例 #6
0
        //public List<IParameter> ParameterList = new List<IParameter>();
        //public List<string> TestHtml = new List<string>();
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (!CameraTestDesktop.CanAccess(Version.Standard))
            {
                return;
            }
            var filter = new Dictionary <string, IList <string> >();

            filter.Add("html file", new List <string>()
            {
                "*.html", "*.htm"
            });
            SilverlightLFC.common.Environment.getEnvironment().SaveFileString(WriteToHTML(), filter);
        }
コード例 #7
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);
        }
コード例 #8
0
        public void ToForm()
        {
            LayoutRoot.Opacity = 1;
            Panel p = CameraTestDesktop.getDesktopPanel();

            if (!p.Children.Contains(ctp))
            {
                p.Children.Add(ctp);
            }
            Point sp = CameraTestDesktop.getPosition(this);
            ActionAnimationShow a = new ActionAnimationShow(ctp);

            a.AnimationComplete += new AnimationCompleteEventHandler(a_AnimationComplete);
            a.ShowZoomProjection(500, sp, FormPoint);
        }
コード例 #9
0
        void hidea_AnimationComplete(object sender, LynxAnimationCompleteEventArgs e)
        {
            Panel p = CameraTestDesktop.getDesktopPanel();

            if (p != null)
            {
                p.Children.Remove(ctp);
            }
            StackPanel tb = CameraTestDesktop.getTaskBar();

            if (!tb.Children.Contains(this))
            {
                tb.Children.Add(this);
            }
        }
コード例 #10
0
        private void buttonAberrationChart_Click(object sender, RoutedEventArgs e)
        {
            if (!CameraTestDesktop.CanAccess(Version.Standard))
            {
                return;
            }
            AberrationChartTest w = new AberrationChartTest();

            ActionShow.CenterShow(CameraTestDesktop.getDesktopPanel(), w);
            Canvas Desk = CameraTestDesktop.getDesktopPanel();

            if (Desk.Children.Contains(this))
            {
                Desk.Children.Remove(this);
            }
        }
コード例 #11
0
        public void Active()//不会激活窗体
        {
            LayoutRoot.Opacity = 1;
            Panel p = CameraTestDesktop.getDesktopPanel();

            if (p.Children.Contains(ctp))
            {
                CameraTestDesktop.ActiveUserControl(ctp);
            }
            if (CameraTestDesktop.SelectedTest != this && CameraTestDesktop.SelectedTest != null)
            {
                CameraTestDesktop.SelectedTest.DeActive();
            }
            CameraTestDesktop.SelectedTest = this;
            //LayoutRoot.Background = new SolidColorBrush(Colors.Yellow);
        }
コード例 #12
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);
        }
コード例 #13
0
 private void image1_PointerPressed(object sender, PointerRoutedEventArgs e)
 {
     e.Handled = true;
     if (ctp != null)
     {
         if (CameraTestDesktop.getDesktopPanel().Children.Contains(ctp))
         {
             CameraTestDesktop.getDesktopPanel().Children.Remove(ctp);
         }
     }
     if (release != null)
     {
         release();
     }
     if ((Parent != null) && ((Parent as Panel).Children.Contains(this)))
     {
         (Parent as Panel).Children.Remove(this);
     }
 }
コード例 #14
0
 public CameraTestProject()
 {
     InitializeComponent();
     am = new ActionMove(this, this.LayoutRoot);
     CameraTestDesktop cd = CameraTestDesktop.getDesktop();
 }
コード例 #15
0
        private void LayoutRoot_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            CameraTestDesktop cd = CameraTestDesktop.getDesktop();

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

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