Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

View File

@@ -0,0 +1,383 @@
#region Using directives
using System;
using System.CodeDom;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Activities.Rules;
using System.Workflow.Interop;
using System.Globalization;
using System.Workflow.Activities.Common;
#endregion
namespace System.Workflow.Activities.Rules.Design
{
#region class BasicBrowserDialog
internal abstract partial class BasicBrowserDialog : Form
{
#region members and constructors
private Activity activity;
private string name;
private IServiceProvider serviceProvider;
protected BasicBrowserDialog(Activity activity, string name)
{
if (activity == null)
throw (new ArgumentNullException("activity"));
this.activity = activity;
InitializeComponent();
// set captions
this.descriptionLabel.Text = DescriptionText;
this.Text = TitleText;
this.previewLabel.Text = PreviewLabelText;
this.newRuleToolStripButton.Enabled = true;
this.name = name;
serviceProvider = activity.Site;
//Set dialog fonts
IUIService uisvc = (IUIService)activity.Site.GetService(typeof(IUIService));
if (uisvc != null)
this.Font = (Font)uisvc.Styles["DialogFont"];
HelpRequested += new HelpEventHandler(OnHelpRequested);
HelpButtonClicked += new CancelEventHandler(OnHelpClicked);
this.rulesListView.Select();
}
protected Activity Activity
{
get
{
return this.activity;
}
}
#endregion
#region public properties
public string SelectedName
{
get
{
return this.name;
}
}
#endregion
#region event handlers
private void OnCancel(object sender, EventArgs e)
{
this.name = null;
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void OnOk(object sender, EventArgs e)
{
object ruleObject = this.rulesListView.SelectedItems[0].Tag;
this.name = this.GetObjectName(ruleObject);
this.DialogResult = DialogResult.OK;
this.Close();
}
private void OnHelpClicked(object sender, CancelEventArgs e)
{
e.Cancel = true;
ShowHelp();
}
private void OnHelpRequested(object sender, HelpEventArgs e)
{
ShowHelp();
}
private void ShowHelp()
{
if (serviceProvider != null)
{
IHelpService helpService = serviceProvider.GetService(typeof(IHelpService)) as IHelpService;
if (helpService != null)
{
helpService.ShowHelpFromKeyword(this.GetType().FullName + ".UI");
}
else
{
IUIService uisvc = serviceProvider.GetService(typeof(IUIService)) as IUIService;
if (uisvc != null)
uisvc.ShowError(Messages.NoHelp);
}
}
else
{
IUIService uisvc = (IUIService)GetService(typeof(IUIService));
if (uisvc != null)
uisvc.ShowError(Messages.NoHelp);
}
}
private void OnNew(object sender, EventArgs e)
{
try
{
this.OnComponentChanging();
object newObject = OnNewInternal();
if (newObject != null)
{
using (new WaitCursor())
{
ListViewItem listViewItem = this.rulesListView.Items.Add(new ListViewItem());
this.UpdateListViewItem(newObject, listViewItem);
listViewItem.Selected = true;
this.OnComponentChanged();
}
}
}
catch (InvalidOperationException ex)
{
DesignerHelpers.DisplayError(ex.Message, this.Text, this.activity.Site);
}
}
private void OnEdit(object sender, EventArgs e)
{
try
{
this.OnComponentChanging();
object updatedRuleObject = null;
object ruleObject = this.rulesListView.SelectedItems[0].Tag;
if (OnEditInternal(ruleObject, out updatedRuleObject))
{
using (new WaitCursor())
{
this.UpdateListViewItem(updatedRuleObject, this.rulesListView.SelectedItems[0]);
this.UpdatePreview(this.previewRichTextBox, updatedRuleObject);
this.OnComponentChanged();
}
}
}
catch (InvalidOperationException ex)
{
DesignerHelpers.DisplayError(ex.Message, this.Text, this.activity.Site);
}
}
private void OnRename(object sender, EventArgs e)
{
try
{
this.OnComponentChanging();
object ruleObject = this.rulesListView.SelectedItems[0].Tag;
string newName = OnRenameInternal(ruleObject);
if (newName != null)
{
using (new WaitCursor())
{
ListViewItem selectedItem = this.rulesListView.SelectedItems[0];
selectedItem.Text = newName;
this.OnComponentChanged();
}
}
}
catch (InvalidOperationException ex)
{
DesignerHelpers.DisplayError(ex.Message, this.Text, this.activity.Site);
}
}
private void OnDelete(object sender, EventArgs e)
{
MessageBoxOptions mbo = (MessageBoxOptions)0;
if (CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft)
mbo = MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading;
DialogResult dr = MessageBox.Show(this, this.ConfirmDeleteMessageText, this.ConfirmDeleteTitleText,
MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, mbo);
if (dr == DialogResult.OK)
{
using (new WaitCursor())
{
object ruleObject = this.rulesListView.SelectedItems[0].Tag;
try
{
this.OnComponentChanging();
int selectionIndex = this.rulesListView.SelectedIndices[0];
object selectedRuleObject = null;
OnDeleteInternal(ruleObject);
this.rulesListView.Items.RemoveAt(selectionIndex);
if (this.rulesListView.Items.Count > 0)
{
int newSelectionIndex = Math.Min(selectionIndex, this.rulesListView.Items.Count - 1);
this.rulesListView.Items[newSelectionIndex].Selected = true;
selectedRuleObject = this.rulesListView.Items[newSelectionIndex].Tag;
}
this.UpdatePreview(this.previewRichTextBox, selectedRuleObject);
this.OnComponentChanged();
}
catch (InvalidOperationException ex)
{
DesignerHelpers.DisplayError(ex.Message, this.Text, this.activity.Site);
}
}
}
}
private void OnItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
{
if (e.IsSelected)
e.Item.Focused = true;
OnToolbarStatus();
this.okButton.Enabled = e.IsSelected;
object currentRuleObject = null;
if (e.IsSelected)
currentRuleObject = e.Item.Tag;
UpdatePreview(this.previewRichTextBox, currentRuleObject);
}
private void OnDoubleClick(object sender, EventArgs e)
{
if (this.rulesListView.SelectedItems.Count > 0)
this.OnOk(sender, e);
}
private void OnToolbarStatus()
{
if (this.rulesListView.SelectedItems.Count == 1)
{
this.editToolStripButton.Enabled = true;
this.renameToolStripButton.Enabled = true;
this.deleteToolStripButton.Enabled = true;
}
else
{
this.editToolStripButton.Enabled = false;
this.renameToolStripButton.Enabled = false;
this.deleteToolStripButton.Enabled = false;
}
}
#endregion
#region helpers
private bool OnComponentChanging()
{
bool canChange = true;
ISite site = ((IComponent)this.activity).Site;
IComponentChangeService changeService = (IComponentChangeService)site.GetService(typeof(IComponentChangeService));
if (changeService != null)
{
try
{
changeService.OnComponentChanging(this.activity, null);
}
catch (CheckoutException coEx)
{
if (coEx == CheckoutException.Canceled)
canChange = false;
else
throw;
}
}
return canChange;
}
private void OnComponentChanged()
{
ISite site = ((IComponent)this.activity).Site;
IComponentChangeService changeService = (IComponentChangeService)site.GetService(typeof(IComponentChangeService));
if (changeService != null)
changeService.OnComponentChanged(this.activity, null, null, null);
ConditionHelper.Flush_Rules_DT(site, Helpers.GetRootActivity(this.activity));
}
protected void InitializeListView(IList list, string selectedName)
{
foreach (object ruleObject in list)
{
ListViewItem listViewItem = this.rulesListView.Items.Add(new ListViewItem());
this.UpdateListViewItem(ruleObject, listViewItem);
if (GetObjectName(ruleObject) == selectedName)
listViewItem.Selected = true;
}
if (this.rulesListView.SelectedItems.Count == 0)
OnToolbarStatus();
}
#endregion
#region override methods
protected abstract string GetObjectName(object ruleObject);
//commands
protected abstract object OnNewInternal();
protected abstract bool OnEditInternal(object currentRuleObject, out object updatedRuleObject);
protected abstract void OnDeleteInternal(object ruleObject);
protected abstract string OnRenameInternal(object ruleObject);
// populating controls
protected abstract void UpdateListViewItem(object ruleObject, ListViewItem listViewItem);
protected abstract void UpdatePreview(TextBox previewTextBox, object ruleObject);
// captions
protected abstract string DescriptionText { get; }
protected abstract string TitleText { get; }
protected abstract string PreviewLabelText { get; }
protected abstract string ConfirmDeleteMessageText { get; }
protected abstract string ConfirmDeleteTitleText { get; }
internal abstract string EmptyNameErrorText { get; }
internal abstract string DuplicateNameErrorText { get; }
internal abstract string NewNameLabelText { get; }
internal abstract string RenameTitleText { get; }
internal abstract bool IsUniqueName(string ruleName);
#endregion
private class WaitCursor : IDisposable
{
private Cursor oldCursor;
public WaitCursor()
{
Application.DoEvents(); // Force redraw before waiting
oldCursor = Cursor.Current;
Cursor.Current = Cursors.WaitCursor;
}
public void Dispose()
{
Cursor.Current = oldCursor;
}
}
}
#endregion
}

View File

@@ -0,0 +1,261 @@
namespace System.Workflow.Activities.Rules.Design
{
partial class BasicBrowserDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BasicBrowserDialog));
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.rulesListView = new System.Windows.Forms.ListView();
this.nameColumnHeader = new System.Windows.Forms.ColumnHeader();
this.validColumnHeader = new System.Windows.Forms.ColumnHeader();
this.rulesPanel = new System.Windows.Forms.Panel();
this.rulesToolStrip = new System.Windows.Forms.ToolStrip();
this.imageList = new System.Windows.Forms.ImageList(this.components);
this.newRuleToolStripButton = new System.Windows.Forms.ToolStripButton();
this.editToolStripButton = new System.Windows.Forms.ToolStripButton();
this.renameToolStripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.deleteToolStripButton = new System.Windows.Forms.ToolStripButton();
this.preiviewPanel = new System.Windows.Forms.Panel();
this.previewRichEditBoxPanel = new System.Windows.Forms.Panel();
this.previewRichTextBox = new System.Windows.Forms.TextBox();
this.previewLabel = new System.Windows.Forms.Label();
this.descriptionLabel = new System.Windows.Forms.Label();
this.headerPictureBox = new System.Windows.Forms.PictureBox();
this.okCancelTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.rulesPanel.SuspendLayout();
this.rulesToolStrip.SuspendLayout();
this.preiviewPanel.SuspendLayout();
this.previewRichEditBoxPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.headerPictureBox)).BeginInit();
this.okCancelTableLayoutPanel.SuspendLayout();
this.SuspendLayout();
//
// cancelButton
//
resources.ApplyResources(this.cancelButton, "cancelButton");
this.cancelButton.CausesValidation = false;
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Name = "cancelButton";
this.cancelButton.Click += new System.EventHandler(this.OnCancel);
//
// okButton
//
resources.ApplyResources(this.okButton, "okButton");
this.okButton.Name = "okButton";
this.okButton.Click += new System.EventHandler(this.OnOk);
//
// rulesListView
//
this.rulesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.nameColumnHeader,
this.validColumnHeader});
resources.ApplyResources(this.rulesListView, "rulesListView");
this.rulesListView.FullRowSelect = true;
this.rulesListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.rulesListView.HideSelection = false;
this.rulesListView.MultiSelect = false;
this.rulesListView.Name = "rulesListView";
this.rulesListView.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.rulesListView.UseCompatibleStateImageBehavior = false;
this.rulesListView.View = System.Windows.Forms.View.Details;
this.rulesListView.DoubleClick += new System.EventHandler(this.OnDoubleClick);
this.rulesListView.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.OnItemSelectionChanged);
//
// nameColumnHeader
//
resources.ApplyResources(this.nameColumnHeader, "nameColumnHeader");
//
// validColumnHeader
//
resources.ApplyResources(this.validColumnHeader, "validColumnHeader");
//
// rulesPanel
//
resources.ApplyResources(this.rulesPanel, "rulesPanel");
this.rulesPanel.Controls.Add(this.rulesToolStrip);
this.rulesPanel.Controls.Add(this.rulesListView);
this.rulesPanel.Name = "rulesPanel";
//
// rulesToolStrip
//
this.rulesToolStrip.BackColor = System.Drawing.SystemColors.Control;
this.rulesToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.rulesToolStrip.ImageList = this.imageList;
this.rulesToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newRuleToolStripButton,
this.editToolStripButton,
this.renameToolStripButton,
this.toolStripSeparator1,
this.deleteToolStripButton});
resources.ApplyResources(this.rulesToolStrip, "rulesToolStrip");
this.rulesToolStrip.Name = "rulesToolStrip";
this.rulesToolStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.rulesToolStrip.TabStop = true;
//
// imageList
//
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
this.imageList.TransparentColor = System.Drawing.Color.Transparent;
this.imageList.Images.SetKeyName(0, "NewRule.bmp");
this.imageList.Images.SetKeyName(1, "EditRule.bmp");
this.imageList.Images.SetKeyName(2, "RenameRule.bmp");
this.imageList.Images.SetKeyName(3, "Delete.bmp");
//
// newRuleToolStripButton
//
resources.ApplyResources(this.newRuleToolStripButton, "newRuleToolStripButton");
this.newRuleToolStripButton.Name = "newRuleToolStripButton";
this.newRuleToolStripButton.Click += new System.EventHandler(this.OnNew);
//
// editToolStripButton
//
resources.ApplyResources(this.editToolStripButton, "editToolStripButton");
this.editToolStripButton.Name = "editToolStripButton";
this.editToolStripButton.Click += new System.EventHandler(this.OnEdit);
//
// renameToolStripButton
//
resources.ApplyResources(this.renameToolStripButton, "renameToolStripButton");
this.renameToolStripButton.Name = "renameToolStripButton";
this.renameToolStripButton.Click += new System.EventHandler(this.OnRename);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// deleteToolStripButton
//
resources.ApplyResources(this.deleteToolStripButton, "deleteToolStripButton");
this.deleteToolStripButton.Name = "deleteToolStripButton";
this.deleteToolStripButton.Click += new System.EventHandler(this.OnDelete);
//
// preiviewPanel
//
this.preiviewPanel.Controls.Add(this.previewRichEditBoxPanel);
this.preiviewPanel.Controls.Add(this.previewLabel);
resources.ApplyResources(this.preiviewPanel, "preiviewPanel");
this.preiviewPanel.Name = "preiviewPanel";
//
// previewRichEditBoxPanel
//
resources.ApplyResources(this.previewRichEditBoxPanel, "previewRichEditBoxPanel");
this.previewRichEditBoxPanel.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
this.previewRichEditBoxPanel.Controls.Add(this.previewRichTextBox);
this.previewRichEditBoxPanel.Name = "previewRichEditBoxPanel";
//
// previewRichTextBox
//
this.previewRichTextBox.BackColor = System.Drawing.SystemColors.Control;
this.previewRichTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
resources.ApplyResources(this.previewRichTextBox, "previewRichTextBox");
this.previewRichTextBox.Name = "previewRichTextBox";
this.previewRichTextBox.ReadOnly = true;
this.previewRichTextBox.TabStop = false;
//
// previewLabel
//
resources.ApplyResources(this.previewLabel, "previewLabel");
this.previewLabel.Name = "previewLabel";
//
// descriptionLabel
//
resources.ApplyResources(this.descriptionLabel, "descriptionLabel");
this.descriptionLabel.Name = "descriptionLabel";
//
// headerPictureBox
//
resources.ApplyResources(this.headerPictureBox, "headerPictureBox");
this.headerPictureBox.Name = "headerPictureBox";
this.headerPictureBox.TabStop = false;
//
// okCancelTableLayoutPanel
//
resources.ApplyResources(this.okCancelTableLayoutPanel, "okCancelTableLayoutPanel");
this.okCancelTableLayoutPanel.Controls.Add(this.okButton, 0, 0);
this.okCancelTableLayoutPanel.Controls.Add(this.cancelButton, 1, 0);
this.okCancelTableLayoutPanel.Name = "okCancelTableLayoutPanel";
//
// BasicBrowserDialog
//
this.AcceptButton = this.okButton;
resources.ApplyResources(this, "$this");
this.CancelButton = this.cancelButton;
this.Controls.Add(this.okCancelTableLayoutPanel);
this.Controls.Add(this.headerPictureBox);
this.Controls.Add(this.descriptionLabel);
this.Controls.Add(this.preiviewPanel);
this.Controls.Add(this.rulesPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.HelpButton = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "BasicBrowserDialog";
this.ShowInTaskbar = false;
this.rulesPanel.ResumeLayout(false);
this.rulesPanel.PerformLayout();
this.rulesToolStrip.ResumeLayout(false);
this.rulesToolStrip.PerformLayout();
this.preiviewPanel.ResumeLayout(false);
this.preiviewPanel.PerformLayout();
this.previewRichEditBoxPanel.ResumeLayout(false);
this.previewRichEditBoxPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.headerPictureBox)).EndInit();
this.okCancelTableLayoutPanel.ResumeLayout(false);
this.okCancelTableLayoutPanel.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.ListView rulesListView;
private System.Windows.Forms.Panel rulesPanel;
private System.Windows.Forms.ToolStrip rulesToolStrip;
private System.Windows.Forms.Panel preiviewPanel;
private System.Windows.Forms.Label previewLabel;
private System.Windows.Forms.ToolStripButton newRuleToolStripButton;
private System.Windows.Forms.ToolStripButton renameToolStripButton;
private System.Windows.Forms.ColumnHeader nameColumnHeader;
private System.Windows.Forms.Label descriptionLabel;
private System.Windows.Forms.PictureBox headerPictureBox;
private System.Windows.Forms.ToolStripButton editToolStripButton;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton deleteToolStripButton;
private System.Windows.Forms.Panel previewRichEditBoxPanel;
private System.Windows.Forms.TextBox previewRichTextBox;
private System.Windows.Forms.ImageList imageList;
private System.Windows.Forms.ColumnHeader validColumnHeader;
private System.Windows.Forms.TableLayoutPanel okCancelTableLayoutPanel;
}
}

