本文整理汇总了C#中ItemList类的典型用法代码示例。如果您正苦于以下问题:C# ItemList类的具体用法?C# ItemList怎么用?C# ItemList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemList类属于命名空间,在下文中一共展示了ItemList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
public void Add(Item itm)
{
ItemList data = new ItemList();
data.Add(itm);
Request request = new Request(ItemAction.Add, data);
request.SendPackage(_sck);
}
示例2: ProcessSeason
public override ItemList ProcessSeason(ShowItem si, string folder, int snum, bool forceRefresh)
{
if (TVSettings.Instance.FolderJpg)
{
// season folders JPGs
ItemList TheActionList = new ItemList();
FileInfo fi = FileHelper.FileInFolder(folder, defaultFileName);
if (!doneFolderJPG.Contains(fi.FullName) && (!fi.Exists|| forceRefresh))
// some folders may come up multiple times
{
string bannerPath = "";
if (TVSettings.Instance.SeasonSpecificFolderJPG())
{
//We are getting a Series Level image
bannerPath = si.TheSeries().GetSeasonBannerPath(snum);
}
else
{
//We are getting a Show Level image
bannerPath = si.TheSeries().GetItem(TVSettings.Instance.ItemForFolderJpg());
}
if (!string.IsNullOrEmpty(bannerPath))
TheActionList.Add(new ActionDownload(si, null, fi, bannerPath,
TVSettings.Instance.ShrinkLargeMede8erImages));
doneFolderJPG.Add(fi.FullName);
}
return TheActionList;
}
return base.ProcessSeason(si,folder,snum,forceRefresh);
}
示例3: OnContentChanged
protected override void OnContentChanged() {
base.OnContentChanged();
if (Content != null) {
var data = Content.Data;
var filterLogic = new FilterLogic(data);
var searchLogic = new SearchLogic(data, filterLogic);
var statisticsLogic = new StatisticsLogic(data, searchLogic);
var manipulationLogic = new ManipulationLogic(data, searchLogic, statisticsLogic);
var viewShortcuts = new ItemList<IViewShortcut> {
new DataGridContent(data, manipulationLogic, filterLogic),
new StatisticsContent(statisticsLogic),
new LineChartContent(data),
new HistogramContent(data),
new ScatterPlotContent(data),
new CorrelationMatrixContent(Content),
new DataCompletenessChartContent(searchLogic),
new FilterContent(filterLogic),
new ManipulationContent(manipulationLogic, searchLogic, filterLogic),
new TransformationContent(data, filterLogic)
};
viewShortcutListView.Content = viewShortcuts.AsReadOnly();
viewShortcutListView.ItemsListView.Items[0].Selected = true;
viewShortcutListView.Select();
} else {
viewShortcutListView.Content = null;
}
}
示例4: Schedule
public Schedule(int nrOfResources) {
Resources = new ItemList<Resource>();
for (int i = 0; i < nrOfResources; i++) {
Resources.Add(new Resource(i));
}
lastScheduledTaskOfJob = new Dictionary<int, ScheduledTask>();
}
示例5: TVDoc
}; // TODO: move into settings, and allow user to edit these
#endregion Fields
#region Constructors
public TVDoc(FileInfo settingsFile, TheTVDB tvdb, CommandLineArgs args)
{
this.mTVDB = tvdb;
this.Args = args;
this.Ignore = new List<IgnoreItem>();
this.Workers = null;
this.WorkerSemaphore = null;
this.mStats = new TVRenameStats();
this.mDirty = false;
this.TheActionList = new ItemList();
this.Settings = new TVSettings();
this.MonitorFolders = new List<String>();
this.IgnoreFolders = new List<String>();
this.SearchFolders = new List<String>();
ShowItems = new List<ShowItem>();
this.AddItems = new FolderMonitorEntryList();
this.DownloadDone = true;
this.DownloadOK = true;
this.ActionCancel = false;
this.ScanProgDlg = null;
this.LoadOK = ((settingsFile == null) || this.LoadXMLSettings(settingsFile)) && this.mTVDB.LoadOK;
UpdateTVDBLanguage();
// StartServer();
}
示例6: Request
public Request(ItemAction action, ItemList data)
{
this.action = action;
this.data = data;
this.filter = 0;
this.filter_key = string.Empty;
}
示例7: ProcessShow
public override ItemList ProcessShow(ShowItem si, bool forceRefresh)
{
// for each tv show, optionally write a tvshow.nfo file
if (TVSettings.Instance.NFOs)
{
ItemList TheActionList = new ItemList();
FileInfo tvshownfo = FileHelper.FileInFolder(si.AutoAdd_FolderBase, "tvshow.nfo");
bool needUpdate = !tvshownfo.Exists ||
(si.TheSeries().Srv_LastUpdated > TimeZone.Epoch(tvshownfo.LastWriteTime)) ||
// was it written before we fixed the bug in <episodeguideurl> ?
(tvshownfo.LastWriteTime.ToUniversalTime().CompareTo(new DateTime(2009, 9, 13, 7, 30, 0, 0, DateTimeKind.Utc)) < 0);
bool alreadyOnTheList = DownloadXBMCMetaData.doneNFO.Contains(tvshownfo.FullName);
if ((forceRefresh || needUpdate) && !alreadyOnTheList)
{
TheActionList.Add(new ActionNFO(tvshownfo, si));
DownloadXBMCMetaData.doneNFO.Add(tvshownfo.FullName);
}
return TheActionList;
}
return base.ProcessShow(si, forceRefresh);
}
示例8: LoadContent
public override void LoadContent()
{
base.LoadContent();
sp = mainGame.mySpriteBatch;
font = mainGame.Content.Load<SpriteFont>("Important/meirio_14");
//背景
backTexture = mainGame.Content.Load<Texture2D>("Profile/eraSelectBack");
backRectangle = new Rectangle(50, height / 100, width - 100, height * 98 / 100);
//事件一覧
eventList = new ItemList<Event>(
mainGame,
Event.PersonSelectEvent(mainGame.person),
font,
new Rectangle(
backRectangle.X + backRectangle.Width / 10,
backRectangle.Y + backRectangle.Height / 5,
backRectangle.Width * 8 / 10,
backRectangle.Height * 5 / 10));
eventList.LoadContent();
//フェードインを有効にする
fadeIn.isEnabled = true;
}
示例9: GetChildren
private IEnumerable<ContentItem> GetChildren(bool getPages)
{
var items = new ItemList();
foreach (var parent in gateway.FindTranslations(Selection.SelectedItem))
{
if (getPages)
{
foreach (ContentItem child in parent.GetChildPagesUnfiltered().Where(Engine.EditManager.GetEditorFilter(User)))
if (!items.ContainsAny(gateway.FindTranslations(child)))
items.Add(child);
}
else
{
foreach (ContentItem child in parent.GetChildPartsUnfiltered().Where(Engine.EditManager.GetEditorFilter(User)))
if (!items.ContainsAny(gateway.FindTranslations(child)))
items.Add(child);
}
}
items.Sort();
foreach (ContentItem item in items)
{
if (item is ILanguage)
continue;
if (item.IsPage == getPages)
yield return item;
}
}
示例10: ProcessShow
public override ItemList ProcessShow(ShowItem si, bool forceRefresh)
{
if (TVSettings.Instance.FolderJpg)
{
ItemList TheActionList = new ItemList();
FileInfo fi = FileHelper.FileInFolder(si.AutoAdd_FolderBase, defaultFileName);
bool fileDoesntExist = !doneFolderJPG.Contains(fi.FullName) && !fi.Exists;
if (forceRefresh || fileDoesntExist)
{
//default to poster when we want season posters for the season specific folders;
string itemToGet = (TVSettings.Instance.SeasonSpecificFolderJPG()) ? "poster" : TVSettings.Instance.ItemForFolderJpg();
string bannerPath = bannerPath = si.TheSeries().GetItem(itemToGet);
if (!string.IsNullOrEmpty(bannerPath))
TheActionList.Add(new ActionDownload(si, null, fi, bannerPath, false));
doneFolderJPG.Add(fi.FullName);
}
return TheActionList;
}
return null;
}
示例11: MessagesResponse
public static CommonHash MessagesResponse(ItemList<MailMessageItem> messages, long total_messages, int page, string precised_time_folder)
{
return new CommonHash() {
Messages = messages,
TotalMessagesFiltered = total_messages,
Page = page,
PrecisedTimeFolder = precised_time_folder };
}
示例12: AddReferencesRecursive
protected void AddReferencesRecursive(ContentItem current, ItemList referrers)
{
referrers.AddRange(Content.Search.Repository.Find(Parameter.Equal(null, Item).Detail()));
foreach (ContentItem child in current.Children.WhereAccessible())
{
AddReferencesRecursive(child, referrers);
}
}
示例13: CreateList
protected ItemList CreateList()
{
ItemList list = new ItemList();
list.Add(CreateOneItem<FirstItem>(1, "one", null));
list.Add(CreateOneItem<SecondItem>(2, "two", null));
list.Add(CreateOneItem<NonPageItem>(3, "three", null));
return list;
}
示例14: CreateTestJSM2
public static JSMEncoding CreateTestJSM2() {
JSMEncoding result = new JSMEncoding();
ItemList<Permutation> jsm = new ItemList<Permutation>();
for (int i = 0; i < 6; i++)
jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 5, 4, 3, 2, 1, 0 }));
result.JobSequenceMatrix = jsm;
return result;
}
示例15: FakeItem
public FakeItem(FieldList fieldList, ID itemid, ID templateId, string itemName = DefaultitemName, string databaseName = DefaultDatabaseName)
: base(itemid,
new ItemData(new ItemDefinition(ID.NewID, itemName, templateId, ID.NewID),
Globalization.Language.Invariant, new Data.Version(1), fieldList),
new Database(databaseName))
{
FakeChildren = new ItemList();
}