diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -8,3 +8,5 @@ Implab/obj/
TestResults/
Implab.Fx/obj/
Implab.Fx/bin/
+Implab.Fx.Test/bin/
+Implab.Fx.Test/obj/
diff --git a/Implab.Fx.Test/Implab.Fx.Test.csproj b/Implab.Fx.Test/Implab.Fx.Test.csproj
new file mode 100644
--- /dev/null
+++ b/Implab.Fx.Test/Implab.Fx.Test.csproj
@@ -0,0 +1,94 @@
+
+
+
+ Debug
+ AnyCPU
+
+
+ 2.0
+ {2F31E405-E267-4195-A05D-574093C21209}
+ Library
+ Properties
+ Implab.Fx.Test
+ Implab.Fx.Test
+ v4.0
+ 512
+ {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+ 3.5
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+
+ Form
+
+
+ MainForm.cs
+
+
+ Form
+
+
+ OverlayForm.cs
+
+
+
+
+ MainForm.cs
+
+
+ OverlayForm.cs
+
+
+
+
+ {06E706F8-6881-43EB-927E-FFC503AF6ABC}
+ Implab.Fx
+
+
+ {F550F1F8-8746-4AD0-9614-855F4C4B7F05}
+ Implab
+
+
+
+
+
\ No newline at end of file
diff --git a/Implab.Fx.Test/OverlayTest.cs b/Implab.Fx.Test/OverlayTest.cs
new file mode 100644
--- /dev/null
+++ b/Implab.Fx.Test/OverlayTest.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Text;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Windows.Forms;
+using Implab.Fx.Test.Sample;
+using System.Drawing;
+using Implab.Fx;
+
+namespace Implab.Fx.Test
+{
+ [TestClass]
+ public class OverlayTest
+ {
+ [TestMethod]
+ public void TestMethod1()
+ {
+ var mainForm = new MainForm();
+
+ mainForm.ButtonEvent += (sender, args) =>
+ {
+ var overlay = new OverlayForm();
+ mainForm.OverlayFadeIn(overlay).Then(
+ o => o.ButtonEvent += (s2, args2) =>
+ {
+ o.CloseFadeOut();
+ }
+ );
+ };
+
+ Application.Run(mainForm);
+ }
+ }
+}
diff --git a/Implab.Fx.Test/Properties/AssemblyInfo.cs b/Implab.Fx.Test/Properties/AssemblyInfo.cs
new file mode 100644
--- /dev/null
+++ b/Implab.Fx.Test/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Implab.Fx.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Implab.Fx.Test")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("ac9cc552-177e-4b6d-923c-763dc6f87dd6")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Implab.Fx.Test/Sample/MainForm.Designer.cs b/Implab.Fx.Test/Sample/MainForm.Designer.cs
new file mode 100644
--- /dev/null
+++ b/Implab.Fx.Test/Sample/MainForm.Designer.cs
@@ -0,0 +1,82 @@
+namespace Implab.Fx.Test.Sample
+{
+ partial class MainForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.listBox1 = new System.Windows.Forms.ListBox();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(138, 12);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "button1";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // comboBox1
+ //
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(138, 41);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(121, 21);
+ this.comboBox1.TabIndex = 1;
+ //
+ // listBox1
+ //
+ this.listBox1.FormattingEnabled = true;
+ this.listBox1.Location = new System.Drawing.Point(12, 12);
+ this.listBox1.Name = "listBox1";
+ this.listBox1.Size = new System.Drawing.Size(120, 95);
+ this.listBox1.TabIndex = 2;
+ //
+ // MainForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 262);
+ this.Controls.Add(this.listBox1);
+ this.Controls.Add(this.comboBox1);
+ this.Controls.Add(this.button1);
+ this.Name = "MainForm";
+ this.Text = "MainForm";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.ListBox listBox1;
+ }
+}
\ No newline at end of file
diff --git a/Implab.Fx.Test/Sample/MainForm.cs b/Implab.Fx.Test/Sample/MainForm.cs
new file mode 100644
--- /dev/null
+++ b/Implab.Fx.Test/Sample/MainForm.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Implab.Fx.Test.Sample
+{
+ public partial class MainForm : Form
+ {
+ public event EventHandler ButtonEvent;
+
+ public MainForm()
+ {
+ InitializeComponent();
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ EventHandler temp = ButtonEvent;
+ if (temp != null)
+ {
+ temp(this,new EventArgs());
+ }
+ }
+ }
+}
diff --git a/Implab.Fx.Test/Sample/MainForm.resx b/Implab.Fx.Test/Sample/MainForm.resx
new file mode 100644
--- /dev/null
+++ b/Implab.Fx.Test/Sample/MainForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Implab.Fx.Test/Sample/OverlayForm.Designer.cs b/Implab.Fx.Test/Sample/OverlayForm.Designer.cs
new file mode 100644
--- /dev/null
+++ b/Implab.Fx.Test/Sample/OverlayForm.Designer.cs
@@ -0,0 +1,99 @@
+namespace Implab.Fx.Test.Sample
+{
+ partial class OverlayForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.checkBox1 = new System.Windows.Forms.CheckBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.progressBar1 = new System.Windows.Forms.ProgressBar();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(12, 12);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "button1";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // checkBox1
+ //
+ this.checkBox1.AutoSize = true;
+ this.checkBox1.Location = new System.Drawing.Point(12, 88);
+ this.checkBox1.Name = "checkBox1";
+ this.checkBox1.Size = new System.Drawing.Size(80, 17);
+ this.checkBox1.TabIndex = 1;
+ this.checkBox1.Text = "checkBox1";
+ this.checkBox1.UseVisualStyleBackColor = true;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(13, 42);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(35, 13);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "label1";
+ //
+ // progressBar1
+ //
+ this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.progressBar1.Location = new System.Drawing.Point(12, 59);
+ this.progressBar1.Name = "progressBar1";
+ this.progressBar1.Size = new System.Drawing.Size(260, 23);
+ this.progressBar1.TabIndex = 3;
+ //
+ // OverlayForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 262);
+ this.Controls.Add(this.progressBar1);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.checkBox1);
+ this.Controls.Add(this.button1);
+ this.Name = "OverlayForm";
+ this.Text = "OverlayForm";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.CheckBox checkBox1;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.ProgressBar progressBar1;
+ }
+}
\ No newline at end of file
diff --git a/Implab.Fx.Test/Sample/OverlayForm.cs b/Implab.Fx.Test/Sample/OverlayForm.cs
new file mode 100644
--- /dev/null
+++ b/Implab.Fx.Test/Sample/OverlayForm.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Implab.Fx.Test.Sample
+{
+ public partial class OverlayForm : Form
+ {
+ public event EventHandler ButtonEvent;
+
+ public OverlayForm()
+ {
+ InitializeComponent();
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ EventHandler temp = ButtonEvent;
+ if (temp != null)
+ {
+ temp(this,new EventArgs());
+ }
+ }
+ }
+}
diff --git a/Implab.Fx.Test/Sample/OverlayForm.resx b/Implab.Fx.Test/Sample/OverlayForm.resx
new file mode 100644
--- /dev/null
+++ b/Implab.Fx.Test/Sample/OverlayForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Implab.Fx/AnimationHelpers.cs b/Implab.Fx/AnimationHelpers.cs
--- a/Implab.Fx/AnimationHelpers.cs
+++ b/Implab.Fx/AnimationHelpers.cs
@@ -9,7 +9,7 @@ namespace Implab.Fx
{
public static class AnimationHelpers
{
- public static Animation AnimateProperty(this Animation animation, Action setter, Func getter, TVal newValue, Func fx) where TTarget: class
+ public static Animation AnimateProperty(this Animation animation, Action setter, Func getter, TVal newValue, Func fx) where TTarget : class
{
if (animation == null)
throw new ArgumentNullException("animation");
@@ -25,9 +25,9 @@ namespace Implab.Fx
return animation;
}
- public static Animation