/// <summary>
/// Exports player XML sheet
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void fromPlayerExportSheetMenuItem_Click(object sender, EventArgs e)
{
// Create export directory if it doesnt exist yet
string sPath = Path.Combine(Paths.DocumentsFolder, "Player Backups");
if (!Directory.Exists(sPath))
{
Directory.CreateDirectory(sPath);
}
// Show dialog
OpenFileDialog Dialog = new OpenFileDialog();
Dialog.InitialDirectory = sPath;
Dialog.Title = "Select Player Import File";
if (Dialog.ShowDialog() == DialogResult.OK)
{
try
{
StatsManager.ImportPlayerXml(Dialog.FileName);
Notify.Show("Player Imported Successfully", "Operation Successful", AlertType.Success);
BuildList();
}
catch (Exception E)
{
using (ExceptionForm EForm = new ExceptionForm(E, false))
{
EForm.Message = "Unable to import player because an exception was thrown!";
EForm.ShowDialog();
}
}
}
}