Skip to content

Commit

Permalink
Fix demo compile error.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoYang06 committed Nov 24, 2020
1 parent 2d24415 commit 98f1512
Show file tree
Hide file tree
Showing 18 changed files with 111 additions and 372 deletions.
36 changes: 0 additions & 36 deletions Source/Demos/Wif.Demo.Common/Properties/AssemblyInfo.cs

This file was deleted.

16 changes: 14 additions & 2 deletions Source/Demos/Wif.Demo.Common/Wif.Demo.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
Expand All @@ -9,4 +10,15 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\Output\Release\</OutputPath>
</PropertyGroup>
</Project>
<ItemGroup>
<ProjectReference Include="..\..\Wif.Core\Wif.Core.csproj" />
<ProjectReference Include="..\..\Wif.Infrastructure\Wif.Infrastructure.csproj" />
<ProjectReference Include="..\..\Wif.Utilities\Wif.Utilities.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net472'">
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsBase" />
</ItemGroup>

</Project>
6 changes: 0 additions & 6 deletions Source/Demos/Wif.Demo/App.config

This file was deleted.

2 changes: 1 addition & 1 deletion Source/Demos/Wif.Demo/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Wif.Demo
{
/// <summary>
/// App.xaml 的交互逻辑
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
Expand Down
10 changes: 10 additions & 0 deletions Source/Demos/Wif.Demo/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
41 changes: 23 additions & 18 deletions Source/Demos/Wif.Demo/MainViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using System.Collections.ObjectModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Frontier.Wif.Core.ComponentModel;
using Wif.Demo.Common;

Expand Down Expand Up @@ -34,30 +39,30 @@ public ObservableCollection<MobilePhoneSingletonModel> MobilePhoneCollection
public MainViewModel()
{
var model = MobilePhoneSingletonModel.Instance;
model.Brand = Brand.Apple;
model.NumberOfCPUCore = NumberOfCPUCore.Quad;
model.RAM = RAM._4GB;
model.ROM = ROM._64GB;
model.Brand = Brand.Apple;
model.NumberOfCPUCore = NumberOfCPUCore.Quad;
model.RAM = RAM._4GB;
model.ROM = ROM._64GB;
model.ScreenResolution = ScreenResolution.FHD;
model.ScreenSize = 5.2f;
model.ScreenSize = 5.2f;
MobilePhoneCollection.Add(model);

model = MobilePhoneSingletonModel.Instance;
model.Brand = Brand.Apple;
model.NumberOfCPUCore = NumberOfCPUCore.Quad;
model.RAM = RAM._4GB;
model.ROM = ROM._64GB;
model = MobilePhoneSingletonModel.Instance;
model.Brand = Brand.Apple;
model.NumberOfCPUCore = NumberOfCPUCore.Quad;
model.RAM = RAM._4GB;
model.ROM = ROM._64GB;
model.ScreenResolution = ScreenResolution.FHD;
model.ScreenSize = 5.2f;
model.ScreenSize = 5.2f;
MobilePhoneCollection.Add(model);

model = MobilePhoneSingletonModel.Instance;
model.Brand = Brand.Apple;
model.NumberOfCPUCore = NumberOfCPUCore.Quad;
model.RAM = RAM._4GB;
model.ROM = ROM._64GB;
model = MobilePhoneSingletonModel.Instance;
model.Brand = Brand.Apple;
model.NumberOfCPUCore = NumberOfCPUCore.Quad;
model.RAM = RAM._4GB;
model.ROM = ROM._64GB;
model.ScreenResolution = ScreenResolution.FHD;
model.ScreenSize = 5.2f;
model.ScreenSize = 5.2f;
MobilePhoneCollection.Add(model);
}
}
Expand Down
9 changes: 5 additions & 4 deletions Source/Demos/Wif.Demo/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Window x:Class="Wif.Demo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:common="clr-namespace:Wif.Demo.Common;assembly=Wif.Demo.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Wif.Demo"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:common="clr-namespace:Wif.Demo.Common;assembly=Wif.Demo.Common"
mc:Ignorable="d"
Title="MainWindow"
Width="800"
Height="450"
Width="800"
Loaded="MainWindow_OnLoaded">
<Window.Resources>
<DataTemplate x:Key="Brand"
Expand Down Expand Up @@ -42,7 +42,8 @@
</DataTemplate>

<Style TargetType="TextBox">
<Setter Property="Padding" Value="9,5"/>
<Setter Property="Padding"
Value="9,5" />
</Style>
</Window.Resources>
<Grid>
Expand Down
17 changes: 15 additions & 2 deletions Source/Demos/Wif.Demo/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
using System.Windows;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Wif.Demo
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
Expand Down
55 changes: 0 additions & 55 deletions Source/Demos/Wif.Demo/Properties/AssemblyInfo.cs

This file was deleted.

71 changes: 0 additions & 71 deletions Source/Demos/Wif.Demo/Properties/Resources.Designer.cs

This file was deleted.

Loading

0 comments on commit 98f1512

Please sign in to comment.