• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Workshare类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Workshare的典型用法代码示例。如果您正苦于以下问题:C# Workshare类的具体用法?C# Workshare怎么用?C# Workshare使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Workshare类属于命名空间,在下文中一共展示了Workshare类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ConstructFilter

 override protected void ConstructFilter(System.IO.Stream partData, Workshare.FCS.Lite.Base.DocumentText discoveryText, DocumentProcessingActions action)
 {
     ConstructFilterObject(discoveryText);
     m_xmlFilter.ConnectToInputStream(partData);//this doesn't write anything it is just going to store data for when we process the strings later
     if (action == DocumentProcessingActions.Clean)
         m_xmlFilter.IsCleaning = true;
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:XlsxPreprocessWorksheetPartFilter.cs


示例2: ConditionsResourceSelectorForm

 public ConditionsResourceSelectorForm(Workshare.Policy.PolicyType type)
 {
     m_type = type;
     InitializeComponent();
     if (type == Workshare.Policy.PolicyType.ActiveContent)
         checkBox1.Enabled = false;
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:ConditionsResourceSelectorForm.cs


示例3: RetrieveActionPropValue

		private static object RetrieveActionPropValue(Workshare.PolicyContent.ActionProperty apIn)
		{
			Type actionPropType = Type.GetType(apIn.Type, false);
			if (null != actionPropType)
			{
				try
				{
					switch (actionPropType.FullName)
					{
						case "System.String":
							return apIn.Value;
						case "System.Boolean":
							return bool.Parse(apIn.Value);
						case "System.DateTime":
							return DateTime.Parse(apIn.Value, CultureInfo.InvariantCulture);
						default:
							return null;
					}
				}
				catch (Exception)
				{
					return null;
				}
			}

			return null;
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:27,代码来源:ActionPropertyAdaptor.cs


示例4: GetIRoutingResponse

		internal static IRoutingResponse GetIRoutingResponse(Workshare.PolicyContent.Routing routingIn)
		{
			if ( null == routingIn )
				return null;

			RoutingResponse routingOut = new RoutingResponse();

			routingOut.ActionSetId = string.Empty; //TODO:
			routingOut.RoutingId = string.Empty; //TODO:

			routingOut.Description = routingIn.Description;
			routingOut.Name = routingIn.Name;
			routingOut.Rating = routingIn.Rating;

			routingOut.Properties = new Dictionary<string, string>();
			if ( routingIn.Properties != null)
			{
				foreach (CustomProperty property in routingIn.Properties)
				{
					routingOut.Properties[property.Name] = property.Value;
				}
			}

			return routingOut;
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:25,代码来源:RoutingAdaptor.cs


示例5: CreateConditionDisplay

		/// <summary>
		/// Creates a visual representation of a condition
		/// </summary>
		/// <returns>A ConditionMethodDisplay object</returns>
		public static ConditionDisplayBase CreateConditionDisplay(ICondition condition, Workshare.Policy.PolicyType type)
		{
			ConditionUnitFactory.PreDefinedConditionType conditionType = ConditionUnitFactory.PreDefinedConditionType.Undefined;

			try
			{
				conditionType = CustomAttributes.GetPreDefinedConditionType(condition);
			}
			catch (ArgumentException ex)
			{
				Logger.LogError("Condition is not one of our predefined types.");
				Logger.LogError(ex);
				return null;
			}

			switch (conditionType)
			{
			case ConditionUnitFactory.PreDefinedConditionType.ContentInFileContext:
				return new ConditionDisplayContentInFileContext(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.RegexInFileContext:
				return new ConditionDisplayRegexInFileContext(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.ContentInFileName:
				return new ConditionDisplayContentInFileName(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.RegexInFileName:
				return new ConditionDisplayRegexInFileName(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.FileSize:
				return new ConditionDisplayFileSize(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.FileType:
				return new ConditionDisplayFileType(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.HiddenDataInFile:
				return new ConditionDisplayHiddenDataInFile(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.CustomProperty:
				return new ConditionDisplayCustomProperty(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.PasswordProtectedFile:
				return new ConditionDisplayPasswordProtectedFile(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.DocumentRestrictions:
				return new ConditionDisplayDocumentRestrictions(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.PiiInFile:
				return new ConditionDisplayPiiInFile(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.FileProperty:
				return new ConditionDisplayFileProperty(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.EmbeddedEmail:
				return new ConditionDisplayEmbeddedEmail(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.EmailAdresses:
				return new ConditionDisplayEmailAddresses(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.HiddenDataInPDF:
				return new ConditionDisplayHiddenDataInPDF(condition, type);
			case ConditionUnitFactory.PreDefinedConditionType.TotalAttachmentSize:
				return new ConditionDisplayTotalAttachmentSize(condition, type);
			default:
				{
					Utilities.ErrorMessage errorMessage = new Utilities.ErrorMessage(
						"CONDITION_INVALID_PREDEFINED",
						"Workshare.PolicyDesigner.Properties.Resources",
						System.Reflection.Assembly.GetExecutingAssembly());
					Logger.LogError(errorMessage.LogString);
					throw new ArgumentException(errorMessage.DisplayString);
				}
			}
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:64,代码来源:ConditionDisplayFactory.cs


示例6: Display

 /// <summary>
 /// Display data
 /// </summary>
 public void Display(Workshare.Policy.PolicyType type)
 {
     m_isDisplaying = true;
     DisplayLogicComboBox();
     DisplayConditions(type);
     m_isDisplaying = false;
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:10,代码来源:EditConditionsControl.cs


示例7: ProcessPart

 virtual public Stream ProcessPart(Stream partData, Workshare.FCS.Lite.Base.DocumentText discoveryText, RelatedPartProvider relPartProvider, DocumentProcessingActions action)
 {
     Initialize();
     ConstructFilter(partData, discoveryText, action);
     ExecuteFilter();
     return m_outStream;
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:XmlPartFilter.cs


示例8: GetIResolvedAction

		internal static IResolvedAction GetIResolvedAction(PolicyResponseObject pro, Workshare.PolicyContent.ResolvedAction raIn)
		{
			Workshare.Policy.Engine.ResolvedAction raOut = new Workshare.Policy.Engine.ResolvedAction();

			raOut.Sequence = raIn.Sequence;

			raOut.ContentCollection = new Collection<IContentItem>();
			if (raIn.Contents != null)
			{
				foreach (Workshare.PolicyContent.ContentItem item in raIn.Contents)
				{
					Workshare.Policy.Engine.ContentItem proItem = null;
					foreach (Workshare.Policy.Engine.ContentItem ci in pro.ContentCollection)
					{
						if (ci.File.ContentId == item.Id)
							proItem = ci;
					}
					if (proItem != null)
						raOut.ContentCollection.Add(proItem);
				}
			}

			raOut.ResponseAction = ActionAdaptor.GetIPolicyResponseAction(raIn.Action);

			return raOut;
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:26,代码来源:ResolvedActionAdaptor.cs


示例9: DocxDocumentReader

 public DocxDocumentReader(Workshare.Policy.BinaryData data)
     : base(false)
 {
     m_data = data;
     m_data.LockInMemory();
     m_myData = false;
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:DocxDocumentReader.cs


示例10: DisplayConditionResources

		/// <summary>
		/// Build up the display of condition resources. This will need to be refactored at some point to
		/// allow dynamic creation of condition types
		/// </summary>
		private void DisplayConditionResources(Workshare.Policy.PolicyType type)
		{
			int selectedRow = m_selectedAddExpressionRow;
			dataGridView1.Rows.Clear();

			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.ContentInFileContext, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.RegexInFileContext, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.PiiInFile, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.HiddenDataInFile, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.HiddenDataInPDF, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.PasswordProtectedFile, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.DocumentRestrictions, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.CustomProperty, type);
			//until we define _exactly_ what this condition should be doing then its exempt
			//DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.FileProperty, type);
			//DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.ContentInFileName);
			//DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.RegexInFileName);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.FileSize, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.FileType, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.EmbeddedEmail, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.EmailAdresses, type);
			DisplayConditionResource(ConditionUnitFactory.PreDefinedConditionType.TotalAttachmentSize, type);

			dataGridView1.AutoResizeColumn(0, DataGridViewAutoSizeColumnMode.AllCells);
			DataGridViewHelper.DoRowSelection(dataGridView1, selectedRow);
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:30,代码来源:SelectConditionResourcesControl.cs


示例11: ConstructFilterObject

 override protected StateMachineBasedXmlFilter ConstructFilterObject(Workshare.FCS.Lite.Base.DocumentText discoveryText)
 {
     if (m_preProcessing)
     {
         return new DiagramPreprocessingXmlFilter(discoveryText, m_commonNamespaces, m_contentTypesToDetect, ref m_DiagramHelper);
     }
     
     return new DiagramXmlFilter(discoveryText, m_commonNamespaces, m_contentTypesToDetect, ref m_DiagramHelper);
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:9,代码来源:DiagramXmlPartFilter.cs


示例12: ActionMatrixEventArgs

 public ActionMatrixEventArgs(IPolicy policy, IPolicyChannel channel, IRoutingItemCollection senderCollection,
     IRoutingItemCollection recipientCollection, Workshare.Policy.ObjectModel.IAction action)
 {
     m_policy = policy;
     m_channel = channel;
     m_senderCollection = senderCollection;
     m_recipientCollection = recipientCollection;
     m_action = action;
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:9,代码来源:ActionMatrixEventArgs.cs


示例13: CreateRow

		/// <summary>
		/// This method create the list view item from the message passed in.
		/// </summary>
		/// <param name="item">The item to be added</param>
        public override ListViewItem[] CreateRow(Workshare.Reports.MailMessage.Message item)
		{
            List<ListViewItem> lvis = new List<ListViewItem>();
			foreach (Document doc in item.Documents)
			{
				// Check to see if we need to show anything
				if (( Filter & doc.Policies.RiskRating ) > 0)
				{
					ListViewItem lvi = new ListViewItem();
					lvi.Text = doc.ToString( DefaultColumnName );
                    if (lvi.Text.Length == 0)
                    {
                        // Need Attachment or subject
                        if (doc.Type == Workshare.Reports.ContentType.Email)
                            lvi.Text = item.Subject;
                        else
                            lvi.Text = doc.Name;
                    }
					lvi.Tag = item;
					for (int i = 1; i < Columns.Count; i++)
					{
						ListViewItem.ListViewSubItem lvss = new ListViewItem.ListViewSubItem();
						ColumnHeader ch = Columns[i] as ColumnHeader;
						// Check to see if the column is really a rule        
						// Rating;Attachment;FailureReason;From;To;Date;Subject
						lvss.Name = ch.Name;
						if (string.Compare( ch.Name, "from", true, System.Threading.Thread.CurrentThread.CurrentCulture ) == 0)
							lvss.Text = item.Sender.Name;
						else if (string.Compare( ch.Name, "to", true, System.Threading.Thread.CurrentThread.CurrentCulture ) == 0 &&
							item.Recipients.Count > 0)
							lvss.Text = item.Recipients[0].Name;
						else if (string.Compare( ch.Name, "subject", true, System.Threading.Thread.CurrentThread.CurrentCulture ) == 0 &&
	 					    item.Recipients.Count > 0)
							lvss.Text = item.Subject;
                        else if (string.Compare(ch.Name, "mailbox", true, System.Threading.Thread.CurrentThread.CurrentCulture) == 0 &&
                            item.Recipients.Count > 0)
                            lvss.Text = item.MailBox;
						else if (string.Compare( ch.Name, "date", true, System.Threading.Thread.CurrentThread.CurrentCulture ) == 0)
						{
							StringBuilder ds = new StringBuilder();
							ds.AppendFormat( "{0} {1}", item.DateSent.ToShortDateString(), item.DateSent.ToShortTimeString() );
							lvss.Text = ds.ToString();
						}
						else
						{
							lvss.Text = doc.ToString( ch.Name );
						}
                        SetSubItemColour(lvi, item.SentExternally, lvss, doc.Policies.RiskRating);
						lvi.SubItems.Add( lvss );
					}
					SetIconIndex( lvi, doc.Type );
					SetItemColour( lvi, item.SentExternally, doc.Policies.RiskRating );
                    lvis.Add( lvi);
                }
			}
            return lvis.ToArray();
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:61,代码来源:PlainView.cs


示例14: GetIPolicyResponse

		internal static IPolicyResponse GetIPolicyResponse(Workshare.PolicyContent.Policy policyIn)
		{
			if (null == policyIn)
				throw new ArgumentException("policy");
			

			PolicyResponse policyOut = new PolicyResponse();

			policyOut.Audit = policyIn.Audit;
			policyOut.Description = policyIn.Description;
			policyOut.Name = policyIn.Name;
			policyOut.Triggered = policyIn.Triggered;
			policyOut.RoutingId = null;  //TODO: Include RoutingId. How/Why!
			policyOut.Routing = RoutingAdaptor.GetIRoutingResponse(policyIn.Routing);
			
			if ( policyIn.Properties != null)
			{
				foreach (CustomProperty property in policyIn.Properties)
				{
					switch (property.Name)
					{
						case PolicyAdaptor.ExecuteBlockProp:
							policyOut.BlockOnException = bool.TrueString == property.Value;
							break;

						case PolicyConstants.SkipVerifiedMessages:
							policyOut.SkipVerifiedMessages = bool.TrueString == property.Value;
							break;

						default:
							policyOut.Properties[property.Name] = property.Value;
							break;
					}
				}
			}

			policyOut.ActionCollection = new Collection<IPolicyResponseAction>();
			if ( policyIn.Actions != null)
			{
				foreach (Workshare.PolicyContent.Action action in policyIn.Actions)
				{
					policyOut.ActionCollection.Add( ActionAdaptor.GetIPolicyResponseAction(action) );
				}
			}

			policyOut.ExpressionCollection = new Collection<IExpressionResponse>();
			if ( policyIn.Expressions != null)
			{
				foreach (Expression expression in policyIn.Expressions)
				{
					policyOut.ExpressionCollection.Add(ExpressionAdaptor.GetIExpressionResponse(expression));
				}
			}

			return policyOut;
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:56,代码来源:PolicyAdaptor.cs


示例15: ConditionDisplayFileProperty

 /// <summary>
 /// constructor for displaying a specific instance of a condition
 /// </summary>
 /// <param name="condition">The condition to be displayed</param>
 public ConditionDisplayFileProperty(ICondition condition, Workshare.Policy.PolicyType type)
     : base(condition)
 {
     m_type = type;
     if (condition != null)
     {
         m_editable = true;
     }
     Initialise(Properties.Resources.IDS_EXPRESSION_FILEPROPERTY_DESCRIPTION, GetHyperlinks());
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:14,代码来源:ConditionDisplayFileProperty.cs


示例16: ProcessPart

 public System.IO.Stream ProcessPart(System.IO.Stream partData, Workshare.FCS.Lite.Base.DocumentText discoveryText, RelatedPartProvider relPartProvider, DocumentProcessingActions action)
 {
     switch (action)
     {
         case DocumentProcessingActions.Discover:
             return null;
         default:
             return partData;
     }
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:10,代码来源:DefaultPartFilter.cs


示例17: ConditionDisplayRegexInFileName

 /// <summary>
 /// constructor for displaying a specific instance of a condition
 /// </summary>
 /// <param name="condition">The condition to be displayed</param>
 public ConditionDisplayRegexInFileName(ICondition condition, Workshare.Policy.PolicyType type)
     : base(condition)
 {
     m_type = type;
     if (condition != null)
     {
         m_editable = true;
     }
     base.Initialise(Properties.Resources.IDS_EXPRESSION_REGEXINFILENAME_DESCRIPTION, GetHyperlinks());
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:14,代码来源:ConditionDisplayRegexInFileName.cs


示例18: ConditionDisplayParameterString

 public ConditionDisplayParameterString(string name, IDataElement dataElement, RuleObject.OnExecuteHandler executeEventHandler, Workshare.Policy.PolicyType type)
     : base(name, null, type)
 {
     AddExecuteEventHandler(executeEventHandler);
     if (dataElement != null)
     {
         Object = dataElement;
         Text = GetDisplayName();
     }
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:10,代码来源:ConditionDisplayParameterString.cs


示例19: OnPreviewResponseAction

 protected virtual void OnPreviewResponseAction(Workshare.Policy.ClientManager.PreviewResponseActionArgs args)
 {
     lock (m_previewResponseActionLock)
     {
         if (m_previewResponseAction != null)
         {
             m_previewResponseAction(this, args);
         }
     }
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:10,代码来源:SummaryContentListControl.cs


示例20: ConditionSummary

		public ConditionSummary(IPolicyObject conditionObject, Workshare.Policy.PolicyType type)
		{
			m_conditionObject = conditionObject;

			StringBuilder sb = new StringBuilder();

            ProcessConditionOrConditionGroup(m_conditionObject, sb, type);

			m_desc = sb.ToString();
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:10,代码来源:ConditionSummary.cs



注:本文中的Workshare类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Worksheet类代码示例发布时间:2022-05-24
下一篇:
C# WorkflowTypeService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap