├── Src ├── ChartControls │ ├── DataSource │ │ ├── Views │ │ │ ├── Data │ │ │ │ └── Index.cshtml │ │ │ └── Web.config │ │ ├── Global.asax │ │ ├── App_Start │ │ │ ├── FilterConfig.cs │ │ │ ├── WebApiConfig.cs │ │ │ └── RouteConfig.cs │ │ ├── Properties │ │ │ ├── Settings.settings │ │ │ ├── AssemblyInfo.cs │ │ │ └── Settings.Designer.cs │ │ ├── Errors │ │ │ ├── Error.cs │ │ │ └── DataSourceException.cs │ │ ├── packages.config │ │ ├── Global.asax.cs │ │ ├── Web.Debug.config │ │ ├── Models │ │ │ └── Stock.cs │ │ ├── Web.Release.config │ │ └── Web.config │ ├── sandbucket.jpg │ ├── ChartViewUW │ │ ├── Assets │ │ │ ├── StoreLogo.png │ │ │ ├── SplashScreen.scale-200.png │ │ │ ├── LockScreenLogo.scale-200.png │ │ │ ├── Square150x150Logo.scale-200.png │ │ │ ├── Square44x44Logo.scale-200.png │ │ │ ├── Wide310x150Logo.scale-200.png │ │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── ApplicationInsights.config │ │ ├── App.xaml │ │ ├── Const.cs │ │ ├── project.json │ │ ├── StringFormatConverter.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ └── Package.appxmanifest │ ├── Documents │ │ ├── 如何使用ChartControls.docx │ │ ├── ArticleCodeProjects │ │ │ ├── image1.jpg │ │ │ ├── image2.jpg │ │ │ ├── image3.jpg │ │ │ ├── image4.jpg │ │ │ └── HowToUseChartControls_src.zip │ │ ├── How To Use ChartControls.docx │ │ ├── HowToUseChartControls │ │ │ ├── HowToUseChartControls │ │ │ │ ├── packages.config │ │ │ │ ├── Properties │ │ │ │ │ ├── Settings.settings │ │ │ │ │ ├── Settings.Designer.cs │ │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ │ └── Resources.Designer.cs │ │ │ │ ├── App.xaml │ │ │ │ ├── App.xaml.cs │ │ │ │ └── MainWindow.xaml │ │ │ ├── HowToUseChartControls.sln │ │ │ └── Common │ │ │ │ └── Share.cs │ │ ├── License.txt │ │ └── README.txt │ ├── DocBuilder │ │ └── Help │ │ │ ├── ChartControls_cn.chm │ │ │ └── ChartControls_en.chm │ ├── ChartControls │ │ ├── ChartControls.1.0.0.0.nupkg │ │ ├── Properties │ │ │ ├── Settings.settings │ │ │ ├── Settings.Designer.cs │ │ │ ├── AssemblyInfo.cs │ │ │ └── Resources.Designer.cs │ │ ├── Themes │ │ │ └── Generic.xaml │ │ ├── ChartControls.nuspec │ │ ├── NewsHistoryGraphic.cs │ │ ├── IExtraDataGraphics.cs │ │ ├── PointSnapper.cs │ │ ├── Drawing │ │ │ ├── DrawingObjectFactory.cs │ │ │ └── DrawingPen.cs │ │ └── ExitRight.cs │ ├── ChartControls45 │ │ ├── ChartControls.1.0.0.0.nupkg │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── ChartView │ │ ├── packages.config │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Properties │ │ │ ├── Settings.settings │ │ │ ├── Settings.Designer.cs │ │ │ ├── AssemblyInfo.cs │ │ │ └── Resources.Designer.cs │ │ ├── ChartSettings.xaml.cs │ │ ├── App.config │ │ ├── ChartSettings.xaml │ │ ├── ChartSettingViewModel.cs │ │ └── MainWindow.xaml │ ├── StockData2Json │ │ ├── app.config │ │ ├── packages.config │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Stock2Json.csproj │ ├── ChartViewU8 │ │ ├── ChartViewU8.Windows │ │ │ ├── Assets │ │ │ │ ├── Logo.scale-100.png │ │ │ │ ├── SmallLogo.scale-100.png │ │ │ │ ├── StoreLogo.scale-100.png │ │ │ │ └── SplashScreen.scale-100.png │ │ │ ├── packages.config │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ └── Package.appxmanifest │ │ ├── ChartViewU8.WindowsPhone │ │ │ ├── Assets │ │ │ │ ├── Logo.scale-240.png │ │ │ │ ├── SmallLogo.scale-240.png │ │ │ │ ├── StoreLogo.scale-240.png │ │ │ │ ├── WideLogo.scale-240.png │ │ │ │ ├── SplashScreen.scale-240.png │ │ │ │ └── Square71x71Logo.scale-240.png │ │ │ ├── packages.config │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ └── Package.appxmanifest │ │ ├── WebRequestU8 │ │ │ ├── packages.config │ │ │ ├── Requests │ │ │ │ └── StockData │ │ │ │ │ ├── WebStatus.cs │ │ │ │ │ ├── Error.cs │ │ │ │ │ ├── GetStockRequest.cs │ │ │ │ │ └── DataRequest.cs │ │ │ ├── RequestQueueFactory.cs │ │ │ ├── Common │ │ │ │ ├── Definition.cs │ │ │ │ ├── Proxy.cs │ │ │ │ ├── DiagnoseHelper.cs │ │ │ │ └── Streams.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Http │ │ │ │ ├── HttpHeaderHelper.cs │ │ │ │ └── RangeHelper.cs │ │ │ └── StockFetcher.cs │ │ ├── ChartViewU8.Shared │ │ │ ├── App.xaml │ │ │ ├── Const.cs │ │ │ ├── StringFormatConverter.cs │ │ │ ├── ChartViewU8.Shared.shproj │ │ │ ├── Share.cs │ │ │ └── ChartViewU8.Shared.projitems │ │ └── LogU8 │ │ │ ├── LogHelper.cs │ │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ │ ├── LogSource.cs │ │ │ ├── LogU8.csproj │ │ │ └── LogEventListener.cs │ ├── ChartControlsDemo │ │ ├── Properties │ │ │ ├── Settings.settings │ │ │ ├── Settings.Designer.cs │ │ │ ├── AssemblyInfo.cs │ │ │ └── Resources.Designer.cs │ │ ├── packages.config │ │ ├── App.config │ │ ├── App.xaml.cs │ │ └── App.xaml │ ├── sample.html │ ├── ChartControlU10 │ │ ├── project.json │ │ └── Properties │ │ │ └── ChartControlU10.rd.xml │ ├── ChartControlsU8 │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Drawing │ │ │ └── CanvasPen.cs │ └── Common │ │ └── Share.cs └── Tests │ ├── ChartViewUW │ ├── Assets │ │ ├── StoreLogo.png │ │ ├── SplashScreen.scale-200.png │ │ ├── LockScreenLogo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Wide310x150Logo.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── ChartViewUW_TemporaryKey.pfx │ ├── ApplicationInsights.config │ ├── App.xaml │ ├── Const.cs │ ├── project.json │ ├── StringFormatConverter.cs │ ├── ChartViewUW.csproj.user │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ └── Package.appxmanifest │ ├── ChartViewU8 │ ├── ChartViewU8.Windows │ │ ├── Assets │ │ │ ├── Logo.scale-100.png │ │ │ ├── SmallLogo.scale-100.png │ │ │ ├── StoreLogo.scale-100.png │ │ │ └── SplashScreen.scale-100.png │ │ ├── ChartViewU8.Windows_TemporaryKey.pfx │ │ ├── packages.config │ │ ├── ChartViewU8.Windows.csproj.user │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Package.appxmanifest │ ├── ChartViewU8.WindowsPhone │ │ ├── Assets │ │ │ ├── Logo.scale-240.png │ │ │ ├── SmallLogo.scale-240.png │ │ │ ├── StoreLogo.scale-240.png │ │ │ ├── WideLogo.scale-240.png │ │ │ ├── SplashScreen.scale-240.png │ │ │ └── Square71x71Logo.scale-240.png │ │ ├── packages.config │ │ ├── ChartViewU8.WindowsPhone.csproj.user │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Package.appxmanifest │ └── ChartViewU8.Shared │ │ ├── App.xaml │ │ ├── Const.cs │ │ ├── StringFormatConverter.cs │ │ ├── ChartViewU8.Shared.shproj │ │ ├── Share.cs │ │ └── ChartViewU8.Shared.projitems │ ├── ChartControlsDemo │ ├── Properties │ │ ├── Settings.settings │ │ ├── Settings.Designer.cs │ │ ├── AssemblyInfo.cs │ │ └── Resources.Designer.cs │ ├── packages.config │ ├── App.config │ ├── App.xaml │ └── App.xaml.cs │ └── Common │ └── Share.cs ├── Help ├── ChartControls_cn.chm └── ChartControls_en.chm ├── LICENSE ├── README.md └── .gitignore /Src/ChartControls/DataSource/Views/Data/Index.cshtml: -------------------------------------------------------------------------------- 1 | 2 |

Welcome to DataSource

