private void m_btnSave_Click(object sender, EventArgs e) { SaveFileDialog DialogSave = new SaveFileDialog(); DialogSave.InitialDirectory = TeachingInfoFactory.GetTeachInfoObject("Laser Path").IniDirPath; DialogSave.Filter = "Ini file (*.ini)|"; DialogSave.DefaultExt = "ini"; if (DialogSave.ShowDialog() == DialogResult.OK) { if (DialogSave.FileName != "") { IniFile iniFile = new IniFile(DialogSave.FileName); iniFile.WriteValue("Laser Para", "LaserPower", m_txbLaserPower.Text); iniFile.WriteValue("Laser Para", "Acc", m_txbAcc.Text); iniFile.WriteValue("Laser Para", "Speed", m_txbSpeed.Text); iniFile.WriteValue("Laser Para", "Dec", m_txbDec.Text); for (int iIdx = 0; iIdx < m_listPath.Count; ++iIdx) { iniFile.WriteValue("Laser Point", String.Format("X-{0}", iIdx), m_listPath[iIdx].X); iniFile.WriteValue("Laser Point", String.Format("Y-{0}", iIdx), m_listPath[iIdx].Y); } } } DialogSave.Dispose(); DialogSave = null; // Reload Ini File List LoadIniFilesList(); }
private void m_btnGSave_Click(object sender, EventArgs e) { SaveFileDialog DialogSave = new SaveFileDialog(); DialogSave.Filter = "Ini file (*.ini)|"; DialogSave.DefaultExt = "ini"; DialogSave.InitialDirectory = TeachingInfoFactory.GetTeachInfoObject("Panel Para").IniDirPath; if (DialogSave.ShowDialog() == DialogResult.OK) { if (DialogSave.FileName != "") { IniFile iniFile = new IniFile(DialogSave.FileName); iniFile.WriteValue("G1", "Y", m_tbxG1Y.Text); iniFile.WriteValue("G1", "Subpixel Start", m_tbxG1SubPixelStart.Text); iniFile.WriteValue("G1", "Subpixel End", m_tbxG1SubPixelEnd.Text); iniFile.WriteValue("G2", "Y", m_tbxG2Y.Text); iniFile.WriteValue("G2", "Subpixel Start", m_tbxG2SubPixelStart.Text); iniFile.WriteValue("G2", "Subpixel End", m_tbxG2SubPixelEnd.Text); iniFile.WriteValue("G6", "Y", m_tbxG1Y.Text); iniFile.WriteValue("G6", "Subpixel Start", m_tbxG6SubPixelStart.Text); iniFile.WriteValue("G6", "Subpixel End", m_tbxG6SubPixelEnd.Text); iniFile.WriteValue("G3", "X", m_tbxG3X.Text); iniFile.WriteValue("G3", "X", m_tbxG3Y.Text); iniFile.WriteValue("G4", "X", m_tbxG4X.Text); iniFile.WriteValue("G4", "X", m_tbxG4Y.Text); iniFile.WriteValue("G5", "X", m_tbxG5X.Text); iniFile.WriteValue("G5", "X", m_tbxG5Y.Text); iniFile.WriteValue("G7", "X", m_tbxG7X.Text); iniFile.WriteValue("G7", "X", m_tbxG7Y.Text); iniFile.WriteValue("Panel", "Width", m_tbxPanelWidth.Text); iniFile.WriteValue("Panel", "Height", m_tbxPanelHeight.Text); } } DialogSave.Dispose(); DialogSave = null; }
private void m_btnSave_Click(object sender, EventArgs e) { SaveFileDialog DialogSave = new SaveFileDialog(); DialogSave.InitialDirectory = TeachingInfoFactory.GetTeachInfoObject("VCR Teach").IniDirPath; DialogSave.Filter = "Ini file (*.ini)|"; DialogSave.DefaultExt = "ini"; if (DialogSave.ShowDialog() == DialogResult.OK) { if (DialogSave.FileName != "") { IniFile iniFile = new IniFile(DialogSave.FileName); iniFile.WriteValue("VCR", "G Axis", m_tbxGAxisPos.Text); iniFile.WriteValue("VCR", "S Axis", m_tbxSAxisPos.Text); iniFile.WriteValue("VCR", "Z Axis", m_tbxZAxisPos.Text); } } DialogSave.Dispose(); DialogSave = null; }
private void m_btnAxisSave_Click(object sender, EventArgs e) { SaveFileDialog DialogSave = new SaveFileDialog(); DialogSave.InitialDirectory = TeachingInfoFactory.GetTeachInfoObject("Clamp Teach").IniDirPath; DialogSave.Filter = "Ini file (*.ini)|"; DialogSave.DefaultExt = "ini"; if (DialogSave.ShowDialog() == DialogResult.OK) { if (DialogSave.FileName != "") { IniFile iniFile = new IniFile(DialogSave.FileName); iniFile.WriteValue("Alignment C1C2", "Position", CC_C1C2_Axis.GetC1C2AxisPosition()); iniFile.WriteValue("Alignment SA1SA2", "Position", CC_SA1SA2_Axis.GetSA1SA2AxisPosition()); iniFile.WriteValue("Bar1", "Position", CC_Bar_Axis.GetBar1AxisPosition()); iniFile.WriteValue("Bar2", "Position", CC_Bar_Axis.GetBar2AxisPosition()); } } DialogSave.Dispose(); DialogSave = null; }