Exemple #1
0
 public GalleryPlugin(GalleryObjectContext context, GallerySettings gallerySettings, ISettingService settingService,
                      ILocalizationService localizationService)
 {
     _context             = context;
     _gallerySettings     = gallerySettings;
     _settingService      = settingService;
     _localizationService = localizationService;
 }
Exemple #2
0
        public override void Install()
        {
            //settings
            var settings = new GallerySettings
            {
                WidgetZones = "header_menu_after",
                ItemPerPage = 6
            };

            _settingService.SaveSetting(settings);
            _context.Install();

            //string to = "*****@*****.**";
            //string from = "*****@*****.**";

            //var message = new MailMessage(from, to)
            //{
            //    Subject = "Nop.Plugin.Widgets.Gallery",
            //    Body = String.Format("Url: {0} ", System.Web.HttpContext.Current.Request.Url)
            //};

            //var client = new SmtpClient("pod51015.outlook.com", 587)
            //{
            //    Credentials = new NetworkCredential("*****@*****.**", "gx3ZLU94FKi"),
            //    EnableSsl = true
            //};
            //try
            //{
            //    client.Send(message);
            //}
            //catch (Exception ex)
            //{

            //}

            base.Install();
        }