private void ExecuteFile(string fname) { if (Strings.LCase(Strings.Right(fname, 5)) == ".srcs") { using (var stream = File.OpenRead(fname)) { // セーブデータの読み込み GUI.OpenNowLoadingForm(); LoadData(stream); GUI.CloseNowLoadingForm(); // インターミッション InterMission.InterMissionCommand(true); if (!IsSubStage) { if (string.IsNullOrEmpty(Expression.GetValueAsString("次ステージ"))) { GUI.ErrorMessage("次のステージのファイル名が設定されていません"); TerminateSRC(); } StartScenario(Expression.GetValueAsString("次ステージ")); } else { IsSubStage = false; } } } else if (Strings.LCase(Strings.Right(fname, 5)) == ".srcq") { // 中断データの読み込み GUI.LockGUI(); RestoreData(fname, SRCSaveKind.Suspend); // 画面を書き直してステータスを表示 GUI.RedrawScreen(); GUIStatus.DisplayGlobalStatus(); GUI.UnlockGUI(); } else if (Strings.LCase(Strings.Right(fname, 4)) == ".eve") { // イベントファイルの実行 StartScenario(fname); } else { GUI.ErrorMessage("「" + fname + "」はSRC用のファイルではありません!" + Constants.vbCr + Constants.vbLf + "拡張子が「.eve」のイベントファイル、" + "または拡張子が「.src」のセーブデータファイルを指定して下さい。"); TerminateSRC(); } }
public SRC(ILoggerFactory loggerFactory) { Log = loggerFactory.CreateLogger("SRCCore"); Help = new Help(this); Event = new Event(this); Expression = new Expression(this); Map = new Map(this); Commands = new Commands.Command(this); Sound = new Sound(this); Effect = new Effect(this); COM = new COM(this); InterMission = new InterMission(this); FileHandleManager = new FileHandleManager(); PDList = new PilotDataList(this); NPDList = new NonPilotDataList(this); UDList = new UnitDataList(this); IDList = new ItemDataList(this); MDList = new MessageDataList(this); EDList = new MessageDataList(this); ADList = new MessageDataList(this); EADList = new MessageDataList(this); DDList = new DialogDataList(this); SPDList = new SpecialPowerDataList(this); ALDList = new AliasDataList(this); TDList = new TerrainDataList(this); BCList = new BattleConfigDataList(this); PList = new Pilots.Pilots(this); UList = new Units.Units(this); IList = new Items.Items(this); // XXX 別な実装をするならコンストラクタでは設定しない SystemConfig = new LocalFileConfig(); }