Ram Watch - Hook AskSave to exit menu item, and some misc cleanups

This commit is contained in:
andres.delikat 2011-01-21 15:37:14 +00:00
parent 46d5c40499
commit a82037c605
3 changed files with 5 additions and 11 deletions

View File

@ -26,7 +26,6 @@ namespace BizHawk.MultiClient
{
Global.MainForm = this;
Global.Config = ConfigService.Load<Config>("config.ini");
InitializeComponent();
if (Global.Direct3D != null)
@ -351,7 +350,7 @@ namespace BizHawk.MultiClient
}
Global.Sound.UpdateSound(Global.Emulator.SoundProvider);
Global.RenderPanel.Render(Global.Emulator.VideoProvider);
RamWatch1.UpdateValues();
//RamWatch1.UpdateValues(); //TODO: Create framecounter object, run this in the SetFrameCount() method of this object
}
private bool wasMaximized = false;
@ -417,7 +416,8 @@ namespace BizHawk.MultiClient
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Close();
if (RamWatch1.AskSave())
Close();
}
private void openROMToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -354,7 +354,6 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Ram Watch";
this.Load += new System.EventHandler(this.RamWatch_Load);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.RamWatch_Paint);
this.Resize += new System.EventHandler(this.RamWatch_Resize);
this.LocationChanged += new System.EventHandler(this.RamWatch_LocationChanged);
this.menuStrip1.ResumeLayout(false);

View File

@ -19,8 +19,8 @@ namespace BizHawk.MultiClient
//Currently address is 4 digit hex, but at some point it needs to be smart enough to adjust size based on the emulator core used
//Make Edit/Add/Duplicate Watch windows appear in relation to the listview box
//Make a context menu for add/remove/Dup/etc, make the context menu & edit watch windows appear in relation to where they right clicked
//TODO: Call AskSave in main client close function
//TODO: make so that only 1 instance of ram watch can be open at once (so that ask save can be reliable, as well as the watch button in ram search dialogs
//TODO: Call AskSave in main client X function
//TODO: RaWatchNewWatch dialog - when setting defaults for the edit watch - declare a new watch and use its values (so that it can set to defaults even if the watch class defaults change)
int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired
int defaultHeight;
List<Watch> watchList = new List<Watch>();
@ -572,10 +572,5 @@ namespace BizHawk.MultiClient
ListView.SelectedIndexCollection i = this.WatchListView.SelectedIndices;
i = WatchListView.SelectedIndices;
}
private void RamWatch_Paint(object sender, PaintEventArgs e)
{
UpdateValues();
}
}
}