Jelajahi Sumber

20241206:环境更改

向羽 孟 8 bulan lalu
induk
melakukan
0d0eb248df

+ 4 - 34
Extensometer.BLL/Extensometer.BLL.csproj

@@ -9,7 +9,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Extensometer.BLL</RootNamespace>
     <AssemblyName>Extensometer.BLL</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <Deterministic>true</Deterministic>
     <NuGetPackageImportStamp>
@@ -24,7 +24,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
+    <PlatformTarget>x64</PlatformTarget>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
@@ -53,9 +53,8 @@
     <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="CLIDelegate, Version=1.0.7541.33894, Culture=neutral, PublicKeyToken=71f71440696c7e6b, processorArchitecture=x86">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\Extensometer\bin\x86\Debug\CLIDelegate.dll</HintPath>
+    <Reference Include="CLIDelegate">
+      <HintPath>Bll\CLIDelegate.dll</HintPath>
     </Reference>
     <Reference Include="SQLite-net, Version=1.8.116.0, Culture=neutral, processorArchitecture=MSIL">
       <HintPath>..\packages\sqlite-net-pcl.1.8.116\lib\netstandard2.0\SQLite-net.dll</HintPath>
@@ -129,35 +128,6 @@
   <ItemGroup>
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <COMReference Include="Microsoft.Office.Core">
-      <Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
-      <VersionMajor>2</VersionMajor>
-      <VersionMinor>8</VersionMinor>
-      <Lcid>0</Lcid>
-      <WrapperTool>primary</WrapperTool>
-      <Isolated>False</Isolated>
-      <EmbedInteropTypes>True</EmbedInteropTypes>
-    </COMReference>
-    <COMReference Include="Microsoft.Office.Interop.Excel">
-      <Guid>{00020813-0000-0000-C000-000000000046}</Guid>
-      <VersionMajor>1</VersionMajor>
-      <VersionMinor>9</VersionMinor>
-      <Lcid>0</Lcid>
-      <WrapperTool>primary</WrapperTool>
-      <Isolated>False</Isolated>
-      <EmbedInteropTypes>True</EmbedInteropTypes>
-    </COMReference>
-    <COMReference Include="VBIDE">
-      <Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
-      <VersionMajor>5</VersionMajor>
-      <VersionMinor>3</VersionMinor>
-      <Lcid>0</Lcid>
-      <WrapperTool>primary</WrapperTool>
-      <Isolated>False</Isolated>
-      <EmbedInteropTypes>True</EmbedInteropTypes>
-    </COMReference>
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="..\packages\SQLitePCLRaw.lib.e_sqlite3.2.0.4\build\net461\SQLitePCLRaw.lib.e_sqlite3.targets" Condition="Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.2.0.4\build\net461\SQLitePCLRaw.lib.e_sqlite3.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

+ 38 - 39
Extensometer.BLL/ObjDataOperationClass.cs

@@ -9,7 +9,6 @@ using System.Threading.Tasks;
 using Extensometer.Data;
 using Extensometer.Model;
 using Extensometer.Model.ResultModel;
