UI: Setup wizard + folder path configuration

This commit is contained in:
Souryo 2017-08-11 22:20:07 -04:00
parent b7f65a75ef
commit 7a44c547ee
37 changed files with 2638 additions and 314 deletions

View file

@ -10,6 +10,7 @@ using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
using System.Text.RegularExpressions;
using System.Reflection;
using System.Windows.Forms;
namespace Mesen.GUI.Config
{
@ -17,10 +18,62 @@ namespace Mesen.GUI.Config
{
private static Configuration _config;
private static Configuration _dirtyConfig;
private static bool? _portableMode = null;
private static string _portablePath = null;
public static bool DoNotSaveSettings { get; set; }
public static string DefaultPortableFolder { get { return Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); } }
public static string DefaultDocumentsFolder { get { return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Mesen"); } }
public static string DefaultAviFolder { get { return Path.Combine(HomeFolder, "Avi"); } }
public static string DefaultMovieFolder { get { return Path.Combine(HomeFolder, "Movies"); } }
public static string DefaultSaveDataFolder { get { return Path.Combine(HomeFolder, "Saves"); } }
public static string DefaultSaveStateFolder { get { return Path.Combine(HomeFolder, "SaveStates"); } }
public static string DefaultScreenshotFolder { get { return Path.Combine(HomeFolder, "Screenshots"); } }
public static string DefaultWaveFolder { get { return Path.Combine(HomeFolder, "Wave"); } }
public static void InitHomeFolder()
{
string portableFolder = DefaultPortableFolder;
string legacyPortableFolder = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "Mesen");
string documentsFolder = DefaultDocumentsFolder;
string portableConfig = Path.Combine(portableFolder, "settings.xml");
string legacyPortableConfig = Path.Combine(legacyPortableFolder, "settings.xml");
string documentsConfig = Path.Combine(documentsFolder, "settings.xml");
HomeFolder = null;
if(File.Exists(portableConfig)) {
HomeFolder = portableFolder;
} else if(File.Exists(legacyPortableConfig)) {
HomeFolder = legacyPortableFolder;
} else if(File.Exists(documentsConfig)) {
HomeFolder = documentsFolder;
}
}
public static string GetConfigFile()
{
InitHomeFolder();
if(!string.IsNullOrWhiteSpace(HomeFolder)) {
return Path.Combine(HomeFolder, "settings.xml");
} else {
return null;
}
}
public static void CreateConfig(bool portable)
{
if(portable) {
string portableFolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
HomeFolder = portableFolder;
} else {
string documentsFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Mesen");
HomeFolder = documentsFolder;
}
LoadConfig();
}
private static void LoadConfig()
{
if(_config == null) {
@ -119,171 +172,46 @@ namespace Mesen.GUI.Config
_config.Save();
}
public static string HomeFolder
{
get
{
if(_portableMode == null) {
_portableMode = System.Reflection.Assembly.GetEntryAssembly().Location.EndsWith("_P.exe", StringComparison.InvariantCultureIgnoreCase);
_portablePath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
}
public static string HomeFolder { get; private set; }
if(_portableMode.Value) {
return Path.Combine(_portablePath, "Mesen");
} else {
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments, Environment.SpecialFolderOption.Create), "Mesen");
}
public static string GetFolder(string defaultFolderName, string overrideFolder, bool useOverride)
{
string folder;
if(useOverride) {
folder = overrideFolder;
} else {
folder = defaultFolderName;
}
if(!Directory.Exists(folder)) {
Directory.CreateDirectory(folder);
}
return folder;
}
public static string FontFolder
{
get
{
string fontPath = Environment.GetFolderPath(Environment.SpecialFolder.Fonts, Environment.SpecialFolderOption.Create);
if(!Directory.Exists(fontPath)) {
Directory.CreateDirectory(fontPath);
}
return fontPath;
}
}
public static string AviFolder { get { return GetFolder(DefaultAviFolder, Config.PreferenceInfo.AviFolder, Config.PreferenceInfo.OverrideAviFolder); } }
public static string MovieFolder { get { return GetFolder(DefaultMovieFolder, Config.PreferenceInfo.MovieFolder, Config.PreferenceInfo.OverrideMovieFolder); } }
public static string SaveFolder { get { return GetFolder(DefaultSaveDataFolder, Config.PreferenceInfo.SaveDataFolder, Config.PreferenceInfo.OverrideSaveDataFolder); } }
public static string SaveStateFolder { get { return GetFolder(DefaultSaveStateFolder, Config.PreferenceInfo.SaveStateFolder, Config.PreferenceInfo.OverrideSaveStateFolder); } }
public static string ScreenshotFolder { get { return GetFolder(DefaultScreenshotFolder, Config.PreferenceInfo.ScreenshotFolder, Config.PreferenceInfo.OverrideScreenshotFolder); } }
public static string WaveFolder { get { return GetFolder(DefaultWaveFolder, Config.PreferenceInfo.WaveFolder, Config.PreferenceInfo.OverrideWaveFolder); } }
public static string MovieFolder
{
get
{
string movieFolder = Path.Combine(ConfigManager.HomeFolder, "Movies");
if(!Directory.Exists(movieFolder)) {
Directory.CreateDirectory(movieFolder);
}
return movieFolder;
}
}
public static string RecentGamesFolder
{
get
{
string recentGamesPath = Path.Combine(ConfigManager.HomeFolder, "RecentGames");
if(!Directory.Exists(recentGamesPath)) {
Directory.CreateDirectory(recentGamesPath);
}
return recentGamesPath;
}
}
public static string WaveFolder
{
get
{
string waveFolder = Path.Combine(ConfigManager.HomeFolder, "Wave");
if(!Directory.Exists(waveFolder)) {
Directory.CreateDirectory(waveFolder);
}
return waveFolder;
}
}
public static string AviFolder
{
get
{
string aviFolder = Path.Combine(ConfigManager.HomeFolder, "Avi");
if(!Directory.Exists(aviFolder)) {
Directory.CreateDirectory(aviFolder);
}
return aviFolder;
}
}
public static string SaveFolder
{
get
{
string movieFolder = Path.Combine(ConfigManager.HomeFolder, "Saves");
if(!Directory.Exists(movieFolder)) {
Directory.CreateDirectory(movieFolder);
}
return movieFolder;
}
}
public static string SaveStateFolder
{
get
{
string movieFolder = Path.Combine(ConfigManager.HomeFolder, "SaveStates");
if(!Directory.Exists(movieFolder)) {
Directory.CreateDirectory(movieFolder);
}
return movieFolder;
}
}
public static string DebuggerFolder
{
get
{
string debuggerFolder = Path.Combine(ConfigManager.HomeFolder, "Debugger");
if(!Directory.Exists(debuggerFolder)) {
Directory.CreateDirectory(debuggerFolder);
}
return debuggerFolder;
}
}
public static string DownloadFolder
{
get
{
string downloadFolder = Path.Combine(ConfigManager.HomeFolder, "Downloads");
if(!Directory.Exists(downloadFolder)) {
Directory.CreateDirectory(downloadFolder);
}
return downloadFolder;
}
}
public static string BackupFolder
{
get
{
string backupFolder = Path.Combine(ConfigManager.HomeFolder, "Backups");
if(!Directory.Exists(backupFolder)) {
Directory.CreateDirectory(backupFolder);
}
return backupFolder;
}
}
public static string TestFolder
{
get
{
string testFolder = Path.Combine(ConfigManager.HomeFolder, "Tests");
if(!Directory.Exists(testFolder)) {
Directory.CreateDirectory(testFolder);
}
return testFolder;
}
}
public static string HdPackFolder
{
get
{
string hdPackFolder = Path.Combine(ConfigManager.HomeFolder, "HdPacks");
if(!Directory.Exists(hdPackFolder)) {
Directory.CreateDirectory(hdPackFolder);
}
return hdPackFolder;
}
}
public static string DebuggerFolder { get { return GetFolder(Path.Combine(ConfigManager.HomeFolder, "Debugger"), null, false); } }
public static string DownloadFolder { get { return GetFolder(Path.Combine(ConfigManager.HomeFolder, "Downloads"), null, false); } }
public static string BackupFolder { get { return GetFolder(Path.Combine(ConfigManager.HomeFolder, "Backups"), null, false); } }
public static string TestFolder { get { return GetFolder(Path.Combine(ConfigManager.HomeFolder, "Tests"), null, false); } }
public static string HdPackFolder { get { return GetFolder(Path.Combine(ConfigManager.HomeFolder, "HdPacks"), null, false); } }
public static string RecentGamesFolder { get { return GetFolder(Path.Combine(ConfigManager.HomeFolder, "RecentGames"), null, false); } }
public static string FontFolder { get { return GetFolder(Environment.GetFolderPath(Environment.SpecialFolder.Fonts, Environment.SpecialFolderOption.Create), null, false); } }
public static string ConfigFile
{
get
{
if(HomeFolder == null) {
//Initializes the HomeFolder property
InitHomeFolder();
}
if(!Directory.Exists(HomeFolder)) {
Directory.CreateDirectory(HomeFolder);
}
@ -322,10 +250,25 @@ namespace Mesen.GUI.Config
public static void ResetSettings()
{
DefaultKeyMappingType defaultMappings = Config.InputInfo.DefaultMapping;
_dirtyConfig = new Configuration();
Config.InputInfo.DefaultMapping = defaultMappings;
Config.InitializeDefaults();
ApplyChanges();
Config.ApplyConfig();
}
public static void RestartMesen(bool preventSave = false)
{
if(preventSave) {
DoNotSaveSettings = true;
}
if(Program.IsMono) {
System.Diagnostics.Process.Start("mono", "\"" + Assembly.GetEntryAssembly().Location + "\" /delayrestart");
} else {
System.Diagnostics.Process.Start(Assembly.GetEntryAssembly().Location, "/delayrestart");
}
}
}
}

View file

@ -163,4 +163,14 @@ namespace Mesen.GUI.Config
return text;
}
}
[Flags]
public enum DefaultKeyMappingType
{
None = 0,
Xbox = 1,
Ps4 = 2,
WasdKeys = 3,
ArrowKeys = 4
}
}

View file

@ -82,6 +82,8 @@ namespace Mesen.GUI.Config
public class InputInfo
{
public DefaultKeyMappingType DefaultMapping;
public ConsoleType ConsoleType = ConsoleType.Nes;
public InteropEmu.ExpansionPortDevice ExpansionPortDevice = InteropEmu.ExpansionPortDevice.None;
public bool UseFourScore = false;
@ -105,10 +107,19 @@ namespace Mesen.GUI.Config
var controllerInfo = new ControllerInfo();
controllerInfo.ControllerType = Controllers.Count <= 1 ? InteropEmu.ControllerType.StandardController : InteropEmu.ControllerType.None;
if(Controllers.Count <= 1) {
controllerInfo.Keys.Add(Controllers.Count == 0 ? presets.ArrowLayout : presets.Player2KeyboardLayout);
controllerInfo.Keys.Add(Controllers.Count == 0 ? presets.XboxLayout1 : presets.XboxLayout2);
controllerInfo.Keys.Add(Controllers.Count == 0 ? presets.Ps4Layout1 : presets.Ps4Layout2);
if(Controllers.Count == 0) {
if(DefaultMapping.HasFlag(DefaultKeyMappingType.Xbox)) {
controllerInfo.Keys.Add(presets.XboxLayout1);
}
if(DefaultMapping.HasFlag(DefaultKeyMappingType.Ps4)) {
controllerInfo.Keys.Add(presets.Ps4Layout1);
}
if(DefaultMapping.HasFlag(DefaultKeyMappingType.WasdKeys)) {
controllerInfo.Keys.Add(presets.WasdLayout);
}
if(DefaultMapping.HasFlag(DefaultKeyMappingType.ArrowKeys)) {
controllerInfo.Keys.Add(presets.ArrowLayout);
}
}
Controllers.Add(controllerInfo);
}

View file

@ -30,7 +30,6 @@ namespace Mesen.GUI.Config
public bool AssociateNesFiles = false;
public bool AssociateFdsFiles = false;
public bool AssociateMmoFiles = false;
public bool AssociateMstFiles = false;
public bool AssociateNsfFiles = false;
public bool AssociateNsfeFiles = false;
public bool AssociateUnfFiles = false;
@ -62,6 +61,20 @@ namespace Mesen.GUI.Config
public UInt32 RewindBufferSize = 300;
public bool OverrideAviFolder = false;
public bool OverrideMovieFolder = false;
public bool OverrideSaveDataFolder = false;
public bool OverrideSaveStateFolder = false;
public bool OverrideScreenshotFolder = false;
public bool OverrideWaveFolder = false;
public string AviFolder = "";
public string MovieFolder = "";
public string SaveDataFolder = "";
public string SaveStateFolder = "";
public string ScreenshotFolder = "";
public string WaveFolder = "";
public PreferenceInfo()
{
}
@ -93,7 +106,6 @@ namespace Mesen.GUI.Config
FileAssociationHelper.UpdateFileAssociation("nes", preferenceInfo.AssociateNesFiles);
FileAssociationHelper.UpdateFileAssociation("fds", preferenceInfo.AssociateFdsFiles);
FileAssociationHelper.UpdateFileAssociation("mmo", preferenceInfo.AssociateMmoFiles);
FileAssociationHelper.UpdateFileAssociation("mst", preferenceInfo.AssociateMstFiles);
FileAssociationHelper.UpdateFileAssociation("nsf", preferenceInfo.AssociateNsfFiles);
FileAssociationHelper.UpdateFileAssociation("nsfe", preferenceInfo.AssociateNsfeFiles);
FileAssociationHelper.UpdateFileAssociation("unf", preferenceInfo.AssociateUnfFiles);
@ -122,6 +134,8 @@ namespace Mesen.GUI.Config
InteropEmu.SetEmulatorKeys(new EmulatorKeyMappingSet() { KeySet1 = preferenceInfo.EmulatorKeySet1.Value, KeySet2 = preferenceInfo.EmulatorKeySet2.Value });
InteropEmu.SetRewindBufferSize(preferenceInfo.RewindBufferSize);
InteropEmu.SetFolderOverrides(ConfigManager.SaveFolder, ConfigManager.SaveStateFolder, ConfigManager.ScreenshotFolder);
}
}
}

View file

@ -27,6 +27,9 @@
<Message ID="RandomGameNoGameFound">Mesen could not find any games to load.</Message>
<Message ID="InvalidPaths">The following path overrides are invalid:&#xA;&#xA;{0}&#xA;&#xA;Please use valid and writable folders and try again.</Message>
<Message ID="CopyMesenDataPrompt">All files will be copied from:&#xA;&#xA;{0}&#xA;to&#xA;{1}&#xA;&#xA;Once the copy is completed, Mesen will restart.&#xA;Continue?</Message>
<Message ID="CheatsFound">{0} games and {1} cheats in database</Message>
<Message ID="CheatsImported">{0} cheats imported for {1}.</Message>

View file

@ -360,12 +360,27 @@
<Control ID="chkDisplayMovieIcons">Mostrar icono de iniciar/grabar al reproducir o grabar un video</Control>
<Control ID="btnOpenMesenFolder">Abrir el directorio de Mesen</Control>
<Control ID="btnResetSettings">Restablecer todo</Control>
<Control ID="tpgFileAssociations">Asociación de archivos</Control>
<Control ID="tpgFiles">Files/Folders</Control>
<Control ID="grpFileAssociations">Asociación de archivos</Control>
<Control ID="chkNesFormat">.NES</Control>
<Control ID="chkFdsFormat">.FDS (Famicom Disk System)</Control>
<Control ID="chkMmoFormat">.MMO (Videos de Mesen)</Control>
<Control ID="chkMstFormat">.MST (Partidas guardadas de Mesen)</Control>
<Control ID="grpDataStorageLocation">Data Storage Folder</Control>
<Control ID="radStorageDocuments">Store Mesen's data in my user profile</Control>
<Control ID="radStoragePortable">Store Mesen's data in the same folder as the application</Control>
<Control ID="lblDataLocation">Folder:</Control>
<Control ID="grpPathOverrides">Folder Overrides</Control>
<Control ID="chkAviOverride">Videos:</Control>
<Control ID="chkScreenshotsOverride">Screenshots:</Control>
<Control ID="chkSaveDataOverride">Save Data:</Control>
<Control ID="chkWaveOverride">Audio:</Control>
<Control ID="chkSaveStatesOverride">Save States:</Control>
<Control ID="chkMoviesOverride">Movies:</Control>
<Control ID="tpgAdvanced">Avanzado</Control>
<Control ID="chkFdsAutoLoadDisk">Insertar la cara A del disco 1 al cargar un juego FDS</Control>
<Control ID="chkFdsFastForwardOnLoad">Aumentar la velocidad de la emulación de juegos de carga FDS</Control>
@ -571,6 +586,25 @@
<Control ID="lblExplanation">Esto iniciará Mesen en modo de pantalla completa con la rom "MyGame.nes" cargada. También usa el filtro NTSC, ajuste a escala 2x y establece la configuración de Overscan. El parámetro "DoNotSaveSettings" se usa para prevenir que las opciones dadas desde la línea de comandos alteren la configuración de Mesen.</Control>
<Control ID="txtGeneralOptions">/fullscreen - Inicia Mesen en pantalla completa&#13;&#10;/DoNotSaveSettings - Previene que las opciones se graben en disco (útil para evitar que las opciones de la línea de comandos se conviertan en la configuración predeterminada)</Control>
</Form>
<Form ID="frmCopyFiles" Title="Please wait...">
<Control ID="lblCopying">Copying:</Control>
</Form>
<Form ID="frmConfigWizard" Title="Mesen - Configuration">
<Control ID="lblMesen">Mesen - NES Emulator</Control>
<Control ID="lblConfigWizard">Configuration Wizard</Control>
<Control ID="lblInitialSetup">Please take a moment to perform Mesen's initial setup.</Control>
<Control ID="lblStorageLocation">Data Storage Location</Control>
<Control ID="lblStorageHint">Select where you want to store Mesen's data:</Control>
<Control ID="radStorageDocuments">Store the data in my user profile</Control>
<Control ID="radStoragePortable">Store the data in the same folder as the application</Control>
<Control ID="lblDataLocation">Folder:</Control>
<Control ID="lblInputMappings">Input Mappings</Control>
<Control ID="lblInputHint">Select your preferred input methods:</Control>
<Control ID="lblMiscOptions">Other Options</Control>
<Control ID="chkCreateShortcut">Create a shortcut on my desktop</Control>
<Control ID="btnOk">CONFIRM</Control>
<Control ID="lblCancel">Cancel</Control>
</Form>
</Forms>
<Messages>
<Message ID="FilterAll">Todos los tipos de archivo (*.*)|*.*</Message>
@ -602,6 +636,9 @@
<Message ID="RandomGameNoGameFound">Mesen no puede encontrar ningún juego para cargar.</Message>
<Message ID="InvalidPaths">The following path overrides are invalid:&#xA;&#xA;{0}&#xA;&#xA;Please use valid and writable folders and try again.</Message>
<Message ID="CopyMesenDataPrompt">All files will be copied from:&#xA;&#xA;{0}&#xA;to&#xA;{1}&#xA;&#xA;Once the copy is completed, Mesen will restart.&#xA;Continue?</Message>
<Message ID="NsfNextTrack">Pista siguiente (Espera para jugar más rápido)</Message>
<Message ID="NsfUnnamedTrack">[sin nombre]</Message>
<Message ID="NsfUnknownField">[desconocido]</Message>

