コード例 #1
0
        public void ProcessValues(RegistryKey key)
        {
            _values.Clear();
            Errors.Clear();

            try
            {
                var arcHist = key.Values.SingleOrDefault(t => t.ValueName == "ArcHistory");

                if (arcHist != null)
                {
                    var arcs = Encoding.Unicode.GetString(arcHist.ValueDataRaw).Split('\0');

                    foreach (var arc in arcs)
                    {
                        if (arc.Trim().Length == 0)
                        {
                            continue;
                        }
                        var v = new ValuesOut(arc);
                        Values.Add(v);
                    }
                }
            }
            catch (Exception ex)
            {
                Errors.Add($"Error processing 7-Zip archive history: {ex.Message}");
            }

            if (Errors.Count > 0)
            {
                AlertMessage = "Errors detected. See Errors information in lower right corner of plugin window";
            }
        }
コード例 #2
0
        public void ProcessValues(RegistryKey key)
        {
            _values.Clear();
            Errors.Clear();

            try
            {
                var arcHist = key.Values.SingleOrDefault(t => t.ValueName == "ArcHistory");

                if (arcHist != null)
                {
                    var arcs = Encoding.Unicode.GetString(arcHist.ValueDataRaw).Split('\0');

                    foreach (var arc in arcs)
                    {
                        if (arc.Trim().Length == 0)
                        {
                            continue;
                        }
                        var v = new ValuesOut(arc);
                        Values.Add(v);
                    }
                }
            }
            catch (Exception ex)
            {
                Errors.Add($"Error processing 7-Zip archive history: {ex.Message}");
            }

            if (Errors.Count > 0)
            {
                AlertMessage = "Errors detected. See Errors information in lower right corner of plugin window";
            }
        }