本文整理汇总了C#中umbraco类的典型用法代码示例。如果您正苦于以下问题:C# umbraco类的具体用法?C# umbraco怎么用?C# umbraco使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
umbraco类属于命名空间,在下文中一共展示了umbraco类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ultimatePickerPrevalueEditor
public ultimatePickerPrevalueEditor(umbraco.cms.businesslogic.datatype.BaseDataType DataType)
{
// state it knows its datatypedefinitionid
_datatype = DataType;
setupChildControls();
}
开发者ID:elrute,项目名称:Triphulcas,代码行数:7,代码来源:ultimatePickerPrevalueEditor.cs
示例2: DataEditor
public DataEditor(umbraco.interfaces.IData Data, SortedList Prevalues)
{
_data = (cms.businesslogic.datatype.DefaultData)Data;
if (Prevalues["group"] != null)
_group = Prevalues["group"].ToString();
}
开发者ID:elrute,项目名称:Triphulcas,代码行数:7,代码来源:DataEditor.cs
示例3: GetProperty
public System.Xml.Linq.XElement GetProperty(umbraco.cms.businesslogic.property.Property prop)
{
//get access to media item based on some path.
var itm = new Document(int.Parse(prop.Value.ToString()));
return new XElement(prop.PropertyType.Alias, itm.ConfigPath());
}
开发者ID:tocsoft,项目名称:Umbraco-DeveloperFriendly,代码行数:7,代码来源:ContentPickerConverter.cs
示例4: MultipleUploaderDataEditors
public MultipleUploaderDataEditors(umbraco.interfaces.IData Data, string Configuration)
{
_data = Data;
_configuration = Configuration;
config = _configuration.Split("|".ToCharArray());
}
开发者ID:jfvaleroso,项目名称:Umbraco-Extension-Multiple-Uploader,代码行数:7,代码来源:MultipleUploaderDataEditors.cs
示例5: SetProperty
public void SetProperty(umbraco.cms.businesslogic.property.Property prop, System.Xml.Linq.XElement root)
{
var s = new Settings(prop);
var elm = root.Element(prop.PropertyType.Alias);
var paths = elm.Elements("item").Select(x => x.Value);
IEnumerable<CMSNode> nodes = null;
if (s.Source == Settings.DataSource.Content)
{
nodes = paths.Select(x => ContentSyncer.Find(x));
}
else
{
nodes = paths.Select(x => MediaSyncer.Find(x));
}
var ids = nodes.Select(x => x.Id);
if (s.Format == Settings.DataFormat.Csv)
{
prop.Value = string.Join(",", ids);
}
else {
var xml = new XElement("MultiNodePicker",
new XAttribute("type", s.Source.ToString().ToLower())
);
foreach (var id in ids) {
xml.Add(new XElement("nodeId", id));
}
prop.Value = xml.ToString();
}
}
开发者ID:tocsoft,项目名称:Umbraco-DeveloperFriendly,代码行数:34,代码来源:MultiNodeTreePickerConverter.cs
示例6: Document_BeforeSave
/// <summary> Document_BeforeSave(Document sender, umbraco.cms.businesslogic.SaveEventArgs e) umbraco Document BeforeSave event :Document prüfen
/// </summary>
void Document_BeforeSave(Document sender, umbraco.cms.businesslogic.SaveEventArgs e)
{
try
{
Config config = Config.GetConfig();
foreach (ConfigDatatype author in config.Datatypes)
{
foreach (Property pr in sender.GenericProperties)
{
if (author.Guid == pr.PropertyType.DataTypeDefinition.DataType.Id)
{
Property fileprop = sender.getProperty("" + pr.PropertyType.Alias + "");
e.Cancel = File_Scanner(fileprop);
}
}
}
}
catch (Exception ex)
{
}
if (html_msg.Length > 0)
{
HtmlContent(html_msg);
html_msg.Clear();
}
}
开发者ID:mindrevolution,项目名称:uClamAV,代码行数:35,代码来源:EventHandlers.cs
示例7: Populate
public override void Populate(ref umbraco.cms.presentation.Trees.XmlTree tree, int keyId)
{
var season = _seasonRepository.GetById(keyId);
var race = season.Races.First(r => r.Id == keyId);
var quali = XmlTreeNode.Create(_baseTree);
quali.NodeID = race.Id.ToString();
quali.Text = "Qualifying Results";
quali.Icon = "folder.gif";
quali.NodeType = "qualiResults";
quali.Menu.Clear();
quali.Menu.AddRange(new List<IAction> { ActionNew.Instance, ActionDelete.Instance, ContextMenuSeperator.Instance, ActionRefresh.Instance });
var treeService = GetTreeService(keyId, string.Format("Qualifying-{0}", race.Id));
quali.Source = race.GetQualificationResults().Count() > 0 ? treeService.GetServiceUrl() : "";
tree.Add(quali);
var raceResults = XmlTreeNode.Create(_baseTree);
raceResults.NodeID = "r" + race.Id.ToString();
raceResults.Text = "Race Results";
raceResults.Icon = "folder.gif";
raceResults.NodeType = "raceResults";
raceResults.Menu.Clear();
raceResults.Menu.AddRange(new List<IAction> { ActionNew.Instance, ActionDelete.Instance, ContextMenuSeperator.Instance, ActionRefresh.Instance });
treeService = GetTreeService(keyId, string.Format("RaceResult-{0}", race.Id));
raceResults.Source = race.GetRaceResults().Count() > 0 ? treeService.GetServiceUrl() : "";
tree.Add(raceResults);
}
开发者ID:robgray,项目名称:f1speedguides,代码行数:33,代码来源:loadResultsRaceGroup.cs
示例8: GoogleMapEditor
public GoogleMapEditor(umbraco.interfaces.IData Data, MapState Configuration)
{
_data = Data;
if (Configuration != null)
{
value = Configuration;
}
else
{
value = new MapState()
{
Width = Constants.DEFAULT_WIDTH,
Height = Constants.DEFAULT_HEIGHT,
Zoom = Constants.DEFAULT_ZOOM,
Language = Constants.DEFAULT_LANGUAGE,
DrawingTools = Constants.DEFAULT_DRAWINGTOOLS,
SingleLocation = false,
SearchBox = true,
RichtextEditor = false,
ZoomControl = true,
PanControl = true,
StreetViewControl = true,
ScaleControl = true,
Center = new Center
{
Latitude = Constants.DEFAULT_LAT,
Longitude = Constants.DEFAULT_LNG
}
};
}
}
开发者ID:landsurveyorsunited,项目名称:Umbraco-GoogleMap-Editor,代码行数:31,代码来源:GoogleMapEditor.cs
示例9: OrderData
public OrderData(umbraco.DataLayer.IRecordsReader reader)
{
DatabaseId = reader.GetInt("id");
UniqueId = reader.GetGuid("uniqueID");
StoreAlias = reader.GetString("storeAlias");
if (!reader.IsNull("storeOrderReferenceID"))
StoreOrderReferenceId = reader.GetInt("storeOrderReferenceID");
OrderReferenceNumber = reader.GetString("orderNumber");
OrderXML = reader.GetString("orderInfo");
OrderStatus = reader.GetString("orderStatus");
if (!reader.IsNull("createDate"))
CreateDate = reader.GetDateTime("createDate");
if (!reader.IsNull("updateDate"))
UpdateDate = reader.GetDateTime("updateDate");
if (!reader.IsNull("customerID"))
CustomerId = reader.GetInt("customerID");
CustomerUsername = reader.GetString("customerUsername");
CustomerEmail = reader.GetString("customerEmail");
CustomerFirstName = reader.GetString("customerFirstName");
CustomerLastName = reader.GetString("customerLastName");
TransactionId = reader.GetString("transactionID");
}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:26,代码来源:OrderData.cs
示例10: RelatedLinksPrevalueEditor
//private DropDownList _dropdownlist;
//private CheckBox _showUrls;
public RelatedLinksPrevalueEditor(umbraco.cms.businesslogic.datatype.BaseDataType DataType)
{
_datatype = DataType;
setupChildControls();
}
开发者ID:elrute,项目名称:Triphulcas,代码行数:10,代码来源:RelatedLinksPrevalueEditor.cs
示例11: GetProperty
public System.Xml.Linq.XElement GetProperty(umbraco.cms.businesslogic.property.Property prop)
{
var s = new Settings(prop);
IEnumerable<CMSNode> nodes = new List<CMSNode>();
IEnumerable<int> nodeIds = new List<int>();
if ((string)prop.Value != "")
{
if (s.Format == Settings.DataFormat.Csv)
{
nodeIds = prop.Value.ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x));
}
else
{
nodeIds = XElement.Parse(prop.Value.ToString()).Elements("nodeId").Select(x => int.Parse(x.Value));
}
}
nodes = nodeIds.Select(x => new CMSNode(x));
var elm = new XElement(prop.PropertyType.Alias);
foreach (var n in nodes) {
elm.Add(new XElement("item", n.ConfigPath()));
}
return elm;
}
开发者ID:tocsoft,项目名称:Umbraco-DeveloperFriendly,代码行数:28,代码来源:MultiNodeTreePickerConverter.cs
示例12: CsvToXmlData
/// <summary>
/// Initializes a new instance of the <see cref="CsvToXmlData"/> class.
/// </summary>
/// <param name="dataType">Type of the data.</param>
/// <param name="rootName">Name of the root.</param>
/// <param name="elementName">Name of the element.</param>
/// <param name="separator">The separator.</param>
public CsvToXmlData(umbraco.cms.businesslogic.datatype.BaseDataType dataType, string rootName, string elementName, string[] separator)
: base(dataType)
{
this.rootName = rootName;
this.elementName = elementName;
this.separator = separator;
}
开发者ID:elrute,项目名称:Triphulcas,代码行数:14,代码来源:CsvToXmlData.cs
示例13: GetPropertyValue
private string GetPropertyValue(umbraco.NodeFactory.Node umbracoNode, string propertyAlias)
{
if (umbracoNode.GetProperty(propertyAlias) == null && string.IsNullOrWhiteSpace(umbracoNode.GetProperty(propertyAlias).Value))
return string.Empty;
return umbracoNode.GetProperty(propertyAlias).Value;
}
开发者ID:larrynPL,项目名称:OurUmbraco,代码行数:7,代码来源:StarterKitController.cs
示例14: Document_AfterPublish
void Document_AfterPublish(Document sender, umbraco.cms.businesslogic.PublishEventArgs e) {
if (sender.ContentType.Alias == "BlogPost") {
string urls = GetValueRecursively("pingServices", sender.Id);
if (!string.IsNullOrEmpty(urls)) {
string blogUrl;
XmlDocument xd = new XmlDocument();
try { xd.LoadXml(urls); }
catch { }
string blogName = GetValueRecursively("blogName", sender.Id);
string currentDomain = HttpContext.Current.Request.ServerVariables["SERVER_NAME"].ToLower();
library.UpdateDocumentCache(sender.Id);
try {
blogUrl = library.NiceUrlFullPath(sender.Id);
if (!UmbracoSettings.UseDomainPrefixes) blogUrl = "http://" + currentDomain + blogUrl;
} catch (Exception) {
Log.Add(LogTypes.Debug, sender.Id, "Cound not get 'NiceUrlFullPath' from current application");
blogUrl = "http://" + currentDomain + "/" + library.NiceUrl(sender.Id);
}
foreach (XmlNode link in xd.SelectNodes("//link [@type = 'external']")) {
string ping = link.Attributes["link"].Value;
//Log.Add(LogTypes.Debug, sender.Id, ping + " n:" + blogName + " u:" + blogUrl);
PingService(ping, blogName, blogUrl);
}
}
}
}
开发者ID:phaniarveti,项目名称:Experiments,代码行数:30,代码来源:Autoping.cs
示例15: OnDocumentDeleted
protected static void OnDocumentDeleted(Document sender, umbraco.cms.businesslogic.DeleteEventArgs e)
{
var page = CmsService.Instance.GetItem<Page>(new Id(sender.Id));
if (!page.Template.Path.StartsWith("/WebPage"))
return;
SearchBackgroundCrawler.QueueDocumentDelete(page);
}
开发者ID:Psolow,项目名称:Umbraco-Public,代码行数:7,代码来源:SiteIndexer.cs
示例16: SendTestmail
public static void SendTestmail(string email,
umbraco.cms.businesslogic.property.Property Property,
string fromName, string fromEmail, bool IsHtml)
{
// version
string version = Property.VersionId.ToString();
// Get document
umbraco.cms.businesslogic.web.Document d = new umbraco.cms.businesslogic.web.Document(umbraco.cms.businesslogic.Content.GetContentFromVersion(Property.VersionId).Id);
System.Web.HttpContext.Current.Items["pageID"] = d.Id;
// Format mail
string subject = d.Text;
string sender = "\"" + fromName + "\" <" + fromEmail + ">";
// Get template
System.Text.StringBuilder sb = new System.Text.StringBuilder();
System.IO.StringWriter sw = new StringWriter(sb);
System.Web.UI.HtmlTextWriter writer = new System.Web.UI.HtmlTextWriter(sw);
umbraco.template t = new template(d.Template);
t.ParseWithControls(new umbraco.page(d.Id, d.Version)).RenderControl(writer);
// Embedded emails ;) added by DB, 2005-10-04
EmailMessage message = mailerHelper.CreateEmbeddedEmail(sb.ToString(), Cms.BusinessLogic.web.Document.GetContentFromVersion(Property.VersionId).Id);
message.FromAddress = new EmailAddress(fromEmail, fromName);
message.ToAddresses.Add(new EmailAddress(email));
message.Subject = subject;
message.Send(new SmtpServer(GlobalSettings.SmtpServer));
}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:32,代码来源:mailerLogic.cs
示例17: DataEditor
public DataEditor(umbraco.interfaces.IData Data, Options Configuration)
{
//load the prevalues
savedOptions = Configuration;
//ini the savedData object
savedData = Data;
}
开发者ID:kgiszewski,项目名称:InlineImagePicker,代码行数:8,代码来源:DataEditor.cs
示例18: OnDocumentPublished
protected static void OnDocumentPublished(Document sender, umbraco.cms.businesslogic.PublishEventArgs e)
{
global::umbraco.library.UpdateDocumentCache(sender.Id);
var page = CmsService.Instance.GetItem<Page>(new Id(sender.Id));
if (!page.Template.Path.StartsWith("/WebPage"))
return;
SearchBackgroundCrawler.QueueDocumentAdd(page);
}
开发者ID:Psolow,项目名称:Umbraco-Public,代码行数:8,代码来源:SiteIndexer.cs
示例19: DataType_PrevalueEditor
public DataType_PrevalueEditor(umbraco.cms.businesslogic.datatype.BaseDataType DataType)
{
//Log.Add(LogTypes.Debug, 0, "Prevalue Constructor");
_datatype = DataType;
jsonSerializer = new JavaScriptSerializer();
savedOptions = Configuration;
if (savedOptions == null)
savedOptions = new TextBoxListOptions();
}
开发者ID:kgiszewski,项目名称:TextBoxList,代码行数:9,代码来源:Indented_List_PrevalueEditor.cs
示例20: SetProperty
public void SetProperty(umbraco.cms.businesslogic.property.Property prop, System.Xml.Linq.XElement root)
{
var elm = root.Element(prop.PropertyType.Alias);
if (elm != null)
{
prop.Value = elm.Value;
}
}
开发者ID:tocsoft,项目名称:Umbraco-DeveloperFriendly,代码行数:9,代码来源:GeneralConverter.cs
注:本文中的umbraco类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论