Exemplo n.º 1
0
        /// <summary>
        ///     Verifies that the user intended to add stringIDs that aren't in the cache file.
        /// </summary>
        /// <returns><c>true</c> if the user intended to add all of the strings.</returns>
        private bool VerifyAddedStringIDs()
        {
            List <string> newStringIds = _strings
                                         .Select(l => l.StringID)
                                         .Where(s => s != "" && !StringIDTrie.Contains(s))
                                         .ToList();

            if (newStringIds.Count > 0 &&
                !MetroMessageBoxList.Show("Language Pack Editor",
                                          "The following stringID(s) do not currently exist in the cache file and will be added.\r\nContinue?",
                                          newStringIds))
            {
                return(false);
            }
            return(true);
        }
Exemplo n.º 2
0
        private bool ConfirmNewStringIds()
        {
            var newStrings = new List <string>();

            foreach (MetaField field in _fileChanges)
            {
                var stringIdField = field as StringIDData;
                if (stringIdField != null)
                {
                    if (!_stringIdTrie.Contains(stringIdField.Value))
                    {
                        newStrings.Add(stringIdField.Value);
                    }
                }
            }
            if (newStrings.Count > 0)
            {
                return(MetroMessageBoxList.Show("New StringIDs",
                                                "The following stringID(s) do not currently exist in the cache file and will be added.\r\nContinue?", newStrings));
            }
            return(true);
        }