コード例 #1
0
        static void StyleSheet_AfterSave(umbraco.cms.businesslogic.web.StyleSheet sender, umbraco.cms.businesslogic.SaveEventArgs e)
        {
            var stylesheet = ApplicationContext.Current.Services.FileService.GetStylesheetByName(sender.Text);

            if (stylesheet != null)
            {
                SaveToDisk(stylesheet);
            }
        }
コード例 #2
0
        public bool Save()
        {
            int id = -1;

            umbraco.cms.businesslogic.web.StyleSheet checkingSheet = umbraco.cms.businesslogic.web.StyleSheet.GetByName(Alias);
            if (checkingSheet != null)
            {
                id = checkingSheet.Id;
            }
            else
            {
                id = cms.businesslogic.web.StyleSheet.MakeNew(BusinessLogic.User.GetUser(_userID), Alias, "", "").Id;
            }
            m_returnUrl = string.Format("settings/stylesheet/editStylesheet.aspx?id={0}", id);
            return(true);
        }
コード例 #3
0
 static void StyleSheet_BeforeDelete(umbraco.cms.businesslogic.web.StyleSheet sender, umbraco.cms.businesslogic.DeleteEventArgs e)
 {
     uSyncIO.ArchiveFile("Stylesheet", sender.Text);
 }