3 | -------------------------------------------------------------------------------- /Help/ChartControls_cn.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Help/ChartControls_cn.chm -------------------------------------------------------------------------------- /Help/ChartControls_en.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Help/ChartControls_en.chm -------------------------------------------------------------------------------- /Src/ChartControls/sandbucket.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/sandbucket.jpg -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="DataSource.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewUW/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewUW/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Src/ChartControls/Documents/如何使用ChartControls.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/Documents/如何使用ChartControls.docx -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/ChartViewUW_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewUW/ChartViewUW_TemporaryKey.pfx -------------------------------------------------------------------------------- /Src/ChartControls/DocBuilder/Help/ChartControls_cn.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/DocBuilder/Help/ChartControls_cn.chm -------------------------------------------------------------------------------- /Src/ChartControls/DocBuilder/Help/ChartControls_en.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/DocBuilder/Help/ChartControls_en.chm -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewUW/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Src/ChartControls/Documents/ArticleCodeProjects/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/Documents/ArticleCodeProjects/image1.jpg -------------------------------------------------------------------------------- /Src/ChartControls/Documents/ArticleCodeProjects/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/Documents/ArticleCodeProjects/image2.jpg -------------------------------------------------------------------------------- /Src/ChartControls/Documents/ArticleCodeProjects/image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/Documents/ArticleCodeProjects/image3.jpg -------------------------------------------------------------------------------- /Src/ChartControls/Documents/ArticleCodeProjects/image4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/Documents/ArticleCodeProjects/image4.jpg -------------------------------------------------------------------------------- /Src/ChartControls/Documents/How To Use ChartControls.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/Documents/How To Use ChartControls.docx -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewUW/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewUW/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewUW/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/ChartControls.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartControls/ChartControls.1.0.0.0.nupkg -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewUW/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls45/ChartControls.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartControls45/ChartControls.1.0.0.0.nupkg -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewUW/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewUW/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewUW/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewUW/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewUW/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Windows/Assets/Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.Windows/Assets/Logo.scale-100.png -------------------------------------------------------------------------------- /Src/ChartControls/StockData2Json/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/ChartControls/StockData2Json/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Windows/Assets/SmallLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.Windows/Assets/SmallLogo.scale-100.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Windows/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.Windows/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/Logo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/Logo.scale-240.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Windows/Assets/Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.Windows/Assets/Logo.scale-100.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Windows/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.Windows/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Windows/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/ArticleCodeProjects/HowToUseChartControls_src.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/Documents/ArticleCodeProjects/HowToUseChartControls_src.zip -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Windows/ChartViewU8.Windows_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.Windows/ChartViewU8.Windows_TemporaryKey.pfx -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/SmallLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/SmallLogo.scale-240.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/StoreLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/StoreLogo.scale-240.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/WideLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/WideLogo.scale-240.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Windows/Assets/SmallLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.Windows/Assets/SmallLogo.scale-100.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Windows/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.Windows/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/Logo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/Logo.scale-240.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/SplashScreen.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/SplashScreen.scale-240.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewUW/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Windows/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.Windows/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/Square71x71Logo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Assets/Square71x71Logo.scale-240.png -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/ApplicationInsights.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/SmallLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/SmallLogo.scale-240.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/StoreLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/StoreLogo.scale-240.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/WideLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/WideLogo.scale-240.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/ApplicationInsights.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/SplashScreen.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/SplashScreen.scale-240.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewUW/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/Square71x71Logo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Waynext/ChartControls/HEAD/Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Assets/Square71x71Logo.scale-240.png -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Src/Tests/ChartControlsDemo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsDemo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Windows/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Src/ChartControls/sample.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

My First File

6 | 7 |

My first paragraph. With a link and also an image: 8 | 9 |

