Kaynağa Gözat

Add a new tool named PLCIOPointTool

SenGao 3 hafta önce
ebeveyn
işleme
435f35dd33

+ 1 - 3
.gitignore

@@ -39,11 +39,9 @@
 /CommunicationProtocols/TwinCatADS/bin/Debug/net8.0
 /CommunicationProtocols/TwinCatADS/bin/Release/net8.0
 /Tools/AlarmInfoServerSim/obj
-/Tools/UserTool/obj
+/Tools/PLCIOPointTool/obj
 /Tools/ToMcFile/obj
 /Tools/UserTool/obj
-/Tools/UserTool/obj
-/Tools/ToMcFile/obj
 /Tools/OnlineLogViewer/obj
 /CommunicationProtocols/AdsCommunicatorNet8/bin/Debug/net8.0
 /CommunicationProtocols/AdsCommunicatorNet8/obj

+ 7 - 0
Minics.sln

@@ -91,6 +91,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlarmInfoServerSim", "Tools
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdsCommunicatorNet8", "CommunicationProtocols\AdsCommunicatorNet8\AdsCommunicatorNet8.csproj", "{D784466C-1F32-4621-1B3D-D1AC0CC08709}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PLCIOPointTool", "Tools\PLCIOPointTool\PLCIOPointTool.csproj", "{9C3E268E-4268-479E-9508-EFD76639B899}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -229,6 +231,10 @@ Global
 		{D784466C-1F32-4621-1B3D-D1AC0CC08709}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D784466C-1F32-4621-1B3D-D1AC0CC08709}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D784466C-1F32-4621-1B3D-D1AC0CC08709}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9C3E268E-4268-479E-9508-EFD76639B899}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9C3E268E-4268-479E-9508-EFD76639B899}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9C3E268E-4268-479E-9508-EFD76639B899}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9C3E268E-4268-479E-9508-EFD76639B899}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -263,6 +269,7 @@ Global
 		{55EC57EB-3DA4-4289-803F-4661A6EAE1B9} = {165A518A-753D-4062-A100-9367AF27F900}
 		{EF692000-6C78-4EA6-81BF-58371231510E} = {2783D72A-0926-427D-B70D-5F3F5FA757FC}
 		{D784466C-1F32-4621-1B3D-D1AC0CC08709} = {165A518A-753D-4062-A100-9367AF27F900}
+		{9C3E268E-4268-479E-9508-EFD76639B899} = {2783D72A-0926-427D-B70D-5F3F5FA757FC}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {2E8CB4A6-1AFA-4CB2-BA42-1BAFC71AD68B}

+ 6 - 0
Tools/PLCIOPointTool/App.xaml

@@ -0,0 +1,6 @@
+<prism:PrismApplication x:Class="PLCIOPointTool.App"
+                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                        xmlns:local="clr-namespace:PLCIOPointTool"
+                        xmlns:prism="http://prismlibrary.com/">
+</prism:PrismApplication>

+ 19 - 0
Tools/PLCIOPointTool/App.xaml.cs

@@ -0,0 +1,19 @@
+using PLCIOPointTool.Views;
+using System.Windows;
+
+namespace PLCIOPointTool
+{
+    /// <summary>
+    /// Interaction logic for App.xaml
+    /// </summary>
+    public partial class App : PrismApplication
+    {
+        protected override Window CreateShell() => Container.Resolve<MainWindow>();
+
+        protected override void RegisterTypes(IContainerRegistry containerRegistry)
+        {
+            throw new NotImplementedException();
+        }
+    }
+
+}

+ 10 - 0
Tools/PLCIOPointTool/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)
+)]

+ 20 - 0
Tools/PLCIOPointTool/PLCIOPointTool.csproj

@@ -0,0 +1,20 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>WinExe</OutputType>
+    <TargetFramework>net8.0-windows</TargetFramework>
+    <OutputPath>$(SolutionDir)Binary\Tools\PLCIOPointTool</OutputPath>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+    <Nullable>enable</Nullable>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <UseWPF>true</UseWPF>
+    <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
+    <SatelliteResourceLanguages>zh-Hans</SatelliteResourceLanguages>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Prism.DryIoc" />
+    <PackageReference Include="CommunityToolkit.Mvvm" />
+  </ItemGroup>
+  
+</Project>

+ 9 - 0
Tools/PLCIOPointTool/PLCIOPointTool.csproj.user

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+  <ItemGroup>
+    <Compile Update="Views\MainWindow.xaml.cs">
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+</Project>

+ 13 - 0
Tools/PLCIOPointTool/ViewModels/MainWindowViewModel.cs

@@ -0,0 +1,13 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PLCIOPointTool.ViewModels
+{
+    public class MainWindowViewModel : ObservableObject
+    {
+    }
+}

+ 14 - 0
Tools/PLCIOPointTool/Views/MainWindow.xaml

@@ -0,0 +1,14 @@
+<Window x:Class="PLCIOPointTool.Views.MainWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:PLCIOPointTool.Views"
+        xmlns:prism="http://prismlibrary.com/"
+        prism:ViewModelLocator.AutoWireViewModel="True"
+        mc:Ignorable="d"
+        Title="PLC I/O Point Test Tool" Height="700" Width="600">
+    <Grid>
+        
+    </Grid>
+</Window>

+ 27 - 0
Tools/PLCIOPointTool/Views/MainWindow.xaml.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+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.Shapes;
+
+namespace PLCIOPointTool.Views
+{
+    /// <summary>
+    /// Interaction logic for MainWindow.xaml
+    /// </summary>
+    public partial class MainWindow : Window
+    {
+        public MainWindow()
+        {
+            InitializeComponent();
+        }
+    }
+}