本文整理汇总了C#中ShellObject.GetDisplayName方法的典型用法代码示例。如果您正苦于以下问题:C# ShellObject.GetDisplayName方法的具体用法?C# ShellObject.GetDisplayName怎么用?C# ShellObject.GetDisplayName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShellObject
的用法示例。
在下文中一共展示了ShellObject.GetDisplayName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ArchiveViewWindow
public ArchiveViewWindow(ShellObject loc, bool IsPreviewPaneEnabled, bool IsInfoPaneEnabled)
{
InitializeComponent();
archive = loc;
this.Title = "View Archive - " + archive.GetDisplayName(DisplayNameType.Default);
ShellVView.Child = Explorer;
Explorer.NavigationOptions.PaneVisibility.Commands = PaneVisibilityState.Hide;
Explorer.NavigationOptions.PaneVisibility.CommandsOrganize = PaneVisibilityState.Hide;
Explorer.NavigationOptions.PaneVisibility.CommandsView = PaneVisibilityState.Hide;
Explorer.NavigationOptions.PaneVisibility.Preview =
IsPreviewPaneEnabled ? PaneVisibilityState.Show : PaneVisibilityState.Hide;
Explorer.NavigationOptions.PaneVisibility.Details =
IsInfoPaneEnabled ? PaneVisibilityState.Show : PaneVisibilityState.Hide;
Explorer.NavigationOptions.PaneVisibility.Navigation = PaneVisibilityState.Hide;
Explorer.ContentOptions.FullRowSelect = true;
Explorer.ContentOptions.CheckSelect = false;
Explorer.ContentOptions.ViewMode = ExplorerBrowserViewMode.Tile;
Explorer.NavigationComplete += new EventHandler<NavigationCompleteEventArgs>(Explorer_NavigationComplete);
Explorer.Navigate(loc);
}
示例2: LoadDirectory
public void LoadDirectory(ShellObject obj)
{
obj.Thumbnail.FormatOption = ShellThumbnailFormatOption.IconOnly;
obj.Thumbnail.CurrentSize = new Size(16, 16);
this.PathImage.Source = obj.Thumbnail.BitmapSource;
this.pathName.Text = obj.GetDisplayName(DisplayNameType.Default);
this.so = obj;
path = obj.ParsingName;
Dispatcher.BeginInvoke(DispatcherPriority.Normal, (ThreadStart)(() =>
{
if (obj.ParsingName == KnownFolders.Network.ParsingName || obj.ParsingName.StartsWith(@"\\"))
{
SetChildren(true);
grid1.Visibility = System.Windows.Visibility.Visible;
MenuBorder.Visibility = System.Windows.Visibility.Visible;
}
else
{
try
{
ShellContainer con = (ShellContainer)obj;
List<ShellObject> joe = new List<ShellObject>();
foreach (ShellObject item in con)
{
if (item.IsFolder == true)
{
if (item.ParsingName.ToLower().EndsWith(".zip") == false && item.ParsingName.ToLower().EndsWith(".cab") == false)
{
joe.Add(item);
}
}
}
SetChildren(joe.Count > 0);
}
catch
{
SetChildren(false);
}
}
}));
}
示例3: ResizeImage
public ResizeImage(ShellObject file, string height, string width, string imagename)
{
InitializeComponent();
textBlock1.Text = imagename + ": " + file.GetDisplayName(DisplayNameType.Default);
cvt = new Bitmap(file.ParsingName);
textBlock2.Text = height + ": " + cvt.Height.ToString();
textBlock3.Text = width + ": " + cvt.Width.ToString();
spinner1.Value = 100;
percsetting = true;
textBox1.Text = cvt.Width.ToString();
textBox2.Text = cvt.Height.ToString();
percsetting = false;
}