Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
 public FortViewData(String gvType)
 {
     this.gvType = gvType;
     this.mapper = new FortMapper();
     this.setting = Setting.Load(this.GvType);
 }
Ejemplo n.º 3
0
 private void SetFortInfo(String id, Label label, FortMapper map)
 {
     Fort fort = map.FortInfo(id);
     if (fort == null)
     {
         label.Text = "-";
     }
     else
     {
         label.Text = fort.GuildName;
     }
 }