private static void AddSkinstoCombo(DotNetNuke.Web.UI.WebControls.DnnComboBox combo, string strRoot)
 {
     if (Directory.Exists(strRoot))
     {
         foreach (var strFolder in Directory.GetDirectories(strRoot))
         {
             var strName = strFolder.Substring(strFolder.LastIndexOf("\\") + 1);
             if (strName != "_default")
             {
                 combo.AddItem(strName, strFolder.Replace(Globals.ApplicationMapPath, "").ToLower());
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void MyActions_Click(object sender, DotNetNuke.Entities.Modules.Actions.ActionEventArgs e)
 {
     //My event handler for the custom events added to the ModuleActionCollection
     switch (e.Action.CommandName.ToUpper())
     {
         case "UPLOAD":
             if (e.Action.CommandArgument.ToUpper() != "CANCEL")
             {
                 fileUpload.Visible = true;
             }
             else
             {
                 fileUpload.Visible = false;
             }
             break;
         case "RESCAN":
             if (e.Action.CommandArgument.ToUpper() != "CANCEL")
             {
                 RescanDirectory();
             }
             break;
         case "RECREATE":
             {
                 RecreateThumbnails();
                 break;
             }
     }
 }