Exemplo n.º 1
0
		private static string CallCleanThread(PDFCleanActionPropertySet cleanProperties, string input, ref Dictionary<string, string> streamProperties, PDFCleanPropertiesDisplayTranslator strings)
		{
            var password = String.Empty;    
            if (streamProperties.ContainsKey("OpenPassword"))
            {
	            password = streamProperties["OpenPassword"];
	        }
		    
            RunCleanThread(new CleanData()
                { 
                    CleanProperties = cleanProperties, 
                    File = input, 
                    OpenPassword = password 
                });

			return input;
		}
		private void AddInvisibleProperty(string key, PDFCleanPropertiesDisplayTranslator displayer, bool value, bool readOnly)
		{
			AddProperty(key, displayer, typeof(bool), PropertyDisplayType.Checkbox, false, false, value, readOnly);
		}
		private void AddProperty(string key, PDFCleanPropertiesDisplayTranslator displayer, Type dataType, PropertyDisplayType displayType, bool visible, bool allowOverride, object value, bool readOnly)
		{
			string name = (displayer == null ? key : displayer.GetDisplayType(key));
			ActionProperty property = new ActionProperty(name, dataType, displayType, visible, allowOverride, value, readOnly);
			Add(key, property);
		}
		private void AddProperty(string key, PDFCleanPropertiesDisplayTranslator displayer, string value, bool readOnly)
		{
			AddProperty(key, displayer, typeof(string), PropertyDisplayType.TextBox, true, true, value, readOnly);
		}