├── README.md ├── 数据验证 ├── packages.config ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── App.xaml ├── MainWindow.xaml.cs ├── MainWindowViewModel.cs ├── MainWindow.xaml └── 数据验证.csproj ├── 同时使用多个实体框架 ├── CodeFirst │ ├── MyEntity.cs │ ├── SqlServerModel.cs │ └── SqliteModel.cs ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── App.config └── 同时使用多个实体框架.csproj ├── 切换输入法 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── App.xaml.cs ├── App.xaml ├── MainWindow.xaml.cs ├── MainWindow.xaml └── 切换输入法.csproj ├── 图标字体 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── App.xaml ├── MainWindow.xaml.cs ├── MainWindow.xaml └── 图标字体.csproj ├── 多UI线程 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── App.xaml ├── LoadingWindow.xaml.cs ├── LoadingWindow.xaml ├── MainWindow.xaml ├── MainWindow.xaml.cs └── 多UI线程.csproj ├── ComboBox过滤 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── App.xaml ├── MainWindow.xaml ├── MainWindow.xaml.cs └── ComboBox过滤.csproj ├── xaml编译错误 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── MainWindow.xaml.cs ├── App.xaml ├── UserControl1.xaml.cs ├── UserControl1.xaml ├── MainWindow.xaml └── xaml编译错误.csproj ├── 依赖属性更改事件 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── App.xaml ├── MainWindow.xaml.cs ├── MainWindow.xaml └── 依赖属性更改事件.csproj ├── 语音合成及语音识别 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── App.xaml ├── MainWindow.xaml ├── MainWindow.xaml.cs └── 语音合成及语音识别.csproj ├── 输入法正在输入 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── App.xaml ├── MainWindow.xaml ├── MainWindow.xaml.cs └── 输入法正在输入.csproj ├── ComboBox多选分组 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── App.xaml ├── MainWindow.xaml.cs ├── ComboBox多选分组.csproj └── MainWindow.xaml ├── TreeView虚拟化跳转 ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── packages.config ├── MainWindowViewModel.cs ├── App.xaml.cs ├── App.xaml ├── TreeViewItemViewModel.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs └── TreeView虚拟化跳转.csproj ├── View和ViewModel分工 ├── App.config ├── MainWindowViewModel.cs ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── packages.config ├── App.xaml.cs ├── App.xaml ├── MainWindow.xaml.cs ├── MainWindow.xaml └── View和ViewModel分工.csproj ├── 破解爬虫防护 ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ └── Resources.Designer.cs ├── App.xaml.cs ├── App.xaml ├── packages.config ├── app.config ├── MainWindow.xaml ├── MainWindow.xaml.cs └── Jsl.cs ├── LICENSE └── .gitattributes /README.md: -------------------------------------------------------------------------------- 1 | # Samples 2 | 烂笔头 3 | -------------------------------------------------------------------------------- /数据验证/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /同时使用多个实体框架/CodeFirst/MyEntity.cs: -------------------------------------------------------------------------------- 1 | namespace 同时使用多个实体框架.CodeFirst 2 | { 3 | public class MyEntity 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /切换输入法/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /图标字体/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /多UI线程/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /数据验证/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ComboBox过滤/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /xaml编译错误/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /依赖属性更改事件/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /语音合成及语音识别/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /输入法正在输入/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ComboBox多选分组/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /TreeView虚拟化跳转/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /View和ViewModel分工/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /xaml编译错误/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /依赖属性更改事件/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /切换输入法/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /图标字体/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /多UI线程/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /数据验证/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /破解爬虫防护/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /输入法正在输入/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ComboBox多选分组/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ComboBox过滤/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /TreeView虚拟化跳转/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /View和ViewModel分工/MainWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace View和ViewModel分工 2 | { 3 | public class MainWindowViewModel 4 | { 5 | public void ParseFile(string fileName) 6 | { 7 | //解析文件 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /语音合成及语音识别/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /View和ViewModel分工/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /View和ViewModel分工/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /语音合成及语音识别/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Windows; 4 | 5 | namespace 语音合成及语音识别 6 | { 7 | /// 8 | /// App.xaml 的交互逻辑 9 | /// 10 | public partial class App : Application 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /破解爬虫防护/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Linq; 5 | using System.Windows; 6 | 7 | namespace 破解爬虫防护 8 | { 9 | /// 10 | /// App.xaml 的交互逻辑 11 | /// 12 | public partial class App : Application 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /TreeView虚拟化跳转/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /xaml编译错误/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Threading.Tasks; 5 | using System.Windows; 6 | 7 | namespace xaml编译错误 8 | { 9 | /// 10 | /// App.xaml 的交互逻辑 11 | /// 12 | public partial class App : Application 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /依赖属性更改事件/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Threading.Tasks; 5 | using System.Windows; 6 | 7 | namespace 依赖属性更改事件 8 | { 9 | /// 10 | /// App.xaml 的交互逻辑 11 | /// 12 | public partial class App : Application 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /图标字体/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 图标字体 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /数据验证/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 数据验证 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /TreeView虚拟化跳转/MainWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace TreeView虚拟化跳转 4 | { 5 | public class MainWindowViewModel 6 | { 7 | public MainWindowViewModel() 8 | { 9 | Root.IsExpanded = true; 10 | } 11 | 12 | public TreeViewItemViewModel Root { get; } = TreeViewItemViewModel.Create(new DirectoryInfo(@"C:\")); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /切换输入法/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 切换输入法 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /多UI线程/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 多UI线程 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /切换输入法/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /图标字体/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /多UI线程/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /数据验证/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /输入法正在输入/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 输入法正在输入 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ComboBox过滤/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 ComboBox过滤 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /xaml编译错误/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace xaml编译错误 4 | { 5 | /// 6 | /// MainWindow.xaml 的交互逻辑 7 | /// 8 | public partial class MainWindow : Window 9 | { 10 | public MainWindow() 11 | { 12 | InitializeComponent(); 13 | label.Content = Properties.Resources.Border; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /破解爬虫防护/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /输入法正在输入/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ComboBox多选分组/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 ComboBox多选分组 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /TreeView虚拟化跳转/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 TreeView虚拟化跳转 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /xaml编译错误/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /依赖属性更改事件/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ComboBox过滤/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /View和ViewModel分工/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 View和ViewModel分工 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /语音合成及语音识别/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ComboBox多选分组/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /同时使用多个实体框架/CodeFirst/SqlServerModel.cs: -------------------------------------------------------------------------------- 1 | namespace 同时使用多个实体框架.CodeFirst 2 | { 3 | using System.Data.Entity; 4 | 5 | public class SqlServerModel : DbContext 6 | { 7 | public SqlServerModel() : base("name=SqlServerModel") => 8 | Database.SetInitializer(new DropCreateDatabaseAlways()); 9 | 10 | public virtual DbSet MyEntities { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /TreeView虚拟化跳转/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /View和ViewModel分工/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /同时使用多个实体框架/CodeFirst/SqliteModel.cs: -------------------------------------------------------------------------------- 1 | namespace 同时使用多个实体框架.CodeFirst 2 | { 3 | using System.Data.Entity; 4 | 5 | public class SqliteModel : DbContext 6 | { 7 | public SqliteModel() : base("name=SqliteModel") { } 8 | 9 | protected override void OnModelCreating(DbModelBuilder modelBuilder) => 10 | Database.SetInitializer(new SQLite.CodeFirst.SqliteDropCreateDatabaseAlways(modelBuilder)); 11 | 12 | public virtual DbSet MyEntities { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /破解爬虫防护/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /破解爬虫防护/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /数据验证/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | 5 | namespace 数据验证 6 | { 7 | /// 8 | /// MainWindow.xaml 的交互逻辑 9 | /// 10 | public partial class MainWindow : Window 11 | { 12 | public MainWindow() 13 | { 14 | InitializeComponent(); 15 | } 16 | 17 | private void Button_Click(object sender, RoutedEventArgs e) 18 | { 19 | if (!this.All().Any(Validation.GetHasError)) return; 20 | MessageBox.Show("数据验证错误"); 21 | throw new UserCanceledException(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /破解爬虫防护/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 |