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) =>
{
AllowDrop = true;
DragEnter += FormDragEnter;
DragDrop += FormDragDrop;
};
{
AllowDrop = true;
DragEnter += FormDragEnter;
DragDrop += FormDragDrop;
};
Closing += (o, e) =>
Closing += (o, e) =>
{
CloseGame();
if (Global.Config.SaveWindowPosition)
{
CloseGame();
if (Global.Config.SaveWindowPosition)
{
Global.Config.MainWndx = this.Location.X;
Global.Config.MainWndy = this.Location.Y;
}
else
{
Global.Config.MainWndx = -1;
Global.Config.MainWndy = -1;
}
ConfigService.Save("config.ini", Global.Config);
};
Global.Config.MainWndx = this.Location.X;
Global.Config.MainWndy = this.Location.Y;
}
else
{
Global.Config.MainWndx = -1;
Global.Config.MainWndy = -1;
}
ConfigService.Save("config.ini", Global.Config);
};
ResizeBegin += (o, e) =>
{
@ -1043,5 +1043,17 @@ namespace BizHawk.MultiClient
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");
}
}
}