View File

@@ -0,0 +1,194 @@
#region Using directives
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.Activities.Rules;
using System.Workflow.Interop;
using System.Globalization;
using Microsoft.Win32;
using System.Workflow.Activities.Common;
#endregion
namespace System.Workflow.Activities.Rules.Design
{
#region class ConditionBrowserDialog
internal sealed class ConditionBrowserDialog : BasicBrowserDialog
{
#region members and constructors
private RuleConditionCollection declarativeConditionCollection;
public ConditionBrowserDialog(Activity activity, string name)
: base(activity, name)
{
RuleDefinitions rules = ConditionHelper.Load_Rules_DT(activity.Site, Helpers.GetRootActivity(activity));
if (rules != null)
this.declarativeConditionCollection = rules.Conditions;
InitializeListView(this.declarativeConditionCollection, name);
}
#endregion
#region override members
protected override string GetObjectName(object ruleObject)
{
RuleExpressionCondition ruleExpressionCondition = ruleObject as RuleExpressionCondition;
return ruleExpressionCondition.Name;
}
protected override object OnNewInternal()
{
using (RuleConditionDialog dlg = new RuleConditionDialog(this.Activity, null))
{
if (DialogResult.OK == dlg.ShowDialog(this))
{
RuleExpressionCondition declarativeRuleDefinition = new RuleExpressionCondition();
declarativeRuleDefinition.Expression = dlg.Expression;
declarativeRuleDefinition.Name = this.CreateNewName();
this.declarativeConditionCollection.Add(declarativeRuleDefinition);
return declarativeRuleDefinition;
}
}
return null;
}
protected override bool OnEditInternal(object currentRuleObject, out object updatedRuleObject)
{
RuleExpressionCondition declarativeRuleDefinition = currentRuleObject as RuleExpressionCondition;
updatedRuleObject = null;
using (RuleConditionDialog dlg = new RuleConditionDialog(this.Activity, declarativeRuleDefinition.Expression))
{
if (DialogResult.OK == dlg.ShowDialog(this))
{
updatedRuleObject = new RuleExpressionCondition(declarativeRuleDefinition.Name, dlg.Expression);
this.declarativeConditionCollection.Remove(declarativeRuleDefinition.Name);
this.declarativeConditionCollection.Add(updatedRuleObject as RuleExpressionCondition);
return true;
}
}
return false;
}
protected override string OnRenameInternal(object ruleObject)
{
RuleExpressionCondition declarativeRuleDefinition = ruleObject as RuleExpressionCondition;
using (RenameRuleObjectDialog dlg = new RenameRuleObjectDialog(this.Activity.Site, declarativeRuleDefinition.Name, new RenameRuleObjectDialog.NameValidatorDelegate(IsUniqueName), this))
{
if ((dlg.ShowDialog(this) == DialogResult.OK) && (dlg.RuleObjectName != declarativeRuleDefinition.Name))
{
this.declarativeConditionCollection.Remove(declarativeRuleDefinition);
declarativeRuleDefinition.Name = dlg.RuleObjectName;
this.declarativeConditionCollection.Add(declarativeRuleDefinition);
return dlg.RuleObjectName;
}
}
return null;
}
protected override void OnDeleteInternal(object ruleObject)
{
RuleExpressionCondition declarativeRuleDefinition = ruleObject as RuleExpressionCondition;
this.declarativeConditionCollection.Remove(declarativeRuleDefinition.Name);
}
protected override void UpdateListViewItem(object ruleObject, ListViewItem listViewItem)
{
RuleExpressionCondition declarativeRuleDefinition = ruleObject as RuleExpressionCondition;
ITypeProvider typeProvider = (ITypeProvider)this.Activity.Site.GetService(typeof(ITypeProvider));
if (typeProvider == null)
{
string message = string.Format(CultureInfo.CurrentCulture, Messages.MissingService, typeof(ITypeProvider).FullName);
throw new InvalidOperationException(message);
}
RuleValidation validator = new RuleValidation(this.Activity, typeProvider, false);
bool valid = declarativeRuleDefinition.Validate(validator);
listViewItem.Tag = declarativeRuleDefinition;
listViewItem.Text = declarativeRuleDefinition.Name;
string validText = valid ? Messages.Yes : Messages.No;
if (listViewItem.SubItems.Count == 1)
listViewItem.SubItems.Add(validText);
else
listViewItem.SubItems[1].Text = validText;
}
protected override void UpdatePreview(TextBox previewBox, object ruleObject)
{
RuleExpressionCondition declarativeRuleDefinition = ruleObject as RuleExpressionCondition;
if (declarativeRuleDefinition != null && declarativeRuleDefinition.Expression != null)
{
RuleExpressionCondition ruleExpressionCondition = new RuleExpressionCondition(declarativeRuleDefinition.Expression);
NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero);
previewBox.Lines = ruleExpressionCondition.ToString().Split('\n');
NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
previewBox.Invalidate();
}
else
{
previewBox.Text = string.Empty;
}
}
protected override string DescriptionText { get { return Messages.ConditionDescriptionText; } }
protected override string TitleText { get { return Messages.ConditionTitleText; } }
protected override string PreviewLabelText { get { return Messages.ConditionPreviewLabelText; } }
protected override string ConfirmDeleteMessageText { get { return Messages.ConditionConfirmDeleteMessageText; } }
protected override string ConfirmDeleteTitleText { get { return Messages.DeleteCondition; } }
internal override string EmptyNameErrorText { get { return Messages.ConditionEmptyNameErrorText; } }
internal override string DuplicateNameErrorText { get { return Messages.ConditionDuplicateNameErrorText; } }
internal override string NewNameLabelText { get { return Messages.ConditionNewNameLableText; } }
internal override string RenameTitleText { get { return Messages.ConditionRenameTitleText; } }
// used by RenameConditionDialog
internal override bool IsUniqueName(string ruleName)
{
return (!this.declarativeConditionCollection.Contains(ruleName));
}
#endregion
#region helpers
private string CreateNewName()
{
string newRuleNameBase = Messages.NewConditionName;
int index = 1;
while (true)
{
string newRuleName = newRuleNameBase + index.ToString(CultureInfo.InvariantCulture);
if (!this.declarativeConditionCollection.Contains(newRuleName))
return newRuleName;
index++;
}
}
#endregion
}
#endregion
}

