using Resources; using SmartCoalApplication.Core; using SmartCoalApplication.Resources; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text.RegularExpressions; using System.Windows.Forms; namespace SmartCoalApplication.AutomaticMeasurement { public partial class ResultViewPreview : PdnBaseForm { private ResultsView resultsView; public const int WM_NCLBUTTONDBLCLK = 0xA3; private const int WM_NCLBUTTONDOWN = 0x00A1; private const int HTCAPTION = 2; private MeasureInfoExportModel measureInfoExportModel; private int rowLine = 5; protected override void WndProc(ref Message m) { if (m.Msg == WM_NCLBUTTONDOWN && m.WParam.ToInt32() == HTCAPTION) return; if (m.Msg == WM_NCLBUTTONDBLCLK) return; base.WndProc(ref m); } public ResultViewPreview(ResultsView resultsView, string titleName, int rowLines, MeasureInfoExportModel measureInfoExportModel) { InitializeComponent(); this.resultsView = resultsView; this.Text = $"切片检验报告-{titleName}"; this.Icon = PdnInfo.AppIcon; this.measureInfoExportModel = measureInfoExportModel; if (rowLines > 5) { this.rowLine = rowLines; } #region[左边相同的部分] // 表头 int height = 38; int width = (this.Size.Width + 280) / 10; int dataWidth = (this.Size.Width - width * 5) / 5 + 5; string[] titles = { PdnResources.GetString("NewHoleTypeName"), PdnResources.GetString("NewTestItemsName"), PdnResources.GetString("NewSpecificationName"), PdnResources.GetString("NewMeasuringPositionName") }; string[] titleNames = { "kongxing", "jianyanxiangmu", "guige", "celiangweizhi" }; List