├── .gitattributes
├── .gitignore
├── ConsoleClient
├── App.config
├── ConsoleClient.csproj
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
└── Service References
│ └── ServiceReferenceConsole
│ ├── Reference.cs
│ ├── Reference.svcmap
│ ├── Service.wsdl
│ ├── StockTradingService.disco
│ ├── StockTradingService.wsdl
│ ├── StockTradingService.xsd
│ ├── StockTradingService1.xsd
│ ├── StockTradingService2.xsd
│ ├── configuration.svcinfo
│ └── configuration91.svcinfo
├── LICENSE
├── Lib
├── DataGridThemes.dll
├── Microsoft.Practices.Prism.MefExtensions.XML
├── Microsoft.Practices.Prism.MefExtensions.dll
├── Microsoft.Practices.Prism.Mvvm.dll
├── Microsoft.Practices.Prism.PubSubEvents.dll
├── Microsoft.Practices.Prism.XML
├── Microsoft.Practices.Prism.dll
├── Microsoft.Practices.ServiceLocation.dll
└── Microsoft.Practices.ServiceLocation.xml
├── README.md
├── Service
├── IClient.cs
├── IService.cs
├── Model.cs
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── RandomProvider.cs
├── Service.cs
├── Service.csproj
├── ServiceTests
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── ServiceTests.cs
│ ├── ServiceTests.csproj
│ └── packages.config
├── app.config
└── packages
│ ├── NUnit.2.6.2
│ ├── NUnit.2.6.2.nupkg
│ ├── NUnit.2.6.2.nuspec
│ ├── lib
│ │ ├── nunit.framework.dll
│ │ └── nunit.framework.xml
│ └── license.txt
│ ├── OxyPlot.Core.2014.1.231.1
│ ├── License.txt
│ ├── OxyPlot.Core.2014.1.231.1.nupkg
│ ├── OxyPlot.Core.2014.1.231.1.nuspec
│ └── lib
│ │ └── portable-net4+sl4+wp71+win8
│ │ ├── OxyPlot.dll
│ │ └── OxyPlot.xml
│ ├── OxyPlot.Wpf.2014.1.231.1
│ ├── License.txt
│ ├── OxyPlot.Wpf.2014.1.231.1.nupkg
│ ├── OxyPlot.Wpf.2014.1.231.1.nuspec
│ └── lib
│ │ ├── NET40
│ │ ├── OxyPlot.Wpf.XML
│ │ ├── OxyPlot.Wpf.dll
│ │ ├── OxyPlot.Xps.XML
│ │ └── OxyPlot.Xps.dll
│ │ └── NET45
│ │ ├── OxyPlot.Wpf.XML
│ │ ├── OxyPlot.Wpf.dll
│ │ ├── OxyPlot.Xps.XML
│ │ └── OxyPlot.Xps.dll
│ └── repositories.config
├── StockTrading.sln
├── WPFClient
├── App.config
├── App.xaml
├── App.xaml.cs
├── Bootstrapper.cs
├── EventAggregatorHelper.cs
├── MainViewModel.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── PriceChangedEvent.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── RowViewModel.cs
├── Service References
│ └── ServiceReferenceWPF
│ │ ├── Reference.cs
│ │ ├── Reference.svcmap
│ │ ├── StockTradingService.disco
│ │ ├── StockTradingService.wsdl
│ │ ├── StockTradingService.xsd
│ │ ├── StockTradingService1.xsd
│ │ ├── StockTradingService2.xsd
│ │ ├── configuration.svcinfo
│ │ ├── configuration91.svcinfo
│ │ └── service.wsdl
├── ServiceProxy.cs
├── WPFClient.csproj
└── packages.config
├── XBAPClient
├── App.xaml
├── App.xaml.cs
├── Bootstrapper.cs
├── EventAggregatorHelper.cs
├── MainPage.xaml
├── MainPage.xaml.cs
├── MainViewModel.cs
├── PriceChangedEvent.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ ├── Settings.settings
│ └── app.manifest
├── RowViewModel.cs
├── Service References
│ └── ServiceReferenceXBAP
│ │ ├── Reference.cs
│ │ ├── Reference.svcmap
│ │ ├── Service.wsdl
│ │ ├── StockTradingService.disco
│ │ ├── StockTradingService.wsdl
│ │ ├── StockTradingService.xsd
│ │ ├── StockTradingService1.xsd
│ │ ├── StockTradingService2.xsd
│ │ ├── configuration.svcinfo
│ │ └── configuration91.svcinfo
├── ServiceProxy.cs
├── XBAPClient.csproj
├── app.config
└── packages.config
└── packages
├── NUnit.2.6.2
├── NUnit.2.6.2.nupkg
├── NUnit.2.6.2.nuspec
├── lib
│ ├── nunit.framework.dll
│ └── nunit.framework.xml
└── license.txt
├── OxyPlot.Core.2014.1.231.1
├── License.txt
├── OxyPlot.Core.2014.1.231.1.nupkg
├── OxyPlot.Core.2014.1.231.1.nuspec
└── lib
│ └── portable-net4+sl4+wp71+win8
│ ├── OxyPlot.dll
│ └── OxyPlot.xml
└── OxyPlot.Wpf.2014.1.231.1
├── License.txt
├── OxyPlot.Wpf.2014.1.231.1.nupkg
├── OxyPlot.Wpf.2014.1.231.1.nuspec
└── lib
├── NET40
├── OxyPlot.Wpf.XML
├── OxyPlot.Wpf.dll
├── OxyPlot.Xps.XML
└── OxyPlot.Xps.dll
└── NET45
├── OxyPlot.Wpf.XML
├── OxyPlot.Wpf.dll
├── OxyPlot.Xps.XML
└── OxyPlot.Xps.dll
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.sln.docstates
8 |
9 | # Build results
10 |
11 | [Dd]ebug/
12 | [Rr]elease/
13 | x64/
14 | build/
15 | [Bb]in/
16 | [Oo]bj/
17 |
18 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
19 | !packages/*/build/
20 |
21 | # MSTest test Results
22 | [Tt]est[Rr]esult*/
23 | [Bb]uild[Ll]og.*
24 |
25 | *_i.c
26 | *_p.c
27 | *.ilk
28 | *.meta
29 | *.obj
30 | *.pch
31 | *.pdb
32 | *.pgc
33 | *.pgd
34 | *.rsp
35 | *.sbr
36 | *.tlb
37 | *.tli
38 | *.tlh
39 | *.tmp
40 | *.tmp_proj
41 | *.log
42 | *.vspscc
43 | *.vssscc
44 | .builds
45 | *.pidb
46 | *.log
47 | *.scc
48 |
49 | # Visual C++ cache files
50 | ipch/
51 | *.aps
52 | *.ncb
53 | *.opensdf
54 | *.sdf
55 | *.cachefile
56 |
57 | # Visual Studio profiler
58 | *.psess
59 | *.vsp
60 | *.vspx
61 |
62 | # Guidance Automation Toolkit
63 | *.gpState
64 |
65 | # ReSharper is a .NET coding add-in
66 | _ReSharper*/
67 | *.[Rr]e[Ss]harper
68 |
69 | # TeamCity is a build add-in
70 | _TeamCity*
71 |
72 | # DotCover is a Code Coverage Tool
73 | *.dotCover
74 |
75 | # NCrunch
76 | *.ncrunch*
77 | .*crunch*.local.xml
78 |
79 | # Installshield output folder
80 | [Ee]xpress/
81 |
82 | # DocProject is a documentation generator add-in
83 | DocProject/buildhelp/
84 | DocProject/Help/*.HxT
85 | DocProject/Help/*.HxC
86 | DocProject/Help/*.hhc
87 | DocProject/Help/*.hhk
88 | DocProject/Help/*.hhp
89 | DocProject/Help/Html2
90 | DocProject/Help/html
91 |
92 | # Click-Once directory
93 | publish/
94 |
95 | # Publish Web Output
96 | *.Publish.xml
97 | *.pubxml
98 |
99 | # NuGet Packages Directory
100 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
101 | #packages/
102 |
103 | # Windows Azure Build Output
104 | csx
105 | *.build.csdef
106 |
107 | # Windows Store app package directory
108 | AppPackages/
109 |
110 | # Others
111 | sql/
112 | *.Cache
113 | ClientBin/
114 | [Ss]tyle[Cc]op.*
115 | ~$*
116 | *~
117 | *.dbmdl
118 | *.[Pp]ublish.xml
119 | *.pfx
120 | *.publishsettings
121 |
122 | # RIA/Silverlight projects
123 | Generated_Code/
124 |
125 | # Backup & report files from converting an old project file to a newer
126 | # Visual Studio version. Backup files are not needed, because we have git ;-)
127 | _UpgradeReport_Files/
128 | Backup*/
129 | UpgradeLog*.XML
130 | UpgradeLog*.htm
131 |
132 | # SQL Server files
133 | App_Data/*.mdf
134 | App_Data/*.ldf
135 |
136 | # =========================
137 | # Windows detritus
138 | # =========================
139 |
140 | # Windows image file caches
141 | Thumbs.db
142 | ehthumbs.db
143 |
144 | # Folder config file
145 | Desktop.ini
146 |
147 | # Recycle Bin used on file shares
148 | $RECYCLE.BIN/
149 |
150 | # Mac crap
151 | .DS_Store
152 |
--------------------------------------------------------------------------------
/ConsoleClient/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ConsoleClient/ConsoleClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {EDC400C7-09F9-49F0-8497-3C2471B49B91}
8 | Exe
9 | Properties
10 | ConsoleClient
11 | ConsoleClient
12 | v4.5
13 | 512
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | True
50 | True
51 | Reference.svcmap
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Designer
60 |
61 |
62 | Designer
63 |
64 |
65 | Designer
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | WCF Proxy Generator
86 | Reference.cs
87 |
88 |
89 |
90 |
97 |
--------------------------------------------------------------------------------
/ConsoleClient/Program.cs:
--------------------------------------------------------------------------------
1 | using ConsoleClient.ServiceReferenceConsole;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.ServiceModel;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 |
10 | namespace ConsoleClient
11 | {
12 | class Program : IServiceCallback
13 | {
14 | static ServiceClient _client;
15 |
16 | static void Main(string[] args)
17 | {
18 | AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit;
19 |
20 |
21 | InstanceContext site = new InstanceContext(null, new Program());
22 | _client = new ServiceClient(site);
23 | //Subscribe.
24 | Console.WriteLine("Subscribing");
25 | _client.Subscribe();
26 |
27 | Console.WriteLine();
28 |
29 | Console.WriteLine("Press ENTER to unsubscribe and shut down client");
30 | Console.ReadLine();
31 |
32 | Console.WriteLine("Unsubscribing");
33 | _client.Unsubscribe();
34 |
35 | //Closing the client gracefully closes the connection and cleans up resources
36 | _client.Close();
37 | }
38 |
39 | static void CurrentDomain_ProcessExit(object sender, EventArgs e)
40 | {
41 | _client.Close();
42 | }
43 |
44 |
45 | public void PriceChange(Model[] quotes)
46 | {
47 | for (int i = 0; i < quotes.Length; i++)
48 | {
49 | Console.WriteLine();
50 | Console.WriteLine("Symbol : {0}", quotes[i].Symbol);
51 | Console.WriteLine("Name : {0}", quotes[i].Name);
52 | Console.WriteLine("LastTradePrice: {0}", quotes[i].LastTradePrice);
53 | Console.WriteLine("LastTradeDate: {0}", quotes[i].LastTradeDate);
54 | Console.WriteLine("OpenPrice: {0}", quotes[i].OpenPrice);
55 | Console.WriteLine("DayHighPrice: {0}", quotes[i].DayHighPrice);
56 | Console.WriteLine("DayLowPrice : {0}", quotes[i].DayLowPrice);
57 | Console.WriteLine();
58 | Console.WriteLine("-------------------------------");
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/ConsoleClient/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("TestClient")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("TestClient")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
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("3e6b4fda-e847-4929-88f2-8e122a2353fc")]
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 |
--------------------------------------------------------------------------------
/ConsoleClient/Service References/ServiceReferenceConsole/Reference.svcmap:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 | true
6 | true
7 |
8 | false
9 | false
10 | false
11 |
12 |
13 | true
14 | Auto
15 | true
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/ConsoleClient/Service References/ServiceReferenceConsole/StockTradingService.disco:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ConsoleClient/Service References/ServiceReferenceConsole/StockTradingService.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ConsoleClient/Service References/ServiceReferenceConsole/StockTradingService.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ConsoleClient/Service References/ServiceReferenceConsole/StockTradingService1.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/ConsoleClient/Service References/ServiceReferenceConsole/StockTradingService2.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ConsoleClient/Service References/ServiceReferenceConsole/configuration.svcinfo:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 houmie
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/Lib/DataGridThemes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Lib/DataGridThemes.dll
--------------------------------------------------------------------------------
/Lib/Microsoft.Practices.Prism.MefExtensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Lib/Microsoft.Practices.Prism.MefExtensions.dll
--------------------------------------------------------------------------------
/Lib/Microsoft.Practices.Prism.Mvvm.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Lib/Microsoft.Practices.Prism.Mvvm.dll
--------------------------------------------------------------------------------
/Lib/Microsoft.Practices.Prism.PubSubEvents.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Lib/Microsoft.Practices.Prism.PubSubEvents.dll
--------------------------------------------------------------------------------
/Lib/Microsoft.Practices.Prism.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Lib/Microsoft.Practices.Prism.dll
--------------------------------------------------------------------------------
/Lib/Microsoft.Practices.ServiceLocation.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Lib/Microsoft.Practices.ServiceLocation.dll
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | StockTrading
2 | ============
3 |
4 | A local demo for C# .NET utilising WPF, WCF, PRISM, MVVM, Threading
5 |
6 |
7 | Requirement
8 | ===========
9 |
10 | 1) Open the Solution and click on 'Manage NuGet packages for the solution'. Then search online for 'OxyPlot WPF' and install it.
11 |
12 | 2) If the client can't find the PRISM references, delete them. Right click on References and add all libs from StockTrading\Lib into the XBAPClient project.
13 |
14 |
15 | Service
16 | =======
17 |
18 | Open the solution, compile the service and go to StockTrading\Service\bin\Debug and right-click the Service.exe --> Open as Administrator. Otherwise it won't be able to bind to http on your machine and you'll get an exception.
19 |
20 | Client
21 | ======
22 | After he service is running, simply run the XBAPClient project from Visual studio. Your browser will open and warn you twice about a missing certificate, which you accept to proceed.
23 |
24 |
25 | Be Patient, the service will get real prices from yahoo and the first time might take up to 10 seconds before you see something in your browser.
26 |
--------------------------------------------------------------------------------
/Service/IClient.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.ServiceModel;
7 |
8 | namespace Service
9 | {
10 | public interface IClient
11 | {
12 | [OperationContract(IsOneWay = true)]
13 | void PriceChange(List quotes);
14 | }
15 |
16 | public class PriceChangeEventArgs : EventArgs
17 | {
18 | public readonly List Quotes;
19 |
20 | public PriceChangeEventArgs(List quotes)
21 | {
22 | Quotes = quotes;
23 | }
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/Service/IService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.ServiceModel;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Service
9 | {
10 | [ServiceContract(Namespace="http://venuscloud.com/StockTrading", SessionMode=SessionMode.Required, CallbackContract=typeof(IClient))]
11 | public interface IService
12 | {
13 | [OperationContract(IsOneWay = false, IsInitiating = true)]
14 | void Subscribe();
15 |
16 | [OperationContract(IsOneWay=false, IsTerminating=true)]
17 | void Unsubscribe();
18 |
19 | }
20 |
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/Service/Model.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Service
8 | {
9 | public class Model
10 | {
11 | public string Symbol { get; set; }
12 | public string Name { get; set; }
13 | public double LastTradePrice { get; set; }
14 | public DateTime LastTradeDate { get; set; }
15 | public double OpenPrice { get; set; }
16 | public double DayHighPrice { get; set; }
17 | public double DayLowPrice { get; set; }
18 | public DateTime TradeTime { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Service/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.ServiceModel;
7 | using System.ServiceModel.Description;
8 |
9 | namespace Service
10 | {
11 | class Program
12 | {
13 | static void Main(string[] args)
14 | {
15 | using (ServiceHost host = new ServiceHost(typeof(Service)))
16 | {
17 | host.Open();
18 |
19 | Console.WriteLine("The StockTrading Service is ready at" + Environment.NewLine + "{0}", host.BaseAddresses[0]);
20 | Console.WriteLine("Please start your clients...");
21 | Console.WriteLine();
22 | Console.WriteLine("Press any key to stop the service.");
23 | Console.ReadLine();
24 |
25 | host.Close();
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Service/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("Service")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Service")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
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("cf8a5d42-dc8f-42f5-ac45-8203d2195a40")]
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 |
--------------------------------------------------------------------------------
/Service/RandomProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading;
6 | using System.Threading.Tasks;
7 |
8 | namespace Service
9 | {
10 | public static class RandomProvider
11 | {
12 | private static int seed = Environment.TickCount;
13 |
14 | private static ThreadLocal randomWrapper = new ThreadLocal(() =>
15 | new Random(Interlocked.Increment(ref seed))
16 | );
17 |
18 | public static Random GetThreadRandom()
19 | {
20 | return randomWrapper.Value;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Service/Service.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Microsoft.VisualBasic.FileIO;
7 | using System.Net;
8 | using System.IO;
9 | using System.ServiceModel;
10 | using System.Threading;
11 | using System.Globalization;
12 | using System.Runtime.CompilerServices;
13 |
14 | namespace Service
15 | {
16 | [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
17 | public class Service : IService
18 | {
19 | readonly string _path = @"quotes.csv";
20 | public static event EventHandler PriceChanged;
21 | IClient _callback = null;
22 | List _quotes;
23 | readonly object _locker = new object();
24 |
25 | public Service()
26 | {
27 |
28 | }
29 |
30 |
31 | public void DownloadStockPriceFromYahoo()
32 | {
33 | if (File.Exists(_path))
34 | {
35 | DateTime lastModified = System.IO.File.GetLastWriteTime(_path);
36 | if (lastModified.Date < DateTime.Today)
37 | {
38 | File.Delete(_path);
39 | using (WebClient Client = new WebClient())
40 | {
41 | Client.DownloadFile("http://finance.yahoo.com/d/quotes.csv?s=MSFT+INTC+GM&f=snl1d1ohg", _path);
42 | }
43 | }
44 | }
45 | else
46 | {
47 | using (WebClient Client = new WebClient())
48 | {
49 | Client.DownloadFile("http://finance.yahoo.com/d/quotes.csv?s=MSFT+INTC+GM&f=snl1d1ohg", _path);
50 | }
51 | }
52 | }
53 |
54 |
55 | public List ReadStockPriceFromCSV()
56 | {
57 | var result = new List();
58 | DownloadStockPriceFromYahoo();
59 | if (File.Exists(_path))
60 | {
61 | using (var myReader = new TextFieldParser(_path))
62 | {
63 | myReader.TextFieldType = FieldType.Delimited;
64 | myReader.Delimiters = new string[] { "," };
65 | string[] row;
66 | while (!myReader.EndOfData)
67 | {
68 | try
69 | {
70 | row = myReader.ReadFields();
71 | Model model = new Model() {
72 | Symbol = row[0],
73 | Name = row[1],
74 | };
75 | double lastTradePrice;
76 | double.TryParse(row[2], out lastTradePrice);
77 | model.LastTradePrice = lastTradePrice;
78 |
79 | DateTime lastTradeDate;
80 | DateTime.TryParseExact(row[3], "M/dd/yyyy", null, DateTimeStyles.None, out lastTradeDate);
81 | model.LastTradeDate = lastTradeDate;
82 |
83 | double openPrice;
84 | double.TryParse(row[4], out openPrice);
85 | model.OpenPrice = openPrice;
86 |
87 | double dayHighPrice;
88 | double.TryParse(row[5], out dayHighPrice);
89 | model.DayHighPrice = dayHighPrice;
90 |
91 | double dayLowPrice;
92 | double.TryParse(row[6], out dayLowPrice);
93 | model.DayLowPrice = dayLowPrice;
94 | model.TradeTime = DateTime.Today.Date + new TimeSpan(8, 0, 0);
95 | result.Add(model);
96 | }
97 | catch (MalformedLineException)
98 | {
99 | throw;
100 | }
101 | }
102 | }
103 | }
104 | return result;
105 | }
106 |
107 |
108 | public void TransformPrices(List quotes, Random random)
109 | {
110 | foreach (Model model in quotes)
111 | {
112 | double lastTradeMinus5p = model.LastTradePrice - model.LastTradePrice * 0.05;
113 | double lastTradePlus5p = model.LastTradePrice + model.LastTradePrice * 0.05;
114 | model.LastTradePrice = random.NextDouble() * (lastTradePlus5p - lastTradeMinus5p) + lastTradeMinus5p;
115 | if (model.LastTradeDate < DateTime.Now.Date)
116 | {
117 | model.DayHighPrice = model.LastTradePrice;
118 | model.DayLowPrice = model.LastTradePrice;
119 | model.OpenPrice = model.LastTradePrice;
120 | }
121 | model.LastTradeDate = DateTime.Now.Date;
122 | model.DayHighPrice = model.LastTradePrice > model.DayHighPrice ? model.LastTradePrice : model.DayHighPrice;
123 | model.DayLowPrice = model.LastTradePrice < model.DayLowPrice ? model.LastTradePrice : model.DayLowPrice;
124 | model.TradeTime = model.TradeTime + TimeSpan.FromMinutes(2);
125 | }
126 | }
127 |
128 |
129 | public void Subscribe()
130 | {
131 | _quotes = ReadStockPriceFromCSV();
132 | _callback = OperationContext.Current.GetCallbackChannel();
133 | PriceChanged += PriceChangeHandler;
134 |
135 | Task task = PublishPriceChange();
136 | }
137 |
138 | public void PriceChangeHandler(object sender, PriceChangeEventArgs e)
139 | {
140 | _callback.PriceChange(e.Quotes);
141 | }
142 |
143 | public void Unsubscribe()
144 | {
145 | PriceChanged -= PriceChangeHandler;
146 | }
147 |
148 | private async Task PublishPriceChange()
149 | {
150 | bool isFinished = false;
151 | await Task.Run(() =>
152 | {
153 | try
154 | {
155 | lock (_locker)
156 | {
157 | Random random = RandomProvider.GetThreadRandom();
158 | for (int i = 0; i < 240; i++) // 8 hours => 4 minutes = 240 seconds
159 | {
160 | Thread.Sleep(1000);
161 | TransformPrices(_quotes, random);
162 | PriceChangeEventArgs e = new PriceChangeEventArgs(_quotes);
163 | PriceChanged(this, e);
164 | }
165 | isFinished = true;
166 | }
167 | }
168 | catch (Exception)
169 | {
170 |
171 | }
172 | });
173 | return isFinished;
174 | }
175 | }
176 | }
177 |
--------------------------------------------------------------------------------
/Service/Service.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {5887895D-16CF-4FDB-BD62-45F3B5B8E253}
8 | Exe
9 | Properties
10 | Service
11 | Service
12 | v4.5
13 | 512
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
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 |
65 |
--------------------------------------------------------------------------------
/Service/ServiceTests/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("ServiceTests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ServiceTests")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
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("a7fda8cc-d275-4dcf-926f-70f7281be5f1")]
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 |
--------------------------------------------------------------------------------
/Service/ServiceTests/ServiceTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Service;
7 | using NUnit.Framework;
8 | using System.IO;
9 | using System.Threading;
10 |
11 | namespace Service.Tests
12 | {
13 | [TestFixture()]
14 | public class ServiceTests
15 | {
16 | Service _service;
17 | Model _model;
18 | Random _random;
19 | readonly string _path = @"quotes.csv";
20 |
21 | [SetUp]
22 | public void Init()
23 | {
24 | _random = new Random();
25 | _service = new Service();
26 | _model = new Model() { Symbol = "MSFT", Name = "Microsoft Corpora", LastTradePrice = 37.575, LastTradeDate = DateTime.Now.AddDays(-1), OpenPrice = 37.65, DayLowPrice = 37.51, DayHighPrice = 37.78 };
27 | }
28 |
29 | [Test()]
30 | public void ReadStockPriceFromCSVTest()
31 | {
32 | if (!File.Exists(_path))
33 | {
34 | _service.DownloadStockPriceFromYahoo();
35 | }
36 | List result = _service.ReadStockPriceFromCSV();
37 | Assert.True(result.Count > 0);
38 | }
39 |
40 | [Test()]
41 | public void DownloadStockPriceFromYahooTest()
42 | {
43 | if (File.Exists(_path))
44 | {
45 | File.Delete(_path);
46 | }
47 | _service.DownloadStockPriceFromYahoo();
48 | Assert.True(File.Exists("quotes.csv"));
49 | }
50 |
51 | [Test()]
52 | public void LastTradePriceChangeTest()
53 | {
54 | List quotes = new List { _model };
55 | double lastTradePrice = quotes[0].LastTradePrice;
56 |
57 | _service.TransformPrices(quotes, _random);
58 | Assert.True(quotes[0].LastTradePrice <= lastTradePrice + (lastTradePrice * 0.05) && quotes[0].LastTradePrice >= lastTradePrice - (lastTradePrice * 0.05));
59 | }
60 |
61 | [Test()]
62 | public void LastTradeDateSetToTodayTest()
63 | {
64 | List quotes = new List { _model };
65 | _service.TransformPrices(quotes, _random);
66 | Assert.True(quotes[0].LastTradeDate == DateTime.Now.Date);
67 | }
68 |
69 | [Test()]
70 | public void DayHighPriceMustBeTheHighestDayTradePriceTest()
71 | {
72 | List quotes = new List { _model };
73 | _service.TransformPrices(quotes, _random);
74 | double lastTradePrice = quotes[0].LastTradePrice;
75 | _service.TransformPrices(quotes, _random);
76 | double lastTradePrice2 = quotes[0].LastTradePrice;
77 | lastTradePrice = lastTradePrice > lastTradePrice2 ? lastTradePrice : lastTradePrice2;
78 | Assert.AreEqual(lastTradePrice, quotes[0].DayHighPrice);
79 | }
80 |
81 | [Test()]
82 | public void DayLowPriceMustBeTheLowestDayTradePriceTest()
83 | {
84 | List quotes = new List { _model };
85 | _service.TransformPrices(quotes, _random);
86 | double lastTradePrice = quotes[0].LastTradePrice;
87 | _service.TransformPrices(quotes, _random);
88 | double lastTradePrice2 = quotes[0].LastTradePrice;
89 | lastTradePrice = lastTradePrice < lastTradePrice2 ? lastTradePrice : lastTradePrice2;
90 | Assert.AreEqual(lastTradePrice, quotes[0].DayLowPrice);
91 | }
92 |
93 | [Test()]
94 | public void DayLowPriceMustBeSetToTodaysLastTradeForFirstTime()
95 | {
96 | List quotes = new List { _model };
97 | _service.TransformPrices(quotes, _random);
98 | Assert.AreEqual(_model.DayLowPrice, _model.LastTradePrice);
99 | }
100 |
101 | [Test()]
102 | public void DayhighPriceMustBeSetToTodaysLastTradeForFirstTime()
103 | {
104 | List quotes = new List { _model };
105 | _service.TransformPrices(quotes, _random);
106 | Assert.AreEqual(_model.DayHighPrice, _model.LastTradePrice);
107 | }
108 |
109 | [Test()]
110 | public void DayOpenPriceMustBeSetToTodaysFirstTrade()
111 | {
112 | List quotes = new List { _model };
113 | _service.TransformPrices(quotes, _random);
114 | double firstTradePrice = _model.LastTradePrice;
115 | _service.TransformPrices(quotes, _random);
116 | Assert.AreEqual(_model.OpenPrice, firstTradePrice);
117 | }
118 |
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/Service/ServiceTests/ServiceTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {F6594D7F-2F99-4019-9E62-3CF92E3BB409}
7 | Library
8 | Properties
9 | ServiceTests
10 | ServiceTests
11 | v4.5
12 | 512
13 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 10.0
15 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
16 | $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
17 | False
18 | UnitTest
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 |
29 |
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 | ..\packages\NUnit.2.6.2\lib\nunit.framework.dll
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | {5887895D-16CF-4FDB-BD62-45F3B5B8E253}
61 | Service
62 |
63 |
64 |
65 |
66 |
67 |
68 | False
69 |
70 |
71 | False
72 |
73 |
74 | False
75 |
76 |
77 | False
78 |
79 |
80 |
81 |
82 |
83 |
84 |
91 |
--------------------------------------------------------------------------------
/Service/ServiceTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Service/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Service/packages/NUnit.2.6.2/NUnit.2.6.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/NUnit.2.6.2/NUnit.2.6.2.nupkg
--------------------------------------------------------------------------------
/Service/packages/NUnit.2.6.2/NUnit.2.6.2.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | NUnit
5 | 2.6.2
6 | NUnit
7 | Charlie Poole
8 | Charlie Poole
9 | http://nunit.org/nuget/license.html
10 | http://nunit.org/
11 | http://nunit.org/nuget/nunit_32x32.png
12 | false
13 | NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible. A number of runners, both from the NUnit project and by third parties, are able to execute NUnit tests.
14 |
15 | Version 2.6 is the seventh major release of this well-known and well-tested programming tool.
16 |
17 | This package includes only the framework assembly. You will need to install the NUnit.Runners package unless you are using a third-party runner.
18 | NUnit is a unit-testing framework for all .Net languages with a strong TDD focus.
19 | Version 2.6 is the seventh major release of NUnit.
20 |
21 | Unlike earlier versions, this package includes only the framework assembly. You will need to install the NUnit.Runners package unless you are using a third-party runner.
22 |
23 | The nunit.mocks assembly is now provided by the NUnit.Mocks package. The pnunit.framework assembly is provided by the pNUnit package.
24 | en-US
25 | test testing tdd framework fluent assert theory plugin addin
26 |
27 |
--------------------------------------------------------------------------------
/Service/packages/NUnit.2.6.2/lib/nunit.framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/NUnit.2.6.2/lib/nunit.framework.dll
--------------------------------------------------------------------------------
/Service/packages/NUnit.2.6.2/license.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/NUnit.2.6.2/license.txt
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Core.2014.1.231.1/License.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2012 Oystein Bjorke
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a
6 | copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Core.2014.1.231.1/OxyPlot.Core.2014.1.231.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/OxyPlot.Core.2014.1.231.1/OxyPlot.Core.2014.1.231.1.nupkg
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Core.2014.1.231.1/OxyPlot.Core.2014.1.231.1.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OxyPlot.Core
5 | 2014.1.231.1
6 | objo
7 | objo
8 | http://oxyplot.codeplex.com/license
9 | http://oxyplot.codeplex.com/
10 | http://oxyplot.org/icons/oxyplot_128.png
11 | false
12 | OxyPlot is an open source plotting library for .NET. This core package is included in the other OxyPlot packages.
13 | plotting plot charting chart
14 |
15 |
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Core.2014.1.231.1/lib/portable-net4+sl4+wp71+win8/OxyPlot.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/OxyPlot.Core.2014.1.231.1/lib/portable-net4+sl4+wp71+win8/OxyPlot.dll
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Wpf.2014.1.231.1/License.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2012 Oystein Bjorke
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a
6 | copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Wpf.2014.1.231.1/OxyPlot.Wpf.2014.1.231.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/OxyPlot.Wpf.2014.1.231.1/OxyPlot.Wpf.2014.1.231.1.nupkg
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Wpf.2014.1.231.1/OxyPlot.Wpf.2014.1.231.1.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OxyPlot.Wpf
5 | 2014.1.231.1
6 | OxyPlot.Wpf
7 | objo
8 | objo
9 | http://oxyplot.codeplex.com/license
10 | http://oxyplot.codeplex.com/
11 | http://oxyplot.org/icons/oxyplot_128.png
12 | false
13 | OxyPlot is an open source plotting library for .NET.
14 |
15 |
16 |
17 | wpf plotting plot charting chart
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET40/OxyPlot.Wpf.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET40/OxyPlot.Wpf.dll
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET40/OxyPlot.Xps.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET40/OxyPlot.Xps.dll
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET45/OxyPlot.Wpf.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET45/OxyPlot.Wpf.dll
--------------------------------------------------------------------------------
/Service/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET45/OxyPlot.Xps.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/Service/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET45/OxyPlot.Xps.dll
--------------------------------------------------------------------------------
/Service/packages/repositories.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/StockTrading.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.30110.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Service", "Service\Service.csproj", "{5887895D-16CF-4FDB-BD62-45F3B5B8E253}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceTests", "Service\ServiceTests\ServiceTests.csproj", "{F6594D7F-2F99-4019-9E62-3CF92E3BB409}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XBAPClient", "XBAPClient\XBAPClient.csproj", "{3D82CFAD-98A4-4133-BED4-FA50DA65EF7E}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Release|Any CPU = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {5887895D-16CF-4FDB-BD62-45F3B5B8E253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {5887895D-16CF-4FDB-BD62-45F3B5B8E253}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {5887895D-16CF-4FDB-BD62-45F3B5B8E253}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {5887895D-16CF-4FDB-BD62-45F3B5B8E253}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {F6594D7F-2F99-4019-9E62-3CF92E3BB409}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {F6594D7F-2F99-4019-9E62-3CF92E3BB409}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {F6594D7F-2F99-4019-9E62-3CF92E3BB409}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {F6594D7F-2F99-4019-9E62-3CF92E3BB409}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {3D82CFAD-98A4-4133-BED4-FA50DA65EF7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {3D82CFAD-98A4-4133-BED4-FA50DA65EF7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {3D82CFAD-98A4-4133-BED4-FA50DA65EF7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
29 | {3D82CFAD-98A4-4133-BED4-FA50DA65EF7E}.Release|Any CPU.Build.0 = Release|Any CPU
30 | EndGlobalSection
31 | GlobalSection(SolutionProperties) = preSolution
32 | HideSolutionNode = FALSE
33 | EndGlobalSection
34 | EndGlobal
35 |
--------------------------------------------------------------------------------
/WPFClient/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/WPFClient/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/WPFClient/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.PubSubEvents;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel.Composition;
5 | using System.Configuration;
6 | using System.Data;
7 | using System.Linq;
8 | using System.ServiceModel;
9 | using System.Threading.Tasks;
10 | using System.Windows;
11 | using WPFClient.ServiceReferenceWPF;
12 |
13 | namespace WPFClient
14 | {
15 | ///
16 | /// Interaction logic for App.xaml
17 | ///
18 | [Export]
19 | public partial class App : Application
20 | {
21 |
22 | private void Application_Exit(object sender, ExitEventArgs e)
23 | {
24 | ServiceProxy.Instance.Client.Unsubscribe();
25 | }
26 |
27 | protected override void OnStartup(StartupEventArgs e)
28 | {
29 | base.OnStartup(e);
30 |
31 | //Subscribe.
32 | Console.WriteLine("Subscribing");
33 |
34 | Bootstrapper bootstrapper = new Bootstrapper();
35 | bootstrapper.Run();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/WPFClient/Bootstrapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Microsoft.Practices.Prism.MefExtensions;
7 | using Microsoft.Practices.Prism.Modularity;
8 | using System.Windows;
9 | using System.ComponentModel.Composition.Hosting;
10 | using Microsoft.Practices.Prism.PubSubEvents;
11 | using Microsoft.Practices.Prism.Events;
12 |
13 | namespace WPFClient
14 | {
15 | public class Bootstrapper : MefBootstrapper
16 | {
17 | protected override DependencyObject CreateShell()
18 | {
19 | return this.Container.GetExportedValue();
20 | }
21 |
22 | protected override void InitializeShell()
23 | {
24 | base.InitializeShell();
25 | App.Current.MainWindow = (Window)Shell;
26 | App.Current.MainWindow.Show();
27 | }
28 |
29 | protected override void ConfigureAggregateCatalog()
30 | {
31 | base.ConfigureAggregateCatalog();
32 |
33 |
34 | // Prism's AggregateCatalog is a catalog of all MEF composable parts
35 | // within the application.
36 | // We add the parts corresponding to the current assembly to it
37 |
38 | AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(MainWindow).Assembly));
39 | //AggregateCatalog.Catalogs.Add(new AssemblyCatalog(this.GetType().Assembly));
40 | AggregateCatalog.Catalogs.Add(new DirectoryCatalog(@".\"));
41 | }
42 |
43 | protected override void InitializeModules()
44 | {
45 | base.InitializeModules();
46 | }
47 |
48 | protected override IModuleCatalog CreateModuleCatalog()
49 | {
50 | return new ConfigurationModuleCatalog();
51 | //ModuleCatalog moduleCatalog = new ModuleCatalog();
52 |
53 | // this is the code responsible
54 | // for adding Module1 to the application
55 | //moduleCatalog.AddModule
56 | //(
57 | // new ModuleInfo
58 | // {
59 | // InitializationMode = InitializationMode.WhenAvailable,
60 | // Ref = "Module1.xap",
61 | // ModuleName = "Module1Impl",
62 | // ModuleType = "Module1.Module1Impl, Module1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
63 | // }
64 | //);
65 |
66 | //moduleCatalog.AddModule
67 | //(
68 | // new ModuleInfo
69 | // {
70 | // InitializationMode = InitializationMode.WhenAvailable,
71 | // Ref = "Module2.xap",
72 | // ModuleName = "Module2Impl",
73 | // ModuleType = "Module2.Module2Impl, Module2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
74 | // }
75 | //);
76 |
77 | //return moduleCatalog;
78 | }
79 |
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/WPFClient/EventAggregatorHelper.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.PubSubEvents;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace WPFClient
9 | {
10 | public sealed class EventAggregatorHelper
11 | {
12 | private static IEventAggregator _instance = new EventAggregator();
13 |
14 | private EventAggregatorHelper()
15 | {
16 |
17 | }
18 |
19 | static EventAggregatorHelper()
20 | {
21 |
22 | }
23 |
24 |
25 |
26 | public static IEventAggregator Instance
27 | {
28 | get { return _instance; }
29 | }
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/WPFClient/MainViewModel.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.Mvvm;
2 | using OxyPlot;
3 | using OxyPlot.Axes;
4 | using OxyPlot.Series;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Collections.ObjectModel;
8 | using System.Linq;
9 | using System.ServiceModel;
10 | using System.Text;
11 | using System.Threading.Tasks;
12 | using WPFClient.ServiceReferenceWPF;
13 | using Microsoft.Practices.Prism.PubSubEvents;
14 | using Microsoft.Practices.Prism.MefExtensions.Modularity;
15 | using System.ComponentModel.Composition;
16 |
17 |
18 | namespace WPFClient
19 | {
20 | [Export]
21 | public class MainViewModel : BindableBase
22 | {
23 | public ObservableCollection DatagridSource { get; set; }
24 |
25 | //public ObservableCollection Chart { get; private set; }
26 | public PlotModel Chart;
27 |
28 |
29 | public MainViewModel()
30 | {
31 | EventAggregatorHelper.Instance.GetEvent().Subscribe(PriceChangedEventHandler, ThreadOption.PublisherThread, false, null);
32 |
33 | DatagridSource = new ObservableCollection();
34 |
35 | //Chart = new ObservableCollection() { new DataPoint(12, 14), new DataPoint(20, 26)};
36 | Chart = new PlotModel();
37 | Chart.Axes.Add(new LinearAxis(AxisPosition.Left, 0, 50));
38 | Chart.Series.Add(new LineSeries());
39 |
40 | ServiceProxy.Instance.Client.Subscribe();
41 | }
42 |
43 | private void PriceChangedEventHandler(Model[] quotes)
44 | {
45 | DatagridSource.Clear();
46 | for (int i = 0; i < quotes.Length; i++)
47 | {
48 | DatagridSource.Add(new RowViewModel(quotes[i]));
49 | //Chart.Add(new DataPoint(quotes[i].LastTradePrice, i*10));
50 | OnPropertyChanged("Chart");
51 | }
52 | }
53 |
54 |
55 |
56 |
57 |
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/WPFClient/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/WPFClient/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.Mvvm;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel.Composition;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows;
9 | using System.Windows.Controls;
10 | using System.Windows.Data;
11 | using System.Windows.Documents;
12 | using System.Windows.Input;
13 | using System.Windows.Media;
14 | using System.Windows.Media.Imaging;
15 | using System.Windows.Navigation;
16 | using System.Windows.Shapes;
17 |
18 | namespace WPFClient
19 | {
20 | ///
21 | /// Interaction logic for MainWindow.xaml
22 | ///
23 | [Export]
24 | public partial class MainWindow : Window, IView
25 | {
26 | public MainWindow()
27 | {
28 | InitializeComponent();
29 | DataContext = ViewModel;
30 | }
31 |
32 | [Import]
33 | public MainViewModel ViewModel
34 | {
35 | set
36 | {
37 | this.DataContext = value;
38 | }
39 | get
40 | {
41 | return DataContext as MainViewModel;
42 | }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/WPFClient/PriceChangedEvent.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.PubSubEvents;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using WPFClient.ServiceReferenceWPF;
8 |
9 | namespace WPFClient
10 | {
11 | public class PriceChangedEvent : PubSubEvent
12 | {
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/WPFClient/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("WPFClient")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("WPFClient")]
15 | [assembly: AssemblyCopyright("Copyright © 2014")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/WPFClient/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WPFClient.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFClient.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/WPFClient/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/WPFClient/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WPFClient.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/WPFClient/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WPFClient/RowViewModel.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.Mvvm;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using WPFClient.ServiceReferenceWPF;
8 |
9 | namespace WPFClient
10 | {
11 | public class RowViewModel : BindableBase
12 | {
13 | Model _model;
14 |
15 | public RowViewModel(Model model)
16 | {
17 | _model = model;
18 | }
19 |
20 | public string Symbol
21 | {
22 | get { return _model.Symbol; }
23 | set
24 | {
25 | if(value != _model.Symbol)
26 | {
27 | _model.Symbol = value;
28 | OnPropertyChanged("Symbol");
29 | }
30 | }
31 | }
32 |
33 |
34 | public string Name
35 | {
36 | get { return _model.Name; }
37 | set
38 | {
39 | if (value != _model.Name)
40 | {
41 | _model.Name = value;
42 | OnPropertyChanged("Name");
43 | }
44 | }
45 | }
46 |
47 |
48 |
49 | public double DayHighPrice
50 | {
51 | get { return _model.DayHighPrice; }
52 | set {
53 | if (value != _model.DayHighPrice)
54 | {
55 | DayHighPrice = value;
56 | OnPropertyChanged("DayHighPrice");
57 | }
58 | }
59 | }
60 |
61 | public double DayLowPrice
62 | {
63 | get { return _model.DayLowPrice; }
64 | set
65 | {
66 | if (value != _model.DayLowPrice)
67 | {
68 | DayLowPrice = value;
69 | OnPropertyChanged("DayLowPrice");
70 | }
71 | }
72 | }
73 |
74 | public double LastTradePrice
75 | {
76 | get { return _model.LastTradePrice; }
77 | set
78 | {
79 | if (value != _model.LastTradePrice)
80 | {
81 | LastTradePrice = value;
82 | OnPropertyChanged("LastTradePrice");
83 | }
84 | }
85 | }
86 |
87 | public DateTime LastTradeDate
88 | {
89 | get { return _model.LastTradeDate; }
90 | set
91 | {
92 | if (value != _model.LastTradeDate)
93 | {
94 | LastTradeDate = value;
95 | OnPropertyChanged("LastTradeDate");
96 | }
97 | }
98 | }
99 |
100 | public double OpenPrice
101 | {
102 | get { return _model.OpenPrice; }
103 | set
104 | {
105 | if (value != _model.OpenPrice)
106 | {
107 | OpenPrice = value;
108 | OnPropertyChanged("OpenPrice");
109 | }
110 | }
111 | }
112 |
113 |
114 |
115 |
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/WPFClient/Service References/ServiceReferenceWPF/Reference.svcmap:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 | true
6 | true
7 |
8 | false
9 | false
10 | false
11 |
12 |
13 | true
14 | Auto
15 | true
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/WPFClient/Service References/ServiceReferenceWPF/StockTradingService.disco:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/WPFClient/Service References/ServiceReferenceWPF/StockTradingService.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/WPFClient/Service References/ServiceReferenceWPF/StockTradingService.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/WPFClient/Service References/ServiceReferenceWPF/StockTradingService1.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/WPFClient/Service References/ServiceReferenceWPF/StockTradingService2.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/WPFClient/Service References/ServiceReferenceWPF/configuration.svcinfo:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/WPFClient/ServiceProxy.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.PubSubEvents;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel.Composition;
5 | using System.Linq;
6 | using System.ServiceModel;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using WPFClient.ServiceReferenceWPF;
10 |
11 | namespace WPFClient
12 | {
13 | public sealed class ServiceProxy : IServiceCallback
14 | {
15 | private static readonly ServiceProxy _instance = new ServiceProxy();
16 | private ServiceClient _client;
17 |
18 | static ServiceProxy()
19 | {
20 |
21 | }
22 |
23 | private ServiceProxy()
24 | {
25 | InstanceContext site = new InstanceContext(this);
26 | _client = new ServiceClient(site);
27 | }
28 |
29 | public static ServiceProxy Instance
30 | {
31 | get { return _instance; }
32 | }
33 |
34 | public ServiceClient Client { get { return _client; } }
35 |
36 | public void PriceChange(Model[] quotes)
37 | {
38 | EventAggregatorHelper.Instance.GetEvent().Publish(quotes);
39 | }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/WPFClient/WPFClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {14923D87-414A-4EB7-AA10-D78E293CC1CD}
8 | WinExe
9 | Properties
10 | WPFClient
11 | WPFClient
12 | v4.5
13 | 512
14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15 | 4
16 |
17 |
18 | AnyCPU
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 |
36 |
37 |
38 | ..\Lib\Microsoft.Practices.Prism.dll
39 |
40 |
41 | ..\Lib\Microsoft.Practices.Prism.MefExtensions.dll
42 |
43 |
44 | ..\Lib\Microsoft.Practices.Prism.Mvvm.dll
45 |
46 |
47 | ..\Lib\Microsoft.Practices.Prism.PubSubEvents.dll
48 |
49 |
50 | ..\Lib\Microsoft.Practices.ServiceLocation.dll
51 |
52 |
53 | ..\Service\packages\OxyPlot.Core.2014.1.231.1\lib\portable-net4+sl4+wp71+win8\OxyPlot.dll
54 |
55 |
56 | ..\Service\packages\OxyPlot.Wpf.2014.1.231.1\lib\NET45\OxyPlot.Wpf.dll
57 |
58 |
59 | ..\Service\packages\OxyPlot.Wpf.2014.1.231.1\lib\NET45\OxyPlot.Xps.dll
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | 4.0
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | MSBuild:Compile
81 | Designer
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | True
90 | True
91 | Reference.svcmap
92 |
93 |
94 |
95 | MSBuild:Compile
96 | Designer
97 |
98 |
99 | App.xaml
100 | Code
101 |
102 |
103 | MainWindow.xaml
104 | Code
105 |
106 |
107 |
108 |
109 | Code
110 |
111 |
112 | True
113 | True
114 | Resources.resx
115 |
116 |
117 | True
118 | Settings.settings
119 | True
120 |
121 |
122 | ResXFileCodeGenerator
123 | Resources.Designer.cs
124 |
125 |
126 |
127 | SettingsSingleFileGenerator
128 | Settings.Designer.cs
129 |
130 |
131 |
132 |
133 |
134 | Designer
135 |
136 |
137 | Designer
138 |
139 |
140 | Designer
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 | WCF Proxy Generator
164 | Reference.cs
165 |
166 |
167 |
168 |
175 |
--------------------------------------------------------------------------------
/WPFClient/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/XBAPClient/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/XBAPClient/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Navigation;
9 |
10 | namespace XBAPClient
11 | {
12 | ///
13 | /// Interaction logic for App.xaml
14 | ///
15 | public partial class App : Application
16 | {
17 | private void Application_Exit(object sender, ExitEventArgs e)
18 | {
19 | ServiceProxy.Instance.Client.Unsubscribe();
20 | }
21 |
22 | protected override void OnStartup(StartupEventArgs e)
23 | {
24 | base.OnStartup(e);
25 |
26 | Bootstrapper bootstrapper = new Bootstrapper();
27 | bootstrapper.Run();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/XBAPClient/Bootstrapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Microsoft.Practices.Prism.MefExtensions;
7 | using Microsoft.Practices.Prism.Modularity;
8 | using System.Windows;
9 | using System.ComponentModel.Composition.Hosting;
10 | using Microsoft.Practices.Prism.PubSubEvents;
11 | using Microsoft.Practices.Prism.Events;
12 | using System.ComponentModel.Composition;
13 |
14 | namespace XBAPClient
15 | {
16 | public class Bootstrapper : MefBootstrapper
17 | {
18 |
19 | protected override DependencyObject CreateShell()
20 | {
21 | return this.Container.GetExportedValue();
22 | }
23 |
24 | protected override void InitializeShell()
25 | {
26 | base.InitializeShell();
27 | App.Current.MainWindow.Content = (MainPage)Shell;
28 | }
29 |
30 |
31 | protected override void ConfigureAggregateCatalog()
32 | {
33 | base.ConfigureAggregateCatalog();
34 |
35 | // Prism's AggregateCatalog is a catalog of all MEF composable parts
36 | // within the application.
37 | // We add the parts corresponding to the current assembly to it
38 |
39 | AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(MainPage).Assembly));
40 | //AggregateCatalog.Catalogs.Add(new AssemblyCatalog(this.GetType().Assembly));
41 | AggregateCatalog.Catalogs.Add(new DirectoryCatalog(@".\"));
42 | }
43 |
44 | protected override void InitializeModules()
45 | {
46 | base.InitializeModules();
47 | }
48 |
49 | protected override IModuleCatalog CreateModuleCatalog()
50 | {
51 | return new ConfigurationModuleCatalog();
52 | //ModuleCatalog moduleCatalog = new ModuleCatalog();
53 |
54 | // this is the code responsible
55 | // for adding Module1 to the application
56 | //moduleCatalog.AddModule
57 | //(
58 | // new ModuleInfo
59 | // {
60 | // InitializationMode = InitializationMode.WhenAvailable,
61 | // Ref = "Module1.xap",
62 | // ModuleName = "Module1Impl",
63 | // ModuleType = "Module1.Module1Impl, Module1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
64 | // }
65 | //);
66 |
67 | //moduleCatalog.AddModule
68 | //(
69 | // new ModuleInfo
70 | // {
71 | // InitializationMode = InitializationMode.WhenAvailable,
72 | // Ref = "Module2.xap",
73 | // ModuleName = "Module2Impl",
74 | // ModuleType = "Module2.Module2Impl, Module2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
75 | // }
76 | //);
77 |
78 | //return moduleCatalog;
79 | }
80 |
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/XBAPClient/EventAggregatorHelper.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.PubSubEvents;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace XBAPClient
9 | {
10 | public sealed class EventAggregatorHelper
11 | {
12 | private static IEventAggregator _instance = new EventAggregator();
13 |
14 | private EventAggregatorHelper()
15 | {
16 |
17 | }
18 |
19 | static EventAggregatorHelper()
20 | {
21 |
22 | }
23 |
24 |
25 |
26 | public static IEventAggregator Instance
27 | {
28 | get { return _instance; }
29 | }
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/XBAPClient/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
23 |
24 |
27 |
28 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/XBAPClient/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.Mvvm;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel.Composition;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 | using System.Windows;
10 | using System.Windows.Controls;
11 | using System.Windows.Data;
12 | using System.Windows.Documents;
13 | using System.Windows.Input;
14 | using System.Windows.Markup;
15 | using System.Windows.Media;
16 | using System.Windows.Media.Imaging;
17 | using System.Windows.Navigation;
18 | using System.Windows.Shapes;
19 |
20 | namespace XBAPClient
21 | {
22 | ///
23 | /// Interaction logic for MainPage.xaml
24 | ///
25 | [Export]
26 | public partial class MainPage : Page, IView
27 | {
28 | public MainPage()
29 | {
30 | this.Language = XmlLanguage.GetLanguage(Thread.CurrentThread.CurrentCulture.Name);
31 | InitializeComponent();
32 | DataContext = ViewModel;
33 | }
34 |
35 | [Import]
36 | public MainViewModel ViewModel
37 | {
38 | set
39 | {
40 | this.DataContext = value;
41 | }
42 | get
43 | {
44 | return DataContext as MainViewModel;
45 | }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/XBAPClient/MainViewModel.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.Mvvm;
2 | using OxyPlot;
3 | using OxyPlot.Axes;
4 | using OxyPlot.Series;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Collections.ObjectModel;
8 | using System.Linq;
9 | using System.ServiceModel;
10 | using System.Text;
11 | using System.Threading.Tasks;
12 |
13 | using Microsoft.Practices.Prism.PubSubEvents;
14 | using Microsoft.Practices.Prism.MefExtensions.Modularity;
15 | using System.ComponentModel.Composition;
16 | using XBAPClient.ServiceReferenceXBAP;
17 |
18 |
19 | namespace XBAPClient
20 | {
21 | [Export]
22 | public class MainViewModel : BindableBase
23 | {
24 | public ObservableCollection DatagridSource { get; set; }
25 | List _lineSeries;
26 |
27 | //public IList Chart { get; private set; }
28 | //public IList Chart1 { get; private set; }
29 | //public IList Chart2 { get; private set; }
30 |
31 | private PlotModel _chartModel;
32 |
33 | public PlotModel ChartModel
34 | {
35 | get { return _chartModel; }
36 | set
37 | {
38 | if (value != _chartModel)
39 | {
40 | _chartModel = value;
41 | OnPropertyChanged("ChartModel");
42 | }
43 | }
44 | }
45 |
46 |
47 |
48 | public MainViewModel()
49 | {
50 | EventAggregatorHelper.Instance.GetEvent().Subscribe(PriceChangedEventHandler, ThreadOption.PublisherThread, false, null);
51 |
52 | DatagridSource = new ObservableCollection();
53 | ChartModel = new PlotModel();
54 | _lineSeries = new List();
55 | SetupChartModel();
56 |
57 |
58 | //Chart = new List();
59 | //Chart1 = new List();
60 | //Chart2 = new List();
61 |
62 |
63 | ServiceProxy.Instance.Client.Subscribe();
64 | }
65 |
66 |
67 | private void SetupChartModel()
68 | {
69 | ChartModel.LegendTitle = "Legend";
70 | ChartModel.LegendOrientation = LegendOrientation.Horizontal;
71 | ChartModel.LegendPlacement = LegendPlacement.Outside;
72 | ChartModel.LegendPosition = LegendPosition.TopRight;
73 | ChartModel.LegendBackground = OxyColors.Black;
74 | ChartModel.LegendBorder = OxyColors.White;
75 | ChartModel.TextColor = OxyColors.White;
76 | ChartModel.Background = OxyColors.Black;
77 | ChartModel.PlotAreaBorderColor = OxyColors.White;
78 | var dateAxis = new DateTimeAxis(AxisPosition.Bottom, "Time", "HH:mm") { MaximumPadding=0, MinimumPadding=0, MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot, IntervalLength = 80, MajorGridlineColor = OxyColor.FromArgb(50, 255, 255, 255), MinorGridlineColor = OxyColor.FromArgb(30, 255, 255, 255)};
79 | ChartModel.Axes.Add(dateAxis);
80 | var valueAxis = new LinearAxis(AxisPosition.Left, 0) { MaximumPadding = 0, MinimumPadding = 0, MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot, Title = "Price", MajorGridlineColor = OxyColor.FromArgb(50, 255, 255, 255), MinorGridlineColor = OxyColor.FromArgb(30, 255, 255, 255) };
81 | ChartModel.Axes.Add(valueAxis);
82 |
83 | _lineSeries.Add(new LineSeries { StrokeThickness = 2, MarkerSize = 1, MarkerType = MarkerType.Circle, Smooth = true });
84 | _lineSeries.Add(new LineSeries { StrokeThickness = 2, MarkerSize = 1, MarkerType = MarkerType.Circle, Smooth = true });
85 | _lineSeries.Add(new LineSeries { StrokeThickness = 2, MarkerSize = 1, MarkerType = MarkerType.Circle, Smooth = true });
86 |
87 | foreach (var lineSerie in _lineSeries)
88 | {
89 | ChartModel.Series.Add(lineSerie);
90 | }
91 |
92 | }
93 |
94 |
95 | private void PriceChangedEventHandler(Model[] quotes)
96 | {
97 | if (DatagridSource.Count == 0)
98 | {
99 | for (int i = 0; i < quotes.Length; i++)
100 | {
101 | DatagridSource.Add(new RowViewModel(quotes[i]));
102 | }
103 | }
104 | else
105 | {
106 | for (int i = 0; i < quotes.Length; i++)
107 | {
108 | DatagridSource[i].DayHighPrice = quotes[i].DayHighPrice;
109 | DatagridSource[i].DayLowPrice = quotes[i].DayLowPrice;
110 | DatagridSource[i].LastTradeDate = quotes[i].LastTradeDate;
111 | DatagridSource[i].LastTradePrice = quotes[i].LastTradePrice;
112 | DatagridSource[i].Name = quotes[i].Name;
113 | DatagridSource[i].OpenPrice = quotes[i].OpenPrice;
114 | DatagridSource[i].Symbol = quotes[i].Symbol;
115 | }
116 |
117 | }
118 |
119 | for (int i = 0; i < _lineSeries.Count; i++)
120 | {
121 | _lineSeries[i].Title = quotes[i].Symbol;
122 | _lineSeries[i].Points.Add(new DataPoint(DateTimeAxis.ToDouble(quotes[i].TradeTime), quotes[i].LastTradePrice));
123 | }
124 |
125 | //Chart.Add(new DataPoint(Refresh, quotes[0].LastTradePrice));
126 | //Chart1.Add(new DataPoint(Refresh, quotes[1].LastTradePrice));
127 | //Chart2.Add(new DataPoint(Refresh, quotes[2].LastTradePrice));
128 | Refresh++;
129 |
130 | }
131 |
132 | private int refresh;
133 | public int Refresh
134 | {
135 | get
136 | {
137 | return this.refresh;
138 | }
139 |
140 | set
141 | {
142 | if (this.refresh == value)
143 | {
144 | return;
145 | }
146 |
147 | this.refresh = value;
148 | OnPropertyChanged("Refresh");
149 | }
150 | }
151 |
152 |
153 |
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/XBAPClient/PriceChangedEvent.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.PubSubEvents;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using XBAPClient.ServiceReferenceXBAP;
8 |
9 |
10 | namespace XBAPClient
11 | {
12 | public class PriceChangedEvent : PubSubEvent
13 | {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/XBAPClient/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("XBAPClient")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("XBAPClient")]
15 | [assembly: AssemblyCopyright("Copyright © 2014")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly:ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/XBAPClient/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace XBAPClient.Properties {
12 |
13 |
14 | ///
15 | /// A strongly-typed resource class, for looking up localized strings, etc.
16 | ///
17 | // This class was auto-generated by the StronglyTypedResourceBuilder
18 | // class via a tool like ResGen or Visual Studio.
19 | // To add or remove a member, edit your .ResX file then rerun ResGen
20 | // with the /str option, or rebuild your VS project.
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources {
25 |
26 | private static global::System.Resources.ResourceManager resourceMan;
27 |
28 | private static global::System.Globalization.CultureInfo resourceCulture;
29 |
30 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
31 | internal Resources() {
32 | }
33 |
34 | ///
35 | /// Returns the cached ResourceManager instance used by this class.
36 | ///
37 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
38 | internal static global::System.Resources.ResourceManager ResourceManager {
39 | get {
40 | if ((resourceMan == null)) {
41 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("XBAPClient.Properties.Resources", typeof(Resources).Assembly);
42 | resourceMan = temp;
43 | }
44 | return resourceMan;
45 | }
46 | }
47 |
48 | ///
49 | /// Overrides the current thread's CurrentUICulture property for all
50 | /// resource lookups using this strongly typed resource class.
51 | ///
52 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
53 | internal static global::System.Globalization.CultureInfo Culture {
54 | get {
55 | return resourceCulture;
56 | }
57 | set {
58 | resourceCulture = value;
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/XBAPClient/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/XBAPClient/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18444
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace XBAPClient.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/XBAPClient/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/XBAPClient/Properties/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
22 |
23 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/XBAPClient/RowViewModel.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.Mvvm;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using XBAPClient.ServiceReferenceXBAP;
8 |
9 |
10 | namespace XBAPClient
11 | {
12 | public class RowViewModel : BindableBase
13 | {
14 | Model _model;
15 |
16 | public RowViewModel(Model model)
17 | {
18 | _model = model;
19 | }
20 |
21 | public string Symbol
22 | {
23 | get { return _model.Symbol; }
24 | set
25 | {
26 | if(value != _model.Symbol)
27 | {
28 | _model.Symbol = value;
29 | OnPropertyChanged("Symbol");
30 | }
31 | }
32 | }
33 |
34 |
35 | public string Name
36 | {
37 | get { return _model.Name; }
38 | set
39 | {
40 | if (value != _model.Name)
41 | {
42 | _model.Name = value;
43 | OnPropertyChanged("Name");
44 | }
45 | }
46 | }
47 |
48 |
49 |
50 | public double DayHighPrice
51 | {
52 | get { return _model.DayHighPrice; }
53 | set {
54 | if (value != _model.DayHighPrice)
55 | {
56 | _model.DayHighPrice = value;
57 | OnPropertyChanged("DayHighPrice");
58 | }
59 | }
60 | }
61 |
62 | public double DayLowPrice
63 | {
64 | get { return _model.DayLowPrice; }
65 | set
66 | {
67 | if (value != _model.DayLowPrice)
68 | {
69 | _model.DayLowPrice = value;
70 | OnPropertyChanged("DayLowPrice");
71 | }
72 | }
73 | }
74 |
75 | public double LastTradePrice
76 | {
77 | get { return _model.LastTradePrice; }
78 | set
79 | {
80 | if (value != _model.LastTradePrice)
81 | {
82 | _model.LastTradePrice = value;
83 | OnPropertyChanged("LastTradePrice");
84 | }
85 | }
86 | }
87 |
88 | public DateTime LastTradeDate
89 | {
90 | get { return _model.LastTradeDate; }
91 | set
92 | {
93 | if (value != _model.LastTradeDate)
94 | {
95 | _model.LastTradeDate = value;
96 | OnPropertyChanged("LastTradeDate");
97 | }
98 | }
99 | }
100 |
101 | public double OpenPrice
102 | {
103 | get { return _model.OpenPrice; }
104 | set
105 | {
106 | if (value != _model.OpenPrice)
107 | {
108 | _model.OpenPrice = value;
109 | OnPropertyChanged("OpenPrice");
110 | }
111 | }
112 | }
113 |
114 |
115 |
116 |
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/XBAPClient/Service References/ServiceReferenceXBAP/Reference.svcmap:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 | true
6 | true
7 |
8 | false
9 | false
10 | false
11 |
12 |
13 | true
14 | Auto
15 | true
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/XBAPClient/Service References/ServiceReferenceXBAP/StockTradingService.disco:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/XBAPClient/Service References/ServiceReferenceXBAP/StockTradingService.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/XBAPClient/Service References/ServiceReferenceXBAP/StockTradingService.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/XBAPClient/Service References/ServiceReferenceXBAP/StockTradingService1.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/XBAPClient/Service References/ServiceReferenceXBAP/StockTradingService2.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/XBAPClient/Service References/ServiceReferenceXBAP/configuration.svcinfo:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/XBAPClient/ServiceProxy.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Practices.Prism.PubSubEvents;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel.Composition;
5 | using System.Linq;
6 | using System.ServiceModel;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using XBAPClient.ServiceReferenceXBAP;
10 |
11 |
12 | namespace XBAPClient
13 | {
14 | public sealed class ServiceProxy : IServiceCallback
15 | {
16 | private static readonly ServiceProxy _instance = new ServiceProxy();
17 | private ServiceClient _client;
18 |
19 | static ServiceProxy()
20 | {
21 |
22 | }
23 |
24 | private ServiceProxy()
25 | {
26 | InstanceContext site = new InstanceContext(this);
27 | _client = new ServiceClient(site);
28 | }
29 |
30 | public static ServiceProxy Instance
31 | {
32 | get { return _instance; }
33 | }
34 |
35 | public ServiceClient Client { get { return _client; } }
36 |
37 | public void PriceChange(Model[] quotes)
38 | {
39 | EventAggregatorHelper.Instance.GetEvent().Publish(quotes);
40 | }
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/XBAPClient/XBAPClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {3D82CFAD-98A4-4133-BED4-FA50DA65EF7E}
8 | WinExe
9 | Properties
10 | XBAPClient
11 | XBAPClient
12 | v4.5
13 | 512
14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15 | 4
16 | true
17 | False
18 | URL
19 | true
20 | false
21 | Internet
22 | true
23 | True
24 |
25 |
26 | true
27 | full
28 | false
29 | bin\Debug\
30 | DEBUG;TRACE
31 | prompt
32 | 4
33 |
34 |
35 | pdbonly
36 | true
37 | bin\Release\
38 | TRACE
39 | prompt
40 | 4
41 |
42 |
43 |
44 | ..\Lib\DataGridThemes.dll
45 |
46 |
47 | ..\Lib\Microsoft.Practices.Prism.dll
48 |
49 |
50 | ..\Lib\Microsoft.Practices.Prism.MefExtensions.dll
51 |
52 |
53 | ..\Lib\Microsoft.Practices.Prism.Mvvm.dll
54 |
55 |
56 | ..\Lib\Microsoft.Practices.Prism.PubSubEvents.dll
57 |
58 |
59 | ..\Lib\Microsoft.Practices.ServiceLocation.dll
60 |
61 |
62 | ..\Service\packages\OxyPlot.Core.2014.1.231.1\lib\portable-net4+sl4+wp71+win8\OxyPlot.dll
63 |
64 |
65 | ..\Service\packages\OxyPlot.Wpf.2014.1.231.1\lib\NET45\OxyPlot.Wpf.dll
66 |
67 |
68 | ..\Service\packages\OxyPlot.Wpf.2014.1.231.1\lib\NET45\OxyPlot.Xps.dll
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | 4.0
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | MSBuild:Compile
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | True
98 | True
99 | Reference.svcmap
100 |
101 |
102 |
103 | MSBuild:Compile
104 | Designer
105 |
106 |
107 | App.xaml
108 | Code
109 |
110 |
111 | MainPage.xaml
112 | Code
113 |
114 |
115 |
116 |
117 | Code
118 |
119 |
120 | True
121 | True
122 | Resources.resx
123 |
124 |
125 | True
126 | Settings.settings
127 | True
128 |
129 |
130 | ResXFileCodeGenerator
131 | Resources.Designer.cs
132 |
133 |
134 |
135 |
136 | SettingsSingleFileGenerator
137 | Settings.Designer.cs
138 |
139 |
140 |
141 |
142 |
143 |
144 | Designer
145 |
146 |
147 | Designer
148 |
149 |
150 | Designer
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 | WCF Proxy Generator
172 | Reference.cs
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 | F11AEF1E38B44CC936393B1167BC4F005D3F35A7
184 |
185 |
186 |
193 |
--------------------------------------------------------------------------------
/XBAPClient/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/XBAPClient/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/packages/NUnit.2.6.2/NUnit.2.6.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/NUnit.2.6.2/NUnit.2.6.2.nupkg
--------------------------------------------------------------------------------
/packages/NUnit.2.6.2/NUnit.2.6.2.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | NUnit
5 | 2.6.2
6 | NUnit
7 | Charlie Poole
8 | Charlie Poole
9 | http://nunit.org/nuget/license.html
10 | http://nunit.org/
11 | http://nunit.org/nuget/nunit_32x32.png
12 | false
13 | NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible. A number of runners, both from the NUnit project and by third parties, are able to execute NUnit tests.
14 |
15 | Version 2.6 is the seventh major release of this well-known and well-tested programming tool.
16 |
17 | This package includes only the framework assembly. You will need to install the NUnit.Runners package unless you are using a third-party runner.
18 | NUnit is a unit-testing framework for all .Net languages with a strong TDD focus.
19 | Version 2.6 is the seventh major release of NUnit.
20 |
21 | Unlike earlier versions, this package includes only the framework assembly. You will need to install the NUnit.Runners package unless you are using a third-party runner.
22 |
23 | The nunit.mocks assembly is now provided by the NUnit.Mocks package. The pnunit.framework assembly is provided by the pNUnit package.
24 | en-US
25 | test testing tdd framework fluent assert theory plugin addin
26 |
27 |
--------------------------------------------------------------------------------
/packages/NUnit.2.6.2/lib/nunit.framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/NUnit.2.6.2/lib/nunit.framework.dll
--------------------------------------------------------------------------------
/packages/NUnit.2.6.2/license.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/NUnit.2.6.2/license.txt
--------------------------------------------------------------------------------
/packages/OxyPlot.Core.2014.1.231.1/License.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2012 Oystein Bjorke
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a
6 | copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/packages/OxyPlot.Core.2014.1.231.1/OxyPlot.Core.2014.1.231.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/OxyPlot.Core.2014.1.231.1/OxyPlot.Core.2014.1.231.1.nupkg
--------------------------------------------------------------------------------
/packages/OxyPlot.Core.2014.1.231.1/OxyPlot.Core.2014.1.231.1.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OxyPlot.Core
5 | 2014.1.231.1
6 | objo
7 | objo
8 | http://oxyplot.codeplex.com/license
9 | http://oxyplot.codeplex.com/
10 | http://oxyplot.org/icons/oxyplot_128.png
11 | false
12 | OxyPlot is an open source plotting library for .NET. This core package is included in the other OxyPlot packages.
13 | plotting plot charting chart
14 |
15 |
--------------------------------------------------------------------------------
/packages/OxyPlot.Core.2014.1.231.1/lib/portable-net4+sl4+wp71+win8/OxyPlot.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/OxyPlot.Core.2014.1.231.1/lib/portable-net4+sl4+wp71+win8/OxyPlot.dll
--------------------------------------------------------------------------------
/packages/OxyPlot.Wpf.2014.1.231.1/License.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2012 Oystein Bjorke
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a
6 | copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/packages/OxyPlot.Wpf.2014.1.231.1/OxyPlot.Wpf.2014.1.231.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/OxyPlot.Wpf.2014.1.231.1/OxyPlot.Wpf.2014.1.231.1.nupkg
--------------------------------------------------------------------------------
/packages/OxyPlot.Wpf.2014.1.231.1/OxyPlot.Wpf.2014.1.231.1.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OxyPlot.Wpf
5 | 2014.1.231.1
6 | objo
7 | objo
8 | http://oxyplot.codeplex.com/license
9 | http://oxyplot.codeplex.com/
10 | http://oxyplot.org/icons/oxyplot_128.png
11 | false
12 | OxyPlot is an open source plotting library for .NET.
13 | wpf plotting plot charting chart
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET40/OxyPlot.Wpf.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET40/OxyPlot.Wpf.dll
--------------------------------------------------------------------------------
/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET40/OxyPlot.Xps.XML:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OxyPlot.Xps
5 |
6 |
7 |
8 |
9 | The OxyPlot.Xps namespace contains functionality to export plots and reports to .xps files.
10 |
11 |
12 |
13 |
14 | Exports or prints a PlotModel to an xps file.
15 |
16 |
17 |
18 |
19 | Exports the specified plot model to an xps file.
20 |
21 | The model.
22 | The file name.
23 | The width.
24 | The height.
25 | The background color.
26 |
27 |
28 |
29 | Prints the specified plot model.
30 |
31 | The model.
32 | The width (using the actual media width if not specified).
33 | The height (using the actual media height if not specified).
34 |
35 |
36 |
37 | XPS report writer using MigraDoc.
38 |
39 |
40 |
41 |
42 | The doc.
43 |
44 |
45 |
46 |
47 | The disposed flag.
48 |
49 |
50 |
51 |
52 | Initializes a new instance of the class.
53 |
54 |
55 |
56 |
57 | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
58 |
59 |
60 |
61 |
62 | The print.
63 |
64 |
65 |
66 |
67 | Saves the document.
68 |
69 | The filename.
70 | The width.
71 | The height.
72 |
73 |
74 |
75 | The write drawing.
76 |
77 |
78 | The d.
79 |
80 |
81 |
82 |
83 | The write equation.
84 |
85 |
86 | The equation.
87 |
88 |
89 |
90 |
91 | The write header.
92 |
93 |
94 | The h.
95 |
96 |
97 |
98 |
99 | The write image.
100 |
101 |
102 | The i.
103 |
104 |
105 |
106 |
107 | The write paragraph.
108 |
109 |
110 | The pa.
111 |
112 |
113 |
114 |
115 | The write plot.
116 |
117 |
118 | The plot.
119 |
120 |
121 |
122 |
123 | The write report.
124 |
125 |
126 | The report.
127 |
128 |
129 | The style.
130 |
131 |
132 |
133 |
134 | The write table.
135 |
136 |
137 | The t.
138 |
139 |
140 |
141 |
142 | The set style.
143 |
144 |
145 | The run.
146 |
147 |
148 | The s.
149 |
150 |
151 |
152 |
153 | The add page body.
154 |
155 |
156 | The source flow doc paginator.
157 |
158 |
159 | The page no.
160 |
161 |
162 | The page canvas.
163 |
164 |
165 | The margins.
166 |
167 |
168 |
169 |
170 | The add page to document.
171 |
172 |
173 | The fixed document.
174 |
175 |
176 | The page canvas.
177 |
178 |
179 | The page size.
180 |
181 |
182 |
183 |
184 | Builds the fixed document.
185 |
186 | The source flow doc paginator.
187 | The size.
188 | The margins.
189 | The document.
190 |
191 |
192 |
193 | Creates the fixed document.
194 |
195 | The size.
196 | The document.
197 |
198 |
199 |
200 | Creates a paragraph.
201 |
202 | The text.
203 | The style.
204 | A paragraph.
205 |
206 |
207 |
208 | Releases unmanaged and - optionally - managed resources
209 |
210 |
211 | true to release both managed and unmanaged resources; false to release only unmanaged resources.
212 |
213 |
214 |
215 |
216 | Gets FlowDocument.
217 |
218 |
219 |
220 |
221 | Gets or sets Style.
222 |
223 |
224 |
225 |
226 |
--------------------------------------------------------------------------------
/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET40/OxyPlot.Xps.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET40/OxyPlot.Xps.dll
--------------------------------------------------------------------------------
/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET45/OxyPlot.Wpf.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET45/OxyPlot.Wpf.dll
--------------------------------------------------------------------------------
/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET45/OxyPlot.Xps.XML:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | OxyPlot.Xps
5 |
6 |
7 |
8 |
9 | The OxyPlot.Xps namespace contains functionality to export plots and reports to .xps files.
10 |
11 |
12 |
13 |
14 | Exports or prints a PlotModel to an xps file.
15 |
16 |
17 |
18 |
19 | Exports the specified plot model to an xps file.
20 |
21 | The model.
22 | The file name.
23 | The width.
24 | The height.
25 | The background color.
26 |
27 |
28 |
29 | Prints the specified plot model.
30 |
31 | The model.
32 | The width (using the actual media width if not specified).
33 | The height (using the actual media height if not specified).
34 |
35 |
36 |
37 | XPS report writer using MigraDoc.
38 |
39 |
40 |
41 |
42 | The doc.
43 |
44 |
45 |
46 |
47 | The disposed flag.
48 |
49 |
50 |
51 |
52 | Initializes a new instance of the class.
53 |
54 |
55 |
56 |
57 | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
58 |
59 |
60 |
61 |
62 | The print.
63 |
64 |
65 |
66 |
67 | Saves the document.
68 |
69 | The filename.
70 | The width.
71 | The height.
72 |
73 |
74 |
75 | The write drawing.
76 |
77 |
78 | The d.
79 |
80 |
81 |
82 |
83 | The write equation.
84 |
85 |
86 | The equation.
87 |
88 |
89 |
90 |
91 | The write header.
92 |
93 |
94 | The h.
95 |
96 |
97 |
98 |
99 | The write image.
100 |
101 |
102 | The i.
103 |
104 |
105 |
106 |
107 | The write paragraph.
108 |
109 |
110 | The pa.
111 |
112 |
113 |
114 |
115 | The write plot.
116 |
117 |
118 | The plot.
119 |
120 |
121 |
122 |
123 | The write report.
124 |
125 |
126 | The report.
127 |
128 |
129 | The style.
130 |
131 |
132 |
133 |
134 | The write table.
135 |
136 |
137 | The t.
138 |
139 |
140 |
141 |
142 | The set style.
143 |
144 |
145 | The run.
146 |
147 |
148 | The s.
149 |
150 |
151 |
152 |
153 | The add page body.
154 |
155 |
156 | The source flow doc paginator.
157 |
158 |
159 | The page no.
160 |
161 |
162 | The page canvas.
163 |
164 |
165 | The margins.
166 |
167 |
168 |
169 |
170 | The add page to document.
171 |
172 |
173 | The fixed document.
174 |
175 |
176 | The page canvas.
177 |
178 |
179 | The page size.
180 |
181 |
182 |
183 |
184 | Builds the fixed document.
185 |
186 | The source flow doc paginator.
187 | The size.
188 | The margins.
189 | The document.
190 |
191 |
192 |
193 | Creates the fixed document.
194 |
195 | The size.
196 | The document.
197 |
198 |
199 |
200 | Creates a paragraph.
201 |
202 | The text.
203 | The style.
204 | A paragraph.
205 |
206 |
207 |
208 | Releases unmanaged and - optionally - managed resources
209 |
210 |
211 | true to release both managed and unmanaged resources; false to release only unmanaged resources.
212 |
213 |
214 |
215 |
216 | Gets FlowDocument.
217 |
218 |
219 |
220 |
221 | Gets or sets Style.
222 |
223 |
224 |
225 |
226 |
--------------------------------------------------------------------------------
/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET45/OxyPlot.Xps.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/houmie/StockTrading/784b58be80fce3dc5b1ebb342c2af8b445b32279/packages/OxyPlot.Wpf.2014.1.231.1/lib/NET45/OxyPlot.Xps.dll
--------------------------------------------------------------------------------