View File

@@ -0,0 +1,78 @@
namespace System.Workflow.Activities.Rules.Design
{
partial class IntellisenseTextBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(IntellisenseTextBox));
this.autoCompletionImageList = new System.Windows.Forms.ImageList(this.components);
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.SuspendLayout();
//
// autoCompletionImageList
//
this.autoCompletionImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("autoCompletionImageList.ImageStream")));
this.autoCompletionImageList.TransparentColor = System.Drawing.Color.Magenta;
this.autoCompletionImageList.Images.SetKeyName(0, "");
this.autoCompletionImageList.Images.SetKeyName(1, "");
this.autoCompletionImageList.Images.SetKeyName(2, "");
this.autoCompletionImageList.Images.SetKeyName(3, "");
this.autoCompletionImageList.Images.SetKeyName(4, "");
this.autoCompletionImageList.Images.SetKeyName(5, "");
this.autoCompletionImageList.Images.SetKeyName(6, "");
this.autoCompletionImageList.Images.SetKeyName(7, "");
this.autoCompletionImageList.Images.SetKeyName(8, "");
this.autoCompletionImageList.Images.SetKeyName(9, "");
this.autoCompletionImageList.Images.SetKeyName(10, "");
this.autoCompletionImageList.Images.SetKeyName(11, "");
this.autoCompletionImageList.Images.SetKeyName(12, "");
this.autoCompletionImageList.Images.SetKeyName(13, "");
this.autoCompletionImageList.Images.SetKeyName(14, "Keyword.bmp");
this.autoCompletionImageList.Images.SetKeyName(15, "MethodExtension.bmp");
//
// toolTip
//
this.toolTip.AutomaticDelay = 0;
this.toolTip.UseAnimation = false;
//
// IntellisenseTextBox
//
this.Enter += new System.EventHandler(this.IntellisenseTextBox_Enter);
this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.IntellisenseTextBox_MouseClick);
this.Leave += new System.EventHandler(this.IntellisenseTextBox_Leave);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.IntellisenseTextBox_KeyDown);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ImageList autoCompletionImageList;
private System.Windows.Forms.ToolTip toolTip;
}
}

View File

@@ -0,0 +1,100 @@
namespace System.Workflow.Activities.Rules.Design
{
partial class RenameRuleObjectDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RenameRuleObjectDialog));
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.newNamelabel = new System.Windows.Forms.Label();
this.ruleNameTextBox = new System.Windows.Forms.TextBox();
this.okCancelTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.okCancelTableLayoutPanel.SuspendLayout();
this.SuspendLayout();
//
// cancelButton
//
resources.ApplyResources(this.cancelButton, "cancelButton");
this.cancelButton.CausesValidation = false;
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Name = "cancelButton";
this.cancelButton.Click += new System.EventHandler(this.OnCancel);
//
// okButton
//
resources.ApplyResources(this.okButton, "okButton");
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Name = "okButton";
this.okButton.Click += new System.EventHandler(this.OnOk);
//
// newNamelabel
//
resources.ApplyResources(this.newNamelabel, "newNamelabel");
this.newNamelabel.Name = "newNamelabel";
this.newNamelabel.UseCompatibleTextRendering = true;
//
// ruleNameTextBox
//
resources.ApplyResources(this.ruleNameTextBox, "ruleNameTextBox");
this.ruleNameTextBox.Name = "ruleNameTextBox";
//
// okCancelTableLayoutPanel
//
resources.ApplyResources(this.okCancelTableLayoutPanel, "okCancelTableLayoutPanel");
this.okCancelTableLayoutPanel.Controls.Add(this.okButton, 0, 0);
this.okCancelTableLayoutPanel.Controls.Add(this.cancelButton, 1, 0);
this.okCancelTableLayoutPanel.Name = "okCancelTableLayoutPanel";
//
// RenameRuleObjectDialog
//
this.AcceptButton = this.okButton;
resources.ApplyResources(this, "$this");
this.CancelButton = this.cancelButton;
this.Controls.Add(this.okCancelTableLayoutPanel);
this.Controls.Add(this.ruleNameTextBox);
this.Controls.Add(this.newNamelabel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "RenameRuleObjectDialog";
this.ShowInTaskbar = false;
this.okCancelTableLayoutPanel.ResumeLayout(false);
this.okCancelTableLayoutPanel.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Label newNamelabel;
private System.Windows.Forms.TextBox ruleNameTextBox;
private System.Windows.Forms.TableLayoutPanel okCancelTableLayoutPanel;
}
}

View File

