示例#1
0
    private static void MakeData(StringGridDictionary SGD, int index)
    {
        Dictionary <string, StringGridDictionaryKeyValue> .ValueCollection vc = SGD.Values;
        //Debug.LogError(vc);
        Dictionary <string, StringGridDictionaryKeyValue> .ValueCollection.Enumerator en = vc.GetEnumerator();
        while (en.MoveNext())
        {
            StringGridDictionaryKeyValue kv = en.Current;
            StringGrid           sg         = kv.Grid;
            List <StringGridRow> list       = sg.Rows;
            switch (index)
            {
            case 0:
                AddCastle(list);
                break;

            case 1:
                AddChar(list);
                break;

            case 2:
                AddCastleConnection(list);
                break;

            default:
                break;
            }
        }
    }
		//シートをCSVにコンバート
		void ConvertSheet(StringGridDictionaryKeyValue sheet, string folderPath)
		{
			string outPutPath = folderPath + "/";
			if (AdvSettingDataManager.IsBootSheet(sheet.Name))
			{
				///起動用データは個別にコンバート
				bootSettingGrid = sheet.Grid;
				return;
			}
			else if (AdvSettingDataManager.IsScenarioSettingSheet(sheet.Name))
			{
				///シナリオ設定データは個別にコンバート
				scenarioSettingGrid = sheet.Grid;
				return;
			}
			else if (AdvSettingDataManager.IsSettingsSheet(sheet.Name))
			{
				outPutPath += "Settings";
			}
			else
			{
				scenarioSheetDictionary.Add(sheet);
				outPutPath += "Scenario";
			}
			outPutPath += "/" + sheet.Key + extConvert;
			WriteFile(sheet.Grid, outPutPath);
		}