Esempio n. 1
0
        void ShowLatitude()
        {
            ResultValueList.Clear();
            DrawCanvas.Children.Clear();

            List <double> dl = (TestChart as ITEGrayscaleChart).getHLineAveL(TestAreaHeight, TestAreaWidth);

            foreach (double d in dl)
            {
                ResultValueList.Add(d);
            }
            dg.DrawBrightHistogram(dl);
        }
        void ShowLatitude()
        {
            comboBoxLGrade.Items.Clear();
            canvasLatitude.Children.Clear();

            List <double> dl = (testHelper.CurrentChart as ITEGrayscaleChart).getHLineAveL(lynxUpDownH.IntValue, lynxUpDownW.IntValue);

            foreach (double d in dl)
            {
                ComboBoxItem ci = new ComboBoxItem();
                ci.Content = d.ToString();
                comboBoxLGrade.Items.Add(ci);
            }
            dg.DrawBrightHistogram(dl);
        }
Esempio n. 3
0
        void DrawLatitude()
        {
            List <double> dl = (testHelper.CurrentChart as KDGrayChart).getHLine(ChartPhoto.getPhoto().PixelHeight / 2);
            DrawGraphic   dg = new DrawGraphic(canvasLatitude);

            dg.DrawBrightHistogram(dl);
        }
Esempio n. 4
0
        void DrawLatitude(WriteableBitmap photo)
        {
            DrawCanvas.Children.Clear();
            List <double> dl = (TestChart as KDGrayChart).getHLine(photo.PixelHeight / 2);
            DrawGraphic   dg = new DrawGraphic(DrawCanvas);

            dg.DrawBrightHistogram(dl);
        }
Esempio n. 5
0
        void c_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            Canvas c = sender as Canvas;

            try
            {
                canvasLatitude.Children.Clear();
                double h = e.GetCurrentPoint(ChartPhoto.getDrawObjectCanvas()).Position.Y / ChartPhoto.getImage().Height *ChartPhoto.getPhoto().PixelHeight;
                textBlockHeight.Text        = Convert.ToInt32(h).ToString();
                textBlockInteractively.Text = (testHelper.CurrentChart as KDGrayChart).getLatitude(Convert.ToInt32(h), lynxUpDown1.IntValue).ToString();

                List <double> dl = (testHelper.CurrentChart as KDGrayChart).getHLine(Convert.ToInt32(h));
                DrawGraphic   dg = new DrawGraphic(canvasLatitude);
                dg.DrawBrightHistogram(dl);
                buttonInteractiveTest.Foreground = new SolidColorBrush(Colors.Blue);
                if (c.Children.Contains(tl))
                {
                    c.Children.Remove(tl);
                }
            }
            catch (Exception xe)
            {
                if (xe is LFCException)//已经是系统约定的错误类型,直接往上抛
                {
                    SilverlightLFC.common.Environment.ShowMessage(xe.Message);
                }
                else
                {
                    SilverlightLFC.common.Environment.ShowMessage("测试错误,请检查照片");
                }
            }
            finally
            {
                c.PointerPressed -= (c_PointerPressed);
                c.PointerMoved   -= (c_PointerMoved);
            }
        }
Esempio n. 6
0
 void RefreshShow()
 {
     al.Clear();
     stackImages.Children.Clear();
     for (int i = 1; i <= bl.Count; i++)
     {
         WriteableBitmap bi = bl[i - 1];
         Image           li = new Image();
         li.Source = bi;
         //li.Tag = i;
         li.Width  = stackImages.Width / bl.Count;
         li.Height = stackImages.Height;
         double w = li.Height * bi.PixelWidth / bi.PixelHeight;
         if (li.Width > w)
         {
             li.Width = w;
         }
         stackImages.Children.Add(li);
         li.PointerPressed += (li_MouseLeftButtonDown);
         double ab = ptp.getAverageBright(bi);
         al.Add(ab);
         dg.DrawBrightHistogram(al);
     }
 }