@@ -0,0 +1,121 @@
#region Using directives
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;
#endregion
namespace System.Workflow.Activities.Rules.Design
{
internal partial class RenameRuleObjectDialog : Form
{
public delegate bool NameValidatorDelegate(string name);
private string name;
private IServiceProvider serviceProvider;
private NameValidatorDelegate nameValidator;
private BasicBrowserDialog parent;
public RenameRuleObjectDialog(IServiceProvider serviceProvider, string oldName, NameValidatorDelegate nameValidator, BasicBrowserDialog parent)
{
if (oldName == null)
throw (new ArgumentNullException("oldName"));
if (serviceProvider == null)
throw (new ArgumentNullException("serviceProvider"));
if (nameValidator == null)
throw (new ArgumentNullException("nameValidator"));
this.serviceProvider = serviceProvider;
this.name = oldName;
this.nameValidator = nameValidator;
this.parent = parent;
InitializeComponent();
this.ruleNameTextBox.Text = oldName;
this.Text = parent.RenameTitleText;
this.newNamelabel.Text = parent.NewNameLabelText;
this.Icon = null;
//Set dialog fonts
IUIService uisvc = (IUIService)this.serviceProvider.GetService(typeof(IUIService));
if (uisvc != null)
this.Font = (Font)uisvc.Styles["DialogFont"];
}
public string RuleObjectName
{
get
{
return this.name;
}
}
private void OnCancel(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void OnOk(object sender, EventArgs e)
{
string newName = this.ruleNameTextBox.Text;
if (newName.Trim().Length == 0)
{
string errorMessage = parent.EmptyNameErrorText;
IUIService uisvc = (IUIService)this.serviceProvider.GetService(typeof(IUIService));
if (uisvc != null)
uisvc.ShowError(errorMessage);
else
MessageBox.Show(errorMessage, Messages.InvalidConditionNameCaption, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, DetermineOptions(sender));
this.DialogResult = DialogResult.None;
}
else if (this.name != newName && !nameValidator(newName))
{
string errorMessage = parent.DuplicateNameErrorText;
IUIService uisvc = (IUIService)this.serviceProvider.GetService(typeof(IUIService));
if (uisvc != null)
uisvc.ShowError(errorMessage);
else
MessageBox.Show(errorMessage, Messages.InvalidConditionNameCaption, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, DetermineOptions(sender));
this.DialogResult = DialogResult.None;
}
else
{
this.name = newName;
this.DialogResult = DialogResult.OK;
this.Close();
}
}
private static MessageBoxOptions DetermineOptions(object sender)
{
MessageBoxOptions options = (MessageBoxOptions)0;
Control someControl = sender as Control;
RightToLeft rightToLeftValue = RightToLeft.Inherit;
while ((rightToLeftValue == RightToLeft.Inherit) && (someControl != null))
{
rightToLeftValue = someControl.RightToLeft;
someControl = someControl.Parent;
}
if (rightToLeftValue == RightToLeft.Yes)
{
options = MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign;
}
return options;
}
}
}

View File

@@ -0,0 +1,134 @@
namespace System.Workflow.Activities.Rules.Design
{
partial class RuleConditionDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RuleConditionDialog));
this.okCancelTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.headerLabel = new System.Windows.Forms.Label();
this.headerPictureBox = new System.Windows.Forms.PictureBox();
this.conditionTextBox = new System.Workflow.Activities.Rules.Design.IntellisenseTextBox();
this.conditionLabel = new System.Windows.Forms.Label();
this.conditionErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.okCancelTableLayoutPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.headerPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.conditionErrorProvider)).BeginInit();
this.SuspendLayout();
//
// okCancelTableLayoutPanel
//
resources.ApplyResources(this.okCancelTableLayoutPanel, "okCancelTableLayoutPanel");
this.okCancelTableLayoutPanel.CausesValidation = false;
this.okCancelTableLayoutPanel.Controls.Add(this.okButton, 0, 0);
this.okCancelTableLayoutPanel.Controls.Add(this.cancelButton, 1, 0);
this.okCancelTableLayoutPanel.Name = "okCancelTableLayoutPanel";
//
// okButton
//
resources.ApplyResources(this.okButton, "okButton");
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Name = "okButton";
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// cancelButton
//
resources.ApplyResources(this.cancelButton, "cancelButton");
this.cancelButton.CausesValidation = false;
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Name = "cancelButton";
//
// headerLabel
//
resources.ApplyResources(this.headerLabel, "headerLabel");
this.headerLabel.Name = "headerLabel";
//
// headerPictureBox
//
resources.ApplyResources(this.headerPictureBox, "headerPictureBox");
this.headerPictureBox.Name = "headerPictureBox";
this.headerPictureBox.TabStop = false;
//
// conditionTextBox
//
this.conditionTextBox.AcceptsReturn = true;
resources.ApplyResources(this.conditionTextBox, "conditionTextBox");
this.conditionTextBox.Name = "conditionTextBox";
this.conditionTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.conditionTextBox_Validating);
//
// conditionLabel
//
resources.ApplyResources(this.conditionLabel, "conditionLabel");
this.conditionLabel.Name = "conditionLabel";
//
// conditionErrorProvider
//
this.conditionErrorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
this.conditionErrorProvider.ContainerControl = this;
//
// RuleConditionDialog
//
this.AcceptButton = this.okButton;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.cancelButton;
this.Controls.Add(this.conditionLabel);
this.Controls.Add(this.conditionTextBox);
this.Controls.Add(this.okCancelTableLayoutPanel);
this.Controls.Add(this.headerLabel);
this.Controls.Add(this.headerPictureBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.HelpButton = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "RuleConditionDialog";
this.ShowInTaskbar = false;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.RuleConditionDialog_FormClosing);
this.okCancelTableLayoutPanel.ResumeLayout(false);
this.okCancelTableLayoutPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.headerPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.conditionErrorProvider)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel okCancelTableLayoutPanel;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Label headerLabel;
private System.Windows.Forms.PictureBox headerPictureBox;
private IntellisenseTextBox conditionTextBox;
private System.Windows.Forms.Label conditionLabel;
private System.Windows.Forms.ErrorProvider conditionErrorProvider;
}
}

View File

@@ -0,0 +1,202 @@
// ---------------------------------------------------------------------------
// Copyright (C) 2006 Microsoft Corporation All Rights Reserved
// ---------------------------------------------------------------------------
#define CODE_ANALYSIS
using System.CodeDom;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Globalization;
using System.Reflection;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Design;
namespace System.Workflow.Activities.Rules.Design
{
public partial class RuleConditionDialog : Form
{
RuleExpressionCondition ruleExpressionCondition = new RuleExpressionCondition();
private IServiceProvider serviceProvider;
private Parser ruleParser;
private Exception syntaxException;
private bool wasOKed;
public RuleConditionDialog(Activity activity, CodeExpression expression)
{
if (activity == null)
throw (new ArgumentNullException("activity"));
InitializeComponent();
ITypeProvider typeProvider;
serviceProvider = activity.Site;
if (serviceProvider != null)
{
IUIService uisvc = serviceProvider.GetService(typeof(IUIService)) as IUIService;
if (uisvc != null)
this.Font = (Font)uisvc.Styles["DialogFont"];
typeProvider = (ITypeProvider)serviceProvider.GetService(typeof(ITypeProvider));
if (typeProvider == null)
{
string message = string.Format(CultureInfo.CurrentCulture, Messages.MissingService, typeof(ITypeProvider).FullName);
throw new InvalidOperationException(message);
}
WorkflowDesignerLoader loader = serviceProvider.GetService(typeof(WorkflowDesignerLoader)) as WorkflowDesignerLoader;
if (loader != null)
loader.Flush();
}
else
{
// no service provider, so make a TypeProvider that has all loaded Assemblies
TypeProvider newProvider = new TypeProvider(null);
foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
newProvider.AddAssembly(a);
typeProvider = newProvider;
}
RuleValidation validation = new RuleValidation(activity, typeProvider, false);
this.ruleParser = new Parser(validation);
InitializeDialog(expression);
}
public RuleConditionDialog(Type activityType, ITypeProvider typeProvider, CodeExpression expression)
{
if (activityType == null)
throw (new ArgumentNullException("activityType"));
InitializeComponent();
RuleValidation validation = new RuleValidation(activityType, typeProvider);
this.ruleParser = new Parser(validation);
InitializeDialog(expression);
}
private void InitializeDialog(CodeExpression expression)
{
HelpRequested += new HelpEventHandler(OnHelpRequested);
HelpButtonClicked += new CancelEventHandler(OnHelpClicked);
if (expression != null)
{
this.ruleExpressionCondition.Expression = RuleExpressionWalker.Clone(expression);
this.conditionTextBox.Text = ruleExpressionCondition.ToString().Replace("\n", "\r\n");
}
else
this.conditionTextBox.Text = string.Empty;
this.conditionTextBox.PopulateAutoCompleteList += new EventHandler<AutoCompletionEventArgs>(ConditionTextBox_PopulateAutoCompleteList);
this.conditionTextBox.PopulateToolTipList += new EventHandler<AutoCompletionEventArgs>(ConditionTextBox_PopulateAutoCompleteList);
try
{
this.ruleParser.ParseCondition(this.conditionTextBox.Text);
conditionErrorProvider.SetError(this.conditionTextBox, string.Empty);
}
catch (RuleSyntaxException ex)
{
conditionErrorProvider.SetError(this.conditionTextBox, ex.Message);
}
}
public CodeExpression Expression
{
get
{
return this.ruleExpressionCondition.Expression;
}
}
private void ConditionTextBox_PopulateAutoCompleteList(object sender, AutoCompletionEventArgs e)
{
e.AutoCompleteValues = this.ruleParser.GetExpressionCompletions(e.Prefix);
}
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
private void conditionTextBox_Validating(object sender, CancelEventArgs e)
{
try
{
this.ruleExpressionCondition = (RuleExpressionCondition)this.ruleParser.ParseCondition(this.conditionTextBox.Text);
if (!string.IsNullOrEmpty(this.conditionTextBox.Text))
this.conditionTextBox.Text = this.ruleExpressionCondition.ToString().Replace("\n", "\r\n");
conditionErrorProvider.SetError(this.conditionTextBox, string.Empty);
syntaxException = null;
}
catch (Exception ex)
{
syntaxException = ex;
conditionErrorProvider.SetError(this.conditionTextBox, ex.Message);
}
}
private void OnHelpClicked(object sender, CancelEventArgs e)
{
e.Cancel = true;
ShowHelp();
}
private void OnHelpRequested(object sender, HelpEventArgs e)
{
ShowHelp();
}
private void ShowHelp()
{
if (serviceProvider != null)
{
IHelpService helpService = serviceProvider.GetService(typeof(IHelpService)) as IHelpService;
if (helpService != null)
{
helpService.ShowHelpFromKeyword(this.GetType().FullName + ".UI");
}
else
{
IUIService uisvc = serviceProvider.GetService(typeof(IUIService)) as IUIService;
if (uisvc != null)
uisvc.ShowError(Messages.NoHelp);
}
}
else
{
IUIService uisvc = (IUIService)GetService(typeof(IUIService));
if (uisvc != null)
uisvc.ShowError(Messages.NoHelp);
}
}
private void okButton_Click(object sender, EventArgs e)
{
wasOKed = true;
}
private void RuleConditionDialog_FormClosing(object sender, FormClosingEventArgs e)
{
if (wasOKed && syntaxException != null)
{
e.Cancel = true;
DesignerHelpers.DisplayError(Messages.Error_ConditionParser + "\n" + syntaxException.Message, this.Text, this.serviceProvider);
if (syntaxException is RuleSyntaxException)
this.conditionTextBox.SelectionStart = ((RuleSyntaxException)syntaxException).Position;
this.conditionTextBox.SelectionLength = 0;
this.conditionTextBox.ScrollToCaret();
wasOKed = false;
}
}
}
}

