学海无涯

导航

上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 45 下一页

2022年12月13日 #

数据模板 DataTemplate

摘要: <Grid> <ListBox x:Name="list"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Border Width="10" Height="10" Background=" 阅读全文

posted @ 2022-12-13 10:44 宁静致远. 阅读(37) 评论(0) 推荐(0)

2022年12月12日 #

Style 控件样式

摘要: <Window.Resources> <Style x:Key="BaseButtonStyle" TargetType="Button"> <Setter Property="FontSize" Value="15"/> </Style> <Style x:Key="myStyle" Target 阅读全文

posted @ 2022-12-12 17:05 宁静致远. 阅读(37) 评论(0) 推荐(0)

DataGrid CRUD(MVVM模式)

摘要: 引用程序包:MvvmLight 实体类: public class Student : ViewModelBase { private int id; private string name; public int Id { get { return id; } set { id = value; 阅读全文

posted @ 2022-12-12 14:36 宁静致远. 阅读(58) 评论(0) 推荐(0)

数据绑定

摘要: 元素绑定 <StackPanel> <Slider x:Name="slider1" Width="200" ></Slider> <TextBox Name="txt" Text="{Binding ElementName=slider1,Path=Value,UpdateSourceTrigge 阅读全文

posted @ 2022-12-12 09:05 宁静致远. 阅读(42) 评论(0) 推荐(0)

2022年11月23日 #

允许跨域访问Cors

摘要: WebApi 项目Program.cs 配置 //允许跨域访问 builder.Services.AddCors(options => { options.AddPolicy("AllowAllOrigins", builder => { builder.AllowAnyHeader(); buil 阅读全文

posted @ 2022-11-23 16:44 宁静致远. 阅读(124) 评论(0) 推荐(0)

2022年11月22日 #

使用 AotoFac 注册AutoMapper

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Aut 阅读全文

posted @ 2022-11-22 15:13 宁静致远. 阅读(84) 评论(0) 推荐(0)

2022年11月21日 #

使用DocumentFormat.OpenXml 从Excel 导入数据

摘要: public List<DailyStock> ReadExcelFile(string fileName) { List<DailyStock> list = new List<DailyStock>(); DataTable dt = ReadExcelFileToDataTable(fileN 阅读全文

posted @ 2022-11-21 22:18 宁静致远. 阅读(82) 评论(0) 推荐(0)

2022年11月15日 #

Ardalis.CleanArchitecture.Template 清洁架构模板

摘要: dotnet new --install Ardalis.CleanArchitecture.Template::6.2.8 参考:https://www.nuget.org/packages/ardalis.cleanarchitecture.template 设计决策和依赖关系 此示例的目标是为 阅读全文

posted @ 2022-11-15 17:37 宁静致远. 阅读(213) 评论(0) 推荐(0)

2022年11月14日 #

Template Method 和 Strategy 策略模式

摘要: Template Method 模式和 Strategy 模式所有解决的问题是类似的,通常可以互换使用。不过 Template Mothod 模式使用抽象类来解决问题,而 Strategy 使用接口来解决问题。 Strategy 模式:为了遵循依赖倒置原则(DIP),我们想确保这个通用的算法不要依赖 阅读全文

posted @ 2022-11-14 16:03 宁静致远. 阅读(93) 评论(0) 推荐(0)

2022年11月12日 #

可观察性

摘要: 用于获得可观测性的系统信息称为遥测。 它可分为四大类: 分布式跟踪可让你深入了解分布式业务事务中所涉及的服务之间的流量。 指标可让你深入了解服务性能及其资源消耗情况。 日志记录可让你深入了解如何执行代码以及是否发生了错误。 运行状况终结点可让你深入了解服务的可用性。 使用 Zipkin 监视后端 Z 阅读全文

posted @ 2022-11-12 08:27 宁静致远. 阅读(42) 评论(0) 推荐(0)

上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 45 下一页