parent
f76f4313c1
commit
7483504e6d
Binary file not shown.
@ -1 +1,43 @@ |
|||||||
{} |
{ |
||||||
|
|
||||||
|
"IIFTMQRDCc/leader-creation.png": { |
||||||
|
"caption": "Leader Creation" |
||||||
|
}, |
||||||
|
|
||||||
|
"IIFTMQRDCc/close-combat.png": { |
||||||
|
"caption": "Close Combat" |
||||||
|
}, |
||||||
|
|
||||||
|
"IIFTMQRDCc/heat-to-kill.png": { |
||||||
|
"caption": "HEAT To Kill" |
||||||
|
}, |
||||||
|
|
||||||
|
"IIFTMQRDCc/iift.png": { |
||||||
|
"caption": "Incremental IFT" |
||||||
|
}, |
||||||
|
|
||||||
|
"IIFTMQRDCc/ap-to-kill.png": { |
||||||
|
"caption": "AP To Kill" |
||||||
|
}, |
||||||
|
|
||||||
|
"IIFTMQRDCc/afv-destruction.png": { |
||||||
|
"caption": "AFV Destruction" |
||||||
|
}, |
||||||
|
|
||||||
|
"IIFTMQRDCc/ambush.png": { |
||||||
|
"caption": "Ambush" |
||||||
|
}, |
||||||
|
|
||||||
|
"IIFTMQRDCc/heat-of-battle.png": { |
||||||
|
"caption": "Heat Of Battle" |
||||||
|
}, |
||||||
|
|
||||||
|
"IIFTMQRDCc/apcr-apds-to-kill.png": { |
||||||
|
"caption": "APCR/APDS To Kill" |
||||||
|
}, |
||||||
|
|
||||||
|
"IIFTMQRDCc/to-hit.png": { |
||||||
|
"caption": "To Hit" |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
Binary file not shown.
@ -0,0 +1,38 @@ |
|||||||
|
using System.IO ; |
||||||
|
using System.Drawing ; |
||||||
|
|
||||||
|
using Manina.Windows.Forms ; |
||||||
|
|
||||||
|
// -------------------------------------------------------------------- |
||||||
|
|
||||||
|
public class ChartImage |
||||||
|
{ |
||||||
|
private string mFullPath ; |
||||||
|
private dynamic mConfig ; |
||||||
|
private Image mImage ; |
||||||
|
private ImageListViewItem mImageListViewItem ; |
||||||
|
|
||||||
|
public ChartImage( string key, string fullPath ) |
||||||
|
{ |
||||||
|
mFullPath = fullPath ; |
||||||
|
mConfig = Program.dataConfig.data[ key ] ; |
||||||
|
mImage = Image.FromFile( fullPath ) ; |
||||||
|
|
||||||
|
// NOTE: Thumbnails are cached by ImageListViewItem GUID, so we reuse these objects, |
||||||
|
// instead of creating new ones every time we reload the search results. |
||||||
|
mImageListViewItem = new ImageListViewItem( fullPath ) ; |
||||||
|
mImageListViewItem.Tag = this ; |
||||||
|
mImageListViewItem.Text = caption() ; |
||||||
|
} |
||||||
|
|
||||||
|
public string caption() |
||||||
|
{ |
||||||
|
string caption = (mConfig != null) ? mConfig["caption"] : null ; |
||||||
|
if ( caption == null ) |
||||||
|
caption = Path.GetFileNameWithoutExtension( mFullPath ) ; |
||||||
|
return caption ; |
||||||
|
} |
||||||
|
|
||||||
|
public Image image { get { return mImage ; } } |
||||||
|
public ImageListViewItem imageListViewItem { get { return mImageListViewItem ; } } |
||||||
|
} |
Loading…
Reference in new issue