Ejemplo n.º 1
0
        public void UpdateWaitForExeList(List <string> exeFileNames, bool forceUpdate = false, TreeNode topNode = null)
        {
            if (WaitForEXEN.Count == 0 || forceUpdate)
            {
                int           startCount    = WaitForEXEN.Count + 1;
                List <string> existingNames = WaitForEXEN.ConvertAll((item) => item.ExeName);
                foreach (var item in exeFileNames)
                {
                    if (string.IsNullOrWhiteSpace(item))
                    {
                        continue;
                    }
                    if (!existingNames.Exists((file) => string.Compare(file, item, true) == 0))
                    {
                        var tempVal = new WaitForEXENValue(startCount, item);
                        WaitForEXEN.Add(tempVal);
                        startCount++;
                    }
                }

                if (topNode != null)
                {
                    topNode.Nodes.Clear();
                    foreach (var listItem in WaitForEXEN)
                    {
                        topNode.Nodes.Add(listItem.ToString());
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public void UpdateWaitForExeN(List <string> exeFileNames)
        {
            int           startCount    = WaitForEXEN.Count + 1;
            List <string> existingNames = WaitForEXEN.ConvertAll((item) => item.ExeName);

            foreach (var item in exeFileNames)
            {
                if (string.IsNullOrWhiteSpace(item))
                {
                    continue;
                }
                if (!existingNames.Exists((file) => string.Compare(file, item, true) == 0))
                {
                    var tempVal = new WaitForEXENValue(startCount, item);
                    WaitForEXEN.Add(tempVal);
                    startCount++;
                }
            }
        }