예제 #1
0
        private bool outputDxf(string filename)
        {
            if (OpenedProject == null)
            {
                return(false);
            }
            string path = filename;

            if (!IsValidFilePath(path))
            {
                SaveFileDialog dialog = MakeSaveFileDialog(FileType.DxfCad);
                if (dialog.ShowDialog(MainForm) == DialogResult.OK)
                {
                    path = dialog.FileName;
                }
                if (!IsValidFilePath(path))
                {
                    return(false);
                }
            }
            try
            {
                DxfWriter dw = new DxfWriter(path);
                dw.WriteProject(OpenedProject);
            }
            catch
            {
                return(false);
            }
            return(true);
        }
예제 #2
0
		private bool outputDxf(string filename)
			{
			if( OpenedProject == null ) return false;
			string path = filename;
			if( !IsValidFilePath( path ) )
				{
				SaveFileDialog dialog = MakeSaveFileDialog( FileType.DxfCad );
				if( dialog.ShowDialog( MainForm ) == DialogResult.OK )
					path = dialog.FileName;
				if( !IsValidFilePath( path ) ) return false;
				}
			try
				{
				DxfWriter dw = new DxfWriter( path );
				dw.WriteProject( OpenedProject );
				}
			catch
				{
				return false;
				}
			return true;
			}