├── .gitignore
├── LICENSE
├── README.md
├── WPF-Samples
├── MVVM-TimLiu
│ ├── CrazyElephant
│ │ ├── .vs
│ │ │ └── CrazyElephant
│ │ │ │ └── v16
│ │ │ │ └── .suo
│ │ ├── CrazyElephant.Client
│ │ │ ├── App.xaml
│ │ │ ├── App.xaml.cs
│ │ │ ├── CrazyElephant.Client.csproj
│ │ │ ├── Data
│ │ │ │ └── Data.xml
│ │ │ ├── MainWindow.xaml
│ │ │ ├── MainWindow.xaml.cs
│ │ │ ├── Models
│ │ │ │ ├── Dish.cs
│ │ │ │ └── Restaurant.cs
│ │ │ ├── Properties
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── Resources.Designer.cs
│ │ │ │ ├── Resources.resx
│ │ │ │ ├── Settings.Designer.cs
│ │ │ │ └── Settings.settings
│ │ │ ├── Services
│ │ │ │ ├── IDataService.cs
│ │ │ │ ├── IOrderService.cs
│ │ │ │ ├── MockOrderService.cs
│ │ │ │ └── XmlDataService.cs
│ │ │ ├── ViewModels
│ │ │ │ ├── DishMenuItemViewModel.cs
│ │ │ │ └── MainWindowViewModel.cs
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ │ ├── CrazyElephant.Client.exe
│ │ │ │ │ ├── CrazyElephant.Client.pdb
│ │ │ │ │ ├── CrazyElephant.Client.vshost.exe
│ │ │ │ │ ├── CrazyElephant.Client.vshost.exe.manifest
│ │ │ │ │ ├── Data
│ │ │ │ │ └── Data.xml
│ │ │ │ │ └── Microsoft.Practices.Prism.dll
│ │ │ └── obj
│ │ │ │ └── x86
│ │ │ │ └── Debug
│ │ │ │ ├── App.g.cs
│ │ │ │ ├── App.g.i.cs
│ │ │ │ ├── CrazyElephant.Client.Properties.Resources.resources
│ │ │ │ ├── CrazyElephant.Client.csproj.CopyComplete
│ │ │ │ ├── CrazyElephant.Client.csproj.CoreCompileInputs.cache
│ │ │ │ ├── CrazyElephant.Client.csproj.FileListAbsolute.txt
│ │ │ │ ├── CrazyElephant.Client.csproj.GenerateResource.cache
│ │ │ │ ├── CrazyElephant.Client.csprojAssemblyReference.cache
│ │ │ │ ├── CrazyElephant.Client.exe
│ │ │ │ ├── CrazyElephant.Client.g.resources
│ │ │ │ ├── CrazyElephant.Client.pdb
│ │ │ │ ├── CrazyElephant.Client_Content.g.cs
│ │ │ │ ├── CrazyElephant.Client_Content.g.i.cs
│ │ │ │ ├── CrazyElephant.Client_MarkupCompile.cache
│ │ │ │ ├── CrazyElephant.Client_MarkupCompile.i.cache
│ │ │ │ ├── DesignTimeResolveAssemblyReferences.cache
│ │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ │ ├── MainWindow.baml
│ │ │ │ ├── MainWindow.g.cs
│ │ │ │ ├── MainWindow.g.i.cs
│ │ │ │ └── TempPE
│ │ │ │ └── Properties.Resources.Designer.cs.dll
│ │ ├── CrazyElephant.sln
│ │ ├── CrazyElephant.sln.docstates.suo
│ │ └── CrazyElephant.suo
│ ├── SimpleMvvmDemo
│ │ ├── .vs
│ │ │ └── SimpleMvvmDemo
│ │ │ │ └── v16
│ │ │ │ └── .suo
│ │ ├── NewUI.txt
│ │ ├── OldUI.txt
│ │ ├── SimpleMvvmDemo.Client
│ │ │ ├── App.xaml
│ │ │ ├── App.xaml.cs
│ │ │ ├── Commands
│ │ │ │ └── DelegateCommand.cs
│ │ │ ├── MainWindow.xaml
│ │ │ ├── MainWindow.xaml.cs
│ │ │ ├── Properties
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── Resources.Designer.cs
│ │ │ │ ├── Resources.resx
│ │ │ │ ├── Settings.Designer.cs
│ │ │ │ └── Settings.settings
│ │ │ ├── SimpleMvvmDemo.Client.csproj
│ │ │ ├── ViewModels
│ │ │ │ ├── MainWindowViewModel.cs
│ │ │ │ └── NotificationObject.cs
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ │ ├── SimpleMvvmDemo.Client.exe
│ │ │ │ │ ├── SimpleMvvmDemo.Client.pdb
│ │ │ │ │ ├── SimpleMvvmDemo.Client.vshost.exe
│ │ │ │ │ └── SimpleMvvmDemo.Client.vshost.exe.manifest
│ │ │ └── obj
│ │ │ │ └── x86
│ │ │ │ └── Debug
│ │ │ │ ├── App.g.cs
│ │ │ │ ├── App.g.i.cs
│ │ │ │ ├── DesignTimeResolveAssemblyReferences.cache
│ │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ │ ├── MainWindow.baml
│ │ │ │ ├── MainWindow.g.cs
│ │ │ │ ├── MainWindow.g.i.cs
│ │ │ │ ├── SimpleMvvmDemo.Client.Properties.Resources.resources
│ │ │ │ ├── SimpleMvvmDemo.Client.csproj.CoreCompileInputs.cache
│ │ │ │ ├── SimpleMvvmDemo.Client.csproj.FileListAbsolute.txt
│ │ │ │ ├── SimpleMvvmDemo.Client.csproj.GenerateResource.cache
│ │ │ │ ├── SimpleMvvmDemo.Client.csprojAssemblyReference.cache
│ │ │ │ ├── SimpleMvvmDemo.Client.exe
│ │ │ │ ├── SimpleMvvmDemo.Client.g.resources
│ │ │ │ ├── SimpleMvvmDemo.Client.pdb
│ │ │ │ ├── SimpleMvvmDemo.Client_MarkupCompile.cache
│ │ │ │ ├── SimpleMvvmDemo.Client_MarkupCompile.i.cache
│ │ │ │ └── TempPE
│ │ │ │ └── Properties.Resources.Designer.cs.dll
│ │ ├── SimpleMvvmDemo.sln
│ │ ├── SimpleMvvmDemo.sln.docstates.suo
│ │ └── SimpleMvvmDemo.suo
│ └── screenshots
│ │ ├── MVVM-Add.png
│ │ └── OrderSystem.png
└── README.md
├── courseware
├── README.md
└── 深入浅出UWP-slides
│ ├── 深入浅出UWP-slides01.pdf
│ ├── 深入浅出UWP-slides02.pdf
│ ├── 深入浅出UWP-slides03.pdf
│ ├── 深入浅出UWP-slides04.pdf
│ ├── 深入浅出UWP-slides05.pdf
│ └── 深入浅出UWP-slides06.pdf
└── videos
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
3 | ################################################################################
4 |
5 | /WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/.vs/SimpleMvvmDemo/v16/Server/sqlite3/storage.ide-wal
6 | /WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/.vs/SimpleMvvmDemo/v16/Server/sqlite3/storage.ide-shm
7 | /WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/.vs/SimpleMvvmDemo/v16/Server/sqlite3/storage.ide
8 | /WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/.vs/SimpleMvvmDemo/v16/Server/sqlite3/db.lock
9 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Bravo Yeung
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## WPF_in-depth_explanation / Dissecting WPF / WPF inside out
2 |
3 | 此处会给出《深入浅出WPF》一书的相关资源(Code、视频、课件、公开课等),并不断更新~
4 |
5 |
6 |
7 | 欢迎访问作者的个人网站: [极客玩家](https://yanglr.github.io/)
8 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/.vs/CrazyElephant/v16/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/.vs/CrazyElephant/v16/.suo
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/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 CrazyElephant.Client
9 | {
10 | ///
11 | /// Interaction logic for App.xaml
12 | ///
13 | public partial class App : Application
14 | {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/CrazyElephant.Client.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | 8.0.30703
7 | 2.0
8 | {7DE85C2B-CB42-45AE-9DC7-C9685F65FEB2}
9 | WinExe
10 | Properties
11 | CrazyElephant.Client
12 | CrazyElephant.Client
13 | v4.0
14 | Client
15 | 512
16 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
17 | 4
18 |
19 |
20 | x86
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 |
29 |
30 | x86
31 | pdbonly
32 | true
33 | bin\Release\
34 | TRACE
35 | prompt
36 | 4
37 |
38 |
39 |
40 | ..\..\..\..\..\..\..\Program Files (x86)\Microsoft Prism\Bin\Desktop\Microsoft.Practices.Prism.dll
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 4.0
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | MSBuild:Compile
59 | Designer
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | MSBuild:Compile
70 | Designer
71 |
72 |
73 | App.xaml
74 | Code
75 |
76 |
77 | MainWindow.xaml
78 | Code
79 |
80 |
81 |
82 |
83 |
84 | Code
85 |
86 |
87 | True
88 | True
89 | Resources.resx
90 |
91 |
92 | True
93 | Settings.settings
94 | True
95 |
96 |
97 | ResXFileCodeGenerator
98 | Resources.Designer.cs
99 |
100 |
101 | SettingsSingleFileGenerator
102 | Settings.Designer.cs
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | Always
112 |
113 |
114 |
115 |
122 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Data/Data.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 土豆泥底披萨
5 | 披萨
6 | 本店特色
7 | 4.5
8 |
9 |
10 | 烤囊底披萨
11 | 披萨
12 | 本店特色
13 | 5
14 |
15 |
16 | 水果披萨
17 | 披萨
18 |
19 | 4
20 |
21 |
22 | 牛肉披萨
23 | 披萨
24 |
25 | 5
26 |
27 |
28 | 培根披萨
29 | 披萨
30 |
31 | 4.5
32 |
33 |
34 | 什锦披萨
35 | 披萨
36 |
37 | 4.5
38 |
39 |
40 | 金枪鱼披萨
41 | 披萨
42 |
43 | 5
44 |
45 |
46 | 海鲜披萨
47 | 披萨
48 |
49 | 5
50 |
51 |
52 | 川香披萨
53 | 披萨
54 |
55 | 4.5
56 |
57 |
58 | 黑椒鸡腿扒
59 | 特色主食
60 | 本店特色
61 | 5
62 |
63 |
64 | 肉酱意面
65 | 特色主食
66 | 本店特色
67 | 5
68 |
69 |
70 | 寂寞小章鱼
71 | 风味小吃
72 |
73 | 5
74 |
75 |
76 | 照烧鸡软骨
77 | 风味小吃
78 |
79 | 5
80 |
81 |
82 | 芝士青贝
83 | 风味小吃
84 |
85 | 4.5
86 |
87 |
88 | 奥尔良烤翅
89 | 风味小吃
90 | 秒杀KFC
91 | 5
92 |
93 |
94 | 双酱煎泥肠
95 | 风味小吃
96 |
97 | 4
98 |
99 |
100 | 香酥鱿鱼圈
101 | 风味小吃
102 | 本店特色
103 | 4.5
104 |
105 |
106 | 黄金蝴蝶虾
107 | 风味小吃
108 | 本店特色
109 | 5
110 |
111 |
112 | 金枪鱼沙拉
113 | 沙拉
114 | 本店特色
115 | 5
116 |
117 |
118 | 日式素沙拉
119 | 沙拉
120 |
121 | 5
122 |
123 |
124 | 冰糖洛神
125 | 饮料
126 |
127 | 5
128 |
129 |
130 | 玫瑰特饮
131 | 饮料
132 |
133 | 5
134 |
135 |
136 | 清新芦荟
137 | 饮料
138 |
139 | 5
140 |
141 |
142 | 薄荷汽水
143 | 饮料
144 | 本店特色
145 | 5
146 |
147 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
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 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 | using CrazyElephant.Client.ViewModels;
15 |
16 | namespace CrazyElephant.Client
17 | {
18 | ///
19 | /// Interaction logic for MainWindow.xaml
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | public MainWindow()
24 | {
25 | InitializeComponent();
26 | this.DataContext = new MainWindowViewModel();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Models/Dish.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Microsoft.Practices.Prism.ViewModel;
6 |
7 | namespace CrazyElephant.Client.Models
8 | {
9 | public class Dish : NotificationObject
10 | {
11 | public string Name { get; set; }
12 | public string Category { get; set; }
13 | public string Comment { get; set; }
14 | public double Score { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Models/Restaurant.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Microsoft.Practices.Prism.ViewModel;
6 |
7 | namespace CrazyElephant.Client.Models
8 | {
9 | class Restaurant : NotificationObject
10 | {
11 | public string Name { get; set; }
12 | public string Address { get; set; }
13 | public string PhoneNumber { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/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("CrazyElephant.Client")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("CrazyElephant.Client")]
15 | [assembly: AssemblyCopyright("Copyright © 2011")]
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 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.239
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 CrazyElephant.Client.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CrazyElephant.Client.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.239
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 CrazyElephant.Client.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Services/IDataService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using CrazyElephant.Client.Models;
6 |
7 | namespace CrazyElephant.Client.Services
8 | {
9 | public interface IDataService
10 | {
11 | List GetAllDishes();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Services/IOrderService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace CrazyElephant.Client.Services
7 | {
8 | interface IOrderService
9 | {
10 | void PlaceOrder(List dishes);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Services/MockOrderService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace CrazyElephant.Client.Services
7 | {
8 | class MockOrderService : IOrderService
9 | {
10 | public void PlaceOrder(List dishes)
11 | {
12 | System.IO.File.WriteAllLines(@"C:\order.txt", dishes.ToArray());
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/Services/XmlDataService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Xml.Linq;
6 | using CrazyElephant.Client.Models;
7 |
8 | namespace CrazyElephant.Client.Services
9 | {
10 | class XmlDataService : IDataService
11 | {
12 | public List GetAllDishes()
13 | {
14 | List dishList = new List();
15 | string xmlFileName = System.IO.Path.Combine(Environment.CurrentDirectory, @"Data\Data.xml");
16 | XDocument xDoc = XDocument.Load(xmlFileName);
17 | var dishes = xDoc.Descendants("Dish");
18 | foreach (var d in dishes)
19 | {
20 | Dish dish = new Dish();
21 | dish.Name = d.Element("Name").Value;
22 | dish.Category = d.Element("Category").Value;
23 | dish.Comment = d.Element("Comment").Value;
24 | dish.Score = double.Parse(d.Element("Score").Value);
25 | dishList.Add(dish);
26 | }
27 |
28 | return dishList;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/ViewModels/DishMenuItemViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Microsoft.Practices.Prism.ViewModel;
6 | using CrazyElephant.Client.Models;
7 |
8 | namespace CrazyElephant.Client.ViewModels
9 | {
10 | class DishMenuItemViewModel : NotificationObject
11 | {
12 | public Dish Dish { get; set; }
13 |
14 | private bool isSelected;
15 |
16 | public bool IsSelected
17 | {
18 | get { return isSelected; }
19 | set
20 | {
21 | isSelected = value;
22 | this.RaisePropertyChanged("IsSelected");
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/ViewModels/MainWindowViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Microsoft.Practices.Prism.ViewModel;
6 | using CrazyElephant.Client.Models;
7 | using CrazyElephant.Client.Services;
8 | using Microsoft.Practices.Prism.Commands;
9 | using System.Windows;
10 |
11 | namespace CrazyElephant.Client.ViewModels
12 | {
13 | class MainWindowViewModel : NotificationObject
14 | {
15 | public DelegateCommand PlaceOrderCommand { get; set; }
16 | public DelegateCommand SelectMenuItemCommand { get; set; }
17 |
18 | private int count;
19 |
20 | public int Count
21 | {
22 | get { return count; }
23 | set
24 | {
25 | count = value;
26 | this.RaisePropertyChanged("Count");
27 | }
28 | }
29 |
30 | private Restaurant restaurant;
31 |
32 | public Restaurant Restaurant
33 | {
34 | get { return restaurant; }
35 | set
36 | {
37 | restaurant = value;
38 | this.RaisePropertyChanged("Restaurent");
39 | }
40 | }
41 |
42 | private List dishMenu;
43 |
44 | public List DishMenu
45 | {
46 | get { return dishMenu; }
47 | set
48 | {
49 | dishMenu = value;
50 | this.RaisePropertyChanged("DishMenu");
51 | }
52 | }
53 |
54 | public MainWindowViewModel()
55 | {
56 | this.LoadRestaurant();
57 | this.LoadDishMenu();
58 | this.PlaceOrderCommand = new DelegateCommand(new Action(this.PlaceOrderCommandExecute));
59 | this.SelectMenuItemCommand = new DelegateCommand(new Action(this.SelectMenuItemExecute));
60 | }
61 |
62 | private void LoadRestaurant()
63 | {
64 | this.Restaurant = new Restaurant();
65 | this.Restaurant.Name = "Crazy大象";
66 | this.Restaurant.Address = "北京市海淀区万泉河路紫金庄园1号楼 1层 113室(亲们:这地儿特难找!)";
67 | this.Restaurant.PhoneNumber = "15210365423 or 82650336";
68 | }
69 |
70 | private void LoadDishMenu()
71 | {
72 | IDataService ds = new XmlDataService();
73 | var dishes = ds.GetAllDishes();
74 | this.DishMenu = new List();
75 | foreach (var dish in dishes)
76 | {
77 | DishMenuItemViewModel item = new DishMenuItemViewModel();
78 | item.Dish = dish;
79 | this.DishMenu.Add(item);
80 | }
81 | }
82 |
83 | private void PlaceOrderCommandExecute()
84 | {
85 | var selectedDishes = this.DishMenu.Where(i => i.IsSelected == true).Select(i => i.Dish.Name).ToList();
86 | IOrderService orderService = new MockOrderService();
87 | orderService.PlaceOrder(selectedDishes);
88 | MessageBox.Show("订餐成功!");
89 | }
90 |
91 | private void SelectMenuItemExecute()
92 | {
93 | this.Count = this.DishMenu.Count(i => i.IsSelected == true);
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/CrazyElephant.Client.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/CrazyElephant.Client.exe
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/CrazyElephant.Client.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/CrazyElephant.Client.pdb
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/CrazyElephant.Client.vshost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/CrazyElephant.Client.vshost.exe
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/CrazyElephant.Client.vshost.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/Data/Data.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 土豆泥底披萨
5 | 披萨
6 | 本店特色
7 | 4.5
8 |
9 |
10 | 烤囊底披萨
11 | 披萨
12 | 本店特色
13 | 5
14 |
15 |
16 | 水果披萨
17 | 披萨
18 |
19 | 4
20 |
21 |
22 | 牛肉披萨
23 | 披萨
24 |
25 | 5
26 |
27 |
28 | 培根披萨
29 | 披萨
30 |
31 | 4.5
32 |
33 |
34 | 什锦披萨
35 | 披萨
36 |
37 | 4.5
38 |
39 |
40 | 金枪鱼披萨
41 | 披萨
42 |
43 | 5
44 |
45 |
46 | 海鲜披萨
47 | 披萨
48 |
49 | 5
50 |
51 |
52 | 川香披萨
53 | 披萨
54 |
55 | 4.5
56 |
57 |
58 | 黑椒鸡腿扒
59 | 特色主食
60 | 本店特色
61 | 5
62 |
63 |
64 | 肉酱意面
65 | 特色主食
66 | 本店特色
67 | 5
68 |
69 |
70 | 寂寞小章鱼
71 | 风味小吃
72 |
73 | 5
74 |
75 |
76 | 照烧鸡软骨
77 | 风味小吃
78 |
79 | 5
80 |
81 |
82 | 芝士青贝
83 | 风味小吃
84 |
85 | 4.5
86 |
87 |
88 | 奥尔良烤翅
89 | 风味小吃
90 | 秒杀KFC
91 | 5
92 |
93 |
94 | 双酱煎泥肠
95 | 风味小吃
96 |
97 | 4
98 |
99 |
100 | 香酥鱿鱼圈
101 | 风味小吃
102 | 本店特色
103 | 4.5
104 |
105 |
106 | 黄金蝴蝶虾
107 | 风味小吃
108 | 本店特色
109 | 5
110 |
111 |
112 | 金枪鱼沙拉
113 | 沙拉
114 | 本店特色
115 | 5
116 |
117 |
118 | 日式素沙拉
119 | 沙拉
120 |
121 | 5
122 |
123 |
124 | 冰糖洛神
125 | 饮料
126 |
127 | 5
128 |
129 |
130 | 玫瑰特饮
131 | 饮料
132 |
133 | 5
134 |
135 |
136 | 清新芦荟
137 | 饮料
138 |
139 | 5
140 |
141 |
142 | 薄荷汽水
143 | 饮料
144 | 本店特色
145 | 5
146 |
147 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/Microsoft.Practices.Prism.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/bin/Debug/Microsoft.Practices.Prism.dll
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/App.g.cs:
--------------------------------------------------------------------------------
1 | #pragma checksum "..\..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "56E0EE4DA0C0A6604976EAC5099DE750140F5A550CBA0B79412FDABBAF2591B3"
2 | //------------------------------------------------------------------------------
3 | //
4 | // 此代码由工具生成。
5 | // 运行时版本:4.0.30319.42000
6 | //
7 | // 对此文件的更改可能会导致不正确的行为,并且如果
8 | // 重新生成代码,这些更改将会丢失。
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | using System;
13 | using System.Diagnostics;
14 | using System.Windows;
15 | using System.Windows.Automation;
16 | using System.Windows.Controls;
17 | using System.Windows.Controls.Primitives;
18 | using System.Windows.Data;
19 | using System.Windows.Documents;
20 | using System.Windows.Ink;
21 | using System.Windows.Input;
22 | using System.Windows.Markup;
23 | using System.Windows.Media;
24 | using System.Windows.Media.Animation;
25 | using System.Windows.Media.Effects;
26 | using System.Windows.Media.Imaging;
27 | using System.Windows.Media.Media3D;
28 | using System.Windows.Media.TextFormatting;
29 | using System.Windows.Navigation;
30 | using System.Windows.Shapes;
31 | using System.Windows.Shell;
32 |
33 |
34 | namespace CrazyElephant.Client {
35 |
36 |
37 | ///
38 | /// App
39 | ///
40 | public partial class App : System.Windows.Application {
41 |
42 | ///
43 | /// InitializeComponent
44 | ///
45 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
46 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
47 | public void InitializeComponent() {
48 |
49 | #line 4 "..\..\..\App.xaml"
50 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
51 |
52 | #line default
53 | #line hidden
54 | }
55 |
56 | ///
57 | /// Application Entry Point.
58 | ///
59 | [System.STAThreadAttribute()]
60 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
61 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
62 | public static void Main() {
63 | CrazyElephant.Client.App app = new CrazyElephant.Client.App();
64 | app.InitializeComponent();
65 | app.Run();
66 | }
67 | }
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/App.g.i.cs:
--------------------------------------------------------------------------------
1 | #pragma checksum "..\..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "56E0EE4DA0C0A6604976EAC5099DE750140F5A550CBA0B79412FDABBAF2591B3"
2 | //------------------------------------------------------------------------------
3 | //
4 | // 此代码由工具生成。
5 | // 运行时版本:4.0.30319.42000
6 | //
7 | // 对此文件的更改可能会导致不正确的行为,并且如果
8 | // 重新生成代码,这些更改将会丢失。
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | using System;
13 | using System.Diagnostics;
14 | using System.Windows;
15 | using System.Windows.Automation;
16 | using System.Windows.Controls;
17 | using System.Windows.Controls.Primitives;
18 | using System.Windows.Data;
19 | using System.Windows.Documents;
20 | using System.Windows.Ink;
21 | using System.Windows.Input;
22 | using System.Windows.Markup;
23 | using System.Windows.Media;
24 | using System.Windows.Media.Animation;
25 | using System.Windows.Media.Effects;
26 | using System.Windows.Media.Imaging;
27 | using System.Windows.Media.Media3D;
28 | using System.Windows.Media.TextFormatting;
29 | using System.Windows.Navigation;
30 | using System.Windows.Shapes;
31 | using System.Windows.Shell;
32 |
33 |
34 | namespace CrazyElephant.Client {
35 |
36 |
37 | ///
38 | /// App
39 | ///
40 | public partial class App : System.Windows.Application {
41 |
42 | ///
43 | /// InitializeComponent
44 | ///
45 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
46 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
47 | public void InitializeComponent() {
48 |
49 | #line 4 "..\..\..\App.xaml"
50 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
51 |
52 | #line default
53 | #line hidden
54 | }
55 |
56 | ///
57 | /// Application Entry Point.
58 | ///
59 | [System.STAThreadAttribute()]
60 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
61 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
62 | public static void Main() {
63 | CrazyElephant.Client.App app = new CrazyElephant.Client.App();
64 | app.InitializeComponent();
65 | app.Run();
66 | }
67 | }
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.Properties.Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.Properties.Resources.resources
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.csproj.CopyComplete:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.csproj.CopyComplete
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 0174a936add57f29cd152f8cf3224a2d06faf580
2 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\bin\Debug\Data\Data.xml
2 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\bin\Debug\CrazyElephant.Client.exe
3 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\bin\Debug\CrazyElephant.Client.pdb
4 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\bin\Debug\Microsoft.Practices.Prism.dll
5 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\bin\Debug\Microsoft.Practices.ServiceLocation.dll
6 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\bin\Debug\Microsoft.Practices.Prism.pdb
7 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\bin\Debug\Microsoft.Practices.Prism.xml
8 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\bin\Debug\Microsoft.Practices.ServiceLocation.xml
9 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\ResolveAssemblyReference.cache
10 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\MainWindow.baml
11 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\MainWindow.g.cs
12 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\App.g.cs
13 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client_Content.g.cs
14 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client_MarkupCompile.cache
15 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.g.resources
16 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.Properties.Resources.resources
17 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\GenerateResource.read.1.tlog
18 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\GenerateResource.write.1.tlog
19 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.exe
20 | C:\Users\timliu\Documents\Visual Studio 2010\Projects\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.pdb
21 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\bin\Debug\Data\Data.xml
22 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\bin\Debug\CrazyElephant.Client.exe
23 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\bin\Debug\CrazyElephant.Client.pdb
24 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.csprojAssemblyReference.cache
25 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\MainWindow.baml
26 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\MainWindow.g.cs
27 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\App.g.cs
28 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client_Content.g.cs
29 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client_MarkupCompile.cache
30 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.g.resources
31 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.Properties.Resources.resources
32 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.csproj.GenerateResource.cache
33 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.csproj.CoreCompileInputs.cache
34 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.csproj.CopyComplete
35 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.exe
36 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\CrazyElephant.Client.pdb
37 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.csproj.GenerateResource.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.csproj.GenerateResource.cache
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.csprojAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.csprojAssemblyReference.cache
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.exe
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.g.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.g.resources
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client.pdb
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client_Content.g.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("data/data.xml")]
12 |
13 |
14 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client_Content.g.i.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("data/data.xml")]
12 |
13 |
14 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client_MarkupCompile.cache:
--------------------------------------------------------------------------------
1 | CrazyElephant.Client
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\
8 | CrazyElephant.Client
9 | none
10 | false
11 | DEBUG;TRACE
12 | C:\Users\Bruce\Desktop\MVVM入门与提高_Source\CrazyElephant\CrazyElephant.Client\App.xaml
13 | 11151548125
14 | 11006037873
15 | 13-1408196471
16 | 13-1020062432
17 | MainWindow.xaml;
18 |
19 | False
20 |
21 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/CrazyElephant.Client_MarkupCompile.i.cache:
--------------------------------------------------------------------------------
1 | CrazyElephant.Client
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | D:\Temp\CrazyElephant\CrazyElephant.Client\obj\x86\Debug\
8 | CrazyElephant.Client
9 | none
10 | false
11 | DEBUG;TRACE
12 | D:\Temp\CrazyElephant\CrazyElephant.Client\App.xaml
13 | 11151548125
14 | 11006037873
15 | 14620608023
16 | 13-1127563246
17 | MainWindow.xaml;
18 |
19 | False
20 |
21 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/MainWindow.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/MainWindow.baml
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/MainWindow.g.cs:
--------------------------------------------------------------------------------
1 | #pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D93123587A18DF8DA1E03E72AFC290A17AA6907B609D82CBDE47458B6649EC97"
2 | //------------------------------------------------------------------------------
3 | //
4 | // 此代码由工具生成。
5 | // 运行时版本:4.0.30319.42000
6 | //
7 | // 对此文件的更改可能会导致不正确的行为,并且如果
8 | // 重新生成代码,这些更改将会丢失。
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | using System;
13 | using System.Diagnostics;
14 | using System.Windows;
15 | using System.Windows.Automation;
16 | using System.Windows.Controls;
17 | using System.Windows.Controls.Primitives;
18 | using System.Windows.Data;
19 | using System.Windows.Documents;
20 | using System.Windows.Ink;
21 | using System.Windows.Input;
22 | using System.Windows.Markup;
23 | using System.Windows.Media;
24 | using System.Windows.Media.Animation;
25 | using System.Windows.Media.Effects;
26 | using System.Windows.Media.Imaging;
27 | using System.Windows.Media.Media3D;
28 | using System.Windows.Media.TextFormatting;
29 | using System.Windows.Navigation;
30 | using System.Windows.Shapes;
31 | using System.Windows.Shell;
32 |
33 |
34 | namespace CrazyElephant.Client {
35 |
36 |
37 | ///
38 | /// MainWindow
39 | ///
40 | public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
41 |
42 |
43 | #line 6 "..\..\..\MainWindow.xaml"
44 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
45 | internal System.Windows.Controls.Grid Root;
46 |
47 | #line default
48 | #line hidden
49 |
50 | private bool _contentLoaded;
51 |
52 | ///
53 | /// InitializeComponent
54 | ///
55 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
56 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
57 | public void InitializeComponent() {
58 | if (_contentLoaded) {
59 | return;
60 | }
61 | _contentLoaded = true;
62 | System.Uri resourceLocater = new System.Uri("/CrazyElephant.Client;component/mainwindow.xaml", System.UriKind.Relative);
63 |
64 | #line 1 "..\..\..\MainWindow.xaml"
65 | System.Windows.Application.LoadComponent(this, resourceLocater);
66 |
67 | #line default
68 | #line hidden
69 | }
70 |
71 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
72 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
73 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
74 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
75 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
76 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
77 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
78 | switch (connectionId)
79 | {
80 | case 1:
81 | this.Root = ((System.Windows.Controls.Grid)(target));
82 | return;
83 | }
84 | this._contentLoaded = true;
85 | }
86 | }
87 | }
88 |
89 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/MainWindow.g.i.cs:
--------------------------------------------------------------------------------
1 | #pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D93123587A18DF8DA1E03E72AFC290A17AA6907B609D82CBDE47458B6649EC97"
2 | //------------------------------------------------------------------------------
3 | //
4 | // 此代码由工具生成。
5 | // 运行时版本:4.0.30319.42000
6 | //
7 | // 对此文件的更改可能会导致不正确的行为,并且如果
8 | // 重新生成代码,这些更改将会丢失。
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | using System;
13 | using System.Diagnostics;
14 | using System.Windows;
15 | using System.Windows.Automation;
16 | using System.Windows.Controls;
17 | using System.Windows.Controls.Primitives;
18 | using System.Windows.Data;
19 | using System.Windows.Documents;
20 | using System.Windows.Ink;
21 | using System.Windows.Input;
22 | using System.Windows.Markup;
23 | using System.Windows.Media;
24 | using System.Windows.Media.Animation;
25 | using System.Windows.Media.Effects;
26 | using System.Windows.Media.Imaging;
27 | using System.Windows.Media.Media3D;
28 | using System.Windows.Media.TextFormatting;
29 | using System.Windows.Navigation;
30 | using System.Windows.Shapes;
31 | using System.Windows.Shell;
32 |
33 |
34 | namespace CrazyElephant.Client {
35 |
36 |
37 | ///
38 | /// MainWindow
39 | ///
40 | public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
41 |
42 |
43 | #line 6 "..\..\..\MainWindow.xaml"
44 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
45 | internal System.Windows.Controls.Grid Root;
46 |
47 | #line default
48 | #line hidden
49 |
50 | private bool _contentLoaded;
51 |
52 | ///
53 | /// InitializeComponent
54 | ///
55 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
56 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
57 | public void InitializeComponent() {
58 | if (_contentLoaded) {
59 | return;
60 | }
61 | _contentLoaded = true;
62 | System.Uri resourceLocater = new System.Uri("/CrazyElephant.Client;component/mainwindow.xaml", System.UriKind.Relative);
63 |
64 | #line 1 "..\..\..\MainWindow.xaml"
65 | System.Windows.Application.LoadComponent(this, resourceLocater);
66 |
67 | #line default
68 | #line hidden
69 | }
70 |
71 | [System.Diagnostics.DebuggerNonUserCodeAttribute()]
72 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
73 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
74 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
75 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
76 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
77 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
78 | switch (connectionId)
79 | {
80 | case 1:
81 | this.Root = ((System.Windows.Controls.Grid)(target));
82 | return;
83 | }
84 | this._contentLoaded = true;
85 | }
86 | }
87 | }
88 |
89 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.Client/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrazyElephant.Client", "CrazyElephant.Client\CrazyElephant.Client.csproj", "{7DE85C2B-CB42-45AE-9DC7-C9685F65FEB2}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {7DE85C2B-CB42-45AE-9DC7-C9685F65FEB2}.Debug|x86.ActiveCfg = Debug|x86
13 | {7DE85C2B-CB42-45AE-9DC7-C9685F65FEB2}.Debug|x86.Build.0 = Debug|x86
14 | {7DE85C2B-CB42-45AE-9DC7-C9685F65FEB2}.Release|x86.ActiveCfg = Release|x86
15 | {7DE85C2B-CB42-45AE-9DC7-C9685F65FEB2}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.sln.docstates.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.sln.docstates.suo
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/CrazyElephant/CrazyElephant.suo
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/.vs/SimpleMvvmDemo/v16/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yanglr/wpf_in-depth_explanation/e82d55259bf729bf72cfce3204b7d51bb242ca8e/WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/.vs/SimpleMvvmDemo/v16/.suo
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/NewUI.txt:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/OldUI.txt:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/SimpleMvvmDemo.Client/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/SimpleMvvmDemo.Client/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 SimpleMvvmDemo.Client
9 | {
10 | ///
11 | /// Interaction logic for App.xaml
12 | ///
13 | public partial class App : Application
14 | {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/WPF-Samples/MVVM-TimLiu/SimpleMvvmDemo/SimpleMvvmDemo.Client/Commands/DelegateCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Input;
6 |
7 | namespace SimpleMvvmDemo.Client.Commands
8 | {
9 | class DelegateCommand : ICommand
10 | {
11 | public bool CanExecute(object parameter)
12 | {
13 | if (this.CanExecuteFunc == null)
14 | {
15 | return true;
16 | }
17 |
18 | return this.CanExecuteFunc(parameter);
19 | }
20 |
21 | public event EventHandler CanExecuteChanged;
22 |
23 | public void Execute(object parameter)
24 | {
25 | if (this.ExecuteAction == null)
26 | {
27 | return;
28 | }
29 | this.ExecuteAction(parameter);
30 | }
31 |
32 | public Action