Inheritance: ITemplateProvider
Exemple #1
0
        public static HtmlLoader BuildHtmlLoader()
        {
            var databaseProvider = new DatabaseProvider();
            var templateProvider = new TemplateProvider(databaseProvider);
            var htmlLoader = new HtmlLoader(templateProvider);

            return htmlLoader;
        }
        private void NewAnalysisButton_Click(object sender, RoutedEventArgs e)
        {
            var templateProvider = new TemplateProvider(new DatabaseProvider());
            IList<Template> templates = templateProvider.Load();
            if (templates.Count == 0)
            {
                MessageBox.Show("Добавьте вначале шаблоны для анализов!", "Error!");
                return;
            }

            Switcher.PageSwitcher.Navigate(new NewAnalysis());
        }
 private void LoadAllTemplates()
 {
     var templateProvider = new TemplateProvider(new DatabaseProvider());
     IList<Template> templates = templateProvider.Load();
     AddToDictionary(templates);
 }