25 |
using System.Runtime.Serialization.Formatters.Binary; |
using System.Runtime.Serialization.Formatters.Binary; |
26 |
using RomCheater.PluginFramework.Core; |
using RomCheater.PluginFramework.Core; |
27 |
using RomCheater.Core; |
using RomCheater.Core; |
28 |
|
using Enterprise.Logging; |
29 |
|
|
30 |
namespace RomCheater.RVACalculator |
namespace RomCheater.RVACalculator |
31 |
{ |
{ |
157 |
} |
} |
158 |
catch (Exception ex) |
catch (Exception ex) |
159 |
{ |
{ |
160 |
logger.Error.WriteLine("Failed to save file: {0}", CheatSaver.FileName); |
gLog.Error.WriteLine("Failed to save file: {0}", CheatSaver.FileName); |
161 |
logger.VerboseError.WriteLine(ex.ToString()); |
gLog.Verbose.Error.WriteLine(ex.ToString()); |
162 |
MessageBox.Show(string.Format("Failed to save: '{0}'", new FileInfo(CheatSaver.FileName).Name), "", MessageBoxButtons.OK, MessageBoxIcon.Error); |
MessageBox.Show(string.Format("Failed to save: '{0}'", new FileInfo(CheatSaver.FileName).Name), "", MessageBoxButtons.OK, MessageBoxIcon.Error); |
163 |
return; |
return; |
164 |
} |
} |
167 |
} |
} |
168 |
catch (Exception ex) |
catch (Exception ex) |
169 |
{ |
{ |
170 |
logger.Error.WriteLine("Failed to save file: {0}", CheatSaver.FileName); |
gLog.Error.WriteLine("Failed to save file: {0}", CheatSaver.FileName); |
171 |
logger.VerboseError.WriteLine(ex.ToString()); |
gLog.Verbose.Error.WriteLine(ex.ToString()); |
172 |
MessageBox.Show(string.Format("Failed to save: '{0}'", new FileInfo(CheatSaver.FileName).Name), "", MessageBoxButtons.OK, MessageBoxIcon.Error); |
MessageBox.Show(string.Format("Failed to save: '{0}'", new FileInfo(CheatSaver.FileName).Name), "", MessageBoxButtons.OK, MessageBoxIcon.Error); |
173 |
} |
} |
174 |
} |
} |
205 |
if (result == System.Windows.Forms.DialogResult.Cancel) |
if (result == System.Windows.Forms.DialogResult.Cancel) |
206 |
{ |
{ |
207 |
// assume abort of load |
// assume abort of load |
208 |
logger.Warn.WriteLine("Abored processing of file (by user request): {0}", CheatLoader.FileName); |
gLog.Warn.WriteLine("Abored processing of file (by user request): {0}", CheatLoader.FileName); |
209 |
fs.Close(); |
fs.Close(); |
210 |
return; |
return; |
211 |
} |
} |
226 |
} |
} |
227 |
catch (Exception ex) |
catch (Exception ex) |
228 |
{ |
{ |
229 |
logger.Error.WriteLine("Failed to load file: {0}", CheatLoader.FileName); |
gLog.Error.WriteLine("Failed to load file: {0}", CheatLoader.FileName); |
230 |
logger.VerboseError.WriteLine(ex.ToString()); |
gLog.Verbose.Error.WriteLine(ex.ToString()); |
231 |
MessageBox.Show(string.Format("Failed to open: '{0}'", new FileInfo(CheatLoader.FileName).Name), "", MessageBoxButtons.OK, MessageBoxIcon.Error); |
MessageBox.Show(string.Format("Failed to open: '{0}'", new FileInfo(CheatLoader.FileName).Name), "", MessageBoxButtons.OK, MessageBoxIcon.Error); |
232 |
return; |
return; |
233 |
} |
} |
236 |
} |
} |
237 |
catch (Exception ex) |
catch (Exception ex) |
238 |
{ |
{ |
239 |
logger.Error.WriteLine("Failed to load file: {0}", CheatLoader.FileName); |
gLog.Error.WriteLine("Failed to load file: {0}", CheatLoader.FileName); |
240 |
logger.VerboseError.WriteLine(ex.ToString()); |
gLog.Verbose.Error.WriteLine(ex.ToString()); |
241 |
MessageBox.Show(string.Format("Failed to open: '{0}'", new FileInfo(CheatLoader.FileName).Name), "", MessageBoxButtons.OK, MessageBoxIcon.Error); |
MessageBox.Show(string.Format("Failed to open: '{0}'", new FileInfo(CheatLoader.FileName).Name), "", MessageBoxButtons.OK, MessageBoxIcon.Error); |
242 |
} |
} |
243 |
ResizeColumns(); |
ResizeColumns(); |