View file

@ -363,12 +363,27 @@
<Control ID="chkDisplayMovieIcons">Afficher un icône lors de la lecture ou de l'enregistrement des films</Control>
<Control ID="btnOpenMesenFolder">Ouvrir le dossier de Mesen</Control>
<Control ID="btnResetSettings">Réinitialiser la configuration</Control>
<Control ID="tpgFileAssociations">Associations de fichiers</Control>
<Control ID="tpgFiles">Fichiers/Dossiers</Control>
<Control ID="grpFileAssociations">Associations de fichiers</Control>
<Control ID="chkNesFormat">.NES</Control>
<Control ID="chkFdsFormat">.FDS (Famicom Disk System)</Control>
<Control ID="chkMmoFormat">.MMO (Films Mesen)</Control>
<Control ID="chkMstFormat">.MST (Savestate Mesen)</Control>
<Control ID="grpDataStorageLocation">Sauvegarde des fichiers</Control>
<Control ID="radStorageDocuments">Mettre les fichiers dans mon profil utilisateur</Control>
<Control ID="radStoragePortable">Mettre les fichiers dans le même dossier que l'application</Control>
<Control ID="lblDataLocation">Dossier:</Control>
<Control ID="grpPathOverrides">Modification des dossiers par défaut</Control>
<Control ID="chkAviOverride">Vidéos:</Control>
<Control ID="chkScreenshotsOverride">Captures d'écran:</Control>
<Control ID="chkSaveDataOverride">Fichier de sauvegarde:</Control>
<Control ID="chkWaveOverride">Audio:</Control>
<Control ID="chkSaveStatesOverride">Sauvegardes rapides:</Control>
<Control ID="chkMoviesOverride">Films:</Control>
<Control ID="tpgAdvanced">Avancé</Control>
<Control ID="chkFdsAutoLoadDisk">Insérer le côté A du disque 1 lors du chargement d'un jeu de FDS</Control>
<Control ID="chkFdsFastForwardOnLoad">Augmenter la vitesse d'émulation pendant le chargement des jeux FDS</Control>
@ -585,6 +600,25 @@
<Control ID="lblExplanation">Cet exemple ouvrira Mesen en mode plein écran avec le jeu "MyGame.nes" de chargé. Le filtre vidéo NTSC avec un facteur d'agrandissement de 2x sera utilisé et les paramètres d'overscan seront modifiés. L'option "DoNotSaveSettings" empêche les options données en ligne de commande de devenir les options par défaut de l'émulateur.</Control>
<Control ID="txtGeneralOptions">/fullscreen - Démarre Mesen en mode plein écran&#13;&#10;/DoNotSaveSettings - Empêche la sauvegarde des paramètres sur le disque (autrement les options données en ligne de commande seront permanentes)</Control>
</Form>
<Form ID="frmCopyFiles" Title="En cours d'exécution...">
<Control ID="lblCopying">Copie de :</Control>
</Form>
<Form ID="frmConfigWizard" Title="Mesen - Configuration">
<Control ID="lblMesen">Mesen - Émulateur NES</Control>
<Control ID="lblConfigWizard">Assistant de configuration</Control>
<Control ID="lblInitialSetup">Veuillez prendre un moment pour configurer Mesen.</Control>
<Control ID="lblStorageLocation">Sauvegarde des fichiers</Control>
<Control ID="lblStorageHint">Choisissez où Mesen sauvegardera ses fichiers :</Control>
<Control ID="radStorageDocuments">Mettre les fichiers dans mon profil utilisateur</Control>
<Control ID="radStoragePortable">Mettre les fichiers dans le même dossier que l'application</Control>
<Control ID="lblDataLocation">Dossier :</Control>
<Control ID="lblInputMappings">Configuration des contrôles</Control>
<Control ID="lblInputHint">Choisissez vos façons préférées de contrôler les jeux :</Control>
<Control ID="lblMiscOptions">Options diverses</Control>
<Control ID="chkCreateShortcut">Créer un raccourci sur mon bureau</Control>
<Control ID="btnOk">CONFIRMER</Control>
<Control ID="lblCancel">Annuler</Control>
</Form>
</Forms>
<Messages>
<Message ID="FilterAll">Tous les fichiers (*.*)|*.*</Message>
@ -613,6 +647,9 @@
<Message ID="RandomGameNoGameFound">Mesen n'a pas trouvé de jeu sur votre disque.</Message>
<Message ID="InvalidPaths">Les dossiers suivants sont invalides :&#xA;&#xA;{0}&#xA;&#xA;Veuillez entrer des noms de dossier valides et essayer à nouveau.</Message>
<Message ID="CopyMesenDataPrompt">Tous les fichiers seront copiés du dossier:&#xA;&#xA;{0}&#xA;au dossier&#xA;{1}&#xA;&#xA;Une fois la copie terminée, Mesen redémarrera.&#xA;Voulez-vous continuer?</Message>
<Message ID="CheatsFound">{0} jeux et {1} codes présents dans la base de données</Message>
<Message ID="CheatsImported">{0} codes ont été importés pour le jeu {1}.</Message>

View file

@ -362,12 +362,27 @@
<Control ID="chkDisplayMovieIcons">動画の録画や再生の際、アイコンを表示する</Control>
<Control ID="btnOpenMesenFolder">Mesenのフォルダを開く</Control>
<Control ID="btnResetSettings">初期化</Control>
<Control ID="tpgFileAssociations">ファイルの関連付け</Control>
<Control ID="tpgFiles">ファイル・フォルダ</Control>
<Control ID="grpFileAssociations">ファイルの関連付け</Control>
<Control ID="chkNesFormat">.NES (ファミコン)</Control>
<Control ID="chkFdsFormat">.FDS (ファミコンディスクシステム)</Control>
<Control ID="chkMmoFormat">.MMO (Mesenの動画)</Control>
<Control ID="chkMstFormat">.MST (Mesenのクイックセーブ)</Control>
<Control ID="grpDataStorageLocation">データの保存先</Control>
<Control ID="radStorageDocuments">プロファイルフォルダに保存する</Control>
<Control ID="radStoragePortable">Mesenのフォルダに保存する</Control>
<Control ID="lblDataLocation">保存先:</Control>
<Control ID="grpPathOverrides">デフォルトフォルダの変更</Control>
<Control ID="chkAviOverride">録画:</Control>
<Control ID="chkScreenshotsOverride">スクリーンショット:</Control>
<Control ID="chkSaveDataOverride">セーブデータ:</Control>
<Control ID="chkWaveOverride">録音:</Control>
<Control ID="chkSaveStatesOverride">クイックセーブ:</Control>
<Control ID="chkMoviesOverride">映画:</Control>
<Control ID="tpgAdvanced">詳細設定</Control>
<Control ID="chkFdsAutoLoadDisk">ファミコンディスクシステムのゲームをロードする時に自動的にディスクのA面を入れる</Control>
<Control ID="chkFdsFastForwardOnLoad">ファミコンディスクシステムのゲームをディスクからロードする時に自動的に最高速度にする</Control>
@ -568,6 +583,25 @@
<Control ID="lblExplanation">Mesenを全画面表示の状態で"MyGame.nes"を起動する. 画面エフェクトをNTSCにして、映像サイズを2xにして、オーバースキャン設定を変更する。</Control>
<Control ID="txtGeneralOptions">/fullscreen - 全画面表示の状態で起動する&#13;&#10;/DoNotSaveSettings - 設定のセーブ機能を無効にする</Control>
</Form>
<Form ID="frmCopyFiles" Title="しばらくお待ちください">
<Control ID="lblCopying">ファイル:</Control>
</Form>
<Form ID="frmConfigWizard" Title="Mesen - 設定">
<Control ID="lblMesen">Mesen - ファミコンエミュレータ</Control>
<Control ID="lblConfigWizard">セットアップウィザード</Control>
<Control ID="lblInitialSetup">Mesenの初期設定を行います。</Control>
<Control ID="lblStorageLocation">データの保存先</Control>
<Control ID="lblStorageHint">Mesenのデータの保存先を選んでください</Control>
<Control ID="radStorageDocuments">プロファイルフォルダに保存する</Control>
<Control ID="radStoragePortable">Mesenのフォルダに保存する</Control>
<Control ID="lblDataLocation">保存先 :</Control>
<Control ID="lblInputMappings">コントローラ設定</Control>
<Control ID="lblInputHint">使いたいコントローラを選んでください:</Control>
<Control ID="lblMiscOptions">その他</Control>
<Control ID="chkCreateShortcut">デスクトップにショートカットを作る</Control>
<Control ID="btnOk">確認</Control>
<Control ID="lblCancel">キャンセル</Control>
</Form>
</Forms>
<Messages>
<Message ID="FilterAll">すべてのファイル (*.*)|*.*</Message>
@ -596,6 +630,9 @@
<Message ID="RandomGameNoGameFound">Mesenはゲームファイルを見つかりませんでした。</Message>
<Message ID="InvalidPaths">次のフォルダには書き込むことが出来ません:&#xA;&#xA;{0}&#xA;&#xA;書き込むことが出来るフォルダを選択してください。</Message>
<Message ID="CopyMesenDataPrompt">全てのファイルが&#xA;{0}&#xA;から&#xA;{1}&#xA;にコピーされます。&#xA;&#xA;コピーが終わったら、Mesenが再起動します.&#xA;よろしいですか?</Message>
<Message ID="CheatsFound">ゲーム{0}個とチートコード{1}個を見つけました</Message>
<Message ID="CheatsImported">{1}用のチートコード{0}個がインポートされました。.</Message>

View file

@ -360,12 +360,27 @@
<Control ID="chkDisplayMovieIcons">Exibir ícone de reprodução/gravação ao reproduzir ou gravar um filme</Control>
<Control ID="btnOpenMesenFolder">Abrir a pasta de Mesen</Control>
<Control ID="btnResetSettings">Restaurar todas as configurações</Control>
<Control ID="tpgFileAssociations">Associação de arquivos</Control>
<Control ID="tpgFiles">Files/Folders</Control>
<Control ID="grpFileAssociations">Associação de arquivos</Control>
<Control ID="chkNesFormat">.NES</Control>
<Control ID="chkFdsFormat">.FDS (Famicom Disk System)</Control>
<Control ID="chkMmoFormat">.MMO (Vídeos do Mesen)</Control>
<Control ID="chkMstFormat">.MST (Saves do Mesen)</Control>
<Control ID="grpDataStorageLocation">Data Storage Folder</Control>
<Control ID="radStorageDocuments">Store Mesen's data in my user profile</Control>
<Control ID="radStoragePortable">Store Mesen's data in the same folder as the application</Control>
<Control ID="lblDataLocation">Folder:</Control>
<Control ID="grpPathOverrides">Folder Overrides</Control>
<Control ID="chkAviOverride">Videos:</Control>
<Control ID="chkScreenshotsOverride">Screenshots:</Control>
<Control ID="chkSaveDataOverride">Save Data:</Control>
<Control ID="chkWaveOverride">Audio:</Control>
<Control ID="chkSaveStatesOverride">Save States:</Control>
<Control ID="chkMoviesOverride">Movies:</Control>
<Control ID="tpgAdvanced">Avançado</Control>
<Control ID="chkFdsAutoLoadDisk">Inserir a parte A do disco 1 ao carregar um jogo FDS</Control>
<Control ID="chkFdsFastForwardOnLoad">Aumentar a velocidade da emulação de jogos ao carregar no FDS</Control>
@ -571,7 +586,26 @@
<Control ID="lblExplanation">This will start Mesen in fullscreen mode with the "MyGame.nes" rom loaded. It will also use the NTSC filter, set at a 2x scale and configure the Overscan settings. The "DoNotSaveSettings" flag is used to prevent the command line switches from pernanently altering Mesen's settings.</Control>
<Control ID="txtGeneralOptions">/fullscreen - Start Mesen in fullscreen mode&#13;&#10;/DoNotSaveSettings - Prevent settings from being saved to the disk (useful to prevent command line options from becoming the default settings)</Control>
</Form>
</Forms>
<Form ID="frmCopyFiles" Title="Please wait...">
<Control ID="lblCopying">Copying:</Control>
</Form>
<Form ID="frmConfigWizard" Title="Mesen - Configuration">
<Control ID="lblMesen">Mesen - NES Emulator</Control>
<Control ID="lblConfigWizard">Configuration Wizard</Control>
<Control ID="lblInitialSetup">Please take a moment to perform Mesen's initial setup.</Control>
<Control ID="lblStorageLocation">Data Storage Location</Control>
<Control ID="lblStorageHint">Select where you want to store Mesen's data:</Control>
<Control ID="radStorageDocuments">Store the data in my user profile</Control>
<Control ID="radStoragePortable">Store the data in the same folder as the application</Control>
<Control ID="lblDataLocation">Folder:</Control>
<Control ID="lblInputMappings">Input Mappings</Control>
<Control ID="lblInputHint">Select your preferred input methods:</Control>
<Control ID="lblMiscOptions">Other Options</Control>
<Control ID="chkCreateShortcut">Create a shortcut on my desktop</Control>
<Control ID="btnOk">CONFIRM</Control>
<Control ID="lblCancel">Cancel</Control>
</Form>
</Forms>
<Messages>
<Message ID="FilterAll">Todos os tipos de arquivo (*.*)|*.*</Message>
<Message ID="FilterMovie">Vídeos (*.mmo)|*.mmo|Todos os arquivos (*.*)|*.*</Message>
@ -602,6 +636,9 @@
<Message ID="RandomGameNoGameFound">Mesen não encontrou nenhum jogo para carregar.</Message>
<Message ID="InvalidPaths">The following path overrides are invalid:&#xA;&#xA;{0}&#xA;&#xA;Please use valid and writable folders and try again.</Message>
<Message ID="CopyMesenDataPrompt">All files will be copied from:&#xA;&#xA;{0}&#xA;to&#xA;{1}&#xA;&#xA;Once the copy is completed, Mesen will restart.&#xA;Continue?</Message>
<Message ID="NsfNextTrack">Track seguinte (Esperar para jogar mais rápido)</Message>
<Message ID="NsfUnnamedTrack">[sem nome]</Message>
<Message ID="NsfUnknownField">[desconhecido]</Message>

View file

