Exemple #1
0
        /// <summary>
        /// This function will either assign the right value of the diff entry if it
        /// exists or create a new one with the right value and id.
        /// </summary>
        /// <param name="id">ID of entry</param>
        /// <param name="value">New right value</param>
        public static void AddRightValue(int id, string value)
        {
            int diffIndex = diffs.FindIndex(d => d.ID == id);

            if (diffIndex > -1)
            {
                diffs[diffIndex].Right = value;

                DiffDB.SaveEntry(diffs[diffIndex]);

                return;
            }

            DiffEntry newDiff = new DiffEntry(id, "", value);

            DiffDB.SaveEntry(newDiff);

            diffs.Add(newDiff);
        }
Exemple #2
0
 public static void Init()
 {
     diffs = DiffDB.LoadDiffEntries();
 }