Пример #1
0
        private void LoadTemplates()
        {
            string path = ConfigPathHelper.GetLayoutPath();

            Model.LoadTemplates(path);
            templateGrid1.DataSource = Model.Templates;
            templateGrid1.Adapter.SelectFirstRecord();
        }
Пример #2
0
        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);
        }