@ -362,12 +362,27 @@
<Control ID="chkDisplayMovieIcons">Display play/record icon when playing or recording a movie</Control>
<Control ID="btnOpenMesenFolder">Открыть папку Mesen</Control>
<Control ID="btnResetSettings">Reset All Settings</Control>
<Control ID="tpgFileAssociations">Ассоциации файлов</Control>
<Control ID="tpgFiles">Files/Folders</Control>
<Control ID="grpFileAssociations">Ассоциации файлов</Control>
<Control ID="chkNesFormat">.NES</Control>
<Control ID="chkFdsFormat">.FDS (Famicom Disk System)</Control>
<Control ID="chkMmoFormat">.MMO (Записи)</Control>
<Control ID="chkMstFormat">.MST (Сохранения)</Control>
<Control ID="grpDataStorageLocation">Data Storage Folder</Control>
<Control ID="radStorageDocuments">Store Mesen's data in my user profile</Control>
<Control ID="radStoragePortable">Store Mesen's data in the same folder as the application</Control>
<Control ID="lblDataLocation">Folder:</Control>
<Control ID="grpPathOverrides">Folder Overrides</Control>
<Control ID="chkAviOverride">Videos:</Control>
<Control ID="chkScreenshotsOverride">Screenshots:</Control>
<Control ID="chkSaveDataOverride">Save Data:</Control>
<Control ID="chkWaveOverride">Audio:</Control>
<Control ID="chkSaveStatesOverride">Save States:</Control>
<Control ID="chkMoviesOverride">Movies:</Control>
<Control ID="tpgAdvanced">Расширенные</Control>
<Control ID="chkFdsAutoLoadDisk">Автоматически вставлять диск 1 стороной А при загрузке FDS</Control>
<Control ID="chkFdsFastForwardOnLoad">Использовать быструю загрузку FDS</Control>
@ -575,6 +590,25 @@
<Control ID="lblExplanation">This will start Mesen in fullscreen mode with the "MyGame.nes" rom loaded. It will also use the NTSC filter, set at a 2x scale and configure the Overscan settings. The "DoNotSaveSettings" flag is used to prevent the command line switches from pernanently altering Mesen's settings.</Control>
<Control ID="txtGeneralOptions">/fullscreen - Start Mesen in fullscreen mode&#13;&#10;/DoNotSaveSettings - Prevent settings from being saved to the disk (useful to prevent command line options from becoming the default settings)</Control>
</Form>
<Form ID="frmCopyFiles" Title="Please wait...">
<Control ID="lblCopying">Copying:</Control>
</Form>
<Form ID="frmConfigWizard" Title="Mesen - Configuration">
<Control ID="lblMesen">Mesen - NES Emulator</Control>
<Control ID="lblConfigWizard">Configuration Wizard</Control>
<Control ID="lblInitialSetup">Please take a moment to perform Mesen's initial setup.</Control>
<Control ID="lblStorageLocation">Data Storage Location</Control>
<Control ID="lblStorageHint">Select where you want to store Mesen's data:</Control>
<Control ID="radStorageDocuments">Store the data in my user profile</Control>
<Control ID="radStoragePortable">Store the data in the same folder as the application</Control>
<Control ID="lblDataLocation">Folder:</Control>
<Control ID="lblInputMappings">Input Mappings</Control>
<Control ID="lblInputHint">Select your preferred input methods:</Control>
<Control ID="lblMiscOptions">Other Options</Control>
<Control ID="chkCreateShortcut">Create a shortcut on my desktop</Control>
<Control ID="btnOk">CONFIRM</Control>
<Control ID="lblCancel">Cancel</Control>
</Form>
</Forms>
<Messages>
<Message ID="FilterAll">Все файлы (*.*)|*.*</Message>
@ -603,6 +637,9 @@
<Message ID="RandomGameNoGameFound">Mesen could not find any games to load.</Message>
<Message ID="InvalidPaths">The following path overrides are invalid:&#xA;&#xA;{0}&#xA;&#xA;Please use valid and writable folders and try again.</Message>
<Message ID="CopyMesenDataPrompt">All files will be copied from:&#xA;&#xA;{0}&#xA;to&#xA;{1}&#xA;&#xA;Once the copy is completed, Mesen will restart.&#xA;Continue?</Message>
<Message ID="CheatsFound">игр {0}, читов {1}</Message>
<Message ID="CheatsImported">{0} читов импортировано для {1}.</Message>

View file

@ -362,12 +362,27 @@
<Control ID="chkDisplayMovieIcons">Відображати значок відтворення/запису при відтворенні або запису відео</Control>
<Control ID="btnOpenMesenFolder">Відкрити папку Mesen</Control>
<Control ID="btnResetSettings">Скинути всі налаштування</Control>
<Control ID="tpgFileAssociations">Асоціації файлів</Control>
<Control ID="tpgFiles">Files/Folders</Control>
<Control ID="grpFileAssociations">Асоціації файлів</Control>
<Control ID="chkNesFormat">.NES</Control>
<Control ID="chkFdsFormat">.FDS (Famicom Disk System)</Control>
<Control ID="chkMmoFormat">.MMO (Записи)</Control>
<Control ID="chkMstFormat">.MST (Збереження)</Control>
<Control ID="grpDataStorageLocation">Data Storage Folder</Control>
<Control ID="radStorageDocuments">Store Mesen's data in my user profile</Control>
<Control ID="radStoragePortable">Store Mesen's data in the same folder as the application</Control>
<Control ID="lblDataLocation">Folder:</Control>
<Control ID="grpPathOverrides">Folder Overrides</Control>
<Control ID="chkAviOverride">Videos:</Control>
<Control ID="chkScreenshotsOverride">Screenshots:</Control>
<Control ID="chkSaveDataOverride">Save Data:</Control>
<Control ID="chkWaveOverride">Audio:</Control>
<Control ID="chkSaveStatesOverride">Save States:</Control>
<Control ID="chkMoviesOverride">Movies:</Control>
<Control ID="tpgAdvanced">Розширені</Control>
<Control ID="chkFdsAutoLoadDisk">Автоматично вставляти диск 1 стороною А при завантаженні FDS</Control>
<Control ID="chkFdsFastForwardOnLoad">Використовувати швидке завантаження FDS</Control>
@ -575,6 +590,25 @@
<Control ID="lblExplanation">Це запустить Mesen у повноекранному режимi з "MyGame.nes" завантаженим ромом. Вiн також буде використовувати фiльтр NTSC, встановлений у 2x масштабi та налаштує параметри Overscan. Прапор "DoNotSaveSettings" використовується для запобігання перемикання командного рядка від випадкової зміни налаштувань Mesen.</Control>
<Control ID="txtGeneralOptions">/fullscreen - Запустити Mesen у повноекранному режимi&#13;&#10;/DoNotSaveSettings - Заборонити збереження налаштувань на диску (корисно щоб запобігти становленню параметрів командного рядка за замовчуванням)</Control>
</Form>
<Form ID="frmCopyFiles" Title="Please wait...">
<Control ID="lblCopying">Copying:</Control>
</Form>
<Form ID="frmConfigWizard" Title="Mesen - Configuration">
<Control ID="lblMesen">Mesen - NES Emulator</Control>
<Control ID="lblConfigWizard">Configuration Wizard</Control>
<Control ID="lblInitialSetup">Please take a moment to perform Mesen's initial setup.</Control>
<Control ID="lblStorageLocation">Data Storage Location</Control>
<Control ID="lblStorageHint">Select where you want to store Mesen's data:</Control>
<Control ID="radStorageDocuments">Store the data in my user profile</Control>
<Control ID="radStoragePortable">Store the data in the same folder as the application</Control>
<Control ID="lblDataLocation">Folder:</Control>
<Control ID="lblInputMappings">Input Mappings</Control>
<Control ID="lblInputHint">Select your preferred input methods:</Control>
<Control ID="lblMiscOptions">Other Options</Control>
<Control ID="chkCreateShortcut">Create a shortcut on my desktop</Control>
<Control ID="btnOk">CONFIRM</Control>
<Control ID="lblCancel">Cancel</Control>
</Form>
</Forms>
<Messages>
<Message ID="FilterAll">Всi файли (*.*)|*.*</Message>
@ -602,6 +636,9 @@
<Message ID="ResetSettingsConfirmation">Warning: This will reset ALL of settings and cannot be undone!&#xA;&#xA;Continue?</Message>
<Message ID="RandomGameNoGameFound">Mesen не зміг знайти будь-які ігри для завантаження.</Message>
<Message ID="InvalidPaths">The following path overrides are invalid:&#xA;&#xA;{0}&#xA;&#xA;Please use valid and writable folders and try again.</Message>
<Message ID="CopyMesenDataPrompt">All files will be copied from:&#xA;&#xA;{0}&#xA;to&#xA;{1}&#xA;&#xA;Once the copy is completed, Mesen will restart.&#xA;Continue?</Message>
<Message ID="CheatsFound">iгр {0}, читiв {1}</Message>
<Message ID="CheatsImported">{0} читiв імпортовано для {1}.</Message>

View file

@ -0,0 +1,125 @@
namespace Mesen.GUI.Forms.Config
{
partial class ctrlPathSelection
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if(disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.txtPath = new System.Windows.Forms.TextBox();
this.btnBrowse = new System.Windows.Forms.Button();
this.tlpPath = new System.Windows.Forms.TableLayoutPanel();
this.txtDisabledPath = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.tlpPath.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Controls.Add(this.tlpPath, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.btnBrowse, 1, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(235, 21);
this.tableLayoutPanel1.TabIndex = 0;
//
// txtPath
//
this.txtPath.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtPath.Location = new System.Drawing.Point(0, 0);
this.txtPath.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
this.txtPath.Name = "txtPath";
this.txtPath.Size = new System.Drawing.Size(211, 20);
this.txtPath.TabIndex = 0;
//
// btnBrowse
//
this.btnBrowse.Location = new System.Drawing.Point(211, 1);
this.btnBrowse.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
this.btnBrowse.Name = "btnBrowse";
this.btnBrowse.Size = new System.Drawing.Size(24, 20);
this.btnBrowse.TabIndex = 1;
this.btnBrowse.Text = "...";
this.btnBrowse.UseVisualStyleBackColor = true;
this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
//
// tableLayoutPanel2
//
this.tlpPath.ColumnCount = 2;
this.tlpPath.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpPath.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 0F));
this.tlpPath.Controls.Add(this.txtDisabledPath, 1, 0);
this.tlpPath.Controls.Add(this.txtPath, 0, 0);
this.tlpPath.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpPath.Location = new System.Drawing.Point(0, 0);
this.tlpPath.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
this.tlpPath.Name = "tableLayoutPanel2";
this.tlpPath.RowCount = 1;
this.tlpPath.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpPath.Size = new System.Drawing.Size(211, 21);
this.tlpPath.TabIndex = 1;
//
// txtDisabledPath
//
this.txtDisabledPath.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtDisabledPath.Location = new System.Drawing.Point(211, 0);
this.txtDisabledPath.Margin = new System.Windows.Forms.Padding(0);
this.txtDisabledPath.Name = "txtDisabledPath";
this.txtDisabledPath.Size = new System.Drawing.Size(1, 20);
this.txtDisabledPath.TabIndex = 1;
//
// ctrlPathSelection
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
this.MaximumSize = new System.Drawing.Size(1000, 21);
this.MinimumSize = new System.Drawing.Size(0, 21);
this.Name = "ctrlPathSelection";
this.Size = new System.Drawing.Size(235, 21);
this.tableLayoutPanel1.ResumeLayout(false);
this.tlpPath.ResumeLayout(false);
this.tlpPath.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TextBox txtPath;
private System.Windows.Forms.Button btnBrowse;
private System.Windows.Forms.TableLayoutPanel tlpPath;
private System.Windows.Forms.TextBox txtDisabledPath;
}
}

