Exemplo n.º 1
0
        private void NumberIRChanged(object sender, SelectionChangedEventArgs e)
        {
            labelSelectIR.Visibility = Visibility.Collapsed;
            labelDrag.Visibility = Visibility.Visible;

            ClearDragCanvas();

            numberOfIR = (int) comboBoxNumberIR.SelectedValue;

            if(numberOfIR >= 1)
            {
                IlluminationEllipseUC ir = new IlluminationEllipseUC(irUCSize,irUCSize);
                dragCanvas.Children.Add(ir);
                Canvas.SetTop(ir, irBelowLeft.Y);
                Canvas.SetLeft(ir, irBelowLeft.X);
            }

            if(numberOfIR >= 2)
            {
                IlluminationEllipseUC ir = new IlluminationEllipseUC(irUCSize,irUCSize);
                dragCanvas.Children.Add(ir);
                Canvas.SetTop(ir, irBelowRight.Y);
                Canvas.SetLeft(ir, irBelowRight.X);
            }
        }
        private void NumberIRChanged(object sender, SelectionChangedEventArgs e)
        {
            labelSelectIR.Visibility = Visibility.Collapsed;
            labelDrag.Visibility     = Visibility.Visible;

            ClearDragCanvas();

            numberOfIR = (int)comboBoxNumberIR.SelectedValue;

            if (numberOfIR >= 1)
            {
                IlluminationEllipseUC ir = new IlluminationEllipseUC(irUCSize, irUCSize);
                dragCanvas.Children.Add(ir);
                Canvas.SetTop(ir, irBelowLeft.Y);
                Canvas.SetLeft(ir, irBelowLeft.X);
            }

            if (numberOfIR >= 2)
            {
                IlluminationEllipseUC ir = new IlluminationEllipseUC(irUCSize, irUCSize);
                dragCanvas.Children.Add(ir);
                Canvas.SetTop(ir, irBelowRight.Y);
                Canvas.SetLeft(ir, irBelowRight.X);
            }
        }