本文整理汇总了C#中Folder.GetFolder方法的典型用法代码示例。如果您正苦于以下问题:C# Folder.GetFolder方法的具体用法?C# Folder.GetFolder怎么用?C# Folder.GetFolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Folder
的用法示例。
在下文中一共展示了Folder.GetFolder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintAllFolders
private void PrintAllFolders(Folder parent, string spaces)
{
if (parent == null)
{
return;
}
Console.WriteLine("{0}{1}", spaces, parent.Name);
for (int i = 0; i < parent.FoldersCount; i++)
{
PrintAllFolders(parent.GetFolder(i), string.Format("{0}\t", spaces));
}
}
示例2: Page_Init
protected void Page_Init(object sender, EventArgs e)
{
MyHost.Title = "WebCalendar Widget";
_host.Edit += new EditDelegate(EditEvent);
_host.Maximize += new MaximizeDelegate(delegate() { Visible = true; });
_host.Minimize += new MinimizeDelegate(delegate() { Visible = false; });
_host.ExpandOptions = Expandable.ExpandOnEdit;
ViewSet.SetActiveView(View);
foreach (CalendarDataSource cds in CalendarSource)
{
if (cds.CategoryIDs.Count == 0 && cds.SelectedTaxID <= 0 && cds.defaultId > 0) {
// if category is required, then preset the calendar-events default category to the folders' first default category:
Ektron.Cms.API.Folder folderApi = new Folder();
FolderData folder = folderApi.GetFolder(cds.defaultId, true);
if (folder != null && folder.CategoryRequired) {
TaxonomyBaseData[] tax = folder.FolderTaxonomy;
if (tax != null && tax.Length > 0 && tax[0].Id > 0) {
cds.SelectedTaxID = tax[0].Id;
}
}
}
calendar.DataSource.Add(cds);
}
PageBuilder pb = Page as PageBuilder;
if(pb != null){
calendar.AllowEventEditing = !_host.IsEditable;
WarningNoEdit.Visible = _host.IsEditable;
WarningNoEdit.Text = "Add/Edit Event is disabled during page edit.";
}
calendar.Fill();
Ektron.Cms.Framework.UI.Css baseCss = new Ektron.Cms.Framework.UI.Css()
{
Path = commonapi.SitePath + "widgets/webcalendar/view.css",
ID = "WebCalendarWidgetViewCss",
BrowserTarget = Ektron.Cms.Framework.UI.BrowserTarget.LessThanEqualToIE7
};
baseCss.Register(this);
}
示例3: SetBlogName
void SetBlogName(long lngBlogID)
{
try
{
if (lngBlogID > 0)
{
Ektron.Cms.API.Folder oFolder = new Folder();
Ektron.Cms.FolderData oFData = oFolder.GetFolder(lngBlogID);
if (!ReferenceEquals(oFData, null))
{
uxBlogTitle.Text = oFData.Name;
}
}
else
{
uxBlogTitle.Text = "";
}
}
catch (Exception e)
{
errorLb.Text = e.Message + e.Data + e.StackTrace + e.Source + e.ToString();
}
}
示例4: RequestCheckIn
protected void RequestCheckIn()
{
#region Instantiate Local Variables
long userIdFrom = Convert.ToInt64(Request.QueryString["userIdFrom"]);
long userIdTo = Convert.ToInt64(Request.QueryString["userIdTo"]);
ContentData myContentData = new ContentData();
Folder myFolder = new Folder();
FolderData myFolderData = new FolderData();
myContentData = m_ContentApi.GetContentById(this.ContentId, ContentAPI.ContentResultType.Published);
myFolderData = myFolder.GetFolder(myContentData.FolderId);
#endregion
#region Retrieve User Data
UserData userFromData = new UserData();
UserData userToData = new UserData();
UserAPI myUserApi = new UserAPI();
ContentAPI contAPI = new ContentAPI();
userFromData = myUserApi.GetUserById(userIdFrom, true, true);
//Calling EkUserRw instead of UserApi to skip permissions check
Ektron.Cms.DataIO.EkUserRW usrObj = new Ektron.Cms.DataIO.EkUserRW(contAPI.RequestInformationRef);
Microsoft.VisualBasic.Collection uCol = usrObj.GetUserByIDv2_6(userIdTo, true, true);
userToData = usrObj.ConvertUserData(uCol);
#endregion
#region Send "Request Check-In" Email Message
EkMessageHelper messageHelper = new EkMessageHelper(m_ContentApi.RequestInformationRef);
EkMailService mail = new EkMailService(m_ContentApi.RequestInformationRef);
if (userFromData.Email != String.Empty && userToData.Email != String.Empty)
{
try
{
mail.MailFrom = userFromData.Email;
mail.MailCC = userFromData.Email;
mail.MailSubject = messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInSubject", this.LanguageId) + @": " + myContentData.Title;
mail.MailBodyText = this.GetBodyText(messageHelper, myContentData, myFolderData, userFromData.FirstName, userFromData.LastName);
mail.MailTo = userToData.Email;
mail.SendMail();
DmsMenuActionsRepsonse.Text = messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInSucceeded", this.LanguageId) + @" " + userToData.FirstName + @" " + userToData.LastName + @" (" + userToData.Email + @")";
}
catch
{
DmsMenuActionsRepsonse.Text = messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInFailed", this.LanguageId);
}
}
else
{
DmsMenuActionsRepsonse.Text = messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInFailedNoEmail", this.LanguageId);
}
#endregion
}