private void button1_Click(object sender, EventArgs e) { // pSC1 = new powerSupplyController(psAddress.SelectedIndex); pSC1 = new powerSupplyController(); if (pSC1.getError().Length != 0) { MessageBox.Show(pSC1.getError(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } string s = pSC1.getConnInfo() + "\n" + pSC1.checkConnection(); if (pSC1.systemstatus) { statusLabel.ForeColor = Color.Green; statusLabel.Text = "Power supply was succesfully initiated.\n" + s; SaveFileDialog filesave = new SaveFileDialog(); filesave.Title = "Save Data File"; filesave.ShowDialog(); if (filesave.FileName != "") { fs = (System.IO.FileStream)filesave.OpenFile(); fileopened = true; fs_writer = new System.IO.StreamWriter(fs); } else { fileopened = false; } } else { statusLabel.ForeColor = Color.Red; statusLabel.Text = "Power supply couldn't be initiated."; } //MessageBox.Show(pSC1.getError(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); //MessageBox.Show(pSC1.getConnInfo() + "\n" + pSC1.checkConnection(), "Connection Info", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public IAgilent66xxOutput getIMPEOutput(powerSupplyController pSC) { return(pSC.driver.Output); }