private void startRecordBt_Click(object sender, EventArgs e)
        {
            if (operatorSelectionCb.SelectedIndex == -1)
            {
                MessageBox.Show("Lütfen Operatör İsmini Giriniz!");
                return;
            }

            if (factorySelectionCb.SelectedIndex == -1)
            {
                MessageBox.Show("Lütfen Tesis Seçiniz!");
                return;
            }
            if (shaftSelectionCb.SelectedIndex == -1)
            {
                MessageBox.Show("Lütfen Ölçüm Noktasını Seçiniz !");
                return;
            }
            if (label8.Text.Length < 2)
            {
                MessageBox.Show("Lütfen Tarihi Yenile butonuna basarak güncelleyiniz!");
                return;
            }
            if (filePathTextBox.Text.Length < 2)
            {
                MessageBox.Show("Lütfen kaydedilecek dosyanın adresini seçiniz!");
                return;
            }

            ExcelManager.Instance.StartNewFileThread((short)comboBox1.SelectedIndex,
                                                     operatorSelectionCb.SelectedItem.ToString(),
                                                     factorySelectionCb.SelectedItem.ToString(),
                                                     shaftSelectionCb.SelectedItem.ToString(),
                                                     dateTime.ToString(),
                                                     fileNameTextBox.Text,
                                                     filePathTextBox.Text);

            //Burada SensorReadingForm acilacak , parametre olarak sensor türü verilecek
            string deviceName = comboBox1.SelectedItem.ToString();

            if (deviceName.Equals("PG250"))
            {
                pg250Page = new PG250Page();
                pg250Page.Show();
                //sensorContent.Controls.Add(pg250Page);
            }
            else if (deviceName.Equals("PG350"))
            {
                pg300Page = new PG300Page();
                pg300Page.Show();
            }
            this.Close();
        }
Пример #2
0
 private void oldRecordBt_Click(object sender, EventArgs e)
 {
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         int result = ExcelManager.Instance.ValidateWorkFile(openFileDialog1.FileName);
         if (result == 10)
         {
             pg250Page = new PG250Page();
             pg250Page.Show();
             //sensorContent.Controls.Add(pg250Page);
         }
         else if (result == 11)
         {
             pg300Page = new PG300Page();
             pg300Page.Show();
         }
     }
 }
        public SensorReadingForm(string deviceName)
        {
            InitializeComponent();
            if (deviceName.Equals("PG250"))
            {
                pg250Page = new PG250Page();
                pg250Page.Show();
                //sensorContent.Controls.Add(pg250Page);
            }
            else if (deviceName.Equals("PG350"))
            {
                pg300Page = new PG300Page();
                pg300Page.Show();
            }

            /*pg250Page = new PG250Pageee();
             * sensorContent.Controls.Add(pg250Page);*/
        }