@@ -13,11 +13,15 @@ public class ProgramSettings
1313 public string CommunicationPort = "COM1" ; //Communication port for Hardware interfaces
1414 public int LastSaveFormat = 0 ; //Last used format to save memory card
1515 public int LastExportFormat = 0 ; //Last used format to export save
16- public string RemoteCommAddress = "192.168.4.1" ; // Address / hostname of the remote serial bridge host
17- public int RemoteCommPort = 23 ; // Port to open a socket for the remote serial bridge
16+ public string RemoteCommAddress = "192.168.4.1" ; //Address / hostname of the remote serial bridge host
17+ public int RemoteCommPort = 23 ; //Port to open a socket for the remote serial bridge
1818 public int CardSlot = 0 ; //Active card slot for reading data from PS1CardLink or Unirom
1919 public int ActiveInterface = 0 ; //Currently active hardware interface
2020 public int WarningMessages = 1 ; //Show warning messages for dangerous tasks
21+ public int WindowPositionX = 0 ; //Saved window X coordinate
22+ public int WindowPositionY = 0 ; //Saved window Y coordinate
23+ public int GridColorValue = 128 ; //Saved grid value for icon editor
24+ public int IconGridEnabled = 1 ; //Show grid in icon editor
2125
2226 private const string settingsFilename = "Settings.xml" ;
2327
@@ -55,6 +59,10 @@ public void LoadSettings(string directory)
5559
5660 RestoreWindowPosition = xmlAppSettings . readXmlEntryInt ( "RestoreWindowPosition" , 0 , 1 ) ;
5761
62+ WindowPositionX = xmlAppSettings . readXmlEntryInt ( "WindowPositionX" , - 65535 , 65535 ) ;
63+
64+ WindowPositionY = xmlAppSettings . readXmlEntryInt ( "WindowPositionY" , - 65535 , 65535 ) ;
65+
5866 FormatType = xmlAppSettings . readXmlEntryInt ( "HardwareFormatType" , 0 , 1 ) ;
5967
6068 FixCorruptedCards = xmlAppSettings . readXmlEntryInt ( "FixCorruptedCards" , 0 , 1 ) ;
@@ -68,6 +76,10 @@ public void LoadSettings(string directory)
6876 ActiveInterface = xmlAppSettings . readXmlEntryInt ( "ActiveInterface" , 0 , 10 ) ;
6977
7078 WarningMessages = xmlAppSettings . readXmlEntryInt ( "WarningMessages" , 0 , 1 ) ;
79+
80+ GridColorValue = xmlAppSettings . readXmlEntryInt ( "GridColorValue" , 0 , 255 ) ;
81+
82+ IconGridEnabled = xmlAppSettings . readXmlEntryInt ( "IconGridEnabled" , 0 , 1 ) ;
7183 }
7284
7385 /// <summary>
@@ -96,6 +108,10 @@ public void SaveSettings(string directory, string appName, string appVersion)
96108
97109 xmlAppSettings . writeXmlEntry ( "RestoreWindowPosition" , RestoreWindowPosition . ToString ( ) ) ;
98110
111+ xmlAppSettings . writeXmlEntry ( "WindowPositionX" , WindowPositionX . ToString ( ) ) ;
112+
113+ xmlAppSettings . writeXmlEntry ( "WindowPositionY" , WindowPositionY . ToString ( ) ) ;
114+
99115 xmlAppSettings . writeXmlEntry ( "HardwareFormatType" , FormatType . ToString ( ) ) ;
100116
101117 xmlAppSettings . writeXmlEntry ( "FixCorruptedCards" , FixCorruptedCards . ToString ( ) ) ;
@@ -110,6 +126,10 @@ public void SaveSettings(string directory, string appName, string appVersion)
110126
111127 xmlAppSettings . writeXmlEntry ( "WarningMessages" , WarningMessages . ToString ( ) ) ;
112128
129+ xmlAppSettings . writeXmlEntry ( "GridColorValue" , GridColorValue . ToString ( ) ) ;
130+
131+ xmlAppSettings . writeXmlEntry ( "IconGridEnabled" , IconGridEnabled . ToString ( ) ) ;
132+
113133 xmlAppSettings . closeXmlWriter ( ) ;
114134 }
115135 }
0 commit comments