public static void DoCGBColorChoserFormDialog(IWin32Window parent, Gameboy.GambatteSettings s) { using (var dlg = new CGBColorChooserForm()) { dlg.LoadType(s); var result = dlg.ShowDialog(parent); if (result == DialogResult.OK) s.CGBColors = dlg.type; } }
public static void DoCGBColorChooserFormDialog(IDialogParent parent, Gameboy.GambatteSettings s) { using var dlg = new CGBColorChooserForm(); dlg.LoadType(s); var result = parent.ShowDialogAsChild(dlg); if (result == DialogResult.OK) { s.CGBColors = dlg._type; } }
public static void DoCGBColorChooserFormDialog(IWin32Window parent, Gameboy.GambatteSettings s) { using var dlg = new CGBColorChooserForm(); dlg.LoadType(s); var result = dlg.ShowDialog(parent); if (result == DialogResult.OK) { s.CGBColors = dlg._type; } }
public static void DoCGBColorChooserFormDialog(IWin32Window parent) { using (var dlg = new CGBColorChooserForm()) { dlg.LoadType((Gameboy.GambatteSettings)Global.Emulator.GetSettings()); var result = dlg.ShowDialog(parent); if (result == DialogResult.OK) { var s = (Gameboy.GambatteSettings)Global.Emulator.GetSettings(); s.CGBColors = dlg.type; Global.Emulator.PutSettings(s); } } }
public static void DoCGBColorChooserFormDialog(IWin32Window parent) { using (var dlg = new CGBColorChooserForm()) { var gb = Global.Emulator as Gameboy; dlg.LoadType(gb.GetSettings()); var result = dlg.ShowDialog(parent); if (result == DialogResult.OK) { var s = gb.GetSettings(); s.CGBColors = dlg.type; gb.PutSettings(s); } } }