View file

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Forms.Config
{
public partial class ctrlPathSelection : UserControl
{
public ctrlPathSelection()
{
InitializeComponent();
txtDisabledPath.ReadOnly = true;
txtDisabledPath.Visible = false;
}
public string DisabledText
{
get { return txtDisabledPath.Text; }
set { txtDisabledPath.Text = value; }
}
public override string Text
{
get { return txtPath.Text; }
set { txtPath.Text = value; }
}
public new bool Enabled
{
get { return !txtPath.ReadOnly; }
set
{
txtPath.Visible = value;
txtDisabledPath.Visible = !value;
tlpPath.ColumnStyles[0].SizeType = value ? SizeType.Percent : SizeType.Absolute;
tlpPath.ColumnStyles[1].SizeType = value ? SizeType.Absolute : SizeType.Percent;
tlpPath.ColumnStyles[0].Width = value ? 100F : 0F;
tlpPath.ColumnStyles[1].Width = value ? 0F : 100F;
btnBrowse.Visible = value;
}
}
private void btnBrowse_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
if(fbd.ShowDialog() == DialogResult.OK) {
txtPath.Text = fbd.SelectedPath;
}
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,114 @@
namespace Mesen.GUI.Forms.Config
{
partial class frmCopyFiles
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if(disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.pbProgress = new System.Windows.Forms.ProgressBar();
this.lblCopying = new System.Windows.Forms.Label();
this.lblTarget = new System.Windows.Forms.Label();
this.tmrProgress = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.lblTarget, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.pbProgress, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.lblCopying, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(268, 64);
this.tableLayoutPanel1.TabIndex = 0;
//
// pbProgress
//
this.tableLayoutPanel1.SetColumnSpan(this.pbProgress, 2);
this.pbProgress.Dock = System.Windows.Forms.DockStyle.Fill;
this.pbProgress.Location = new System.Drawing.Point(3, 38);
this.pbProgress.Name = "pbProgress";
this.pbProgress.Size = new System.Drawing.Size(262, 23);
this.pbProgress.TabIndex = 0;
//
// lblCopying
//
this.lblCopying.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblCopying.AutoSize = true;
this.lblCopying.Location = new System.Drawing.Point(3, 11);
this.lblCopying.Name = "lblCopying";
this.lblCopying.Size = new System.Drawing.Size(48, 13);
this.lblCopying.TabIndex = 1;
this.lblCopying.Text = "Copying:";
//
// lblTarget
//
this.lblTarget.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblTarget.AutoSize = true;
this.lblTarget.Location = new System.Drawing.Point(57, 11);
this.lblTarget.Name = "lblTarget";
this.lblTarget.Size = new System.Drawing.Size(19, 13);
this.lblTarget.TabIndex = 2;
this.lblTarget.Text = "....";
//
// tmrProgress
//
this.tmrProgress.Tick += new System.EventHandler(this.tmrProgress_Tick);
//
// frmCopyFiles
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(268, 64);
this.ControlBox = false;
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "frmCopyFiles";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Please wait...";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblTarget;
private System.Windows.Forms.ProgressBar pbProgress;
private System.Windows.Forms.Label lblCopying;
private System.Windows.Forms.Timer tmrProgress;
}
}

View file

@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Forms.Config
{
public partial class frmCopyFiles : Form
{
private volatile int _fileCount = 0;
private volatile int _filesCopied = 0;
private List<string> _sourceFiles = new List<string>();
private List<string> _targetFiles = new List<string>();
public Exception Exception { get; set; }
public frmCopyFiles(string source, string target)
{
InitializeComponent();
Task.Run(() => {
GetFilesToCopy(source, target, _sourceFiles, _targetFiles);
_fileCount = _sourceFiles.Count;
this.Invoke((Action)(() => {
tmrProgress.Start();
}));
for(int i = 0; i < _sourceFiles.Count; i++) {
try {
File.Copy(_sourceFiles[i], _targetFiles[i], true);
} catch(Exception ex) {
Exception = ex;
break;
}
_filesCopied++;
}
});
}
private void GetFilesToCopy(string source, string target, List<string> sourceFiles, List<string> targetFiles)
{
DirectoryInfo dir = new DirectoryInfo(source);
DirectoryInfo[] dirs = dir.GetDirectories();
if(!Directory.Exists(target)) {
Directory.CreateDirectory(target);
}
FileInfo[] files = dir.GetFiles();
foreach(FileInfo file in files) {
if(file.Extension.ToLower() != ".exe" && file.Extension.ToLower() != ".dll") {
sourceFiles.Add(file.FullName);
targetFiles.Add(Path.Combine(target, file.Name));
}
}
foreach(DirectoryInfo subdir in dirs) {
GetFilesToCopy(subdir.FullName, Path.Combine(target, subdir.Name), sourceFiles, targetFiles);
}
}
protected override void OnFormClosing(FormClosingEventArgs e)
{
if(_filesCopied < _fileCount && Exception == null) {
e.Cancel = true;
}
base.OnFormClosing(e);
}
private void tmrProgress_Tick(object sender, EventArgs e)
{
pbProgress.Maximum = _fileCount + 1;
pbProgress.Value = _filesCopied + 1;
pbProgress.Value = _filesCopied;
if(_sourceFiles.Count > _filesCopied) {
lblTarget.Text = Path.GetFileName(_sourceFiles[_filesCopied]);
}
if(_filesCopied >= _fileCount || Exception != null) {
tmrProgress.Stop();
this.Close();
}
}
}
}

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="tmrProgress.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -87,18 +87,42 @@ namespace Mesen.GUI.Forms.Config
this.nudNsfMoveToNextTrackTime = new System.Windows.Forms.NumericUpDown();
this.lblNsfSeconds = new System.Windows.Forms.Label();
this.chkNsfDisableApuIrqs = new System.Windows.Forms.CheckBox();
this.tpgFileAssociations = new System.Windows.Forms.TabPage();
this.tpgFiles = new System.Windows.Forms.TabPage();
this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
this.grpPathOverrides = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel10 = new System.Windows.Forms.TableLayoutPanel();
this.psWave = new Mesen.GUI.Forms.Config.ctrlPathSelection();
this.psMovies = new Mesen.GUI.Forms.Config.ctrlPathSelection();
this.psSaveData = new Mesen.GUI.Forms.Config.ctrlPathSelection();
this.psSaveStates = new Mesen.GUI.Forms.Config.ctrlPathSelection();
this.psScreenshots = new Mesen.GUI.Forms.Config.ctrlPathSelection();
this.psAvi = new Mesen.GUI.Forms.Config.ctrlPathSelection();
this.chkAviOverride = new System.Windows.Forms.CheckBox();
this.chkScreenshotsOverride = new System.Windows.Forms.CheckBox();
this.chkSaveDataOverride = new System.Windows.Forms.CheckBox();
this.chkWaveOverride = new System.Windows.Forms.CheckBox();
this.chkSaveStatesOverride = new System.Windows.Forms.CheckBox();
this.chkMoviesOverride = new System.Windows.Forms.CheckBox();
this.grpFileAssociations = new System.Windows.Forms.GroupBox();
this.tlpFileFormat = new System.Windows.Forms.TableLayoutPanel();
this.chkNsfeFormat = new System.Windows.Forms.CheckBox();
this.chkNesFormat = new System.Windows.Forms.CheckBox();
this.chkFdsFormat = new System.Windows.Forms.CheckBox();
this.chkMmoFormat = new System.Windows.Forms.CheckBox();
this.chkMstFormat = new System.Windows.Forms.CheckBox();
this.chkNsfFormat = new System.Windows.Forms.CheckBox();
this.chkUnfFormat = new System.Windows.Forms.CheckBox();
this.chkMmoFormat = new System.Windows.Forms.CheckBox();
this.chkNsfFormat = new System.Windows.Forms.CheckBox();
this.chkNsfeFormat = new System.Windows.Forms.CheckBox();
this.grpDataStorageLocation = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel8 = new System.Windows.Forms.TableLayoutPanel();
this.radStorageDocuments = new System.Windows.Forms.RadioButton();
this.radStoragePortable = new System.Windows.Forms.RadioButton();
this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel();
this.lblLocation = new System.Windows.Forms.Label();
this.lblDataLocation = new System.Windows.Forms.Label();
this.tpgAdvanced = new System.Windows.Forms.TabPage();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkDisableGameSelectionScreen = new System.Windows.Forms.CheckBox();
this.chkGameSelectionScreenResetGame = new System.Windows.Forms.CheckBox();
this.chkDisableGameDatabase = new Mesen.GUI.Controls.ctrlRiskyOption();
this.chkFdsAutoLoadDisk = new System.Windows.Forms.CheckBox();
this.chkFdsFastForwardOnLoad = new System.Windows.Forms.CheckBox();
@ -112,12 +136,10 @@ namespace Mesen.GUI.Forms.Config
this.chkShowFrameCounter = new System.Windows.Forms.CheckBox();
this.chkShowVsConfigOnLoad = new System.Windows.Forms.CheckBox();
this.chkDisableOsd = new System.Windows.Forms.CheckBox();
this.tmrSyncDateTime = new System.Windows.Forms.Timer(this.components);
this.lblFdsSettings = new System.Windows.Forms.Label();
this.lblUiDisplaySettings = new System.Windows.Forms.Label();
this.lblGameSelectionScreenSettings = new System.Windows.Forms.Label();
this.chkGameSelectionScreenResetGame = new System.Windows.Forms.CheckBox();
this.chkDisableGameSelectionScreen = new System.Windows.Forms.CheckBox();
this.tmrSyncDateTime = new System.Windows.Forms.Timer(this.components);
this.tlpMain.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
this.tableLayoutPanel5.SuspendLayout();
@ -143,9 +165,16 @@ namespace Mesen.GUI.Forms.Config
((System.ComponentModel.ISupportInitialize)(this.nudNsfAutoDetectSilenceDelay)).BeginInit();
this.flowLayoutPanel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudNsfMoveToNextTrackTime)).BeginInit();
this.tpgFileAssociations.SuspendLayout();
this.tpgFiles.SuspendLayout();
this.tableLayoutPanel6.SuspendLayout();
this.grpPathOverrides.SuspendLayout();
this.tableLayoutPanel10.SuspendLayout();
this.grpFileAssociations.SuspendLayout();
this.tlpFileFormat.SuspendLayout();
this.grpDataStorageLocation.SuspendLayout();
this.tableLayoutPanel7.SuspendLayout();
this.tableLayoutPanel8.SuspendLayout();
this.tableLayoutPanel9.SuspendLayout();
this.tpgAdvanced.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.flowLayoutPanel6.SuspendLayout();
@ -154,7 +183,7 @@ namespace Mesen.GUI.Forms.Config
//
// baseConfigPanel
//
this.baseConfigPanel.Location = new System.Drawing.Point(0, 375);
this.baseConfigPanel.Location = new System.Drawing.Point(0, 385);
this.baseConfigPanel.Size = new System.Drawing.Size(497, 29);
//
// tlpMain
@ -192,7 +221,7 @@ namespace Mesen.GUI.Forms.Config
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.Size = new System.Drawing.Size(483, 343);
this.tlpMain.Size = new System.Drawing.Size(483, 353);
this.tlpMain.TabIndex = 1;
//
// lblPauseBackgroundSettings
@ -356,7 +385,7 @@ namespace Mesen.GUI.Forms.Config
this.tableLayoutPanel5.Controls.Add(this.btnOpenMesenFolder, 0, 0);
this.tableLayoutPanel5.Controls.Add(this.btnResetSettings, 2, 0);
this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel5.Location = new System.Drawing.Point(0, 314);
this.tableLayoutPanel5.Location = new System.Drawing.Point(0, 324);
this.tableLayoutPanel5.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel5.Name = "tableLayoutPanel5";
this.tableLayoutPanel5.RowCount = 1;
@ -392,13 +421,13 @@ namespace Mesen.GUI.Forms.Config
this.tabMain.Controls.Add(this.tpgShortcuts);
this.tabMain.Controls.Add(this.tpgSaveData);
this.tabMain.Controls.Add(this.tpgNsf);
this.tabMain.Controls.Add(this.tpgFileAssociations);
this.tabMain.Controls.Add(this.tpgFiles);
this.tabMain.Controls.Add(this.tpgAdvanced);
this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabMain.Location = new System.Drawing.Point(0, 0);
this.tabMain.Name = "tabMain";
this.tabMain.SelectedIndex = 0;
this.tabMain.Size = new System.Drawing.Size(497, 375);
this.tabMain.Size = new System.Drawing.Size(497, 385);
this.tabMain.TabIndex = 2;
//
// tpgGeneral
@ -407,7 +436,7 @@ namespace Mesen.GUI.Forms.Config
this.tpgGeneral.Location = new System.Drawing.Point(4, 22);
this.tpgGeneral.Name = "tpgGeneral";
this.tpgGeneral.Padding = new System.Windows.Forms.Padding(3);
this.tpgGeneral.Size = new System.Drawing.Size(489, 349);
this.tpgGeneral.Size = new System.Drawing.Size(489, 359);
this.tpgGeneral.TabIndex = 0;
this.tpgGeneral.Text = "General";
this.tpgGeneral.UseVisualStyleBackColor = true;
@ -418,7 +447,7 @@ namespace Mesen.GUI.Forms.Config
this.tpgShortcuts.Location = new System.Drawing.Point(4, 22);
this.tpgShortcuts.Name = "tpgShortcuts";
this.tpgShortcuts.Padding = new System.Windows.Forms.Padding(3);
this.tpgShortcuts.Size = new System.Drawing.Size(479, 349);
this.tpgShortcuts.Size = new System.Drawing.Size(489, 359);
this.tpgShortcuts.TabIndex = 7;
this.tpgShortcuts.Text = "Shortcut Keys";
this.tpgShortcuts.UseVisualStyleBackColor = true;
@ -428,7 +457,7 @@ namespace Mesen.GUI.Forms.Config
this.ctrlEmulatorShortcuts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlEmulatorShortcuts.Location = new System.Drawing.Point(3, 3);
this.ctrlEmulatorShortcuts.Name = "ctrlEmulatorShortcuts";
this.ctrlEmulatorShortcuts.Size = new System.Drawing.Size(473, 343);
this.ctrlEmulatorShortcuts.Size = new System.Drawing.Size(483, 353);
this.ctrlEmulatorShortcuts.TabIndex = 0;
//
// tpgSaveData
@ -437,7 +466,7 @@ namespace Mesen.GUI.Forms.Config
this.tpgSaveData.Location = new System.Drawing.Point(4, 22);
this.tpgSaveData.Name = "tpgSaveData";
this.tpgSaveData.Padding = new System.Windows.Forms.Padding(3);
this.tpgSaveData.Size = new System.Drawing.Size(479, 349);
this.tpgSaveData.Size = new System.Drawing.Size(489, 359);
this.tpgSaveData.TabIndex = 3;
this.tpgSaveData.Text = "Save Data";
this.tpgSaveData.UseVisualStyleBackColor = true;
@ -454,7 +483,7 @@ namespace Mesen.GUI.Forms.Config
this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(473, 343);
this.tableLayoutPanel3.Size = new System.Drawing.Size(483, 353);
this.tableLayoutPanel3.TabIndex = 1;
//
// grpCloudSaves
@ -463,7 +492,7 @@ namespace Mesen.GUI.Forms.Config
this.grpCloudSaves.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpCloudSaves.Location = new System.Drawing.Point(3, 76);
this.grpCloudSaves.Name = "grpCloudSaves";
this.grpCloudSaves.Size = new System.Drawing.Size(467, 264);
this.grpCloudSaves.Size = new System.Drawing.Size(477, 274);
this.grpCloudSaves.TabIndex = 2;
this.grpCloudSaves.TabStop = false;
this.grpCloudSaves.Text = "Cloud Saves";
@ -480,7 +509,7 @@ namespace Mesen.GUI.Forms.Config
this.tlpCloudSaves.RowCount = 2;
this.tlpCloudSaves.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpCloudSaves.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpCloudSaves.Size = new System.Drawing.Size(461, 245);
this.tlpCloudSaves.Size = new System.Drawing.Size(471, 255);
this.tlpCloudSaves.TabIndex = 0;
//
// tlpCloudSaveDesc
@ -496,7 +525,7 @@ namespace Mesen.GUI.Forms.Config
this.tlpCloudSaveDesc.RowCount = 2;
this.tlpCloudSaveDesc.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpCloudSaveDesc.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpCloudSaveDesc.Size = new System.Drawing.Size(461, 100);
this.tlpCloudSaveDesc.Size = new System.Drawing.Size(471, 100);
this.tlpCloudSaveDesc.TabIndex = 0;
//
// lblGoogleDriveIntegration
@ -504,7 +533,7 @@ namespace Mesen.GUI.Forms.Config
this.lblGoogleDriveIntegration.AutoSize = true;
this.lblGoogleDriveIntegration.Location = new System.Drawing.Point(3, 0);
this.lblGoogleDriveIntegration.Name = "lblGoogleDriveIntegration";
this.lblGoogleDriveIntegration.Size = new System.Drawing.Size(455, 52);
this.lblGoogleDriveIntegration.Size = new System.Drawing.Size(464, 52);
this.lblGoogleDriveIntegration.TabIndex = 0;
this.lblGoogleDriveIntegration.Text = resources.GetString("lblGoogleDriveIntegration.Text");
this.lblGoogleDriveIntegration.UseWaitCursor = true;
@ -535,7 +564,7 @@ namespace Mesen.GUI.Forms.Config
this.tlpCloudSaveEnabled.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpCloudSaveEnabled.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpCloudSaveEnabled.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpCloudSaveEnabled.Size = new System.Drawing.Size(461, 145);
this.tlpCloudSaveEnabled.Size = new System.Drawing.Size(471, 237);
this.tlpCloudSaveEnabled.TabIndex = 1;
//
// btnDisableIntegration
@ -556,7 +585,7 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel3.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel3.Name = "flowLayoutPanel3";
this.flowLayoutPanel3.Size = new System.Drawing.Size(461, 22);
this.flowLayoutPanel3.Size = new System.Drawing.Size(471, 22);
this.flowLayoutPanel3.TabIndex = 1;
//
// picOK
@ -631,7 +660,7 @@ namespace Mesen.GUI.Forms.Config
this.grpAutomaticSaves.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpAutomaticSaves.Location = new System.Drawing.Point(3, 3);
this.grpAutomaticSaves.Name = "grpAutomaticSaves";
this.grpAutomaticSaves.Size = new System.Drawing.Size(467, 67);
this.grpAutomaticSaves.Size = new System.Drawing.Size(477, 67);
this.grpAutomaticSaves.TabIndex = 3;
this.grpAutomaticSaves.TabStop = false;
this.grpAutomaticSaves.Text = "Automatic Save States";
@ -649,7 +678,7 @@ namespace Mesen.GUI.Forms.Config
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(461, 48);
this.tableLayoutPanel4.Size = new System.Drawing.Size(471, 48);
this.tableLayoutPanel4.TabIndex = 0;
//
// chkAutoSaveNotify
@ -673,7 +702,7 @@ namespace Mesen.GUI.Forms.Config
this.flpAutoSave.Location = new System.Drawing.Point(0, 0);
this.flpAutoSave.Margin = new System.Windows.Forms.Padding(0);
this.flpAutoSave.Name = "flpAutoSave";
this.flpAutoSave.Size = new System.Drawing.Size(461, 23);
this.flpAutoSave.Size = new System.Drawing.Size(471, 23);
this.flpAutoSave.TabIndex = 0;
//
// chkAutoSave
@ -726,7 +755,7 @@ namespace Mesen.GUI.Forms.Config
this.tpgNsf.Location = new System.Drawing.Point(4, 22);
this.tpgNsf.Name = "tpgNsf";
this.tpgNsf.Padding = new System.Windows.Forms.Padding(3);
this.tpgNsf.Size = new System.Drawing.Size(479, 349);
this.tpgNsf.Size = new System.Drawing.Size(489, 359);
this.tpgNsf.TabIndex = 4;
this.tpgNsf.Text = "NSF";
this.tpgNsf.UseVisualStyleBackColor = true;
@ -745,7 +774,7 @@ namespace Mesen.GUI.Forms.Config
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(473, 343);
this.tableLayoutPanel2.Size = new System.Drawing.Size(483, 353);
this.tableLayoutPanel2.TabIndex = 0;
//
// flowLayoutPanel7
@ -757,7 +786,7 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel7.Name = "flowLayoutPanel7";
this.flowLayoutPanel7.Size = new System.Drawing.Size(473, 24);
this.flowLayoutPanel7.Size = new System.Drawing.Size(483, 24);
this.flowLayoutPanel7.TabIndex = 5;
//
// chkNsfAutoDetectSilence
@ -814,7 +843,7 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel5.Location = new System.Drawing.Point(0, 24);
this.flowLayoutPanel5.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel5.Name = "flowLayoutPanel5";
this.flowLayoutPanel5.Size = new System.Drawing.Size(473, 24);
this.flowLayoutPanel5.Size = new System.Drawing.Size(483, 24);
this.flowLayoutPanel5.TabIndex = 4;
//
// chkNsfMoveToNextTrackAfterTime
@ -863,24 +892,239 @@ namespace Mesen.GUI.Forms.Config
this.chkNsfDisableApuIrqs.Text = "Disable APU IRQs (Recommended)";
this.chkNsfDisableApuIrqs.UseVisualStyleBackColor = true;
//
// tpgFileAssociations
// tpgFiles
//
this.tpgFileAssociations.Controls.Add(this.grpFileAssociations);
this.tpgFileAssociations.Location = new System.Drawing.Point(4, 22);
this.tpgFileAssociations.Name = "tpgFileAssociations";
this.tpgFileAssociations.Padding = new System.Windows.Forms.Padding(3);
this.tpgFileAssociations.Size = new System.Drawing.Size(489, 349);
this.tpgFileAssociations.TabIndex = 2;
this.tpgFileAssociations.Text = "File Associations";
this.tpgFileAssociations.UseVisualStyleBackColor = true;
this.tpgFiles.Controls.Add(this.tableLayoutPanel6);
this.tpgFiles.Location = new System.Drawing.Point(4, 22);
this.tpgFiles.Name = "tpgFiles";
this.tpgFiles.Padding = new System.Windows.Forms.Padding(3);
this.tpgFiles.Size = new System.Drawing.Size(489, 359);
this.tpgFiles.TabIndex = 2;
this.tpgFiles.Text = "Folders/Files";
this.tpgFiles.UseVisualStyleBackColor = true;
//
// tableLayoutPanel6
//
this.tableLayoutPanel6.ColumnCount = 1;
this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel6.Controls.Add(this.grpPathOverrides, 0, 2);
this.tableLayoutPanel6.Controls.Add(this.grpFileAssociations, 0, 0);
this.tableLayoutPanel6.Controls.Add(this.grpDataStorageLocation, 0, 1);
this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel6.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel6.Name = "tableLayoutPanel6";
this.tableLayoutPanel6.RowCount = 4;
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel6.Size = new System.Drawing.Size(483, 353);
this.tableLayoutPanel6.TabIndex = 13;
//
// grpPathOverrides
//
this.grpPathOverrides.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.grpPathOverrides.Controls.Add(this.tableLayoutPanel10);
this.grpPathOverrides.Location = new System.Drawing.Point(3, 198);
this.grpPathOverrides.Name = "grpPathOverrides";
this.grpPathOverrides.Size = new System.Drawing.Size(477, 154);
this.grpPathOverrides.TabIndex = 15;
this.grpPathOverrides.TabStop = false;
this.grpPathOverrides.Text = "Folder Overrides";
//
// tableLayoutPanel10
//
this.tableLayoutPanel10.ColumnCount = 2;
this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel10.Controls.Add(this.psWave, 1, 0);
this.tableLayoutPanel10.Controls.Add(this.psMovies, 1, 1);
this.tableLayoutPanel10.Controls.Add(this.psSaveData, 1, 2);
this.tableLayoutPanel10.Controls.Add(this.psSaveStates, 1, 3);
this.tableLayoutPanel10.Controls.Add(this.psScreenshots, 1, 4);
this.tableLayoutPanel10.Controls.Add(this.psAvi, 1, 5);
this.tableLayoutPanel10.Controls.Add(this.chkAviOverride, 0, 5);
this.tableLayoutPanel10.Controls.Add(this.chkScreenshotsOverride, 0, 4);
this.tableLayoutPanel10.Controls.Add(this.chkSaveDataOverride, 0, 2);
this.tableLayoutPanel10.Controls.Add(this.chkWaveOverride, 0, 0);
this.tableLayoutPanel10.Controls.Add(this.chkSaveStatesOverride, 0, 3);
this.tableLayoutPanel10.Controls.Add(this.chkMoviesOverride, 0, 1);
this.tableLayoutPanel10.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel10.Location = new System.Drawing.Point(3, 16);
this.tableLayoutPanel10.Name = "tableLayoutPanel10";
this.tableLayoutPanel10.RowCount = 7;
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel10.Size = new System.Drawing.Size(471, 135);
this.tableLayoutPanel10.TabIndex = 0;
//
// psWave
//
this.psWave.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.psWave.DisabledText = "";
this.psWave.Location = new System.Drawing.Point(94, 0);
this.psWave.Margin = new System.Windows.Forms.Padding(0);
this.psWave.MaximumSize = new System.Drawing.Size(1000, 20);
this.psWave.MinimumSize = new System.Drawing.Size(0, 20);
this.psWave.Name = "psWave";
this.psWave.Size = new System.Drawing.Size(377, 20);
this.psWave.TabIndex = 6;
//
// psMovies
//
this.psMovies.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.psMovies.DisabledText = "";
this.psMovies.Location = new System.Drawing.Point(94, 23);
this.psMovies.Margin = new System.Windows.Forms.Padding(0);
this.psMovies.MaximumSize = new System.Drawing.Size(1000, 20);
this.psMovies.MinimumSize = new System.Drawing.Size(0, 20);
this.psMovies.Name = "psMovies";
this.psMovies.Size = new System.Drawing.Size(377, 20);
this.psMovies.TabIndex = 7;
//
// psSaveData
//
this.psSaveData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.psSaveData.DisabledText = "";
this.psSaveData.Location = new System.Drawing.Point(94, 46);
this.psSaveData.Margin = new System.Windows.Forms.Padding(0);
this.psSaveData.MaximumSize = new System.Drawing.Size(1000, 20);
this.psSaveData.MinimumSize = new System.Drawing.Size(0, 20);
this.psSaveData.Name = "psSaveData";
this.psSaveData.Size = new System.Drawing.Size(377, 20);
this.psSaveData.TabIndex = 8;
//
// psSaveStates
//
this.psSaveStates.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.psSaveStates.DisabledText = "";
this.psSaveStates.Location = new System.Drawing.Point(94, 69);
this.psSaveStates.Margin = new System.Windows.Forms.Padding(0);
this.psSaveStates.MaximumSize = new System.Drawing.Size(1000, 20);
this.psSaveStates.MinimumSize = new System.Drawing.Size(0, 20);
this.psSaveStates.Name = "psSaveStates";
this.psSaveStates.Size = new System.Drawing.Size(377, 20);
this.psSaveStates.TabIndex = 9;
//
// psScreenshots
//
this.psScreenshots.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.psScreenshots.DisabledText = "";
this.psScreenshots.Location = new System.Drawing.Point(94, 92);
this.psScreenshots.Margin = new System.Windows.Forms.Padding(0);
this.psScreenshots.MaximumSize = new System.Drawing.Size(1000, 20);
this.psScreenshots.MinimumSize = new System.Drawing.Size(0, 20);
this.psScreenshots.Name = "psScreenshots";
this.psScreenshots.Size = new System.Drawing.Size(377, 20);
this.psScreenshots.TabIndex = 10;
//
// psAvi
//
this.psAvi.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.psAvi.DisabledText = "";
this.psAvi.Location = new System.Drawing.Point(94, 115);
this.psAvi.Margin = new System.Windows.Forms.Padding(0);
this.psAvi.MaximumSize = new System.Drawing.Size(1000, 20);
this.psAvi.MinimumSize = new System.Drawing.Size(0, 20);
this.psAvi.Name = "psAvi";
this.psAvi.Size = new System.Drawing.Size(377, 20);
this.psAvi.TabIndex = 11;
//
// chkAviOverride
//
this.chkAviOverride.AutoSize = true;
this.chkAviOverride.Location = new System.Drawing.Point(3, 118);
this.chkAviOverride.Name = "chkAviOverride";
this.chkAviOverride.Size = new System.Drawing.Size(61, 17);
this.chkAviOverride.TabIndex = 4;
this.chkAviOverride.Text = "Videos:";
this.chkAviOverride.UseVisualStyleBackColor = true;
this.chkAviOverride.CheckedChanged += new System.EventHandler(this.chkOverride_CheckedChanged);
//
// chkScreenshotsOverride
//
this.chkScreenshotsOverride.AutoSize = true;
this.chkScreenshotsOverride.Location = new System.Drawing.Point(3, 95);
this.chkScreenshotsOverride.Name = "chkScreenshotsOverride";
this.chkScreenshotsOverride.Size = new System.Drawing.Size(88, 17);
this.chkScreenshotsOverride.TabIndex = 3;
this.chkScreenshotsOverride.Text = "Screenshots:";
this.chkScreenshotsOverride.UseVisualStyleBackColor = true;
this.chkScreenshotsOverride.CheckedChanged += new System.EventHandler(this.chkOverride_CheckedChanged);
//
// chkSaveDataOverride
//
this.chkSaveDataOverride.AutoSize = true;
this.chkSaveDataOverride.Location = new System.Drawing.Point(3, 49);
this.chkSaveDataOverride.Name = "chkSaveDataOverride";
this.chkSaveDataOverride.Size = new System.Drawing.Size(80, 17);
this.chkSaveDataOverride.TabIndex = 0;
this.chkSaveDataOverride.Text = "Save Data:";
this.chkSaveDataOverride.UseVisualStyleBackColor = true;
this.chkSaveDataOverride.CheckedChanged += new System.EventHandler(this.chkOverride_CheckedChanged);
//
// chkWaveOverride
//
this.chkWaveOverride.AutoSize = true;
this.chkWaveOverride.Location = new System.Drawing.Point(3, 3);
this.chkWaveOverride.Name = "chkWaveOverride";
this.chkWaveOverride.Size = new System.Drawing.Size(56, 17);
this.chkWaveOverride.TabIndex = 5;
this.chkWaveOverride.Text = "Audio:";
this.chkWaveOverride.UseVisualStyleBackColor = true;
this.chkWaveOverride.CheckedChanged += new System.EventHandler(this.chkOverride_CheckedChanged);
//
// chkSaveStatesOverride
//
this.chkSaveStatesOverride.AutoSize = true;
this.chkSaveStatesOverride.Location = new System.Drawing.Point(3, 72);
this.chkSaveStatesOverride.Name = "chkSaveStatesOverride";
this.chkSaveStatesOverride.Size = new System.Drawing.Size(87, 17);
this.chkSaveStatesOverride.TabIndex = 2;
this.chkSaveStatesOverride.Text = "Save States:";
this.chkSaveStatesOverride.UseVisualStyleBackColor = true;
this.chkSaveStatesOverride.CheckedChanged += new System.EventHandler(this.chkOverride_CheckedChanged);
//
// chkMoviesOverride
//
this.chkMoviesOverride.AutoSize = true;
this.chkMoviesOverride.Location = new System.Drawing.Point(3, 26);
this.chkMoviesOverride.Name = "chkMoviesOverride";
this.chkMoviesOverride.Size = new System.Drawing.Size(63, 17);
this.chkMoviesOverride.TabIndex = 1;
this.chkMoviesOverride.Text = "Movies:";
this.chkMoviesOverride.UseVisualStyleBackColor = true;
this.chkMoviesOverride.CheckedChanged += new System.EventHandler(this.chkOverride_CheckedChanged);
//
// grpFileAssociations
//
this.grpFileAssociations.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.grpFileAssociations.Controls.Add(this.tlpFileFormat);
this.grpFileAssociations.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpFileAssociations.Location = new System.Drawing.Point(3, 3);
this.grpFileAssociations.Name = "grpFileAssociations";
this.grpFileAssociations.Size = new System.Drawing.Size(483, 343);
this.grpFileAssociations.Size = new System.Drawing.Size(477, 86);
this.grpFileAssociations.TabIndex = 12;
this.grpFileAssociations.TabStop = false;
this.grpFileAssociations.Text = "File Associations";
@ -890,13 +1134,12 @@ namespace Mesen.GUI.Forms.Config
this.tlpFileFormat.ColumnCount = 2;
this.tlpFileFormat.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpFileFormat.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpFileFormat.Controls.Add(this.chkNsfeFormat, 0, 4);
this.tlpFileFormat.Controls.Add(this.chkNesFormat, 0, 0);
this.tlpFileFormat.Controls.Add(this.chkFdsFormat, 0, 1);
this.tlpFileFormat.Controls.Add(this.chkMmoFormat, 1, 0);
this.tlpFileFormat.Controls.Add(this.chkMstFormat, 1, 1);
this.tlpFileFormat.Controls.Add(this.chkNsfFormat, 0, 3);
this.tlpFileFormat.Controls.Add(this.chkUnfFormat, 0, 2);
this.tlpFileFormat.Controls.Add(this.chkMmoFormat, 1, 2);
this.tlpFileFormat.Controls.Add(this.chkNsfFormat, 1, 0);
this.tlpFileFormat.Controls.Add(this.chkNsfeFormat, 1, 1);
this.tlpFileFormat.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpFileFormat.Location = new System.Drawing.Point(3, 16);
this.tlpFileFormat.Name = "tlpFileFormat";
@ -906,19 +1149,9 @@ namespace Mesen.GUI.Forms.Config
this.tlpFileFormat.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpFileFormat.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpFileFormat.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpFileFormat.Size = new System.Drawing.Size(477, 324);
this.tlpFileFormat.Size = new System.Drawing.Size(471, 67);
this.tlpFileFormat.TabIndex = 0;
//
// chkNsfeFormat
//
this.chkNsfeFormat.AutoSize = true;
this.chkNsfeFormat.Location = new System.Drawing.Point(3, 95);
this.chkNsfeFormat.Name = "chkNsfeFormat";
this.chkNsfeFormat.Size = new System.Drawing.Size(226, 17);
this.chkNsfeFormat.TabIndex = 15;
this.chkNsfeFormat.Text = ".NSFE (Nintendo Sound Format Extended)";
this.chkNsfeFormat.UseVisualStyleBackColor = true;
//
// chkNesFormat
//
this.chkNesFormat.AutoSize = true;
@ -939,37 +1172,6 @@ namespace Mesen.GUI.Forms.Config
this.chkFdsFormat.Text = ".FDS (Famicom Disk System)";
this.chkFdsFormat.UseVisualStyleBackColor = true;
//
// chkMmoFormat
//
this.chkMmoFormat.AutoSize = true;
this.chkMmoFormat.Location = new System.Drawing.Point(241, 3);
this.chkMmoFormat.Name = "chkMmoFormat";
this.chkMmoFormat.Size = new System.Drawing.Size(133, 17);
this.chkMmoFormat.TabIndex = 11;
this.chkMmoFormat.Text = ".MMO (Mesen Movies)";
this.chkMmoFormat.UseVisualStyleBackColor = true;
//
// chkMstFormat
//
this.chkMstFormat.AutoSize = true;
this.chkMstFormat.Enabled = false;
this.chkMstFormat.Location = new System.Drawing.Point(241, 26);
this.chkMstFormat.Name = "chkMstFormat";
this.chkMstFormat.Size = new System.Drawing.Size(144, 17);
this.chkMstFormat.TabIndex = 13;
this.chkMstFormat.Text = ".MST (Mesen Savestate)";
this.chkMstFormat.UseVisualStyleBackColor = true;
//
// chkNsfFormat
//
this.chkNsfFormat.AutoSize = true;
this.chkNsfFormat.Location = new System.Drawing.Point(3, 72);
this.chkNsfFormat.Name = "chkNsfFormat";
this.chkNsfFormat.Size = new System.Drawing.Size(171, 17);
this.chkNsfFormat.TabIndex = 14;
this.chkNsfFormat.Text = ".NSF (Nintendo Sound Format)";
this.chkNsfFormat.UseVisualStyleBackColor = true;
//
// chkUnfFormat
//
this.chkUnfFormat.AutoSize = true;
@ -980,13 +1182,153 @@ namespace Mesen.GUI.Forms.Config
this.chkUnfFormat.Text = ".UNF (UNIF)";
this.chkUnfFormat.UseVisualStyleBackColor = true;
//
// chkMmoFormat
//
this.chkMmoFormat.AutoSize = true;
this.chkMmoFormat.Location = new System.Drawing.Point(238, 49);
this.chkMmoFormat.Name = "chkMmoFormat";
this.chkMmoFormat.Size = new System.Drawing.Size(133, 17);
this.chkMmoFormat.TabIndex = 11;
this.chkMmoFormat.Text = ".MMO (Mesen Movies)";
this.chkMmoFormat.UseVisualStyleBackColor = true;
//
// chkNsfFormat
//
this.chkNsfFormat.AutoSize = true;
this.chkNsfFormat.Location = new System.Drawing.Point(238, 3);
this.chkNsfFormat.Name = "chkNsfFormat";
this.chkNsfFormat.Size = new System.Drawing.Size(171, 17);
this.chkNsfFormat.TabIndex = 14;
this.chkNsfFormat.Text = ".NSF (Nintendo Sound Format)";
this.chkNsfFormat.UseVisualStyleBackColor = true;
//
// chkNsfeFormat
//
this.chkNsfeFormat.AutoSize = true;
this.chkNsfeFormat.Location = new System.Drawing.Point(238, 26);
this.chkNsfeFormat.Name = "chkNsfeFormat";
this.chkNsfeFormat.Size = new System.Drawing.Size(226, 17);
this.chkNsfeFormat.TabIndex = 15;
this.chkNsfeFormat.Text = ".NSFE (Nintendo Sound Format Extended)";
this.chkNsfeFormat.UseVisualStyleBackColor = true;
//
// grpDataStorageLocation
//
this.grpDataStorageLocation.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.grpDataStorageLocation.Controls.Add(this.tableLayoutPanel7);
this.grpDataStorageLocation.Location = new System.Drawing.Point(3, 95);
this.grpDataStorageLocation.Name = "grpDataStorageLocation";
this.grpDataStorageLocation.Size = new System.Drawing.Size(477, 97);
this.grpDataStorageLocation.TabIndex = 14;
this.grpDataStorageLocation.TabStop = false;
this.grpDataStorageLocation.Text = "Data Storage Location";
//
// tableLayoutPanel7
//
this.tableLayoutPanel7.ColumnCount = 1;
this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel7.Controls.Add(this.tableLayoutPanel8, 0, 0);
this.tableLayoutPanel7.Controls.Add(this.tableLayoutPanel9, 0, 1);
this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 16);
this.tableLayoutPanel7.Name = "tableLayoutPanel7";
this.tableLayoutPanel7.RowCount = 3;
this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel7.Size = new System.Drawing.Size(471, 78);
this.tableLayoutPanel7.TabIndex = 13;
//
// tableLayoutPanel8
//
this.tableLayoutPanel8.ColumnCount = 1;
this.tableLayoutPanel8.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel8.Controls.Add(this.radStorageDocuments, 0, 0);
this.tableLayoutPanel8.Controls.Add(this.radStoragePortable, 0, 1);
this.tableLayoutPanel8.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel8.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel8.Name = "tableLayoutPanel8";
this.tableLayoutPanel8.RowCount = 2;
this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel8.Size = new System.Drawing.Size(465, 47);
this.tableLayoutPanel8.TabIndex = 0;
//
// radStorageDocuments
//
this.radStorageDocuments.AutoSize = true;
this.radStorageDocuments.Checked = true;
this.radStorageDocuments.Cursor = System.Windows.Forms.Cursors.Default;
this.radStorageDocuments.Location = new System.Drawing.Point(3, 3);
this.radStorageDocuments.Name = "radStorageDocuments";
this.radStorageDocuments.Size = new System.Drawing.Size(197, 17);
this.radStorageDocuments.TabIndex = 0;
this.radStorageDocuments.TabStop = true;
this.radStorageDocuments.Text = "Store Mesen\'s data in my user profile";
this.radStorageDocuments.UseVisualStyleBackColor = true;
this.radStorageDocuments.CheckedChanged += new System.EventHandler(this.radStorageDocuments_CheckedChanged);
//
// radStoragePortable
//
this.radStoragePortable.AutoSize = true;
this.radStoragePortable.Cursor = System.Windows.Forms.Cursors.Default;
this.radStoragePortable.Location = new System.Drawing.Point(3, 26);
this.radStoragePortable.Name = "radStoragePortable";
this.radStoragePortable.Size = new System.Drawing.Size(288, 17);
this.radStoragePortable.TabIndex = 1;
this.radStoragePortable.Text = "Store Mesen\'s data in the same folder as the application";
this.radStoragePortable.UseVisualStyleBackColor = true;
this.radStoragePortable.CheckedChanged += new System.EventHandler(this.radStorageDocuments_CheckedChanged);
//
// tableLayoutPanel9
//
this.tableLayoutPanel9.AutoSize = true;
this.tableLayoutPanel9.ColumnCount = 2;
this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel9.Controls.Add(this.lblLocation, 1, 0);
this.tableLayoutPanel9.Controls.Add(this.lblDataLocation, 0, 0);
this.tableLayoutPanel9.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel9.Location = new System.Drawing.Point(3, 56);
this.tableLayoutPanel9.Name = "tableLayoutPanel9";
this.tableLayoutPanel9.Padding = new System.Windows.Forms.Padding(0, 5, 0, 0);
this.tableLayoutPanel9.RowCount = 1;
this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel9.Size = new System.Drawing.Size(465, 18);
this.tableLayoutPanel9.TabIndex = 39;
//
// lblLocation
//
this.lblLocation.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLocation.ForeColor = System.Drawing.SystemColors.ControlText;
this.lblLocation.Location = new System.Drawing.Point(60, 5);
this.lblLocation.Name = "lblLocation";
this.lblLocation.Size = new System.Drawing.Size(402, 13);
this.lblLocation.TabIndex = 1;
this.lblLocation.Text = "....";
//
// lblDataLocation
//
this.lblDataLocation.AutoSize = true;
this.lblDataLocation.Location = new System.Drawing.Point(3, 5);
this.lblDataLocation.Name = "lblDataLocation";
this.lblDataLocation.Size = new System.Drawing.Size(51, 13);
this.lblDataLocation.TabIndex = 0;
this.lblDataLocation.Text = "Folder:";
//
// tpgAdvanced
//
this.tpgAdvanced.Controls.Add(this.tableLayoutPanel1);
this.tpgAdvanced.Location = new System.Drawing.Point(4, 22);
this.tpgAdvanced.Name = "tpgAdvanced";
this.tpgAdvanced.Padding = new System.Windows.Forms.Padding(3);
this.tpgAdvanced.Size = new System.Drawing.Size(489, 349);
this.tpgAdvanced.Size = new System.Drawing.Size(489, 359);
this.tpgAdvanced.TabIndex = 1;
this.tpgAdvanced.Text = "Advanced";
this.tpgAdvanced.UseVisualStyleBackColor = true;
@ -1030,9 +1372,31 @@ namespace Mesen.GUI.Forms.Config
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(483, 343);
this.tableLayoutPanel1.Size = new System.Drawing.Size(483, 353);
this.tableLayoutPanel1.TabIndex = 0;
//
// chkDisableGameSelectionScreen
//
this.chkDisableGameSelectionScreen.AutoSize = true;
this.chkDisableGameSelectionScreen.Location = new System.Drawing.Point(13, 293);
this.chkDisableGameSelectionScreen.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.chkDisableGameSelectionScreen.Name = "chkDisableGameSelectionScreen";
this.chkDisableGameSelectionScreen.Size = new System.Drawing.Size(170, 17);
this.chkDisableGameSelectionScreen.TabIndex = 28;
this.chkDisableGameSelectionScreen.Text = "Disable game selection screen";
this.chkDisableGameSelectionScreen.UseVisualStyleBackColor = true;
//
// chkGameSelectionScreenResetGame
//
this.chkGameSelectionScreenResetGame.AutoSize = true;
this.chkGameSelectionScreenResetGame.Location = new System.Drawing.Point(13, 270);
this.chkGameSelectionScreenResetGame.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.chkGameSelectionScreenResetGame.Name = "chkGameSelectionScreenResetGame";
this.chkGameSelectionScreenResetGame.Size = new System.Drawing.Size(388, 17);
this.chkGameSelectionScreenResetGame.TabIndex = 27;
this.chkGameSelectionScreenResetGame.Text = "Start game from power-on instead of resuming the previous gameplay session";
this.chkGameSelectionScreenResetGame.UseVisualStyleBackColor = true;
//
// chkDisableGameDatabase
//
this.chkDisableGameDatabase.AutoSize = true;
@ -1082,8 +1446,8 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel6.Controls.Add(this.nudRewindBufferSize);
this.flowLayoutPanel6.Controls.Add(this.lblRewindMinutes);
this.flowLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel6.Location = new System.Drawing.Point(0, 313);
this.flowLayoutPanel6.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel6.Location = new System.Drawing.Point(0, 316);
this.flowLayoutPanel6.Margin = new System.Windows.Forms.Padding(0, 3, 0, 0);
this.flowLayoutPanel6.Name = "flowLayoutPanel6";
this.flowLayoutPanel6.Size = new System.Drawing.Size(483, 23);
this.flowLayoutPanel6.TabIndex = 9;
@ -1180,11 +1544,6 @@ namespace Mesen.GUI.Forms.Config
this.chkDisableOsd.Text = "Disable on-screen display (OSD)";
this.chkDisableOsd.UseVisualStyleBackColor = true;
//
// tmrSyncDateTime
//
this.tmrSyncDateTime.Enabled = true;
this.tmrSyncDateTime.Tick += new System.EventHandler(this.tmrSyncDateTime_Tick);
//
// lblFdsSettings
//
this.lblFdsSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -1221,33 +1580,16 @@ namespace Mesen.GUI.Forms.Config
this.lblGameSelectionScreenSettings.TabIndex = 26;
this.lblGameSelectionScreenSettings.Text = "Game Selection Screen Settings";
//
// chkGameSelectionScreenResetGame
// tmrSyncDateTime
//
this.chkGameSelectionScreenResetGame.AutoSize = true;
this.chkGameSelectionScreenResetGame.Location = new System.Drawing.Point(13, 270);
this.chkGameSelectionScreenResetGame.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.chkGameSelectionScreenResetGame.Name = "chkGameSelectionScreenResetGame";
this.chkGameSelectionScreenResetGame.Size = new System.Drawing.Size(388, 17);
this.chkGameSelectionScreenResetGame.TabIndex = 27;
this.chkGameSelectionScreenResetGame.Text = "Start game from power-on instead of resuming the previous gameplay session";
this.chkGameSelectionScreenResetGame.UseVisualStyleBackColor = true;
//
// chkDisableGameSelectionScreen
//
this.chkDisableGameSelectionScreen.AutoSize = true;
this.chkDisableGameSelectionScreen.Location = new System.Drawing.Point(13, 293);
this.chkDisableGameSelectionScreen.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.chkDisableGameSelectionScreen.Name = "chkDisableGameSelectionScreen";
this.chkDisableGameSelectionScreen.Size = new System.Drawing.Size(170, 17);
this.chkDisableGameSelectionScreen.TabIndex = 28;
this.chkDisableGameSelectionScreen.Text = "Disable game selection screen";
this.chkDisableGameSelectionScreen.UseVisualStyleBackColor = true;
this.tmrSyncDateTime.Enabled = true;
this.tmrSyncDateTime.Tick += new System.EventHandler(this.tmrSyncDateTime_Tick);
//
// frmPreferences
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(497, 404);
this.ClientSize = new System.Drawing.Size(497, 414);
this.Controls.Add(this.tabMain);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
@ -1294,10 +1636,21 @@ namespace Mesen.GUI.Forms.Config
this.flowLayoutPanel5.ResumeLayout(false);
this.flowLayoutPanel5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudNsfMoveToNextTrackTime)).EndInit();
this.tpgFileAssociations.ResumeLayout(false);
this.tpgFiles.ResumeLayout(false);
this.tableLayoutPanel6.ResumeLayout(false);
this.grpPathOverrides.ResumeLayout(false);
this.tableLayoutPanel10.ResumeLayout(false);
this.tableLayoutPanel10.PerformLayout();
this.grpFileAssociations.ResumeLayout(false);
this.tlpFileFormat.ResumeLayout(false);
this.tlpFileFormat.PerformLayout();
this.grpDataStorageLocation.ResumeLayout(false);
this.tableLayoutPanel7.ResumeLayout(false);
this.tableLayoutPanel7.PerformLayout();
this.tableLayoutPanel8.ResumeLayout(false);
this.tableLayoutPanel8.PerformLayout();
this.tableLayoutPanel9.ResumeLayout(false);
this.tableLayoutPanel9.PerformLayout();
this.tpgAdvanced.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
@ -1316,13 +1669,12 @@ namespace Mesen.GUI.Forms.Config
private System.Windows.Forms.CheckBox chkPauseWhenInBackground;
private System.Windows.Forms.TabControl tabMain;
private System.Windows.Forms.TabPage tpgGeneral;
private System.Windows.Forms.TabPage tpgFileAssociations;
private System.Windows.Forms.TabPage tpgFiles;
private System.Windows.Forms.GroupBox grpFileAssociations;
private System.Windows.Forms.TableLayoutPanel tlpFileFormat;
private System.Windows.Forms.CheckBox chkNesFormat;
private System.Windows.Forms.CheckBox chkFdsFormat;
private System.Windows.Forms.CheckBox chkMmoFormat;
private System.Windows.Forms.CheckBox chkMstFormat;
private System.Windows.Forms.CheckBox chkAllowBackgroundInput;
private System.Windows.Forms.CheckBox chkPauseOnMovieEnd;
private System.Windows.Forms.Button btnOpenMesenFolder;
@ -1397,5 +1749,28 @@ namespace Mesen.GUI.Forms.Config
private System.Windows.Forms.Label lblFdsSettings;
private System.Windows.Forms.Label lblUiDisplaySettings;
private System.Windows.Forms.Label lblGameSelectionScreenSettings;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel6;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel7;
private System.Windows.Forms.GroupBox grpDataStorageLocation;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel8;
private System.Windows.Forms.RadioButton radStorageDocuments;
private System.Windows.Forms.RadioButton radStoragePortable;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel9;
private System.Windows.Forms.Label lblLocation;
private System.Windows.Forms.Label lblDataLocation;
private System.Windows.Forms.GroupBox grpPathOverrides;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel10;
private System.Windows.Forms.CheckBox chkSaveStatesOverride;
private System.Windows.Forms.CheckBox chkSaveDataOverride;
private System.Windows.Forms.CheckBox chkMoviesOverride;
private System.Windows.Forms.CheckBox chkScreenshotsOverride;
private System.Windows.Forms.CheckBox chkAviOverride;
private System.Windows.Forms.CheckBox chkWaveOverride;
private ctrlPathSelection psWave;
private ctrlPathSelection psMovies;
private ctrlPathSelection psSaveData;
private ctrlPathSelection psSaveStates;
private ctrlPathSelection psScreenshots;
private ctrlPathSelection psAvi;
}
}

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -28,7 +29,6 @@ namespace Mesen.GUI.Forms.Config
AddBinding("AssociateNesFiles", chkNesFormat);
AddBinding("AssociateFdsFiles", chkFdsFormat);
AddBinding("AssociateMmoFiles", chkMmoFormat);
AddBinding("AssociateMstFiles", chkMstFormat);
AddBinding("AssociateNsfFiles", chkNsfFormat);
AddBinding("AssociateNsfeFiles", chkNsfeFormat);
AddBinding("AssociateUnfFiles", chkUnfFormat);
@ -71,6 +71,25 @@ namespace Mesen.GUI.Forms.Config
AddBinding("ShowVsConfigOnLoad", chkShowVsConfigOnLoad);
AddBinding("AviFolder", psAvi);
AddBinding("MovieFolder", psMovies);
AddBinding("SaveDataFolder", psSaveData);
AddBinding("SaveStateFolder", psSaveStates);
AddBinding("ScreenshotFolder", psScreenshots);
AddBinding("WaveFolder", psWave);
AddBinding("OverrideAviFolder", chkAviOverride);
AddBinding("OverrideMovieFolder", chkMoviesOverride);
AddBinding("OverrideSaveDataFolder", chkSaveDataOverride);
AddBinding("OverrideSaveStateFolder", chkSaveStatesOverride);
AddBinding("OverrideScreenshotFolder", chkScreenshotsOverride);
AddBinding("OverrideWaveFolder", chkWaveOverride);
radStorageDocuments.Checked = ConfigManager.HomeFolder == ConfigManager.DefaultDocumentsFolder;
radStoragePortable.Checked = !radStorageDocuments.Checked;
UpdateLocationText();
UpdateFolderOverrideUi();
UpdateCloudDisplay();
}
@ -171,5 +190,142 @@ namespace Mesen.GUI.Forms.Config
this.Close();
}
}
protected override void OnFormClosing(FormClosingEventArgs e)
{
if(this.DialogResult == DialogResult.OK) {
if(!ValidateFolderSettings()) {
e.Cancel = true;
return;
}
if(radStorageDocuments.Checked != (ConfigManager.HomeFolder == ConfigManager.DefaultDocumentsFolder)) {
//Need to copy files and display confirmation
string targetFolder = radStorageDocuments.Checked ? ConfigManager.DefaultDocumentsFolder : ConfigManager.DefaultPortableFolder;
if(MesenMsgBox.Show("CopyMesenDataPrompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, ConfigManager.HomeFolder, targetFolder) == DialogResult.OK) {
try {
MigrateData(ConfigManager.HomeFolder, targetFolder);
} catch(Exception ex) {
MesenMsgBox.Show("UnexpectedError", MessageBoxButtons.OK, MessageBoxIcon.Error, ex.ToString());
e.Cancel = true;
}
} else {
e.Cancel = true;
return;
}
}
} else {
base.OnFormClosing(e);
}
}
private bool MigrateData(string source, string target)
{
using(frmCopyFiles frm = new frmCopyFiles(source, target)) {
frm.ShowDialog(this);
if(frm.Exception != null) {
throw frm.Exception;
}
}
if(File.Exists(Path.Combine(source, "settings.backup.xml"))) {
File.Delete(Path.Combine(source, "settings.backup.xml"));
}
File.Move(Path.Combine(source, "settings.xml"), Path.Combine(source, "settings.backup.xml"));
ConfigManager.InitHomeFolder();
ConfigManager.SaveConfig();
ConfigManager.RestartMesen(true);
Application.Exit();
return true;
}
private bool ValidateFolderSettings()
{
bool result = true;
List<string> invalidFolders = new List<string>();
try {
if(chkAviOverride.Checked && !CheckFolderPermissions(psAvi.Text)) {
invalidFolders.Add(chkAviOverride.Text.Replace(":", "").Trim());
}
if(chkMoviesOverride.Checked && !CheckFolderPermissions(psMovies.Text)) {
invalidFolders.Add(chkMoviesOverride.Text.Replace(":", "").Trim());
}
if(chkSaveDataOverride.Checked && !CheckFolderPermissions(psSaveData.Text)) {
invalidFolders.Add(chkSaveDataOverride.Text.Replace(":", "").Trim());
}
if(chkSaveStatesOverride.Checked && !CheckFolderPermissions(psSaveStates.Text)) {
invalidFolders.Add(chkSaveStatesOverride.Text.Replace(":", "").Trim());
}
if(chkScreenshotsOverride.Checked && !CheckFolderPermissions(psScreenshots.Text)) {
invalidFolders.Add(chkScreenshotsOverride.Text.Replace(":", "").Trim());
}
if(chkWaveOverride.Checked && !CheckFolderPermissions(psWave.Text)) {
invalidFolders.Add(chkWaveOverride.Text.Replace(":", "").Trim());
}
result = invalidFolders.Count == 0;
} catch {
result = false;
}
if(!result) {
MesenMsgBox.Show("InvalidPaths", MessageBoxButtons.OK, MessageBoxIcon.Error, string.Join(Environment.NewLine, invalidFolders));
}
return result;
}
private bool CheckFolderPermissions(string folder)
{
if(!Directory.Exists(folder)) {
try {
if(string.IsNullOrWhiteSpace(folder)) {
return false;
}
Directory.CreateDirectory(folder);
} catch {
return false;
}
}
try {
File.WriteAllText(Path.Combine(folder, "test.txt"), "");
File.Delete(Path.Combine(folder, "test.txt"));
} catch {
return false;
}
return true;
}
private void UpdateFolderOverrideUi()
{
psAvi.Enabled = chkAviOverride.Checked;
psMovies.Enabled = chkMoviesOverride.Checked;
psSaveData.Enabled = chkSaveDataOverride.Checked;
psSaveStates.Enabled = chkSaveStatesOverride.Checked;
psScreenshots.Enabled = chkScreenshotsOverride.Checked;
psWave.Enabled = chkWaveOverride.Checked;
psAvi.DisabledText = ConfigManager.DefaultAviFolder;
psMovies.DisabledText = ConfigManager.DefaultMovieFolder;
psSaveData.DisabledText = ConfigManager.DefaultSaveDataFolder;
psSaveStates.DisabledText = ConfigManager.DefaultSaveStateFolder;
psScreenshots.DisabledText = ConfigManager.DefaultScreenshotFolder;
psWave.DisabledText = ConfigManager.DefaultWaveFolder;
}
private void UpdateLocationText()
{
lblLocation.Text = radStorageDocuments.Checked ? ConfigManager.DefaultDocumentsFolder : ConfigManager.DefaultPortableFolder;
}
private void chkOverride_CheckedChanged(object sender, EventArgs e)
{
UpdateFolderOverrideUi();
}
private void radStorageDocuments_CheckedChanged(object sender, EventArgs e)
{
UpdateLocationText();
}
}
}

