CrazyIter_Bin 1 anno fa
parent
commit
246d62a1f2
35 ha cambiato i file con 0 aggiunte e 941 eliminazioni
  1. 0 14
      BlobDownload/BlobDownload.csproj
  2. 0 105
      BlobDownload/Program.cs
  3. 0 1
      BlobDownload/download/index.json
  4. 0 14
      TEAMModelHTEX.sln
  5. 0 106
      TEAMModelScreenshot/Controllers/WeatherForecastController.cs
  6. 0 33
      TEAMModelScreenshot/Program.cs
  7. 0 31
      TEAMModelScreenshot/Properties/launchSettings.json
  8. 0 15
      TEAMModelScreenshot/TEAMModelScreenshot.csproj
  9. BIN
      TEAMModelScreenshot/TEAMModelScreenshot.zip
  10. 0 13
      TEAMModelScreenshot/WeatherForecast.cs
  11. 0 8
      TEAMModelScreenshot/appsettings.Development.json
  12. 0 9
      TEAMModelScreenshot/appsettings.json
  13. BIN
      TestFile/Group.png
  14. BIN
      TestFile/WPS.zip
  15. BIN
      TestFile/所有SmartArt测试.pptx
  16. BIN
      TestFile/所有图表Chart测试.pptx
  17. BIN
      TestFile/所有形状Shape测试.pptx
  18. 0 39
      WebApplication1/Controllers/WeatherForecastController.cs
  19. 0 26
      WebApplication1/Program.cs
  20. 0 30
      WebApplication1/Properties/launchSettings.json
  21. 0 48
      WebApplication1/Startup.cs
  22. 0 15
      WebApplication1/WeatherForecast.cs
  23. 0 8
      WebApplication1/WebApplication1.csproj
  24. 0 9
      WebApplication1/appsettings.Development.json
  25. 0 10
      WebApplication1/appsettings.json
  26. 0 62
      WinFormsApp1/Form1.Designer.cs
  27. 0 10
      WinFormsApp1/Form1.cs
  28. 0 120
      WinFormsApp1/Form1.resx
  29. 0 17
      WinFormsApp1/Program.cs
  30. 0 15
      WinFormsApp1/WinFormsApp1.csproj
  31. 0 6
      WordToHtml/App.config
  32. 0 75
      WordToHtml/Program.cs
  33. 0 36
      WordToHtml/Properties/AssemblyInfo.cs
  34. 0 61
      WordToHtml/WordToHtml.csproj
  35. 0 5
      WordToHtml/packages.config

+ 0 - 14
BlobDownload/BlobDownload.csproj

@@ -1,14 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-    <TargetFramework>net5.0</TargetFramework>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <PackageReference Include="Aspose.Slides.NET" Version="21.8.0" />
-    <PackageReference Include="Azure.Storage.Blobs.Batch" Version="12.6.0" />
-    <PackageReference Include="System.Drawing.Common" Version="5.0.2" />
-  </ItemGroup>
-
-</Project>

+ 0 - 105
BlobDownload/Program.cs