10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Shared/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/HowToUseChartControls/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Shared/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/HowToUseChartControls/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Src/Tests/ChartControlsDemo/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace DataSource 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Windows/ChartViewU8.Windows.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlU10/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" 4 | }, 5 | "frameworks": { 6 | "uap10.0": {} 7 | }, 8 | "runtimes": { 9 | "win10-arm": {}, 10 | "win10-arm-aot": {}, 11 | "win10-x86": {}, 12 | "win10-x86-aot": {}, 13 | "win10-x64": {}, 14 | "win10-x64-aot": {} 15 | } 16 | } -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsDemo/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/HowToUseChartControls/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsDemo/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Src/Tests/ChartControlsDemo/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Requests/StockData/WebStatus.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 WebRequest.Requests.StockData 8 | { 9 | class StockWebStatus 10 | { 11 | public static string WebServerUri 12 | { 13 | get; 14 | set; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/HowToUseChartControls/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.Windows; 7 | 8 | namespace ChartView 9 | { 10 | /// 11 | /// Interaction logic for App.xaml 12 | /// 13 | public partial class App : Application 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsDemo/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 | 9 | namespace ChartControlsDemo 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsDemo/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Src/Tests/ChartControlsDemo/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Src/Tests/ChartControlsDemo/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 | 9 | namespace ChartControlsDemo 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | D:\dzh2 7 | 8 | 9 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | 10 | namespace ChartView 11 | { 12 | /// 13 | /// Interaction logic for App.xaml 14 | /// 15 | public partial class App : Application 16 | { 17 | public App() 18 | { 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Const.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Windows.UI; 5 | using Windows.UI.Xaml.Media; 6 | 7 | namespace ChartViewUW 8 | { 9 | class Brushes 10 | { 11 | public static readonly Brush Salmon = new SolidColorBrush(Colors.Salmon); 12 | public static readonly Brush Purple = new SolidColorBrush(Colors.Purple); 13 | public static readonly Brush Orange = new SolidColorBrush(Colors.Orange); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Const.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Windows.UI; 5 | using Windows.UI.Xaml.Media; 6 | 7 | namespace ChartViewUW 8 | { 9 | class Brushes 10 | { 11 | public static readonly Brush Salmon = new SolidColorBrush(Colors.Salmon); 12 | public static readonly Brush Purple = new SolidColorBrush(Colors.Purple); 13 | public static readonly Brush Orange = new SolidColorBrush(Colors.Orange); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Shared/Const.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Windows.UI; 5 | using Windows.UI.Xaml.Media; 6 | 7 | namespace ChartViewU8 8 | { 9 | class Brushes 10 | { 11 | public static readonly Brush Salmon = new SolidColorBrush(Colors.Salmon); 12 | public static readonly Brush Purple = new SolidColorBrush(Colors.Purple); 13 | public static readonly Brush Orange = new SolidColorBrush(Colors.Orange); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/RequestQueueFactory.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 WebRequest 8 | { 9 | class RequestQueueFactory 10 | { 11 | private static RequestQueue RequestQueue = new RequestQueue(); 12 | public static RequestQueue Instance 13 | { 14 | get 15 | { 16 | return RequestQueue; 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Shared/Const.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Windows.UI; 5 | using Windows.UI.Xaml.Media; 6 | 7 | namespace ChartViewU8 8 | { 9 | class Brushes 10 | { 11 | public static readonly Brush Salmon = new SolidColorBrush(Colors.Salmon); 12 | public static readonly Brush Purple = new SolidColorBrush(Colors.Purple); 13 | public static readonly Brush Orange = new SolidColorBrush(Colors.Orange); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/ChartControls.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | $author$ 8 | $author$ 9 | false 10 | $description$ 11 | First version of ChartControls. Enjoy! 12 | Copyright 2015 13 | Stock 14 | 15 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | 6 | namespace DataSource 7 | { 8 | public static class WebApiConfig 9 | { 10 | public static void Register(HttpConfiguration config) 11 | { 12 | config.Routes.MapHttpRoute( 13 | name: "DefaultApi", 14 | routeTemplate: "api/{controller}/{id}", 15 | defaults: new { id = RouteParameter.Optional } 16 | ); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.ApplicationInsights": "1.0.0", 4 | "Microsoft.ApplicationInsights.PersistenceChannel": "1.0.0", 5 | "Microsoft.ApplicationInsights.WindowsApps": "1.0.0", 6 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0", 7 | "Newtonsoft.Json": "7.0.1" 8 | }, 9 | "frameworks": { 10 | "uap10.0": {} 11 | }, 12 | "runtimes": { 13 | "win10-arm": {}, 14 | "win10-arm-aot": {}, 15 | "win10-x86": {}, 16 | "win10-x86-aot": {}, 17 | "win10-x64": {}, 18 | "win10-x64-aot": {} 19 | } 20 | } -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Requests/StockData/Error.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 WebRequest.Requests.StockData 8 | { 9 | class Error 10 | { 11 | public int Code 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | public string Message 18 | { 19 | get; 20 | set; 21 | } 22 | 23 | public string Description 24 | { 25 | get; 26 | set; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "ChartControls": "1.3.2", 4 | "Microsoft.ApplicationInsights": "1.0.0", 5 | "Microsoft.ApplicationInsights.PersistenceChannel": "1.0.0", 6 | "Microsoft.ApplicationInsights.WindowsApps": "1.0.0", 7 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0", 8 | "Newtonsoft.Json": "7.0.1" 9 | }, 10 | "frameworks": { 11 | "uap10.0": {} 12 | }, 13 | "runtimes": { 14 | "win10-arm": {}, 15 | "win10-arm-aot": {}, 16 | "win10-x86": {}, 17 | "win10-x86-aot": {}, 18 | "win10-x64": {}, 19 | "win10-x64-aot": {} 20 | } 21 | } -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | D:\dzh2 7 | 8 | 9 | D:\temp\MinData\20120706.PRP 10 | 11 | 12 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Common/Definition.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 WebRequest.Common 8 | { 9 | public enum ReadyState 10 | { 11 | Succeeded, 12 | Failed, 13 | Cancelled 14 | } 15 | 16 | sealed class HttpConst 17 | { 18 | public const string HttpMethod_Get = "get"; 19 | public const string HttpMethod_Post = "post"; 20 | public const string HttpMethod_Put = "put"; 21 | public const string HttpMethod_Delete = "delete"; 22 | public const string HttpMethod_Patch = "patch"; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace DataSource 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Data", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Errors/Error.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace DataSource.Errors 9 | { 10 | class Error 11 | { 12 | public ErrorCode Code 13 | { 14 | get; 15 | set; 16 | } 17 | 18 | public string Message 19 | { 20 | get; 21 | set; 22 | } 23 | 24 | public string Description 25 | { 26 | get; 27 | set; 28 | } 29 | } 30 | 31 | enum ErrorCode 32 | { 33 | NoError = 0, 34 | InternalError 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Common/Proxy.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 WebRequest.Common 8 | { 9 | public class ProxyAuthorizationRequiredEventArgs : EventArgs 10 | { 11 | public string ProxyUri 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | public string ProxyName 18 | { 19 | get; 20 | set; 21 | } 22 | 23 | public string ProxyUserName 24 | { 25 | get; 26 | set; 27 | } 28 | 29 | public String ProxyPassword 30 | { 31 | get; 32 | set; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/StringFormatConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Windows.UI.Xaml.Data; 5 | 6 | namespace ChartViewUW 7 | { 8 | public class StringFormatConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, string language) 11 | { 12 | // No format provided. 13 | if (parameter == null) 14 | { 15 | return value; 16 | } 17 | 18 | return String.Format((String)parameter, value); 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, string language) 22 | { 23 | return value; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/ChartViewU8.WindowsPhone.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A6BAF594-9315-40C3-AD16-F5B8A425A7AB 5 | 6 | 7 | 30F105C9-681E-420b-A277-7C086EAD8A4E 8 | 9 | 10 | False 11 | False 12 | neutral 13 | 14 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Shared/StringFormatConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Windows.UI.Xaml.Data; 5 | 6 | namespace ChartViewU8 7 | { 8 | public class StringFormatConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, string language) 11 | { 12 | // No format provided. 13 | if (parameter == null) 14 | { 15 | return value; 16 | } 17 | 18 | return String.Format((String)parameter, value); 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, string language) 22 | { 23 | return value; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/StringFormatConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Windows.UI.Xaml.Data; 5 | 6 | namespace ChartViewUW 7 | { 8 | public class StringFormatConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, string language) 11 | { 12 | // No format provided. 13 | if (parameter == null) 14 | { 15 | return value; 16 | } 17 | 18 | return String.Format((String)parameter, value); 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, string language) 22 | { 23 | return value; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Shared/StringFormatConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Windows.UI.Xaml.Data; 5 | 6 | namespace ChartViewU8 7 | { 8 | public class StringFormatConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, string language) 11 | { 12 | // No format provided. 13 | if (parameter == null) 14 | { 15 | return value; 16 | } 17 | 18 | return String.Format((String)parameter, value); 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, string language) 22 | { 23 | return value; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/ChartViewUW.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8BDF218D-FDBB-4A97-90F9-3AA33B559A92 5 | false 6 | win10surface 7 | true 8 | 9 | 10 | 30F105C9-681E-420b-A277-7C086EAD8A4E 11 | false 12 | win10surface 13 | true 14 | 15 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/HowToUseChartControls/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/ChartSettings.xaml.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.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | namespace ChartView 16 | { 17 | /// 18 | /// Interaction logic for Settings.xaml 19 | /// 20 | public partial class ChartSettings : Window 21 | { 22 | public ChartSettingViewModel ViewModel; 23 | public ChartSettings() 24 | { 25 | InitializeComponent(); 26 | 27 | DataContext = ViewModel = new ChartSettingViewModel(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Errors/DataSourceException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace DataSource.Errors 9 | { 10 | class DataSourceException : Exception 11 | { 12 | public HttpStatusCode ResponseStatus 13 | { 14 | get; 15 | private set; 16 | } 17 | 18 | public Error Error 19 | { 20 | get; 21 | private set; 22 | } 23 | 24 | public DataSourceException(Error e) 25 | : base(e.Message) 26 | { 27 | Error = e; 28 | GetStatusCode(); 29 | } 30 | 31 | public DataSourceException(string message, Exception innerEx) 32 | : base(message, innerEx) 33 | { 34 | GetStatusCode(); 35 | } 36 | 37 | private void GetStatusCode() 38 | { 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/HowToUseChartControls.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HowToUseChartControls", "HowToUseChartControls\HowToUseChartControls.csproj", "{E08E1EF5-DF50-4D44-9EF5-0266E73FE690}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {E08E1EF5-DF50-4D44-9EF5-0266E73FE690}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {E08E1EF5-DF50-4D44-9EF5-0266E73FE690}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {E08E1EF5-DF50-4D44-9EF5-0266E73FE690}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {E08E1EF5-DF50-4D44-9EF5-0266E73FE690}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Shared/ChartViewU8.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | fc7febee-7d82-4cce-aab3-de7843cf8dbf 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/LogU8/LogHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics.Tracing; 4 | using System.Linq; 5 | using System.Reflection; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace ULog 10 | { 11 | public class LogHelper 12 | { 13 | private const string onlineLogName = "Online"; 14 | //private const string generalLogName = "General"; 15 | 16 | public static LogSource GeneralLogger; 17 | public static LogSource OnlineLogger; 18 | 19 | private static LogEventListener listener; 20 | 21 | public static void Init() 22 | { 23 | //GeneralLogger = new LogSource(generalLogName); 24 | OnlineLogger = new LogSource(onlineLogName); 25 | listener = new LogEventListener("App.log"); 26 | listener.EnableEvents(OnlineLogger, EventLevel.Verbose); 27 | } 28 | 29 | public static void Release() 30 | { 31 | if(listener != null) 32 | listener.Dispose(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Shared/ChartViewU8.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | fc7febee-7d82-4cce-aab3-de7843cf8dbf 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | D:\dzh2 15 | 16 | 17 | D:\temp\MinData\20120706.PRP 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Wayne Gu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, 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, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Wayne Gu 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without 8 | restriction, including without limitation the rights to use, 9 | copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the 11 | Software is furnished to do so, subject to the following 12 | conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/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("ChartViewUW")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ChartViewUW")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/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("ChartViewUW")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ChartViewUW")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 ChartControls.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Windows/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("ChartViewU8.Windows")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ChartViewU8.Windows")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsDemo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 ChartControlsDemo.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Windows/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("ChartViewU8.Windows")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ChartViewU8.Windows")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/LogU8/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("LogU8")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("LogU8")] 14 | [assembly: AssemblyCopyright("Copyright © 2015")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/ChartSettings.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/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("ChartViewU8.WindowsPhone")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ChartViewU8.WindowsPhone")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Src/Tests/ChartControlsDemo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 ChartControlsDemo.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("WebRequestU8")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("WebRequestU8")] 14 | [assembly: AssemblyCopyright("Copyright © 2015")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/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("ChartViewU8.WindowsPhone")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ChartViewU8.WindowsPhone")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/HowToUseChartControls/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 HowToUseChartControls.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using DataSource.Properties; 2 | using MyParser.Dzh2; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Web; 7 | using System.Web.Http; 8 | using System.Web.Mvc; 9 | using System.Web.Routing; 10 | 11 | namespace DataSource 12 | { 13 | // Note: For instructions on enabling IIS6 or IIS7 classic mode, 14 | // visit http://go.microsoft.com/?LinkId=9394801 15 | public class MvcApplication : System.Web.HttpApplication 16 | { 17 | public const string dzhKey = "DzhFolderHelp"; 18 | 19 | protected void Application_Start() 20 | { 21 | AreaRegistration.RegisterAllAreas(); 22 | 23 | WebApiConfig.Register(GlobalConfiguration.Configuration); 24 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 25 | RouteConfig.RegisterRoutes(RouteTable.Routes); 26 | LoadDzh(); 27 | } 28 | 29 | private void LoadDzh() 30 | { 31 | if(!string.IsNullOrEmpty(Settings.Default.DzhFolder)) 32 | { 33 | DZHFolderHelp helper = new DZHFolderHelp(Settings.Default.DzhFolder, false); 34 | this.Application.Add(dzhKey, helper); 35 | } 36 | 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsU8/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("ChartControls")] 10 | [assembly: AssemblyDescription("Including stock control, linear control, etc")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("Wayne Gu")] 13 | [assembly: AssemblyProduct("ChartControls")] 14 | [assembly: AssemblyCopyright("Copyright © 2015")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.3.3.0")] 30 | [assembly: AssemblyFileVersion("1.3.3.0")] 31 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Http/HttpHeaderHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Net; 6 | namespace WebRequest.Http 7 | { 8 | public class HttpHeaderHelper 9 | { 10 | public const string cookieKey = "Cookie"; 11 | private static readonly char[] splitor = ":".ToCharArray(); 12 | private static readonly char[] splitor2 = "=".ToCharArray(); 13 | static public KeyValuePair? SplitHeader(string header) 14 | { 15 | var headerParts = header.Split(splitor, StringSplitOptions.RemoveEmptyEntries); 16 | if (headerParts.Length == 2) 17 | { 18 | return new KeyValuePair(headerParts[0].Trim(), headerParts[1].Trim()); 19 | } 20 | 21 | return null; 22 | } 23 | 24 | static public bool IsHeaderCookie(string header) 25 | { 26 | return header.TrimStart().StartsWith(cookieKey); 27 | } 28 | 29 | static public Cookie CreateCookie(string cookie) 30 | { 31 | var cookieParts = cookie.Split(splitor2, StringSplitOptions.RemoveEmptyEntries); 32 | 33 | if (cookieParts.Length == 2) 34 | { 35 | return new Cookie(cookieParts[0], cookieParts[1]); 36 | } 37 | 38 | return null; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Models/Stock.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 DataSource.Models 8 | { 9 | public class SimpleShare 10 | { 11 | public string StockId 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | public IList Dates 18 | { 19 | get; 20 | set; 21 | } 22 | 23 | public IList Closes 24 | { 25 | get; 26 | set; 27 | } 28 | 29 | public string Conext 30 | { 31 | get; 32 | set; 33 | } 34 | } 35 | 36 | public class SimpleShareVolumn : SimpleShare 37 | { 38 | public IList Turnovers 39 | { 40 | get; 41 | set; 42 | } 43 | 44 | public IList Volumns 45 | { 46 | get; 47 | set; 48 | } 49 | } 50 | 51 | public class Share : SimpleShareVolumn 52 | { 53 | public IList Highs 54 | { 55 | get; 56 | set; 57 | } 58 | 59 | public IList Lows 60 | { 61 | get; 62 | set; 63 | } 64 | 65 | public IList Opens 66 | { 67 | get; 68 | set; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Windows/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | ChartViewU8.Windows 10 | Wayne 11 | Assets\StoreLogo.png 12 | 13 | 14 | 15 | 6.3.0 16 | 6.3.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Src/ChartControls/Common/Share.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Common 7 | { 8 | public class SimpleShare 9 | { 10 | public string StockId 11 | { 12 | get; 13 | set; 14 | } 15 | 16 | public IList Dates 17 | { 18 | get; 19 | set; 20 | } 21 | 22 | public IList Closes 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | public string Conext 29 | { 30 | get; 31 | set; 32 | } 33 | } 34 | 35 | public class SimpleShareVolumn : SimpleShare 36 | { 37 | public IList Turnovers 38 | { 39 | get; 40 | set; 41 | } 42 | 43 | public IList Volumns 44 | { 45 | get; 46 | set; 47 | } 48 | 49 | public bool IsRaise 50 | { 51 | get; 52 | set; 53 | } 54 | } 55 | 56 | public class CompleteShare : SimpleShareVolumn 57 | { 58 | public IList Highs 59 | { 60 | get; 61 | set; 62 | } 63 | 64 | public IList Lows 65 | { 66 | get; 67 | set; 68 | } 69 | 70 | public IList Opens 71 | { 72 | get; 73 | set; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/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("DataSource")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DataSource")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 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("31326f03-b871-4ebf-9907-6098c10f2fce")] 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 Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Shared/Share.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Common 7 | { 8 | public class SimpleShare 9 | { 10 | public string StockId 11 | { 12 | get; 13 | set; 14 | } 15 | 16 | public IList Dates 17 | { 18 | get; 19 | set; 20 | } 21 | 22 | public IList Closes 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | public string Conext 29 | { 30 | get; 31 | set; 32 | } 33 | } 34 | 35 | public class SimpleShareVolumn : SimpleShare 36 | { 37 | public IList Turnovers 38 | { 39 | get; 40 | set; 41 | } 42 | 43 | public IList Volumns 44 | { 45 | get; 46 | set; 47 | } 48 | 49 | public bool IsRaise 50 | { 51 | get; 52 | set; 53 | } 54 | } 55 | 56 | public class CompleteShare : SimpleShareVolumn 57 | { 58 | public IList Highs 59 | { 60 | get; 61 | set; 62 | } 63 | 64 | public IList Lows 65 | { 66 | get; 67 | set; 68 | } 69 | 70 | public IList Opens 71 | { 72 | get; 73 | set; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Windows/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | ChartViewU8.Windows 10 | Wayne 11 | Assets\StoreLogo.png 12 | 13 | 14 | 15 | 6.3.0 16 | 6.3.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/Common/Share.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Common 7 | { 8 | public class SimpleShare 9 | { 10 | public string StockId 11 | { 12 | get; 13 | set; 14 | } 15 | 16 | public IList Dates 17 | { 18 | get; 19 | set; 20 | } 21 | 22 | public IList Closes 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | public string Conext 29 | { 30 | get; 31 | set; 32 | } 33 | } 34 | 35 | public class SimpleShareVolumn : SimpleShare 36 | { 37 | public IList Turnovers 38 | { 39 | get; 40 | set; 41 | } 42 | 43 | public IList Volumns 44 | { 45 | get; 46 | set; 47 | } 48 | 49 | public bool IsRaise 50 | { 51 | get; 52 | set; 53 | } 54 | } 55 | 56 | public class CompleteShare : SimpleShareVolumn 57 | { 58 | public IList Highs 59 | { 60 | get; 61 | set; 62 | } 63 | 64 | public IList Lows 65 | { 66 | get; 67 | set; 68 | } 69 | 70 | public IList Opens 71 | { 72 | get; 73 | set; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Src/ChartControls/StockData2Json/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("StockData2Json")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("StockData2Json")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 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("18adf637-7a78-41f1-a81a-f44ccf259ac1")] 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 | -------------------------------------------------------------------------------- /Src/Tests/Common/Share.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Common 7 | { 8 | public class SimpleShare 9 | { 10 | public string StockId 11 | { 12 | get; 13 | set; 14 | } 15 | 16 | public IList Dates 17 | { 18 | get; 19 | set; 20 | } 21 | 22 | public IList Closes 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | public string Conext 29 | { 30 | get; 31 | set; 32 | } 33 | } 34 | 35 | public class SimpleShareVolumn : SimpleShare 36 | { 37 | public IList Turnovers 38 | { 39 | get; 40 | set; 41 | } 42 | 43 | public IList Volumns 44 | { 45 | get; 46 | set; 47 | } 48 | 49 | public bool IsRaise 50 | { 51 | get; 52 | set; 53 | } 54 | } 55 | 56 | public class CompleteShare : SimpleShareVolumn 57 | { 58 | public IList Highs 59 | { 60 | get; 61 | set; 62 | } 63 | 64 | public IList Lows 65 | { 66 | get; 67 | set; 68 | } 69 | 70 | public IList Opens 71 | { 72 | get; 73 | set; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 DataSource.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.ApplicationScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("D:\\dzh2")] 29 | public string DzhFolder { 30 | get { 31 | return ((string)(this["DzhFolder"])); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Shared/Share.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Common 7 | { 8 | public class SimpleShare 9 | { 10 | public string StockId 11 | { 12 | get; 13 | set; 14 | } 15 | 16 | public IList Dates 17 | { 18 | get; 19 | set; 20 | } 21 | 22 | public IList Closes 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | public string Conext 29 | { 30 | get; 31 | set; 32 | } 33 | } 34 | 35 | public class SimpleShareVolumn : SimpleShare 36 | { 37 | public IList Turnovers 38 | { 39 | get; 40 | set; 41 | } 42 | 43 | public IList Volumns 44 | { 45 | get; 46 | set; 47 | } 48 | 49 | public bool IsRaise 50 | { 51 | get; 52 | set; 53 | } 54 | } 55 | 56 | public class CompleteShare : SimpleShareVolumn 57 | { 58 | public IList Highs 59 | { 60 | get; 61 | set; 62 | } 63 | 64 | public IList Lows 65 | { 66 | get; 67 | set; 68 | } 69 | 70 | public IList Opens 71 | { 72 | get; 73 | set; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewUW/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ChartViewUW 7 | wgu 8 | Assets\StoreLogo.png 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewUW/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ChartViewUW 7 | wgu 8 | Assets\StoreLogo.png 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/LogU8/LogSource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics.Tracing; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ULog 9 | { 10 | public class LogSource : EventSource 11 | { 12 | private string messageFormat = "\t{0}"; 13 | public LogSource(string name) 14 | { 15 | messageFormat = name + messageFormat; 16 | } 17 | 18 | [Event(1, Level = EventLevel.Verbose)] 19 | public void Debug(string message) 20 | { 21 | this.WriteEvent(1, string.Format(messageFormat, message)); 22 | } 23 | 24 | [Event(2, Level = EventLevel.Informational)] 25 | public void Info(string message) 26 | { 27 | this.WriteEvent(2, string.Format(messageFormat, message)); 28 | } 29 | 30 | [Event(3, Level = EventLevel.Warning)] 31 | public void Warn(string message) 32 | { 33 | this.WriteEvent(3, string.Format(messageFormat, message)); 34 | } 35 | 36 | [Event(4, Level = EventLevel.Error)] 37 | public void Error(string message) 38 | { 39 | this.WriteEvent(4, string.Format(messageFormat, message)); 40 | } 41 | 42 | [Event(5, Level = EventLevel.Critical)] 43 | public void Critical(string message) 44 | { 45 | this.WriteEvent(5, string.Format(messageFormat, message)); 46 | } 47 | } 48 | 49 | public class OnlineLogSource : LogSource 50 | { 51 | public OnlineLogSource() : base("Online") { } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/StockFetcher.cs: -------------------------------------------------------------------------------- 1 | using Common; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using WebRequest.Requests; 8 | using WebRequest.Requests.StockData; 9 | 10 | namespace WebRequest 11 | { 12 | public enum Market { SH, SZ, BS }; 13 | public enum StockType { Simple, SimpleVolmun, Complete }; 14 | 15 | public class StockFetcher 16 | { 17 | private static object instanceLocker = new object(); 18 | 19 | public static StockFetcher Instance 20 | { 21 | get; 22 | private set; 23 | } 24 | 25 | public static void CreateStockFetcher(string serverUri) 26 | { 27 | if (Instance == null) 28 | { 29 | lock (instanceLocker) 30 | { 31 | if(Instance == null) 32 | Instance = new StockFetcher(serverUri); 33 | } 34 | } 35 | } 36 | 37 | private StockFetcher() { } 38 | private StockFetcher(string serverUri) 39 | { 40 | StockWebStatus.WebServerUri = serverUri; 41 | } 42 | 43 | public async Task GetStockAsync(Market market, string id, DateTime start, DateTime end, StockType stockType, string conext) 44 | { 45 | GetStockRequest req = new GetStockRequest(market, id, start, end, stockType, conext); 46 | await RequestQueueFactory.Instance.SendRequestAsync(req); 47 | 48 | var response = req.Response as GetStockResponse; 49 | return response.Stock; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlU10/Properties/ChartControlU10.rd.xml: -------------------------------------------------------------------------------- 1 | 2 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/NewsHistoryGraphic.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | // Copyright (c) 2015 Wayne Gu 3 | // 4 | // Permission is hereby granted, free of charge, to any person 5 | // obtaining a copy of this software and associated documentation 6 | // files (the "Software"), to deal in the Software without 7 | // restriction, including without limitation the rights to use, 8 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the 10 | // Software is furnished to do so, subject to the following 11 | // conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | // OTHER DEALINGS IN THE SOFTWARE. 24 | #endregion 25 | using ChartControls.Drawing; 26 | using System; 27 | using System.Collections.Generic; 28 | using System.Linq; 29 | using System.Text; 30 | using System.Threading.Tasks; 31 | using System.Windows.Media; 32 | 33 | namespace ChartControls 34 | { 35 | class NewsHistoryGraphic : IExtraDataGraphics 36 | { 37 | public void DrawExtraData(ChartControl chartSource, IDrawingContext dc) 38 | { 39 | throw new NotImplementedException(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/ChartSettingViewModel.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.ComponentModel; 7 | using ChartControls; 8 | 9 | namespace ChartView 10 | { 11 | public class ChartSettingViewModel : INotifyPropertyChanged 12 | { 13 | private CoordinateType[] coordinateTypes = new CoordinateType[] { CoordinateType.Linear, CoordinateType.Log10, CoordinateType.Percentage }; 14 | 15 | public CoordinateType[] CoordinateTypes 16 | { 17 | get 18 | { 19 | return coordinateTypes; 20 | } 21 | } 22 | 23 | private CoordinateType coordinateType; 24 | public CoordinateType CoordinateType 25 | { 26 | get 27 | { 28 | return coordinateType; 29 | } 30 | set 31 | { 32 | coordinateType = value; 33 | ReportPropertyChanged("CoordinateType"); 34 | } 35 | } 36 | 37 | private YScaleDock[] yDocks = new YScaleDock[] { YScaleDock.Left, YScaleDock.Right, YScaleDock.InnerLeft, YScaleDock.InnerRight, YScaleDock.None }; 38 | 39 | public YScaleDock[] YDocks 40 | { 41 | get{ 42 | return yDocks; 43 | } 44 | } 45 | 46 | public YScaleDock YDock 47 | { 48 | get; 49 | set; 50 | } 51 | 52 | public event PropertyChangedEventHandler PropertyChanged; 53 | 54 | private void ReportPropertyChanged(string n) 55 | { 56 | if (PropertyChanged != null) 57 | { 58 | PropertyChanged(this, new PropertyChangedEventArgs(n)); 59 | } 60 | } 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.WindowsPhone/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | ChartViewU8.WindowsPhone 12 | Wayne 13 | Assets\StoreLogo.png 14 | 15 | 16 | 17 | 6.3.1 18 | 6.3.1 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.Shared/ChartViewU8.Shared.projitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | fc7febee-7d82-4cce-aab3-de7843cf8dbf 7 | 8 | 9 | ChartViewU8 10 | 11 | 12 | 13 | Designer 14 | 15 | 16 | App.xaml 17 | 18 | 19 | 20 | 21 | 22 | SettingsEditor.xaml 23 | 24 | 25 | 26 | 27 | 28 | 29 | Always 30 | 31 | 32 | Always 33 | 34 | 35 | 36 | 37 | Designer 38 | MSBuild:Compile 39 | 40 | 41 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/IExtraDataGraphics.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | // Copyright (c) 2015 Wayne Gu 3 | // 4 | // Permission is hereby granted, free of charge, to any person 5 | // obtaining a copy of this software and associated documentation 6 | // files (the "Software"), to deal in the Software without 7 | // restriction, including without limitation the rights to use, 8 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the 10 | // Software is furnished to do so, subject to the following 11 | // conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | // OTHER DEALINGS IN THE SOFTWARE. 24 | #endregion 25 | using ChartControls.Drawing; 26 | using System; 27 | using System.Collections.Generic; 28 | using System.Linq; 29 | using System.Text; 30 | using System.Threading.Tasks; 31 | 32 | namespace ChartControls 33 | { 34 | /// 35 | /// 额外数据图形接口。 36 | /// 37 | public interface IExtraDataGraphics 38 | { 39 | /// 40 | /// 绘制自定义额外数据。 41 | /// 42 | /// 图形控件。 43 | /// 绘制上下文。 44 | void DrawExtraData(ChartControl chartSource, IDrawingContext dc); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/ChartViewU8.Shared/ChartViewU8.Shared.projitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | fc7febee-7d82-4cce-aab3-de7843cf8dbf 7 | 8 | 9 | ChartViewU8 10 | 11 | 12 | 13 | Designer 14 | 15 | 16 | App.xaml 17 | 18 | 19 | 20 | 21 | 22 | SettingsEditor.xaml 23 | 24 | 25 | 26 | 27 | 28 | 29 | Always 30 | 31 | 32 | Always 33 | 34 | 35 | 36 | 37 | Designer 38 | MSBuild:Compile 39 | 40 | 41 | -------------------------------------------------------------------------------- /Src/Tests/ChartViewU8/ChartViewU8.WindowsPhone/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | ChartViewU8.WindowsPhone 12 | Wayne 13 | Assets\StoreLogo.png 14 | 15 | 16 | 17 | 6.3.1 18 | 6.3.1 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Common/DiagnoseHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using ULog; 7 | 8 | namespace WebRequest.Common 9 | { 10 | class DiagnoseHelper 11 | { 12 | public static void CheckReference(Object reference, string errorMsg) 13 | { 14 | if (reference == null) 15 | { 16 | LogHelper.OnlineLogger.Error(errorMsg); 17 | throw new NullReferenceException(errorMsg); 18 | } 19 | } 20 | 21 | public static void CheckArgument(Object arg, string errorMsg) 22 | { 23 | if (arg == null) 24 | { 25 | string errMsg = errorMsg + " can not be null"; 26 | LogHelper.OnlineLogger.Error(errMsg); 27 | throw new ArgumentException(errMsg); 28 | } 29 | } 30 | 31 | public static void CheckStringIgnoreCase(string content, string target, string errorMsg) 32 | { 33 | if (!content.Equals(target, StringComparison.OrdinalIgnoreCase)) 34 | { 35 | LogHelper.OnlineLogger.Error(errorMsg); 36 | throw new InvalidOperationException(errorMsg); 37 | } 38 | } 39 | 40 | public static void CheckString(String text, string errorMsg) 41 | { 42 | if (string.IsNullOrEmpty(text) || string.IsNullOrWhiteSpace(text)) 43 | { 44 | LogHelper.OnlineLogger.Error(errorMsg); 45 | throw new InvalidOperationException(errorMsg); 46 | } 47 | } 48 | 49 | public static void CheckCondition(bool isTrue, string errorMsg) 50 | { 51 | if (!isTrue) 52 | { 53 | LogHelper.OnlineLogger.Error(errorMsg); 54 | throw new InvalidOperationException(errorMsg); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 ChartView.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("D:\\dzh2")] 29 | public string DzhFolder { 30 | get { 31 | return ((string)(this["DzhFolder"])); 32 | } 33 | set { 34 | this["DzhFolder"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("D:\\temp\\MinData\\20120706.PRP")] 41 | public string PrpDataFile { 42 | get { 43 | return ((string)(this["PrpDataFile"])); 44 | } 45 | set { 46 | this["PrpDataFile"] = value; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 1.README 2 | 3 | Stock chart controls, use to create stock chart, including candle sticks chart, time chart, technical indicators etc. 4 | 5 | 2.AUTHOR 6 | 7 | Author: Wayne Gu 8 | 9 | Email Address: Wayneheadache@hotmail.com 10 | 11 | 3.CHANGELOG 12 | 13 | Version 1.1.0 14 | 15 | (1) Unify drawing interface. 16 | 17 | (2) Add help document. 18 | 19 | (3) Fix bugs. 20 | 21 | Version 1.1.1 22 | 23 | (1) Add Project Url into nuegt package(i.e. https://github.com/Waynext/ChartControls) 24 | 25 | Version 1.2.0 26 | 27 | (1) Add one day line. 28 | 29 | (2) Fix bugs, chart control can not update when properties change. 30 | 31 | Version 1.3.0 32 | 33 | (1) Support collection change. 34 | 35 | (2) Fix bugs. 36 | 37 | Version 1.3.1 38 | 39 | (1) Add instructions. 40 | 41 | (2) Adjust interface of Symmetric collection. 42 | 43 | (3) Fix bugs. 44 | Version 1.3.3 45 | 46 | (1) Fix a bug that one chart is not in sync with other chart. 47 | 48 | 4.INSTALL 49 | 50 | In Visual Studio, search 'ChartControls' or 'Stock' in Nuget, then find ChartControls in result list and install. 51 | 52 | 5.COPYING / LICENSE 53 | The MIT License (MIT) 54 | 55 | Copyright (c) 2015 Wayne Gu 56 | 57 | Permission is hereby granted, free of charge, to any person 58 | obtaining a copy of this software and associated documentation 59 | files (the "Software"), to deal in the Software without 60 | restriction, including without limitation the rights to use, 61 | copy, modify, merge, publish, distribute, sublicense, and/or sell 62 | copies of the Software, and to permit persons to whom the 63 | Software is furnished to do so, subject to the following 64 | conditions: 65 | 66 | The above copyright notice and this permission notice shall be 67 | included in all copies or substantial portions of the Software. 68 | 69 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 70 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 71 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 72 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 73 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 74 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 75 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 76 | OTHER DEALINGS IN THE SOFTWARE. 77 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/README.txt: -------------------------------------------------------------------------------- 1 | 1.README 2 | Stock chart controls, use to create stock chart, including candle sticks chart, time chart, technical indicators etc. 3 | 4 | 2.AUTHOR 5 | Author: Wayne Gu 6 | Email Address: Wayneheadache@hotmail.com 7 | 8 | 3.CHANGELOG 9 | Version 1.1.0 10 | (1) Unify drawing interface. 11 | (2) Add help document. 12 | (3) Fix bugs. 13 | Version 1.1.1 14 | (1) Add Project Url into nuegt package(i.e. https://github.com/Waynext/ChartControls) 15 | Version 1.2.0 16 | (1) Add one day line. 17 | (2) Fix bugs, chart control can not update when properties change. 18 | Version 1.3.0 19 | (1) Support collection change. 20 | (2) Fix bugs. 21 | Version 1.3.1 22 | (1) Add instructions. 23 | (2) Adjust interface of Symmetric collection. 24 | (3) Fix bugs. 25 | Version 1.3.2 26 | (1) Move X,YColumnCount property from collection into control. 27 | (2) Equally split x axis. 28 | (3) Fix bugs. 29 | Version 1.3.3 30 | (1) Fix a bug that one chart is not in sync with other chart. 31 | 32 | 4.INSTALL 33 | In Visual Studio, search 'ChartControls' or 'Stock' in Nuget, then find ChartControls in result list and install. 34 | 35 | 5.COPYING / LICENSE 36 | The MIT License (MIT) 37 | 38 | Copyright (c) 2015 Wayne Gu 39 | 40 | Permission is hereby granted, free of charge, to any person 41 | obtaining a copy of this software and associated documentation 42 | files (the "Software"), to deal in the Software without 43 | restriction, including without limitation the rights to use, 44 | copy, modify, merge, publish, distribute, sublicense, and/or sell 45 | copies of the Software, and to permit persons to whom the 46 | Software is furnished to do so, subject to the following 47 | conditions: 48 | 49 | The above copyright notice and this permission notice shall be 50 | included in all copies or substantial portions of the Software. 51 | 52 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 53 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 54 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 55 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 56 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 57 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 58 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 59 | OTHER DEALINGS IN THE SOFTWARE. 60 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/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("ChartView")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("ChartView")] 15 | [assembly: AssemblyCopyright("Copyright © 2015")] 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 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/HowToUseChartControls/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("ChartView")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("ChartView")] 15 | [assembly: AssemblyCopyright("Copyright © 2015")] 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 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/PointSnapper.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | // Copyright (c) 2015 Wayne Gu 3 | // 4 | // Permission is hereby granted, free of charge, to any person 5 | // obtaining a copy of this software and associated documentation 6 | // files (the "Software"), to deal in the Software without 7 | // restriction, including without limitation the rights to use, 8 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the 10 | // Software is furnished to do so, subject to the following 11 | // conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | // OTHER DEALINGS IN THE SOFTWARE. 24 | #endregion 25 | using System; 26 | using System.Collections.Generic; 27 | using System.Linq; 28 | using System.Text; 29 | using System.Threading.Tasks; 30 | 31 | 32 | #if USINGCANVAS 33 | using Windows.Foundation; 34 | #else 35 | using System.Windows; 36 | #endif 37 | 38 | namespace ChartControls 39 | { 40 | /// 41 | /// 坐标微调器。 42 | /// 43 | public sealed class PointSnapper 44 | { 45 | /// 46 | /// 微调坐标值。 47 | /// 48 | public static double SnapValue(double p) 49 | { 50 | return (int)(p) + 0.5; 51 | } 52 | 53 | /// 54 | /// 取整坐标值。 55 | /// 56 | public static double RoundValue(double p) 57 | { 58 | return Math.Round(p); 59 | } 60 | 61 | /// 62 | /// 微调坐标点。 63 | /// 64 | public static Point SnapPoint(Point pt) 65 | { 66 | pt.X = SnapValue(pt.X); 67 | pt.Y = SnapValue(pt.Y); 68 | 69 | return pt; 70 | } 71 | 72 | /// 73 | /// 取整坐标点。 74 | /// 75 | public static Point RoundPoint(Point pt) 76 | { 77 | pt.X = RoundValue(pt.X); 78 | pt.Y = RoundValue(pt.Y); 79 | 80 | return pt; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsDemo/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("ChartControlsDemo")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("ChartControlsDemo")] 15 | [assembly: AssemblyCopyright("Copyright © 2015")] 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 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/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("ChartControls")] 11 | [assembly: AssemblyDescription("Including stock control, linear control, etc")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Wayne Gu")] 14 | [assembly: AssemblyProduct("ChartControls")] 15 | [assembly: AssemblyCopyright("Copyright © 2015")] 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.3.3.0")] 55 | [assembly: AssemblyFileVersion("1.3.3.0")] 56 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls45/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("ChartControls")] 11 | [assembly: AssemblyDescription("Including stock control, linear control, etc")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Wayne Gu")] 14 | [assembly: AssemblyProduct("ChartControls")] 15 | [assembly: AssemblyCopyright("Copyright © 2015")] 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.1.0.0")] 55 | [assembly: AssemblyFileVersion("1.1.0.0")] 56 | -------------------------------------------------------------------------------- /Src/Tests/ChartControlsDemo/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("ChartControlsDemo")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("ChartControlsDemo")] 15 | [assembly: AssemblyCopyright("Copyright © 2015")] 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 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsU8/Drawing/CanvasPen.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | // Copyright (c) 2015 Wayne Gu 3 | // 4 | // Permission is hereby granted, free of charge, to any person 5 | // obtaining a copy of this software and associated documentation 6 | // files (the "Software"), to deal in the Software without 7 | // restriction, including without limitation the rights to use, 8 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the 10 | // Software is furnished to do so, subject to the following 11 | // conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | // OTHER DEALINGS IN THE SOFTWARE. 24 | #endregion 25 | using System; 26 | using System.Collections.Generic; 27 | using System.Linq; 28 | using System.Text; 29 | using System.Threading.Tasks; 30 | using Windows.UI.Xaml.Media; 31 | 32 | namespace ChartControls.Drawing 33 | { 34 | class CanvasPen : IPen 35 | { 36 | public CanvasPen(Brush stroke, double thickness) 37 | { 38 | Brush = stroke; 39 | Thickness = thickness; 40 | } 41 | 42 | public Brush Brush { get; set; } 43 | public PenLineCap DashCap { get; set; } 44 | public DoubleCollection Dashes { get; set; } 45 | public double DashOffest { get; set; } 46 | public PenLineCap EndLineCap { get; set; } 47 | public PenLineJoin LineJoin { get; set; } 48 | public double MiterLimit { get; set; } 49 | public PenLineCap StartLineCap { get; set; } 50 | public double Thickness { get; set; } 51 | 52 | public object LowObject { get; private set; } 53 | 54 | public IPen Clone() 55 | { 56 | return new CanvasPen(this.Brush, this.Thickness){ 57 | DashCap = this.DashCap, 58 | Dashes = this.Dashes, 59 | DashOffest = this.DashOffest, 60 | EndLineCap = this.EndLineCap, 61 | LineJoin = this.LineJoin, 62 | MiterLimit = this.MiterLimit, 63 | StartLineCap = this.StartLineCap, 64 | }; 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/LogU8/LogU8.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12.0 6 | Debug 7 | AnyCPU 8 | {897E6742-2A2F-4A86-96DB-E9C67F9C45F3} 9 | Library 10 | Properties 11 | LogU8 12 | LogU8 13 | en-US 14 | 512 15 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 16 | Profile32 17 | v4.6 18 | 19 | 20 | true 21 | full 22 | false 23 | bin\Debug\ 24 | DEBUG;TRACE 25 | prompt 26 | 4 27 | 28 | 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 57 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/Drawing/DrawingObjectFactory.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | // Copyright (c) 2015 Wayne Gu 3 | // 4 | // Permission is hereby granted, free of charge, to any person 5 | // obtaining a copy of this software and associated documentation 6 | // files (the "Software"), to deal in the Software without 7 | // restriction, including without limitation the rights to use, 8 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the 10 | // Software is furnished to do so, subject to the following 11 | // conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | // OTHER DEALINGS IN THE SOFTWARE. 24 | #endregion 25 | using System; 26 | using System.Collections.Generic; 27 | using System.Linq; 28 | using System.Text; 29 | using System.Windows; 30 | using System.Windows.Media; 31 | 32 | namespace ChartControls.Drawing 33 | { 34 | /// 35 | /// 创建画图对象, 比如画笔、文本。在创建ChartItemCollection时需要用到。 36 | /// 37 | public sealed class DrawingObjectFactory 38 | { 39 | /// 40 | /// 创建画笔。 41 | /// 42 | /// 43 | /// 44 | /// 45 | public static IPen CreatePen(Brush brush, double thickness) 46 | { 47 | var pen = new DrawingPen(brush, thickness); 48 | //pen.Freeze(); 49 | return pen; 50 | } 51 | 52 | /// 53 | /// 创建文本。 54 | /// 55 | /// 56 | /// 57 | /// 58 | /// 59 | /// 60 | /// 61 | /// 62 | /// 63 | /// 64 | public static ITextFormat CreateTextFormat(string textToFormat, FlowDirection flowDirection, FontFamily fontFamily, FontStyle style, FontWeight weight, FontStretch stretch, double emSize, Brush foreground) 65 | { 66 | return new DrawingTextFormat(textToFormat, flowDirection, fontFamily, style, weight, stretch, emSize, foreground); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/ExitRight.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | // Copyright (c) 2015 Wayne Gu 3 | // 4 | // Permission is hereby granted, free of charge, to any person 5 | // obtaining a copy of this software and associated documentation 6 | // files (the "Software"), to deal in the Software without 7 | // restriction, including without limitation the rights to use, 8 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the 10 | // Software is furnished to do so, subject to the following 11 | // conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | // OTHER DEALINGS IN THE SOFTWARE. 24 | #endregion 25 | using System; 26 | using System.Collections.Generic; 27 | using System.Linq; 28 | using System.Text; 29 | using System.Threading.Tasks; 30 | 31 | namespace ChartControls 32 | { 33 | public class ExitRight 34 | { 35 | public ExitRight() 36 | { 37 | Dividen = BonusRate = RationedRate = RationedPrice = ChartItemCollection.valueNA; 38 | } 39 | public double Dividen { get; set; } 40 | public double BonusRate { get; set; } 41 | public double RationedRate { get; set; } 42 | public double RationedPrice { get; set; } 43 | 44 | public override string ToString() 45 | { 46 | StringBuilder text = new StringBuilder(); 47 | 48 | if (Dividen != double.NaN) 49 | { 50 | text.AppendFormat("D:{0:F2}", Dividen); 51 | } 52 | 53 | double rate = ChartItemCollection.valueNA; 54 | if (BonusRate != ChartItemCollection.valueNA) 55 | { 56 | rate = BonusRate; 57 | } 58 | if (RationedRate != ChartItemCollection.valueNA) 59 | { 60 | if (rate != ChartItemCollection.valueNA) 61 | { 62 | rate += RationedRate; 63 | } 64 | else 65 | { 66 | rate = RationedRate; 67 | } 68 | } 69 | 70 | if (rate != ChartItemCollection.valueNA) 71 | { 72 | if (text.Length != 0) 73 | { 74 | text.AppendLine(); 75 | } 76 | text.AppendFormat("S:{0:F2}", rate); 77 | } 78 | 79 | return text.ToString(); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Requests/StockData/GetStockRequest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using WebRequest.Http; 8 | using ULog; 9 | using Newtonsoft.Json; 10 | using Newtonsoft.Json.Linq; 11 | using Common; 12 | 13 | namespace WebRequest.Requests.StockData 14 | { 15 | class GetStockRequest : DataRequest 16 | { 17 | private const string UriTemplate = "/Data/GetShareData?market={0}&id={1}&type={2}"; 18 | 19 | private StockType shareType; 20 | public GetStockRequest(Market market, string id, DateTime? start, DateTime? end, StockType shareType, string context) 21 | : base(RequestPriority.Normal) 22 | { 23 | Uri = string.Format(StockWebStatus.WebServerUri + UriTemplate, market, id, shareType); 24 | if (start != null) 25 | { 26 | Uri += ("&start=" + start.Value.ToString("yyyyMMdd")); 27 | } 28 | 29 | if (end != null) 30 | { 31 | Uri += ("&end=" + end.Value.ToString("yyyyMMdd")); 32 | } 33 | 34 | if (!string.IsNullOrEmpty(context)) 35 | { 36 | Uri += ("&context=" + context); 37 | } 38 | 39 | this.shareType = shareType; 40 | } 41 | 42 | internal override void CreateResponse() 43 | { 44 | Response = new GetStockResponse(shareType); 45 | } 46 | } 47 | 48 | class GetStockResponse : DataResponse 49 | { 50 | public SimpleShare Stock 51 | { 52 | get; 53 | private set; 54 | } 55 | 56 | public StockType StockType 57 | { 58 | get; 59 | private set; 60 | } 61 | 62 | public GetStockResponse(StockType stockType) 63 | { 64 | StockType = stockType; 65 | } 66 | 67 | 68 | internal override void Decode() 69 | { 70 | base.Decode(); 71 | 72 | if (IsSucceeded) 73 | { 74 | JSonResponse jsonResponse = this.HttpResponse as JSonResponse; 75 | if (jsonResponse != null && jsonResponse.Object != null) 76 | { 77 | switch(StockType) 78 | { 79 | case StockType.Simple: 80 | Stock = jsonResponse.Object.ToObject(); 81 | break; 82 | case StockType.SimpleVolmun: 83 | Stock = jsonResponse.Object.ToObject(); 84 | break; 85 | case StockType.Complete: 86 | Stock = jsonResponse.Object.ToObject(); 87 | break; 88 | } 89 | } 90 | } 91 | } 92 | 93 | 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Views/Web.config: -------------------------------------------------------------------------------- 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 | 39 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34011 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 ChartView.Properties { 12 | using System; 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 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ChartView.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 ChartControls.Properties { 12 | using System; 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 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ChartControls.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartControlsDemo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 ChartControlsDemo.Properties { 12 | using System; 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 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ChartControlsDemo.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Src/ChartControls/Documents/HowToUseChartControls/HowToUseChartControls/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 HowToUseChartControls.Properties { 12 | using System; 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 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HowToUseChartControls.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Src/Tests/ChartControlsDemo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 ChartControlsDemo.Properties { 12 | using System; 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 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ChartControlsDemo.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Src/ChartControls/DataSource/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | D:\dzh2 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/LogU8/LogEventListener.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Diagnostics.Tracing; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | using Windows.Storage; 10 | 11 | namespace ULog 12 | { 13 | public class LogEventListener : EventListener 14 | { 15 | /// 16 | /// Storage file to be used to write logs 17 | /// 18 | private StorageFile m_StorageFile = null; 19 | 20 | /// 21 | /// Name of the current event listener 22 | /// 23 | private string m_Name; 24 | 25 | /// 26 | /// The format to be used by logging. 27 | /// 28 | private string m_Format = "{0:yyyy-MM-dd HH\\:mm\\:ss\\:ffff}\t{1}\t{2}"; 29 | 30 | private SemaphoreSlim m_SemaphoreSlim = new SemaphoreSlim(1); 31 | 32 | public LogEventListener(string name) 33 | { 34 | this.m_Name = name; 35 | 36 | Debug.WriteLine("StorageFileEventListener for {0} has name {1}", GetHashCode(), name); 37 | 38 | AssignLocalFile(); 39 | } 40 | 41 | private async void AssignLocalFile() 42 | { 43 | m_StorageFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(m_Name.Replace(" ", "_") + ".log", 44 | CreationCollisionOption.OpenIfExists); 45 | } 46 | 47 | private async void WriteToFile(IEnumerable lines) 48 | { 49 | await m_SemaphoreSlim.WaitAsync(); 50 | 51 | await Task.Run(async () => 52 | { 53 | try 54 | { 55 | await FileIO.AppendLinesAsync(m_StorageFile, lines); 56 | } 57 | catch (Exception ex) 58 | { 59 | // TODO: 60 | } 61 | finally 62 | { 63 | m_SemaphoreSlim.Release(); 64 | } 65 | }); 66 | } 67 | 68 | protected override void OnEventWritten(EventWrittenEventArgs eventData) 69 | { 70 | if (m_StorageFile == null) return; 71 | 72 | if (eventData.EventId == 0) 73 | return; 74 | 75 | var lines = new List(); 76 | 77 | string newFormatedLine = string.Format(m_Format, DateTime.Now, eventData.Level, eventData.Payload[0]); 78 | 79 | Debug.WriteLine(newFormatedLine); 80 | 81 | lines.Add(newFormatedLine); 82 | 83 | WriteToFile(lines); 84 | } 85 | protected override void OnEventSourceCreated(EventSource eventSource) 86 | { 87 | Debug.WriteLine("OnEventSourceCreated for Listener {0} - {1} got eventSource {2}", GetHashCode(), m_Name, eventSource.Name); 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /Src/ChartControls/StockData2Json/Stock2Json.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E6014C52-1BF6-49F5-B332-C7BEEE67C572} 8 | Exe 9 | Properties 10 | Stock2Json 11 | Stock2Json 12 | v4.5 13 | 512 14 | 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | false 36 | 37 | 38 | 39 | ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll 40 | True 41 | 42 | 43 | ..\..\MyParser\ParserBase\bin\Release\ParserBase.dll 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Share.cs 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 72 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Requests/StockData/DataRequest.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using WebRequest.Common; 10 | using WebRequest.Http; 11 | using ULog; 12 | 13 | namespace WebRequest.Requests.StockData 14 | { 15 | class DataRequest : Request 16 | { 17 | protected string httpMethod; 18 | 19 | public Stream RequestStream { get; protected set; } 20 | 21 | public DataRequest(RequestPriority prio, string method = HttpConst.HttpMethod_Get) 22 | : base(prio) 23 | { 24 | httpMethod = method; 25 | //Set uri in child class 26 | RequestStream = null; 27 | } 28 | 29 | internal override void Encode() 30 | { 31 | if (httpMethod == HttpConst.HttpMethod_Get) 32 | { 33 | this.HttpRequest = new HttpRequest(Uri, httpMethod); 34 | } 35 | else if (httpMethod == HttpConst.HttpMethod_Post || httpMethod == HttpConst.HttpMethod_Put) 36 | { 37 | if (RequestStream != null) 38 | { 39 | this.HttpRequest = new HttpRequest(Uri, httpMethod, true, false); 40 | 41 | HttpRequest.SetRequestStream(RequestStream, HttpLayer.StreamContentType); 42 | } 43 | else 44 | { 45 | var jObj = CreateRequestBody(); 46 | this.HttpRequest = new JSonRequest(Uri, jObj, httpMethod); 47 | } 48 | } 49 | else 50 | { 51 | LogHelper.OnlineLogger.Error("Unsupported http method"); 52 | } 53 | 54 | if (requestHeaders != null && HttpRequest != null) 55 | { 56 | this.HttpRequest.Headers = requestHeaders; 57 | } 58 | 59 | } 60 | 61 | protected virtual JObject CreateRequestBody() { return new JObject(); } 62 | 63 | internal override void CreateResponse() 64 | { 65 | Response = new DataResponse(); 66 | } 67 | } 68 | 69 | class DataResponse : Response 70 | { 71 | public int Code 72 | { 73 | get; 74 | private set; 75 | } 76 | 77 | public Error Error 78 | { 79 | get; 80 | private set; 81 | } 82 | 83 | protected void GetIsSucceed() 84 | { 85 | Code = (int)HttpResponse.StatusCode; 86 | IsSucceeded = Code < 300 && Exception == null; 87 | } 88 | 89 | internal override void Decode() 90 | { 91 | try 92 | { 93 | JSonResponse jsonResponse = HttpResponse as JSonResponse; 94 | 95 | GetIsSucceed(); 96 | 97 | if(jsonResponse != null && jsonResponse.Object != null) 98 | { 99 | LogHelper.OnlineLogger.Debug(jsonResponse.Object.ToString()); 100 | if (!IsSucceeded) 101 | { 102 | Error = jsonResponse.Object.ToObject(); 103 | } 104 | } 105 | } 106 | catch (Exception ex) 107 | { 108 | Exception = ex; 109 | } 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Common/Streams.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.IO; 6 | 7 | namespace WebRequest.Common 8 | { 9 | class StreamCollection : IDisposable 10 | { 11 | public StreamCollection(Stream stream) 12 | { 13 | Streams = new List(1); 14 | Streams.Add(stream); 15 | } 16 | 17 | public StreamCollection(IEnumerable streams) 18 | { 19 | Streams = streams.ToList(); 20 | } 21 | 22 | public List Streams 23 | { 24 | get; 25 | private set; 26 | } 27 | 28 | public bool CanSeek { 29 | get 30 | { 31 | return Streams.All(s => s.CanSeek); 32 | } 33 | } 34 | 35 | public long Length 36 | { 37 | get 38 | { 39 | return Streams.Sum(s => s.Length); 40 | } 41 | } 42 | 43 | private int iCurrentStream = 0; 44 | 45 | public long Seek(long offset) 46 | { 47 | if (Streams.Count == 1) 48 | { 49 | return Streams[0].Seek(offset, SeekOrigin.Begin); 50 | } 51 | else 52 | { 53 | long length = 0; 54 | for (int i = 0; i < Streams.Count; i++) 55 | { 56 | var tempLength = length + Streams[i].Length; 57 | if (offset < tempLength) 58 | { 59 | iCurrentStream = i; 60 | Streams[i].Seek(offset - length, SeekOrigin.Begin); 61 | return offset; 62 | } 63 | 64 | length = tempLength; 65 | } 66 | 67 | throw new IOException("Cannot seek"); 68 | 69 | } 70 | } 71 | 72 | public int Read(byte[] buffer, int offset, int count) 73 | { 74 | if (Streams.Count == 1) 75 | { 76 | return Streams[0].Read(buffer, offset, count); 77 | } 78 | else 79 | { 80 | int readCount = 0; 81 | while (true) 82 | { 83 | var iRead = Streams[iCurrentStream].Read(buffer, offset, count); 84 | readCount += iRead; 85 | 86 | if (iRead < count) 87 | { 88 | if (iCurrentStream < Streams.Count - 1) 89 | { 90 | iCurrentStream++; 91 | Streams[iCurrentStream].Seek(0, SeekOrigin.Begin); 92 | offset += iRead; 93 | count -= iRead; 94 | 95 | continue; 96 | } 97 | 98 | } 99 | 100 | break; 101 | } 102 | 103 | return readCount; 104 | } 105 | } 106 | 107 | public void Close() 108 | { 109 | foreach (var s in Streams) 110 | { 111 | s.Dispose(); 112 | } 113 | } 114 | 115 | public void Dispose() 116 | { 117 | foreach (var s in Streams) 118 | { 119 | s.Dispose(); 120 | } 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /.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 | [Dd]ebug/ 11 | [Dd]ebugPublic/ 12 | [Rr]elease/ 13 | x64/ 14 | #build/ 15 | bld/ 16 | [Bb]in/ 17 | [Oo]bj/ 18 | [Tt]mp/ 19 | 20 | # MSTest test Results 21 | [Tt]est[Rr]esult*/ 22 | [Bb]uild[Ll]og.* 23 | 24 | #NUNIT 25 | *.VisualState.xml 26 | TestResult.xml 27 | 28 | # Build Results of an ATL Project 29 | [Dd]ebugPS/ 30 | [Rr]eleasePS/ 31 | dlldata.c 32 | 33 | *_i.c 34 | *_p.c 35 | *_i.h 36 | *.ilk 37 | *.meta 38 | *.obj 39 | *.pch 40 | *.pdb 41 | *.pgc 42 | *.pgd 43 | *.rsp 44 | *.sbr 45 | *.tlb 46 | *.tli 47 | *.tlh 48 | *.tmp 49 | *.tmp_proj 50 | *.log 51 | *.vspscc 52 | *.vssscc 53 | .builds 54 | *.pidb 55 | *.svclog 56 | *.scc 57 | 58 | # Chutzpah Test files 59 | _Chutzpah* 60 | 61 | # Visual C++ cache files 62 | ipch/ 63 | *.aps 64 | *.ncb 65 | *.opensdf 66 | *.sdf 67 | *.cachefile 68 | 69 | # Visual Studio profiler 70 | *.psess 71 | *.vsp 72 | *.vspx 73 | 74 | # TFS 2012 Local Workspace 75 | $tf/ 76 | 77 | # Guidance Automation Toolkit 78 | *.gpState 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper*/ 82 | *.[Rr]e[Ss]harper 83 | *.DotSettings.user 84 | 85 | # JustCode is a .NET coding addin-in 86 | .JustCode 87 | 88 | # TeamCity is a build add-in 89 | _TeamCity* 90 | 91 | # DotCover is a Code Coverage Tool 92 | *.dotCover 93 | 94 | # NCrunch 95 | *.ncrunch* 96 | _NCrunch_* 97 | .*crunch*.local.xml 98 | 99 | # MightyMoose 100 | *.mm.* 101 | AutoTest.Net/ 102 | 103 | # Web workbench (sass) 104 | .sass-cache/ 105 | 106 | # Installshield output folder 107 | [Ee]xpress/ 108 | 109 | # DocProject is a documentation generator add-in 110 | DocProject/buildhelp/ 111 | DocProject/Help/*.HxT 112 | DocProject/Help/*.HxC 113 | DocProject/Help/*.hhc 114 | DocProject/Help/*.hhk 115 | DocProject/Help/*.hhp 116 | DocProject/Help/Html2 117 | DocProject/Help/html 118 | 119 | # Click-Once directory 120 | publish/ 121 | 122 | # Publish Web Output 123 | *.[Pp]ublish.xml 124 | *.azurePubxml 125 | 126 | # NuGet Packages Directory 127 | #packages/ 128 | ## TODO: If the tool you use requires repositories.config uncomment the next line 129 | #!packages/repositories.config 130 | 131 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 132 | # This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) 133 | !packages/build/ 134 | 135 | # Windows Azure Build Output 136 | csx/ 137 | *.build.csdef 138 | 139 | # Windows Store app package directory 140 | AppPackages/ 141 | 142 | # Others 143 | sql/ 144 | *.Cache 145 | ClientBin/ 146 | [Ss]tyle[Cc]op.* 147 | ~$* 148 | *~ 149 | *.dbmdl 150 | *.dbproj.schemaview 151 | *.pfx 152 | *.publishsettings 153 | node_modules/ 154 | 155 | # RIA/Silverlight projects 156 | Generated_Code/ 157 | 158 | # Backup & report files from converting an old project file to a newer 159 | # Visual Studio version. Backup files are not needed, because we have git ;-) 160 | _UpgradeReport_Files/ 161 | #Backup*/ 162 | UpgradeLog*.XML 163 | UpgradeLog*.htm 164 | 165 | # SQL Server files 166 | *.mdf 167 | *.ldf 168 | 169 | # Business Intelligence projects 170 | *.rdl.data 171 | *.bim.layout 172 | *.bim_*.settings 173 | 174 | # Microsoft Fakes 175 | FakesAssemblies/ 176 | 177 | packages/ 178 | .vs/ 179 | Redistribute/ -------------------------------------------------------------------------------- /Src/ChartControls/ChartControls/Drawing/DrawingPen.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | // Copyright (c) 2015 Wayne Gu 3 | // 4 | // Permission is hereby granted, free of charge, to any person 5 | // obtaining a copy of this software and associated documentation 6 | // files (the "Software"), to deal in the Software without 7 | // restriction, including without limitation the rights to use, 8 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the 10 | // Software is furnished to do so, subject to the following 11 | // conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | // OTHER DEALINGS IN THE SOFTWARE. 24 | #endregion 25 | using System; 26 | using System.Collections.Generic; 27 | using System.Linq; 28 | using System.Text; 29 | using System.Windows.Media; 30 | 31 | namespace ChartControls.Drawing 32 | { 33 | class DrawingPen : IPen 34 | { 35 | private Pen pen; 36 | 37 | public DrawingPen(Brush brush, double thickness) 38 | { 39 | pen = new Pen(brush, thickness); 40 | } 41 | 42 | public Brush Brush 43 | { 44 | get { return pen.Brush; } 45 | set { pen.Brush = value; } 46 | } 47 | 48 | public PenLineCap DashCap 49 | { 50 | get { return pen.DashCap; } 51 | set { pen.DashCap = value; } 52 | } 53 | 54 | public DoubleCollection Dashes 55 | { 56 | get { return pen.DashStyle.Dashes; } 57 | set { pen.DashStyle = new DashStyle(value, 0); } 58 | } 59 | 60 | public double DashOffest 61 | { 62 | get { return pen.DashStyle.Offset; } 63 | set { pen.DashStyle.Offset = value; } 64 | } 65 | 66 | public PenLineCap EndLineCap 67 | { 68 | get { return pen.EndLineCap; } 69 | set { pen.EndLineCap = value; } 70 | } 71 | 72 | public PenLineJoin LineJoin 73 | { 74 | get { return pen.LineJoin; } 75 | set { pen.LineJoin = value; } 76 | } 77 | 78 | public double MiterLimit 79 | { 80 | get { return pen.MiterLimit; } 81 | set { pen.MiterLimit = value; } 82 | } 83 | 84 | public PenLineCap StartLineCap 85 | { 86 | get { return pen.StartLineCap; } 87 | set { pen.StartLineCap = value; } 88 | } 89 | 90 | public double Thickness 91 | { 92 | get { return pen.Thickness; } 93 | set { pen.Thickness = value; } 94 | } 95 | 96 | public object LowObject 97 | { 98 | get { return pen; } 99 | } 100 | 101 | private DrawingPen(Pen other) 102 | { 103 | this.pen = other.Clone(); 104 | } 105 | 106 | public IPen Clone() 107 | { 108 | return new DrawingPen(pen); 109 | } 110 | 111 | public void Freeze() 112 | { 113 | if (!pen.IsFrozen) 114 | { 115 | pen.Freeze(); 116 | } 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartViewU8/WebRequestU8/Http/RangeHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace WebRequest.Common 7 | { 8 | class RangeHelper 9 | { 10 | static readonly char[] splitor = new char[] {'-'}; 11 | public long Start 12 | { 13 | get; 14 | set; 15 | } 16 | 17 | public long End 18 | { 19 | get; 20 | set; 21 | } 22 | 23 | public RangeHelper() 24 | { 25 | } 26 | 27 | public RangeHelper(long start, long end) 28 | { 29 | Start = start; 30 | End = end; 31 | } 32 | 33 | public override string ToString() 34 | { 35 | return string.Format("{0}{2}{1}", Start, End, splitor[0]); 36 | } 37 | 38 | public static RangeHelper Parse(string range) 39 | { 40 | RangeHelper rangeHelper = null; 41 | 42 | var rangePair = range.Trim().Split(splitor, StringSplitOptions.RemoveEmptyEntries); 43 | if (rangePair.Length == 2) 44 | { 45 | long s, e; 46 | if(long.TryParse(rangePair[0], out s)) 47 | { 48 | if (long.TryParse(rangePair[1], out e)) 49 | { 50 | rangeHelper = new RangeHelper(); 51 | rangeHelper.Start = s; 52 | rangeHelper.End = e; 53 | 54 | } 55 | } 56 | 57 | } 58 | 59 | return rangeHelper; 60 | } 61 | } 62 | 63 | class ContentRangeHelper 64 | { 65 | public RangeHelper Range 66 | { 67 | get; 68 | private set; 69 | } 70 | 71 | public long Length 72 | { 73 | get; 74 | set; 75 | } 76 | public ContentRangeHelper(RangeHelper rangeHelper, long length) 77 | { 78 | Range = rangeHelper; 79 | Length = length; 80 | } 81 | 82 | private const string dataType = "bytes"; 83 | private const string starMark = "*"; 84 | private static readonly char[] splitor = new char[]{'/'}; 85 | public override string ToString() 86 | { 87 | return string.Format(dataType + " {0}{1}{2}", 88 | Range != null ? Range.ToString() : starMark, splitor[0], Length); 89 | } 90 | 91 | public static ContentRangeHelper Parse(string contentRange) 92 | { 93 | if (!string.IsNullOrEmpty(contentRange)) 94 | { 95 | 96 | contentRange.Trim(); 97 | if (contentRange.StartsWith(dataType)) 98 | { 99 | contentRange = contentRange.Substring(dataType.Length).Trim(); 100 | var ranges = contentRange.Split(splitor, StringSplitOptions.RemoveEmptyEntries); 101 | if (ranges.Length == 2) 102 | { 103 | RangeHelper range = null; 104 | long length = 0; 105 | if (ranges[1] != starMark) 106 | { 107 | range = RangeHelper.Parse(ranges[0]); 108 | } 109 | 110 | if (long.TryParse(ranges[1], out length)) 111 | { 112 | return new ContentRangeHelper(range, length); 113 | } 114 | } 115 | } 116 | } 117 | 118 | return null; 119 | 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /Src/ChartControls/ChartView/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 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 | 42 | 43 | 45 | 46 | 47 | 48 |