Ram Watch - Hook up AskSave to appropriate functions
This commit is contained in:
parent
ff7271c2e2
commit
52f968e379
|
@ -69,6 +69,11 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadWatchFromRecent(string file)
|
public void LoadWatchFromRecent(string file)
|
||||||
|
{
|
||||||
|
bool z = true;
|
||||||
|
if (changes) z = AskSave();
|
||||||
|
|
||||||
|
if (z)
|
||||||
{
|
{
|
||||||
bool r = LoadWatchFile(file, false);
|
bool r = LoadWatchFile(file, false);
|
||||||
if (!r)
|
if (!r)
|
||||||
|
@ -80,13 +85,14 @@ namespace BizHawk.MultiClient
|
||||||
DisplayWatchList();
|
DisplayWatchList();
|
||||||
changes = false;
|
changes = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void NewWatchList()
|
private void NewWatchList()
|
||||||
{
|
{
|
||||||
bool result = true;
|
bool result = true;
|
||||||
if (changes) result = AskSave();
|
if (changes) result = AskSave();
|
||||||
|
|
||||||
if (AskSave() == true)
|
if (result == true)
|
||||||
{
|
{
|
||||||
watchList.Clear();
|
watchList.Clear();
|
||||||
DisplayWatchList();
|
DisplayWatchList();
|
||||||
|
@ -293,7 +299,6 @@ namespace BizHawk.MultiClient
|
||||||
private void newListToolStripMenuItem_Click(object sender, EventArgs e)
|
private void newListToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
NewWatchList();
|
NewWatchList();
|
||||||
//TODO: prompt to save changes if necessary;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private FileInfo GetFileFromUser()
|
private FileInfo GetFileFromUser()
|
||||||
|
@ -317,9 +322,16 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
var file = GetFileFromUser();
|
var file = GetFileFromUser();
|
||||||
if (file != null)
|
if (file != null)
|
||||||
|
{
|
||||||
|
bool r = true;
|
||||||
|
if (changes) r = AskSave();
|
||||||
|
if (r)
|
||||||
|
{
|
||||||
LoadWatchFile(file.FullName, false);
|
LoadWatchFile(file.FullName, false);
|
||||||
DisplayWatchList();
|
DisplayWatchList();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue