From 9bec9cb4e1d63dcb73e2b722b0fb93bba17deb29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=84=E5=A4=B4?= Date: Tue, 13 Aug 2024 13:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NDSD-Screwdriver/App.config | 21 ++++++++++++++++++++- NDSD-Screwdriver/AppTool.cs | 11 +++++++++++ NDSD-Screwdriver/NDSD_Screwdriver.csproj | 4 ++++ NDSD-Screwdriver/ScrewdriverTest.cs | 3 ++- 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 NDSD-Screwdriver/AppTool.cs diff --git a/NDSD-Screwdriver/App.config b/NDSD-Screwdriver/App.config index 193aecc..709e1f1 100644 --- a/NDSD-Screwdriver/App.config +++ b/NDSD-Screwdriver/App.config @@ -1,6 +1,25 @@ - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NDSD-Screwdriver/AppTool.cs b/NDSD-Screwdriver/AppTool.cs new file mode 100644 index 0000000..7c03543 --- /dev/null +++ b/NDSD-Screwdriver/AppTool.cs @@ -0,0 +1,11 @@ +namespace NDSD_Screwdriver +{ + using System.Configuration; + public class AppTool + { + public static string GetIp() + { + return ConfigurationManager.AppSettings["ip"].ToString(); + } + } +} \ No newline at end of file diff --git a/NDSD-Screwdriver/NDSD_Screwdriver.csproj b/NDSD-Screwdriver/NDSD_Screwdriver.csproj index 91b319d..f8eb75c 100644 --- a/NDSD-Screwdriver/NDSD_Screwdriver.csproj +++ b/NDSD-Screwdriver/NDSD_Screwdriver.csproj @@ -33,8 +33,11 @@ 4 + + + @@ -46,6 +49,7 @@ + diff --git a/NDSD-Screwdriver/ScrewdriverTest.cs b/NDSD-Screwdriver/ScrewdriverTest.cs index ab33ab9..0da303b 100644 --- a/NDSD-Screwdriver/ScrewdriverTest.cs +++ b/NDSD-Screwdriver/ScrewdriverTest.cs @@ -9,6 +9,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; + namespace NDSD_Screwdriver { public partial class ScrewdriverTest : Form @@ -18,7 +19,7 @@ namespace NDSD_Screwdriver public ScrewdriverTest() { InitializeComponent(); - DOperate = new DOperate(); + } private void DOpenButton_Click(object sender, EventArgs e)