private bool SaveB()
{
var chars = new List<CharacterRegion>();
for (int i = 0; i < listStore.RowCount; i++)
{
int start = GetListValue(listStore.GetValue(i, startCol));
int end = GetListValue(listStore.GetValue(i, endCol));
chars.Add(new CharacterRegion(start, end));
}
if (!CharRegionsUtil.CheckConflict(chars))
{
int tmptab = notebook1.CurrentTabIndex;
skip = true;
notebook1.CurrentTabIndex = 1;
var c = MessageDialog.AskQuestion("Character Region Conflict Detected", "How would you like to resolve it?", new[]
{
new Command(Command.Yes.Id, "Auto-Resolve"),
new Command(Command.Cancel.Id, "Manually Resolve"),
new Command(Command.No.Id, "Don't Resolve")
});
skip = false;
if (c.ToString() == Command.Yes.ToString())
chars = CharRegionsUtil.ResolveConflicts(chars);
else if (c.ToString() == Command.No.ToString())
{
skip = true;
notebook1.CurrentTabIndex = tmptab;
Reload();
}
else
return false;
}
_core.CharacterRegions = chars;
return true;
}