View file

@ -8,6 +8,7 @@ using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using Mesen.GUI.Controls;
using Mesen.GUI.Forms.Config;
namespace Mesen.GUI.Forms
{
@ -69,6 +70,8 @@ namespace Mesen.GUI.Forms
} else {
kvp.Value.Text = (string)value;
}
} else if(kvp.Value is ctrlPathSelection) {
kvp.Value.Text = (string)value;
} else if(kvp.Value is CheckBox) {
((CheckBox)kvp.Value).Checked = Convert.ToBoolean(value);
} else if(kvp.Value is ctrlRiskyOption) {
@ -159,6 +162,8 @@ namespace Mesen.GUI.Forms
value = (object)UInt16.Parse((string)value, numberStyle);
}
field.SetValue(Entity, value);
} else if(kvp.Value is ctrlPathSelection) {
field.SetValue(Entity, ((ctrlPathSelection)kvp.Value).Text);
} else if(kvp.Value is CheckBox) {
if(field.FieldType == typeof(bool)) {
field.SetValue(Entity, ((CheckBox)kvp.Value).Checked);

570
GUI.NET/Forms/frmConfigWizard.Designer.cs generated Normal file
View file

@ -0,0 +1,570 @@
namespace Mesen.GUI.Forms
{
partial class frmConfigWizard
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if(disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.lblMiscOptions = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.lblStorageLocation = new System.Windows.Forms.Label();
this.lblMesen = new System.Windows.Forms.Label();
this.lblConfigWizard = new System.Windows.Forms.Label();
this.lblInputMappings = new System.Windows.Forms.Label();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.picPs4 = new System.Windows.Forms.PictureBox();
this.picXbox = new System.Windows.Forms.PictureBox();
this.picWasd = new System.Windows.Forms.PictureBox();
this.picArrows = new System.Windows.Forms.PictureBox();
this.lblInputHint = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.radStorageDocuments = new System.Windows.Forms.RadioButton();
this.radStoragePortable = new System.Windows.Forms.RadioButton();
this.lblStorageHint = new System.Windows.Forms.Label();
this.btnOk = new System.Windows.Forms.Button();
this.lblInitialSetup = new System.Windows.Forms.Label();
this.chkCreateShortcut = new System.Windows.Forms.CheckBox();
this.lblCancel = new System.Windows.Forms.Label();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.lblLocation = new System.Windows.Forms.Label();
this.lblDataLocation = new System.Windows.Forms.Label();
this.chkXbox = new System.Windows.Forms.CheckBox();
this.chkPs4 = new System.Windows.Forms.CheckBox();
this.chkWasd = new System.Windows.Forms.CheckBox();
this.chkArrows = new System.Windows.Forms.CheckBox();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tableLayoutPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picPs4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picXbox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picWasd)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picArrows)).BeginInit();
this.panel3.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.ActiveBorder;
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Padding = new System.Windows.Forms.Padding(3);
this.panel1.Size = new System.Drawing.Size(420, 484);
this.panel1.TabIndex = 0;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.tableLayoutPanel1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(3, 3);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(414, 478);
this.panel2.TabIndex = 0;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.Controls.Add(this.lblMiscOptions, 0, 10);
this.tableLayoutPanel1.Controls.Add(this.pictureBox1, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.lblStorageLocation, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.lblMesen, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lblConfigWizard, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.lblInputMappings, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel3, 0, 9);
this.tableLayoutPanel1.Controls.Add(this.lblInputHint, 0, 8);
this.tableLayoutPanel1.Controls.Add(this.panel3, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.lblStorageHint, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.btnOk, 1, 13);
this.tableLayoutPanel1.Controls.Add(this.lblInitialSetup, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.chkCreateShortcut, 0, 11);
this.tableLayoutPanel1.Controls.Add(this.lblCancel, 0, 13);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 6);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(10);
this.tableLayoutPanel1.RowCount = 14;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(414, 478);
this.tableLayoutPanel1.TabIndex = 0;
//
// lblMiscOptions
//
this.lblMiscOptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblMiscOptions.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.lblMiscOptions, 2);
this.lblMiscOptions.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblMiscOptions.ForeColor = System.Drawing.SystemColors.WindowFrame;
this.lblMiscOptions.Location = new System.Drawing.Point(10, 396);
this.lblMiscOptions.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.lblMiscOptions.Name = "lblMiscOptions";
this.lblMiscOptions.Size = new System.Drawing.Size(72, 13);
this.lblMiscOptions.TabIndex = 34;
this.lblMiscOptions.Text = "Other Options";
//
// pictureBox1
//
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.pictureBox1.BackgroundImage = global::Mesen.GUI.Properties.Resources.MesenLogo;
this.pictureBox1.Location = new System.Drawing.Point(337, 14);
this.pictureBox1.Name = "pictureBox1";
this.tableLayoutPanel1.SetRowSpan(this.pictureBox1, 2);
this.pictureBox1.Size = new System.Drawing.Size(64, 64);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// lblStorageLocation
//
this.lblStorageLocation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblStorageLocation.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.lblStorageLocation, 2);
this.lblStorageLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblStorageLocation.ForeColor = System.Drawing.SystemColors.WindowFrame;
this.lblStorageLocation.Location = new System.Drawing.Point(10, 124);
this.lblStorageLocation.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.lblStorageLocation.Name = "lblStorageLocation";
this.lblStorageLocation.Size = new System.Drawing.Size(114, 13);
this.lblStorageLocation.TabIndex = 24;
this.lblStorageLocation.Text = "Data Storage Location";
//
// lblMesen
//
this.lblMesen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblMesen.AutoSize = true;
this.lblMesen.Location = new System.Drawing.Point(13, 23);
this.lblMesen.Name = "lblMesen";
this.lblMesen.Size = new System.Drawing.Size(114, 13);
this.lblMesen.TabIndex = 1;
this.lblMesen.Text = "Mesen - NES Emulator";
//
// lblConfigWizard
//
this.lblConfigWizard.AutoSize = true;
this.lblConfigWizard.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblConfigWizard.Location = new System.Drawing.Point(13, 36);
this.lblConfigWizard.Name = "lblConfigWizard";
this.lblConfigWizard.Size = new System.Drawing.Size(184, 24);
this.lblConfigWizard.TabIndex = 1;
this.lblConfigWizard.Text = "Configuration Wizard";
//
// lblInputMappings
//
this.lblInputMappings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblInputMappings.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.lblInputMappings, 2);
this.lblInputMappings.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblInputMappings.ForeColor = System.Drawing.SystemColors.WindowFrame;
this.lblInputMappings.Location = new System.Drawing.Point(10, 252);
this.lblInputMappings.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.lblInputMappings.Name = "lblInputMappings";
this.lblInputMappings.Size = new System.Drawing.Size(80, 13);
this.lblInputMappings.TabIndex = 25;
this.lblInputMappings.Text = "Input Mappings";
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.ColumnCount = 4;
this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel3, 2);
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel3.Controls.Add(this.chkArrows, 3, 1);
this.tableLayoutPanel3.Controls.Add(this.chkWasd, 2, 1);
this.tableLayoutPanel3.Controls.Add(this.chkPs4, 1, 1);
this.tableLayoutPanel3.Controls.Add(this.picPs4, 1, 0);
this.tableLayoutPanel3.Controls.Add(this.picXbox, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.picWasd, 2, 0);
this.tableLayoutPanel3.Controls.Add(this.picArrows, 3, 0);
this.tableLayoutPanel3.Controls.Add(this.chkXbox, 0, 1);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(13, 288);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel3.Size = new System.Drawing.Size(388, 90);
this.tableLayoutPanel3.TabIndex = 28;
//
// picPs4
//
this.picPs4.Cursor = System.Windows.Forms.Cursors.Hand;
this.picPs4.Dock = System.Windows.Forms.DockStyle.Fill;
this.picPs4.Image = global::Mesen.GUI.Properties.Resources.PsIcon;
this.picPs4.Location = new System.Drawing.Point(100, 3);
this.picPs4.Name = "picPs4";
this.picPs4.Size = new System.Drawing.Size(91, 64);
this.picPs4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.picPs4.TabIndex = 26;
this.picPs4.TabStop = false;
this.picPs4.Click += new System.EventHandler(this.picPs4_Click);
//
// picXbox
//
this.picXbox.Cursor = System.Windows.Forms.Cursors.Hand;
this.picXbox.Dock = System.Windows.Forms.DockStyle.Fill;
this.picXbox.Image = global::Mesen.GUI.Properties.Resources.XbIcon;
this.picXbox.Location = new System.Drawing.Point(3, 3);
this.picXbox.Name = "picXbox";
this.picXbox.Size = new System.Drawing.Size(91, 64);
this.picXbox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.picXbox.TabIndex = 27;
this.picXbox.TabStop = false;
this.picXbox.Click += new System.EventHandler(this.picXbox_Click);
//
// picWasd
//
this.picWasd.Cursor = System.Windows.Forms.Cursors.Hand;
this.picWasd.Dock = System.Windows.Forms.DockStyle.Fill;
this.picWasd.Image = global::Mesen.GUI.Properties.Resources.WasdKeys;
this.picWasd.Location = new System.Drawing.Point(197, 3);
this.picWasd.Name = "picWasd";
this.picWasd.Size = new System.Drawing.Size(91, 64);
this.picWasd.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.picWasd.TabIndex = 28;
this.picWasd.TabStop = false;
this.picWasd.Click += new System.EventHandler(this.picWasd_Click);
//
// picArrows
//
this.picArrows.Cursor = System.Windows.Forms.Cursors.Hand;
this.picArrows.Dock = System.Windows.Forms.DockStyle.Fill;
this.picArrows.Image = global::Mesen.GUI.Properties.Resources.ArrowKeys;
this.picArrows.Location = new System.Drawing.Point(294, 3);
this.picArrows.Name = "picArrows";
this.picArrows.Size = new System.Drawing.Size(91, 64);
this.picArrows.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.picArrows.TabIndex = 29;
this.picArrows.TabStop = false;
this.picArrows.Click += new System.EventHandler(this.picArrows_Click);
//
// lblInputHint
//
this.lblInputHint.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblInputHint.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.lblInputHint, 2);
this.lblInputHint.Location = new System.Drawing.Point(13, 268);
this.lblInputHint.Name = "lblInputHint";
this.lblInputHint.Size = new System.Drawing.Size(177, 13);
this.lblInputHint.TabIndex = 29;
this.lblInputHint.Text = "Select your preferred input methods:";
//
// panel3
//
this.tableLayoutPanel1.SetColumnSpan(this.panel3, 2);
this.panel3.Controls.Add(this.tableLayoutPanel4);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(10, 157);
this.panel3.Margin = new System.Windows.Forms.Padding(0);
this.panel3.Name = "panel3";
this.panel3.Padding = new System.Windows.Forms.Padding(8, 0, 0, 0);
this.panel3.Size = new System.Drawing.Size(394, 50);
this.panel3.TabIndex = 30;
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.ColumnCount = 1;
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.Controls.Add(this.radStorageDocuments, 0, 0);
this.tableLayoutPanel4.Controls.Add(this.radStoragePortable, 0, 1);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(8, 0);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 2;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(386, 50);
this.tableLayoutPanel4.TabIndex = 0;
//
// radStorageDocuments
//
this.radStorageDocuments.AutoSize = true;
this.radStorageDocuments.Checked = true;
this.radStorageDocuments.Cursor = System.Windows.Forms.Cursors.Hand;
this.radStorageDocuments.Dock = System.Windows.Forms.DockStyle.Fill;
this.radStorageDocuments.Location = new System.Drawing.Point(3, 3);
this.radStorageDocuments.Name = "radStorageDocuments";
this.radStorageDocuments.Size = new System.Drawing.Size(380, 19);
this.radStorageDocuments.TabIndex = 0;
this.radStorageDocuments.TabStop = true;
this.radStorageDocuments.Text = "Store the data in my user profile";
this.radStorageDocuments.UseVisualStyleBackColor = true;
this.radStorageDocuments.CheckedChanged += new System.EventHandler(this.radStorageDocuments_CheckedChanged);
//
// radStoragePortable
//
this.radStoragePortable.AutoSize = true;
this.radStoragePortable.Cursor = System.Windows.Forms.Cursors.Hand;
this.radStoragePortable.Dock = System.Windows.Forms.DockStyle.Fill;
this.radStoragePortable.Location = new System.Drawing.Point(3, 28);
this.radStoragePortable.Name = "radStoragePortable";
this.radStoragePortable.Size = new System.Drawing.Size(380, 19);
this.radStoragePortable.TabIndex = 1;
this.radStoragePortable.Text = "Store the data in the same folder as the application";
this.radStoragePortable.UseVisualStyleBackColor = true;
this.radStoragePortable.CheckedChanged += new System.EventHandler(this.radStoragePortable_CheckedChanged);
//
// lblStorageHint
//
this.lblStorageHint.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblStorageHint.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.lblStorageHint, 2);
this.lblStorageHint.Location = new System.Drawing.Point(13, 140);
this.lblStorageHint.Name = "lblStorageHint";
this.lblStorageHint.Size = new System.Drawing.Size(222, 13);
this.lblStorageHint.TabIndex = 31;
this.lblStorageHint.Text = "Select where you want to store Mesen\'s data:";
//
// btnOk
//
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOk.AutoSize = true;
this.btnOk.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnOk.BackColor = System.Drawing.SystemColors.Control;
this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Location = new System.Drawing.Point(333, 440);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(68, 25);
this.btnOk.TabIndex = 32;
this.btnOk.Text = "CONFIRM";
this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// lblInitialSetup
//
this.lblInitialSetup.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblInitialSetup.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.lblInitialSetup, 2);
this.lblInitialSetup.Location = new System.Drawing.Point(13, 93);
this.lblInitialSetup.Name = "lblInitialSetup";
this.lblInitialSetup.Size = new System.Drawing.Size(262, 13);
this.lblInitialSetup.TabIndex = 33;
this.lblInitialSetup.Text = "Please take a moment to perform Mesen\'s initial setup.";
//
// chkCreateShortcut
//
this.chkCreateShortcut.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkCreateShortcut, 2);
this.chkCreateShortcut.Cursor = System.Windows.Forms.Cursors.Hand;
this.chkCreateShortcut.Location = new System.Drawing.Point(21, 415);
this.chkCreateShortcut.Margin = new System.Windows.Forms.Padding(11, 6, 3, 3);
this.chkCreateShortcut.Name = "chkCreateShortcut";
this.chkCreateShortcut.Size = new System.Drawing.Size(179, 17);
this.chkCreateShortcut.TabIndex = 35;
this.chkCreateShortcut.Text = "Create a shortcut on my desktop";
this.chkCreateShortcut.UseVisualStyleBackColor = true;
//
// lblCancel
//
this.lblCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblCancel.AutoSize = true;
this.lblCancel.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblCancel.ForeColor = System.Drawing.Color.Blue;
this.lblCancel.Location = new System.Drawing.Point(13, 455);
this.lblCancel.Name = "lblCancel";
this.lblCancel.Size = new System.Drawing.Size(40, 13);
this.lblCancel.TabIndex = 36;
this.lblCancel.Text = "Cancel";
this.lblCancel.Click += new System.EventHandler(this.lblCancel_Click);
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel2, 2);
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Controls.Add(this.lblLocation, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.lblDataLocation, 0, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(13, 210);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.Padding = new System.Windows.Forms.Padding(0, 5, 0, 0);
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(388, 39);
this.tableLayoutPanel2.TabIndex = 38;
//
// lblLocation
//
this.lblLocation.AutoSize = true;
this.lblLocation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLocation.ForeColor = System.Drawing.SystemColors.ControlText;
this.lblLocation.Location = new System.Drawing.Point(48, 5);
this.lblLocation.Name = "lblLocation";
this.lblLocation.Size = new System.Drawing.Size(19, 13);
this.lblLocation.TabIndex = 1;
this.lblLocation.Text = "....";
//
// lblDataLocation
//
this.lblDataLocation.AutoSize = true;
this.lblDataLocation.Location = new System.Drawing.Point(3, 5);
this.lblDataLocation.Name = "lblDataLocation";
this.lblDataLocation.Size = new System.Drawing.Size(39, 13);
this.lblDataLocation.TabIndex = 0;
this.lblDataLocation.Text = "Folder:";
//
// chkXbox
//
this.chkXbox.AutoSize = true;
this.chkXbox.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.chkXbox.Checked = true;
this.chkXbox.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkXbox.Dock = System.Windows.Forms.DockStyle.Fill;
this.chkXbox.Location = new System.Drawing.Point(3, 73);
this.chkXbox.Name = "chkXbox";
this.chkXbox.Size = new System.Drawing.Size(91, 14);
this.chkXbox.TabIndex = 30;
this.chkXbox.UseVisualStyleBackColor = true;
//
// chkPs4
//
this.chkPs4.AutoSize = true;
this.chkPs4.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.chkPs4.Dock = System.Windows.Forms.DockStyle.Fill;
this.chkPs4.Location = new System.Drawing.Point(100, 73);
this.chkPs4.Name = "chkPs4";
this.chkPs4.Size = new System.Drawing.Size(91, 14);
this.chkPs4.TabIndex = 31;
this.chkPs4.UseVisualStyleBackColor = true;
//
// chkWasd
//
this.chkWasd.AutoSize = true;
this.chkWasd.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.chkWasd.Dock = System.Windows.Forms.DockStyle.Fill;
this.chkWasd.Location = new System.Drawing.Point(197, 73);
this.chkWasd.Name = "chkWasd";
this.chkWasd.Size = new System.Drawing.Size(91, 14);
this.chkWasd.TabIndex = 32;
this.chkWasd.UseVisualStyleBackColor = true;
this.chkWasd.CheckedChanged += new System.EventHandler(this.chkWasd_CheckedChanged);
//
// chkArrows
//
this.chkArrows.AutoSize = true;
this.chkArrows.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.chkArrows.Checked = true;
this.chkArrows.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkArrows.Dock = System.Windows.Forms.DockStyle.Fill;
this.chkArrows.Location = new System.Drawing.Point(294, 73);
this.chkArrows.Name = "chkArrows";
this.chkArrows.Size = new System.Drawing.Size(91, 14);
this.chkArrows.TabIndex = 33;
this.chkArrows.UseVisualStyleBackColor = true;
this.chkArrows.CheckedChanged += new System.EventHandler(this.chkArrows_CheckedChanged);
//
// frmConfigWizard
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(420, 484);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "frmConfigWizard";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Mesen - Configuration";
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tableLayoutPanel3.ResumeLayout(false);
this.tableLayoutPanel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picPs4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picXbox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picWasd)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picArrows)).EndInit();
this.panel3.ResumeLayout(false);
this.tableLayoutPanel4.ResumeLayout(false);
this.tableLayoutPanel4.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label lblMesen;
private System.Windows.Forms.Label lblConfigWizard;
private System.Windows.Forms.Label lblStorageLocation;
private System.Windows.Forms.Label lblInputMappings;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.PictureBox picPs4;
private System.Windows.Forms.PictureBox picXbox;
private System.Windows.Forms.PictureBox picWasd;
private System.Windows.Forms.PictureBox picArrows;
private System.Windows.Forms.Label lblInputHint;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.RadioButton radStorageDocuments;
private System.Windows.Forms.RadioButton radStoragePortable;
private System.Windows.Forms.Label lblStorageHint;
private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.Label lblInitialSetup;
private System.Windows.Forms.Label lblMiscOptions;
private System.Windows.Forms.CheckBox chkCreateShortcut;
private System.Windows.Forms.Label lblCancel;
private System.Windows.Forms.Label lblDataLocation;
private System.Windows.Forms.Label lblLocation;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.CheckBox chkArrows;
private System.Windows.Forms.CheckBox chkWasd;
private System.Windows.Forms.CheckBox chkPs4;
private System.Windows.Forms.CheckBox chkXbox;
}
}

