commit eaca9bf69c8cbc138b438442c013ef9680892404 Author: zhangyongpan Date: Thu Jul 24 19:45:45 2025 +0800 添加忽略文件和项目初始化 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..62ba5f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,78 @@ +# Build and Object Folders +bin/ +obj/ +.vs/ + +# Nuget packages directory +packages/ + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Rr]elease/ +x64/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.log +*.vspscc +*.vssscc +.builds + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper* + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help +UpgradeLog*.XML + +# Lightswitch +_Pvt_Extensions +GeneratedArtifacts +*.xap +ModelManifest.xml + +#Backup file +*.bak \ No newline at end of file diff --git a/ModbusDemo.sln b/ModbusDemo.sln new file mode 100644 index 0000000..1001852 --- /dev/null +++ b/ModbusDemo.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36301.6 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModbusDemo", "ModbusDemo\ModbusDemo.csproj", "{4F00ED24-6BEE-4192-9CA4-656802B78A6D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4F00ED24-6BEE-4192-9CA4-656802B78A6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F00ED24-6BEE-4192-9CA4-656802B78A6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F00ED24-6BEE-4192-9CA4-656802B78A6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F00ED24-6BEE-4192-9CA4-656802B78A6D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EC15C5B8-E7C1-4011-9DA0-AF136A5C3086} + EndGlobalSection +EndGlobal diff --git a/ModbusDemo/App.xaml b/ModbusDemo/App.xaml new file mode 100644 index 0000000..04c2eea --- /dev/null +++ b/ModbusDemo/App.xaml @@ -0,0 +1,10 @@ + + + + + diff --git a/ModbusDemo/App.xaml.cs b/ModbusDemo/App.xaml.cs new file mode 100644 index 0000000..63d701f --- /dev/null +++ b/ModbusDemo/App.xaml.cs @@ -0,0 +1,32 @@ +using Prism.DryIoc; +using Prism.Ioc; +using System.Configuration; +using System.Data; +using System.Windows; + +namespace ModbusDemo +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : PrismApplication + { + /// + /// 创建启动页面 + /// + /// 启动页面 + protected override Window CreateShell() + { + return Container.Resolve(); + } + /// + /// 实现控制反转和依赖注入功能 + /// + /// + protected override void RegisterTypes(IContainerRegistry containerRegistry) + { + + } + } + +} diff --git a/ModbusDemo/AssemblyInfo.cs b/ModbusDemo/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/ModbusDemo/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/ModbusDemo/MainWindow.xaml b/ModbusDemo/MainWindow.xaml new file mode 100644 index 0000000..61e2f4c --- /dev/null +++ b/ModbusDemo/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/ModbusDemo/MainWindow.xaml.cs b/ModbusDemo/MainWindow.xaml.cs new file mode 100644 index 0000000..9ab9ea9 --- /dev/null +++ b/ModbusDemo/MainWindow.xaml.cs @@ -0,0 +1,24 @@ +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace ModbusDemo +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/ModbusDemo/ModbusDemo.csproj b/ModbusDemo/ModbusDemo.csproj new file mode 100644 index 0000000..e3cafc8 --- /dev/null +++ b/ModbusDemo/ModbusDemo.csproj @@ -0,0 +1,16 @@ + + + + WinExe + net8.0-windows + enable + enable + true + + + + + + + +