/// <summary> /// DisplayKeysUpdate - /// Update the key amounts based on the amounts contained in the line item. /// </summary> public void DisplayKeysUpdate() { this.display_keys.Clear(); // display keys are fine - but we need to edit working file. #if UPDATE_20190723 #if DEBUG // we're going to try the List <Tuple <string, string> > workingFileKeys = new List <Tuple <string, string> >(); foreach (Tuple <string, string> tss in working_file.entryAddenda.Keys) { workingFileKeys.Add(tss); } // okay - with the keys obtained - we're going to get the entry addedna value. #endif #endif foreach (Tuple <string, string> a in working_file.entryAddenda.Keys) { // set it up to pretty print the amount and pair with the name. // it almost looked like item 2 was assigned as amount. #if UPDATE_20190723 // updating this to only show a more manageable output value. string my_key = $"{GLOBALS.PadString(a.Item1,15)},\t{ENTRY_FORM.padding_router("Amount ", a.Item2, true)}"; #else string my_key = $"{a.Item1},\t{ENTRY_FORM.padding_router("Amount ", a.Item2, true)}"; #endif try { display_keys.Add(my_key, a); // update with the new keys amount. } catch (Exception e) { #if UPDATE_20190807 Program.encountered_Exceptions.Add(e); #endif // looks like this case is that key is duplicate - we'll need to adjust the key. my_key = $"[DUPLICATE]{my_key}"; display_keys.Add(my_key, a); }// this will help identify duplicates while we're at it. } }