private void openLastTableToolStripMenuItem_Click(object sender, EventArgs e) { var lastTableContents = File.ReadAllLines("last_table.txt"); st = new SkillTable(lastTableContents[0]); snt = new SkillNameTable(lastTableContents[0].Replace("skilltable", "skillnametable")); // bad kludge. very bad kludge. who cares tho if (lastTableContents[0].Contains("player")) { rt = new RequirementsTable(lastTableContents[0].Replace("skilltable", "skilllearntable")); } InitSkillEditor(lastTableContents[0], snt); }
private void openTableToolStripMenuItem_Click(object sender, EventArgs e) { var openTableDialog = new OpenFileDialog(); openTableDialog.Filter = "Player skill table|playerskilltable.tbl|Enemy skill table|enemyskilltable.tbl"; openTableDialog.RestoreDirectory = true; if ((openTableDialog.ShowDialog() == DialogResult.OK)) { st = new SkillTable(openTableDialog.FileName); snt = new SkillNameTable(openTableDialog.FileName.Replace("skilltable", "skillnametable")); // bad kludge. very bad kludge. who cares tho if (openTableDialog.FileName.Contains("player")) { rt = new RequirementsTable(openTableDialog.FileName.Replace("skilltable", "skilllearntable")); ct = new SkillCustomTable(openTableDialog.FileName.Replace("playerskilltable", "skillcustomtable")); } InitSkillEditor(openTableDialog.FileName, snt); } }