internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Key":
                    break;

                case "Subkey":
                    this.SubKey = pair.Value;
                    break;

                case "RegType32":
                    if (pair.Value.ToLower() == "true")
                    {
                        this.RegType32 = true;
                    }
                    if (pair.Value.ToLower() == "false")
                    {
                        this.RegType32 = false;
                    }
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Path":
                    this.FilePath = pair.Value;
                    break;

                case "Version":
                    this.Version = pair.Value;
                    break;

                case "Comparison":
                    this.Comparison = pair.Value;
                    break;

                case "Csidl":
                    int result = 0;
                    if (int.TryParse(pair.Value, out result))
                    {
                        this.Csidl = result;
                    }
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "ProductCode":
                    this.MsiProductCode = new Guid(pair.Value);
                    break;

                case "VersionMax":
                    this.VersionMax = pair.Value;
                    break;

                case "VersionMin":
                    this.VersionMin = pair.Value;
                    break;

                case "Language":
                    int result = 0;
                    if (int.TryParse(pair.Value, out result))
                    {
                        this.Language = result;
                    }
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Key":
                    break;

                case "Subkey":
                    this.SubKey = pair.Value;
                    break;

                case "RegType32":
                    if (pair.Value.ToLower() == "true")
                    {
                        this.RegType32 = true;
                    }
                    if (pair.Value.ToLower() == "false")
                    {
                        this.RegType32 = false;
                    }
                    break;

                case "Value":
                    this.Value = pair.Value;
                    break;

                case "Comparison":
                    foreach (string item in Enum.GetNames(typeof(ComparisonType)))
                    {
                        if (item.ToLower() == pair.Value.ToLower())
                        {
                            cmbBxComparison.SelectedItem = item;
                            this.Comparison = pair.Value;
                            break;
                        }
                    }
                    break;

                case "Data":
                    uint data = 0;
                    if (uint.TryParse(pair.Value, out data))
                    {
                        this.Data = data;
                    }
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Path":
                    this.FilePath = pair.Value;
                    break;

                case "Comparison":
                    this.Comparison = pair.Value;
                    break;

                case "Created":
                    DateTime newdate;
                    if (DateTime.TryParse(pair.Value, out newdate))
                    {
                        newdate           = newdate.ToLocalTime();
                        this.CreationDate = newdate;
                        InitializeHour(newdate);
                    }
                    break;

                case "Key":
                    break;

                case "Subkey":
                    this.SubKey = pair.Value;
                    break;

                case "RegType32":
                    if (pair.Value.ToLower() == "true")
                    {
                        this.RegType32 = true;
                    }
                    if (pair.Value.ToLower() == "false")
                    {
                        this.RegType32 = false;
                    }
                    break;

                case "Value":
                    this.Value = pair.Value;
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Language":
                    this.Language = pair.Value;
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
Esempio n. 7
0
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Architecture":
                    ushort result = 0;
                    if (ushort.TryParse(pair.Value, out result))
                    {
                        this.ProcessorArchitecture = result;
                    }
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
Esempio n. 8
0
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Path":
                    this.FilePath = pair.Value;
                    break;

                case "Comparison":
                    this.Comparison = pair.Value;
                    break;

                case "Modified":
                    DateTime newdate;
                    if (DateTime.TryParse(pair.Value, out newdate))
                    {
                        newdate = newdate.ToLocalTime();
                        this.ModificationDate = newdate;
                        InitializeHour(newdate);
                    }
                    break;

                case "Csidl":
                    int result = 0;
                    if (int.TryParse(pair.Value, out result))
                    {
                        this.Csidl    = result;
                        this.UseCsidl = true;
                    }
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
Esempio n. 9
0
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Path":
                    this.FilePath = pair.Value;
                    break;

                case "Version":
                    this.Version = pair.Value;
                    break;

                case "Created":
                    DateTime createdDate;
                    if (DateTime.TryParse(pair.Value, out createdDate))
                    {
                        this.CreationDate = createdDate;
                    }
                    break;

                case "Modified":
                    DateTime modifiedDate;
                    if (DateTime.TryParse(pair.Value, out modifiedDate))
                    {
                        this.ModifiedDate = modifiedDate;
                    }
                    break;

                case "Size":
                    int size = 0;
                    if (int.TryParse(pair.Value, out size))
                    {
                        this.FileSize = size;
                    }
                    break;

                case "Language":
                    int language = 0;
                    if (int.TryParse(pair.Value, out language))
                    {
                        this.Language = language;
                    }
                    break;

                case "Key":
                    break;

                case "Subkey":
                    this.SubKey = pair.Value;
                    break;

                case "RegType32":
                    if (pair.Value.ToLower() == "true")
                    {
                        this.RegType32 = true;
                    }
                    if (pair.Value.ToLower() == "false")
                    {
                        this.RegType32 = false;
                    }
                    break;

                case "Value":
                    this.Value = pair.Value;
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
Esempio n. 10
0
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Path":
                    this.FilePath = pair.Value;
                    break;

                case "Version":
                    this.Version = pair.Value;
                    break;

                case "Created":
                    DateTime createdDate;
                    if (DateTime.TryParse(pair.Value, out createdDate))
                    {
                        createdDate       = createdDate.ToLocalTime();
                        this.CreationDate = createdDate;
                        InitializeCreationHour(createdDate);
                    }
                    break;

                case "Csidl":
                    int result = 0;
                    if (int.TryParse(pair.Value, out result))
                    {
                        this.Csidl = result;
                    }
                    break;

                case "Modified":
                    DateTime modifiedDate;
                    if (DateTime.TryParse(pair.Value, out modifiedDate))
                    {
                        modifiedDate      = modifiedDate.ToLocalTime();
                        this.ModifiedDate = modifiedDate;
                        InitializeModificationHour(modifiedDate);
                    }
                    break;

                case "Size":
                    int size = 0;
                    if (int.TryParse(pair.Value, out size))
                    {
                        this.FileSize = size;
                    }
                    break;

                case "Language":
                    int language = 0;
                    if (int.TryParse(pair.Value, out language))
                    {
                        this.Language = language;
                    }
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }
        internal override void InitializeWithAttributes(Dictionary <string, string> attributes)
        {
            foreach (KeyValuePair <string, string> pair in attributes)
            {
                switch (pair.Key)
                {
                case "Comparison":
                    this.Comparison = pair.Value;
                    break;

                case "MajorVersion":
                    uint result = 0;
                    if (uint.TryParse(pair.Value, out result))
                    {
                        this.MajorVersion = result;
                    }
                    break;

                case "MinorVersion":
                    uint result2 = 0;
                    if (uint.TryParse(pair.Value, out result2))
                    {
                        this.MinorVersion = result2;
                    }
                    break;

                case "BuildNumber":
                    uint result3 = 0;
                    if (uint.TryParse(pair.Value, out result3))
                    {
                        this.BuildNumber = result3;
                    }
                    break;

                case "ServicePackMajor":
                    ushort result4 = 0;
                    if (ushort.TryParse(pair.Value, out result4))
                    {
                        this.ServicePackMajor = result4;
                    }
                    break;

                case "ServicePackMinor":
                    ushort result5 = 0;
                    if (ushort.TryParse(pair.Value, out result5))
                    {
                        this.ServicePackMinor = result5;
                    }
                    break;

                case "ProductType":
                    ushort result6 = 0;
                    if (ushort.TryParse(pair.Value, out result6))
                    {
                        this.ProductType = result6;
                    }
                    break;

                default:
                    UnsupportedAttributes.Add(pair.Key, pair.Value);
                    break;
                }
            }
        }