using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Threading.Tasks; using System.Windows; using System.Windows.Forms; using Comal.Classes; using InABox.Clients; using InABox.Configuration; using InABox.Core; using InABox.Database; using InABox.Database.SQLite; using InABox.DynamicGrid; using InABox.WPF; using Org.BouncyCastle.Math.EC.Multiplier; using Syncfusion.Windows.Controls; using MessageBox = System.Windows.MessageBox; namespace PRSDesktop; public class Utility { public static string[] ProcessNotes(string[] notes, string description) { var Notes = notes != null ? notes.ToList() : new List(); if (!string.IsNullOrWhiteSpace(description) && !description.Equals("Enter Description of Task Here")) { var bFound = false; for (var i = 0; i < Notes.Count; i++) if (!string.IsNullOrWhiteSpace(Notes[i]) && Notes[i].Contains(description)) { Notes[i] = description; bFound = true; } if (!bFound) Notes.Insert(0, description); } return Notes.Select(x => CoreUtils.StripHTML(x)).ToArray(); } }