diff --git a/.vs/FileMerged/DesignTimeBuild/.dtbcache.v2 b/.vs/FileMerged/DesignTimeBuild/.dtbcache.v2
new file mode 100644
index 0000000000000000000000000000000000000000..61d265288ddfafb1965203046e5b9f09e2de6046
Binary files /dev/null and b/.vs/FileMerged/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/.vs/FileMerged/FileContentIndex/3f763fdd-a5e6-4e96-b4f2-1670b9a4d8b3.vsidx b/.vs/FileMerged/FileContentIndex/3f763fdd-a5e6-4e96-b4f2-1670b9a4d8b3.vsidx
new file mode 100644
index 0000000000000000000000000000000000000000..cd1e70d10c51df38f2bcafe4a39aca54159e7199
Binary files /dev/null and b/.vs/FileMerged/FileContentIndex/3f763fdd-a5e6-4e96-b4f2-1670b9a4d8b3.vsidx differ
diff --git a/.vs/FileMerged/FileContentIndex/read.lock b/.vs/FileMerged/FileContentIndex/read.lock
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/.vs/FileMerged/v17/.futdcache.v2 b/.vs/FileMerged/v17/.futdcache.v2
new file mode 100644
index 0000000000000000000000000000000000000000..8f42e81a9fd1e0b9057859983ab7df75a4dabf2d
Binary files /dev/null and b/.vs/FileMerged/v17/.futdcache.v2 differ
diff --git a/.vs/FileMerged/v17/.suo b/.vs/FileMerged/v17/.suo
new file mode 100644
index 0000000000000000000000000000000000000000..fc444136a06d2f21f9423bebf639423cd9fd6878
Binary files /dev/null and b/.vs/FileMerged/v17/.suo differ
diff --git a/.vs/ProjectEvaluation/filemerged.metadata.v5.1 b/.vs/ProjectEvaluation/filemerged.metadata.v5.1
new file mode 100644
index 0000000000000000000000000000000000000000..3dbff52a2f07c70d864ccefd0fa19e4c490f7ddf
Binary files /dev/null and b/.vs/ProjectEvaluation/filemerged.metadata.v5.1 differ
diff --git a/.vs/ProjectEvaluation/filemerged.projects.v5.1 b/.vs/ProjectEvaluation/filemerged.projects.v5.1
new file mode 100644
index 0000000000000000000000000000000000000000..4ba17ac459b9d581c5451cc768b0ab7b8630be54
Binary files /dev/null and b/.vs/ProjectEvaluation/filemerged.projects.v5.1 differ
diff --git "a/2020302111136-\347\275\227\346\231\223\350\275\251-\347\254\254\344\270\203\345\221\250\344\275\234\344\270\232.md" "b/2020302111136-\347\275\227\346\231\223\350\275\251-\347\254\254\344\270\203\345\221\250\344\275\234\344\270\232.md"
new file mode 100644
index 0000000000000000000000000000000000000000..33671c52f56e88a78598326b6f95612ee5c94cd3
--- /dev/null
+++ "b/2020302111136-\347\275\227\346\231\223\350\275\251-\347\254\254\344\270\203\345\221\250\344\275\234\344\270\232.md"
@@ -0,0 +1,706 @@
+# 2020302111136-罗晓轩-第七周作业
+
+# 目录
+
+[TOC]
+
+# 一、熟悉MVVM的基本思想
+
+## 1、MVVM简介
+
+MVVM是Model-View-ViewModel的简写。它本质上就是MVC 的改进版。MVVM 就是将其中的View 的状态和行为抽象化,让我们将视图 UI 和业务逻辑分开。当然这些事 ViewModel 已经帮我们做了,它可以取出 Model 的数据同时帮忙处理 View 中由于需要展示内容而涉及的业务逻辑。微软的WPF带来了新的技术体验,如Silverlight、音频、视频、3D、动画……,这导致了软件UI层更加细节化、可定制化。同时,在技术层面,WPF也带来了 诸如Binding、Dependency Property、Routed Events、Command、DataTemplate、ControlTemplate等新特性。MVVM(Model-View-ViewModel)框架的由来便是MVP(Model-View-Presenter)模式与WPF结合的应用方式时发展演变过来的一种新型架构框架。它立足于原有MVP框架并且把WPF的新特性糅合进去,以应对客户日益复杂的需求变化。
+
+
+
+ 上图描述了MVVM一个基本结构
+
+ 在MVVM架构中,是不允许数据和视图直接通信的,只能通过ViewModel来通信,而ViewModel就是定义了一个Observer观察者。ViewModel是连接View和Model的中间件。
+
+ MVVM源自于经典的MVC(Model-View-Controller)模式。MVVM的核心是ViewModel层,负责转换Model中的数据对象来让数据变得更容易管理和使用,其作用如下:
+
+ 该层向上与视图层进行双向数据绑定。
+
+ 向下与Model层通过接口请求进行数据交互。
+
+ MVVM已经相当成熟了,主要运用但不仅仅在网络应用程序开发中。当下流向的MVVM框架有Vue.js、AugularJS等。
+
+## 2、MVVM优点
+
+MVVM模式和MVC模式一样,主要目的是分离视图(View)和模型(Model),有几大优点
+
+**1. 低耦合**。视图(View)可以独立于Model变化和修改,一个ViewModel可以绑定到不同的"View"上,当View变化的时候Model可以不变,当Model变化的时候View也可以不变。
+
+**2. 可重用性**。你可以把一些视图逻辑放在一个ViewModel里面,让很多view重用这段视图逻辑。
+
+**3. 独立开发**。开发人员可以专注于业务逻辑和数据的开发(ViewModel),设计人员可以专注于页面设计,使用Expression Blend可以很容易设计界面并生成xaml代码。
+
+**4. 可测试**。界面素来是比较难于测试的,测试可以针对ViewModel来写。
+
+## 3、MVVM模式的组成部分
+
+**模型:**
+模型是指代表真实状态内容的领域模型(面向对象),或指代表内容的数据访问层(以数据为中心)。**视图:**
+就像在MVC和MVP模式中一样,视图是用户在屏幕上看到的结构、布局和外观(UI)。
+**视图模型**
+视图模型是暴露公共属性和命令的视图的抽象。MVVM没有MVC模式的控制器,也没有MVP模式的presenter,有的是一个绑定器。在视图模型中,绑定器在视图和数据绑定器之间进行通信。
+**绑定器**
+声明性数据和命令绑定隐含在MVVM模式中。在Microsoft解决方案堆中,绑定器是一种名为XAML的标记语言。绑定器使开发人员免于被迫编写样板式逻辑来同步视图模型和视图。在微软的堆之外实现时,声明性数据绑定技术的出现是实现该模式的一个关键因素。
+
+## 4、理论基础
+
+MVVM旨在利用WPF中的数据绑定函数,通过从视图层中几乎删除所有GUI代码(代码隐藏),更好地促进视图层开发与模式其余部分的分离。不需要用户体验(UX)开发人员编写GUI代码,他们可以使用框架标记语言(如XAML),并创建到应用程序开发人员编写和维护的视图模型的数据绑定。角色的分离使得交互设计师可以专注于用户体验需求,而不是对业务逻辑进行编程。这样,应用程序的层次可以在多个工作流中进行开发以提高生产力。即使一个开发人员在整个代码库上工作,视图与模型的适当分离也会更加高效,因为基于最终用户反馈,用户界面通常在开发周期中经常发生变化,而且处于开发周期后期。
+MVVM模式试图获得MVC提供的功能性开发分离的两个优点,同时利用数据绑定的优势和通过绑定数据的框架尽可能接近纯应用程序模型。它使用绑定器、视图模型和任何业务层的数据检查功能来验证传入的数据。结果是模型和框架驱动尽可能多的操作,消除或最小化直接操纵视图的应用程序逻辑(如代码隐藏)。
+
+## 5、MVVM的简易实现
+
+#### 原理图
+
+
+
+这个 MVVM 的实现,是通过 Observer、Dep、Watcher、Complie 四个组件组成,它们相互关联,相互影响,最终形成了数据的双向绑定功能:
+
+通过 Observer 来监听 data 的数据变化,并且提供了订阅某个数据变化的能力;
+通过 Complie 来编辑 HTML 模版成 Document Fragment,然后解析其中的特殊标记(绑定的数据);
+
+#### Observer
+
+Observer 模块会自动的将 data 中的所有属性增加 getter 和 setter,让其具备监听对象属性变化的能力:
+
+```
+function observe(obj, vm) {
+ Object.keys(obj).forEach(function(key) {
+ defineReactive(vm, key, obj[key]);
+ });
+}
+
+function defineReactive(obj, key, val) {
+ var dep = new Dep();
+
+ Object.defineProperty(obj, key, {
+ get: function() {
+ if(Dep.target) {
+ dep.addSub(Dep.target);
+ }
+
+ return val;
+ },
+ set: function(newVal) {
+ if(newVal === val) {
+ return;
+ }
+ val = newVal;
+
+ dep.notify();
+ }
+ });
+}
+```
+
+#### Dep
+
+Dep 和 Watcher 是简单的观察者模式的实现,Dep 相当于一个订阅者,它会管理所有的观察者,并且有给观察者发送消息的能力:
+
+```
+function Dep () {
+ this.subs = [];
+}
+
+Dep.prototype = {
+ addSub: function(sub) {
+ this.subs.push(sub);
+ },
+ notify: function() {
+ this.subs.forEach(function(sub) {
+ sub.update();
+ })
+ }
+}
+```
+
+#### Watcher
+
+Watcher 相当于一个观察者,当接收到订阅者的消息后,观察者会做出自己的更新操作:
+
+```
+function Watcher(vm, node, name, nodeType) {
+ Dep.target = this;
+ this.name = name;
+ this.node = node;
+ this.vm = vm;
+ this.nodeType = nodeType;
+ this.update();
+ Dep.target = null;
+}
+
+Watcher.prototype = {
+ update: function () {
+ this.get();
+ if (this.nodeType == 'text') {
+ this.node.nodeValue = this.value;
+ }
+ if (this.nodeType == 'input') {
+ this.node.value = this.value;
+ }
+ },
+ get: function () {
+ this.value = this.vm[this.name];
+ }
+}
+```
+
+#### Complie
+
+Complie 具备将 HTML 模版解析成 Document Fragment 的能力,并且会创建响应的 Watcher,让视图中绑定的数据产生变化:
+
+```
+function nodeToFragment(node, vm) {
+ var flag = document.createDocumentFragment();
+ var child;
+
+ while(child = node.firstChild) {
+ compile(child, vm);
+ console.log(child);
+
+ flag.appendChild(child);
+ }
+
+ return flag;
+}
+
+function compile(node, vm) {
+ var reg = /\{\{(.*)\}\}/;
+
+ if(node.nodeType === 1) {
+ var attr = node.attributes;
+
+ for(var i = 0; i < attr.length; i++) {
+ if(attr[i].nodeName == 'v-model') {
+ var name = attr[i].nodeValue;
+ node.addEventListener('input', function(e) {
+ vm[name] = e.target.value;
+ });
+ node.value = vm[name];
+ node.removeAttribute('v-model');
+ }
+ }
+
+ new Watcher(vm, node, name, 'input');
+ }
+ else if(node.nodeType === 3) {
+ if(reg.test(node.nodeValue)) {
+ var name = RegExp.$1;
+ name = name.trim();
+
+ new Watcher(vm, node, name, 'text');
+ }
+ }
+}
+```
+
+#### MVVM 构造函数
+
+当 MVVM 对象初始化的时候会做两件事情:监听 data 所有属性的变化;解析 HTML 模版:
+
+```
+function MVVM(options) {
+ this.data = options.data;
+ var data = this.data;
+
+ observe(data, this);
+
+ var id = options.el;
+ var dom = nodeToFragment(document.getElementById(id), this);
+
+ document.getElementById(id).appendChild(dom);
+}
+
+var mv = new MVVM({
+ el: 'app',
+ data: {
+ msg: 'hello world'
+ }
+});
+```
+
+
+
+# 二、WPF 窗体应用程序创建流程
+
+## 1、掌握WPF窗体基本控件
+
+##### (1)Button(按钮):表示 Windows 按钮控件,该按钮对 Click 事件做出反应。
+
+常用属性介绍 Background:元素的背景色; Foreground:前景色; Width/Height:宽度/高度;
+ BorderBrush:元素边框颜色; BorderThickness:元素边框宽度;
+ Command:获取或设置在按下按钮时调用的命令。
+ CommandBindings:获取与此元素关联的 CommandBinding 对象的集合。 CommandBinding 为此元素启用命令处理,并声明命令、命令的事件和由此元素附加的处理程序之间的链接。
+ CommandParameter:获取或设置要传递给 Command 属性的参数。
+ Content:获取或设置 ContentControl 的内容。
+ ContentStringFormat:获取或设置一个撰写字符串,该字符串指定如果 Content 属性显示为字符串,应如何设置该属性的格式。
+ ContentTemplate :获取或设置用于显示 ContentControl 内容的数据模板。
+ FontFamily:字体名称; FontSize:字体大小; FontStretch:字体在屏幕上紧缩或加宽的程度; FontWeight:字体粗细;
+ ClickMode:获取或设置 Click 事件何时发生。ClikMode值有如下三种,具体解析如下:
+ Release:指定当按下和释放按钮时应引发Click 事件。
+ Press:指定当按下按钮时应引发Click 事件。
+ Hover:指定当鼠标悬停在控件上时应引发Click 事件。
+
+##### (2)Label 文本标签 表示包含一段任意类型内容的控件。也可以叫标签控件。
+
+ Lable 常用属性
+ Background:背景; Foreground前景色(字体颜色)
+ BorderBrush:用于描述控件的边框背景的画笔。
+ BorderThickness:获取或设置控件的边框宽度。
+ Content:获取或设置 ContentControl 的内容。
+ FontFamily:获取或设置控件的字体系列。
+ FontSize:获取或设置字号。
+ FontStretch:获取或设置字体在屏幕上紧缩或加宽的程度。
+ FontStyle:获取或设置字体样式。
+ FontWeight:获取或设置指定字体的粗细。
+ Width/Height:宽度/高度。 IsEnabled:使能是否可用。 Name:元素标识名称。
+ Opacity:透明度。 Margin:元素的外边距。
+ HorizontalAlignment/VerticalAlignment:获取或设置在父元素(如面板或项控件)中组合此元素时所应用的水平/垂直对齐特征。
+ HorizontalContentAlignment/VerticalContentAlignment:获取或设置控件内容的水平/垂直对齐方式。
+
+##### (3)TextBox :文本输入框控件,是WPF中最基本的文字输入控件。它允许最终用户在一行、对话输入、或多行编写,就像是个编辑器。
+
+常用属性介绍
+ Background:背景; BorderBrush:边框背景的颜色; BorderThickness:边框宽度;
+ CanRedo:是否可重做最新的撤消操作; CanUndo:是否可撤消最新的操作;
+ CaretIndex:获取或设置插入符号的插入位置索引。
+ FlowDirection:获取或设置文本和其他用户界面 (UI) 元素在控制其布局的任何父元素内流动的方向。
+ FontFamily:字体样式; FontSize:字体大小; FontStretch:字体在屏幕上紧缩或加宽的程度。
+ HorizontalAlignment/VerticalAlignment:获取或设置在父元素中组合此元素时所应用的水平对齐特征/垂直对齐特征。
+ HorizontalContentAlignment/VerticalContentAlignment:获取或设置控件内容的水平对齐方式/垂直对齐方式。
+ HorizontalScrollBarVisibility/VerticalScrollBarVisibility:是否显示水平滚动条/垂直滚动条;
+ HorizontalOffset/VerticalOffset:获取和设置水平滚动条的位置/垂直滚动条的位置;
+ IsEnabled:使能,是否可用; IsReadOnly:对用户而言是否只读;
+ IsUndoEnabled:是否支持撤销功能; LineCount:文本总行数;
+ MaxLength:在文本框中手动输入的最大字符数。
+ MaxLines/MinLines:最大可见行数/最小行数。
+ Name:元素标识名称; Opacity:透明度;
+ SelectedText:文本框中当前选择的内容。
+ SelectionBrush:突出显示选定文本的画笔。
+ SelectionLength:文本框中当前选择的字符数。
+ SelectionOpacity:选择文本的透明度。
+ SelectionStart:当前选择的起始位置的字符索引。
+ SelectionTextBrush:选中文本的颜色;
+ Text:文本框的文本内容。
+ TextAlignment:文本框内容的水平对齐方式。
+ TextWrapping:文本框中文本的换行方式。
+
+##### (4)ListBox 是一个 ItemsControl,这意味着它可以包含任何类型的对象的集合 (,例如字符串、图像或面板) 。
+
+ 一个 ListBox 中的多个项是可见的,与仅 ComboBox具有所选项可见的项不同,除非 IsDropDownOpen 属性为 true。 该 SelectionMode 属性确定一次是否可以选择多个项 ListBox 。
+常用属性介绍
+ FontFamily:字体系列; FontSize:字体大小; FontStretch:字体在屏幕上紧缩或加宽的程度;FontWeight:字体粗细;
+ Background:背景; BorderBrush:边框颜色; BorderThickness:边框宽度; Foreground:前景色;
+ Width/Height:宽度/高度; Name:元素标识名称; IsEnabled:使能,是否可用; Margin:外边距;
+ Opacity:透明度; Visibility:可见性; IsVisible:是否可见; FlowDirection:其子元素的流动方向;
+ LayoutTransform:在执行布局时应该应用于此元素的图形转换方式。 RenderTransform:元素的呈现位置的转换信息;
+ RenderTransformOrigin:由RenderTransform声明的任何可能呈现转换的中心点,相对于元素的边界。
+ HorizontalAlignment/VerticalAlignment:在父元素中组合此元素时所应用的水平对齐特征/垂直对齐特征。
+ HorizontalContentAlignment/VerticalContentAlignment:控件内容的水平对齐方式/垂直对齐方式。
+ Items:获取用于生成 ItemsControl 的内容的集合。
+ ItemsSource:获取或设置用于生成 ItemsControl 的内容的集合。
+ SelectedIndex:获取或设置当前选择中第一项的索引,如果选择为空,则返回负一(-1)。
+ SelectedItem:获取或设置当前选择中的第一项,或者,如果选择为空,则返回 null。
+ SelectedItems:获取当前选定的项。
+ SelectedValue:获取或设置通过使用 SelectedItem 而获取的 SelectedValuePath 的值。
+ SelectedValuePath:获取或设置用于从 SelectedValue 获取 SelectedItem 的路径。
+ SelectionMode:获取或设置 ListBox 的选择行为。
+ SnapsToDevicePixels:获取或设置一个值,该值确定在呈现过程中,此元素的呈现是否应使用特定于设备的像素设置。
+
+##### (5)DataGrid DataGrid 表示用于在可自定义的网格中显示数据的控件。
+
+ 常用属性介绍
+ ActualHeight/ActualWidth:元素呈现的高度/宽度。
+ CanSelectMultipleItems:获取或设置一个值,该值指示是否可以一次选择 MultiSelector 中的多个项。
+ CanUserAddRows:获取或设置一个值,该值指示用户是否可在 DataGrid 中添加新行。
+ CanUserDeleteRows:获取或设置一个值,该值指示用户是否可从 DataGrid 中删除行。
+ CanUserReorderColumns:获取或设置一个值,该值指示用户能否通过用鼠标拖动列标题来更改列的显示顺序。
+ CanUserResizeColumns/CanUserResizeRows:获取或设置一个值,该值指示用户是否可使用鼠标调整列宽/高度。
+ CanUserSortColumns:获取或设置一个值,该值指示用户能否通过单击列标题对列进行排序。
+ ColumnHeaderHeight:获取或设置列标题行的高度。
+ Columns:获取一个集合,该集合包含 DataGrid 中的所有列。
+ ColumnWidth:获取或设置 DataGrid 中列和标题的标准宽度和大小调整模式。
+ CurrentCell:获取或设置具有焦点的单元格。CurrentColumn:获取或设置包含当前单元格的列。
+ CurrentItem:获取与包含当前单元格的行绑定的数据项。
+ DisplayMemberPath:获取或设置源对象上的值的路径,以用作对象的可视表示形式。
+ HeadersVisibility:获取或设置用于指定行和列标题可见性的值。
+ HorizontalGridLinesBrush:获取或设置用于绘制水平网格线的画笔。
+ HorizontalScrollBarVisibility/VerticalScrollBarVisibility:水平/垂直滚动条可见性。
+ RowBackground:获取或设置行背景的默认画笔。RowHeaderWidth:获取或设置行标题列的宽度。
+ RowHeight:获取或设置所有行的建议高度。SelectedCells:获取当前选定单元格的列表。
+ SelectedIndex:获取或设置当前选择中第一项的索引,如果选择为空,则返回负一(-1)。
+ SelectedItem:获取或设置当前选择中的第一项,或者,如果选择为空,则返回 null。
+ SelectedItems:获取在 MultiSelector 中选定的项。
+ SelectedValue:获取或设置通过使用 SelectedItem 而获取的 SelectedValuePath 的值。
+ SelectedValuePath:获取或设置用于从 SelectedValue 获取 SelectedItem 的路径。
+ SelectionMode:获取或设置一个值,该值指示如何在 DataGrid 中选择行和单元格。
+ SelectionUnit:获取或设置一个值,该值指示是否可以在 DataGrid 中选择行、单元格或两者。
+ Items:获取用于生成 ItemsControl 的内容的集合。ItemTemplate:获取或设置用来显示每个项的 DataTemplate。
+ ItemsPanel:获取或设置模板,该模板定义对项的布局进行控制的面板。
+ ItemsSource:获取或设置用于生成 ItemsControl 的内容的集合。
+ SnapsToDevicePixels:获取或设置一个值,该值确定在呈现过程中,此元素的呈现是否应使用特定于设备的像素设置。
+
+##### (6)ComboBox 表示带有下拉列表的选择控件,通过单击控件上的箭头可显示或隐藏下拉列表。也叫下拉列表控件。
+
+常用属性介绍
+ FontFamily:字体系列; FontSize:字体大小; FontStretch:字体在屏幕上紧缩或加宽的程度;FontWeight:字体粗细;
+ Background:背景; BorderBrush:边框颜色; BorderThickness:边框宽度; Foreground:前景色;
+ Width/Height:宽度/高度; Name:元素标识名称; IsEnabled:使能,是否可用; Margin:外边距;
+ Opacity:透明度; Visibility:可见性; IsVisible:是否可见; FlowDirection:其子元素的流动方向;
+ LayoutTransform:在执行布局时应该应用于此元素的图形转换方式。 RenderTransform:元素的呈现位置的转换信息;
+ RenderTransformOrigin:由RenderTransform声明的任何可能呈现转换的中心点,相对于元素的边界。
+ HorizontalAlignment/VerticalAlignment:在父元素中组合此元素时所应用的水平对齐特征/垂直对齐特征。
+ HorizontalContentAlignment/VerticalContentAlignment:控件内容的水平对齐方式/垂直对齐方式。
+ Items:获取用于生成 ItemsControl 的内容的集合。ItemTemplate:获取或设置用来显示每个项的 DataTemplate。
+ ItemsPanel:获取或设置模板,该模板定义对项的布局进行控制的面板。
+ ItemsSource:获取或设置用于生成 ItemsControl 的内容的集合。
+ SelectedIndex:获取或设置当前选择中第一项的索引,如果选择为空,则返回负一(-1)。
+ SelectedItem:获取或设置当前选择中的第一项,或者,如果选择为空,则返回 null。
+ SelectedItems:获取当前选定的项。 Text:获取或设置当前选定项的文本。
+ SelectedValue:获取或设置通过使用 SelectedItem 而获取的 SelectedValuePath 的值。
+ SelectedValuePath:获取或设置用于从 SelectedValue 获取 SelectedItem 的路径。
+ SelectionBoxItem:获取在选择框中显示的项。SelectionBoxItemTemplate:获取选择框内容的项模板。
+ SnapsToDevicePixels:获取或设置一个值,该值确定在呈现过程中,此元素的呈现是否应使用特定于设备的像素设置。
+ IsDropDownOpen:获取或设置一个值,该值指示组合框的下拉部分当前是否打开。
+ IsEditable:获取或设置一个值,该值指示启用或禁用 ComboBox 的文本框中的文本编辑。
+ IsReadOnly:获取或设置启用仅限选择模式的值,在此模式中,可选择但不可编辑组合框中的内容。
+
+## 2、熟悉具体应用创建流程
+
+##### 第一步,创建WPF应用程序项目
+
+打开Visual Studio 2022 ,选择“*File—>New—>Project*”。在“Create a new project”对话框中选择“WPF Application”,修改名称为自己项目的名称,然后点击“Create”按钮,便成功创建了一个“WPF应用程序如下图:
+
+
+
+##### 第二步,熟悉项目主要引用类库、操作窗口、代码文件
+
+新创建的项目所引用的公共类库如下。如下图:(“WPF APP”会在“References”里面自动添加下图中所示的 PresentationCore、PresentationFramework、WindowsBase三大核心程序集)
+
+
+
+除此之外,WPF主要核心文件分别为:App.xaml:设置应用程序的起始文件与资源 ;App.xaml.cs:用于处理WPF程序的相关;MainWindows.xaml:程序界面与XAML设计文件
+
+
+
+
+
+##### 第三步,编写XAML文件,设置窗体网格布局
+
+1、Class属性指定了负责实现窗体的那个类的完全限定名称。在本例中为MainWindow,位于WpfApp1命名空间中。其它的暂时不管。
+
+除了设计窗口,XAML窗口 还有解决方案资源管理器和属性窗口(都可以在视图中找到)。将这四个窗口全部打开。属性窗口顾名思义可以更改选中控件的属性。
+
+2、更改窗体标题栏中显示的文本
+可以直接在XAML代码 Title=“MainWindow” Height=“470” Width=“600”> 中更改Title的值
+或者在设计视图中单击MainWindow窗体,在属性窗口找到Title属性,输入给定的名称,从而改变窗体标题栏中显示的文本。
+3、Grid 面板非常灵活,但也能变得很复杂,咱们把它想象成一个单元格,可以把控件放入这个单元格中,在本例中只会使用一个单元格。
+4、先拖一个按钮到窗体中
+单击VS左边工具箱 找到button控件 点击拖到窗体中
+检查XMAL 窗格中的代码发现多了一行
+
+```
+
+```
+
+HorizontalAlignment和VerticalAlignment为对齐属性 可以指定边和窗体某边对齐,删除的话默认与窗体中心对齐。 Margin="311,388,0,0"指定和窗口边的距离 Height和Width指定控件的长宽。
+可以自己更改值运行(调试–>开始执行(不调试))拖动窗体边线 试试效果。
+
+##### 第四步,进一步编写XAML文件,创建样式来管理控件在窗体上的“外观与感觉”
+
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+完成后效果如图:
+
+
+
+##### 第五步,编写cs文件,添加逻辑代码,动态更改属性
+
+前面已经使用“设计”视图,“属性”窗口和XAML窗格来进行属性的静态设置。窗体运行时有必要有初始默认值,单击clear键时也应该初始化。为此需要自己写一些代码了。
+
+创建Reset方法
+1、双击Main Window.xaml.cs文件,随后会打开“代码和文本编辑器”窗口。
+2、在Main Window类中添加Reset方法:这个方法给firstName 和lastName 两文本框Text初始值 3、给钟楼列表添加字符串数组towers 4、初始化敲钟方法 5、初始化IsChecked复选框 应设置值为FALSE 6、会员资历把第一项作为初始值 7、初始化入会日期(今天) 8、在窗体首次显示时调用Reset方法
+
+完成后效果如图:
+
+
+
+##### 第六步,进一步编写cs逻辑代码,处理WPF中事件
+
+值选定之后,我们应该可以Clear清除输入,以及ADD添加会员信息(这个要连数据库,本例不做描述,所以仅仅展示数据)
+
+1、处理Clear按钮的Click事件
+在设计视图中双击Clear按钮,会跳转到“代码和文本编辑器”窗口,并自动创建一个名为clear_Click的事件方法,会在用户单击Clear按钮时调用。可以发现clear按钮控件多了一个Click属性,我们希望当用户点击Clear时窗体能重置为它的默认值。
+
+2、add按钮应该提交用户数据然后处理数据(这里用一个对话框展示数据)
+
+3、处理窗体的Closing事件。就是当用户点击关闭窗体的时候,弹出一个对话框,询问是否确定关闭,或者执行其它语句在XAML窗格中将Closing="Window_Closing"代码输入MainWindow窗口的描述中。最好是先输入closing=然后选择 “新建事件处理程序”这样会直接生成一个Window_Closing 的事件方法,并把它同窗体的Closing事件关联起来。这个时候应该已经在MainWIndow类中添加好了一个空白的Window_Closing事件方法。这个时候点击关闭窗口就会弹出对话框,点击确定才会关闭窗体,否则窗体继续运行运行程序可以看看是否达到理想效果。
+
+##### 最后,运行应用程序,观察实现效果
+
+
+
+ 
+
+ 
+
+
+
+# 三、实验准备
+
+1、安装Windows11 Professional Edition,校园网有正版下载。
+
+2、安装Office 中的 Word 和 Excel,安装专业增强版2021
+
+3、安装 Visual Studio Community 2022, 选择界面语言为英语,并将 Tools > options > Environment > General > Color Theme 设置为 Dark,并且安装 git,根据PPT内容安装VS相关扩展。
+
+4、从网站 Downloads for the Windows App SDK 下载并运行最新版的 Windows App SDK 安装程序
+
+5、为目标设备(这里是你进行实验的计算机)安装 Microsoft Visual C++ Redistributable (VCRedist)。
+
+6、申请好 gitee 和github 账号,同时Visual Studio 也注册账号。在github及gitee上各建立一个空仓库。
+
+7、学会建立 SSH 连接及推送到远程仓库的方法。
+
+
+
+# 四、搭建 VS 下 python 调试环境及机器学习平台 pytorch,尝试 gym(选做)
+
+## 1、安装anaconda
+
+##### (1) 到官网[https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/](https://gitee.com/link?target=https%3A%2F%2Fmirrors.tuna.tsinghua.edu.cn%2Fanaconda%2Farchive%2F) 下载安装。
+
+此网址为清华开源软件镜像站,不建议官网下载,国外服务器下载速度较慢且容易出问题
+
+
+
+##### (2)将以下路径添加到系统环境变量中:
+
+- D:\ProgramData\Anaconda3;
+- D:\ProgramData\Anaconda3\Scripts;
+- D:\ProgramData\Anaconda3\Library\mingw-w64\bin;
+- D:\ProgramData\Anaconda3\Library\usr\bin;
+- D:\ProgramData\Anaconda3\Library\bin;
+
+##### (3)设置镜像站点
+
+使用 conda install 包名 安装需要的 Python 非常方便,但是官方的服务器在国外,因此下载速度很慢。国内清华大学提供了 Anaconda 的仓库镜像,我们只需要配置 Anaconda 的配置文件,添加清华的镜像源,然后将其设置为第一搜索渠道即可。cmd 命令行下分别执行以下命令:
+
+```
+conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
+conda config --set show_channel_urls yes
+conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
+conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
+```
+
+##### (4)测试是否安装正确
+
+在 cmd/powershell 命令下输入 conda 可以查看是否已安装成功。
+
+
+
+在 cmd/powershell 命令下输入 conda --version 可以查看当前conda版本(检验安装成功的标志)
+
+
+
+在 cmd/powershell 命令下输入 conda info 可以查看当前conda详细信息(检验安装成功的标志)
+
+
+
+如果提示conda不是内部或外部命令,那就意味着,你的anaconda没有把环境变量配置好。解决办法是重新检查一下path配置的5条路径对不对。
+
+## 2、安装PyTorch
+
+##### (1)显卡设置
+
+查看显卡型号:
+
+
+
+进入英伟达官网,下载对应的显卡驱动
+
+
+
+安装完成后,打开CMD终端(快捷键:Win+R),命令行输入:nvidia-smi查看GPU状态:
+
+
+
+ 注意:右上角显示的CUDA版本(红色框中)是当前版本所支持的最高CUDA版本。
+
+##### (2)安装Visual Studio 2022 Community,勾选“Python开发”和“C++桌面开发”工作负载
+
+
+
+##### (3)安装CUDA
+
+下载对应版本的CUDA
+
+
+
+自定义安装CUDA(安装位置要记住)
+
+
+
+设置环境变量
+
+
+
+
+
+##### (4)安装cudnn
+
+
+
+下载cudnn后直接将其解开压缩包,然后需要将解压后的bin,include,lib文件夹复制粘贴到cuda安装时的默认路径文件夹下(比如我的是在:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 下)
+
+最后测试cuda是否配置成功:
+
+Win+R打开CMD终端执行:nvcc -V 即可看到cuda的信息:
+
+
+
+##### (5)创建虚拟环境
+
+在anaconda中添加镜像源:
+
+```
+
+conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
+conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
+conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
+conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
+conda config --set show_channel_urls yes
+
+```
+
+创建虚拟环境:
+
+```
+(base) C:\WINDOWS\system32>conda create -n env_pytorch python==3.9.7
+```
+
+最后的结果如下:
+
+
+
+##### (6)安装PyTorch
+
+先激活并进入虚拟环境
+
+
+
+接下来进入PyTorch官网,选择相关参数,获取PyTorch安装指令,并在anaconda prompt 终端中执行红色框中的指令(该指令为最新版本的PyTorch):conda install pytorch torchvision torchaudio cudatoolkit=11.3
+
+注意:安装的时候要将命令后的-c pytorch后面的内容删除,从国内源进行下载,速度快一些。
+
+
+
+输入PyTorch安装指令指令后,查看conda找到将要安装的包是否是要进行安装的
+
+
+
+如果是,输入y之后,按下enter确认进行下载;
+
+如果不是,就需要重新检查安装PyTorch的命令。
+
+安装PyTorch,至此,基础环境已经部署完成。
+
+##### (7)验证PyTorch是否成功安装
+
+安装完成后,继续在在anaconda prompt 终端中执行以下指令,验证PyTorch是否安装成功:
+
+```
+python
+import torch
+torch.cuda.is_available()
+```
+
+如下图提示True说明框架配置成功,且GPU可用
+
+
+
+验证完成后Ctrl+Z回到命令行,然后执行conda list指令就可以看到该虚拟环境下已经安装好的包
+
+
+
+
+
+能够在conda list中找到以上两个包,则说明已经配置完成。
+
+## 3、安装gym
+
+##### (1)管理员运行进入 anaconda,git clone https://github.com/openai/gym.git
+
+
+
+##### (2)进入下载好的 gym 文件夹,激活环境 activate env_pytorch
+
+
+
+##### (3)pip install gym,此时立刻运行 pip install gym[Box2d] 会报错
+
+
+
+##### (4)conda install swig
+
+
+
+##### (5)pip install gym[Box2d]
+
+
+
+## 以上便成功搭建了VS下python调试环境及机器学习平台pytorch和gym,选做部分成功完成。
+
diff --git a/FileMerged.sln b/FileMerged.sln
new file mode 100644
index 0000000000000000000000000000000000000000..39b2051cb82b282b5c616da9197aee35e8c83e41
--- /dev/null
+++ b/FileMerged.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32929.385
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileMerged", "FileMerged\FileMerged.csproj", "{CF15677B-3630-4FCF-B47F-CB722CA770C2}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CF15677B-3630-4FCF-B47F-CB722CA770C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CF15677B-3630-4FCF-B47F-CB722CA770C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CF15677B-3630-4FCF-B47F-CB722CA770C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CF15677B-3630-4FCF-B47F-CB722CA770C2}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {CF7B45EF-3BF1-44AF-A74F-3E0FB2473FA7}
+ EndGlobalSection
+EndGlobal
diff --git a/FileMerged/FileMerged.csproj b/FileMerged/FileMerged.csproj
new file mode 100644
index 0000000000000000000000000000000000000000..b57c89e694728abd476f3f4dd7288093c0236683
--- /dev/null
+++ b/FileMerged/FileMerged.csproj
@@ -0,0 +1,11 @@
+
+
+
+ WinExe
+ net6.0-windows
+ enable
+ true
+ enable
+
+
+
\ No newline at end of file
diff --git a/FileMerged/FileMerged.csproj.user b/FileMerged/FileMerged.csproj.user
new file mode 100644
index 0000000000000000000000000000000000000000..7814ea24efb1226638b58bbf50f1769939812f37
--- /dev/null
+++ b/FileMerged/FileMerged.csproj.user
@@ -0,0 +1,8 @@
+
+
+
+
+ Form
+
+
+
diff --git a/FileMerged/Form1.Designer.cs b/FileMerged/Form1.Designer.cs
new file mode 100644
index 0000000000000000000000000000000000000000..47e5d144b0abc115385cdf47a97a0d1efe715a6c
--- /dev/null
+++ b/FileMerged/Form1.Designer.cs
@@ -0,0 +1,289 @@
+namespace FileMerged
+{
+ partial class Form1
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
+ this.button4 = new System.Windows.Forms.Button();
+ this.button5 = new System.Windows.Forms.Button();
+ this.button6 = new System.Windows.Forms.Button();
+ this.button7 = new System.Windows.Forms.Button();
+ this.button8 = new System.Windows.Forms.Button();
+ this.button9 = new System.Windows.Forms.Button();
+ this.button10 = new System.Windows.Forms.Button();
+ this.button11 = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.listBox1 = new System.Windows.Forms.ListBox();
+ this.listBox2 = new System.Windows.Forms.ListBox();
+ this.checkBox1 = new System.Windows.Forms.CheckBox();
+ this.checkBox2 = new System.Windows.Forms.CheckBox();
+ this.checkBox3 = new System.Windows.Forms.CheckBox();
+ this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+ this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(21, 25);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(120, 30);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "选择文件目录";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(653, 69);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(135, 30);
+ this.button2.TabIndex = 1;
+ this.button2.Text = "查找所有的文件";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(21, 234);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(120, 30);
+ this.button3.TabIndex = 2;
+ this.button3.Text = "添加到目标集中";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // button4
+ //
+ this.button4.Location = new System.Drawing.Point(184, 234);
+ this.button4.Name = "button4";
+ this.button4.Size = new System.Drawing.Size(120, 30);
+ this.button4.TabIndex = 3;
+ this.button4.Text = "清空目标集";
+ this.button4.UseVisualStyleBackColor = true;
+ //
+ // button5
+ //
+ this.button5.Location = new System.Drawing.Point(365, 234);
+ this.button5.Name = "button5";
+ this.button5.Size = new System.Drawing.Size(120, 30);
+ this.button5.TabIndex = 4;
+ this.button5.Text = "从目标集中退出";
+ this.button5.UseVisualStyleBackColor = true;
+ //
+ // button6
+ //
+ this.button6.Location = new System.Drawing.Point(547, 234);
+ this.button6.Name = "button6";
+ this.button6.Size = new System.Drawing.Size(120, 30);
+ this.button6.TabIndex = 5;
+ this.button6.Text = "添加单个文件";
+ this.button6.UseVisualStyleBackColor = true;
+ //
+ // button7
+ //
+ this.button7.Location = new System.Drawing.Point(673, 271);
+ this.button7.Name = "button7";
+ this.button7.Size = new System.Drawing.Size(94, 29);
+ this.button7.TabIndex = 6;
+ this.button7.Text = "上移";
+ this.button7.UseVisualStyleBackColor = true;
+ this.button7.Click += new System.EventHandler(this.button7_Click);
+ //
+ // button8
+ //
+ this.button8.Location = new System.Drawing.Point(673, 306);
+ this.button8.Name = "button8";
+ this.button8.Size = new System.Drawing.Size(94, 29);
+ this.button8.TabIndex = 7;
+ this.button8.Text = "下移";
+ this.button8.UseVisualStyleBackColor = true;
+ this.button8.Click += new System.EventHandler(this.button8_Click);
+ //
+ // button9
+ //
+ this.button9.Location = new System.Drawing.Point(673, 346);
+ this.button9.Name = "button9";
+ this.button9.Size = new System.Drawing.Size(94, 29);
+ this.button9.TabIndex = 8;
+ this.button9.Text = "打开选中文";
+ this.button9.UseVisualStyleBackColor = true;
+ //
+ // button10
+ //
+ this.button10.Location = new System.Drawing.Point(694, 406);
+ this.button10.Name = "button10";
+ this.button10.Size = new System.Drawing.Size(94, 29);
+ this.button10.TabIndex = 9;
+ this.button10.Text = "合并文件";
+ this.button10.UseVisualStyleBackColor = true;
+ this.button10.Click += new System.EventHandler(this.button10_Click);
+ //
+ // button11
+ //
+ this.button11.Location = new System.Drawing.Point(21, 381);
+ this.button11.Name = "button11";
+ this.button11.Size = new System.Drawing.Size(120, 30);
+ this.button11.TabIndex = 10;
+ this.button11.Text = "目标文件名";
+ this.button11.UseVisualStyleBackColor = true;
+ this.button11.Click += new System.EventHandler(this.button11_Click);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(21, 74);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(84, 20);
+ this.label1.TabIndex = 11;
+ this.label1.Text = "文件名字符";
+ this.label1.Click += new System.EventHandler(this.label1_Click);
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(42, 421);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(99, 20);
+ this.label2.TabIndex = 12;
+ this.label2.Text = "合并后文件名";
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(303, 71);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(344, 27);
+ this.textBox1.TabIndex = 13;
+ //
+ // listBox1
+ //
+ this.listBox1.FormattingEnabled = true;
+ this.listBox1.ItemHeight = 20;
+ this.listBox1.Location = new System.Drawing.Point(21, 116);
+ this.listBox1.Name = "listBox1";
+ this.listBox1.Size = new System.Drawing.Size(647, 104);
+ this.listBox1.TabIndex = 14;
+ //
+ // listBox2
+ //
+ this.listBox2.FormattingEnabled = true;
+ this.listBox2.ItemHeight = 20;
+ this.listBox2.Location = new System.Drawing.Point(21, 271);
+ this.listBox2.Name = "listBox2";
+ this.listBox2.Size = new System.Drawing.Size(646, 104);
+ this.listBox2.TabIndex = 15;
+ //
+ // checkBox1
+ //
+ this.checkBox1.AutoSize = true;
+ this.checkBox1.Location = new System.Drawing.Point(159, 387);
+ this.checkBox1.Name = "checkBox1";
+ this.checkBox1.Size = new System.Drawing.Size(166, 24);
+ this.checkBox1.TabIndex = 16;
+ this.checkBox1.Text = "文本合并时添加执行";
+ this.checkBox1.UseVisualStyleBackColor = true;
+ //
+ // checkBox2
+ //
+ this.checkBox2.AutoSize = true;
+ this.checkBox2.Location = new System.Drawing.Point(334, 387);
+ this.checkBox2.Name = "checkBox2";
+ this.checkBox2.Size = new System.Drawing.Size(151, 24);
+ this.checkBox2.TabIndex = 17;
+ this.checkBox2.Text = "合并时添加文件名";
+ this.checkBox2.UseVisualStyleBackColor = true;
+ //
+ // checkBox3
+ //
+ this.checkBox3.AutoSize = true;
+ this.checkBox3.Location = new System.Drawing.Point(506, 387);
+ this.checkBox3.Name = "checkBox3";
+ this.checkBox3.Size = new System.Drawing.Size(151, 24);
+ this.checkBox3.TabIndex = 18;
+ this.checkBox3.Text = "打开合并后的文件";
+ this.checkBox3.UseVisualStyleBackColor = true;
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Controls.Add(this.checkBox3);
+ this.Controls.Add(this.checkBox2);
+ this.Controls.Add(this.checkBox1);
+ this.Controls.Add(this.listBox2);
+ this.Controls.Add(this.listBox1);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.button11);
+ this.Controls.Add(this.button10);
+ this.Controls.Add(this.button9);
+ this.Controls.Add(this.button8);
+ this.Controls.Add(this.button7);
+ this.Controls.Add(this.button6);
+ this.Controls.Add(this.button5);
+ this.Controls.Add(this.button4);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.button1);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private Button button1;
+ private Button button2;
+ private Button button3;
+ private Button button4;
+ private Button button5;
+ private Button button6;
+ private Button button7;
+ private Button button8;
+ private Button button9;
+ private Button button10;
+ private Button button11;
+ private Label label1;
+ private Label label2;
+ private TextBox textBox1;
+ private ListBox listBox1;
+ private ListBox listBox2;
+ private CheckBox checkBox1;
+ private CheckBox checkBox2;
+ private CheckBox checkBox3;
+ private FolderBrowserDialog folderBrowserDialog1;
+ private SaveFileDialog saveFileDialog1;
+ }
+}
\ No newline at end of file
diff --git a/FileMerged/Form1.cs b/FileMerged/Form1.cs
new file mode 100644
index 0000000000000000000000000000000000000000..87986b14528751181ec92e643c762523422cf07f
--- /dev/null
+++ b/FileMerged/Form1.cs
@@ -0,0 +1,143 @@
+using System.Diagnostics;
+using System.Text;
+using System.Windows.Forms;
+
+namespace FileMerged
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ }
+
+ private void label1_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ //ѡļĿ¼ť¼
+ public static string folder_path;
+ private void button1_Click(object sender, EventArgs e)
+ {
+ //ͨEnvironment̬ϵͳѶĿ¼硰桱Ŀ¼
+ folderBrowserDialog1.RootFolder = Environment.SpecialFolder.MyComputer;
+ if(folderBrowserDialog1.ShowDialog()==DialogResult.OK)
+ {
+ folder_path = folderBrowserDialog1.SelectedPath;
+ label1.Text = folder_path;
+ }
+ }
+
+ //ļť¼
+ public static string[] folder_files;
+ private void button2_Click(object sender, EventArgs e)
+ {
+ if(Directory.Exists(folder_path))//ļĿ¼Ƿ
+ {//ַļ
+ folder_files = Directory.GetFiles(folder_path, textBox1.Text, SearchOption.AllDirectories);
+ listBox1.Items.Clear();
+ int selected_index = 0;
+ foreach(string folder_file in folder_files)
+ {
+ selected_index = listBox1.Items.Add(folder_file);
+ listBox1.SetSelected(selected_index, true);
+ }
+ }
+ }
+
+ //ơť¼
+ private void button7_Click(object sender, EventArgs e)
+ {
+ int sel_index = listBox2.SelectedIndex;
+ string sel_str = listBox2.SelectedItem.ToString();
+ if(sel_index>0)
+ {//ǰѡеǰһбеѡ
+ listBox2.Items[sel_index] = listBox2.Items[sel_index - 1];
+ listBox2.Items[sel_index - 1] = sel_str;
+ listBox2.SetSelected(sel_index, false);
+ listBox2.SetSelected(sel_index - 1, true);
+ }
+ }
+
+ //ơť¼
+ private void button8_Click(object sender, EventArgs e)
+ {
+ int sel_index = listBox2.SelectedIndex;
+ string sel_str = listBox2.SelectedItem.ToString();
+ if(sel_index>0)
+ {
+ listBox2.Items[sel_index] = listBox2.Items[sel_index + 1];
+ listBox2.Items[sel_index + 1] = sel_str;
+ listBox2.SetSelected(sel_index, false);
+ listBox2.SetSelected(sel_index + 1, true);
+ }
+ }
+
+ //Ŀļť¼
+ public static string dest_file;
+ private void button11_Click(object sender, EventArgs e)
+ {
+ saveFileDialog1.Title = "ѡҪϲļ";
+ saveFileDialog1.InitialDirectory = System.Environment.SpecialFolder.DesktopDirectory.ToString();
+ saveFileDialog1.OverwritePrompt = false;
+ if(saveFileDialog1.ShowDialog()==DialogResult.OK)
+ {
+ dest_file = saveFileDialog1.FileName;
+ label2.Text = dest_file;
+ }
+ }
+
+ //ϲļť¼
+ private void button10_Click(object sender, EventArgs e)
+ {
+ if(File.Exists(dest_file))
+ {
+ File.Delete(dest_file);
+ }
+ FileStream fs_dest = new FileStream(dest_file, FileMode.CreateNew, FileAccess.Write);
+ byte[] DataBuffer = new byte[100000];
+ byte[] file_name_buf;
+ FileStream fs_source = null;
+ int read_len;
+ FileInfo fi_a = null;
+ for(int i=0;i0)
+ {
+ fs_dest.Write(DataBuffer, 0, read_len);
+ read_len = fs_source.Read(DataBuffer, 0, 100000);
+ }
+ //
+ fs_dest.WriteByte((byte)13);
+ fs_dest.WriteByte((byte)10);
+ fs_source.Close();
+ }
+ fs_source.Dispose();
+ fs_dest.Flush();
+ fs_dest.Close();
+ fs_dest.Dispose();
+ //Process.Start(dest_file);
+ }
+
+ //ӵĿ꼯ť¼
+ private void button3_Click(object sender, EventArgs e)
+ {
+ foreach (string item in listBox1.Items)
+ {
+ if (!listBox2.Items.Contains(item))
+ listBox2.Items.Add(item);
+ }
+ }
+
+ }
+}
diff --git a/FileMerged/Form1.resx b/FileMerged/Form1.resx
new file mode 100644
index 0000000000000000000000000000000000000000..7799a58d143b752e2112c57446dd6dc84d267bcc
--- /dev/null
+++ b/FileMerged/Form1.resx
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
+ 234, 17
+
+
\ No newline at end of file
diff --git a/FileMerged/Program.cs b/FileMerged/Program.cs
new file mode 100644
index 0000000000000000000000000000000000000000..3db311b518f8c849b905be26d64f54e7c626875b
--- /dev/null
+++ b/FileMerged/Program.cs
@@ -0,0 +1,17 @@
+namespace FileMerged
+{
+ internal static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ // To customize application configuration such as set high DPI settings or default font,
+ // see https://aka.ms/applicationconfiguration.
+ ApplicationConfiguration.Initialize();
+ Application.Run(new Form1());
+ }
+ }
+}
\ No newline at end of file
diff --git a/FileMerged/bin/Debug/net6.0-windows/FileMerged.deps.json b/FileMerged/bin/Debug/net6.0-windows/FileMerged.deps.json
new file mode 100644
index 0000000000000000000000000000000000000000..bf3dc8f12ff37c5b5c75798b6f9f7da5db736c67
--- /dev/null
+++ b/FileMerged/bin/Debug/net6.0-windows/FileMerged.deps.json
@@ -0,0 +1,23 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {
+ "FileMerged/1.0.0": {
+ "runtime": {
+ "FileMerged.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "FileMerged/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/FileMerged/bin/Debug/net6.0-windows/FileMerged.dll b/FileMerged/bin/Debug/net6.0-windows/FileMerged.dll
new file mode 100644
index 0000000000000000000000000000000000000000..7cf3760d9e87774432d18cd3340b880c6bbeddb4
Binary files /dev/null and b/FileMerged/bin/Debug/net6.0-windows/FileMerged.dll differ
diff --git a/FileMerged/bin/Debug/net6.0-windows/FileMerged.exe b/FileMerged/bin/Debug/net6.0-windows/FileMerged.exe
new file mode 100644
index 0000000000000000000000000000000000000000..43908871fddc6ef650398bd697892dcddd31b93c
Binary files /dev/null and b/FileMerged/bin/Debug/net6.0-windows/FileMerged.exe differ
diff --git a/FileMerged/bin/Debug/net6.0-windows/FileMerged.pdb b/FileMerged/bin/Debug/net6.0-windows/FileMerged.pdb
new file mode 100644
index 0000000000000000000000000000000000000000..a903337229190cb84b1a6ba6af8c579c3d8aebdd
Binary files /dev/null and b/FileMerged/bin/Debug/net6.0-windows/FileMerged.pdb differ
diff --git a/FileMerged/bin/Debug/net6.0-windows/FileMerged.runtimeconfig.json b/FileMerged/bin/Debug/net6.0-windows/FileMerged.runtimeconfig.json
new file mode 100644
index 0000000000000000000000000000000000000000..f9988b2cae43ac853135f538ede8450ffee7e944
--- /dev/null
+++ b/FileMerged/bin/Debug/net6.0-windows/FileMerged.runtimeconfig.json
@@ -0,0 +1,15 @@
+{
+ "runtimeOptions": {
+ "tfm": "net6.0",
+ "frameworks": [
+ {
+ "name": "Microsoft.NETCore.App",
+ "version": "6.0.0"
+ },
+ {
+ "name": "Microsoft.WindowsDesktop.App",
+ "version": "6.0.0"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/FileMerged/obj/Debug/net6.0-windows/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs b/FileMerged/obj/Debug/net6.0-windows/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs
new file mode 100644
index 0000000000000000000000000000000000000000..36203c728faac8d3779420bb7896ee93b49c7106
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.AssemblyInfo.cs b/FileMerged/obj/Debug/net6.0-windows/FileMerged.AssemblyInfo.cs
new file mode 100644
index 0000000000000000000000000000000000000000..c9eab7f152b66009ca4363a4bfcf6d690cd5ae04
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/FileMerged.AssemblyInfo.cs
@@ -0,0 +1,25 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("FileMerged")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
+[assembly: System.Reflection.AssemblyProductAttribute("FileMerged")]
+[assembly: System.Reflection.AssemblyTitleAttribute("FileMerged")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
+[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
+
+// Generated by the MSBuild WriteCodeFragment class.
+
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.AssemblyInfoInputs.cache b/FileMerged/obj/Debug/net6.0-windows/FileMerged.AssemblyInfoInputs.cache
new file mode 100644
index 0000000000000000000000000000000000000000..5dd033b0626ccae8d037d09e42c21f0115c9e63f
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/FileMerged.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+d68d3ca119ebb00566db208c06acabd09f2e1710
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.Form1.resources b/FileMerged/obj/Debug/net6.0-windows/FileMerged.Form1.resources
new file mode 100644
index 0000000000000000000000000000000000000000..6c05a9776bd7cbae976fdcec7e3a254e93018279
Binary files /dev/null and b/FileMerged/obj/Debug/net6.0-windows/FileMerged.Form1.resources differ
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.GeneratedMSBuildEditorConfig.editorconfig b/FileMerged/obj/Debug/net6.0-windows/FileMerged.GeneratedMSBuildEditorConfig.editorconfig
new file mode 100644
index 0000000000000000000000000000000000000000..9e322ae952840ae91212ed5751142802ea9793f1
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/FileMerged.GeneratedMSBuildEditorConfig.editorconfig
@@ -0,0 +1,16 @@
+is_global = true
+build_property.ApplicationManifest =
+build_property.StartupObject =
+build_property.ApplicationDefaultFont =
+build_property.ApplicationHighDpiMode =
+build_property.ApplicationUseCompatibleTextRendering =
+build_property.ApplicationVisualStyles =
+build_property.TargetFramework = net6.0-windows
+build_property.TargetPlatformMinVersion = 7.0
+build_property.UsingMicrosoftNETSdkWeb =
+build_property.ProjectTypeGuids =
+build_property.InvariantGlobalization =
+build_property.PlatformNeutralAssembly =
+build_property._SupportedPlatformList = Linux,macOS,Windows
+build_property.RootNamespace = FileMerged
+build_property.ProjectDir = D:\giteeTest\FileMerged\FileMerged\
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.GlobalUsings.g.cs b/FileMerged/obj/Debug/net6.0-windows/FileMerged.GlobalUsings.g.cs
new file mode 100644
index 0000000000000000000000000000000000000000..84bbb89c14cfaf2df4747a3444ac7189ee12c4ac
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/FileMerged.GlobalUsings.g.cs
@@ -0,0 +1,10 @@
+//
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.Drawing;
+global using global::System.IO;
+global using global::System.Linq;
+global using global::System.Net.Http;
+global using global::System.Threading;
+global using global::System.Threading.Tasks;
+global using global::System.Windows.Forms;
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.assets.cache b/FileMerged/obj/Debug/net6.0-windows/FileMerged.assets.cache
new file mode 100644
index 0000000000000000000000000000000000000000..cae479264ee1ecf41c2f1cab69bbcf648d9634d9
Binary files /dev/null and b/FileMerged/obj/Debug/net6.0-windows/FileMerged.assets.cache differ
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.AssemblyReference.cache b/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.AssemblyReference.cache
new file mode 100644
index 0000000000000000000000000000000000000000..36247c08ba4d2292f15013536d9a8f17450ebc6f
Binary files /dev/null and b/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.AssemblyReference.cache differ
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.BuildWithSkipAnalyzers b/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.BuildWithSkipAnalyzers
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.CoreCompileInputs.cache b/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.CoreCompileInputs.cache
new file mode 100644
index 0000000000000000000000000000000000000000..1832b9d067587a1ecb625b86cbd25071f8e20f96
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.CoreCompileInputs.cache
@@ -0,0 +1 @@
+6eec852ba115c5753700615519e21224125fe7d0
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.FileListAbsolute.txt b/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8e248f2404da25e32db2e94e635ae81074fceb9d
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.FileListAbsolute.txt
@@ -0,0 +1,17 @@
+D:\giteeTest\FileMerged\FileMerged\bin\Debug\net6.0-windows\FileMerged.exe
+D:\giteeTest\FileMerged\FileMerged\bin\Debug\net6.0-windows\FileMerged.deps.json
+D:\giteeTest\FileMerged\FileMerged\bin\Debug\net6.0-windows\FileMerged.runtimeconfig.json
+D:\giteeTest\FileMerged\FileMerged\bin\Debug\net6.0-windows\FileMerged.dll
+D:\giteeTest\FileMerged\FileMerged\bin\Debug\net6.0-windows\FileMerged.pdb
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.csproj.AssemblyReference.cache
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.Form1.resources
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.csproj.GenerateResource.cache
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.GeneratedMSBuildEditorConfig.editorconfig
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.AssemblyInfoInputs.cache
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.AssemblyInfo.cs
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.csproj.CoreCompileInputs.cache
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.dll
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\refint\FileMerged.dll
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.pdb
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\FileMerged.genruntimeconfig.cache
+D:\giteeTest\FileMerged\FileMerged\obj\Debug\net6.0-windows\ref\FileMerged.dll
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.GenerateResource.cache b/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.GenerateResource.cache
new file mode 100644
index 0000000000000000000000000000000000000000..69a959c64b590358b16c2525c35f0d15655e996d
Binary files /dev/null and b/FileMerged/obj/Debug/net6.0-windows/FileMerged.csproj.GenerateResource.cache differ
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.designer.deps.json b/FileMerged/obj/Debug/net6.0-windows/FileMerged.designer.deps.json
new file mode 100644
index 0000000000000000000000000000000000000000..706cdfa24ea8dc258aa36871cbcbce0a948e9132
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/FileMerged.designer.deps.json
@@ -0,0 +1,11 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v6.0",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v6.0": {}
+ },
+ "libraries": {}
+}
\ No newline at end of file
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.designer.runtimeconfig.json b/FileMerged/obj/Debug/net6.0-windows/FileMerged.designer.runtimeconfig.json
new file mode 100644
index 0000000000000000000000000000000000000000..27234f82fde59f9b39dc8bdac547938cbdab969a
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/FileMerged.designer.runtimeconfig.json
@@ -0,0 +1,23 @@
+{
+ "runtimeOptions": {
+ "tfm": "net6.0",
+ "frameworks": [
+ {
+ "name": "Microsoft.NETCore.App",
+ "version": "6.0.0"
+ },
+ {
+ "name": "Microsoft.WindowsDesktop.App",
+ "version": "6.0.0"
+ }
+ ],
+ "additionalProbingPaths": [
+ "C:\\Users\\16566\\.dotnet\\store\\|arch|\\|tfm|",
+ "C:\\Users\\16566\\.nuget\\packages",
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configProperties": {
+ "Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.dll b/FileMerged/obj/Debug/net6.0-windows/FileMerged.dll
new file mode 100644
index 0000000000000000000000000000000000000000..7cf3760d9e87774432d18cd3340b880c6bbeddb4
Binary files /dev/null and b/FileMerged/obj/Debug/net6.0-windows/FileMerged.dll differ
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.genruntimeconfig.cache b/FileMerged/obj/Debug/net6.0-windows/FileMerged.genruntimeconfig.cache
new file mode 100644
index 0000000000000000000000000000000000000000..8ed9023fbd498cb10a5e4052d599d53a8dad324a
--- /dev/null
+++ b/FileMerged/obj/Debug/net6.0-windows/FileMerged.genruntimeconfig.cache
@@ -0,0 +1 @@
+4b0effe6403bc286d0f2dd95de62cf942455d0d9
diff --git a/FileMerged/obj/Debug/net6.0-windows/FileMerged.pdb b/FileMerged/obj/Debug/net6.0-windows/FileMerged.pdb
new file mode 100644
index 0000000000000000000000000000000000000000..a903337229190cb84b1a6ba6af8c579c3d8aebdd
Binary files /dev/null and b/FileMerged/obj/Debug/net6.0-windows/FileMerged.pdb differ
diff --git a/FileMerged/obj/Debug/net6.0-windows/apphost.exe b/FileMerged/obj/Debug/net6.0-windows/apphost.exe
new file mode 100644
index 0000000000000000000000000000000000000000..43908871fddc6ef650398bd697892dcddd31b93c
Binary files /dev/null and b/FileMerged/obj/Debug/net6.0-windows/apphost.exe differ
diff --git a/FileMerged/obj/Debug/net6.0-windows/ref/FileMerged.dll b/FileMerged/obj/Debug/net6.0-windows/ref/FileMerged.dll
new file mode 100644
index 0000000000000000000000000000000000000000..c259d2713512a914a5b90e9ce179fb5d66635e06
Binary files /dev/null and b/FileMerged/obj/Debug/net6.0-windows/ref/FileMerged.dll differ
diff --git a/FileMerged/obj/Debug/net6.0-windows/refint/FileMerged.dll b/FileMerged/obj/Debug/net6.0-windows/refint/FileMerged.dll
new file mode 100644
index 0000000000000000000000000000000000000000..c259d2713512a914a5b90e9ce179fb5d66635e06
Binary files /dev/null and b/FileMerged/obj/Debug/net6.0-windows/refint/FileMerged.dll differ
diff --git a/FileMerged/obj/FileMerged.csproj.nuget.dgspec.json b/FileMerged/obj/FileMerged.csproj.nuget.dgspec.json
new file mode 100644
index 0000000000000000000000000000000000000000..43690a9055f33054cd4925d0763e981979a14667
--- /dev/null
+++ b/FileMerged/obj/FileMerged.csproj.nuget.dgspec.json
@@ -0,0 +1,70 @@
+{
+ "format": 1,
+ "restore": {
+ "D:\\giteeTest\\FileMerged\\FileMerged\\FileMerged.csproj": {}
+ },
+ "projects": {
+ "D:\\giteeTest\\FileMerged\\FileMerged\\FileMerged.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "D:\\giteeTest\\FileMerged\\FileMerged\\FileMerged.csproj",
+ "projectName": "FileMerged",
+ "projectPath": "D:\\giteeTest\\FileMerged\\FileMerged\\FileMerged.csproj",
+ "packagesPath": "C:\\Users\\16566\\.nuget\\packages\\",
+ "outputPath": "D:\\giteeTest\\FileMerged\\FileMerged\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\16566\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net6.0-windows"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net6.0-windows7.0": {
+ "targetAlias": "net6.0-windows",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net6.0-windows7.0": {
+ "targetAlias": "net6.0-windows",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ },
+ "Microsoft.WindowsDesktop.App.WindowsForms": {
+ "privateAssets": "none"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.402\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/FileMerged/obj/FileMerged.csproj.nuget.g.props b/FileMerged/obj/FileMerged.csproj.nuget.g.props
new file mode 100644
index 0000000000000000000000000000000000000000..5a0cc02649233c106c62121bf638cfec7126f64c
--- /dev/null
+++ b/FileMerged/obj/FileMerged.csproj.nuget.g.props
@@ -0,0 +1,16 @@
+
+
+
+ True
+ NuGet
+ $(MSBuildThisFileDirectory)project.assets.json
+ $(UserProfile)\.nuget\packages\
+ C:\Users\16566\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages
+ PackageReference
+ 6.3.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FileMerged/obj/FileMerged.csproj.nuget.g.targets b/FileMerged/obj/FileMerged.csproj.nuget.g.targets
new file mode 100644
index 0000000000000000000000000000000000000000..3dc06ef3cc4057524bf5d2cd49936dff789cebe8
--- /dev/null
+++ b/FileMerged/obj/FileMerged.csproj.nuget.g.targets
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/FileMerged/obj/project.assets.json b/FileMerged/obj/project.assets.json
new file mode 100644
index 0000000000000000000000000000000000000000..4b4d333d5cae184c2e845f28e8f81c2268185089
--- /dev/null
+++ b/FileMerged/obj/project.assets.json
@@ -0,0 +1,76 @@
+{
+ "version": 3,
+ "targets": {
+ "net6.0-windows7.0": {}
+ },
+ "libraries": {},
+ "projectFileDependencyGroups": {
+ "net6.0-windows7.0": []
+ },
+ "packageFolders": {
+ "C:\\Users\\16566\\.nuget\\packages\\": {},
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "D:\\giteeTest\\FileMerged\\FileMerged\\FileMerged.csproj",
+ "projectName": "FileMerged",
+ "projectPath": "D:\\giteeTest\\FileMerged\\FileMerged\\FileMerged.csproj",
+ "packagesPath": "C:\\Users\\16566\\.nuget\\packages\\",
+ "outputPath": "D:\\giteeTest\\FileMerged\\FileMerged\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\16566\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net6.0-windows"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net6.0-windows7.0": {
+ "targetAlias": "net6.0-windows",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net6.0-windows7.0": {
+ "targetAlias": "net6.0-windows",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ },
+ "Microsoft.WindowsDesktop.App.WindowsForms": {
+ "privateAssets": "none"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.402\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/FileMerged/obj/project.nuget.cache b/FileMerged/obj/project.nuget.cache
new file mode 100644
index 0000000000000000000000000000000000000000..a42382f8ff053030e0d7d6fba2333efc0624eeb1
--- /dev/null
+++ b/FileMerged/obj/project.nuget.cache
@@ -0,0 +1,8 @@
+{
+ "version": 2,
+ "dgSpecHash": "exNTh5SZwmUnZoW2ZMfC68XAFaB0K6zXFPMJysHQ7mcyJ3bScvRs5Shi+IVDgDHqGXVtezK67CqTJyTABtFY9g==",
+ "success": true,
+ "projectFilePath": "D:\\giteeTest\\FileMerged\\FileMerged\\FileMerged.csproj",
+ "expectedPackageFiles": [],
+ "logs": []
+}
\ No newline at end of file
diff --git a/MVVM.jpg b/MVVM.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..63be1c1da72c7c46886c8609287d849ef86dfce6
Binary files /dev/null and b/MVVM.jpg differ
diff --git a/MVVM1.jpg b/MVVM1.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..61a04bf9d3751f676bcc9dd224ccba5158a203c7
Binary files /dev/null and b/MVVM1.jpg differ
diff --git a/WPF1.jpg b/WPF1.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..ca13fb514d61ece9af36c81f857681c164993273
Binary files /dev/null and b/WPF1.jpg differ
diff --git a/WPF2.jpg b/WPF2.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..101b6877555773b412400be8a567096cc0155638
Binary files /dev/null and b/WPF2.jpg differ
diff --git a/WPF3.jpg b/WPF3.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..f03c21f66e014164115e487d65bf1e8666c88221
Binary files /dev/null and b/WPF3.jpg differ
diff --git a/WPF4.jpg b/WPF4.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1f2d59f0303822c7d2d94afc038e606b6df9e8a4
Binary files /dev/null and b/WPF4.jpg differ
diff --git a/WPF5.jpg b/WPF5.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..527d0275250c6e44bd042446ceede6286e899c89
Binary files /dev/null and b/WPF5.jpg differ
diff --git a/WPF6.jpg b/WPF6.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a955ce6f043dfa8bc58496940d5b690012b69514
Binary files /dev/null and b/WPF6.jpg differ
diff --git a/WPF7.jpg b/WPF7.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..e9de8d62ee7afbec9e072e7894fa0a1ced0dc8be
Binary files /dev/null and b/WPF7.jpg differ
diff --git a/WPF8.jpg b/WPF8.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9026d1ed65ff90231d3791ad61d320bc50ec9797
Binary files /dev/null and b/WPF8.jpg differ
diff --git a/WPF9.jpg b/WPF9.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8d2a5221dce956c03bf23d40d6314e52567ed53e
Binary files /dev/null and b/WPF9.jpg differ
diff --git a/anaconda1.jpg b/anaconda1.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bef8e4d010a420aec4ff393879b0042b392f012d
Binary files /dev/null and b/anaconda1.jpg differ
diff --git a/anaconda2.jpg b/anaconda2.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..4e4d93c378945fae7c7192e4e78a7243ad35796d
Binary files /dev/null and b/anaconda2.jpg differ
diff --git a/anaconda3.jpg b/anaconda3.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..10cde6fdcf610d5c4fe32c7212410d285756f8bc
Binary files /dev/null and b/anaconda3.jpg differ
diff --git a/anaconda4.jpg b/anaconda4.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9d2cb71ae7340fc449faa0648aa664f158ff37fe
Binary files /dev/null and b/anaconda4.jpg differ
diff --git a/gym1-166633608826919.jpg b/gym1-166633608826919.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..016ba582276680b05e13bc40fda8e4bdac6139a8
Binary files /dev/null and b/gym1-166633608826919.jpg differ
diff --git a/gym1.jpg b/gym1.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..c62fb62bd23ecc6b614106f73bce99d71f55e4a5
Binary files /dev/null and b/gym1.jpg differ
diff --git a/gym2.jpg b/gym2.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..cdff2a439a1cb3ab55f4450c61c2e5cb9b404d76
Binary files /dev/null and b/gym2.jpg differ
diff --git a/gym3.jpg b/gym3.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..16c3a74b7d84d40eafd63dcfcfae28659b44c33b
Binary files /dev/null and b/gym3.jpg differ
diff --git a/gym4-166633650021824.jpg b/gym4-166633650021824.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3a1843371660a071875161c10be1ae85b7bd66f1
Binary files /dev/null and b/gym4-166633650021824.jpg differ
diff --git a/gym4-166633651118926.jpg b/gym4-166633651118926.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..3a1843371660a071875161c10be1ae85b7bd66f1
Binary files /dev/null and b/gym4-166633651118926.jpg differ
diff --git a/gym4.jpg b/gym4.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..27e894159eed844e7e364db0c2904f2691b6b8d4
Binary files /dev/null and b/gym4.jpg differ
diff --git a/gym5.jpg b/gym5.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..1652d7f987ae60c08fa6cb892eb34d7f43a8c698
Binary files /dev/null and b/gym5.jpg differ
diff --git "a/lab_2_7\347\277\273\350\257\221.md" "b/lab_2_7\347\277\273\350\257\221.md"
new file mode 100644
index 0000000000000000000000000000000000000000..79a226c30020ed021b62b41960e00dd8d5d00114
--- /dev/null
+++ "b/lab_2_7\347\277\273\350\257\221.md"
@@ -0,0 +1,72 @@
+# 注册表结构和注册表值类型
+
+
+
+
+
+***
+
+## 1 结构
+
+包含有关注册表值的信息。 RegQueryMultipleValues 函数使用此结构。
+
+```cpp
+typedef struct value_entW {
+ LPWSTR ve_valuename;
+ DWORD ve_valuelen;
+ DWORD_PTR ve_valueptr;
+ DWORD ve_type;
+} VALENTW, *PVALENTW;
+```
+
+**ve_valuename**
+
+要检索的值的名称。 在调用 RegQueryMultipleValues 之前,一定要设置这个成员
+
+**ve_valuelen**
+
+ve_valueptr 指向的数据大小,以字节为单位。
+
+**ve_valueptr**
+
+一个指向数据的指针,用于值的输入。这是指向由RegQueryMultipleValues填充的lpValueBuf缓冲区中返回的值数据的指针。
+
+**ve_type**
+
+ve _ valueptr所指向的数据类型。有关可能类型的列表,请参见注册表值类型。
+
+
+## 2 值的类型
+
+以下示例遍历一个 REG_MULTI_SZ 字符串。
+```cpp
+#include
+#include
+#include
+
+void SampleSzz(PTSTR pszz)
+{
+ _tprintf(_TEXT("\tBegin multi-sz string\n"));
+ while (*pszz)
+ {
+ _tprintf(_TEXT("\t\t%s\n"), pszz);
+ pszz = pszz + _tcslen(pszz) + 1;
+ }
+ _tprintf(_TEXT("\tEnd multi-sz\n"));
+}
+
+int __cdecl main(int argc, char **argv)
+{
+ // 因为编译器在带引号的字符串末尾添加了一个 \0,
+ // 最后有两个 \0 终止符。
+
+ _tprintf(_TEXT("Conventional multi-sz string:\n"));
+ SampleSzz(_TEXT("String1\0String2\0String3\0LastString\0"));
+
+ _tprintf(_TEXT("\nTest case with no strings:\n"));
+ SampleSzz(_TEXT(""));
+
+ return 0;
+}
+```
+
diff --git "a/lab_2_8\347\277\273\350\257\221.md" "b/lab_2_8\347\277\273\350\257\221.md"
new file mode 100644
index 0000000000000000000000000000000000000000..bc49a0c1f569ce30874e3f88b015da36fdfe8f46
--- /dev/null
+++ "b/lab_2_8\347\277\273\350\257\221.md"
@@ -0,0 +1,121 @@
+# 枚举注册表子密钥
+
+
+
+***
+
+此实验示例使用RegQueryInfoKey、RegEnumKeyEx和RegEnumValue函数枚举指定密钥的子密钥。传递给每个函数的hKey参数是一个打开密钥的句柄。此键必须在函数调用之前打开,然后关闭。
+
+```cpp
+// QueryKey - 枚举密钥的子密钥及其关联值
+// hKey - 要枚举其子密钥和值的密钥
+
+#include
+#include
+#include
+
+#define MAX_KEY_LENGTH 255
+#define MAX_VALUE_NAME 16383
+
+void QueryKey(HKEY hKey)
+{
+ TCHAR achKey[MAX_KEY_LENGTH]; // 子密钥名字的缓冲区
+ DWORD cbName; // 名称字符串的大小
+ TCHAR achClass[MAX_PATH] = TEXT(""); // 类名缓冲区
+ DWORD cchClassName = MAX_PATH; // 类字符串的大小
+ DWORD cSubKeys=0; // 子密钥数量
+ DWORD cbMaxSubKey; // 最长子密钥大小
+ DWORD cchMaxClass; // 最长的类字符串
+ DWORD cValues; // 密钥的值数
+ DWORD cchMaxValue; // 最长值名称
+ DWORD cbMaxValueData; // 最长值数据
+ DWORD cbSecurityDescriptor; // 安全描述符的大小
+ FILETIME ftLastWriteTime; // 上次写入时间
+
+ DWORD i, retCode;
+
+ TCHAR achValue[MAX_VALUE_NAME];
+ DWORD cchValue = MAX_VALUE_NAME;
+
+ // 获取类名和值数量
+ retCode = RegQueryInfoKey(
+ hKey, // 钥匙柄
+ achClass, // 类名缓冲区
+ &cchClassName, // 类字符串的大小
+ NULL, // 保留的
+ &cSubKeys, // 子项数
+ &cbMaxSubKey, // 最长子密钥大小
+ &cchMaxClass, // 最长的类字符串
+ &cValues, // 此密钥的值数
+ &cchMaxValue, // 最长值名称
+ &cbMaxValueData, // 最长值数据
+ &cbSecurityDescriptor, // 安全描述符
+ &ftLastWriteTime); // 上次写入时间
+
+ // 枚举子项,直到 RegEnumKeyEx 失败。
+
+ if (cSubKeys)
+ {
+ printf( "\nNumber of subkeys: %d\n", cSubKeys);
+
+ for (i=0; i0)
+ {//将当前选中的项与前一项交换,并交换列表框中的选中序号
+ listBox2.Items[sel_index] = listBox2.Items[sel_index - 1];
+ listBox2.Items[sel_index - 1] = sel_str;
+ listBox2.SetSelected(sel_index, false);
+ listBox2.SetSelected(sel_index - 1, true);
+ }
+ }
+```
+
+实现列表框中选中行的上移操作,“下移”按钮的事件处理方式与此类似:
+
+```
+//“下移”按钮的事件处理代码
+ private void button8_Click(object sender, EventArgs e)
+ {
+ int sel_index = listBox2.SelectedIndex;
+ string sel_str = listBox2.SelectedItem.ToString();
+ if(sel_index>0)
+ {
+ listBox2.Items[sel_index] = listBox2.Items[sel_index + 1];
+ listBox2.Items[sel_index + 1] = sel_str;
+ listBox2.SetSelected(sel_index, false);
+ listBox2.SetSelected(sel_index + 1, true);
+ }
+ }
+```
+
+向窗体添加一个saveFileDialog对话框,设定要合成的目标文件名,“目标文件名”按钮的事件处理代码如下:
+
+```
+//“目标文件名”按钮的事件处理代码
+ public static string dest_file;
+ private void button11_Click(object sender, EventArgs e)
+ {
+ saveFileDialog1.Title = "选择要合并后的文件";
+ saveFileDialog1.InitialDirectory = System.Environment.SpecialFolder.DesktopDirectory.ToString();
+ saveFileDialog1.OverwritePrompt = false;
+ if(saveFileDialog1.ShowDialog()==DialogResult.OK)
+ {
+ dest_file = saveFileDialog1.FileName;
+ label2.Text = dest_file;
+ }
+ }
+```
+
+文件内容合并时依次读入源文件的字节再转存到目标文件并写入每个文件的文件名信息,StreamReader类不宜操作字节,本项目使用FileStream类操作字节。FileInfo对象获取文件名并获取文件属性信息,它的Name属性获取文件的短文件名,它的FullName属性获取文件的完整路径长文件名,它的Delete方法删除一个已经存在的文件,Length属性获取当前文件的大小,Extension属性获取当前文件的扩展名,这些方法节省了编程代码。
+
+要写入的文件名字符串需转化为字节数组,用户直接将字符转化为字节是比较困难的,.NET平台提供Encoding类实现字符串编码操作,它又多个静态方法将字符串与字节数组相互转化。本项目用FileStream的Read方法读入源文件中的字节内容到内存字节数组中,再用FileStream的Write方法写入到目标文件中。写入换行符使用FileStream类的WriteByte((byte)13)方法写入这个特殊字节,完整的项目代码如下,先写入文件的名称在写入文件内容。
+
+```
+//“合并文件”按钮的事件处理代码
+ private void button10_Click(object sender, EventArgs e)
+ {
+ if(File.Exists(dest_file))
+ {
+ File.Delete(dest_file);
+ }
+ FileStream fs_dest = new FileStream(dest_file, FileMode.CreateNew, FileAccess.Write);
+ byte[] DataBuffer = new byte[100000];
+ byte[] file_name_buf;
+ FileStream fs_source = null;
+ int read_len;
+ FileInfo fi_a = null;
+ for(int i=0;i0)
+ {
+ fs_dest.Write(DataBuffer, 0, read_len);
+ read_len = fs_source.Read(DataBuffer, 0, 100000);
+ }
+ //换行
+ fs_dest.WriteByte((byte)13);
+ fs_dest.WriteByte((byte)10);
+ fs_source.Close();
+ }
+ fs_source.Dispose();
+ fs_dest.Flush();
+ fs_dest.Close();
+ fs_dest.Dispose();
+ //Process.Start(dest_file);
+ }
+```
+
+文件操作类需要添加System.IO命名空间,项目使用FileStream类的Read和Write方法合并多个文本文件,具有一定的实用性,可继续扩展到文件查找、获取文件属性、删除文件和目录操作等应用。
+
+#### 4、程序运行结果
+
+选择文件目录
+
+
+
+查找符合输入框给定的文本格式的所有文件
+
+
+
+添加到目标集中
+
+
+
+上移第三条文件名,调整文件合并顺序
+
+
+
+下移第三条文件名,调整文件合并顺序
+
+
+
+设定目标文件名、路径
+
+
+
+合并文件
+
+
+
+
+
+合并文件的内容为按指定顺序的源文件文件名、内容的连接
+
+
+
+
+
+
+