private Boolean UpdateFortsInfo(String path, FortMapper map) { if (path == "" || !File.Exists(path)) { MessageBox.Show("指定されたファイルは存在しません。", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } try { DateTime uTime = File.GetLastWriteTime(path); map.ReadLog( File.ReadAllText(path, Encoding.Default), uTime); return true; } catch { MessageBox.Show("ログの読み込みに失敗しました。", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } }
public FortViewData(String gvType) { this.gvType = gvType; this.mapper = new FortMapper(); this.setting = Setting.Load(this.GvType); }
private void SetFortInfo(String id, Label label, FortMapper map) { Fort fort = map.FortInfo(id); if (fort == null) { label.Text = "-"; } else { label.Text = fort.GuildName; } }