1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- using OTSModelSharp.ServiceCenter;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
- {
- public partial class frmInitializeTwoPointRectangle : Form
- {
- ISemController cfun;
- public PointF LTPoint;
- public PointF RBPoint;
- public bool IsOK = false;
- OTSCommon.Language lan;
- Hashtable table;
- public frmInitializeTwoPointRectangle()
- {
- InitializeComponent();
- lan = new OTSCommon.Language(this);
- table = lan.GetNameTable(this.Name);
- }
- private void bn_FirstPoint_Click(object sender, EventArgs e)
- {
- double Px = 0;
- double Py = 0;
- double Pr = 0;
- if (cfun.GetSemPositionXY(ref Px, ref Py, ref Pr))
- {
- tB_LTPointX.Text = Px.ToString();
- tB_LTPointY.Text = Py.ToString();
- LTPoint = new PointF((float)Px, (float)Py);
- }
- }
- private void bn_SecondPoint_Click(object sender, EventArgs e)
- {
- double Px = 0;
- double Py = 0;
- double Pr = 0;
- if (cfun.GetSemPositionXY(ref Px, ref Py, ref Pr))
- {
- tB_RBPointX.Text = Px.ToString();
- tB_RBPointY.Text = Py.ToString();
- RBPoint = new PointF((float)Px, (float)Py);
- }
- }
- private void frmInitializeTwoPointRectangle_Load(object sender, EventArgs e)
- {
- if (cfun == null)
- {
- cfun = SemController.GetSEMController();
- }
- }
- private void bn_OK_Click(object sender, EventArgs e)
- {
- IsOK = true;
- this.Close();
- }
- private void bn_Cancel_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- LTPoint = new PointF(Convert.ToSingle(tB_LTPointX.Text), Convert.ToSingle(tB_LTPointY.Text));
-
- }
- private void button2_Click(object sender, EventArgs e)
- {
- RBPoint = new PointF(Convert.ToSingle(tB_RBPointX.Text), Convert.ToSingle(tB_RBPointY.Text));
- }
-
- }
- }
|