Subversion Repositories spk

Rev

Rev 226 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 226 Rev 227
Line 1137... Line 1137...
1137
 
1137
 
1138
		void SaveData()
1138
		void SaveData()
1139
		{
1139
		{
1140
			System::String ^mydoc = Environment::GetFolderPath(Environment::SpecialFolder::Personal );
1140
			System::String ^mydoc = Environment::GetFolderPath(Environment::SpecialFolder::Personal );
1141
			CFileIO Config(_WS(mydoc) + L"/Egosoft/creator.dat");
1141
			CFileIO Config(_WS(mydoc) + L"/Egosoft/creator.dat");
1142
			Utils::WStringList lines;
1142
			std::vector<Utils::WString> lines;
1143
 
1143
 
1144
			if ( this->WindowState == FormWindowState::Normal )
1144
			if ( this->WindowState == FormWindowState::Normal )
1145
			{
1145
			{
1146
				lines.pushBack(Utils::WString(L"CreatorSize:") + Utils::WString::Number(this->Size.Width) + L" " + Utils::WString::Number(this->Size.Height));
1146
				lines.push_back(Utils::WString(L"CreatorSize:") + Utils::WString::Number(this->Size.Width) + L" " + Utils::WString::Number(this->Size.Height));
1147
				lines.pushBack(Utils::WString(L"CreatorPos:") + Utils::WString::Number(this->Location.X) + L" " + Utils::WString::Number(this->Location.Y));
1147
				lines.push_back(Utils::WString(L"CreatorPos:") + Utils::WString::Number(this->Location.X) + L" " + Utils::WString::Number(this->Location.Y));
1148
			}
1148
			}
1149
			else
1149
			else
1150
			{
1150
			{
1151
				lines.pushBack(Utils::WString(L"CreatorPos:") + Utils::WString::Number(this->RestoreBounds.Location.X) + L" " + Utils::WString::Number(this->RestoreBounds.Location.Y));
1151
				lines.push_back(Utils::WString(L"CreatorPos:") + Utils::WString::Number(this->RestoreBounds.Location.X) + L" " + Utils::WString::Number(this->RestoreBounds.Location.Y));
1152
				lines.pushBack(Utils::WString(L"CreatorSize:") + Utils::WString::Number(this->RestoreBounds.Size.Width) + L" " + Utils::WString::Number(this->RestoreBounds.Size.Height));
1152
				lines.push_back(Utils::WString(L"CreatorSize:") + Utils::WString::Number(this->RestoreBounds.Size.Width) + L" " + Utils::WString::Number(this->RestoreBounds.Size.Height));
1153
			}
1153
			}
1154
 
1154
 
1155
			if ( this->WindowState == FormWindowState::Maximized )
1155
			if ( this->WindowState == FormWindowState::Maximized )
1156
				lines.pushBack(L"CreatorMax:");
1156
				lines.push_back(L"CreatorMax:");
1157
 
1157
 
1158
			for (auto itr = m_pLoadedList->begin(); itr != m_pLoadedList->end(); itr++)
1158
			for (auto itr = m_pLoadedList->begin(); itr != m_pLoadedList->end(); itr++)
1159
				lines.pushBack(Utils::WString(L"Loaded:") + (*itr)->data + L" " + (*itr)->str);
1159
				lines.push_back(Utils::WString(L"Loaded:") + (*itr)->data + L" " + (*itr)->str);
1160
			_pGameDir->writeData(&lines);
1160
			_pGameDir->writeData(lines);
1161
			if ( m_settings->bGenerateUpdate )
1161
			if ( m_settings->bGenerateUpdate )
1162
				lines.pushBack(L"GenerateUpdate:");
1162
				lines.push_back(L"GenerateUpdate:");
1163
 
1163
 
1164
			Config.writeFile(&lines);
1164
			Config.writeFileUTF(&lines);
1165
		}
1165
		}
1166
 
1166
 
1167
		void LoadData()
1167
		void LoadData()
1168
		{
1168
		{
1169
			System::String ^mydoc = Environment::GetFolderPath(Environment::SpecialFolder::Personal );
1169
			System::String ^mydoc = Environment::GetFolderPath(Environment::SpecialFolder::Personal );