Inheritance: System.Windows.Forms.Form
示例#1
0
 private void buttonPlot_Click(object sender, EventArgs e)
 {
     if (this.mlog.Events.Count > 0)
     {
         this.mlog.Desc = textBoxDesc.Text;
         MousePlot mousePlot = new MousePlot(this.mlog);
         mousePlot.Show();
     }
 }
示例#2
0
        private void buttonSavePNG_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();

            saveFileDialog1.Filter      = "PNG Files (*.png)|*.png";
            saveFileDialog1.FilterIndex = 1;
            if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                MousePlot.Export(this.plot1.Model, saveFileDialog1.FileName, 800, 600);
            }
        }
示例#3
0
 private void buttonPlot_Click(object sender, EventArgs e)
 {
     // TODO check handles
     if (this.mlog.Events.Count > 0)
     {
         this.mlog.Desc1 = textBoxDesc1.Text;
         this.mlog.Desc2 = textBoxDesc2.Text;
         MousePlot mousePlot = new MousePlot(mlog);
         mousePlot.Show();
     }
 }
示例#4
0
        private void buttonSavePNG_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();

            saveFileDialog1.Filter      = "PNG Files (*.png)|*.png";
            saveFileDialog1.FilterIndex = 1;
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                int   width   = checkBoxSize.Checked ? 800 : (int)this.plot1.Model.Width;
                int   height  = checkBoxSize.Checked ? 600 : (int)this.plot1.Model.Height;
                Brush backgnd = checkBoxBgnd.Checked ? null : new SolidBrush(Color.White);

                MousePlot.Export(this.plot1.Model, saveFileDialog1.FileName, width, height, backgnd);
            }
        }
示例#5
0
        private void buttonPlot_Click(object sender, EventArgs e)
        {
            if (this.mlog1.Cpi == 0.0 || (this.mlog2.Cpi == 0.0 && dual_state == dualstate.ready))
            {
                MessageBox.Show("CPI value is invalid, please run Measure");
                return;
            }

            if (this.mlog1.Events.Count > 0 || this.mlog2.Events.Count > 0)
            {
                this.mlog1.Desc = textBoxDesc1.Text;
                this.mlog2.Desc = textBoxDesc2.Text;

                MousePlot mousePlot = new MousePlot(this.mlog1, dual_state == dualstate.ready ? this.mlog2 : null, settings);
                mousePlot.Show();
            }
        }
示例#6
0
        private void buttonLoad_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Filter      = "CSV Files (*.csv)|*.csv|All Files(*.*)|*.*";
            openFileDialog1.FilterIndex = 1;
            openFileDialog1.Multiselect = false;
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.mlog.Load(openFileDialog1.FileName);
            }
            this.textBoxDesc1.Text = mlog.Desc1;
            this.textBoxDesc2.Text = mlog.Desc2;
            this.textBoxNormR.Text = mlog.NormR.ToString("F4");
            this.textBoxNormT.Text = mlog.NormT.ToString("F4");
            this.textBox1.Text     = "Events: " + mlog.Events.Count.ToString();
            if (this.mlog.Events.Count > 0)
            {
                MousePlot mousePlot = new MousePlot(mlog);
                mousePlot.Show();
            }
        }
示例#7
0
        private void buttonLoad_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Filter      = "CSV Files (*.csv)|*.csv|All Files(*.*)|*.*";
            openFileDialog1.FilterIndex = 1;
            openFileDialog1.Multiselect = false;
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.mlog.Load(openFileDialog1.FileName);
            }
            this.textBox1.Text = "Events: " + this.mlog.Events.Count.ToString() + "\r\n" +
                                 "Sum X: " + this.mlog.deltaX().ToString() + " counts    " + Math.Abs(this.mlog.deltaX() / this.mlog.Cpi * 2.54).ToString("0.0") + " cm\r\n" +
                                 "Sum Y: " + this.mlog.deltaY().ToString() + " counts    " + Math.Abs(this.mlog.deltaY() / this.mlog.Cpi * 2.54).ToString("0.0") + " cm\r\n" +
                                 "Path: " + this.mlog.path().ToString("0") + " counts    " + (this.mlog.path() / this.mlog.Cpi * 2.54).ToString("0.0") + " cm";
            this.textBoxDesc.Text = this.mlog.Desc.ToString();
            this.textBoxCPI.Text  = this.mlog.Cpi.ToString();
            if (this.mlog.Events.Count > 0)
            {
                MousePlot mousePlot = new MousePlot(this.mlog);
                mousePlot.Show();
            }
        }