@@ -1,105 +0,0 @@
-using Azure.Storage.Blobs;
-using Azure.Storage.Blobs.Models;
-using Azure.Storage.Blobs.Specialized;
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace BlobDownload
-{
-   public class Program
-    {
-        static bool IsNumeric(string str)
-        {
-            System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[-]?\d+[.]?\d*$");
-            return reg1.IsMatch(str);
-        }
-        static async Task Main(string[] args)
-        {
-            var prs = new Aspose.Slides.Presentation(@"C:\Users\CrazyIter\Desktop\6.2.3平面图形的认识与测量(三)(3).pptx");
-            prs.Save(@"C:\Users\CrazyIter\Desktop\output.Gif", Aspose.Slides.Export.SaveFormat.Gif);
-            string reg1 = "123aewe";
-            string reg2 = "858";
-            string reg3 = "858=";
-            string reg4 = "aa858=";
-            string reg5 = "83edd58=";
-            Console.WriteLine(IsNumeric(reg1));
-            Console.WriteLine(IsNumeric(reg2));
-            Console.WriteLine(IsNumeric(reg3));
-            Console.WriteLine(IsNumeric(reg4));
-            Console.WriteLine(IsNumeric(reg5));
-
-
-
-            string base64 = "/base64.txt";
-            StreamReader sr = new StreamReader(base64, Encoding.Default);
-            StringBuilder content = new StringBuilder();
-            string line;
-            while ((line = sr.ReadLine()) != null)
-            {
-                content.Append(line);
-            }
-            byte[] bytes = Convert.FromBase64String(content.ToString());
-            Stream stream = new MemoryStream(bytes);
-
-            // MemoryStream memoryStream = new MemoryStream();
-            System.Drawing.Bitmap inFile = new System.Drawing.Bitmap(stream);
-            Graphics graphics = Graphics.FromImage(inFile);
-            graphics.Save();
-            graphics.Dispose();
-            inFile.Save("test.png", System.Drawing.Imaging.ImageFormat.Png);
-            //byte[] arr = new byte[memoryStream.Length];
-            //memoryStream.Position = 0;
-            //memoryStream.Read(arr, 0, (int)memoryStream.Length);
-            //memoryStream.Close();
-            //memoryStream.Dispose();
-            /*
-            string StorageAccountConnectionString = "DefaultEndpointsProtocol=https;AccountName=teammodelstorage;AccountKey=Yq7D4dE6cFuer2d2UZIccTA/i0c3sJ/6ITc8tNOyW+K5f+/lWw9GCos3Mxhj47PyWQgDL8YbVD63B9XcGtrMxQ==;EndpointSuffix=core.chinacloudapi.cn";
-            BlobServiceClient blobServiceClient = new BlobServiceClient(StorageAccountConnectionString);
-            BlobContainerClient blobContainerClient = new BlobContainerClient(StorageAccountConnectionString, "hbcn");
-            //BlobClient blob = blobContainerClient.GetBlobClient("res/PRD-20191015001/index.json");
-            //await blob.DownloadToAsync(@"D:\VisualStudioProjects\TEAMModelOS\BlobDownload\download\index.json");
-            string downloadpath = "F:/download";
-            HashSet<string> pathset = new HashSet<string>();
-            List<string> items = new List<string>();
-            int count = 0;
-            await  foreach (BlobItem item in blobContainerClient.GetBlobsAsync(BlobTraits.None, BlobStates.None, "res/PRD-20191015002"))
-            {
-                string path = Path.Combine(downloadpath, item.Name);
-                var paths= path.Split("/");
-                StringBuilder stringBuilder = new StringBuilder();
-                for (int i = 0; i < paths.Length-1; i++) {
-                    stringBuilder.Append($"{paths[i]}/");
-
-                }
-                pathset.Add(stringBuilder.ToString());
-                count++;
-                items.Add(item.Name);
-            }
-
-            foreach (var path in pathset) {
-                if (!Directory.Exists(path)) {
-                    Directory.CreateDirectory(path);
-                }
-            }
-            List<Task> tasks = new List<Task>();
-            long  start= DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
-            foreach (var item in items)
-            {
-                BlobClient blob = blobContainerClient.GetBlobClient(item);
-
-                string path = Path.Combine(downloadpath, item);
-               
-                tasks.Add(blob.DownloadToAsync(path));
-            }
-            await Task.WhenAll(tasks);
-            long end = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
-            Console.WriteLine($"文件个数:{count};下载时间:{end-start}毫秒");
-            */
-        }
-    }
-}

File diff suppressed because it is too large
+ 0 - 1
BlobDownload/download/index.json


+ 0 - 14
TEAMModelHTEX.sln

