本文整理汇总了C#中Profile.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Profile.ToString方法的具体用法?C# Profile.ToString怎么用?C# Profile.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteLinkStart
private static void WriteLinkStart(XmlWriter writer, Profile profile, string deviceUrl, string text, string title = null)
{
writer.WriteStartElement("a");
writer.WriteAttributeString("href", deviceUrl);
writer.WriteAttributeString("title", title != null ? title : profile.ToString());
writer.WriteValue(text);
}
示例2: GetDefaultDisplayName
private static string GetDefaultDisplayName(RuntimeType runtime, Version version, Profile profile)
{
string displayName;
if (version == DefaultVersion)
displayName = runtime.ToString();
else if (runtime == RuntimeType.Any)
displayName = "v" + version.ToString();
else
displayName = runtime.ToString() + " " + version.ToString();
if (profile != Profile.Unspecified && profile != Profile.Full)
displayName += " - " + profile.ToString();
return displayName;
}
示例3: WriteDeviceProfile
/// <summary>
/// Writes the hardware profile to the writer.
/// </summary>
/// <param name="writer"></param>
/// <param name="profile"></param>
/// <param name="deviceUrl"></param>
protected void WriteDeviceProfile(XmlWriter writer, Profile profile, string deviceUrl)
{
writer.WriteStartElement("li");
writer.WriteAttributeString("class", ItemCssClass);
// Write the model of the device.
writer.WriteStartElement("h2");
writer.WriteAttributeString("class", ModelCssClass);
WriteLinkStart(writer, profile, deviceUrl, profile["HardwareVendor"].ToString());
writer.WriteEndElement();
writer.WriteEndElement();
// Write the image.
writer.WriteStartElement("div");
writer.WriteAttributeString("class", ImagesCssClass);
writer.WriteStartElement("a");
writer.WriteAttributeString("href", deviceUrl);
writer.WriteAttributeString("title", profile.ToString());
BuildHardwareImages(writer, profile);
writer.WriteEndElement();
writer.WriteEndElement();
// Write the name of the device.
writer.WriteStartElement("h3");
writer.WriteAttributeString("class", NameCssClass);
WriteLinkStart(writer, profile, deviceUrl, profile["HardwareModel"].ToString(), profile["HardwareName"].ToString());
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndElement();
}