Skip to content

Commit 62d3ddb

Browse files
committed
Update WPF and WindowsForms examples
upgrade to v2.0.0
1 parent 66be1a7 commit 62d3ddb

File tree

79 files changed

+592
-2164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+592
-2164
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
bin/
33
obj/
44
packages/
5+
*.suo

DocumentationExamples.sln

+244-151
Large diffs are not rendered by default.
+5-85
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{FE37EF85-360E-46BA-95D5-3A336F70297A}</ProjectGuid>
8-
<OutputType>Exe</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>ExampleGenerator</RootNamespace>
11-
<AssemblyName>ExampleGenerator</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
15-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
3+
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<UseWindowsForms>true</UseWindowsForms>
5+
<OutputType>WinExe</OutputType>
166
</PropertyGroup>
17-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18-
<PlatformTarget>AnyCPU</PlatformTarget>
19-
<DebugSymbols>true</DebugSymbols>
20-
<DebugType>full</DebugType>
21-
<Optimize>false</Optimize>
22-
<OutputPath>bin\Debug\</OutputPath>
23-
<DefineConstants>DEBUG;TRACE</DefineConstants>
24-
<ErrorReport>prompt</ErrorReport>
25-
<WarningLevel>4</WarningLevel>
26-
<Prefer32Bit>false</Prefer32Bit>
27-
</PropertyGroup>
28-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29-
<PlatformTarget>AnyCPU</PlatformTarget>
30-
<DebugType>pdbonly</DebugType>
31-
<Optimize>true</Optimize>
32-
<OutputPath>bin\Release\</OutputPath>
33-
<DefineConstants>TRACE</DefineConstants>
34-
<ErrorReport>prompt</ErrorReport>
35-
<WarningLevel>4</WarningLevel>
36-
<Prefer32Bit>false</Prefer32Bit>
37-
</PropertyGroup>
38-
<ItemGroup>
39-
<Reference Include="OxyPlot, Version=1.0.0.0, Culture=neutral, PublicKeyToken=638079a8f0bd61e9, processorArchitecture=MSIL">
40-
<HintPath>..\packages\OxyPlot.Core.1.0.0-unstable2069\lib\net45\OxyPlot.dll</HintPath>
41-
<Private>True</Private>
42-
</Reference>
43-
<Reference Include="OxyPlot.WindowsForms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=245eacd6b5d2d338, processorArchitecture=MSIL">
44-
<HintPath>..\packages\OxyPlot.WindowsForms.1.0.0-unstable2069\lib\net45\OxyPlot.WindowsForms.dll</HintPath>
45-
<Private>True</Private>
46-
</Reference>
47-
<Reference Include="System" />
48-
<Reference Include="System.Core" />
49-
<Reference Include="System.Drawing" />
50-
</ItemGroup>
51-
<ItemGroup>
52-
<Compile Include="Annotations\EllipseAnnotationExamples.cs" />
53-
<Compile Include="Annotations\LineAnnotationExamples.cs" />
54-
<Compile Include="Annotations\RectangleAnnotationExamples.cs" />
55-
<Compile Include="Annotations\TextAnnotationExamples.cs" />
56-
<Compile Include="Axes\AxisExamples.cs" />
57-
<Compile Include="Axes\DateTimeAxisExamples.cs" />
58-
<Compile Include="Axes\LinearAxisExamples.cs" />
59-
<Compile Include="Axes\LogarithmicAxisExamples.cs" />
60-
<Compile Include="Axes\PolarPlotExamples.cs" />
61-
<Compile Include="Axes\TimeSpanAxisExamples.cs" />
62-
<Compile Include="ExportAttribute.cs" />
63-
<Compile Include="Misc\BindingExamples.cs" />
64-
<Compile Include="Series\BarSeriesExamples.cs" />
65-
<Compile Include="Series\ColumnSeriesExamples.cs" />
66-
<Compile Include="Series\HeatMapSeriesExamples.cs" />
67-
<Compile Include="Series\LineSeriesExamples.cs" />
68-
<Compile Include="Series\ScatterSeriesExamples.cs" />
69-
<Compile Include="Series\ContourSeriesExamples.cs" />
70-
<Compile Include="Program.cs" />
71-
<Compile Include="Properties\AssemblyInfo.cs" />
72-
<Compile Include="Misc\Showcases.cs" />
73-
<Compile Include="Series\StairStepSeriesExamples.cs" />
74-
<Compile Include="Series\TwoColorLineSeriesExamples.cs" />
75-
<Compile Include="Series\FunctionSeriesExamples.cs" />
76-
<Compile Include="Series\StemSeriesExamples.cs" />
77-
</ItemGroup>
787
<ItemGroup>
79-
<None Include="app.config" />
80-
<None Include="packages.config" />
8+
<PackageReference Include="OxyPlot.WindowsForms" Version="2.0.0" />
819
</ItemGroup>
8210
<ItemGroup>
8311
<Content Include="..\TruePNG\TruePNG.exe">
8412
<Link>TruePNG.exe</Link>
8513
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
8614
</Content>
8715
</ItemGroup>
88-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
89-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
90-
Other similar extension points exist, see Microsoft.Common.targets.
91-
<Target Name="BeforeBuild">
92-
</Target>
93-
<Target Name="AfterBuild">
94-
</Target>
95-
-->
9616
</Project>

