本文整理汇总了C#中LinkType类的典型用法代码示例。如果您正苦于以下问题:C# LinkType类的具体用法?C# LinkType怎么用?C# LinkType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LinkType类属于命名空间,在下文中一共展示了LinkType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetLinks
/// <summary>
/// 获取指定类型的链接
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public IEnumerable<Link> GetLinks(LinkType type)
{
foreach (Link link in GetAll())
{
if (link.Visible &&link.Type == (int)type) yield return link;
}
}
开发者ID:hanson-huang,项目名称:cms,代码行数:12,代码来源:LinkBLL.cs
示例2: Create
/// <summary>
/// Creates a symbolic link at the specified location to the specified destination
/// </summary>
/// <param name="linkPath">The path where the symbolic link will be created</param>
/// <param name="destination">The path where the symbolic link will link to</param>
/// <param name="overrideExisting">Whether an existing file/folder should be overridden</param>
/// <param name="type">The LinkType, a file or a directory</param>
/// <exception cref="TargetAlreadyExistsException">The given <paramref name="linkPath"/> already exists and <paramref name="overrideExisting"/> was false</exception>
public static void Create(string linkPath, string destination, bool overrideExisting, LinkType type)
{
if (type == LinkType.DirectoryLink && Directory.Exists(linkPath)) {
if (!overrideExisting) {
throw new TargetAlreadyExistsException("Directory already exists");
}
} else if (type == LinkType.FileLink && File.Exists(linkPath)) {
if (!overrideExisting) {
throw new TargetAlreadyExistsException("File already exists");
}
}
// Start process with privileges
var process = new Process();
process.StartInfo.FileName = Assembly.GetExecutingAssembly().CodeBase;
process.StartInfo.Verb = "runas"; // Adminrights
process.StartInfo.CreateNoWindow = true;
process.StartInfo.Arguments = string.Join(" ", CommandLineArgs.ArgsFromDictionary(new Dictionary<string, string> {
{ ActionArgumentTitle, ActionArgumentCreate },
//{ DebugArgumentTitle, "=True" },
{ CreateLinkPathArgumentTitle, linkPath },
{ CreateDestinationArgumentTitle, destination },
{ CreateLinkTypeArgumentTitle, type.ToString() }}));
process.Start();
process.WaitForExit();
}
开发者ID:formlesstree4,项目名称:OpenRCT2Launcher,代码行数:35,代码来源:ReparsePoint.cs
示例3: GetChildLinkObjectId
public IQueryable<LinkObjectMaster> GetChildLinkObjectId(LinkType masterLinkType, int masterLinkId, LinkType childLinkType)
{
var linkObjectList = new List<LinkObjectMaster>();
_dataEngine.InitialiseParameterList();
_dataEngine.AddParameter("@MasterLinkTypeId", ((int)masterLinkType).ToString());
_dataEngine.AddParameter("@MasterLinkId", masterLinkId.ToString());
_dataEngine.AddParameter("@ChildLinkTypeId", ((int)childLinkType).ToString());
_sqlToExecute = "SELECT * FROM [dbo].[LinkObjectMaster] ";
_sqlToExecute += "WHERE MasterLinkTypeId = @MasterLinkTypeId ";
_sqlToExecute += "AND MasterLinkId = @MasterLinkId ";
_sqlToExecute += "AND ChildLinkTypeId = @ChildLinkTypeId ";
if (!_dataEngine.CreateReaderFromSql(_sqlToExecute))
throw new Exception("Link - GetLinkObject failed");
while (_dataEngine.Dr.Read())
{
LinkObjectMaster linkObject = CreateLinkObjectFromData();
linkObjectList.Add(linkObject);
}
return linkObjectList.AsQueryable();
}
开发者ID:jonhunter1977,项目名称:BookingHunter,代码行数:25,代码来源:LinkRepository.cs
示例4: CopyFrom
public void CopyFrom(ReceptionEquipment receptionEquip)
{
this.m_CIList.Clear();
this.m_CIList.AddRange(receptionEquip.CIList);
this.m_LinkType = receptionEquip.Link;
this.m_Name = receptionEquip.Name;
}
开发者ID:xiaoyj,项目名称:Space,代码行数:7,代码来源:ReceptionEquipment.cs
示例5: GetData
public IEnumerable<LinkItem> GetData(LinkType type)
{
urn.items.items m_its_database = LoadData() as urn.items.items;
if (m_its_database != null)
{
IList<LinkItem> itemsList = new List<LinkItem>();
var items = from i in m_its_database.item
select i;
foreach (var item in items)
{
var linkItem = new LinkItem()
{
Link = item.url,
Title = item.title,
Description = item.description,
Date = item.date != DateTime.MinValue ? GetDate(item.date, item.type) : null,
Type = GetLinkType(item.type)
};
itemsList.Add(linkItem);
}
return itemsList.Where(c => c.Type == type);
}
return null;
}
开发者ID:rajgit31,项目名称:RajWebSite,代码行数:31,代码来源:DataRepository.cs
示例6: ConnectionGroup
public ConnectionGroup(ConnectionManager manager, IPEndPoint remoteEP,LinkType link)
{
_link = link;
_manager = manager;
_remoteEP = remoteEP;
_connections = new Queue<FdfsConnection>();
}
开发者ID:rainchan,项目名称:weitao,代码行数:7,代码来源:ConnectionGroup.cs
示例7: ItemTab
public ItemTab(Item item, LinkType type, ProductionGraphViewer parent)
: base(parent)
{
this.Item = item;
this.Type = type;
centreFormat.Alignment = centreFormat.LineAlignment = StringAlignment.Center;
}
开发者ID:w-flo,项目名称:foreman-pkg,代码行数:7,代码来源:ItemTab.cs
示例8: ReactionLinkCommand
public ReactionLinkCommand(SpeciesReference speciesReference, Reaction reaction, LinkType linkType, bool adding)
{
this.speciesReference = speciesReference;
this.reaction = reaction;
this.linkType = linkType;
this.adding = adding;
}
开发者ID:dorchard,项目名称:mucell,代码行数:7,代码来源:ReactionLinkCommand.cs
示例9: CreateLink
public static MvcHtmlString CreateLink(this HtmlHelper htmlHelper, string text, LinkType linkType, object htmlAttributes = null, params object[] args)
{
string urlPattern = null;
string anchorHtml, url;
switch (linkType)
{
case LinkType.CategoryDetail:
urlPattern = configurationManager.GetConfigValue(SystemConstants.CategoryLinkPatternConfigKey) as string;
break;
case LinkType.ProductDetail:
urlPattern = configurationManager.GetConfigValue(SystemConstants.ProductLinkPatternConfigKey) as string;
break;
case LinkType.ManufacturerDetail:
urlPattern = configurationManager.GetConfigValue(SystemConstants.ManufacturerLinkPatternConfigKey) as string;
break;
case LinkType.ReviewReadMore:
urlPattern = configurationManager.GetConfigValue(SystemConstants.ReviewReadMorePatternConfigKey) as string;
break;
}
if (!string.IsNullOrEmpty(urlPattern))
{
url = urlPattern.FormatWith(args);
anchorHtml = SystemConstants.AnchorTemplate.FormatWith(url, text, "");
}
else
{
anchorHtml = "";
}
return new MvcHtmlString(anchorHtml);
}
开发者ID:syil,项目名称:UrunYorum,代码行数:33,代码来源:MvcViewExtensions.cs
示例10: AddItem
private void AddItem(Brick connection, LinkType linktype)
{
Button button = new Button();
button.FlatStyle = FlatStyle.Flat;
button.FlatAppearance.BorderColor = SystemColors.Control;
button.FlatAppearance.BorderSize = 0;
button.FlatAppearance.MouseOverBackColor = SystemColors.ControlLightLight;
button.FlatAppearance.MouseDownBackColor = SystemColors.HotTrack;
button.AutoEllipsis = false;
if (linktype == LinkType.USB) { button.Image = global::NXTLibTesterGUI.Properties.Resources.usb2; }
if (linktype == LinkType.Bluetooth) { button.Image = global::NXTLibTesterGUI.Properties.Resources.bluetooth; }
button.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
button.Location = new System.Drawing.Point(3, 0);
if (linktype == LinkType.USB) { button.Name = "USB"; }
if (linktype == LinkType.Bluetooth) { button.Name = "BLU" + Utils.AddressByte2String(connection.brickinfo.address, true); }
button.Size = new System.Drawing.Size(259, 20);
button.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
button.TabIndex = 1;
button.Text = " " + connection.brickinfo.name;
button.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
button.MouseDown += Button_MouseDown;
button.MouseClick += Item_Click;
button.MouseUp += Button_MouseUp;
List.Invoke(new MethodInvoker(delegate { List.Controls.Add(button); }));
}
开发者ID:smo-key,项目名称:NXTLib,代码行数:25,代码来源:FindNXT.cs
示例11: LinkView
public LinkView(Guid mapUid, CompendiumNode originNode, XmlDocument doc, XmlElement parent, LinkType linkType)
: this(doc, parent, linkType)
{
AddAttributeByKeyValue("id", mapUid.ToLongString());
AddAttributeByKeyValue("created", originNode.Created);
AddAttributeByKeyValue("lastModified", originNode.LastModified);
}
开发者ID:chris-tomich,项目名称:Glyma,代码行数:7,代码来源:LinkView.cs
示例12: Link
/// <summary>
/// Create a <see cref="Link"/> using the given parameters.
/// </summary>
/// <param name="type">The <see cref="Link.Type"/> to use.</param>
/// <param name="id">The id to set (for artists, albums and tracks) or null.</param>
/// <param name="user">The user to set (for playlists) or null.</param>
/// <param name="query">The search query to set (for search) or null.</param>
private Link(LinkType type, string id, string user, string query)
{
this._type = type;
this._id = id;
this._user = user;
this._query = query;
}
开发者ID:heksesang,项目名称:sharpotify,代码行数:14,代码来源:Link.cs
示例13: TorrentLink
private TorrentLink(string path, LinkType linkType)
{
if (path == null)
throw new ArgumentNullException(nameof(path));
this.path = path;
this.linkType = linkType;
}
开发者ID:deaddog,项目名称:BitTorrent,代码行数:8,代码来源:TorrentLink.cs
示例14: MenuItem
public MenuItem(string text, LinkType linkType, Action executeAction)
{
LinkType = linkType;
ExecuteAction = executeAction;
FadeEffect = new FadeImageEffect{FadeSpeed = 1.0f};
Image = new ImageFile{Text = text};
Image.ActivateEffect(FadeEffect);
}
开发者ID:nakioman,项目名称:furryrun,代码行数:8,代码来源:MenuItem.cs
示例15: LipSyncUnit
/// <summary>
/// コンストラクタ。
/// </summary>
/// <param name="lipId">口形状種別ID。</param>
/// <param name="linkType">前の音からの繋ぎ方を表す列挙値。</param>
/// <param name="lengthPercent">
/// フレーム長の基準値に対するパーセント値。
/// </param>
public LipSyncUnit(
LipId lipId,
LinkType linkType,
int lengthPercent)
{
this.LipId = lipId;
this.LinkType = linkType;
this.LengthPercent = lengthPercent;
}
开发者ID:ruche7,项目名称:ruche.mmm,代码行数:17,代码来源:LipSyncUnit.cs
示例16: LinkRequest
/// <summary>
/// Initializes a new instance of LinkRequest.
/// </summary>
/// <param name="linkType">Type of the link.</param>
/// <param name="symbolName">The method whose code is being patched.</param>
/// <param name="methodOffset">The method offset.</param>
/// <param name="methodRelativeBase">The method relative base.</param>
/// <param name="targetSymbolName">The linker symbol to link against.</param>
/// <param name="offset">An offset to apply to the link target.</param>
public LinkRequest(LinkType linkType, string symbolName, int methodOffset, int methodRelativeBase, string targetSymbolName, IntPtr offset)
{
this.symbolName = symbolName;
this.methodOffset = methodOffset;
this.linkType = linkType;
this.methodRelativeBase = methodRelativeBase;
this.targetSymbolName = targetSymbolName;
this.offset = offset;
}
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:18,代码来源:LinkRequest.cs
示例17: GetHrefContent
public static string GetHrefContent(this AtomLinkCollection links, LinkType feedType = LinkType.listfeed)
{
foreach (var link in links)
{
if (link.Rel.EndsLike(feedType.ToString()))
return link.HRef.Content;
}
return null;
}
开发者ID:keith9820,项目名称:Groundfloor,代码行数:9,代码来源:ExtensionMethods.cs
示例18: CreateChain
/// <summary>
/// Creates a chain from start to end points containing the specified number of links.
/// </summary>
/// <param name="physicsSimulator"><see cref="PhysicsSimulator"/> to add the chain to.</param>
/// <param name="start">Starting point of the chain.</param>
/// <param name="end">Ending point of the chain.</param>
/// <param name="links">Number of links desired in the chain.</param>
/// <param name="height">Height of each link.</param>
/// <param name="mass">Mass of each link.</param>
/// <param name="type">The joint/spring type.</param>
/// <returns>Path</returns>
public Path CreateChain(PhysicsSimulator physicsSimulator, Vector2 start, Vector2 end, int links, float height,
float mass, LinkType type)
{
Path p = CreateChain(start, end, (Vector2.Distance(start, end) / links), height, mass, type);
p.AddToPhysicsSimulator(physicsSimulator);
return p;
}
开发者ID:elefantstudio-se,项目名称:todesesser,代码行数:20,代码来源:ComplexFactory.cs
示例19: attr
/// <summary>Assigns all needed attributes to the tag</summary>
/// <returns>This instance downcasted to base class</returns>
public virtual IndexedTag attr(
Charset charset = null,
string href = null,
LangCode hreflang = null,
Target target = null,
MimeType type = null,
LinkType? rel = null,
LinkType? rev = null,
Media? media = null,
string id = null,
string @class = null,
string style = null,
string title = null,
LangCode lang = null,
string xmllang = null,
Dir? dir = null,
string onclick = null,
string ondblclick = null,
string onmousedown = null,
string onmouseup = null,
string onmouseover = null,
string onmousemove = null,
string onmouseout = null,
string onkeypress = null,
string onkeydown = null,
string onkeyup = null
)
{
Charset = charset;
Href = href;
HrefLang = hreflang;
Target = target;
Type = type;
Rel = rel;
Rev = rev;
Media = media;
Id = id;
Class = @class;
Style = style;
Title = title;
Lang = lang;
XmlLang = xmllang;
Dir = dir;
OnClick = onclick;
OnDblClick = ondblclick;
OnMouseDown = onmousedown;
OnMouseUp = onmouseup;
OnMouseOver = onmouseover;
OnMouseMove = onmousemove;
OnMouseOut = onmouseout;
OnKeyPress = onkeypress;
OnKeyDown = onkeydown;
OnKeyUp = onkeyup;
return this;
}
开发者ID:bzure,项目名称:BSA.Net,代码行数:58,代码来源:TagLink.cs
示例20: LinkRequest
/// <summary>
/// Initializes a new instance of LinkRequest.
/// </summary>
/// <param name="linkType">Type of the link.</param>
/// <param name="patches">The patches.</param>
/// <param name="symbolName">The symbol that is being patched.</param>
/// <param name="symbolOffset">The symbol offset.</param>
/// <param name="relativeBase">The base virtualAddress, if a relative link is required.</param>
/// <param name="targetSymbol">The linker symbol to link against.</param>
/// <param name="targetOffset">An offset to apply to the link target.</param>
public LinkRequest(LinkType linkType, Patch[] patches, string symbolName, int symbolOffset, int relativeBase, string targetSymbol, long targetOffset)
{
this.SymbolName = symbolName;
this.SymbolOffset = symbolOffset;
this.LinkType = linkType;
this.SymbolRelativeBase = relativeBase;
this.TargetSymbol = targetSymbol;
this.TargetOffset = targetOffset;
this.Patches = patches;
}
开发者ID:tea,项目名称:MOSA-Project,代码行数:20,代码来源:LinkRequest.cs
注:本文中的LinkType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论