示例#1
0
        public STEMAreaDialog(STEMArea Area, SimArea simArea)
        {
            InitializeComponent();

            xStartBox.Text  = Area.xStart.ToString("f2");
            xFinishBox.Text = Area.xFinish.ToString("f2");
            yStartBox.Text  = Area.yStart.ToString("f2");
            yFinishBox.Text = Area.yFinish.ToString("f2");

            xPxBox.Text = Area.xPixels.ToString();
            yPxBox.Text = Area.yPixels.ToString();

            xstart  = Area.xStart;
            ystart  = Area.yStart;
            xfinish = Area.xFinish;
            yfinish = Area.yFinish;

            xpx = Area.xPixels;
            ypx = Area.yPixels;

            simxStart  = simArea.xStart;
            simxFinish = simArea.xFinish;
            simyStart  = simArea.yStart;
            simyFinish = simArea.yFinish;

            xPxBox.TextChanged     += new TextChangedEventHandler(PixelValidCheck);
            yPxBox.TextChanged     += new TextChangedEventHandler(PixelValidCheck);
            xStartBox.TextChanged  += new TextChangedEventHandler(RangeValidCheck);
            yStartBox.TextChanged  += new TextChangedEventHandler(RangeValidCheck);
            xFinishBox.TextChanged += new TextChangedEventHandler(RangeValidCheck);
            yFinishBox.TextChanged += new TextChangedEventHandler(RangeValidCheck);
        }
示例#2
0
        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            if (!goodxrange || !goodyrange)
            {
                return;
            }

            SimArea temp = new SimArea {
                xStart = xstart, xFinish = xfinish, yStart = ystart, yFinish = yfinish
            };

            SetAreaEvent(this, new AreaArgs(temp));

            this.Close();
        }
示例#3
0
        public AreaDialog(SimArea Area)
        {
            InitializeComponent();

            xStartBox.Text  = Area.xStart.ToString("f2");
            xFinishBox.Text = Area.xFinish.ToString("f2");
            yStartBox.Text  = Area.yStart.ToString("f2");
            yFinishBox.Text = Area.yFinish.ToString("f2");

            xstart  = Area.xStart;
            ystart  = Area.yStart;
            xfinish = Area.xFinish;
            yfinish = Area.yFinish;

            xStartBox.TextChanged  += new TextChangedEventHandler(RangeValidCheck);
            yStartBox.TextChanged  += new TextChangedEventHandler(RangeValidCheck);
            xFinishBox.TextChanged += new TextChangedEventHandler(RangeValidCheck);
            yFinishBox.TextChanged += new TextChangedEventHandler(RangeValidCheck);
        }
示例#4
0
 public AreaArgs(SimArea s)
 {
     msg = s;
 }