View file

@ -0,0 +1,140 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Text;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Mesen.GUI.Config;
namespace Mesen.GUI.Forms
{
public partial class frmConfigWizard : BaseForm
{
private PrivateFontCollection _fonts = new PrivateFontCollection();
public frmConfigWizard()
{
InitializeComponent();
lblLocation.Text = ConfigManager.DefaultDocumentsFolder;
lblLocation.ForeColor = Color.FromArgb(61,125,255);
lblCancel.ForeColor = Color.FromArgb(61, 125, 255);
}
private void InitializeConfig()
{
ConfigManager.CreateConfig(radStoragePortable.Checked);
DefaultKeyMappingType mappingType = DefaultKeyMappingType.None;
if(chkXbox.Checked) {
mappingType |= DefaultKeyMappingType.Xbox;
}
if(chkPs4.Checked) {
mappingType |= DefaultKeyMappingType.Ps4;
}
if(chkWasd.Checked) {
mappingType |= DefaultKeyMappingType.WasdKeys;
}
if(chkArrows.Checked) {
mappingType |= DefaultKeyMappingType.ArrowKeys;
}
ConfigManager.Config.InputInfo.DefaultMapping = mappingType;
ConfigManager.ApplyChanges();
if(chkCreateShortcut.Checked) {
this.CreateShortcut();
}
}
private void CreateShortcut()
{
if(Program.IsMono) {
//TODO
} else {
Type t = Type.GetTypeFromCLSID(new Guid("72C24DD5-D70A-438B-8A42-98424B88AFB8"));
dynamic shell = Activator.CreateInstance(t);
try {
string linkPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "Mesen.lnk");
var lnk = shell.CreateShortcut(linkPath);
try {
lnk.TargetPath = Assembly.GetEntryAssembly().Location;
lnk.IconLocation = Assembly.GetEntryAssembly().Location + ", 0";
lnk.Save();
} finally {
Marshal.FinalReleaseComObject(lnk);
}
} finally {
Marshal.FinalReleaseComObject(shell);
}
}
}
private void picXbox_Click(object sender, EventArgs e)
{
chkXbox.Checked = !chkXbox.Checked;
}
private void picPs4_Click(object sender, EventArgs e)
{
chkPs4.Checked = !chkPs4.Checked;
}
private void picWasd_Click(object sender, EventArgs e)
{
chkWasd.Checked = !chkWasd.Checked;
if(chkWasd.Checked) {
chkArrows.Checked = false;
}
}
private void picArrows_Click(object sender, EventArgs e)
{
chkArrows.Checked = !chkArrows.Checked;
if(chkArrows.Checked) {
chkWasd.Checked = false;
}
}
private void chkWasd_CheckedChanged(object sender, EventArgs e)
{
if(chkWasd.Checked) {
chkArrows.Checked = false;
}
}
private void chkArrows_CheckedChanged(object sender, EventArgs e)
{
if(chkArrows.Checked) {
chkWasd.Checked = false;
}
}
private void btnOk_Click(object sender, EventArgs e)
{
this.InitializeConfig();
this.Close();
}
private void lblCancel_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void radStoragePortable_CheckedChanged(object sender, EventArgs e)
{
lblLocation.Text = ConfigManager.DefaultPortableFolder;
}
private void radStorageDocuments_CheckedChanged(object sender, EventArgs e)
{
lblLocation.Text = ConfigManager.DefaultDocumentsFolder;
}
}
}

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -61,6 +61,9 @@ namespace Mesen.GUI.Forms
if(ConfigManager.Config.WindowLocation.HasValue) {
this.StartPosition = FormStartPosition.Manual;
this.Location = ConfigManager.Config.WindowLocation.Value;
} else {
//First launch
this.StartPosition = FormStartPosition.CenterScreen;
}
Version currentVersion = new Version(InteropEmu.GetMesenVersion());
@ -249,7 +252,6 @@ namespace Mesen.GUI.Forms
ConfigManager.Config.InitializeDefaults();
ConfigManager.ApplyChanges();
ConfigManager.Config.ApplyConfig();
UpdateEmulationFlags();

