/// <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); } }
/// <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); } }