Mercurial > silverbladetech
comparison MetroWpf/Stocks.UI/Converters/DeltaToIconConverter.cs @ 23:399398841fd0
Working version for Stocks (including loosely coupled components
author | adminsh@apollo |
---|---|
date | Tue, 20 Mar 2012 16:53:29 +0000 |
parents | 6109bc268b90 |
children |
comparison
equal
deleted
inserted
replaced
22:a7a4cde39999 | 23:399398841fd0 |
---|---|
15 decimal delta; | 15 decimal delta; |
16 string file = "UNK"; | 16 string file = "UNK"; |
17 | 17 |
18 try | 18 try |
19 { | 19 { |
20 delta = (decimal) value; | 20 delta = (decimal) value; |
21 { | 21 { |
22 if (delta > 0) | 22 if (delta > 0) |
23 file = "UP"; | 23 file = "UP"; |
24 else if (delta < 0) | 24 else if (delta < 0) |
25 file = "DOWN"; | 25 file = "DOWN"; |
26 else | 26 else |
27 file = "LEVEL"; | 27 file = "LEVEL"; |
28 } | 28 } |
29 } | 29 } |
30 finally | 30 finally |
31 { | 31 { |
32 uri = string.Format("../Images/{0}.png", file); | 32 uri = string.Format("../Images/{0}.png", file); |
33 image = new BitmapImage(new Uri(uri, UriKind.Relative)); | 33 image = new BitmapImage(new Uri(uri, UriKind.Relative)); |