コード例 #1
0
 /// <summary>
 /// Generate the image of the icon displayed in TreeView.
 /// </summary>
 /// <param name="isDrive">Whether it is a drive</param>
 private static BitmapSource CreateTreeIcon(bool isDrive)
 {
     if (isDrive)
     {
         BitmapSource iconImage = WindowsIconCreator.GetWindowsIcon(WindowsIconCreator.StockIconId.SIID_DRIVEFIXED);
         return(iconImage);
     }
     else
     {
         BitmapSource iconImage = WindowsIconCreator.GetWindowsIcon(WindowsIconCreator.StockIconId.SIID_FOLDER);
         return(iconImage);
     }
 }
コード例 #2
0
 /// <summary>
 /// ツリーに表示する各種アイコンを作成する
 /// </summary>
 /// <param name="isDrive">ドライブかどうかのフラグ</param>
 private static BitmapSource CreateTreeIcon(bool isDrive)
 {
     if (isDrive)
     {
         var iconImage = WindowsIconCreator.GetWindowsIcon(WindowsIconCreator.StockIconId.SiidDrivefixed);
         return(iconImage);
     }
     else
     {
         var iconImage = WindowsIconCreator.GetWindowsIcon(WindowsIconCreator.StockIconId.SiidFolder);
         return(iconImage);
     }
 }