本文整理汇总了C#中Components类的典型用法代码示例。如果您正苦于以下问题:C# Components类的具体用法?C# Components怎么用?C# Components使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Components类属于命名空间,在下文中一共展示了Components类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
public static string Render(Components component)
{
IRenderTarget renderTarget;
switch (component)
{
case Components.JqGrid:
renderTarget = new JqGridRenderer();
break;
case Components.JqueryGlobalization:
renderTarget = new JqueryGlobalizationRenderer();
break;
case Components.JqueryUIDatePicker:
renderTarget = new JqueryUIDatePickerRenderer();
break;
case Components.JqueryUITimePicker:
renderTarget = new JqueryUITimePickerRenderer();
break;
case Components.ckeditor:
renderTarget = new ckeditorRenderer();
break;
default:
renderTarget = new EmptyRenderer();
break;
}
return renderTarget.Render(Thread.CurrentThread.CurrentCulture, Thread.CurrentThread.CurrentUICulture);
}
示例2: BasicComponent
/// <summary>
/// Initializes a new instance of the <see cref="BasicComponent"/> class.
/// </summary>
/// <param name="components">The components.</param>
/// <param name="parametersManager">The parameters manager.</param>
/// <param name="logger">The logger.</param>
protected BasicComponent(Components components, IParametersManager parametersManager, ILog logger)
{
this.Logger = logger;
this.components = components;
this.components.Add(this);
this.InternalParametersManager = (IInternalParametersManager)parametersManager;
}
示例3: Sword
public Sword(Components.Player player)
{
Player = player;
BaseDamage = 10;
CollisionPoints.Add(new Vector2(0,10f));
CollisionPoints.Add(new Vector2(0,50f));
}
示例4: Main
public static void Main()
{
Console.OutputEncoding = Encoding.UTF8;
//components graphics
Components graphicsCardRadeon = new Components("XFX Radeon HD 5450 1GB 64-bit DDR3", 51.22m);
Components graphicsCardASUS = new Components("ASUS HD6450-SL-1GD3-BRK", 75.00m);
Components graphicsCardGigabyte = new Components("Gigabyte GV-N660WF2-2GD", 345.00m);
//Processors
Components processorIntel = new Components("Intel Celeron G1820", 64.09m);
Components processorAMD = new Components("AMD A4-Series X2 4020", 78.00m);
Components processorIntelCorei5 = new Components("Intel Core i5-4460 (6M Cache, up to 3.40 GHz)", 360.00m);
//Motherboard
Components motherboardASROCK = new Components("ASROCK AM1B-M", 50.00m);
Components motherboardASROCK2 = new Components("ASROCK FM2A55M-VG3+", 81.00m);
Components motherboardASUS = new Components("ASUS GRYPHON Z87", 263.00m);
//Computers
Computer computer1 = new Computer("Lenovo", new List<Components> { graphicsCardRadeon, processorIntel, motherboardASROCK });
Computer computer2 = new Computer("ASUS", new List<Components> { graphicsCardASUS, processorAMD, motherboardASROCK2 });
Computer computer3 = new Computer("ASUS", new List<Components> { graphicsCardGigabyte, processorIntelCorei5, motherboardASUS });
List<Computer> computers = new List<Computer> { computer1, computer2, computer3 };
computers.OrderByDescending(computer => computer.Price).ToList()
.ForEach(computer => Console.WriteLine(computer.ToString()));
}
示例5: GetStylesheetTable
DataTable GetStylesheetTable(Components.Settings settings, int portalId)
{
var returnValue = new DataTable(DataSetTableName.Stylesheets);
returnValue.Columns.Add(new DataColumn(StylesheetTableColumn.NameOfSetting, typeof (string)));
returnValue.Columns.Add(new DataColumn(StylesheetTableColumn.LocalFilePath, typeof (string)));
returnValue.Columns.Add(new DataColumn(StylesheetTableColumn.Stylesheet, typeof (string)));
var renderMethod = string.Format("UDT_{0}", settings.RenderingMethod );
var listScript = renderMethod == SettingName.XslUserDefinedStyleSheet
? settings.ScriptByRenderingMethod( renderMethod )
: string.Empty;
if (listScript.Length > 0)
{
var row = returnValue.NewRow();
row[StylesheetTableColumn.NameOfSetting] = SettingName.XslUserDefinedStyleSheet;
row[StylesheetTableColumn.LocalFilePath] = listScript;
row[StylesheetTableColumn.Stylesheet] = Utilities.ReadStringFromFile(listScript, portalId);
returnValue.Rows.Add(row);
}
var trackingSkript = settings.TrackingScript;
if (trackingSkript.Length > 0 && trackingSkript != "[AUTO]")
{
var row = returnValue.NewRow();
row[StylesheetTableColumn.NameOfSetting] = SettingName.TrackingScript;
row[StylesheetTableColumn.LocalFilePath] = trackingSkript;
row[StylesheetTableColumn.Stylesheet] = Utilities.ReadStringFromFile(trackingSkript, portalId);
returnValue.Rows.Add(row);
}
return returnValue;
}
示例6: Initialize
public override void Initialize(Game game, SpriteBatch spriteBatch, Components.ICamera2D camera)
{
SpriteBatch = spriteBatch;
DrawRectangle = new Rectangle(0, 0, (int) camera.ViewportWidth, (int) camera.ViewportHeight);
Texture = new Texture2D(game.GraphicsDevice, 1, 1);
Texture.SetData(new[] { new Color(255, 255, 255, 0) });
}
示例7: OnComponentMoved
internal static void OnComponentMoved(Components.Component c)
{
if (onComponentMoved != null)
{
onComponentMoved.Invoke(c);
}
}
示例8: Main
static void Main(string[] args)
{
var mySearch = new Search();
List<string> myList= new List<string>();
myList=mySearch.SplitString("din mor er en mand");
foreach (string s in myList)
{
Console.WriteLine(s);
}
var component1 = new Component();
component1._name = "myComponent";
var component2 = new Component();
component2._name = "myComponent";
var myComponentsList=new List<Component>();
myComponentsList.Add(component1);
myComponentsList.Add(component2);
var myComponents = new Components(myComponentsList);
Console.WriteLine(myComponents.GetAvaiableQuantity("myComponent"));
}
示例9: Main
static void Main(string[] args)
{
Components ram1 = new Components("2GB RAM", 20);
Components ram2 = new Components("6GB RAM", 60);
Components hdd1 = new Components("1TB HHD", 350);
Components hdd2 = new Components("250GB HDD", 131);
Components hdd3 = new Components("2TB SSD", 640);
Components gpu1 = new Components("No Info", 0);
Components gpu2 = new Components("ATI Radeon HD 5500", 65);
Components gpu3 = new Components("NVidia GTX Titan", 650);
Components cpu1 = new Components("Intel Core i3 2.4 GHz", 65);
Components cpu2 = new Components("Intel Core i7 4.0 GHz", 315);
Components cpu3 = new Components("Intel Core i5 3.2 GHz", 135);
Components motherboard = new Components("Motherboard :AMD",200);
Components motherboard2 = new Components("Motherboard Intel", 500);
Computer PC1 = new Computer("PC1", new List<Components>() { ram2, hdd1, gpu1, cpu1,motherboard2 });
Computer PC2 = new Computer("PC2", new List<Components>() { ram1, hdd2, gpu2, cpu2,motherboard });
Computer PC3 = new Computer("PC4", new List<Components>() { ram1, hdd3, gpu3, cpu3,motherboard });
Computer PC4 = new Computer("UnknownTrash");
List<Computer> myList = new List<Computer>() { PC1, PC2, PC3, PC4 };
myList = myList.OrderBy(pr => pr.Price).ToList();
foreach (var pc in myList)
{
Console.WriteLine(pc.ToString());
}
}
示例10: BasicComponentTest
/// <summary>
/// Initializes a new instance of the <see cref="BasicComponentTest"/> class.
/// </summary>
public BasicComponentTest()
{
this.components = new Components();
this.logger = new Mock<ILog>();
this.parametersManager = new Mock<IInternalParametersManager>();
this.testee = new BasicComponantImplementation(this.components, this.parametersManager.Object, this.logger.Object);
}
示例11: Initialize
public override void Initialize(Game game, Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Components.ICamera2D camera)
{
base.Initialize(game, spriteBatch, camera);
Content.AddAnimationRule("Flash", () => IsShooting);
Content.AddAnimationRule("botHandDeactivated", () => !IsShooting);
Content.AddAnimationRule("botHandActivated", () => IsShooting);
}
示例12: LearningResource
/// <summary>
/// Constructor that accepts values for all mandatory fields
/// </summary>
///<param name="refId">GUID assigned to this LearningResource.</param>
///<param name="language">A Language</param>
///<param name="name">Name of learning resource.</param>
///<param name="components">A lesson or activity-sized portion of a resource.</param>
///
public LearningResource( string refId, LanguageCode language, string name, Components components )
: base(Adk.SifVersion, InstrDTD.LEARNINGRESOURCE)
{
this.RefId = refId;
this.SetLanguage( language );
this.Name = name;
this.Components = components;
}
示例13: GetLatestNonDefunct
/// <summary>
/// Filter out defunct submissions, null if no non-defunct submissions exist
/// </summary>
private Components.Submission GetLatestNonDefunct(Components.Submission.SubmissionList subs)
{
foreach (Components.Submission sub in subs) {
if (sub.Status != Components.Submission.DEFUNCT)
return sub;
}
return null;
}
示例14: SetGlobalMenu
public override bool SetGlobalMenu (Components.Commands.CommandManager commandManager, string commandMenuAddinPath, string appMenuAddinPath)
{
// Only store this information. Release it when creating the main toolbar.
this.commandManager = commandManager;
this.commandMenuAddinPath = commandMenuAddinPath;
this.appMenuAddinPath = appMenuAddinPath;
return true;
}
示例15: AABB
public AABB(float x1, float y1, float x2, float y2, Components.Component p)
{
this.x1 = x1;
this.x2 = x2;
this.y1 = y1;
this.y2 = y2;
parent = p;
SortCoords();
}