Exemple #1
0
 public SectionItem(string name, string value, string desiredVal, SectionItemStatus status)
 {
     Name         = name;
     Value        = value;
     Status       = status;
     DesiredValue = desiredVal;
 }
Exemple #2
0
        private string GetUpdatedEditedString(string section, string key, string originalVal, string desiredVal, SectionItemStatus status)
        {
            string userinput = string.Empty;
            string returnVal = string.Empty;

            do
            {
                Console.WriteLine("Enter option # value for [{0}][{1}] with status of {4}\n\to: {2}\n\td: {3}\n\tm: manually type", section, key, originalVal, desiredVal, status.ToString());
                userinput = Console.ReadLine();
            } while (userinput != "o" && userinput != "d" && userinput != "m");

            if (userinput == "o")
            {
                returnVal = originalVal;
            }
            else if (userinput == "d")
            {
                returnVal = desiredVal;
            }
            else
            {
                Console.Write("Manually Enter the new Value. ");
                returnVal = Console.ReadLine();
            }

            return(returnVal);
        }