View File

@@ -0,0 +1,155 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Windows.Forms;
using System.Workflow.Activities.Rules;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.Interop;
using System.Workflow.Activities.Common;
namespace System.Workflow.Activities.Rules.Design
{
#region class RuleSetBrowserDialog
internal sealed class RuleSetBrowserDialog : BasicBrowserDialog
{
#region members and constructors
private RuleSetCollection ruleSetCollection;
public RuleSetBrowserDialog(Activity activity, string name)
: base(activity, name)
{
RuleDefinitions rules = ConditionHelper.Load_Rules_DT(activity.Site, Helpers.GetRootActivity(activity));
if (rules != null)
this.ruleSetCollection = rules.RuleSets;
InitializeListView(this.ruleSetCollection, name);
}
#endregion
#region override members
protected override string GetObjectName(object ruleObject)
{
RuleSet ruleSet = ruleObject as RuleSet;
return ruleSet.Name;
}
protected override object OnNewInternal()
{
using (RuleSetDialog dlg = new RuleSetDialog(this.Activity, null))
{
if (DialogResult.OK == dlg.ShowDialog(this))
{
RuleSet ruleSet = dlg.RuleSet;
ruleSet.Name = ruleSetCollection.GenerateRuleSetName();
this.ruleSetCollection.Add(ruleSet);
return ruleSet;
}
}
return null;
}
protected override bool OnEditInternal(object currentRuleObject, out object updatedRuleObject)
{
RuleSet ruleSet = currentRuleObject as RuleSet;
updatedRuleObject = null;
using (RuleSetDialog dlg = new RuleSetDialog(this.Activity, ruleSet))
{
if (DialogResult.OK == dlg.ShowDialog())
{
this.ruleSetCollection.Remove(ruleSet.Name);
this.ruleSetCollection.Add(dlg.RuleSet);
updatedRuleObject = dlg.RuleSet;
return true;
}
}
return false;
}
protected override string OnRenameInternal(object ruleObject)
{
RuleSet ruleSet = ruleObject as RuleSet;
using (RenameRuleObjectDialog dlg = new RenameRuleObjectDialog(this.Activity.Site, ruleSet.Name, new RenameRuleObjectDialog.NameValidatorDelegate(IsUniqueName), this))
{
if ((dlg.ShowDialog(this) == DialogResult.OK) && (dlg.RuleObjectName != ruleSet.Name))
{
this.ruleSetCollection.Remove(ruleSet);
ruleSet.Name = dlg.RuleObjectName;
this.ruleSetCollection.Add(ruleSet);
return dlg.RuleObjectName;
}
}
return null;
}
protected override void OnDeleteInternal(object ruleObject)
{
RuleSet ruleSet = ruleObject as RuleSet;
this.ruleSetCollection.Remove(ruleSet.Name);
}
protected override void UpdateListViewItem(object ruleObject, ListViewItem listViewItem)
{
RuleSet ruleSet = ruleObject as RuleSet;
ValidationManager manager = new ValidationManager(this.Activity.Site);
ITypeProvider typeProvider = (ITypeProvider)manager.GetService(typeof(ITypeProvider));
RuleValidation validation = new RuleValidation(this.Activity, typeProvider, false);
bool valid;
using (WorkflowCompilationContext.CreateScope(manager))
{
valid = ruleSet.Validate(validation);
}
listViewItem.Tag = ruleSet;
listViewItem.Text = ruleSet.Name;
string validText = valid ? Messages.Yes : Messages.No;
if (listViewItem.SubItems.Count == 1)
listViewItem.SubItems.Add(validText);
else
listViewItem.SubItems[1].Text = validText;
}
protected override void UpdatePreview(TextBox previewBox, object ruleObject)
{
RuleSet ruleSet = ruleObject as RuleSet;
NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero);
previewBox.Lines = DesignerHelpers.GetRuleSetPreview(ruleSet).Split('\n');
NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
previewBox.Invalidate();
}
protected override string DescriptionText { get { return Messages.RuleSetDescriptionText; } }
protected override string TitleText { get { return Messages.RuleSetTitleText; } }
protected override string PreviewLabelText { get { return Messages.RuleSetPreviewLabelText; } }
protected override string ConfirmDeleteMessageText { get { return Messages.RuleSetConfirmDeleteMessageText; } }
protected override string ConfirmDeleteTitleText { get { return Messages.DeleteRuleSet; } }
internal override string EmptyNameErrorText { get { return Messages.RuleSetEmptyNameErrorText; } }
internal override string DuplicateNameErrorText { get { return Messages.RuleSetDuplicateNameErrorText; } }
internal override string NewNameLabelText { get { return Messages.RuleSetNewNameLableText; } }
internal override string RenameTitleText { get { return Messages.RuleSetRenameTitleText; } }
// used by RenameConditionDialog
internal override bool IsUniqueName(string ruleName)
{
return (!this.ruleSetCollection.Contains(ruleName));
}
#endregion
}
#endregion
}

