├── .gitignore
├── Ads
├── 倍福.png
└── 倍福配置.png
├── AutofacDemo
├── AutofacDemo.sln
├── AutofacDemo
│ ├── App.config
│ ├── AutofacDemo.csproj
│ ├── MovieFinder
│ │ ├── DBMovieFinder.cs
│ │ ├── IMovieFinder.cs
│ │ ├── ListMovieFinder.cs
│ │ ├── MPGMovieLister.cs
│ │ └── Movie.cs
│ ├── Program.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
└── FakeAutofac
│ ├── Container.cs
│ ├── ContainerBuilder.cs
│ ├── FakeAutofac.csproj
│ ├── IContainer.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ └── Resolver.cs
├── BSHMI
├── LinuxHMI
│ ├── App.axaml
│ ├── App.axaml.cs
│ ├── LinuxHMI.csproj
│ ├── MainWindow.axaml
│ ├── MainWindow.axaml.cs
│ ├── Program.cs
│ └── app.manifest
├── Test.html
└── TestHMI
│ ├── Controllers
│ └── WeatherForecastController.cs
│ ├── Program.cs
│ ├── Properties
│ └── launchSettings.json
│ ├── TestHMI.csproj
│ ├── TestHMI.sln
│ ├── WeatherForecast.cs
│ ├── appsettings.Development.json
│ └── appsettings.json
├── C#andCpp
├── CallNativeDllCSharp.sln
├── CallNativeDllCSharp
│ ├── App.config
│ ├── CallNativeDllCSharp.csproj
│ ├── CallNativeDllCSharp.sln
│ ├── Program.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── CallNativeDllCpp
│ ├── CallNativeDllCpp.vcxproj
│ ├── CallNativeDllCpp.vcxproj.filters
│ └── main.cpp
├── NativeDll
│ ├── Native.cpp
│ ├── Native.h
│ ├── NativeDll.vcxproj
│ └── NativeDll.vcxproj.filters
├── TestMemory
│ ├── TestMemory.vcxproj
│ ├── TestMemory.vcxproj.filters
│ ├── dllmain.cpp
│ ├── framework.h
│ ├── pch.cpp
│ └── pch.h
├── TestMemorySharp
│ ├── Program.cs
│ └── TestMemorySharp.csproj
└── bin
├── CrossProcess
├── WinFormsApp1
│ ├── Form1.Designer.cs
│ ├── Form1.cs
│ ├── Form1.resx
│ ├── Program.cs
│ └── WinFormsApp1.csproj
├── WpfApp1.sln
├── WpfApp1
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── MainWindowViewModel.cs
│ ├── Win32API.cs
│ ├── Window1.xaml
│ ├── Window1.xaml.cs
│ ├── Window2.xaml
│ ├── Window2.xaml.cs
│ ├── WpfApp1.csproj
│ └── pack
│ │ ├── System.Windows.Forms.dll
│ │ └── WindowsFormsIntegration.dll
├── WpfApp2
│ ├── App.config
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── Win32API.cs
│ └── WpfApp2.csproj
└── WpfApp3
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Win32API.cs
│ └── WpfApp3.csproj
├── ElsaDemo
└── ElsaDemo
│ ├── ElsaDemo.csproj
│ ├── ElsaDemo.sln
│ └── Program.cs
├── NTP
├── In-Sight相机和服务器时间同步NTP设置的说明 v1.0-for WIN7 64.docx
├── Start NTP as client.bat
├── Start NTP as server.bat
└── 客户端图片.png
├── Quartz
├── Quartz.sln
├── QuartzTest
│ ├── App.config
│ ├── JobLgoTask.cs
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── QuartzTest.csproj
│ └── packages.config
└── Quartz用法学习.pdf
├── README.en.md
├── README.md
├── RuleEngine
├── NewRuleEngine
│ ├── NewRuleEngine.csproj
│ └── Program.cs
└── RuleEngine
│ ├── Program.cs
│ ├── RuleEngine.csproj
│ ├── RuleEngine.sln
│ ├── Test2.cs
│ ├── Test3.cs
│ └── Test3.json
├── Test
├── Language
│ ├── AddRoleLanguage.json
│ ├── AddUserLanguage.json
│ ├── ChartHistoryLanguage.json
│ ├── ChartPageLanguage.json
│ ├── ChartPageLanguage1.json
│ ├── Data2CsvLanguage.json
│ ├── EditRoleLanguage.json
│ ├── EditUserLanguage.json
│ ├── LoginLanguage.json
│ ├── MainLanguage.json
│ ├── MessageLanguage.json
│ ├── SwichTheLanguage.json
│ └── UserLanguage.json
├── WpfApp1
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── BoolToVisibilityConverter.cs
│ ├── CustomFreezable.cs
│ ├── Data2CsvLanguage.cs
│ ├── MainViewModel.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── StringConcatConverter.cs
│ ├── TestWindow.xaml
│ ├── TestWindow.xaml.cs
│ ├── TestWindowVM.cs
│ ├── WpfApp1.csproj
│ └── WpfApp1.sln
└── functions
│ ├── BoolToVisibilityConverter.cs
│ ├── BridgeModule.cs
│ ├── CustomFreezable.cs
│ ├── Data2CsvLanguage.cs
│ ├── StringConcatConverter.cs
│ ├── TestView.xaml
│ ├── TestView.xaml.cs
│ ├── TestViewModel.cs
│ ├── functions.csproj
│ └── functions.dll
├── TestAvRegion
├── TestRegion.sln
└── WpfApp1
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── StackPanelRegionAdapter.cs
│ ├── ViewModels
│ ├── MainViewModel.cs
│ └── TestRegionAViewModel.cs
│ ├── Views
│ ├── TestRegionAView.xaml
│ └── TestRegionAView.xaml.cs
│ └── WpfApp1.csproj
├── TestQueue
├── Program.cs
└── TestQueue.csproj
├── ThreadTest
├── App.config
├── Channel
│ ├── Channel.csproj
│ └── Program.cs
├── PipeLine
│ ├── PipeLine.csproj
│ └── Program.cs
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── Quarz
│ ├── Program.cs
│ ├── Quarz.csproj
│ └── Quarz.sln
├── ThreadTest.csproj
├── ThreadTest.sln
└── WorkFlow
│ ├── Program.cs
│ └── WorkFlow.csproj
├── WPFCustomChart
├── App.xaml
├── App.xaml.cs
├── AssemblyInfo.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── WPFCustomChart.csproj
└── WPFCustomChart.sln
└── dump
└── TestDump
├── App.config
├── Form1.Designer.cs
├── Form1.cs
├── Form1.resx
├── MiniDump.cs
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── TestDump.csproj
└── TestDump.sln
/Ads/倍福.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LessIsMoreInSZ/bilibiliDemo/c2ae5264474fc77e9db1003f0bbf54248900709c/Ads/倍福.png
--------------------------------------------------------------------------------
/Ads/倍福配置.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LessIsMoreInSZ/bilibiliDemo/c2ae5264474fc77e9db1003f0bbf54248900709c/Ads/倍福配置.png
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutofacDemo", "AutofacDemo\AutofacDemo.csproj", "{ABFB664A-D279-4BDA-A884-739DEC1AC0B3}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FakeAutofac", "FakeAutofac\FakeAutofac.csproj", "{2776F4FA-23F6-4770-B657-D0709CD8BE3B}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {ABFB664A-D279-4BDA-A884-739DEC1AC0B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {ABFB664A-D279-4BDA-A884-739DEC1AC0B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {ABFB664A-D279-4BDA-A884-739DEC1AC0B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {ABFB664A-D279-4BDA-A884-739DEC1AC0B3}.Release|Any CPU.Build.0 = Release|Any CPU
18 | {2776F4FA-23F6-4770-B657-D0709CD8BE3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {2776F4FA-23F6-4770-B657-D0709CD8BE3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {2776F4FA-23F6-4770-B657-D0709CD8BE3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {2776F4FA-23F6-4770-B657-D0709CD8BE3B}.Release|Any CPU.Build.0 = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo/AutofacDemo.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {ABFB664A-D279-4BDA-A884-739DEC1AC0B3}
8 | Exe
9 | Properties
10 | AutofacDemo
11 | AutofacDemo
12 | v4.8
13 | 512
14 |
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | {2776f4fa-23f6-4770-b657-d0709cd8be3b}
59 | FakeAutofac
60 |
61 |
62 |
63 |
70 |
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo/MovieFinder/DBMovieFinder.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace AutofacDemo.MovieFinder
4 | {
5 | public class DBMovieFinder : IMovieFinder
6 | {
7 | public List FindAll()
8 | {
9 | return new List
10 | {
11 | new Movie
12 | {
13 | Name = "Die Hard.wmv"
14 | },
15 | new Movie
16 | {
17 | Name = "Resident Evil: Retribution.MPG"
18 | }
19 | };
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo/MovieFinder/IMovieFinder.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace AutofacDemo.MovieFinder
4 | {
5 | public interface IMovieFinder
6 | {
7 | List FindAll();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo/MovieFinder/ListMovieFinder.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace AutofacDemo.MovieFinder
4 | {
5 | public class ListMovieFinder : IMovieFinder
6 | {
7 | public List FindAll()
8 | {
9 | return new List
10 | {
11 | new Movie
12 | {
13 | Name = "Die Hard.wmv"
14 | },
15 | new Movie
16 | {
17 | Name = "My Name is John.MPG"
18 | }
19 | };
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo/MovieFinder/MPGMovieLister.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 |
3 | namespace AutofacDemo.MovieFinder
4 | {
5 | public class MPGMovieLister
6 | {
7 | private readonly IMovieFinder _movieFinder;
8 | public MPGMovieLister(IMovieFinder movieFinder)
9 | {
10 | _movieFinder = movieFinder;
11 | }
12 |
13 | public Movie[] GetMPG()
14 | {
15 | var allMovies = _movieFinder.FindAll();
16 | return allMovies.Where(m => m.Name.EndsWith(".MPG")).ToArray();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo/MovieFinder/Movie.cs:
--------------------------------------------------------------------------------
1 | namespace AutofacDemo.MovieFinder
2 | {
3 | public class Movie
4 | {
5 | public string Name { get; set; }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AutofacDemo.MovieFinder;
3 | using FakeAutofac;
4 |
5 | namespace AutofacDemo
6 | {
7 | internal class Program
8 | {
9 | private static IContainer _container;
10 | private static void Main(string[] args)
11 | {
12 | InitIoC();
13 |
14 | var lister = _container.Resolve();
15 |
16 | foreach (var movie in lister.GetMPG())
17 | {
18 | Console.WriteLine(movie.Name);
19 | }
20 | Console.Read();
21 | }
22 |
23 |
24 | private static void InitIoC()
25 | {
26 | var builder = new ContainerBuilder();
27 | builder.RegisterType().AsImplementedInterfaces();
28 | builder.RegisterType().AsImplementedInterfaces();
29 | builder.RegisterType();
30 | _container = builder.Build();
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/AutofacDemo/AutofacDemo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
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("AutofacDemo")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("AutofacDemo")]
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("da5bcbb0-32de-4af4-b429-358f4d4f7b60")]
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")]
37 |
--------------------------------------------------------------------------------
/AutofacDemo/FakeAutofac/Container.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace FakeAutofac
5 | {
6 | public class Container : IContainer
7 | {
8 | //用来保存注册的类型
9 | private readonly Dictionary _typePool = new Dictionary();
10 |
11 | public Container(Dictionary typePool)
12 | {
13 | _typePool = typePool;
14 | //给所有的Resolver指定GetParameterInstance委托, 这样当遇到构造函数需要参数的时候,还是交由Container来提供实例
15 | foreach (var resolver in typePool.Values)
16 | {
17 | resolver.GetParameterInstance = Resolve;
18 | }
19 | }
20 |
21 | //实现的接口方法
22 | public T Resolve() where T : class
23 | {
24 | //直接调用对应的REsolver的GetInstance方法获取实例
25 | return (T) _typePool[typeof (T)].GetInstance();
26 | }
27 |
28 | private object Resolve(Type type)
29 | {
30 | return _typePool[type].GetInstance();
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/AutofacDemo/FakeAutofac/ContainerBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace FakeAutofac
5 | {
6 | public class ContainerBuilder
7 | {
8 | //用来保存注册的类型
9 | private readonly Dictionary _typePool = new Dictionary();
10 | private Type _currentKey;
11 |
12 | public ContainerBuilder RegisterType () where T:class
13 | {
14 | _currentKey = typeof (T);
15 | var resolver = new Resolver { RealType = _currentKey };
16 | _typePool[_currentKey] = resolver;
17 |
18 | return this;
19 | }
20 |
21 |
22 | public ContainerBuilder AsImplementedInterfaces()
23 | {
24 | //以接口为key, 对应Resolver
25 | var interfaces = _currentKey.GetInterfaces();
26 | foreach (var @interface in interfaces)
27 | {
28 | _typePool[@interface] = _typePool[_currentKey];
29 | }
30 | return this;
31 | }
32 |
33 | //创建Container
34 | public IContainer Build()
35 | {
36 | var container = new Container(_typePool);
37 |
38 | return container;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/AutofacDemo/FakeAutofac/FakeAutofac.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {2776F4FA-23F6-4770-B657-D0709CD8BE3B}
8 | Library
9 | Properties
10 | FakeAutofac
11 | FakeAutofac
12 | v4.8
13 | 512
14 |
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
57 |
--------------------------------------------------------------------------------
/AutofacDemo/FakeAutofac/IContainer.cs:
--------------------------------------------------------------------------------
1 | namespace FakeAutofac
2 | {
3 | public interface IContainer
4 | {
5 | T Resolve() where T: class;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/AutofacDemo/FakeAutofac/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
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("FakeAutofac")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FakeAutofac")]
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("1e2cb7da-e751-4229-a36a-22c377b29292")]
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")]
37 |
--------------------------------------------------------------------------------
/AutofacDemo/FakeAutofac/Resolver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace FakeAutofac
5 | {
6 | public class Resolver
7 | {
8 | public Type RealType { get; set; }
9 | //用该委托来获取构造函数的参数实例
10 | public Func GetParameterInstance { get; set; }
11 |
12 | public object GetInstance()
13 | {
14 | //取得Type的构造函数, 这里为了简便,默认使用最后一个,实际的Autofac默认会使用参数最长的一个
15 | var constructors = RealType.GetConstructors();
16 | var paramsInfos = constructors[constructors.Length - 1].GetParameters();
17 | //准备构造函数的参数
18 | var @params = new List