Save & Load Config menu items

This commit is contained in:
andres.delikat 2011-02-21 16:35:42 +00:00
parent e801e31f40
commit 7d0f4f21fe
2 changed files with 1086 additions and 1047 deletions

File diff suppressed because it is too large Load Diff

View File

@ -66,27 +66,27 @@ namespace BizHawk.MultiClient
} }
Load += (o, e) => Load += (o, e) =>
{ {
AllowDrop = true; AllowDrop = true;
DragEnter += FormDragEnter; DragEnter += FormDragEnter;
DragDrop += FormDragDrop; DragDrop += FormDragDrop;
}; };
Closing += (o, e) => Closing += (o, e) =>
{
CloseGame();
if (Global.Config.SaveWindowPosition)
{ {
CloseGame(); Global.Config.MainWndx = this.Location.X;
if (Global.Config.SaveWindowPosition) Global.Config.MainWndy = this.Location.Y;
{ }
Global.Config.MainWndx = this.Location.X; else
Global.Config.MainWndy = this.Location.Y; {
} Global.Config.MainWndx = -1;
else Global.Config.MainWndy = -1;
{ }
Global.Config.MainWndx = -1; ConfigService.Save("config.ini", Global.Config);
Global.Config.MainWndy = -1; };
}
ConfigService.Save("config.ini", Global.Config);
};
ResizeBegin += (o, e) => ResizeBegin += (o, e) =>
{ {
@ -1043,5 +1043,17 @@ namespace BizHawk.MultiClient
if (!miAutoMinimizeSkipping.Enabled) miAutoMinimizeSkipping.Checked = true; if (!miAutoMinimizeSkipping.Enabled) miAutoMinimizeSkipping.Checked = true;
} }
private void saveConfigToolStripMenuItem_Click(object sender, EventArgs e)
{
ConfigService.Save("config.ini", Global.Config);
Global.RenderPanel.AddMessage("Saved settings");
}
private void loadConfigToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config = ConfigService.Load<Config>("config.ini");
Global.RenderPanel.AddMessage("Saved loaded");
}
} }
} }