-using Microsoft.Office.Interop.Excel;
 
 namespace Extensometer.BLL
 {
@@ -92,45 +91,45 @@ namespace Extensometer.BLL
         /// <param name="list"></param>
         /// <param name="FilePath"></param>
         /// <returns></returns>
-        public ResultModel DataExport(List<ObjectData> list,string FilePath)
-        {
-            ResultModel resultModel = new ResultModel();
-            if (list.Count > 0)
-            {
-                object misValue = Missing.Value;
-                Application xlApp = new Application();
-                Workbook xlWorkBook = xlApp.Workbooks.Add(misValue);
-                Worksheet xlWorkSheet = (Worksheet)xlWorkBook.Worksheets.get_Item(1);
+        //public ResultModel DataExport(List<ObjectData> list,string FilePath)
+        //{
+        //    ResultModel resultModel = new ResultModel();
+        //    if (list.Count > 0)
+        //    {
+        //        object misValue = Missing.Value;
+        //        Application xlApp = new Application();
+        //        Workbook xlWorkBook = xlApp.Workbooks.Add(misValue);
+        //        Worksheet xlWorkSheet = (Worksheet)xlWorkBook.Worksheets.get_Item(1);
 
-                PropertyInfo[] props = GetPropertyInfoArray();
-                for (int i = 0; i < props.Length; i++)
-                {
-                    xlWorkSheet.Cells[1, i + 1] = props[i].Name; //write the column name
-                }
-                for (int i = 0; i < list.Count; i++)
-                {
-                    xlWorkSheet.Cells[i + 2, 1] = list[i].GaugeLeng.ToString();
-                    xlWorkSheet.Cells[i + 2, 2] = list[i].Time.ToString();
-                    xlWorkSheet.Cells[i + 2, 3] = list[i].Point1x.ToString();
-                    xlWorkSheet.Cells[i + 2, 4] = list[i].Point1y.ToString();
-                    xlWorkSheet.Cells[i + 2, 5] = list[i].Point2x.ToString();
-                    xlWorkSheet.Cells[i + 2, 6] = list[i].Point2y.ToString();
-                    xlWorkSheet.Cells[i + 2, 7] = list[i].StrainValue.ToString();
-                    xlWorkSheet.Cells[i + 2, 8] = list[i].Distance.ToString();
-                    xlWorkSheet.Cells[i + 2, 9] = list[i].Displacement.ToString();
-                    xlWorkSheet.Cells[i + 2, 10] = list[i].ForceValue.ToString();
-                }
-                try
-                {
-                    xlWorkBook.SaveAs(FilePath, XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
-                    xlWorkBook.Close(true, misValue, misValue);
-                    xlApp.Quit();
-                }
-                catch
-                { }
-            }
-            return resultModel;
-        }
+        //        PropertyInfo[] props = GetPropertyInfoArray();
+        //        for (int i = 0; i < props.Length; i++)
+        //        {
+        //            xlWorkSheet.Cells[1, i + 1] = props[i].Name; //write the column name
+        //        }
+        //        for (int i = 0; i < list.Count; i++)
+        //        {
+        //            xlWorkSheet.Cells[i + 2, 1] = list[i].GaugeLeng.ToString();
+        //            xlWorkSheet.Cells[i + 2, 2] = list[i].Time.ToString();
+        //            xlWorkSheet.Cells[i + 2, 3] = list[i].Point1x.ToString();
+        //            xlWorkSheet.Cells[i + 2, 4] = list[i].Point1y.ToString();
+        //            xlWorkSheet.Cells[i + 2, 5] = list[i].Point2x.ToString();
+        //            xlWorkSheet.Cells[i + 2, 6] = list[i].Point2y.ToString();
+        //            xlWorkSheet.Cells[i + 2, 7] = list[i].StrainValue.ToString();
+        //            xlWorkSheet.Cells[i + 2, 8] = list[i].Distance.ToString();
+        //            xlWorkSheet.Cells[i + 2, 9] = list[i].Displacement.ToString();
+        //            xlWorkSheet.Cells[i + 2, 10] = list[i].ForceValue.ToString();
+        //        }
+        //        try
+        //        {
+        //            xlWorkBook.SaveAs(FilePath, XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
+        //            xlWorkBook.Close(true, misValue, misValue);
+        //            xlApp.Quit();
+        //        }
+        //        catch
+        //        { }
+        //    }
+        //    return resultModel;
+        //}
 
         /// <summary>
         /// 查询数据库路径是否为空

+ 2 - 2
Extensometer.Data/Extensometer.Data.csproj

@@ -9,7 +9,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Extensometer.Data</RootNamespace>
     <AssemblyName>Extensometer.Data</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <Deterministic>true</Deterministic>
     <NuGetPackageImportStamp>
@@ -24,7 +24,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
+    <PlatformTarget>x64</PlatformTarget>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>

+ 2 - 2
Extensometer.Model/Extensometer.Model.csproj

@@ -9,7 +9,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Extensometer.Model</RootNamespace>
     <AssemblyName>Extensometer.Model</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <Deterministic>true</Deterministic>
     <TargetFrameworkProfile />
@@ -22,7 +22,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
+    <PlatformTarget>x64</PlatformTarget>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>

+ 1 - 1
Extensometer/App.config

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
     </startup>
 </configuration>

+ 6 - 8
Extensometer/Extensometer.csproj

@@ -8,7 +8,7 @@
     <OutputType>WinExe</OutputType>
     <RootNamespace>Extensometer</RootNamespace>
     <AssemblyName>Extensometer</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <Deterministic>true</Deterministic>
@@ -30,7 +30,7 @@
     <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>x86</PlatformTarget>
+    <PlatformTarget>x64</PlatformTarget>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
@@ -92,9 +92,8 @@
     <ApplicationIcon>favicon.ico</ApplicationIcon>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="CLIDelegate, Version=1.0.7541.33930, Culture=neutral, PublicKeyToken=71f71440696c7e6b, processorArchitecture=AMD64">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>bin\x86\Debug\CLIDelegate.dll</HintPath>
+    <Reference Include="CLIDelegate">
+      <HintPath>..\Extensometer.BLL\Bll\CLIDelegate.dll</HintPath>
     </Reference>
     <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -111,9 +110,8 @@
     <Reference Include="System.Net.Http" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
-    <Reference Include="ThridLibray, Version=1.0.0.31445, Culture=neutral, PublicKeyToken=407bb547be8622a9, processorArchitecture=AMD64">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>bin\x86\Debug\ThridLibray.dll</HintPath>
+    <Reference Include="ThridLibray">
+      <HintPath>..\Extensometer.BLL\Bll\ThridLibray.dll</HintPath>
     </Reference>
   </ItemGroup>
   <ItemGroup>

+ 3 - 3
Extensometer/Properties/Resources.Designer.cs

@@ -19,7 +19,7 @@ namespace Extensometer.Properties {
     // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
     // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
     // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     internal class Resources {
@@ -47,8 +47,8 @@ namespace Extensometer.Properties {
         }
         
         /// <summary>
-        ///   重写当前线程的 CurrentUICulture 属性
-        ///   重写当前线程的 CurrentUICulture 属性
+        ///   重写当前线程的 CurrentUICulture 属性,对
+        ///   使用此强类型资源类的所有资源查找执行重写。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
         internal static global::System.Globalization.CultureInfo Culture {

+ 1 - 1
Extensometer/Properties/Settings.Designer.cs

@@ -12,7 +12,7 @@ namespace Extensometer.Properties {
     
     
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.12.0.0")]
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
         
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

+ 1 - 1
Extensometer/WinForm/MainForm.cs

@@ -401,7 +401,7 @@ namespace Extensometer.WinForm
             };
             saveDialog.ShowDialog();
             saveFileName = saveDialog.FileName;
-            ObjDataOperation.DataExport(ObjDataOperation.CheckObjDb(), saveFileName);
+            //ObjDataOperation.DataExport(ObjDataOperation.CheckObjDb(), saveFileName);
         }
 
         /// <summary>