View file

@ -543,6 +543,12 @@
<Compile Include="Forms\Config\ctrlInputPortConfig.Designer.cs">
<DependentUpon>ctrlInputPortConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Config\ctrlPathSelection.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\Config\ctrlPathSelection.Designer.cs">
<DependentUpon>ctrlPathSelection.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Config\ctrlStandardController.cs">
<SubType>UserControl</SubType>
</Compile>
@ -555,6 +561,12 @@
<Compile Include="Forms\Config\frmControllerConfig.Designer.cs">
<DependentUpon>frmControllerConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Config\frmCopyFiles.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\Config\frmCopyFiles.Designer.cs">
<DependentUpon>frmCopyFiles.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Config\frmGetKey.cs">
<SubType>Form</SubType>
</Compile>
@ -616,6 +628,12 @@
<Compile Include="Forms\frmAbout.Designer.cs">
<DependentUpon>frmAbout.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmConfigWizard.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmConfigWizard.Designer.cs">
<DependentUpon>frmConfigWizard.cs</DependentUpon>
</Compile>
<Compile Include="Forms\frmDownloadProgress.cs">
<SubType>Form</SubType>
</Compile>
@ -719,6 +737,10 @@
<Compile Include="ResourceManager.cs" />
<Compile Include="RuntimeChecker.cs" />
<Compile Include="SingleInstance.cs" />
<None Include="Resources\WasdKeys.png" />
<None Include="Resources\wasd.png" />
<None Include="Resources\PsIcon.png" />
<None Include="Resources\XbIcon.png" />
<None Include="Resources\StepBack.png" />
<None Include="Resources\HdPack.png" />
<None Include="Resources\VideoFilter.png" />
@ -857,12 +879,18 @@
<EmbeddedResource Include="Forms\Config\ctrlInputPortConfig.resx">
<DependentUpon>ctrlInputPortConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Config\ctrlPathSelection.resx">
<DependentUpon>ctrlPathSelection.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Config\ctrlStandardController.resx">
<DependentUpon>ctrlStandardController.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Config\frmControllerConfig.resx">
<DependentUpon>frmControllerConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Config\frmCopyFiles.resx">
<DependentUpon>frmCopyFiles.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Config\frmEmulationConfig.resx">
<DependentUpon>frmEmulationConfig.cs</DependentUpon>
</EmbeddedResource>
@ -894,6 +922,9 @@
<EmbeddedResource Include="Forms\frmAbout.resx">
<DependentUpon>frmAbout.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmConfigWizard.resx">
<DependentUpon>frmConfigWizard.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\frmDownloadProgress.resx">
<DependentUpon>frmDownloadProgress.cs</DependentUpon>
</EmbeddedResource>
@ -1056,6 +1087,7 @@
<None Include="Resources\Breakpoint.png" />
<None Include="Resources\BreakpointDisabled.png" />
<None Include="Resources\BreakpointEnableDisable.png" />
<None Include="Resources\ArrowKeys.png" />
<Content Include="Resources\coins.png" />
<None Include="Resources\DipSwitches.png" />
<None Include="Resources\MesenIcon.png" />

