##// END OF EJS Templates
Added Impl.Fx
cin -
r3:1e9583086e99 default
parent child
Show More
@@ -0,0 +1,15
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace Implab.Fx
7 {
8 public class Animation
9 {
10 int m_duration;
11 int m_fps;
12
13
14 }
15 }
@@ -0,0 +1,56
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Windows.Forms;
6
7 namespace Implab.Fx
8 {
9 public static class ControlHelpers
10 {
11 /// <summary>
12 /// Переключает обработку обещания в поток указанного элемента управления.
13 /// </summary>
14 /// <typeparam name="T">Тип результата обещания</typeparam>
15 /// <param name="that">Исходное обещание</param>
16 /// <param name="ctl">Элемент управления</param>
17 /// <returns>Новое обещание, обработчики которого будут выполнены в потоке элемента управления.</returns>
18 /// <exception cref="ArgumentNullException">Параметр не может быть <c>null</c>.</exception>
19 /// <example>
20 /// client
21 /// .Get("description.txt") // returns a promise
22 /// .DirectToControl(m_ctl) // handle the promise in the thread of the control
23 /// .Then(
24 /// description => m_ctl.Text = description // now it's safe
25 /// )
26 /// </example>
27 public static Promise<T> DirectToControl<T>(this Promise<T> that, Control ctl)
28 {
29 if (that == null)
30 throw new ArgumentNullException("that");
31 if (ctl == null)
32 throw new ArgumentNullException("ctl");
33
34 var directed = new Promise<T>();
35
36 that.Then(
37 res =>
38 {
39 if (ctl.InvokeRequired)
40 ctl.Invoke(new Action<T>(directed.Resolve),res);
41 else
42 directed.Resolve(res);
43 },
44 err =>
45 {
46 if (ctl.InvokeRequired)
47 ctl.Invoke(new Action<Exception>(directed.Reject), err);
48 else
49 directed.Reject(err);
50 }
51 );
52
53 return directed;
54 }
55 }
56 }
@@ -0,0 +1,61
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6 <ProductVersion>8.0.30703</ProductVersion>
7 <SchemaVersion>2.0</SchemaVersion>
8 <ProjectGuid>{06E706F8-6881-43EB-927E-FFC503AF6ABC}</ProjectGuid>
9 <OutputType>Library</OutputType>
10 <AppDesignerFolder>Properties</AppDesignerFolder>
11 <RootNamespace>Implab.Fx</RootNamespace>
12 <AssemblyName>Implab.Fx</AssemblyName>
13 <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14 <FileAlignment>512</FileAlignment>
15 </PropertyGroup>
16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17 <DebugSymbols>true</DebugSymbols>
18 <DebugType>full</DebugType>
19 <Optimize>false</Optimize>
20 <OutputPath>bin\Debug\</OutputPath>
21 <DefineConstants>DEBUG;TRACE</DefineConstants>
22 <ErrorReport>prompt</ErrorReport>
23 <WarningLevel>4</WarningLevel>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26 <DebugType>pdbonly</DebugType>
27 <Optimize>true</Optimize>
28 <OutputPath>bin\Release\</OutputPath>
29 <DefineConstants>TRACE</DefineConstants>
30 <ErrorReport>prompt</ErrorReport>
31 <WarningLevel>4</WarningLevel>
32 </PropertyGroup>
33 <ItemGroup>
34 <Reference Include="System" />
35 <Reference Include="System.Core" />
36 <Reference Include="System.Windows.Forms" />
37 <Reference Include="System.Xml.Linq" />
38 <Reference Include="System.Data.DataSetExtensions" />
39 <Reference Include="Microsoft.CSharp" />
40 <Reference Include="System.Data" />
41 <Reference Include="System.Xml" />
42 </ItemGroup>
43 <ItemGroup>
44 <Compile Include="ControlHelpers.cs" />
45 <Compile Include="Properties\AssemblyInfo.cs" />
46 </ItemGroup>
47 <ItemGroup>
48 <ProjectReference Include="..\Implab\Implab.csproj">
49 <Project>{99B95D0D-9CF9-4F70-8ADF-F4D0AA5CB0D9}</Project>
50 <Name>Implab</Name>
51 </ProjectReference>
52 </ItemGroup>
53 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
54 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
55 Other similar extension points exist, see Microsoft.Common.targets.
56 <Target Name="BeforeBuild">
57 </Target>
58 <Target Name="AfterBuild">
59 </Target>
60 -->
61 </Project> No newline at end of file
@@ -0,0 +1,36
1 using System.Reflection;
2 using System.Runtime.CompilerServices;
3 using System.Runtime.InteropServices;
4
5 // General Information about an assembly is controlled through the following
6 // set of attributes. Change these attribute values to modify the information
7 // associated with an assembly.
8 [assembly: AssemblyTitle("Implab.Fx")]
9 [assembly: AssemblyDescription("")]
10 [assembly: AssemblyConfiguration("")]
11 [assembly: AssemblyCompany("")]
12 [assembly: AssemblyProduct("Implab.Fx")]
13 [assembly: AssemblyCopyright("Copyright © 2013")]
14 [assembly: AssemblyTrademark("")]
15 [assembly: AssemblyCulture("")]
16
17 // Setting ComVisible to false makes the types in this assembly not visible
18 // to COM components. If you need to access a type in this assembly from
19 // COM, set the ComVisible attribute to true on that type.
20 [assembly: ComVisible(false)]
21
22 // The following GUID is for the ID of the typelib if this project is exposed to COM
23 [assembly: Guid("d239c29f-98e2-4942-9569-554a8511d07b")]
24
25 // Version information for an assembly consists of the following four values:
26 //
27 // Major Version
28 // Minor Version
29 // Build Number
30 // Revision
31 //
32 // You can specify all the values or you can default the Build and Revision Numbers
33 // by using the '*' as shown below:
34 // [assembly: AssemblyVersion("1.0.*")]
35 [assembly: AssemblyVersion("1.0.0.0")]
36 [assembly: AssemblyFileVersion("1.0.0.0")]
@@ -6,3 +6,4 Implab.Test/obj/
6 6 Implab/bin/
7 7 Implab/obj/
8 8 TestResults/
9 Implab.Fx/obj/
@@ -12,6 +12,8 Project("{2150E333-8FDC-42A3-9474-1A3956
12 12 EndProject
13 13 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Implab.Test", "Implab.Test\Implab.Test.csproj", "{63F92C0C-61BF-48C0-A377-8D67C3C661D0}"
14 14 EndProject
15 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Implab.Fx", "Implab.Fx\Implab.Fx.csproj", "{06E706F8-6881-43EB-927E-FFC503AF6ABC}"
16 EndProject
15 17 Global
16 18 GlobalSection(TestCaseManagementSettings) = postSolution
17 19 CategoryFile = Implab.vsmdi
@@ -29,6 +31,10 Global
29 31 {63F92C0C-61BF-48C0-A377-8D67C3C661D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 32 {63F92C0C-61BF-48C0-A377-8D67C3C661D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 33 {63F92C0C-61BF-48C0-A377-8D67C3C661D0}.Release|Any CPU.Build.0 = Release|Any CPU
34 {06E706F8-6881-43EB-927E-FFC503AF6ABC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35 {06E706F8-6881-43EB-927E-FFC503AF6ABC}.Debug|Any CPU.Build.0 = Debug|Any CPU
36 {06E706F8-6881-43EB-927E-FFC503AF6ABC}.Release|Any CPU.ActiveCfg = Release|Any CPU
37 {06E706F8-6881-43EB-927E-FFC503AF6ABC}.Release|Any CPU.Build.0 = Release|Any CPU
32 38 EndGlobalSection
33 39 GlobalSection(SolutionProperties) = preSolution
34 40 HideSolutionNode = FALSE
1 NO CONTENT: modified file, binary diff hidden
General Comments 0
You need to be logged in to leave comments. Login now