本文整理汇总了C#中System.Windows.Forms.PictureBox.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# PictureBox.Equals方法的具体用法?C# PictureBox.Equals怎么用?C# PictureBox.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.PictureBox
的用法示例。
在下文中一共展示了PictureBox.Equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: shipSelect
public void shipSelect(PictureBox sender)
{
foreach (PictureBox shipPictureBox in shipPictureBoxes)
{
shipPictureBox.BackColor = Color.Transparent;
}
sender.BackColor = Color.White;
activeShipPictureBox = sender;
if (sender.Equals(ship2PictureBox))
{
selectedShip = controller.getPlayer().getShip(ShipName.patrol);
}
else if (sender.Equals(ship3aPictureBox))
{
selectedShip = controller.getPlayer().getShip(ShipName.submarine);
}
else if (sender.Equals(ship3bPictureBox))
{
selectedShip = controller.getPlayer().getShip(ShipName.battleship);
}
else if (sender.Equals(ship4PictureBox))
{
selectedShip = controller.getPlayer().getShip(ShipName.destroyer);
}
else if (sender.Equals(ship5PictureBox))
{
selectedShip = controller.getPlayer().getShip(ShipName.carrier);
}
}
示例2: GetImageUrl
/// <summary>
/// Gets the image URL.
/// </summary>
/// <param name="pictureBox">The picture box.</param>
/// <param name="useFallbackUri">if set to <c>true</c> [use fallback URI].</param>
/// <returns></returns>
private Uri GetImageUrl(PictureBox pictureBox, bool useFallbackUri)
{
string path;
if (pictureBox == CharacterPictureBox)
{
path = String.Format(CultureConstants.InvariantCulture,
NetworkConstants.CCPPortraits, m_attacker.ID, (int)EveImageSize.x64);
return useFallbackUri
? ImageService.GetImageServerBaseUri(path)
: ImageService.GetImageServerCdnUri(path);
}
int typeId = pictureBox.Equals(ShipPictureBox)
? m_attacker.ShipTypeID
: m_attacker.WeaponTypeID;
path = String.Format(CultureConstants.InvariantCulture,
NetworkConstants.CCPIconsFromImageServer, "type", typeId, (int)EveImageSize.x32);
return useFallbackUri
? ImageService.GetImageServerBaseUri(path)
: ImageService.GetImageServerCdnUri(path);
}
示例3: GetImageUrl
/// <summary>
/// Gets the image URL.
/// </summary>
/// <param name="pictureBox">The picture box.</param>
/// <param name="useFallbackUri">if set to <c>true</c> [use fallback URI].</param>
/// <returns></returns>
private Uri GetImageUrl(PictureBox pictureBox, bool useFallbackUri)
{
string path = String.Empty;
if (pictureBox.Equals(CharacterPictureBox))
path = String.Format(CultureConstants.InvariantCulture,
NetworkConstants.CCPPortraits, m_killLog.Victim.ID, (int)EveImageSize.x128);
if (pictureBox.Equals(ShipPictureBox))
path = String.Format(CultureConstants.InvariantCulture,
NetworkConstants.CCPIconsFromImageServer, "render", m_killLog.Victim.ShipTypeID,
(int)EveImageSize.x128);
if (pictureBox.Equals(CorpPictureBox))
path = String.Format(CultureConstants.InvariantCulture,
NetworkConstants.CCPIconsFromImageServer, "corporation", m_killLog.Victim.CorporationID,
(int)EveImageSize.x32);
if (pictureBox.Equals(AlliancePictureBox))
path = String.Format(CultureConstants.InvariantCulture,
NetworkConstants.CCPIconsFromImageServer, "alliance", m_killLog.Victim.AllianceID,
(int)EveImageSize.x32);
return useFallbackUri
? ImageService.GetImageServerBaseUri(path)
: ImageService.GetImageServerCdnUri(path);
}