View file

@ -28,6 +28,7 @@ namespace Mesen.GUI
[DllImport(DLLPath)] public static extern void LoadROM([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string filename, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string patchFile);
[DllImport(DLLPath)] public static extern void AddKnownGameFolder([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string folder);
[DllImport(DLLPath)] public static extern void SetFolderOverrides([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string saveDataFolder, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string saveStateFolder, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string screenshotFolder);
[DllImport(DLLPath)] public static extern void LoadRecentGame([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string filepath, [MarshalAs(UnmanagedType.I1)]bool resetGame);
[DllImport(DLLPath, EntryPoint = "GetArchiveRomList")] private static extern IntPtr GetArchiveRomListWrapper([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string filename);

View file

@ -67,11 +67,27 @@ namespace Mesen.GUI
Program.OriginalFolder = Directory.GetCurrentDirectory();
AppDomain.CurrentDomain.AssemblyResolve += LoadAssemblies;
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += Application_ThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if(ConfigManager.GetConfigFile() == null) {
//Show config wizard
//ResourceHelper.LoadResources(Language.SystemDefault);
ResourceHelper.LoadResources(Language.Japanese);
Application.Run(new frmConfigWizard());
if(ConfigManager.GetConfigFile() == null) {
Application.Exit();
return;
}
}
AppDomain.CurrentDomain.AssemblyResolve += LoadAssemblies;
Directory.CreateDirectory(ConfigManager.HomeFolder);
Directory.SetCurrentDirectory(ConfigManager.HomeFolder);
try {
@ -112,10 +128,7 @@ namespace Mesen.GUI
using(SingleInstance singleInstance = new SingleInstance()) {
if(singleInstance.FirstInstance || !Config.ConfigManager.Config.PreferenceInfo.SingleInstance) {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Mesen.GUI.Forms.frmMain frmMain = new Mesen.GUI.Forms.frmMain(args);
frmMain frmMain = new frmMain(args);
if(Config.ConfigManager.Config.PreferenceInfo.SingleInstance) {
singleInstance.ListenForArgumentsFromSuccessiveInstances();
@ -138,9 +151,7 @@ namespace Mesen.GUI
}
}
} else {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Mesen.GUI.Forms.frmMain(args));
Application.Run(new frmMain(args));
}
}
}

View file

@ -80,6 +80,16 @@ namespace Mesen.GUI.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ArrowKeys {
get {
object obj = ResourceManager.GetObject("ArrowKeys", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -560,6 +570,16 @@ namespace Mesen.GUI.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap PsIcon {
get {
object obj = ResourceManager.GetObject("PsIcon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -699,5 +719,25 @@ namespace Mesen.GUI.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap WasdKeys {
get {
object obj = ResourceManager.GetObject("WasdKeys", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap XbIcon {
get {
object obj = ResourceManager.GetObject("XbIcon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View file

@ -310,4 +310,16 @@
<data name="StepBack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\StepBack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ArrowKeys" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ArrowKeys.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PsIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PsIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WasdKeys" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WasdKeys.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="XbIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\XbIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -107,7 +107,7 @@ namespace Mesen.GUI
ExtractFile(entry, outputFilename);
if(needRestart) {
//If font is newly installed, restart Mesen (otherwise debugger will not be able to use the font and display incorrectly)
System.Diagnostics.Process.Start("mono", "\"" + Assembly.GetEntryAssembly().Location + "\" /delayrestart");
ConfigManager.RestartMesen();
return false;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -117,6 +117,7 @@ namespace InteropEmu {
DllExport void __stdcall LoadROM(char* filename, char* patchFile) { Console::LoadROM((string)filename, (string)patchFile); }
DllExport void __stdcall AddKnownGameFolder(char* folder) { FolderUtilities::AddKnownGameFolder(folder); }
DllExport void __stdcall SetFolderOverrides(char* saveFolder, char* saveStateFolder, char* screenshotFolder) { FolderUtilities::SetFolderOverrides(saveFolder, saveStateFolder, screenshotFolder); }
DllExport void __stdcall LoadRecentGame(char* filepath, bool resetGame) { SaveStateManager::LoadRecentGame(filepath, resetGame); }
DllExport const char* __stdcall GetArchiveRomList(char* filename) {

View file

@ -10,6 +10,9 @@ namespace fs = std::experimental::filesystem;
#include "UTF8Util.h"
string FolderUtilities::_homeFolder = "";
string FolderUtilities::_saveFolderOverride = "";
string FolderUtilities::_saveStateFolderOverride = "";
string FolderUtilities::_screenshotFolderOverride = "";
vector<string> FolderUtilities::_gameFolders = vector<string>();
void FolderUtilities::SetHomeFolder(string homeFolder)
@ -50,9 +53,21 @@ vector<string> FolderUtilities::GetKnownGameFolders()
return _gameFolders;
}
void FolderUtilities::SetFolderOverrides(string saveFolder, string saveStateFolder, string screenshotFolder)
{
_saveFolderOverride = saveFolder;
_saveStateFolderOverride = saveStateFolder;
_screenshotFolderOverride = screenshotFolder;
}
string FolderUtilities::GetSaveFolder()
{
string folder = CombinePath(GetHomeFolder(), "Saves");
string folder;
if(_saveFolderOverride.empty()) {
folder = CombinePath(GetHomeFolder(), "Saves");
} else {
folder = _saveFolderOverride;
}
CreateFolder(folder);
return folder;
}
@ -73,21 +88,24 @@ string FolderUtilities::GetDebuggerFolder()
string FolderUtilities::GetSaveStateFolder()
{
string folder = CombinePath(GetHomeFolder(), "SaveStates");
CreateFolder(folder);
return folder;
}
string FolderUtilities::GetMovieFolder()
{
string folder = CombinePath(GetHomeFolder(), + "Movies");
string folder;
if(_saveStateFolderOverride.empty()) {
folder = CombinePath(GetHomeFolder(), "SaveStates");
} else {
folder = _saveStateFolderOverride;
}
CreateFolder(folder);
return folder;
}
string FolderUtilities::GetScreenshotFolder()
{
string folder = CombinePath(GetHomeFolder(), "Screenshots");
string folder;
if(_screenshotFolderOverride.empty()) {
folder = CombinePath(GetHomeFolder(), "Screenshots");
} else {
folder = _screenshotFolderOverride;
}
CreateFolder(folder);
return folder;
}

View file

@ -7,18 +7,22 @@ class FolderUtilities
{
private:
static string _homeFolder;
static string _saveFolderOverride;
static string _saveStateFolderOverride;
static string _screenshotFolderOverride;
static vector<string> _gameFolders;
public:
static void SetHomeFolder(string homeFolder);
static string GetHomeFolder();
static void SetFolderOverrides(string saveFolder, string saveStateFolder, string screenshotFolder);
static void AddKnownGameFolder(string gameFolder);
static vector<string> GetKnownGameFolders();
static string GetSaveFolder();
static string GetSaveStateFolder();
static string GetMovieFolder();
static string GetScreenshotFolder();
static string GetHdPackFolder();
static string GetDebuggerFolder();