@@ -26,6 +26,7 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
2626            return  value ; 
2727        } 
2828    } 
29+ 
2930    /// <summary> 
3031    /// A WPF value converter which converts a UInt32 amount of seconds to a TimeSpan (and back and forth) 
3132    /// </summary> 
@@ -40,6 +41,9 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
4041        } 
4142    } 
4243
44+     /// <summary> 
45+     /// A WPF multi-value converter which will only return true if all of the variables passed can be converted ot a bool; and resolve as True. 
46+     /// </summary> 
4347    public  class  AndConverter  :  IMultiValueConverter  { 
4448        public  object  Convert ( object [ ]  values ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
4549            if  ( values . Any ( v =>  ReferenceEquals ( v ,  DependencyProperty . UnsetValue ) ) ) 
@@ -58,6 +62,9 @@ public object[] ConvertBack(object value, Type[] targetTypes, object parameter,
5862        } 
5963    } 
6064
65+     /// <summary> 
66+     /// A WPF value converter which implements a simple limiting function on the passed parameter (as an integer) 
67+     /// </summary> 
6168    public  class  IntegerLimiterConverter  :  IValueConverter  { 
6269        public  object  Convert ( object  value ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
6370            int  limit  =  System . Convert . ToInt32 ( parameter ) ; 
@@ -74,6 +81,9 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
7481    } 
7582
7683    #region Specialized Converters
84+     /// <summary> 
85+     /// A simple WPF converter that converts the EXP points of a player to the specified level 
86+     /// </summary> 
7787    public  class  EXPointToLevelConverter  :  IValueConverter  { 
7888        public  object  Convert ( object  value ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
7989            return  PlayerXP . GetLevelForPoints ( System . Convert . ToInt32 ( value ) ) ; 
@@ -83,6 +93,12 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
8393            return  PlayerXP . GetPointsForXPLevel ( System . Convert . ToInt32 ( value ) ) ; 
8494        } 
8595    } 
96+ 
97+     /// <summary> 
98+     /// A simple WPF converter that converts the XP level of a player to the specified XP points 
99+     /// <para></para> 
100+     /// See also: <seealso cref="EXPointToLevelConverter"/> 
101+     /// </summary> 
86102    public  class  LevelToEXPointConverter  :  IValueConverter  { 
87103        public  object  Convert ( object  value ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
88104            return  PlayerXP . GetPointsForXPLevel ( System . Convert . ToInt32 ( value ) ) ; 
@@ -92,6 +108,9 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
92108            return  PlayerXP . GetLevelForPoints ( System . Convert . ToInt32 ( value ) ) ; 
93109        } 
94110    } 
111+     /// <summary> 
112+     /// A WPF value converter that converts the player class (<see cref="PlayerClassSaveGameData"/>) to a string based off of the path 
113+     /// </summary> 
95114    public  class  StringToCharacterClassConverter  :  IValueConverter  { 
96115        public  object  Convert ( object  value ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
97116            if  ( value  !=  null )  { 
@@ -112,9 +131,11 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
112131            } 
113132            return  null ; 
114133        } 
115- 
116- 
117134    } 
135+ 
136+     /// <summary> 
137+     /// A simple WPF value converter which converts the <see cref="CustomPlayerColorSaveGameData"/> struct to a native C# <see cref="Color"/> struct. 
138+     /// </summary> 
118139    public  class  CustomPlayerColorToColorConverter  :  IValueConverter  { 
119140        public  object  Convert ( object  value ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
120141
@@ -153,6 +174,10 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
153174            return  null ; 
154175        } 
155176    } 
177+     
178+     /// <summary> 
179+     /// A simple WPF value converter which converts the passed in customization path to a "human safe" name 
180+     /// </summary> 
156181    public  class  CustomizationToStringConverter  :  IValueConverter  { 
157182        private  Character  chx  =  null ; 
158183        public  object  Convert ( object  value ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
@@ -227,6 +252,10 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
227252            return  null ; 
228253        } 
229254    } 
255+     
256+     /// <summary> 
257+     /// A WPF value converter which converts the given <c>parameter</c> ("money"/"eridium") to the integer value based off of the stored character in <c>value</c> 
258+     /// </summary> 
230259    public  class  CurrencyToIntegerConverter  :  IValueConverter  { 
231260        private  Character  chx  =  null ; 
232261        private  uint  currencyHash  =  0 ; 
@@ -236,18 +265,12 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
236265                string  param  =  ( string ) parameter ; 
237266                chx  =  ( Character ) value ; 
238267                switch  ( param )  { 
239-                     case  "golden" : 
240-                         currencyHash  =  DataPathTranslations . GoldenKeyHash ; 
241-                         break ; 
242268                    case  "money" : 
243269                        currencyHash  =  DataPathTranslations . MoneyHash ; 
244270                        break ; 
245271                    case  "eridium" : 
246272                        currencyHash  =  DataPathTranslations . EridiumHash ; 
247273                        break ; 
248-                     case  "diamond" : 
249-                         currencyHash  =  DataPathTranslations . DiamondKeyHash ; 
250-                         break ; 
251274                    default : 
252275                        break ; 
253276                } 
@@ -277,6 +300,7 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
277300            return  chx ; 
278301        } 
279302    } 
303+ 
280304    public  class  TravelStationConverter  :  IMultiValueConverter  { 
281305        private  Character  chx  =  null ; 
282306        private  bool  bShowDbgMaps  =  false ; 
@@ -323,6 +347,10 @@ public object[] ConvertBack(object value, Type[] targetType, object parameter, C
323347            return  null ; 
324348        } 
325349    } 
350+     
351+     /// <summary> 
352+     /// Converts the most active playthrough of the <see cref="Character"/> stored in <c>value</c> to a string (NVHM/TVHM) 
353+     /// </summary> 
326354    public  class  PlaythroughToStringConverter  :  IValueConverter  { 
327355        private  static   readonly  string [ ]  indexToString  =  new  string [ ]  { 
328356            "NVHM" , 
@@ -346,6 +374,10 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
346374            return  chx ; 
347375        } 
348376    } 
377+ 
378+     /// <summary> 
379+     /// Converts guardian rank data to a valid data grid type (<see cref="ObservableCollection{T}"/> 
380+     /// </summary> 
349381    public  class  GuardianRankToDataGridConverter  :  IValueConverter  { 
350382        private  Profile  prf  =  null ; 
351383
@@ -377,12 +409,15 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
377409            return  prf ; 
378410        } 
379411    } 
412+     
380413    public  class  KeyToIntegerConverter  :  IValueConverter  { 
381414        private  Profile  prf  =  null ; 
382415
383416        public  static   Dictionary < string ,  uint >  stringToHash  =  new  Dictionary < string ,  uint > ( )  { 
384417            {  "GoldenKeys" ,  DataPathTranslations . GoldenKeyHash  } , 
385-             {  "DiamondKeys" ,  DataPathTranslations . DiamondKeyHash  } 
418+             {  "DiamondKeys" ,  DataPathTranslations . DiamondKeyHash  } , 
419+             {  "VaultCard1Keys" ,  DataPathTranslations . VaultCard1Hash  } , 
420+             {  "VaultCard2Keys" ,  DataPathTranslations . VaultCard2Hash  } 
386421        } ; 
387422
388423        public  object  Convert ( object  value ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
@@ -446,8 +481,11 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
446481            return  prf ; 
447482        } 
448483    } 
484+     
485+     /// <summary> 
486+     /// A WPF converter that returns the first object that is not set to null in the multiple values passed in to the multi-value converter 
487+     /// </summary> 
449488    public  class  MultiElementObjectBinder  :  IMultiValueConverter  { 
450- 
451489        public  object  Convert ( object [ ]  value ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
452490            foreach  ( object  obj  in  value )  { 
453491                if  ( obj  !=  null  &&  obj  !=  DependencyProperty . UnsetValue )  { 
@@ -462,6 +500,7 @@ public object[] ConvertBack(object value, Type[] targetType, object parameter, C
462500            return  null ; 
463501        } 
464502    } 
503+ 
465504    public  class  IntegerToMayhemLevelConverter  :  IValueConverter  { 
466505        private  Borderlands3Serial  serial  =  null ; 
467506        public  object  Convert ( object  value ,  Type  targetType ,  object  parameter ,  CultureInfo  culture )  { 
0 commit comments