@@ -25,8 +25,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTEXMark", "HTEXMark\HTEXMa
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTEXWordTest", "HTEXWordTest\HTEXWordTest.csproj", "{D8954476-CEAB-42AF-9926-ECE0AF26FE8F}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTEXWordTest", "HTEXWordTest\HTEXWordTest.csproj", "{D8954476-CEAB-42AF-9926-ECE0AF26FE8F}"
 EndProject
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsApp1", "WinFormsApp1\WinFormsApp1.csproj", "{0148BE86-30AE-440A-8FBD-BF53B02244DB}"
-EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
@@ -169,18 +167,6 @@ Global
 		{D8954476-CEAB-42AF-9926-ECE0AF26FE8F}.Release|iPhone.Build.0 = Release|Any CPU
 		{D8954476-CEAB-42AF-9926-ECE0AF26FE8F}.Release|iPhone.Build.0 = Release|Any CPU
 		{D8954476-CEAB-42AF-9926-ECE0AF26FE8F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
 		{D8954476-CEAB-42AF-9926-ECE0AF26FE8F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
 		{D8954476-CEAB-42AF-9926-ECE0AF26FE8F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
 		{D8954476-CEAB-42AF-9926-ECE0AF26FE8F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Debug|iPhone.ActiveCfg = Debug|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Debug|iPhone.Build.0 = Debug|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Release|Any CPU.Build.0 = Release|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Release|iPhone.ActiveCfg = Release|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Release|iPhone.Build.0 = Release|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
-		{0148BE86-30AE-440A-8FBD-BF53B02244DB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE

File diff suppressed because it is too large
+ 0 - 106
TEAMModelScreenshot/Controllers/WeatherForecastController.cs


+ 0 - 33
TEAMModelScreenshot/Program.cs

@@ -1,33 +0,0 @@
-var builder = WebApplication.CreateBuilder(args);
-  string MyAllowSpecificOrigins = "_myAllowSpecificOrigins";
-// Add services to the container.
-builder.WebHost.UseUrls(new string[] { "http://127.0.0.1:41440" });
-builder.Services.AddControllers();
-// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
-builder.Services.AddEndpointsApiExplorer();
-builder.Services.AddSwaggerGen();
-builder.Services.AddCors(options =>
-{
-    options.AddPolicy(MyAllowSpecificOrigins,
-    builder =>
-    {
-        builder.WithOrigins( 
-                            "http://localhost:41440", "http://127.0.0.1:41440", "http://cdhabook.teammodel.cn:41440", "http://cdhabook.teammodel.cn")
-        .AllowAnyHeader()
-        .AllowAnyMethod();
-    });
-});
-var app = builder.Build();
-
-// Configure the HTTP request pipeline.
-if (app.Environment.IsDevelopment())
-{
-    app.UseSwagger();
-    app.UseSwaggerUI();
-}
-
-app.UseHttpsRedirection();
-app.UseCors(MyAllowSpecificOrigins); //使用跨域設定
-app.UseAuthorization();
-app.MapControllers();
-app.Run();

+ 0 - 31
TEAMModelScreenshot/Properties/launchSettings.json

@@ -1,31 +0,0 @@
-{
-  "$schema": "https://json.schemastore.org/launchsettings.json",
-  "iisSettings": {
-    "windowsAuthentication": false,
-    "anonymousAuthentication": true,
-    "iisExpress": {
-      "applicationUrl": "http://localhost:41440",
-      "sslPort": 44362
-    }
-  },
-  "profiles": {
-    "TEAMModelScreenshot": {
-      "commandName": "Project",
-      "launchBrowser": true,
-      "launchUrl": "swagger",
-      "environmentVariables": {
-        "ASPNETCORE_ENVIRONMENT": "Development"
-      },
-      "applicationUrl": "http://127.0.0.1:41440",
-      "dotnetRunMessages": true
-    },
-    "IIS Express": {
-      "commandName": "IISExpress",
-      "launchBrowser": true,
-      "launchUrl": "swagger",
-      "environmentVariables": {
-        "ASPNETCORE_ENVIRONMENT": "Development"
-      }
-    }
-  }
-}

+ 0 - 15
TEAMModelScreenshot/TEAMModelScreenshot.csproj

@@ -1,15 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk.Web">
-
-  <PropertyGroup>
-    <TargetFramework>net6.0</TargetFramework>
-    <Nullable>enable</Nullable>
-    <ImplicitUsings>enable</ImplicitUsings>
-    <UserSecretsId>204f537e-a552-4521-9273-e81663007d3f</UserSecretsId>
-  </PropertyGroup>
-  <ItemGroup>
-    <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.16.1" />
-    <PackageReference Include="PuppeteerSharp" Version="7.1.0" />
-    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
-  </ItemGroup>
-  <ProjectExtensions><VisualStudio><UserProperties appsettings_1development_1json__JsonSchema="https://appliedengdesign.github.io/cnccodes-json-schema/draft/2022-07/schema" /></VisualStudio></ProjectExtensions>
-</Project>

BIN
TEAMModelScreenshot/TEAMModelScreenshot.zip


+ 0 - 13
TEAMModelScreenshot/WeatherForecast.cs

@@ -1,13 +0,0 @@
-namespace TEAMModelScreenshot
-{
-    public class WeatherForecast
-    {
-        public DateTime Date { get; set; }
-
-        public int TemperatureC { get; set; }
-
-        public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
-
-        public string? Summary { get; set; }
-    }
-}

+ 0 - 8
TEAMModelScreenshot/appsettings.Development.json

@@ -1,8 +0,0 @@
-{
-  "Logging": {
-    "LogLevel": {
-      "Default": "Information",
-      "Microsoft.AspNetCore": "Warning"
-    }
-  }
-}

+ 0 - 9
TEAMModelScreenshot/appsettings.json

@@ -1,9 +0,0 @@
-{
-  "Logging": {
-    "LogLevel": {
-      "Default": "Information",
-      "Microsoft.AspNetCore": "Warning"
-    }
-  },
-  "AllowedHosts": "*"
-}

BIN
TestFile/Group.png


BIN
TestFile/WPS.zip


BIN
TestFile/所有SmartArt测试.pptx


BIN
TestFile/所有图表Chart测试.pptx


BIN
TestFile/所有形状Shape测试.pptx


+ 0 - 39
WebApplication1/Controllers/WeatherForecastController.cs

@@ -1,39 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Logging;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace WebApplication1.Controllers
-{
-    [ApiController]
-    [Route("[controller]")]
-    public class WeatherForecastController : ControllerBase
-    {
-        private static readonly string[] Summaries = new[]
-        {
-            "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
-        };
-
-        private readonly ILogger<WeatherForecastController> _logger;
-
-        public WeatherForecastController(ILogger<WeatherForecastController> logger)
-        {
-            _logger = logger;
-        }
-
-        [HttpGet]
-        public IEnumerable<WeatherForecast> Get()
-        {
-            var rng = new Random();
-            return Enumerable.Range(1, 5).Select(index => new WeatherForecast
-            {
-                Date = DateTime.Now.AddDays(index),
-                TemperatureC = rng.Next(-20, 55),
-                Summary = Summaries[rng.Next(Summaries.Length)]
-            })
-            .ToArray();
-        }
-    }
-}

+ 0 - 26
WebApplication1/Program.cs

@@ -1,26 +0,0 @@
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Logging;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace WebApplication1
-{
-    public class Program
-    {
-        public static void Main(string[] args)
-        {
-            CreateHostBuilder(args).Build().Run();
-        }
-
-        public static IHostBuilder CreateHostBuilder(string[] args) =>
-            Host.CreateDefaultBuilder(args)
-                .ConfigureWebHostDefaults(webBuilder =>
-                {
-                    webBuilder.UseStartup<Startup>();
-                });
-    }
-}

+ 0 - 30
WebApplication1/Properties/launchSettings.json

@@ -1,30 +0,0 @@
-{
-  "$schema": "http://json.schemastore.org/launchsettings.json",
-  "iisSettings": {
-    "windowsAuthentication": false,
-    "anonymousAuthentication": true,
-    "iisExpress": {
-      "applicationUrl": "http://localhost:45493",
-      "sslPort": 0
-    }
-  },
-  "profiles": {
-    "IIS Express": {
-      "commandName": "IISExpress",
-      "launchBrowser": true,
-      "launchUrl": "weatherforecast",
-      "environmentVariables": {
-        "ASPNETCORE_ENVIRONMENT": "Development"
-      }
-    },
-    "WebApplication1": {
-      "commandName": "Project",
-      "launchBrowser": true,
-      "launchUrl": "weatherforecast",
-      "applicationUrl": "http://localhost:5000",
-      "environmentVariables": {
-        "ASPNETCORE_ENVIRONMENT": "Development"
-      }
-    }
-  }
-}

+ 0 - 48
WebApplication1/Startup.cs

@@ -1,48 +0,0 @@
-using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Logging;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace WebApplication1
-{
-    public class Startup
-    {
-        public Startup(IConfiguration configuration)
-        {
-            Configuration = configuration;
-        }
-
-        public IConfiguration Configuration { get; }
-
-        // This method gets called by the runtime. Use this method to add services to the container.
-        public void ConfigureServices(IServiceCollection services)
-        {
-            services.AddControllers();
-        }
-
-        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
-        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
-        {
-            if (env.IsDevelopment())
-            {
-                app.UseDeveloperExceptionPage();
-            }
-
-            app.UseRouting();
-
-            app.UseAuthorization();
-
-            app.UseEndpoints(endpoints =>
-            {
-                endpoints.MapControllers();
-            });
-        }
-    }
-}

+ 0 - 15
WebApplication1/WeatherForecast.cs

@@ -1,15 +0,0 @@
-using System;
-
-namespace WebApplication1
-{
-    public class WeatherForecast
-    {
-        public DateTime Date { get; set; }
-
-        public int TemperatureC { get; set; }
-
-        public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
-
-        public string Summary { get; set; }
-    }
-}

+ 0 - 8
WebApplication1/WebApplication1.csproj

@@ -1,8 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk.Web">
-
-  <PropertyGroup>
-    <TargetFramework>netcoreapp3.1</TargetFramework>
-  </PropertyGroup>
-
-
-</Project>

+ 0 - 9
WebApplication1/appsettings.Development.json

@@ -1,9 +0,0 @@
-{
-  "Logging": {
-    "LogLevel": {
-      "Default": "Information",
-      "Microsoft": "Warning",
-      "Microsoft.Hosting.Lifetime": "Information"
-    }
-  }
-}

+ 0 - 10
WebApplication1/appsettings.json

@@ -1,10 +0,0 @@
-{
-  "Logging": {
-    "LogLevel": {
-      "Default": "Information",
-      "Microsoft": "Warning",
-      "Microsoft.Hosting.Lifetime": "Information"
-    }
-  },
-  "AllowedHosts": "*"
-}

+ 0 - 62
WinFormsApp1/Form1.Designer.cs

@@ -1,62 +0,0 @@
-namespace WinFormsApp1
-{
-    partial class Form1
-    {
-        /// <summary>
-        ///  Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        ///  Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        ///  Required method for Designer support - do not modify
-        ///  the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            webView21 = new Microsoft.Web.WebView2.WinForms.WebView2();
-            ((System.ComponentModel.ISupportInitialize)webView21).BeginInit();
-            SuspendLayout();
-            // 
-            // webView21
-            // 
-            webView21.AllowExternalDrop = true;
-            webView21.CreationProperties = null;
-            webView21.DefaultBackgroundColor = Color.White;
-            webView21.Location = new Point(12, 52);
-            webView21.Name = "webView21";
-            webView21.Size = new Size(759, 386);
-            webView21.TabIndex = 0;
-            webView21.ZoomFactor = 1D;
-            // 
-            // Form1
-            // 
-            AutoScaleDimensions = new SizeF(7F, 17F);
-            AutoScaleMode = AutoScaleMode.Font;
-            ClientSize = new Size(800, 450);
-            Controls.Add(webView21);
-            Name = "Form1";
-            Text = "Form1";
-            ((System.ComponentModel.ISupportInitialize)webView21).EndInit();
-            ResumeLayout(false);
-        }
-
-        #endregion
-
-        private Microsoft.Web.WebView2.WinForms.WebView2 webView21;
-    }
-}

+ 0 - 10
WinFormsApp1/Form1.cs

@@ -1,10 +0,0 @@
-namespace WinFormsApp1
-{
-    public partial class Form1 : Form
-    {
-        public Form1()
-        {
-            InitializeComponent();
-        }
-    }
-}

+ 0 - 120
WinFormsApp1/Form1.resx

@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!--
-    Microsoft ResX Schema 
-
-    Version 2.0
-
-    The primary goals of this format is to allow a simple XML format
-    that is mostly human readable. The generation and parsing of the
-    various data types are done through the TypeConverter classes
-    associated with the data types.
-
-    Example:
-
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-
-    There are any number of "resheader" rows that contain simple
-    name/value pairs.
-
-    Each data row contains a name, and value. The row also contains a
-    type or mimetype. Type corresponds to a .NET class that support
-    text/value conversion through the TypeConverter architecture.
-    Classes that don't support this are serialized and stored with the
-    mimetype set.
-
-    The mimetype is used for serialized objects, and tells the
-    ResXResourceReader how to depersist the object. This is currently not
-    extensible. For a given mimetype the value must be set accordingly:
-
-    Note - application/x-microsoft.net.object.binary.base64 is the format
-    that the ResXResourceWriter will generate, however the reader can
-    read any of the formats listed below.
-
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 0 - 17
WinFormsApp1/Program.cs

@@ -1,17 +0,0 @@
-namespace WinFormsApp1
-{
-    internal static class Program
-    {
-        /// <summary>
-        ///  The main entry point for the application.
-        /// </summary>
-        [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());
-        }
-    }
-}

+ 0 - 15
WinFormsApp1/WinFormsApp1.csproj

@@ -1,15 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <OutputType>WinExe</OutputType>
-    <TargetFramework>net8.0-windows</TargetFramework>
-    <Nullable>enable</Nullable>
-    <UseWindowsForms>true</UseWindowsForms>
-    <ImplicitUsings>enable</ImplicitUsings>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2210.55" />
-  </ItemGroup>
-
-</Project>

+ 0 - 6
WordToHtml/App.config

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

+ 0 - 75
WordToHtml/Program.cs

@@ -1,75 +0,0 @@
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.Office.Interop.Word;
-using System.Runtime.InteropServices;
-
-namespace WordToHtml
-{
-    class Program
-    {
-        static void Main(string[] args)
-        {
-
-           var result = "C:\\Users\\CrazyIter\\Desktop\\导入异常试卷\\IES5-109指考最前線-化學科.docx";
-            //var result = "C:\\Users\\CrazyIter\\Desktop\\IES5-109指考最前線-化學科.docx";
-            //Word 转 Html
-            //前提:请先引用 Microsoft.Office.Interop.Word
-            ApplicationClass w_app = new ApplicationClass();
-            Type wordType = w_app.GetType();
-            Documents w_docs = w_app.Documents;
-
-            Type docsType = w_docs.GetType();
-            object p_file_nm = result;     //请在d分区下先新建好这个文件
-            object saveFileName = @"C:\Users\CrazyIter\Desktop\导入异常试卷\1111111\abcd.html";
-
-            Document w_doc = (Microsoft.Office.Interop.Word.Document)docsType.InvokeMember("Open", System.Reflection.BindingFlags.InvokeMethod, null, w_docs, new Object[] { p_file_nm, true, true }); new UnknownWrapper(null);
-            Type docType = w_doc.GetType();
-
-            docType.InvokeMember("SaveAs", System.Reflection.BindingFlags.InvokeMethod, null, w_doc, new object[] { saveFileName, Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatFilteredHTML  });
-            wordType.InvokeMember("Quit",
-                System.Reflection.BindingFlags.InvokeMethod,
-                null,
-                w_app,
-                null
-               );
-        }
-        /// <summary>
-        /// word转成html
-        /// </summary>
-        /// <param name="wordFileName"></param>
-        private string WordToHtml(object wordFileName)
-        {
-            //在此处放置用户代码以初始化页面
-            Microsoft.Office.Interop.Word.ApplicationClass word = new Microsoft.Office.Interop.Word.ApplicationClass();
-            Type wordType = word.GetType();
-            Documents docs = word.Documents;
-
-            //打开文件
-            Type docsType = docs.GetType();
-            Document doc = (Document)docsType.InvokeMember("Open",
-            System.Reflection.BindingFlags.InvokeMethod, null, docs, new Object[] { wordFileName, true, true });
-
-            //转换格式,另存为
-            Type docType = doc.GetType();
-
-            string wordSaveFileName = wordFileName.ToString();
-            string strSaveFileName = wordSaveFileName.Substring(0, wordSaveFileName.Length - 3) ;
-            object saveFileName = (object)strSaveFileName;
-
-            docType.InvokeMember("SaveAs", System.Reflection.BindingFlags.InvokeMethod,
-null, doc, new object[] { saveFileName, WdSaveFormat.wdFormatFilteredHTML });
-
-            docType.InvokeMember("Close", System.Reflection.BindingFlags.InvokeMethod,
-null, doc, null);
-
-            //退出 Word
-            wordType.InvokeMember("Quit", System.Reflection.BindingFlags.InvokeMethod,
-null, word, null);
-
-            return saveFileName.ToString();
-        }
-    }
-}

+ 0 - 36
WordToHtml/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// 有关程序集的一般信息由以下
-// 控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("WordToHtml")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("WordToHtml")]
-[assembly: AssemblyCopyright("Copyright ©  2021")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 false 会使此程序集中的类型
-//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
-//请将此类型的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("d09a711f-119d-4d53-ae86-e5515bb46fd8")]
-
-// 程序集的版本信息由下列四个值组成: 
-//
-//      主版本
-//      次版本
-//      生成号
-//      修订号
-//
-//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
-//通过使用 "*",如下所示:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 61
WordToHtml/WordToHtml.csproj

@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{D09A711F-119D-4D53-AE86-E5515BB46FD8}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <RootNamespace>WordToHtml</RootNamespace>
-    <AssemblyName>WordToHtml</AssemblyName>
-    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
-    <Deterministic>true</Deterministic>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Microsoft.Office.Interop.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
-      <HintPath>..\packages\Microsoft.Office.Interop.Word.15.0.4797.1003\lib\net20\Microsoft.Office.Interop.Word.dll</HintPath>
-      <EmbedInteropTypes>False</EmbedInteropTypes>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Net.Http" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="App.config" />
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="HTEX\" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>

+ 0 - 5
WordToHtml/packages.config

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="Mammoth" version="1.4.0.0" targetFramework="net472" />
-  <package id="Microsoft.Office.Interop.Word" version="15.0.4797.1003" targetFramework="net472" />
-</packages>