private void LoadTemplates() { string path = ConfigPathHelper.GetLayoutPath(); Model.LoadTemplates(path); templateGrid1.DataSource = Model.Templates; templateGrid1.Adapter.SelectFirstRecord(); }
private string GetSaveFilename(IWin32Window parent) { using (var dlg = new SaveFileDialog { Filter = PrintingConstants.TemplateFilter }) { dlg.InitialDirectory = ConfigPathHelper.GetLayoutPath(); if (dlg.ShowDialog(parent) == DialogResult.OK) { return(dlg.FileName); } } return(string.Empty); }