示例#1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public frmMain()
        {
            InitializeComponent();

            _charecter = new Charecter();
            RefreshView();
        }
示例#2
0
        /// <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();
        }