SaveToFile

<< Click to Display Table of Contents >>

Navigation:  MyCAD > Methods >

SaveToFile

public Boolean SaveToFile(String fileName)

 

Description:

 Save drawing to a file.

 

Parameter:

 fileName: The file name

 

Return value:

 true: Save successfully

 false: Save unsuccessfully

 

Example:

 private void menuSaveAs_Click(object sender, System.EventArgs e)

 {

         saveFileDialog1.InitialDirectory = Application.StartupPath;

         saveFileDialog1.Filter = "TCAD drawing file(*.tcad)|*.tcad";

         saveFileDialog1.FilterIndex = 1;

         saveFileDialog1.DefaultExt = "tcad";

         if (saveFileDialog1.ShowDialog() == DialogResult.OK)

         {

                 if (myCAD1.SaveToFile(saveFileDialog1.FileName) == true)

                         MessageBox.Show("MyCAD1 has been saved to " + saveFileDialog1.FileName);

         }

 }

 

See also:

 LoadFromFile