Пример #1
0
        public void ProcessEmail(string email, string pass)
        {
            var appConfig = ConfigurationManager.AppSettings["email_templates_path"];

            var siteUrl     = ConfigurationManager.AppSettings["website_url"];
            var footerImage = string.Format("{0}Images/insedluLog.png", siteUrl);

            var path     = string.Format("{0}club_setup.txt", appConfig);
            var template = new TokenTemplate(path);

            template.SetTokenValue("CLUBADMIN", "");
            template.SetTokenValue("CLUBNAME", "");
            template.SetTokenValue("DATE", "");
            template.SetTokenValue("FOOTERIMAGE", "");
            template.SetTokenValue("ADMINEMAIL", "");
        }
Пример #2
0
        public static TokenTemplate GetTokenTemplate(TokenTemplateId request)
        {
            var definition = Taxonomy.TemplateDefinitions.SingleOrDefault(e => e.Key == request.DefinitionId)
                             .Value;

            if (definition == null)
            {
                return(null);
            }
            var formula = Taxonomy.TemplateFormulas
                          .SingleOrDefault(e => e.Key == definition.FormulaReference.Id).Value;
            var t = new TokenTemplate
            {
                Definition = definition,
                Formula    = formula
            };

            return(t);
        }
Пример #3
0
        private InlineUIContainer CreateTokenContainer(string inputText, object token)
        {
            // Note: we are not using the inputText here, but could be used in future

            var presenter = new ContentPresenter()
            {
                Content         = token,
                ContentTemplate = TokenTemplate,
            };

            presenter.ApplyTemplate();
            Button bt = TokenTemplate.FindName("btn_delCtc", presenter) as Button;

            bt.Click += bt_Click;

            InlineUIContainer inlin = new InlineUIContainer(presenter)
            {
                BaselineAlignment = BaselineAlignment.TextBottom
            };

            bt.Tag = inlin;
            // BaselineAlignment is needed to align with Run
            return(inlin);
        }
Пример #4
0
 public static void SaveToCache(string cacheKey, TokenTemplate template, DateTime absoluteExpiration)
 {
     _cache.Set(cacheKey.ToLower(), template, absoluteExpiration);
 }