You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
	
	
		
		
			
	
	
		
			
				
					
						
							|  |  |  | using System; | 
					
						
							|  |  |  | using System.Collections.Generic; | 
					
						
							|  |  |  | using System.Globalization; | 
					
						
							|  |  |  | using System.Linq; | 
					
						
							|  |  |  | using System.Text; | 
					
						
							|  |  |  | using System.Threading.Tasks; | 
					
						
							|  |  |  | using System.Windows.Data; | 
					
						
							|  |  |  | using System.Windows.Media; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace SunlightCentralizedControlManagement_SCCM_.ConvertMoels | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     internal class StateToColorConvert : IValueConverter | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             if (value == null) | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 return null; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             else | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 string i = value.ToString(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 if (i == "201") return "green"; | 
					
						
							|  |  |  |                 else if (i == "202") return "yellow"; | 
					
						
							|  |  |  |                 else if (i == "309") return "Red"; | 
					
						
							|  |  |  |                 else if (i == "800") return "Red"; | 
					
						
							|  |  |  |                 else return "block"; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return "Gray"; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |