/// <summary> /// Constructor. /// </summary> public frmMain() { InitializeComponent(); _charecter = new Charecter(); RefreshView(); }
/// <summary> /// Event handler for Load button. /// </summary> private void btnLoad_Click(object sender, EventArgs e) { var dlg = new OpenFileDialog(); dlg.Filter = "Charecter File(*.jsonchar)|*.jsonchar"; if (dlg.ShowDialog() != DialogResult.OK) { return; } _charecter = JsonConvert.DeserializeObject <Charecter>(File.ReadAllText(dlg.FileName)); RefreshView(); }