本文整理汇总了C#中ItemCollection类的典型用法代码示例。如果您正苦于以下问题:C# ItemCollection类的具体用法?C# ItemCollection怎么用?C# ItemCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemCollection类属于命名空间,在下文中一共展示了ItemCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MarketGroup
/// <summary>
/// Deserialization constructor for root category only
/// </summary>
/// <param name="src">Source Serializable Market Group</param>
public MarketGroup(SerializableMarketGroup src)
{
m_id = src.ID;
m_name = src.Name;
m_subCategories = new MarketGroupCollection(this, src.SubGroups);
m_items = new ItemCollection(this, src.Items);
}
开发者ID:wow4all,项目名称:evemu_server,代码行数:11,代码来源:MarketGroup.cs
示例2: FunctionImportMappingNonComposable
internal FunctionImportMappingNonComposable(
EdmFunction functionImport,
EdmFunction targetFunction,
List<List<FunctionImportStructuralTypeMapping>> structuralTypeMappingsList,
ItemCollection itemCollection)
: base(functionImport, targetFunction)
{
//Contract.Requires(structuralTypeMappingsList != null);
//Contract.Requires(itemCollection != null);
Debug.Assert(!functionImport.IsComposableAttribute, "!functionImport.IsComposableAttribute");
Debug.Assert(!targetFunction.IsComposableAttribute, "!targetFunction.IsComposableAttribute");
if (structuralTypeMappingsList.Count == 0)
{
ResultMappings = new OM.ReadOnlyCollection<FunctionImportStructuralTypeMappingKB>(
new[]
{
new FunctionImportStructuralTypeMappingKB(new List<FunctionImportStructuralTypeMapping>(), itemCollection)
});
noExplicitResultMappings = true;
}
else
{
Debug.Assert(functionImport.ReturnParameters.Count == structuralTypeMappingsList.Count);
ResultMappings = new OM.ReadOnlyCollection<FunctionImportStructuralTypeMappingKB>(
structuralTypeMappingsList
.Select(
(structuralTypeMappings) => new FunctionImportStructuralTypeMappingKB(
structuralTypeMappings,
itemCollection))
.ToArray());
noExplicitResultMappings = false;
}
}
开发者ID:jimmy00784,项目名称:entityframework,代码行数:34,代码来源:FunctionImportMappingNonComposable.cs
示例3: ContainsItemWhenMore
public void ContainsItemWhenMore()
{
var collection = new ItemCollection {Item(quantity:5)};
Assert.IsTrue(collection.Contains(Item(quantity:5)));
Assert.IsTrue(collection.Contains(Item(quantity:4)));
}
开发者ID:andy-uq,项目名称:Echo,代码行数:7,代码来源:BasicItemCollectionTests.cs
示例4: Catalog
public Catalog(Database db,
string name,
string table,
string shortDescription,
string longDescription,
string image,
int weight)
{
this.database = db;
this.name = name;
this.table = table;
this.itemCollection = new ItemCollection (db, table, name);
itemCollection.OnChanged += ItemCollectionChanged;
this.shortDescription = shortDescription;
this.longDescription = longDescription;
this.weight = weight;
this.image = new Gtk.Image();
try {
this.image.FromPixbuf = Pixbuf.LoadFromResource (image);
}
catch {
this.image = null;
}
}
开发者ID:MonoBrasil,项目名称:historico,代码行数:26,代码来源:Catalog.cs
示例5: TabControl
/// <summary>
/// Base Constructor
/// </summary>
/// <param name="manager">ScreenManager</param>
public TabControl(IScreenManager manager)
: base(manager)
{
Manager = manager;
Pages = new ItemCollection<TabPage>();
Pages.OnInsert += OnInsert;
Pages.OnRemove += OnRemove;
tabControlStack = new StackPanel(manager);
tabControlStack.HorizontalAlignment = HorizontalAlignment.Stretch;
tabControlStack.VerticalAlignment = VerticalAlignment.Stretch;
Content = tabControlStack;
tabListStack = new StackPanel(manager);
tabListStack.HorizontalAlignment = HorizontalAlignment.Stretch;
tabListStack.Orientation = Orientation.Horizontal;
tabListStack.Background = TabListBackground;
tabControlStack.Controls.Add(tabListStack);
tabPage = new ContentControl(manager);
tabPage.HorizontalAlignment = HorizontalAlignment.Stretch;
tabPage.VerticalAlignment = VerticalAlignment.Stretch;
tabPage.Margin = new Border(0, 10, 0, 10);
tabPage.Background = TabPageBackground;
tabControlStack.Controls.Add(tabPage);
tabPage.Margin = new Border(0, -50, 0, 0);
ApplySkin(typeof(TabControl));
}
开发者ID:CsharpLassi,项目名称:monogameui,代码行数:34,代码来源:TabControl.cs
示例6: TabControl
/// <summary>
/// Base Constructor
/// </summary>
/// <param name="manager">ScreenManager</param>
public TabControl(BaseScreenComponent manager)
: base(manager)
{
Pages = new ItemCollection<TabPage>();
Pages.OnInsert += OnInsert;
Pages.OnRemove += OnRemove;
tabControlGrid = new Grid(manager)
{
HorizontalAlignment = HorizontalAlignment.Stretch,
VerticalAlignment = VerticalAlignment.Stretch
};
tabControlGrid.Columns.Add(new ColumnDefinition() {ResizeMode = ResizeMode.Parts, Width = 1});
tabControlGrid.Rows.Add(new RowDefinition() {ResizeMode = ResizeMode.Auto});
tabControlGrid.Rows.Add(new RowDefinition() {ResizeMode = ResizeMode.Parts, Height = 1});
Content = tabControlGrid;
tabListStack = new StackPanel(manager);
tabListStack.HorizontalAlignment = HorizontalAlignment.Stretch;
tabListStack.Orientation = Orientation.Horizontal;
tabListStack.Background = TabListBackground;
tabControlGrid.AddControl(tabListStack, 0, 0);
tabPage = new ContentControl(manager);
tabPage.HorizontalAlignment = HorizontalAlignment.Stretch;
tabPage.VerticalAlignment = VerticalAlignment.Stretch;
tabPage.Background = TabPageBackground;
tabControlGrid.AddControl(tabPage, 0, 1);
ApplySkin(typeof(TabControl));
}
开发者ID:OctoAwesome,项目名称:monogameui,代码行数:35,代码来源:TabControl.cs
示例7: ExoticCoverage
public void ExoticCoverage()
{
var r = new Mock<IItemReader>(MockBehavior.Strict);
var collection = new ItemCollection(r.Object);
IEnumerable enumerable = collection;
enumerable.GetEnumerator().Should().Not.Be.Null();
}
开发者ID:ShaneCastle,项目名称:TeaFiles.Net,代码行数:7,代码来源:ItemCollectionTest.cs
示例8: ContainsItem
public void ContainsItem()
{
var item = Item();
var collection = new ItemCollection {item};
Assert.IsTrue(collection.Contains(item));
}
开发者ID:andy-uq,项目名称:Echo,代码行数:7,代码来源:BasicItemCollectionTests.cs
示例9: AddItem
public void AddItem()
{
var collection = new ItemCollection();
collection.Add(_itemFactory.Build(ItemCode.LightFrigate, 1));
Assert.That(collection.Count, Is.EqualTo(1));
}
开发者ID:andy-uq,项目名称:Echo,代码行数:7,代码来源:ItemCollectionTests.cs
示例10: ListViewCombos
public ListViewCombos()
{
ListView list = new ListView ();
var indexField = new DataField<int> ();
var indexField2 = new DataField<int> ();
var itemsField = new DataField<ItemCollection> ();
ListStore store = new ListStore (indexField, indexField2, itemsField);
list.DataSource = store;
list.GridLinesVisible = GridLines.Horizontal;
var comboCellView = new ComboBoxCellView { Editable = true, SelectedIndexField = indexField };
comboCellView.Items.Add (1, "one");
comboCellView.Items.Add (2, "two");
comboCellView.Items.Add (3, "three");
list.Columns.Add (new ListViewColumn ("List 1", comboCellView));
var comboCellView2 = new ComboBoxCellView { Editable = true, SelectedIndexField = indexField2, ItemsField = itemsField };
list.Columns.Add (new ListViewColumn ("List 2", comboCellView2));
int p = 0;
for (int n = 0; n < 10; n++) {
var r = store.AddRow ();
store.SetValue (r, indexField, n % 3);
var col = new ItemCollection ();
for (int i = 0; i < 3; i++) {
col.Add (p, "p" + p);
p++;
}
store.SetValues (r, indexField2, n % 3, itemsField, col);
}
PackStart (list, true);
}
开发者ID:akrisiun,项目名称:xwt,代码行数:35,代码来源:ListViewCombos.cs
示例11: ToolboxItemsTab
public ToolboxItemsTab(ItemCollection items)
{
this._items = items;
this.Text = "Toolbox Items";
this.AllowDelete = false;
this.Owner = items.Owner;
}
开发者ID:hksonngan,项目名称:sharptracing,代码行数:7,代码来源:Toolbox.ToolboxItemsTab.cs
示例12: FunctionImportMappingNonComposable
internal FunctionImportMappingNonComposable(
EdmFunction functionImport,
EdmFunction targetFunction,
List<List<FunctionImportStructuralTypeMapping>> structuralTypeMappingsList,
ItemCollection itemCollection)
: base(functionImport, targetFunction)
{
EntityUtil.CheckArgumentNull(structuralTypeMappingsList, "structuralTypeMappingsList");
EntityUtil.CheckArgumentNull(itemCollection, "itemCollection");
Debug.Assert(!functionImport.IsComposableAttribute, "!functionImport.IsComposableAttribute");
Debug.Assert(!targetFunction.IsComposableAttribute, "!targetFunction.IsComposableAttribute");
if (structuralTypeMappingsList.Count == 0)
{
this.ResultMappings = new OM.ReadOnlyCollection<FunctionImportStructuralTypeMappingKB>(
new FunctionImportStructuralTypeMappingKB[] {
new FunctionImportStructuralTypeMappingKB(new List<FunctionImportStructuralTypeMapping>(), itemCollection) });
this.noExplicitResultMappings = true;
}
else
{
Debug.Assert(functionImport.ReturnParameters.Count == structuralTypeMappingsList.Count);
this.ResultMappings = new OM.ReadOnlyCollection<FunctionImportStructuralTypeMappingKB>(
EntityUtil.CheckArgumentNull(structuralTypeMappingsList, "structuralTypeMappingsList")
.Select((structuralTypeMappings) => new FunctionImportStructuralTypeMappingKB(
EntityUtil.CheckArgumentNull(structuralTypeMappings, "structuralTypeMappings"),
itemCollection))
.ToArray());
this.noExplicitResultMappings = false;
}
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:31,代码来源:FunctionImportMappingNonComposable.cs
示例13: Initialize
public override void Initialize (OptionsDialog dialog, object dataObject)
{
base.Initialize (dialog, dataObject);
config = (SolutionRunConfigInfo)dataObject;
store = new ListStore (selectedField, projectNameField, projectField, runConfigField, projectRunConfigsField);
listView = new ListView (store);
var col1 = new ListViewColumn (GettextCatalog.GetString ("Solution Item"));
var cb = new CheckBoxCellView (selectedField);
cb.Toggled += SelectionChanged;
cb.Editable = true;
col1.Views.Add (cb);
col1.Views.Add (new TextCellView (projectNameField));
listView.Columns.Add (col1);
var configSelView = new ComboBoxCellView (runConfigField);
configSelView.Editable = true;
configSelView.ItemsField = projectRunConfigsField;
var col2 = new ListViewColumn (GettextCatalog.GetString ("Run Configuration"), configSelView);
listView.Columns.Add (col2);
foreach (var it in config.Solution.GetAllSolutionItems ().Where (si => si.SupportsExecute ()).OrderBy (si => si.Name)) {
var row = store.AddRow ();
var si = config.EditedConfig.Items.FirstOrDefault (i => i.SolutionItem == it);
var sc = si?.RunConfiguration?.Name ?? it.GetDefaultRunConfiguration ()?.Name;
var configs = new ItemCollection ();
foreach (var pc in it.GetRunConfigurations ())
configs.Add (pc.Name);
store.SetValues (row, selectedField, si != null, projectNameField, it.Name, projectField, it, runConfigField, sc, projectRunConfigsField, configs);
}
}
开发者ID:kdubau,项目名称:monodevelop,代码行数:33,代码来源:SolutionRunConfigurationPanel.cs
示例14: GetValues
public ItemCollection GetValues()
{
ItemCollection sizes = new ItemCollection();
sizes.Add(Smile.INNERBRACE,"Inner");
sizes.Add(Smile.OUTERBRACE, "Outer");
return sizes;
}
开发者ID:sivarajankumar,项目名称:dentalsmile,代码行数:7,代码来源:BraceLocationItemSource.cs
示例15: GetValues
public ItemCollection GetValues()
{
ItemCollection sizes = new ItemCollection();
for(var i = 1; i < 33; i++){
sizes.Add(""+i);
}
return sizes;
}
开发者ID:sivarajankumar,项目名称:dentalsmile,代码行数:8,代码来源:TeethColorMappingItemSource.cs
示例16: GetMappedEntityTypes
/// <summary>
/// Gets all (concrete) entity types implied by this type mapping.
/// </summary>
internal IEnumerable<EntityType> GetMappedEntityTypes(ItemCollection itemCollection)
{
const bool includeAbstractTypes = false;
return this.EntityTypes.Concat(
this.IsOfTypeEntityTypes.SelectMany(entityType =>
MetadataHelper.GetTypeAndSubtypesOf(entityType, itemCollection, includeAbstractTypes)
.Cast<EntityType>()));
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:11,代码来源:FunctionImportMapping.ReturnTypeRenameMapping.cs
示例17: ProtobuildModule
public ProtobuildModule ()
{
shadowSolutions = new Dictionary<string, Solution> ();
Packages = new ProtobuildPackages(this);
Submodules = new ItemCollection<ProtobuildSubmodule>();
Definitions = new ItemCollection<IProtobuildDefinition>();
Initialize(this);
}
开发者ID:Protobuild,项目名称:Protobuild.IDE.MonoDevelop,代码行数:8,代码来源:ProtobuildModule.cs
示例18: CannotRemoveMoreThanWhatWeHave
public void CannotRemoveMoreThanWhatWeHave()
{
var collection = new ItemCollection {Item(quantity:5)};
Assert.That(collection.Remove(Item(quantity:6)), Is.False);
Assert.That(collection.Count, Is.EqualTo(1));
Assert.That(collection.ItemCount, Is.EqualTo(5));
}
开发者ID:andy-uq,项目名称:Echo,代码行数:8,代码来源:BasicItemCollectionTests.cs
示例19: Clear
public void Clear()
{
var item = Item();
var collection = new ItemCollection {item};
collection.Clear();
Assert.That(collection, Is.Empty);
}
开发者ID:andy-uq,项目名称:Echo,代码行数:8,代码来源:BasicItemCollectionTests.cs
示例20: AddItemOfSameType
public void AddItemOfSameType()
{
var collection = new ItemCollection();
collection.Add(Item());
collection.Add(Item(quantity:2));
Assert.That(collection.ItemCount, Is.EqualTo(3));
}
开发者ID:andy-uq,项目名称:Echo,代码行数:8,代码来源:BasicItemCollectionTests.cs
注:本文中的ItemCollection类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论