(object x, object y)
| 20 | public int Column { get; set; } |
| 21 | |
| 22 | public int Compare(object x, object y) |
| 23 | { |
| 24 | int tempInt; |
| 25 | |
| 26 | ListViewItem lx = (ListViewItem)x; |
| 27 | ListViewItem ly = (ListViewItem)y; |
| 28 | |
| 29 | if (Column == 3) |
| 30 | { |
| 31 | double dx = Convert.ToDouble(lx.SubItems[Column].Text); |
| 32 | double dy = Convert.ToDouble(ly.SubItems[Column].Text); |
| 33 | if (dx < dy) |
| 34 | tempInt = -1; |
| 35 | else if (dx == dy) |
| 36 | tempInt = 0; |
| 37 | else |
| 38 | tempInt = 1; |
| 39 | } |
| 40 | else |
| 41 | tempInt = String.Compare(lx.SubItems[Column].Text, ly.SubItems[Column].Text); |
| 42 | |
| 43 | if (Descending) |
| 44 | return -tempInt; |
| 45 | else |
| 46 | return tempInt; |
| 47 | } |
| 48 | |
| 49 | public ResourceListViewSorter() |
| 50 | { |
nothing calls this directly
no outgoing calls
no test coverage detected