# HG changeset patch # User cin # Date 2013-09-13 08:54:28 # Node ID 1e9583086e99e025f68820763c3bc1014ff54d68 # Parent aa367305156b01c12b4a00e6ee295bd716edf191 Added Impl.Fx diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -6,3 +6,4 @@ Implab.Test/obj/ Implab/bin/ Implab/obj/ TestResults/ +Implab.Fx/obj/ diff --git a/Implab.Fx/Animation.cs b/Implab.Fx/Animation.cs new file mode 100644 --- /dev/null +++ b/Implab.Fx/Animation.cs @@ -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 --git a/Implab.Fx/ControlHelpers.cs b/Implab.Fx/ControlHelpers.cs new file mode 100644 --- /dev/null +++ b/Implab.Fx/ControlHelpers.cs @@ -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 --git a/Implab.Fx/Implab.Fx.csproj b/Implab.Fx/Implab.Fx.csproj new file mode 100644 --- /dev/null +++ b/Implab.Fx/Implab.Fx.csproj @@ -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 --git a/Implab.Fx/Properties/AssemblyInfo.cs b/Implab.Fx/Properties/AssemblyInfo.cs new file mode 100644 --- /dev/null +++ b/Implab.Fx/Properties/AssemblyInfo.cs @@ -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 --git a/Implab.sln b/Implab.sln --- a/Implab.sln +++ b/Implab.sln @@ -12,6 +12,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956 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 @@ Global {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 --git a/Implab.suo b/Implab.suo index 15dcf3269422ccfd545ebcb6e6d25425c37cd74a..5ef9f84caa1609b501f07d62659a5c03f93635a0 GIT binary patch literal 20480 zc%1EAU5p!76~0ckNt$F!lcuF@O1nuzY16eC?|NDLJB$^$~BN+0O*oij7G z$LpUN?cT}GePa{0?)q2W`(T0}(w z*OHiTRs|i)O^_OMtUJ22ed15Y-=BElf@>}A_Zp3-fKd}C#C~AU;w~!Y9O7SN(K&Ye zU2j|yLJ?(gQcQ>(t`%_v-zsP_>&son*(KJvXdgJiPdao%4S!A)!3DxuHfT`6i!{C? zfK$RNByn%sv33JL?c3`N8tmXFoozNW_a&_f>49s6b-xlc?*D#K-~Y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