Source code Download: http://www.shareidea.net/opensource.htm
Online Demo: http://www.shareidea.net/workflow.htm
Video Tutorials: http://www.shareidea.net/video/sharedesigner/sharedesigner.html
Let's talk about the new label feature today.
In the rule, in order to explain the rules, you can add a textblack to the rule class to annotate the rule, as the previous program did, as shown in the following illustration:
However, this annotation has a disadvantage, not manually adjust the position, but only according to the location of the rule automatically set the location of this article, sometimes this automatic location is not where we want to. To solve this problem, we add a "tag" class to the configuration of the workflow, which is separate from the rules and is specifically used to annotate the rules. In addition, this label is only for the display of workflow graphics, does not involve process attributes, because there is no need to do storage to the database method, only the existence of the XML configuration file can be.
20.1 Add Label class
Create a new XAML file in Vs.net, modify the file name to Label.xaml, this class is our tag class, which has two main contents, as follows:
<UserControl x:Class="Shareidea.Web.UI.Control.Workflow.Designer.Label"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
MouseLeftButtonDown="UserControl_MouseLeftButtonDown"
MouseMove="UserControl_MouseMove"
MouseLeftButtonUp="UserControl_MouseLeftButtonUp"
MouseLeave="UserControl_MouseLeave"
Width="400" Height="20">
<Grid x:Name="LayoutRoot" Background="Transparent" >
<TextBlock Name="txtLabelName" ></TextBlock>
<TextBox Name="tbLabelName" TextChanged="TextBox_TextChanged" Visibility="Collapsed"></TextBox>
</Grid>
</UserControl>
Where TextBlock is used to display the label name and the textbox to edit the label name.
This class has several important attributes:
L support drag and drop layout
L Support Import, export XML information
L Support modifying label names
L support Selection, group move
L Support Paste, copy
L Support Deletion
L SUPPORT the right mouse button menu
This section will specify a few of them.