ExampleGenerator/ExampleGenerator.csproj.DotSettings

-4
This file was deleted.

ExampleGenerator/Properties/AssemblyInfo.cs

-63
This file was deleted.

ExampleGenerator/Series/LineSeriesExamples.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static PlotModel LineSeries()
2222
public static PlotModel LineSeriesExample2()
2323
{
2424
var model = new PlotModel { Title = "LineSeries", Subtitle = "Smooth = true" };
25-
var lineSeries = new LineSeries { Smooth = true };
25+
var lineSeries = new LineSeries { InterpolationAlgorithm = new CanonicalSpline(10) };
2626
lineSeries.Points.Add(new DataPoint(0, 0));
2727
lineSeries.Points.Add(new DataPoint(10, 4));
2828
lineSeries.Points.Add(new DataPoint(30, 2));

ExampleGenerator/app.config

-12
This file was deleted.

ExampleGenerator/packages.config

-5
This file was deleted.
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp3.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="OxyPlot.Core.Drawing" Version="2.0.0" />
10+
</ItemGroup>
11+
12+
</Project>

HelloWorld/ConsoleApp1/Program.cs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace ConsoleApp1
2+
{
3+
using OxyPlot;
4+
using OxyPlot.Core.Drawing;
5+
using OxyPlot.Series;
6+
using System;
7+
8+
class Program
9+
{
10+
static void Main(string[] args)
11+
{
12+
var pm = new PlotModel { Title = "Hello world from C#" };
13+
pm.Series.Add(new FunctionSeries(Math.Sin, 0, 10, 100));
14+
PngExporter.Export(pm, "HelloWorld.png", 600, 300, OxyColors.White);
15+
}
16+
}
17+
}
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp3.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<Compile Include="Program.fs" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="OxyPlot.Core.Drawing" Version="2.0.0" />
14+
</ItemGroup>
15+
16+
</Project>

HelloWorld/ConsoleApp2/Program.fs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
open OxyPlot
2+
open OxyPlot.Series
3+
open OxyPlot.Core.Drawing
4+
5+
let myModel = PlotModel()
6+
do
7+
myModel.Title <- "Hello world from F#"
8+
myModel.Series.Add(FunctionSeries(cos, 0.0, 10.0, 0.1, "cos(x)"))
9+
10+
[<EntryPoint>]
11+
let main argv =
12+
PngExporter.Export(myModel, "HelloWorld.png", 600, 300, OxyColors.White)
13+
0 // return an integer exit code

HelloWorld/GtkApplication1/GtkApplication1.csproj

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
66
<ProjectGuid>{98C3C6E3-6E38-4AA4-8759-62D365BD8F6C}</ProjectGuid>
77
<OutputType>WinExe</OutputType>
88
<RootNamespace>GtkApplication1</RootNamespace>
99
<AssemblyName>GtkApplication1</AssemblyName>
10-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
10+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
11+
<TargetFrameworkProfile />
1112
</PropertyGroup>
1213
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
1314
<DebugSymbols>true</DebugSymbols>
@@ -30,6 +31,13 @@
3031
<PlatformTarget>x86</PlatformTarget>
3132
</PropertyGroup>
3233
<ItemGroup>
34+
<Reference Include="gio-sharp, Version=3.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=x86" />
35+
<Reference Include="OxyPlot, Version=1.0.0.0, Culture=neutral, PublicKeyToken=638079a8f0bd61e9, processorArchitecture=MSIL">
36+
<HintPath>..\..\packages\OxyPlot.Core.1.0.0\lib\net45\OxyPlot.dll</HintPath>
37+
</Reference>
38+
<Reference Include="OxyPlot.GtkSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=245eacd6b5d2d338, processorArchitecture=MSIL">
39+
<HintPath>..\..\packages\OxyPlot.GtkSharp.1.0.0\lib\net45\OxyPlot.GtkSharp.dll</HintPath>
40+
</Reference>
3341
<Reference Include="System" />
3442
<Reference Include="gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
3543
<SpecificVersion>False</SpecificVersion>
@@ -50,12 +58,6 @@
5058
<SpecificVersion>False</SpecificVersion>
5159
</Reference>
5260
<Reference Include="Mono.Posix" />
53-
<Reference Include="OxyPlot">
54-
<HintPath>packages\OxyPlot.Core.1.0.0\lib\net45\OxyPlot.dll</HintPath>
55-
</Reference>
56-
<Reference Include="OxyPlot.GtkSharp">
57-
<HintPath>packages\OxyPlot.GtkSharp.1.0.0\lib\net45\OxyPlot.GtkSharp.dll</HintPath>
58-
</Reference>
5961
</ItemGroup>
6062
<ItemGroup>
6163
<EmbeddedResource Include="gtk-gui\gui.stetic">
@@ -71,6 +73,7 @@
7173
</ItemGroup>
7274
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
7375
<ItemGroup>
76+
<None Include="app.config" />
7477
<None Include="packages.config" />
7578
</ItemGroup>
7679
</Project>

HelloWorld/GtkApplication1/app.config

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup>
4+
<runtime>
5+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
6+
<dependentAssembly>
7+
<assemblyIdentity name="gtk-sharp" publicKeyToken="35e10195dab3c99f" culture="neutral" />
8+
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
9+
</dependentAssembly>
10+
<dependentAssembly>
11+
<assemblyIdentity name="gdk-sharp" publicKeyToken="35e10195dab3c99f" culture="neutral" />
12+
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
13+
</dependentAssembly>
14+
<dependentAssembly>
15+
<assemblyIdentity name="pango-sharp" publicKeyToken="35e10195dab3c99f" culture="neutral" />
16+
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
17+
</dependentAssembly>
18+
<dependentAssembly>
19+
<assemblyIdentity name="glib-sharp" publicKeyToken="35e10195dab3c99f" culture="neutral" />
20+
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
21+
</dependentAssembly>
22+
</assemblyBinding>
23+
</runtime>
24+
</configuration>
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="OxyPlot.Core" version="1.0.0" targetFramework="net45" />
4-
<package id="OxyPlot.GtkSharp" version="1.0.0" targetFramework="net45" />
3+
<package id="OxyPlot.Core" version="1.0.0" targetFramework="net461" />
4+
<package id="OxyPlot.GtkSharp" version="1.0.0" targetFramework="net461" />
55
</packages>

0 commit comments

Comments
 (0)