lx
2025-08-05 5a4ad30aed8871832885526fcb0eaf049540384d
report high light
已修改2个文件
77 ■■■■■ 文件已修改
ErrorAnalysis.Service/WordReportHelper.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ErrorAnalysis.UI/ErrorAnalysis.UI.csproj 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ErrorAnalysis.Service/WordReportHelper.cs
@@ -4,6 +4,7 @@
using SkiaSharp;
using static System.Net.Mime.MediaTypeNames;
using ErrorAnalysis.Service.Model;
using System.Drawing;
namespace ErrorAnalysis.Service
{
@@ -85,13 +86,17 @@
                    var cellText = cell.GetText().Replace(ControlChar.Cell, "").Replace(ControlChar.ParagraphBreak, "");
                    if (cellText.StartsWith("$"))
                    {
                        var property = properties.FirstOrDefault(p => p.Name == cellText.Trim().Replace("$", ""));
                        var name = cellText.Trim().Replace("$", "");
                        var property = properties.FirstOrDefault(p => p.Name == name);
                        if (property != null)
                        {
                            var valStr = property.GetValue(model).ToString();
                            var run = new Run(doc, valStr);
                            if (name == "Pass" || name == "Speed" || name == "Duration")
                                run.Font.Color = Color.Red; run.Font.Bold = true;
                            cell.FirstParagraph.RemoveAllChildren();
                            cell.FirstParagraph.AppendChild(new Run(doc, valStr));
                            cell.FirstParagraph.AppendChild(run);
                            cell.FirstParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Right;
                        }
                    }
ErrorAnalysis.UI/ErrorAnalysis.UI.csproj
@@ -1,40 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net8.0-windows</TargetFramework>
        <Nullable>enable</Nullable>
        <UseWindowsForms>true</UseWindowsForms>
        <ImplicitUsings>enable</ImplicitUsings>
        <ApplicationIcon>Image\logo.ico</ApplicationIcon>
        <Company>COSL</Company>
        <Authors>Casing Research Insitute</Authors>
        <Product>JobPlanner</Product>
        <Copyright>COSL</Copyright>
        <Version>1.0.1</Version>
    </PropertyGroup>
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net8.0-windows</TargetFramework>
    <Nullable>enable</Nullable>
    <UseWindowsForms>true</UseWindowsForms>
    <ImplicitUsings>enable</ImplicitUsings>
    <ApplicationIcon>Image\logo.ico</ApplicationIcon>
  </PropertyGroup>
    <ItemGroup>
        <Content Include="Image\logo.ico" />
    </ItemGroup>
  <ItemGroup>
    <Content Include="Image\logo.ico" />
  </ItemGroup>
    <ItemGroup>
        <PackageReference Include="OxyPlot.WindowsForms" Version="2.2.0" />
    </ItemGroup>
  <ItemGroup>
    <PackageReference Include="OxyPlot.WindowsForms" Version="2.2.0" />
  </ItemGroup>
    <ItemGroup>
        <ProjectReference Include="..\ErrorAnalysis.Repository\ErrorAnalysis.Repository.csproj" />
        <ProjectReference Include="..\ErrorAnalysis.Service\ErrorAnalysis.Service.csproj" />
    </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\ErrorAnalysis.Repository\ErrorAnalysis.Repository.csproj" />
    <ProjectReference Include="..\ErrorAnalysis.Service\ErrorAnalysis.Service.csproj" />
  </ItemGroup>
    <ItemGroup>
        <Compile Update="Properties\Resources.Designer.cs">
            <DesignTime>True</DesignTime>
            <AutoGen>True</AutoGen>
            <DependentUpon>Resources.resx</DependentUpon>
        </Compile>
    </ItemGroup>
  <ItemGroup>
    <Compile Update="Properties\Resources.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Update="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>
    <ItemGroup>
        <EmbeddedResource Update="Properties\Resources.resx">
            <Generator>ResXFileCodeGenerator</Generator>
            <LastGenOutput>Resources.Designer.cs</LastGenOutput>
        </EmbeddedResource>
    </ItemGroup>
</Project>