Author: aolk
Date: 2005-04-04 09:13:57 -0400 (Mon, 04 Apr 2005)
New Revision: 42518

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SaveFileDialog.cs
Log:
2005-04-04  Alexander Olk  <[EMAIL PROTECTED]>

        * SaveFileDialog.cs: Open stream in OpenFile with FileMode Create



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-04-04 13:12:52 UTC (rev 42517)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-04-04 13:13:57 UTC (rev 42518)
@@ -1,3 +1,7 @@
+2005-04-04  Alexander Olk  <[EMAIL PROTECTED]>
+
+       * SaveFileDialog.cs: Open stream in OpenFile with FileMode Create
+
 2005-04-01  Jackson Harper  <[EMAIL PROTECTED]>
 
        * Binding.cs: Implement IsBinding.

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SaveFileDialog.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SaveFileDialog.cs    
    2005-04-04 13:12:52 UTC (rev 42517)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SaveFileDialog.cs    
    2005-04-04 13:13:57 UTC (rev 42518)
@@ -85,7 +85,18 @@
                        if ( FileName == null )
                                throw new ArgumentNullException( "OpenFile", 
"FileName is null" );
                        
-                       return new FileStream( FileName, FileMode.Open, 
FileAccess.ReadWrite );
+                       Stream retValue;
+                       
+                       try
+                       {
+                               retValue = new FileStream( FileName, 
FileMode.Create, FileAccess.ReadWrite );
+                       }
+                       catch (Exception ex)
+                       {
+                               retValue = null;
+                       }
+                       
+                       return retValue;
                }
                #endregion      // Public Instance Methods
                

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to