/[Sims3RigEditor]/trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h
ViewVC logotype

Diff of /trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h	2010/08/08 07:43:37	49
+++ trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h	2010/08/08 08:23:57	50
@@ -682,18 +682,34 @@
 private: System::Void mnuItemSave_Click(System::Object^  sender, System::EventArgs^  e) 
 		 {
 			 // convert Data to Native
-			 ConvertToNative();
-			 const char* filename = _grn_file->_GrannyFilename;
-			 GrannyFileWriter::WriteFile(filename,_grn_file->GrannyFileInfo,_grn_file->_logger);
+			 try 
+			 {				
+				 ConvertToNative();
+				 const char* filename = _grn_file->_GrannyFilename;
+				 GrannyFileWriter::WriteFile(filename,_grn_file->GrannyFileInfo,_grn_file->_logger);				 
+				 System::Windows::Forms::MessageBox::Show("Successfully Saved: \n" + gcnew String(_grn_file->GrannyFilename()),"File Writer:", MessageBoxButtons::OK,MessageBoxIcon::Information);
+			 }
+			 catch(Exception^ ex)
+			 {
+				 System::Windows::Forms::MessageBox::Show("Failed to Save: \n" + gcnew String(_grn_file->GrannyFilename()),"File Writer:", MessageBoxButtons::OK,MessageBoxIcon::Error);
+			 }
 		 }
 private: System::Void mnuItemSaveAs_Click(System::Object^  sender, System::EventArgs^  e)
 		 {
 			 // convert Data to Native
-			 ConvertToNative();
-			 System::Windows::Forms::DialogResult result = RigSaver->ShowDialog();
-			 if (result != System::Windows::Forms::DialogResult::OK) return;
-			 const char* filename = (char*)Marshal::StringToHGlobalAnsi(RigSaver->FileName).ToPointer();
-			 GrannyFileWriter::WriteFile(filename,_grn_file->GrannyFileInfo,_grn_file->_logger);			  
+			 try
+			 {
+				 ConvertToNative();
+				 System::Windows::Forms::DialogResult result = RigSaver->ShowDialog();
+				 if (result != System::Windows::Forms::DialogResult::OK) return;
+				 const char* filename = (char*)Marshal::StringToHGlobalAnsi(RigSaver->FileName).ToPointer();
+				 GrannyFileWriter::WriteFile(filename,_grn_file->GrannyFileInfo,_grn_file->_logger);	
+				 System::Windows::Forms::MessageBox::Show("Successfully Saved: \n" +  gcnew String(_grn_file->GrannyFilename()),"File Writer:", MessageBoxButtons::OK,MessageBoxIcon::Information);
+			 }
+			 catch(Exception^ ex)
+			 {
+				 System::Windows::Forms::MessageBox::Show("Failed to Save: \n" +  gcnew String(_grn_file->GrannyFilename()),"File Writer:", MessageBoxButtons::OK,MessageBoxIcon::Error);
+			 }
 		 }
 private: System::Void mnuItemClose_Click(System::Object^  sender, System::EventArgs^  e) 
 		 {
@@ -703,4 +719,4 @@
 //		}
 //	}
 //}
-#endif /* GR2LIB_RIGEDITOR_FRM_H */
\ No newline at end of file
+#endif /* GR2LIB_RIGEDITOR_FRM_H */

 

  ViewVC Help
Powered by ViewVC 1.1.22