Ejemplo n.º 1
0
 public void StoreValues(Data data, string path)
 {
     data.SetValue(@"" + path + @"AllowPrinting", AllowPrinting.ToString());
     data.SetValue(@"" + path + @"AllowScreenReader", AllowScreenReader.ToString());
     data.SetValue(@"" + path + @"AllowToCopyContent", AllowToCopyContent.ToString());
     data.SetValue(@"" + path + @"AllowToEditAssembly", AllowToEditAssembly.ToString());
     data.SetValue(@"" + path + @"AllowToEditComments", AllowToEditComments.ToString());
     data.SetValue(@"" + path + @"AllowToEditTheDocument", AllowToEditTheDocument.ToString());
     data.SetValue(@"" + path + @"AllowToFillForms", AllowToFillForms.ToString());
     data.SetValue(@"" + path + @"Enabled", Enabled.ToString());
     data.SetValue(@"" + path + @"EncryptionLevel", EncryptionLevel.ToString());
     data.SetValue(@"" + path + @"OwnerPassword", _ownerPassword);
     data.SetValue(@"" + path + @"RequireUserPassword", RequireUserPassword.ToString());
     data.SetValue(@"" + path + @"RestrictPrintingToLowQuality", RestrictPrintingToLowQuality.ToString());
     data.SetValue(@"" + path + @"UserPassword", _userPassword);
 }
Ejemplo n.º 2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("AllowPrinting=" + AllowPrinting.ToString());
            sb.AppendLine("AllowScreenReader=" + AllowScreenReader.ToString());
            sb.AppendLine("AllowToCopyContent=" + AllowToCopyContent.ToString());
            sb.AppendLine("AllowToEditAssembly=" + AllowToEditAssembly.ToString());
            sb.AppendLine("AllowToEditComments=" + AllowToEditComments.ToString());
            sb.AppendLine("AllowToEditTheDocument=" + AllowToEditTheDocument.ToString());
            sb.AppendLine("AllowToFillForms=" + AllowToFillForms.ToString());
            sb.AppendLine("Enabled=" + Enabled.ToString());
            sb.AppendLine("EncryptionLevel=" + EncryptionLevel.ToString());
            sb.AppendLine("OwnerPassword="******"RequireUserPassword="******"RestrictPrintingToLowQuality=" + RestrictPrintingToLowQuality.ToString());
            sb.AppendLine("UserPassword=" + UserPassword.ToString());

            return(sb.ToString());
        }
Ejemplo n.º 3
0
        public override bool Equals(object o)
        {
            if (!(o is Security))
            {
                return(false);
            }
            Security v = o as Security;

            if (!AllowPrinting.Equals(v.AllowPrinting))
            {
                return(false);
            }
            if (!AllowScreenReader.Equals(v.AllowScreenReader))
            {
                return(false);
            }
            if (!AllowToCopyContent.Equals(v.AllowToCopyContent))
            {
                return(false);
            }
            if (!AllowToEditAssembly.Equals(v.AllowToEditAssembly))
            {
                return(false);
            }
            if (!AllowToEditComments.Equals(v.AllowToEditComments))
            {
                return(false);
            }
            if (!AllowToEditTheDocument.Equals(v.AllowToEditTheDocument))
            {
                return(false);
            }
            if (!AllowToFillForms.Equals(v.AllowToFillForms))
            {
                return(false);
            }
            if (!Enabled.Equals(v.Enabled))
            {
                return(false);
            }
            if (!EncryptionLevel.Equals(v.EncryptionLevel))
            {
                return(false);
            }
            if (!OwnerPassword.Equals(v.OwnerPassword))
            {
                return(false);
            }
            if (!RequireUserPassword.Equals(v.RequireUserPassword))
            {
                return(false);
            }
            if (!RestrictPrintingToLowQuality.Equals(v.RestrictPrintingToLowQuality))
            {
                return(false);
            }
            if (!UserPassword.Equals(v.UserPassword))
            {
                return(false);
            }
            return(true);
        }