summaryrefslogtreecommitdiff
path: root/IvyControl/IvyApplicationBindingControl.cs
diff options
context:
space:
mode:
authorfcolin2007-11-09 10:20:21 +0000
committerfcolin2007-11-09 10:20:21 +0000
commit3a1a7b17f7765edf56d2714c337c8501adcf2189 (patch)
tree6e56713f4b5983e89c2280ca37ad6c2e3015c4d4 /IvyControl/IvyApplicationBindingControl.cs
parentbd1c7b7348b8e5532040b178a891f5295e46d35b (diff)
downloadivy-csharp-3a1a7b17f7765edf56d2714c337c8501adcf2189.zip
ivy-csharp-3a1a7b17f7765edf56d2714c337c8501adcf2189.tar.gz
ivy-csharp-3a1a7b17f7765edf56d2714c337c8501adcf2189.tar.bz2
ivy-csharp-3a1a7b17f7765edf56d2714c337c8501adcf2189.tar.xz
separation des references a Windows Form
Diffstat (limited to 'IvyControl/IvyApplicationBindingControl.cs')
-rw-r--r--IvyControl/IvyApplicationBindingControl.cs121
1 files changed, 121 insertions, 0 deletions
diff --git a/IvyControl/IvyApplicationBindingControl.cs b/IvyControl/IvyApplicationBindingControl.cs
new file mode 100644
index 0000000..c4c236f
--- /dev/null
+++ b/IvyControl/IvyApplicationBindingControl.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Text;
+using System.ComponentModel;
+using System.Threading;
+
+namespace IvyBus
+{
+ /* This is the Application side of binding storage */
+ /* association of a generated Key and a delegate and the expression */
+ /* this is SEND to other client */
+#if (!PocketPC)
+ [PropertyTab(typeof(System.Windows.Forms.Design.EventsTab), PropertyTabScope.Component)]
+ [DefaultEvent("Callback")]
+#endif
+ [DesignerCategory("Component")]
+ [DesignTimeVisible(false)] /* should be added via Ivy component */
+ public class IvyApplicationBindingControl : System.ComponentModel.Component
+ {
+ public IvyApplicationBinding binding;
+
+#if (!PocketPC)
+ [Category("Ivy")]
+#endif
+ public BindingType Binding
+ {
+ get { return binding.Binding; }
+ set { binding.Binding = value; }
+ }
+
+
+#if (!PocketPC)
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+#endif
+ public ushort Key
+ {
+ get { return binding.Key; }
+ set { binding.Key = value; }
+ }
+
+#if (!PocketPC)
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+#endif
+ public object[] Args
+ {
+ get { return binding.Args; }
+ set { binding.Args = value; }
+ }
+
+#if (!PocketPC)
+ [Category("Ivy")]
+#endif
+ [DefaultValue(null)]
+ public string Expression
+ {
+ get { return binding.Expression; }
+ set { binding.Expression = value; }
+ }
+ public string FormatedExpression
+ {
+ get
+ {
+ return binding.FormatedExpression;
+ }
+ }
+
+ ///<summary>SentMessageClasses the first word token of sent messages
+ ///<remarks> optimise the parsing process when sending messages </remarks>
+ ///</summary>
+#if (!PocketPC)
+ [Category("Ivy")]
+
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+
+ // sinon bug System.String constructor not found !
+ [Editor(
+ "System.Windows.Forms.Design.StringCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
+ "System.Drawing.Design.UITypeEditor,System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
+ )]
+
+ [Description("Arguments used when formating the expression")]
+#endif
+ public List<string> Arguments
+ {
+ get
+ {
+ return binding.Arguments;
+ }
+ }
+
+#if (!PocketPC)
+ [Category("Ivy")]
+ [Description("Event fired when Message Matching expression received")]
+#endif
+ public event EventHandler<IvyMessageEventArgs> Callback
+ {
+ add
+ {
+ binding.Callback += value;
+ }
+ remove
+ {
+ binding.Callback -= value;
+ }
+ }
+
+ public IvyApplicationBindingControl()
+ {
+ binding = new IvyApplicationBinding();
+ }
+ public IvyApplicationBindingControl(IContainer container)
+ : this()
+ {
+ container.Add(this);
+ }
+ }
+
+}