private void NewProject() { bs = new BindingSource(); currentTranslation = new SourceEngineTranslation(); textBox_ProjectName.Text = currentTranslation.Project; textBox_ProjectLanguage.Text = currentTranslation.Language; UpdateTitle(); UpdateDataSource(); }
private void LoadJSON() { using (OpenFileDialog dialog = new OpenFileDialog()) { dialog.Filter = "JSON (*.json)|*.json"; dialog.DefaultExt = "json"; if (dialog.ShowDialog() == DialogResult.OK) { string file = File.ReadAllText(dialog.FileName); currentTranslation = JsonConvert.DeserializeObject <SourceEngineTranslation>(file); } } }