/[xmltv_parser]/trunk/xmltv_parser/main.cs
ViewVC logotype

Diff of /trunk/xmltv_parser/main.cs

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

--- trunk/xmltv_parser/main.cs	2013/03/07 13:52:56	32
+++ trunk/xmltv_parser/main.cs	2013/03/07 13:57:11	33
@@ -86,10 +86,11 @@
                         BinaryFormatter bin = new BinaryFormatter();
                         Programs = (List<IXMLTVProgram>)bin.Deserialize(stream);
                     }
-                    catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); }
+                    catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); MessageBox.Show(ex.Message, "Failed to load data", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }
                 }
             }
-            catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); }
+            catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); MessageBox.Show(ex.Message, "Failed to load data", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }
+            MessageBox.Show("Successfully loaded data", "Successfully loaded data", MessageBoxButtons.OK, MessageBoxIcon.Information); 
             CreateControls();
         }
 
@@ -106,10 +107,11 @@
                         BinaryFormatter bin = new BinaryFormatter();
                         bin.Serialize(stream, Programs);
                     }
-                    catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); }
+                    catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); MessageBox.Show(ex.Message, "Failed to save data", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }
                 }
             }
-            catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); }
+            catch (Exception ex) { gLog.Log.Error.WriteLine(ex.ToString()); MessageBox.Show(ex.Message, "Failed to save data", MessageBoxButtons.OK, MessageBoxIcon.Error); return; }
+            MessageBox.Show("Successfully saved data", "Successfully saved data", MessageBoxButtons.OK, MessageBoxIcon.Information); 
         }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22