// メッセージデータをファイルからロード public void Load(ref string fname) { short FileNumber; short ret; int line_num; var line_buf = default(string); MessageData md; var is_effect = default(bool); string sname, msg; string data_name; string err_msg; // 特殊効果データor戦闘アニメデータか? if (Strings.InStr(Strings.LCase(fname), "effect.txt") > 0 | Strings.InStr(Strings.LCase(fname), "animation.txt") > 0) { is_effect = true; } ; #error Cannot convert OnErrorGoToStatementSyntax - see comment for details /* Cannot convert OnErrorGoToStatementSyntax, CONVERSION ERROR: Conversion for OnErrorGoToLabelStatement not implemented, please report this issue in 'On Error GoTo ErrorHandler' at character 2904 * * * Input: * * On Error GoTo ErrorHandler * */ FileNumber = (short)FileSystem.FreeFile(); FileSystem.FileOpen(FileNumber, fname, OpenMode.Input, OpenAccess.Read); line_num = 0; while (true) { data_name = ""; do { if (FileSystem.EOF((int)FileNumber)) { FileSystem.FileClose((int)FileNumber); return; } GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); }while (Strings.Len(line_buf) == 0); if (Strings.InStr(line_buf, ",") > 0) { err_msg = "名称の設定が抜けています。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 3656 * * * Input: * Error(0) * */ } data_name = line_buf; if (Strings.InStr(data_name, " ") > 0) { err_msg = "名称に半角スペースは使用出来ません。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 3827 * * * Input: * Error(0) * */ } if (Strings.InStr(data_name, "(") > 0 | Strings.InStr(data_name, ")") > 0) { err_msg = "名称に全角括弧は使用出来ません。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 4027 * * * Input: * Error(0) * */ } if (Strings.InStr(data_name, "\"") > 0) { err_msg = "名称に\"は使用出来ません。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 4160 * * * Input: * Error(0) * */ } // 重複して定義されたデータの場合 object argIndex3 = (object)data_name; if (IsDefined(ref argIndex3)) { if (!is_effect) { // パイロットメッセージの場合は後から定義されたものを優先 object argIndex1 = (object)data_name; Delete(ref argIndex1); md = Add(ref data_name); } else { // 特殊効果データの場合は既存のものに追加 object argIndex2 = (object)data_name; md = Item(ref argIndex2); } } else { md = Add(ref data_name); } GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); while (Strings.Len(line_buf) > 0) { ret = (short)Strings.InStr(line_buf, ","); if ((int)ret < 2) { ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 4751 * * * Input: * Error(0) * */ } sname = Strings.Left(line_buf, (int)ret - 1); msg = Strings.Trim(Strings.Mid(line_buf, (int)ret + 1)); if (Strings.Len(sname) == 0) { err_msg = "シチュエーションの指定が抜けています。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 5091 * * * Input: * Error(0) * */ } md.AddMessage(ref sname, ref msg); if (FileSystem.EOF((int)FileNumber)) { FileSystem.FileClose((int)FileNumber); return; } GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); } } ErrorHandler: ; // エラー処理 if (line_num == 0) { string argmsg = fname + "が開けません。"; GUI.ErrorMessage(ref argmsg); } else { FileSystem.FileClose((int)FileNumber); string argmsg1 = ""; GUI.DataErrorMessage(ref argmsg1, ref fname, (short)line_num, ref line_buf, ref data_name); } SRC.TerminateSRC(); }
// データファイル fname からデータをロード public void Load(ref string fname) { short FileNumber; int line_num; var line_buf = default(string); AliasDataType ad; string data_name; string err_msg; ; #error Cannot convert OnErrorGoToStatementSyntax - see comment for details /* Cannot convert OnErrorGoToStatementSyntax, CONVERSION ERROR: Conversion for OnErrorGoToLabelStatement not implemented, please report this issue in 'On Error GoTo ErrorHandler' at character 2322 * * * Input: * * On Error GoTo ErrorHandler * */ FileNumber = (short)FileSystem.FreeFile(); FileSystem.FileOpen(FileNumber, fname, OpenMode.Input, OpenAccess.Read); line_num = 0; while (true) { data_name = ""; do { if (FileSystem.EOF((int)FileNumber)) { FileSystem.FileClose((int)FileNumber); return; } GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); }while (Strings.Len(line_buf) == 0); if (Strings.InStr(line_buf, ",") > 0) { err_msg = "名称の設定が抜けています。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 3074 * * * Input: * Error(0) * */ } data_name = line_buf; if (Strings.InStr(data_name, " ") > 0) { err_msg = "名称に半角スペースは使用出来ません。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 3245 * * * Input: * Error(0) * */ } if (Strings.InStr(data_name, "(") > 0 | Strings.InStr(data_name, ")") > 0) { err_msg = "名称に全角括弧は使用出来ません。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 3445 * * * Input: * Error(0) * */ } if (Strings.InStr(data_name, "\"") > 0) { err_msg = "名称に\"は使用出来ません。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 3578 * * * Input: * Error(0) * */ } object argIndex2 = (object)data_name; if (IsDefined(ref argIndex2)) { // すでに定義されているエリアスのデータであれば置き換える object argIndex1 = (object)data_name; Delete(ref argIndex1); } ad = Add(ref data_name); while (true) { if (FileSystem.EOF((int)FileNumber)) { FileSystem.FileClose((int)FileNumber); return; } GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); if (Strings.Len(line_buf) == 0) { break; } ad.AddAlias(line_buf); } if ((int)ad.Count == 0) { err_msg = "エリアス対象のデータが定義されていません。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 4239 * * * Input: * Error(0) * */ } } ErrorHandler: ; // エラー処理 if (line_num == 0) { string argmsg = fname + "が開けません。"; GUI.ErrorMessage(ref argmsg); } else { FileSystem.FileClose((int)FileNumber); GUI.DataErrorMessage(ref err_msg, ref fname, (short)line_num, ref line_buf, ref data_name); } SRC.TerminateSRC(); }
// データファイル fname からデータをロード public void Load(ref string fname) { short FileNumber; short i, ret; int line_num; var line_buf = default(string); string pilot_list; Dialog d; DialogData dd; string err_msg; string pname, msg; ; #error Cannot convert OnErrorGoToStatementSyntax - see comment for details /* Cannot convert OnErrorGoToStatementSyntax, CONVERSION ERROR: Conversion for OnErrorGoToLabelStatement not implemented, please report this issue in 'On Error GoTo ErrorHandler' at character 2594 * * * Input: * * On Error GoTo ErrorHandler * */ FileNumber = (short)FileSystem.FreeFile(); FileSystem.FileOpen(FileNumber, fname, OpenMode.Input, OpenAccess.Read); line_num = 0; while (true) { do { if (FileSystem.EOF((int)FileNumber)) { FileSystem.FileClose((int)FileNumber); return; } GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); }while (Strings.Len(line_buf) == 0); // UPGRADE_NOTE: オブジェクト dd をガベージ コレクトするまでこのオブジェクトを破棄することはできません。 詳細については、'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"' をクリックしてください。 dd = null; // パイロット名一覧 if ((int)GeneralLib.LLength(ref line_buf) == 0) { ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 3503 * * * Input: * Error(0) * */ } pilot_list = ""; var loopTo = GeneralLib.LLength(ref line_buf); for (i = (short)1; i <= loopTo; i++) { pilot_list = pilot_list + " " + GeneralLib.LIndex(ref line_buf, i); } pilot_list = Strings.Trim(pilot_list); object argIndex2 = (object)pilot_list; if (IsDefined(ref argIndex2)) { object argIndex1 = (object)pilot_list; Delete(ref argIndex1); } dd = Add(ref pilot_list); GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); while (Strings.Len(line_buf) > 0) { // シチューション d = dd.AddDialog(ref line_buf); while (true) { if (FileSystem.EOF((int)FileNumber)) { FileSystem.FileClose((int)FileNumber); return; } GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); // 話者 ret = (short)Strings.InStr(line_buf, ","); if ((int)ret == 0) { break; } pname = Strings.Left(line_buf, (int)ret - 1); // 指定した話者のデータが存在するかチェック。 // ただし合体技のパートナーは場合は他の作品のパイロットであることも // あるので話者チェックを行わない。 if (Strings.Left(pname, 1) != "@") { bool localIsDefined() { object argIndex1 = (object)pname; var ret = SRC.PDList.IsDefined(ref argIndex1); return(ret); } bool localIsDefined1() { object argIndex1 = (object)pname; var ret = SRC.NPDList.IsDefined(ref argIndex1); return(ret); } if (!localIsDefined() & !localIsDefined1() & pname != "システム") { err_msg = "パイロット「" + pname + "」が定義されていません。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 4922 * * * Input: * Error(0) * */ } } // メッセージ if (Strings.Len(line_buf) == (int)ret) { err_msg = "メッセージが定義されていません。"; ; #error Cannot convert ErrorStatementSyntax - see comment for details /* Cannot convert ErrorStatementSyntax, CONVERSION ERROR: Conversion for ErrorStatement not implemented, please report this issue in 'Error(0)' at character 5092 * * * Input: * Error(0) * */ } msg = Strings.Trim(Strings.Mid(line_buf, (int)ret + 1)); d.AddMessage(ref pname, ref msg); } } } ErrorHandler: ; if (line_num == 0) { string argmsg = fname + "が開けません。"; GUI.ErrorMessage(ref argmsg); } else { FileSystem.FileClose((int)FileNumber); if (dd is null) { string argdname = ""; GUI.DataErrorMessage(ref err_msg, ref fname, (short)line_num, ref line_buf, ref argdname); } else { GUI.DataErrorMessage(ref err_msg, ref fname, (short)line_num, ref line_buf, ref dd.Name); } } SRC.TerminateSRC(); }
// データファイル fname からデータをロード public void Load(ref string fname) { short FileNumber; int line_num; var line_buf = default(string); BattleConfigData cd; string data_name; string err_msg; ; #error Cannot convert OnErrorGoToStatementSyntax - see comment for details /* Cannot convert OnErrorGoToStatementSyntax, CONVERSION ERROR: Conversion for OnErrorGoToLabelStatement not implemented, please report this issue in 'On Error GoTo ErrorHandler' at character 2386 * * * Input: * * On Error GoTo ErrorHandler * */ FileNumber = (short)FileSystem.FreeFile(); FileSystem.FileOpen(FileNumber, fname, OpenMode.Input, OpenAccess.Read); line_num = 0; while (true) { data_name = ""; do { if (FileSystem.EOF(FileNumber)) { FileSystem.FileClose((int)FileNumber); return; } GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); }while (Strings.Len(line_buf) == 0); data_name = line_buf; object argIndex2 = data_name; if (IsDefined(ref argIndex2)) { // すでに定義されているエリアスのデータであれば置き換える object argIndex1 = data_name; Delete(ref argIndex1); } cd = Add(ref data_name); while (true) { if (FileSystem.EOF(FileNumber)) { FileSystem.FileClose((int)FileNumber); return; } GeneralLib.GetLine(ref FileNumber, ref line_buf, ref line_num); if (Strings.Len(line_buf) == 0) { break; } cd.ConfigCalc = line_buf; } } ErrorHandler: ; // エラー処理 if (line_num == 0) { string argmsg = fname + "が開けません。"; GUI.ErrorMessage(ref argmsg); } else { FileSystem.FileClose((int)FileNumber); GUI.DataErrorMessage(ref err_msg, ref fname, (short)line_num, ref line_buf, ref data_name); } SRC.TerminateSRC(); }