示例#8
0
 private void buttonPlot_Click(object sender, EventArgs e)
 {
     if (this.mlog.Events.Count > 0)
     {
         this.mlog.Desc = textBoxDesc.Text;
         MousePlot mousePlot = new MousePlot(this.mlog);
         mousePlot.Show();
     }
 }
示例#9
0
 private void buttonLoad_Click(object sender, EventArgs e)
 {
     OpenFileDialog openFileDialog1 = new OpenFileDialog();
     openFileDialog1.Filter = "CSV Files (*.csv)|*.csv|All Files(*.*)|*.*";
     openFileDialog1.FilterIndex = 1;
     openFileDialog1.Multiselect = false;
     if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         this.mlog.Load(openFileDialog1.FileName);
     }
     this.textBox1.Text = "Events: " + this.mlog.Events.Count.ToString() + "\r\n" +
                          "Sum X: " + this.mlog.deltaX().ToString() + " counts    " + Math.Abs(this.mlog.deltaX() / this.mlog.Cpi * 2.54).ToString("0.0") + " cm\r\n" +
                          "Sum Y: " + this.mlog.deltaY().ToString() + " counts    " + Math.Abs(this.mlog.deltaY() / this.mlog.Cpi * 2.54).ToString("0.0") + " cm\r\n" +
                          "Path: " + this.mlog.path().ToString("0") + " counts    " + (this.mlog.path() / this.mlog.Cpi * 2.54).ToString("0.0") + " cm";
     this.textBoxDesc.Text = this.mlog.Desc.ToString();
     this.textBoxCPI.Text = this.mlog.Cpi.ToString();
     if (this.mlog.Events.Count > 0)
     {
         MousePlot mousePlot = new MousePlot(this.mlog);
         mousePlot.Show();
     }
 }
示例#10
0
        private void buttonPlot_Click(object sender, EventArgs e)
        {
            if (this.mlog1.Cpi == 0.0 || this.mlog2.Cpi == 0.0)
            {
                MessageBox.Show("CPI value is invalid, please run Measure");
                return;
            }

            if (this.mlog1.Events.Count > 0 || this.mlog2.Events.Count > 0)
            {
                this.mlog1.Desc = textBoxDesc1.Text;
                this.mlog2.Desc = textBoxDesc2.Text;

                MousePlot mousePlot = new MousePlot(this.mlog1, dual_state == dualstate.ready ? this.mlog2 : null, settings);
                mousePlot.Show();
            }
        }
示例#11
0
 private void buttonPlot_Click(object sender, EventArgs e)
 {
     // TODO check handles
     if (this.mlog.Events.Count > 0)
     {
         this.mlog.Desc1 = textBoxDesc1.Text;
         this.mlog.Desc2 = textBoxDesc2.Text;
         MousePlot mousePlot = new MousePlot(mlog);
         mousePlot.Show();
     }
 }
示例#12
0
 private void buttonLoad_Click(object sender, EventArgs e)
 {
     OpenFileDialog openFileDialog1 = new OpenFileDialog();
     openFileDialog1.Filter = "CSV Files (*.csv)|*.csv|All Files(*.*)|*.*";
     openFileDialog1.FilterIndex = 1;
     openFileDialog1.Multiselect = false;
     if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         this.mlog.Load(openFileDialog1.FileName);
     }
     this.textBoxDesc1.Text = mlog.Desc1;
     this.textBoxDesc2.Text = mlog.Desc2;
     this.textBoxNormR.Text = mlog.NormR.ToString("F4");
     this.textBoxNormT.Text = mlog.NormT.ToString("F4");
     this.textBox1.Text = "Events: " + mlog.Events.Count.ToString();
     if (this.mlog.Events.Count > 0)
     {
         MousePlot mousePlot = new MousePlot(mlog);
         mousePlot.Show();
     }
 }