本文整理汇总了C#中IFavorite.GetToolTipText方法的典型用法代码示例。如果您正苦于以下问题:C# IFavorite.GetToolTipText方法的具体用法?C# IFavorite.GetToolTipText怎么用?C# IFavorite.GetToolTipText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFavorite
的用法示例。
在下文中一共展示了IFavorite.GetToolTipText方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssertCopy
private void AssertCopy(IFavorite copy)
{
int stored = this.CheckDatabase.Favorites.Count();
Assert.AreEqual(2, stored, "Favorites count doesn't match after copy added to the persistence");
IFavorite secondary = this.SecondaryFavorites.ToList()[1];
Assert.AreEqual(secondary.ServerName, FAVORITE_SERVERNAME2, "Values not updated properly");
// next method loads details of not loaded favorite from database, it shouldn't fail, even if it is a copy
string toolTip = copy.GetToolTipText();
Assert.IsFalse(string.IsNullOrEmpty(toolTip), "ToolTip wasn't resolved for copy of favorite");
}
示例2: UpdateByFavorite
internal void UpdateByFavorite(IFavorite favorite)
{
this.Name = favorite.Name;
this.Text = favorite.Name;
this.Favorite = favorite;
this.Tag = favorite; // temporary solution, for backward compatibility only
this.ImageKey = FavoriteIcons.GetTreeviewImageListKey(favorite.Protocol);
this.SelectedImageKey = this.ImageKey;
// possible performance hit on SQL persistence, when loading details for each created favorite and also in menu loader
this.ToolTipText = favorite.GetToolTipText();
}
示例3: CreateFavoriteButton
private ToolStripButton CreateFavoriteButton(IFavorite favorite)
{
Image buttonImage = favorite.ToolBarIconImage;
ToolStripButton favoriteBtn = new ToolStripButton(favorite.Name, buttonImage, this.serverToolStripMenuItemClick);
favoriteBtn.ToolTipText = favorite.GetToolTipText();
favoriteBtn.Tag = favorite;
favoriteBtn.Overflow = ToolStripItemOverflow.AsNeeded;
return favoriteBtn;
}
示例4: CreateFavoriteMenuItem
private static ToolStripMenuItem CreateFavoriteMenuItem(IFavorite favorite)
{
ToolStripMenuItem item = new ToolStripMenuItem(favorite.Name);
item.Tag = FAVORITE;
item.Image = favorite.ToolBarIconImage;
item.ToolTipText = favorite.GetToolTipText();
return item;
}
示例5: FavoriteToListViewItem
private static ListViewItem FavoriteToListViewItem(IFavorite favorite)
{
var item = new ListViewItem();
item.Tag = favorite;
item.Text = favorite.Name;
item.ToolTipText = favorite.GetToolTipText();
item.ImageKey = FavoriteIcons.GetTreeviewImageListKey(favorite.Protocol);
return item;
}