Skip to content

Commit 926914c

Browse files
committed
First code drop
1 parent d475b3a commit 926914c

116 files changed

Lines changed: 7785 additions & 0 deletions

File tree

Some content is hidden

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

‎Source/Examples/AreaDemo/App.xaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Application x:Class="AreaDemo.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
StartupUri="MainWindow.xaml">
5+
<Application.Resources>
6+
7+
</Application.Resources>
8+
</Application>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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 AreaDemo
9+
{
10+
/// <summary>
11+
/// Interaction logic for App.xaml
12+
/// </summary>
13+
public partial class App : Application
14+
{
15+
}
16+
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{0C7A4A18-4A78-4074-903C-79E5857E0A04}</ProjectGuid>
9+
<OutputType>WinExe</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>AreaDemo</RootNamespace>
12+
<AssemblyName>AreaDemo</AssemblyName>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14+
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
15+
<FileAlignment>512</FileAlignment>
16+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
17+
<WarningLevel>4</WarningLevel>
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
20+
<PlatformTarget>x86</PlatformTarget>
21+
<DebugSymbols>true</DebugSymbols>
22+
<DebugType>full</DebugType>
23+
<Optimize>false</Optimize>
24+
<OutputPath>bin\Debug\</OutputPath>
25+
<DefineConstants>DEBUG;TRACE</DefineConstants>
26+
<ErrorReport>prompt</ErrorReport>
27+
<WarningLevel>4</WarningLevel>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
30+
<PlatformTarget>x86</PlatformTarget>
31+
<DebugType>pdbonly</DebugType>
32+
<Optimize>true</Optimize>
33+
<OutputPath>bin\Release\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="System" />
40+
<Reference Include="System.Data" />
41+
<Reference Include="System.Xml" />
42+
<Reference Include="Microsoft.CSharp" />
43+
<Reference Include="System.Core" />
44+
<Reference Include="System.Xml.Linq" />
45+
<Reference Include="System.Data.DataSetExtensions" />
46+
<Reference Include="System.Xaml">
47+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
48+
</Reference>
49+
<Reference Include="WindowsBase" />
50+
<Reference Include="PresentationCore" />
51+
<Reference Include="PresentationFramework" />
52+
</ItemGroup>
53+
<ItemGroup>
54+
<ApplicationDefinition Include="App.xaml">
55+
<Generator>MSBuild:Compile</Generator>
56+
<SubType>Designer</SubType>
57+
</ApplicationDefinition>
58+
<Page Include="MainWindow.xaml">
59+
<Generator>MSBuild:Compile</Generator>
60+
<SubType>Designer</SubType>
61+
</Page>
62+
<Compile Include="App.xaml.cs">
63+
<DependentUpon>App.xaml</DependentUpon>
64+
<SubType>Code</SubType>
65+
</Compile>
66+
<Compile Include="MainViewModel.cs" />
67+
<Compile Include="MainWindow.xaml.cs">
68+
<DependentUpon>MainWindow.xaml</DependentUpon>
69+
<SubType>Code</SubType>
70+
</Compile>
71+
</ItemGroup>
72+
<ItemGroup>
73+
<Compile Include="Properties\AssemblyInfo.cs">
74+
<SubType>Code</SubType>
75+
</Compile>
76+
<Compile Include="Properties\Resources.Designer.cs">
77+
<AutoGen>True</AutoGen>
78+
<DesignTime>True</DesignTime>
79+
<DependentUpon>Resources.resx</DependentUpon>
80+
</Compile>
81+
<Compile Include="Properties\Settings.Designer.cs">
82+
<AutoGen>True</AutoGen>
83+
<DependentUpon>Settings.settings</DependentUpon>
84+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
85+
</Compile>
86+
<EmbeddedResource Include="Properties\Resources.resx">
87+
<Generator>ResXFileCodeGenerator</Generator>
88+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
89+
</EmbeddedResource>
90+
<None Include="Properties\Settings.settings">
91+
<Generator>SettingsSingleFileGenerator</Generator>
92+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
93+
</None>
94+
<AppDesigner Include="Properties\" />
95+
</ItemGroup>
96+
<ItemGroup>
97+
<ProjectReference Include="..\..\OxyPlot.Wpf\OxyPlot.Wpf.csproj">
98+
<Project>{698CCD8E-ADCC-4565-8517-5EDD36F07155}</Project>
99+
<Name>OxyPlot.Wpf</Name>
100+
</ProjectReference>
101+
</ItemGroup>
102+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
103+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
104+
Other similar extension points exist, see Microsoft.Common.targets.
105+
<Target Name="BeforeBuild">
106+
</Target>
107+
<Target Name="AfterBuild">
108+
</Target>
109+
-->
110+
</Project>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
using System;
2+
using System.Collections.ObjectModel;
3+
4+
namespace AreaDemo
5+
{
6+
public class MainViewModel
7+
{
8+
public MainViewModel()
9+
{
10+
Measurements = new Collection<Measurement>();
11+
var r = new Random();
12+
double p1 = 0;
13+
double p2 = 5;
14+
double v1 = 0;
15+
double v2 = 0;
16+
for (int i = 0; i < 100; i++)
17+
{
18+
v1 += (r.NextDouble() - 0.5)*0.7;
19+
v2 += (r.NextDouble() - 0.5)*0.1;
20+
double y1 = p1 + v1;
21+
double y2 = p2 + v2;
22+
p1 = y1;
23+
p2 = y2;
24+
Measurements.Add(new Measurement
25+
{
26+
Time = i*2.5,
27+
Value = y1,
28+
Maximum = y1 + y2,
29+
Minimum = y1 - y2
30+
});
31+
}
32+
}
33+
34+
public Collection<Measurement> Measurements { get; private set; }
35+
}
36+
37+
public class Measurement
38+
{
39+
public double Time { get; set; }
40+
public double Value { get; set; }
41+
public double Minimum { get; set; }
42+
public double Maximum { get; set; }
43+
44+
public override string ToString()
45+
{
46+
return String.Format("{0:#0.0} {1:##0.0}", Time, Value);
47+
}
48+
}
49+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Window x:Class="AreaDemo.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf"
5+
Title="AreaDemo" Height="480" Width="640">
6+
<DockPanel>
7+
<oxy:PlotControl x:Name="plot1" Title="LineSeries and AreaSeries">
8+
<oxy:AreaSeries ItemsSource="{Binding Measurements}" DataFieldX="Time" DataFieldY="Maximum" DataFieldBase="Minimum" Fill="LightBlue" Thickness="0"/>
9+
<oxy:LineSeries ItemsSource="{Binding Measurements}" DataFieldX="Time" DataFieldY="Value" Color="Black" Thickness="2" Smooth="True"/>
10+
<oxy:LineSeries ItemsSource="{Binding Measurements}" DataFieldX="Time" DataFieldY="Value" Color="Blue" Thickness="2" Smooth="False"/>
11+
</oxy:PlotControl>
12+
</DockPanel>
13+
</Window>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Windows;
2+
using OxyPlot.Wpf;
3+
4+
namespace AreaDemo
5+
{
6+
/// <summary>
7+
/// Interaction logic for MainWindow.xaml
8+
/// </summary>
9+
public partial class MainWindow : Window
10+
{
11+
public MainWindow()
12+
{
13+
InitializeComponent();
14+
var vm = new MainViewModel();
15+
DataContext = vm;
16+
17+
foreach (DataSeries s in plot1.Series)
18+
s.ItemsSource = vm.Measurements;
19+
}
20+
}
21+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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("AreaDemo")]
11+
[assembly: AssemblyDescription("")]
12+
[assembly: AssemblyConfiguration("")]
13+
[assembly: AssemblyCompany("")]
14+
[assembly: AssemblyProduct("AreaDemo")]
15+
[assembly: AssemblyCopyright("Copyright © OBJO 2010")]
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+
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
26+
//inside a <PropertyGroup>. For example, if you are using US english
27+
//in your source files, set the <UICulture> 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")]

‎Source/Examples/AreaDemo/Properties/Resources.Designer.cs‎

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)