# HG changeset patch # User cin # Date 1379062468 -14400 # Node ID 1e9583086e99e025f68820763c3bc1014ff54d68 # Parent aa367305156b01c12b4a00e6ee295bd716edf191 Added Impl.Fx diff -r aa367305156b -r 1e9583086e99 .hgignore --- a/.hgignore Thu Aug 29 17:03:44 2013 +0400 +++ b/.hgignore Fri Sep 13 12:54:28 2013 +0400 @@ -6,3 +6,4 @@ Implab/bin/ Implab/obj/ TestResults/ +Implab.Fx/obj/ diff -r aa367305156b -r 1e9583086e99 Implab.Fx/Animation.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Implab.Fx/Animation.cs Fri Sep 13 12:54:28 2013 +0400 @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Implab.Fx +{ + public class Animation + { + int m_duration; + int m_fps; + + + } +} diff -r aa367305156b -r 1e9583086e99 Implab.Fx/ControlHelpers.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Implab.Fx/ControlHelpers.cs Fri Sep 13 12:54:28 2013 +0400 @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Implab.Fx +{ + public static class ControlHelpers + { + /// + /// Переключает обработку обещания в поток указанного элемента управления. + /// + /// Тип результата обещания + /// Исходное обещание + /// Элемент управления + /// Новое обещание, обработчики которого будут выполнены в потоке элемента управления. + /// Параметр не может быть null. + /// + /// client + /// .Get("description.txt") // returns a promise + /// .DirectToControl(m_ctl) // handle the promise in the thread of the control + /// .Then( + /// description => m_ctl.Text = description // now it's safe + /// ) + /// + public static Promise DirectToControl(this Promise that, Control ctl) + { + if (that == null) + throw new ArgumentNullException("that"); + if (ctl == null) + throw new ArgumentNullException("ctl"); + + var directed = new Promise(); + + that.Then( + res => + { + if (ctl.InvokeRequired) + ctl.Invoke(new Action(directed.Resolve),res); + else + directed.Resolve(res); + }, + err => + { + if (ctl.InvokeRequired) + ctl.Invoke(new Action(directed.Reject), err); + else + directed.Reject(err); + } + ); + + return directed; + } + } +} diff -r aa367305156b -r 1e9583086e99 Implab.Fx/Implab.Fx.csproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Implab.Fx/Implab.Fx.csproj Fri Sep 13 12:54:28 2013 +0400 @@ -0,0 +1,61 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {06E706F8-6881-43EB-927E-FFC503AF6ABC} + Library + Properties + Implab.Fx + Implab.Fx + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + {99B95D0D-9CF9-4F70-8ADF-F4D0AA5CB0D9} + Implab + + + + + \ No newline at end of file diff -r aa367305156b -r 1e9583086e99 Implab.Fx/Properties/AssemblyInfo.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Implab.Fx/Properties/AssemblyInfo.cs Fri Sep 13 12:54:28 2013 +0400 @@ -0,0 +1,36 @@ +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")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Implab.Fx")] +[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("d239c29f-98e2-4942-9569-554a8511d07b")] + +// 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.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff -r aa367305156b -r 1e9583086e99 Implab.sln --- a/Implab.sln Thu Aug 29 17:03:44 2013 +0400 +++ b/Implab.sln Fri Sep 13 12:54:28 2013 +0400 @@ -12,6 +12,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Implab.Test", "Implab.Test\Implab.Test.csproj", "{63F92C0C-61BF-48C0-A377-8D67C3C661D0}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Implab.Fx", "Implab.Fx\Implab.Fx.csproj", "{06E706F8-6881-43EB-927E-FFC503AF6ABC}" +EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Implab.vsmdi @@ -29,6 +31,10 @@ {63F92C0C-61BF-48C0-A377-8D67C3C661D0}.Debug|Any CPU.Build.0 = Debug|Any CPU {63F92C0C-61BF-48C0-A377-8D67C3C661D0}.Release|Any CPU.ActiveCfg = Release|Any CPU {63F92C0C-61BF-48C0-A377-8D67C3C661D0}.Release|Any CPU.Build.0 = Release|Any CPU + {06E706F8-6881-43EB-927E-FFC503AF6ABC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06E706F8-6881-43EB-927E-FFC503AF6ABC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06E706F8-6881-43EB-927E-FFC503AF6ABC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06E706F8-6881-43EB-927E-FFC503AF6ABC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff -r aa367305156b -r 1e9583086e99 Implab.suo Binary file Implab.suo has changed