View File

@@ -0,0 +1,415 @@
namespace System.Workflow.Activities.Rules.Design
{
partial class RuleSetDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RuleSetDialog));
this.nameColumnHeader = new System.Windows.Forms.ColumnHeader();
this.rulesListView = new System.Windows.Forms.ListView();
this.priorityColumnHeader = new System.Windows.Forms.ColumnHeader();
this.reevaluationCountColumnHeader = new System.Windows.Forms.ColumnHeader();
this.activeColumnHeader = new System.Windows.Forms.ColumnHeader();
this.rulePreviewColumnHeader = new System.Windows.Forms.ColumnHeader();
this.rulesGroupBox = new System.Windows.Forms.GroupBox();
this.panel1 = new System.Windows.Forms.Panel();
this.chainingLabel = new System.Windows.Forms.Label();
this.chainingBehaviourComboBox = new System.Windows.Forms.ComboBox();
this.rulesToolStrip = new System.Windows.Forms.ToolStrip();
this.imageList = new System.Windows.Forms.ImageList(this.components);
this.newRuleToolStripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.deleteToolStripButton = new System.Windows.Forms.ToolStripButton();
this.buttonOK = new System.Windows.Forms.Button();
this.ruleGroupBox = new System.Windows.Forms.GroupBox();
this.reevaluationComboBox = new System.Windows.Forms.ComboBox();
this.elseTextBox = new System.Workflow.Activities.Rules.Design.IntellisenseTextBox();
this.elseLabel = new System.Windows.Forms.Label();
this.thenTextBox = new System.Workflow.Activities.Rules.Design.IntellisenseTextBox();
this.thenLabel = new System.Windows.Forms.Label();
this.conditionTextBox = new System.Workflow.Activities.Rules.Design.IntellisenseTextBox();
this.conditionLabel = new System.Windows.Forms.Label();
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.activeCheckBox = new System.Windows.Forms.CheckBox();
this.reevaluationLabel = new System.Windows.Forms.Label();
this.priorityTextBox = new System.Windows.Forms.TextBox();
this.priorityLabel = new System.Windows.Forms.Label();
this.buttonCancel = new System.Windows.Forms.Button();
this.headerTextLabel = new System.Windows.Forms.Label();
this.pictureBoxHeader = new System.Windows.Forms.PictureBox();
this.okCancelTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.conditionErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.thenErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.elseErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.rulesGroupBox.SuspendLayout();
this.panel1.SuspendLayout();
this.rulesToolStrip.SuspendLayout();
this.ruleGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxHeader)).BeginInit();
this.okCancelTableLayoutPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.conditionErrorProvider)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.thenErrorProvider)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.elseErrorProvider)).BeginInit();
this.SuspendLayout();
//
// nameColumnHeader
//
this.nameColumnHeader.Name = "nameColumnHeader";
resources.ApplyResources(this.nameColumnHeader, "nameColumnHeader");
//
// rulesListView
//
this.rulesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.nameColumnHeader,
this.priorityColumnHeader,
this.reevaluationCountColumnHeader,
this.activeColumnHeader,
this.rulePreviewColumnHeader});
resources.ApplyResources(this.rulesListView, "rulesListView");
this.rulesListView.FullRowSelect = true;
this.rulesListView.HideSelection = false;
this.rulesListView.MultiSelect = false;
this.rulesListView.Name = "rulesListView";
this.rulesListView.UseCompatibleStateImageBehavior = false;
this.rulesListView.View = System.Windows.Forms.View.Details;
this.rulesListView.SelectedIndexChanged += new System.EventHandler(this.rulesListView_SelectedIndexChanged);
this.rulesListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.rulesListView_ColumnClick);
//
// priorityColumnHeader
//
resources.ApplyResources(this.priorityColumnHeader, "priorityColumnHeader");
//
// reevaluationCountColumnHeader
//
resources.ApplyResources(this.reevaluationCountColumnHeader, "reevaluationCountColumnHeader");
//
// activeColumnHeader
//
resources.ApplyResources(this.activeColumnHeader, "activeColumnHeader");
//
// rulePreviewColumnHeader
//
resources.ApplyResources(this.rulePreviewColumnHeader, "rulePreviewColumnHeader");
//
// rulesGroupBox
//
this.rulesGroupBox.Controls.Add(this.panel1);
resources.ApplyResources(this.rulesGroupBox, "rulesGroupBox");
this.rulesGroupBox.Name = "rulesGroupBox";
this.rulesGroupBox.TabStop = false;
//
// panel1
//
this.panel1.Controls.Add(this.chainingLabel);
this.panel1.Controls.Add(this.chainingBehaviourComboBox);
this.panel1.Controls.Add(this.rulesToolStrip);
this.panel1.Controls.Add(this.rulesListView);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// chainingLabel
//
resources.ApplyResources(this.chainingLabel, "chainingLabel");
this.chainingLabel.Name = "chainingLabel";
//
// chainingBehaviourComboBox
//
this.chainingBehaviourComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.chainingBehaviourComboBox.FormattingEnabled = true;
resources.ApplyResources(this.chainingBehaviourComboBox, "chainingBehaviourComboBox");
this.chainingBehaviourComboBox.Name = "chainingBehaviourComboBox";
this.chainingBehaviourComboBox.SelectedIndexChanged += new System.EventHandler(this.chainingBehaviourComboBox_SelectedIndexChanged);
//
// rulesToolStrip
//
this.rulesToolStrip.BackColor = System.Drawing.SystemColors.Control;
this.rulesToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.rulesToolStrip.ImageList = this.imageList;
this.rulesToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newRuleToolStripButton,
this.toolStripSeparator1,
this.deleteToolStripButton});
resources.ApplyResources(this.rulesToolStrip, "rulesToolStrip");
this.rulesToolStrip.Name = "rulesToolStrip";
this.rulesToolStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.rulesToolStrip.TabStop = true;
//
// imageList
//
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
this.imageList.TransparentColor = System.Drawing.Color.Transparent;
this.imageList.Images.SetKeyName(0, "NewRule.bmp");
this.imageList.Images.SetKeyName(1, "RenameRule.bmp");
this.imageList.Images.SetKeyName(2, "Delete.bmp");
//
// newRuleToolStripButton
//
resources.ApplyResources(this.newRuleToolStripButton, "newRuleToolStripButton");
this.newRuleToolStripButton.Name = "newRuleToolStripButton";
this.newRuleToolStripButton.Click += new System.EventHandler(this.newRuleToolStripButton_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// deleteToolStripButton
//
resources.ApplyResources(this.deleteToolStripButton, "deleteToolStripButton");
this.deleteToolStripButton.Name = "deleteToolStripButton";
this.deleteToolStripButton.Click += new System.EventHandler(this.deleteToolStripButton_Click);
//
// buttonOK
//
resources.ApplyResources(this.buttonOK, "buttonOK");
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.Name = "buttonOK";
//
// ruleGroupBox
//
this.ruleGroupBox.Controls.Add(this.reevaluationComboBox);
this.ruleGroupBox.Controls.Add(this.elseTextBox);
this.ruleGroupBox.Controls.Add(this.elseLabel);
this.ruleGroupBox.Controls.Add(this.thenTextBox);
this.ruleGroupBox.Controls.Add(this.thenLabel);
this.ruleGroupBox.Controls.Add(this.conditionTextBox);
this.ruleGroupBox.Controls.Add(this.conditionLabel);
this.ruleGroupBox.Controls.Add(this.nameTextBox);
this.ruleGroupBox.Controls.Add(this.nameLabel);
this.ruleGroupBox.Controls.Add(this.activeCheckBox);
this.ruleGroupBox.Controls.Add(this.reevaluationLabel);
this.ruleGroupBox.Controls.Add(this.priorityTextBox);
this.ruleGroupBox.Controls.Add(this.priorityLabel);
resources.ApplyResources(this.ruleGroupBox, "ruleGroupBox");
this.ruleGroupBox.Name = "ruleGroupBox";
this.ruleGroupBox.TabStop = false;
//
// reevaluationComboBox
//
this.reevaluationComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.reevaluationComboBox.FormattingEnabled = true;
resources.ApplyResources(this.reevaluationComboBox, "reevaluationComboBox");
this.reevaluationComboBox.Name = "reevaluationComboBox";
this.reevaluationComboBox.SelectedIndexChanged += new System.EventHandler(this.reevaluationComboBox_SelectedIndexChanged);
//
// elseTextBox
//
this.elseTextBox.AcceptsReturn = true;
resources.ApplyResources(this.elseTextBox, "elseTextBox");
this.elseTextBox.Name = "elseTextBox";
this.elseTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.elseTextBox_Validating);
//
// elseLabel
//
resources.ApplyResources(this.elseLabel, "elseLabel");
this.elseLabel.Name = "elseLabel";
//
// thenTextBox
//
this.thenTextBox.AcceptsReturn = true;
resources.ApplyResources(this.thenTextBox, "thenTextBox");
this.thenTextBox.Name = "thenTextBox";
this.thenTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.thenTextBox_Validating);
//
// thenLabel
//
resources.ApplyResources(this.thenLabel, "thenLabel");
this.thenLabel.Name = "thenLabel";
//
// conditionTextBox
//
this.conditionTextBox.AcceptsReturn = true;
resources.ApplyResources(this.conditionTextBox, "conditionTextBox");
this.conditionTextBox.Name = "conditionTextBox";
this.conditionTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.conditionTextBox_Validating);
//
// conditionLabel
//
resources.ApplyResources(this.conditionLabel, "conditionLabel");
this.conditionLabel.Name = "conditionLabel";
//
// nameTextBox
//
resources.ApplyResources(this.nameTextBox, "nameTextBox");
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.nameTextBox_Validating);
//
// nameLabel
//
resources.ApplyResources(this.nameLabel, "nameLabel");
this.nameLabel.Name = "nameLabel";
//
// activeCheckBox
//
resources.ApplyResources(this.activeCheckBox, "activeCheckBox");
this.activeCheckBox.Name = "activeCheckBox";
this.activeCheckBox.CheckedChanged += new System.EventHandler(this.activeCheckBox_CheckedChanged);
//
// reevaluationLabel
//
resources.ApplyResources(this.reevaluationLabel, "reevaluationLabel");
this.reevaluationLabel.Name = "reevaluationLabel";
//
// priorityTextBox
//
resources.ApplyResources(this.priorityTextBox, "priorityTextBox");
this.priorityTextBox.Name = "priorityTextBox";
this.priorityTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.priorityTextBox_Validating);
//
// priorityLabel
//
resources.ApplyResources(this.priorityLabel, "priorityLabel");
this.priorityLabel.Name = "priorityLabel";
//
// buttonCancel
//
resources.ApplyResources(this.buttonCancel, "buttonCancel");
this.buttonCancel.CausesValidation = false;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// headerTextLabel
//
resources.ApplyResources(this.headerTextLabel, "headerTextLabel");
this.headerTextLabel.Name = "headerTextLabel";
//
// pictureBoxHeader
//
resources.ApplyResources(this.pictureBoxHeader, "pictureBoxHeader");
this.pictureBoxHeader.Name = "pictureBoxHeader";
this.pictureBoxHeader.TabStop = false;
//
// okCancelTableLayoutPanel
//
resources.ApplyResources(this.okCancelTableLayoutPanel, "okCancelTableLayoutPanel");
this.okCancelTableLayoutPanel.CausesValidation = false;
this.okCancelTableLayoutPanel.Controls.Add(this.buttonOK, 0, 0);
this.okCancelTableLayoutPanel.Controls.Add(this.buttonCancel, 1, 0);
this.okCancelTableLayoutPanel.Name = "okCancelTableLayoutPanel";
//
// conditionErrorProvider
//
this.conditionErrorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
this.conditionErrorProvider.ContainerControl = this;
//
// thenErrorProvider
//
this.thenErrorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
this.thenErrorProvider.ContainerControl = this;
//
// elseErrorProvider
//
this.elseErrorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
this.elseErrorProvider.ContainerControl = this;
//
// RuleSetDialog
//
this.AcceptButton = this.buttonOK;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
this.Controls.Add(this.ruleGroupBox);
this.Controls.Add(this.headerTextLabel);
this.Controls.Add(this.pictureBoxHeader);
this.Controls.Add(this.okCancelTableLayoutPanel);
this.Controls.Add(this.rulesGroupBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.HelpButton = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "RuleSetDialog";
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.rulesGroupBox.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.rulesToolStrip.ResumeLayout(false);
this.rulesToolStrip.PerformLayout();
this.ruleGroupBox.ResumeLayout(false);
this.ruleGroupBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxHeader)).EndInit();
this.okCancelTableLayoutPanel.ResumeLayout(false);
this.okCancelTableLayoutPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.conditionErrorProvider)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.thenErrorProvider)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.elseErrorProvider)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
void buttonCancel_Click(object sender, EventArgs e)
{
this.conditionTextBox.Validating -= this.conditionTextBox_Validating;
this.thenTextBox.Validating -= this.thenTextBox_Validating;
this.elseTextBox.Validating -= this.elseTextBox_Validating;
}
#endregion
private System.Windows.Forms.ColumnHeader nameColumnHeader;
private System.Windows.Forms.ListView rulesListView;
private System.Windows.Forms.ColumnHeader priorityColumnHeader;
private System.Windows.Forms.ColumnHeader reevaluationCountColumnHeader;
private System.Windows.Forms.ColumnHeader activeColumnHeader;
private System.Windows.Forms.ColumnHeader rulePreviewColumnHeader;
private System.Windows.Forms.GroupBox rulesGroupBox;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ToolStrip rulesToolStrip;
private System.Windows.Forms.ToolStripButton newRuleToolStripButton;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton deleteToolStripButton;
private System.Windows.Forms.ImageList imageList;
private System.Windows.Forms.Button buttonOK;
private System.Windows.Forms.GroupBox ruleGroupBox;
private System.Windows.Forms.Button buttonCancel;
private System.Windows.Forms.Label headerTextLabel;
private System.Windows.Forms.PictureBox pictureBoxHeader;
private System.Windows.Forms.TableLayoutPanel okCancelTableLayoutPanel;
private System.Windows.Forms.CheckBox activeCheckBox;
private System.Windows.Forms.Label reevaluationLabel;
private System.Windows.Forms.TextBox priorityTextBox;
private System.Windows.Forms.Label priorityLabel;
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.ErrorProvider conditionErrorProvider;
private System.Windows.Forms.ErrorProvider thenErrorProvider;
private System.Windows.Forms.ErrorProvider elseErrorProvider;
private IntellisenseTextBox elseTextBox;
private System.Windows.Forms.Label elseLabel;
private IntellisenseTextBox thenTextBox;
private System.Windows.Forms.Label thenLabel;
private IntellisenseTextBox conditionTextBox;
private System.Windows.Forms.Label conditionLabel;
private System.Windows.Forms.ComboBox reevaluationComboBox;
private System.Windows.Forms.ComboBox chainingBehaviourComboBox;
private System.Windows.Forms.Label chainingLabel;
}
}